bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
* groff: error after update of gnulib, 13th January 2023
@ 2023-01-13  1:43 Bjarni Ingi Gislason
  2023-01-13  2:25 ` Bruno Haible
  0 siblings, 1 reply; 5+ messages in thread
From: Bjarni Ingi Gislason @ 2023-01-13  1:43 UTC (permalink / raw)
  To: bug-gnulib

Software: groff

  I got these warnings in directory "groff/build" after an update of
gnulib (13th January), commit 2886cca8398f4c5a4d68368a19c0e6d0ff97c739 

  CC       lib/libgnu_a-openat-die.o
In file included from ../lib/openat-die.c:25:
../src/include/error.h:22:44: warning: type defaults to 'int' in declaration of 'errarg' [-Wimplicit-int]
   22 |                                      const errarg &arg1 = empty_errarg,
      |                                            ^~~~~~
../src/include/error.h:22:51: error: expected ';', ',' or ')' before '&' token
   22 |                                      const errarg &arg1 = empty_errarg,
      |                                                   ^
../src/include/error.h:27:37: warning: type defaults to 'int' in declaration of 'errarg' [-Wimplicit-int]
   27 |                               const errarg & = empty_errarg,
      |                                     ^~~~~~
../src/include/error.h:27:44: error: expected ';', ',' or ')' before '&' token
   27 |                               const errarg & = empty_errarg,
      |                                            ^
../src/include/error.h:32:39: warning: type defaults to 'int' in declaration of 'errarg' [-Wimplicit-int]
   32 |                                 const errarg & = empty_errarg,
      |                                       ^~~~~~
../src/include/error.h:32:46: error: expected ';', ',' or ')' before '&' token
   32 |                                 const errarg & = empty_errarg,
      |                                              ^
../src/include/error.h:37:37: warning: type defaults to 'int' in declaration of 'errarg' [-Wimplicit-int]
   37 |                               const errarg & = empty_errarg,
      |                                     ^~~~~~
../src/include/error.h:37:44: error: expected ';', ',' or ')' before '&' token
   37 |                               const errarg & = empty_errarg,
      |                                            ^
../src/include/error.h:42:18: warning: type defaults to 'int' in declaration of 'errarg' [-Wimplicit-int]
   42 |            const errarg & = empty_errarg,
      |                  ^~~~~~
../src/include/error.h:42:25: error: expected ';', ',' or ')' before '&' token
   42 |            const errarg & = empty_errarg,
      |                         ^
../src/include/error.h:47:18: warning: type defaults to 'int' in declaration of 'errarg' [-Wimplicit-int]
   47 |            const errarg & = empty_errarg,
      |                  ^~~~~~
../src/include/error.h:47:25: error: expected ';', ',' or ')' before '&' token
   47 |            const errarg & = empty_errarg,
      |                         ^
../src/include/error.h:52:20: warning: type defaults to 'int' in declaration of 'errarg' [-Wimplicit-int]
   52 |              const errarg & = empty_errarg,
      |                    ^~~~~~
../src/include/error.h:52:27: error: expected ';', ',' or ')' before '&' token
   52 |              const errarg & = empty_errarg,
      |                           ^
../src/include/error.h:57:18: warning: type defaults to 'int' in declaration of 'errarg' [-Wimplicit-int]
   57 |            const errarg & = empty_errarg,
      |                  ^~~~~~
../src/include/error.h:57:25: error: expected ';', ',' or ')' before '&' token
   57 |            const errarg & = empty_errarg,
      |                         ^
../src/include/error.h:62:8: error: expected identifier or '(' before string constant
   62 | extern "C" const char *program_name;
      |        ^~~
../lib/openat-die.c: In function 'openat_save_fail':
../lib/openat-die.c:37:3: warning: implicit declaration of function 'error'; did you mean 'strerror'? [-Wimplicit-function-declaration]
   37 |   error (exit_failure, errnum,
      |   ^~~~~
      |   strerror
--- ../lib/openat-die.c
+++ ../lib/openat-die.c
@@ -34,7 +34,7 @@
 openat_save_fail (int errnum)
 {
 #ifndef GNULIB_LIBPOSIX
-  error (exit_failure, errnum,
+  strerror (exit_failure, errnum,
          _("unable to record current working directory"));
 #endif
   /* _Noreturn cannot be applied to error, since it returns
make[1]: *** [Makefile:9024: lib/libgnu_a-openat-die.o] Error 1
make[1]: Leaving directory '/home/bg/git/groff/build'
make: *** [Makefile:6823: all] Error 2

######

  "error.h" is a local file with:

// -*- C++ -*-
/* Copyright (C) 1989-2020 Free Software Foundation, Inc.
     Written by James Clark (jjc@jclark.com)
[...]
class errarg {
  enum { EMPTY, STRING, CHAR, INTEGER, UNSIGNED_INTEGER, DOUBLE } type;
  union {
    const char *s;
    int n;
    unsigned int u;
    char c;
    double d;
  };
 public:
  errarg();
  errarg(const char *);
  errarg(char);
  errarg(unsigned char);
  errarg(int);
  errarg(unsigned int);
  errarg(double);
  int empty() const;
  void print() const;
};

extern errarg empty_errarg;

extern void errprint(const char *,
                     const errarg &arg1 = empty_errarg,
                     const errarg &arg2 = empty_errarg,
                     const errarg &arg3 = empty_errarg);

#####

  The bootstrap.conf is:

# Bootstrap configuration.

# Copyright (C) 2006-2022 Free Software Foundation, Inc.

# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <https://www.gnu.org/licenses/>.


# gnulib m4 macro 
m4_base=gnulib_m4

# gnulib C source files
source_base=lib

# additional standard files, particularly added by 
# automake --add-missing
build_aux=build-aux

gnulib_name=libgnu

# This file is not distributed and used to check if the bootstrap
# script is not launched on a tarball
checkout_only_file=README.git

# gnulib modules used by this package.
# havelib provides config.rpath
# can be get through gettext though
# gen-header added 25th December 2021
# non-recursive-gnulib-prefix-hack removed 22th January 2022

gnulib_modules="
    git-version-gen
    havelib
    manywarnings
    wcwidth
    fprintf-posix
    gen-header
    snprintf
    vsnprintf-posix
    warnings
  mkstemp
  fmod
  getcwd
  putenv
  strcase
  strerror
  strtol
  setlocale
  stdckdint
  assert
  assert-h
  idx
  string
  strings
 "
# non-recursive-gnulib-prefix-hack was removed as deprecated
# (around 20th December 2021)

# Name of the Makefile.am
gnulib_tool_option_extras="
    --makefile-name=gnulib.mk
    --automake-subdir"

# Additional xgettext options to use.  Use "\\\newline" to break lines.
XGETTEXT_OPTIONS=$XGETTEXT_OPTIONS'\\\
 --from-code=UTF-8\\\
 --flag=asprintf:2:c-format --flag=vasprintf:2:c-format\\\
 --flag=asnprintf:3:c-format --flag=vasnprintf:3:c-format\\\
 --flag=wrapf:1:c-format\\\
'

# If "AM_GNU_GETTEXT(external" or "AM_GNU_GETTEXT([external]"
# appears in configure.ac, exclude some unnecessary files.
# Without grep's -E option (not portable enough, pre-configure),
# the following test is ugly.  Also, this depends on the existence
# of configure.ac, not the obsolescent-named configure.in.  But if
# you're using this infrastructure, you should care about such things.

gettext_external=0
grep '^[	 ]*AM_GNU_GETTEXT(external\>' configure.ac > /dev/null &&
  gettext_external=1
grep '^[	 ]*AM_GNU_GETTEXT(\[external\]' configure.ac > /dev/null &&
  gettext_external=1

if test $gettext_external = 1; then
  # Gettext supplies these files, but we don't need them since
  # we don't have an intl subdirectory.
  excluded_files='
      m4/glibc2.m4
      m4/intdiv0.m4
      m4/lcmessage.m4
      m4/lock.m4
      m4/printf-posix.m4
      m4/size_max.m4
      m4/uintmax_t.m4
      m4/ulonglong.m4
      m4/visibility.m4
      m4/xsize.m4
  '
fi

# Build prerequisites
buildreq="\
autoconf   2.68
automake   1.12.2
git        1.5.5
libtool    2.2.2
tar        -
pkg-config -
"

bootstrap_post_import_hook ()
{
  # Automake requires that ChangeLog exist.
  touch ChangeLog || return 1
}

####

  About "GNULIB_LIBPOSIX":

  There exists a file "STATUS-libposix".

  The macro is used in "lib/oppenat-die.c:25 and ChangeLog:

--- Citation---

2010-12-30  Bruce Korb  <bkorb@gnu.org>

        libposix: avoid calling error() within libposix
        * lib/openat-die.c: remove error module stuff when
GNULIB_LIBPOSIX
        is defined.
--- End of citation

 


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-01-13 23:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-13  1:43 groff: error after update of gnulib, 13th January 2023 Bjarni Ingi Gislason
2023-01-13  2:25 ` Bruno Haible
2023-01-13 19:09   ` Bjarni Ingi Gislason
2023-01-13 21:56     ` Bruno Haible
2023-01-13 23:33       ` Bjarni Ingi Gislason

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).