Page MenuHome GnuPG

Redeclaration of internal functions to use "external" typedef prevents build on AIX
Closed, ResolvedPublic

Description

The "google text" most likely to return multiple hits on this is:
Redeclaration of _gcry_mpi_ec_set_mpi differs from previous declaration on line
423 of

In short - as introduction - The topic here is not new. I brought it up last
November, and someone else a few moths later.
The commment was just about a single issue, but that is inherent in make without
"-i".
After the first FAIL, it stops.

Had it stayed with a single case I might have tried to make a suggestion. But
the problem
of mixing types goes much deeper - too deep for me to propose a solution.

Looking deeper now into that first error - and motivator to file it as a bug.

++++++++++++++
The complaint is:
libtool: compile: xlc -DHAVE_CONFIG_H -I. -I.. -I../src -I../src
-I/opt/buildaix/include -I/opt/include -D_THREAD_SAFE -I/opt/include
-I/opt/include -I/opt/buildaix/include -O2 -c mpi-add.c
-Wp,-qmakedep=gcc,-MF.deps/mpi-add.TPlo -DPIC -o .libs/mpi-add.o
"../src/mpi.h", line 295.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_set_mpi
differs from previous declaration on line 423 of "../src/gcrypt-int.h".
"../src/mpi.h", line 295.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 297.16: 1506-343 (S) Redeclaration of
_gcry_mpi_ec_set_point differs from previous declaration on line 425 of
"../src/gcrypt-int.h".
"../src/mpi.h", line 297.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 302.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_new
differs from previous declaration on line 418 of "../src/gcrypt-int.h".
"../src/mpi.h", line 302.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".

In ../src/gcrypt-int.h

  +423  gpg_error_t _gcry_mpi_ec_set_mpi (const char *name, gcry_mpi_t newvalue,
  +424                                   gcry_ctx_t ctx);

in ../src/mpi.h

  +295  gpg_err_code_t _gcry_mpi_ec_set_mpi (const char *name, gcry_mpi_t newvalue,
  +296                                       gcry_ctx_t ctx);

In ./src/mpi.h the type gpg_error_t is not used is my observation (although I
was thinking,
see below, that this was the 'public' interfacing. Since gpg_error_t is not used,
it must be for internal usage.)

In src/gcrypt-int.h there seems to be knowledge of both gpg_error_t and, at least
gpg_error_code

+51  ^L
+52  /* Underscore prefixed internal versions of the public functions.
+53     They return gpg_err_code and not gpg_error_t.  Some macros also
+54     need an underscore prefixed internal version.
+55
+56     Note that the memory allocation functions and macros (xmalloc etc.)
+57     are not defined here but in g10lib.h because this file here is
+58     included by some test programs which define theie own xmalloc
+59     macros.  */
+60
+61  gpg_err_code_t _gcry_cipher_open (gcry_cipher_hd_t *handle,
+62                                    int algo, int mode, unsigned int flags);
+63  void _gcry_cipher_close (gcry_cipher_hd_t h);
+64  gpg_err_code_t _gcry_cipher_ctl (gcry_cipher_hd_t h, int cmd, void *buffer,
+65                               size_t buflen);
+66  gpg_err_code_t _gcry_cipher_info (gcry_cipher_hd_t h, int what, void

*buffer,

   +67                                    size_t *nbytes);
   +68  gpg_err_code_t _gcry_cipher_algo_info (int algo, int what, void *buffer,
   +69                                         size_t *nbytes);

So, it would appear, considering the comment above, that the declaration on line
423 is a
missed prototype (redefine) it is a "Underscore prefixed (but is it internal??)
version"
of a function.

Note also the comment:
visibility.h: version use gpg_err_code_t and the public version gpg_error_t. */

root@x064:[/data/prj/gnu/gnupg/libgcrypt-1.6.3/src]grep gpg_err_code_t *.h |
grep typedef
cipher-proto.h:typedef gpg_err_code_t (*selftest_func_t)
cipher-proto.h:typedef gpg_err_code_t (*pk_comp_keygrip_t) (gcry_md_hd_t md,
cipher-proto.h:typedef gpg_err_code_t (*cipher_set_extra_info_t)
gcrypt.h:typedef gpg_err_code_t gcry_err_code_t;

Digging furhter, the definitions of these data types are in

And I see:

+120  /* Only use free slots, never change or reorder the existing
+121     entries.  */
+122  typedef enum
+123    {
+124      GPG_ERR_NO_ERROR = 0,
+125      GPG_ERR_GENERAL = 1,
+126      GPG_ERR_UNKNOWN_PACKET = 2,
+127      GPG_ERR_UNKNOWN_VERSION = 3,
+128      GPG_ERR_PUBKEY_ALGO = 4,

....

  +635      GPG_ERR_EUSERS = GPG_ERR_SYSTEM_ERROR | 137,
  +636      GPG_ERR_EWOULDBLOCK = GPG_ERR_SYSTEM_ERROR | 138,
  +637      GPG_ERR_EXDEV = GPG_ERR_SYSTEM_ERROR | 139,
  +638      GPG_ERR_EXFULL = GPG_ERR_SYSTEM_ERROR | 140,
  +639
  +640      /* This is one more than the largest allowed entry.  */
  +641      GPG_ERR_CODE_DIM = 65536
  +642    } gpg_err_code_t;
  +643
  +644  ^L
  +645  /* The error value type gpg_error_t.  */
  +646
  +647  /* We would really like to use bit-fields in a struct, but using
  +648     structs as return values can cause binary compatibility issues, in
  +649     particular if you want to do it effeciently (also see
  +650     -freg-struct-return option to GCC).  */
  +651  typedef unsigned int gpg_error_t;

So, perhaps, the define in ./src/gcrypt-int.h os for performance, or some other
reason,
But is causing a build issue when a compiler is checking (maybe GCC skips these,
but there is a reason we depend on syntax checking to help prevent
bugs/incompatibilities

Having done the digging, I know understand the meaning of:
"../src/mpi.h", line 295.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".

So, the complete list of compile warnings is:

root@x064:[/data/prj/gnu/gnupg/libgcrypt-1.6.3]make -i >/dev/null # redirect
stdout away to only see the error messages
"../src/mpi.h", line 295.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_set_mpi
differs from previous declaration on line 423 of "../src/gcrypt-int.h".
"../src/mpi.h", line 295.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 297.16: 1506-343 (S) Redeclaration of
_gcry_mpi_ec_set_point differs from previous declaration on line 425 of
"../src/gcrypt-int.h".
"../src/mpi.h", line 297.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 302.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_new
differs from previous declaration on line 418 of "../src/gcrypt-int.h".
"../src/mpi.h", line 302.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
make: 1254-004 The error code from the last command is 1.
make: 1254-005 Ignored error code 1 from last command.
"../src/mpi.h", line 295.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_set_mpi
differs from previous declaration on line 423 of "../src/gcrypt-int.h".
"../src/mpi.h", line 295.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 297.16: 1506-343 (S) Redeclaration of
_gcry_mpi_ec_set_point differs from previous declaration on line 425 of
"../src/gcrypt-int.h".
"../src/mpi.h", line 297.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 302.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_new
differs from previous declaration on line 418 of "../src/gcrypt-int.h".
"../src/mpi.h", line 302.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
make: 1254-004 The error code from the last command is 1.
make: 1254-005 Ignored error code 1 from last command.
"../src/mpi.h", line 295.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_set_mpi
differs from previous declaration on line 423 of "../src/gcrypt-int.h".
"../src/mpi.h", line 295.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 297.16: 1506-343 (S) Redeclaration of
_gcry_mpi_ec_set_point differs from previous declaration on line 425 of
"../src/gcrypt-int.h".
"../src/mpi.h", line 297.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 302.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_new
differs from previous declaration on line 418 of "../src/gcrypt-int.h".
"../src/mpi.h", line 302.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
make: 1254-004 The error code from the last command is 1.
make: 1254-005 Ignored error code 1 from last command.
"../src/mpi.h", line 295.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_set_mpi
differs from previous declaration on line 423 of "../src/gcrypt-int.h".
"../src/mpi.h", line 295.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 297.16: 1506-343 (S) Redeclaration of
_gcry_mpi_ec_set_point differs from previous declaration on line 425 of
"../src/gcrypt-int.h".
"../src/mpi.h", line 297.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 302.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_new
differs from previous declaration on line 418 of "../src/gcrypt-int.h".
"../src/mpi.h", line 302.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
make: 1254-004 The error code from the last command is 1.
make: 1254-005 Ignored error code 1 from last command.
"../src/mpi.h", line 295.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_set_mpi
differs from previous declaration on line 423 of "../src/gcrypt-int.h".
"../src/mpi.h", line 295.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 297.16: 1506-343 (S) Redeclaration of
_gcry_mpi_ec_set_point differs from previous declaration on line 425 of
"../src/gcrypt-int.h".
"../src/mpi.h", line 297.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 302.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_new
differs from previous declaration on line 418 of "../src/gcrypt-int.h".
"../src/mpi.h", line 302.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
make: 1254-004 The error code from the last command is 1.
make: 1254-005 Ignored error code 1 from last command.
"../src/mpi.h", line 295.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_set_mpi
differs from previous declaration on line 423 of "../src/gcrypt-int.h".
"../src/mpi.h", line 295.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 297.16: 1506-343 (S) Redeclaration of
_gcry_mpi_ec_set_point differs from previous declaration on line 425 of
"../src/gcrypt-int.h".
"../src/mpi.h", line 297.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 302.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_new
differs from previous declaration on line 418 of "../src/gcrypt-int.h".
"../src/mpi.h", line 302.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
make: 1254-004 The error code from the last command is 1.
make: 1254-005 Ignored error code 1 from last command.
"../src/mpi.h", line 295.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_set_mpi
differs from previous declaration on line 423 of "../src/gcrypt-int.h".
"../src/mpi.h", line 295.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 297.16: 1506-343 (S) Redeclaration of
_gcry_mpi_ec_set_point differs from previous declaration on line 425 of
"../src/gcrypt-int.h".
"../src/mpi.h", line 297.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 302.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_new
differs from previous declaration on line 418 of "../src/gcrypt-int.h".
"../src/mpi.h", line 302.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
make: 1254-004 The error code from the last command is 1.
make: 1254-005 Ignored error code 1 from last command.
"../src/mpi.h", line 295.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_set_mpi
differs from previous declaration on line 423 of "../src/gcrypt-int.h".
"../src/mpi.h", line 295.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 297.16: 1506-343 (S) Redeclaration of
_gcry_mpi_ec_set_point differs from previous declaration on line 425 of
"../src/gcrypt-int.h".
"../src/mpi.h", line 297.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 302.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_new
differs from previous declaration on line 418 of "../src/gcrypt-int.h".
"../src/mpi.h", line 302.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
make: 1254-004 The error code from the last command is 1.
make: 1254-005 Ignored error code 1 from last command.
"../src/mpi.h", line 295.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_set_mpi
differs from previous declaration on line 423 of "../src/gcrypt-int.h".
"../src/mpi.h", line 295.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 297.16: 1506-343 (S) Redeclaration of
_gcry_mpi_ec_set_point differs from previous declaration on line 425 of
"../src/gcrypt-int.h".
"../src/mpi.h", line 297.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 302.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_new
differs from previous declaration on line 418 of "../src/gcrypt-int.h".
"../src/mpi.h", line 302.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
make: 1254-004 The error code from the last command is 1.
make: 1254-005 Ignored error code 1 from last command.
"../src/mpi.h", line 295.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_set_mpi
differs from previous declaration on line 423 of "../src/gcrypt-int.h".
"../src/mpi.h", line 295.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 297.16: 1506-343 (S) Redeclaration of
_gcry_mpi_ec_set_point differs from previous declaration on line 425 of
"../src/gcrypt-int.h".
"../src/mpi.h", line 297.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 302.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_new
differs from previous declaration on line 418 of "../src/gcrypt-int.h".
"../src/mpi.h", line 302.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
make: 1254-004 The error code from the last command is 1.
make: 1254-005 Ignored error code 1 from last command.
"../src/mpi.h", line 295.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_set_mpi
differs from previous declaration on line 423 of "../src/gcrypt-int.h".
"../src/mpi.h", line 295.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 297.16: 1506-343 (S) Redeclaration of
_gcry_mpi_ec_set_point differs from previous declaration on line 425 of
"../src/gcrypt-int.h".
"../src/mpi.h", line 297.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 302.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_new
differs from previous declaration on line 418 of "../src/gcrypt-int.h".
"../src/mpi.h", line 302.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
make: 1254-004 The error code from the last command is 1.
make: 1254-005 Ignored error code 1 from last command.
"../src/mpi.h", line 295.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_set_mpi
differs from previous declaration on line 423 of "../src/gcrypt-int.h".
"../src/mpi.h", line 295.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 297.16: 1506-343 (S) Redeclaration of
_gcry_mpi_ec_set_point differs from previous declaration on line 425 of
"../src/gcrypt-int.h".
"../src/mpi.h", line 297.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 302.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_new
differs from previous declaration on line 418 of "../src/gcrypt-int.h".
"../src/mpi.h", line 302.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
make: 1254-004 The error code from the last command is 1.
make: 1254-005 Ignored error code 1 from last command.
"../src/mpi.h", line 295.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_set_mpi
differs from previous declaration on line 423 of "../src/gcrypt-int.h".
"../src/mpi.h", line 295.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 297.16: 1506-343 (S) Redeclaration of
_gcry_mpi_ec_set_point differs from previous declaration on line 425 of
"../src/gcrypt-int.h".
"../src/mpi.h", line 297.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 302.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_new
differs from previous declaration on line 418 of "../src/gcrypt-int.h".
"../src/mpi.h", line 302.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
make: 1254-004 The error code from the last command is 1.
make: 1254-005 Ignored error code 1 from last command.
"../src/mpi.h", line 295.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_set_mpi
differs from previous declaration on line 423 of "../src/gcrypt-int.h".
"../src/mpi.h", line 295.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 297.16: 1506-343 (S) Redeclaration of
_gcry_mpi_ec_set_point differs from previous declaration on line 425 of
"../src/gcrypt-int.h".
"../src/mpi.h", line 297.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 302.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_new
differs from previous declaration on line 418 of "../src/gcrypt-int.h".
"../src/mpi.h", line 302.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
make: 1254-004 The error code from the last command is 1.
make: 1254-005 Ignored error code 1 from last command.
"../src/mpi.h", line 295.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_set_mpi
differs from previous declaration on line 423 of "../src/gcrypt-int.h".
"../src/mpi.h", line 295.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 297.16: 1506-343 (S) Redeclaration of
_gcry_mpi_ec_set_point differs from previous declaration on line 425 of
"../src/gcrypt-int.h".
"../src/mpi.h", line 297.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 302.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_new
differs from previous declaration on line 418 of "../src/gcrypt-int.h".
"../src/mpi.h", line 302.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
make: 1254-004 The error code from the last command is 1.
make: 1254-005 Ignored error code 1 from last command.
"../src/mpi.h", line 295.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_set_mpi
differs from previous declaration on line 423 of "../src/gcrypt-int.h".
"../src/mpi.h", line 295.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 297.16: 1506-343 (S) Redeclaration of
_gcry_mpi_ec_set_point differs from previous declaration on line 425 of
"../src/gcrypt-int.h".
"../src/mpi.h", line 297.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 302.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_new
differs from previous declaration on line 418 of "../src/gcrypt-int.h".
"../src/mpi.h", line 302.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
make: 1254-004 The error code from the last command is 1.
make: 1254-005 Ignored error code 1 from last command.
"../src/mpi.h", line 295.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_set_mpi
differs from previous declaration on line 423 of "../src/gcrypt-int.h".
"../src/mpi.h", line 295.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 297.16: 1506-343 (S) Redeclaration of
_gcry_mpi_ec_set_point differs from previous declaration on line 425 of
"../src/gcrypt-int.h".
"../src/mpi.h", line 297.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 302.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_new
differs from previous declaration on line 418 of "../src/gcrypt-int.h".
"../src/mpi.h", line 302.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
make: 1254-004 The error code from the last command is 1.
make: 1254-005 Ignored error code 1 from last command.
"../src/mpi.h", line 295.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_set_mpi
differs from previous declaration on line 423 of "../src/gcrypt-int.h".
"../src/mpi.h", line 295.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 297.16: 1506-343 (S) Redeclaration of
_gcry_mpi_ec_set_point differs from previous declaration on line 425 of
"../src/gcrypt-int.h".
"../src/mpi.h", line 297.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 302.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_new
differs from previous declaration on line 418 of "../src/gcrypt-int.h".
"../src/mpi.h", line 302.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
make: 1254-004 The error code from the last command is 1.
make: 1254-005 Ignored error code 1 from last command.
libtool: link: `mpi-add.lo' is not a valid libtool object
make: 1254-004 The error code from the last command is 1.
make: 1254-005 Ignored error code 1 from last command.
"../src/mpi.h", line 295.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_set_mpi
differs from previous declaration on line 423 of "../src/gcrypt-int.h".
"../src/mpi.h", line 295.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 297.16: 1506-343 (S) Redeclaration of
_gcry_mpi_ec_set_point differs from previous declaration on line 425 of
"../src/gcrypt-int.h".
"../src/mpi.h", line 297.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 302.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_new
differs from previous declaration on line 418 of "../src/gcrypt-int.h".
"../src/mpi.h", line 302.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
make: 1254-004 The error code from the last command is 1.
make: 1254-005 Ignored error code 1 from last command.
"../src/mpi.h", line 295.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_set_mpi
differs from previous declaration on line 423 of "../src/gcrypt-int.h".
"../src/mpi.h", line 295.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 297.16: 1506-343 (S) Redeclaration of
_gcry_mpi_ec_set_point differs from previous declaration on line 425 of
"../src/gcrypt-int.h".
"../src/mpi.h", line 297.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 302.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_new
differs from previous declaration on line 418 of "../src/gcrypt-int.h".
"../src/mpi.h", line 302.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
make: 1254-004 The error code from the last command is 1.
make: 1254-005 Ignored error code 1 from last command.
"../src/mpi.h", line 295.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_set_mpi
differs from previous declaration on line 423 of "../src/gcrypt-int.h".
"../src/mpi.h", line 295.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 297.16: 1506-343 (S) Redeclaration of
_gcry_mpi_ec_set_point differs from previous declaration on line 425 of
"../src/gcrypt-int.h".
"../src/mpi.h", line 297.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 302.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_new
differs from previous declaration on line 418 of "../src/gcrypt-int.h".
"../src/mpi.h", line 302.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
make: 1254-004 The error code from the last command is 1.
make: 1254-005 Ignored error code 1 from last command.
"../src/mpi.h", line 295.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_set_mpi
differs from previous declaration on line 423 of "../src/gcrypt-int.h".
"../src/mpi.h", line 295.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 297.16: 1506-343 (S) Redeclaration of
_gcry_mpi_ec_set_point differs from previous declaration on line 425 of
"../src/gcrypt-int.h".
"../src/mpi.h", line 297.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 302.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_new
differs from previous declaration on line 418 of "../src/gcrypt-int.h".
"../src/mpi.h", line 302.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
make: 1254-004 The error code from the last command is 1.
make: 1254-005 Ignored error code 1 from last command.
"../src/mpi.h", line 295.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_set_mpi
differs from previous declaration on line 423 of "../src/gcrypt-int.h".
"../src/mpi.h", line 295.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 297.16: 1506-343 (S) Redeclaration of
_gcry_mpi_ec_set_point differs from previous declaration on line 425 of
"../src/gcrypt-int.h".
"../src/mpi.h", line 297.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 302.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_new
differs from previous declaration on line 418 of "../src/gcrypt-int.h".
"../src/mpi.h", line 302.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
make: 1254-004 The error code from the last command is 1.
make: 1254-005 Ignored error code 1 from last command.
"../src/mpi.h", line 295.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_set_mpi
differs from previous declaration on line 423 of "../src/gcrypt-int.h".
"../src/mpi.h", line 295.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 297.16: 1506-343 (S) Redeclaration of
_gcry_mpi_ec_set_point differs from previous declaration on line 425 of
"../src/gcrypt-int.h".
"../src/mpi.h", line 297.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 302.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_new
differs from previous declaration on line 418 of "../src/gcrypt-int.h".
"../src/mpi.h", line 302.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
make: 1254-004 The error code from the last command is 1.
make: 1254-005 Ignored error code 1 from last command.
"../src/mpi.h", line 295.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_set_mpi
differs from previous declaration on line 423 of "../src/gcrypt-int.h".
"../src/mpi.h", line 295.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 297.16: 1506-343 (S) Redeclaration of
_gcry_mpi_ec_set_point differs from previous declaration on line 425 of
"../src/gcrypt-int.h".
"../src/mpi.h", line 297.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 302.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_new
differs from previous declaration on line 418 of "../src/gcrypt-int.h".
"../src/mpi.h", line 302.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
make: 1254-004 The error code from the last command is 1.
make: 1254-005 Ignored error code 1 from last command.
"../src/mpi.h", line 295.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_set_mpi
differs from previous declaration on line 423 of "../src/gcrypt-int.h".
"../src/mpi.h", line 295.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 297.16: 1506-343 (S) Redeclaration of
_gcry_mpi_ec_set_point differs from previous declaration on line 425 of
"../src/gcrypt-int.h".
"../src/mpi.h", line 297.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 302.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_new
differs from previous declaration on line 418 of "../src/gcrypt-int.h".
"../src/mpi.h", line 302.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
make: 1254-004 The error code from the last command is 1.
make: 1254-005 Ignored error code 1 from last command.
"../src/mpi.h", line 295.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_set_mpi
differs from previous declaration on line 423 of "../src/gcrypt-int.h".
"../src/mpi.h", line 295.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 297.16: 1506-343 (S) Redeclaration of
_gcry_mpi_ec_set_point differs from previous declaration on line 425 of
"../src/gcrypt-int.h".
"../src/mpi.h", line 297.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 302.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_new
differs from previous declaration on line 418 of "../src/gcrypt-int.h".
"../src/mpi.h", line 302.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
make: 1254-004 The error code from the last command is 1.
make: 1254-005 Ignored error code 1 from last command.
"../src/mpi.h", line 295.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_set_mpi
differs from previous declaration on line 423 of "../src/gcrypt-int.h".
"../src/mpi.h", line 295.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 297.16: 1506-343 (S) Redeclaration of
_gcry_mpi_ec_set_point differs from previous declaration on line 425 of
"../src/gcrypt-int.h".
"../src/mpi.h", line 297.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 302.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_new
differs from previous declaration on line 418 of "../src/gcrypt-int.h".
"../src/mpi.h", line 302.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
make: 1254-004 The error code from the last command is 1.
make: 1254-005 Ignored error code 1 from last command.
"../src/mpi.h", line 295.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_set_mpi
differs from previous declaration on line 423 of "../src/gcrypt-int.h".
"../src/mpi.h", line 295.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 297.16: 1506-343 (S) Redeclaration of
_gcry_mpi_ec_set_point differs from previous declaration on line 425 of
"../src/gcrypt-int.h".
"../src/mpi.h", line 297.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 302.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_new
differs from previous declaration on line 418 of "../src/gcrypt-int.h".
"../src/mpi.h", line 302.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
make: 1254-004 The error code from the last command is 1.
make: 1254-005 Ignored error code 1 from last command.
"../src/mpi.h", line 295.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_set_mpi
differs from previous declaration on line 423 of "../src/gcrypt-int.h".
"../src/mpi.h", line 295.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 297.16: 1506-343 (S) Redeclaration of
_gcry_mpi_ec_set_point differs from previous declaration on line 425 of
"../src/gcrypt-int.h".
"../src/mpi.h", line 297.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 302.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_new
differs from previous declaration on line 418 of "../src/gcrypt-int.h".
"../src/mpi.h", line 302.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
make: 1254-004 The error code from the last command is 1.
make: 1254-005 Ignored error code 1 from last command.
"../src/mpi.h", line 295.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_set_mpi
differs from previous declaration on line 423 of "../src/gcrypt-int.h".
"../src/mpi.h", line 295.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 297.16: 1506-343 (S) Redeclaration of
_gcry_mpi_ec_set_point differs from previous declaration on line 425 of
"../src/gcrypt-int.h".
"../src/mpi.h", line 297.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 302.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_new
differs from previous declaration on line 418 of "../src/gcrypt-int.h".
"../src/mpi.h", line 302.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
make: 1254-004 The error code from the last command is 1.
make: 1254-005 Ignored error code 1 from last command.
"../src/mpi.h", line 295.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_set_mpi
differs from previous declaration on line 423 of "../src/gcrypt-int.h".
"../src/mpi.h", line 295.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 297.16: 1506-343 (S) Redeclaration of
_gcry_mpi_ec_set_point differs from previous declaration on line 425 of
"../src/gcrypt-int.h".
"../src/mpi.h", line 297.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
"../src/mpi.h", line 302.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_new
differs from previous declaration on line 418 of "../src/gcrypt-int.h".
"../src/mpi.h", line 302.16: 1506-050 (I) Return type "enum {...}" in
redeclaration is not compatible with the previous return type "unsigned int".
make: 1254-004 The error code from the last command is 1.
make: 1254-005 Ignored error code 1 from last command.
libtool: link: `pubkey.lo' is not a valid libtool object
make: 1254-004 The error code from the last command is 1.
make: 1254-005 Ignored error code 1 from last command.
"mpi.h", line 295.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_set_mpi differs
from previous declaration on line 423 of "gcrypt-int.h".
"mpi.h", line 295.16: 1506-050 (I) Return type "enum {...}" in redeclaration is
not compatible with the previous return type "unsigned int".
"mpi.h", line 297.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_set_point
differs from previous declaration on line 425 of "gcrypt-int.h".
"mpi.h", line 297.16: 1506-050 (I) Return type "enum {...}" in redeclaration is
not compatible with the previous return type "unsigned int".
"mpi.h", line 302.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_new differs
from previous declaration on line 418 of "gcrypt-int.h".
"mpi.h", line 302.16: 1506-050 (I) Return type "enum {...}" in redeclaration is
not compatible with the previous return type "unsigned int".
"visibility.c", line 295.27: 1506-1332 (W) A function with return type "void"
may not return a value of type "void".
make: 1254-004 The error code from the last command is 1.
make: 1254-005 Ignored error code 1 from last command.
"mpi.h", line 295.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_set_mpi differs
from previous declaration on line 423 of "gcrypt-int.h".
"mpi.h", line 295.16: 1506-050 (I) Return type "enum {...}" in redeclaration is
not compatible with the previous return type "unsigned int".
"mpi.h", line 297.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_set_point
differs from previous declaration on line 425 of "gcrypt-int.h".
"mpi.h", line 297.16: 1506-050 (I) Return type "enum {...}" in redeclaration is
not compatible with the previous return type "unsigned int".
"mpi.h", line 302.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_new differs
from previous declaration on line 418 of "gcrypt-int.h".
"mpi.h", line 302.16: 1506-050 (I) Return type "enum {...}" in redeclaration is
not compatible with the previous return type "unsigned int".
make: 1254-004 The error code from the last command is 1.
make: 1254-005 Ignored error code 1 from last command.
"global.c", line 343.1: 1506-343 (S) Redeclaration of _gcry_vcontrol differs
from previous declaration on line 95 of "g10lib.h".
"global.c", line 343.1: 1506-050 (I) Return type "enum {...}" in redeclaration
is not compatible with the previous return type "unsigned int".
make: 1254-004 The error code from the last command is 1.
make: 1254-005 Ignored error code 1 from last command.
"sexp.c", line 2427.1: 1506-343 (S) Redeclaration of _gcry_sexp_extract_param
differs from previous declaration on line 331 of "gcrypt-int.h".
"sexp.c", line 2427.1: 1506-050 (I) Return type "unsigned int" in redeclaration
is not compatible with the previous return type "enum {...}".
make: 1254-004 The error code from the last command is 1.
make: 1254-005 Ignored error code 1 from last command.
"mpi.h", line 295.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_set_mpi differs
from previous declaration on line 423 of "gcrypt-int.h".
"mpi.h", line 295.16: 1506-050 (I) Return type "enum {...}" in redeclaration is
not compatible with the previous return type "unsigned int".
"mpi.h", line 297.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_set_point
differs from previous declaration on line 425 of "gcrypt-int.h".
"mpi.h", line 297.16: 1506-050 (I) Return type "enum {...}" in redeclaration is
not compatible with the previous return type "unsigned int".
"mpi.h", line 302.16: 1506-343 (S) Redeclaration of _gcry_mpi_ec_new differs
from previous declaration on line 418 of "gcrypt-int.h".
"mpi.h", line 302.16: 1506-050 (I) Return type "enum {...}" in redeclaration is
not compatible with the previous return type "unsigned int".
make: 1254-004 The error code from the last command is 1.
make: 1254-005 Ignored error code 1 from last command.
make: 1254-004 The error code from the last command is 1.
make: 1254-005 Ignored error code 1 from last command.
root@x064:[/data/prj/gnu/gnupg/libgcrypt-1.6.3]

And what I am thinking now is that the two include files
gcrypt-int.h (for internal definitions) and mpi.h are mutually exclusive,
and there are others such as:

"global.c", line 343.1: 1506-343 (S) Redeclaration of _gcry_vcontrol differs
from previous declaration on line 95 of "g10lib.h".
"global.c", line 343.1: 1506-050 (I) Return type "enum {...}" in redeclaration
is not compatible with the previous return type "unsigned int".

"sexp.c", line 2427.1: 1506-343 (S) Redeclaration of _gcry_sexp_extract_param
differs from previous declaration on line 331 of "gcrypt-int.h".
"sexp.c", line 2427.1: 1506-050 (I) Return type "unsigned int" in redeclaration
is not compatible with the previous return type "enum {...}".

Now, I read, as one example to fix this - was to turn off warning messages about
redefinitions.
See http://comments.gmane.org/gmane.comp.encryption.gpg.libgcrypt.devel/4066
(My first posting was here:
http://lists.gnupg.org/pipermail/gnupg-users/2014-November/051667.html)
I am saddened by such an approach - and I hope that "gnupg" will actually take a
"cleansing" of the code - because if the approach to QA is to rely on the
behavior of a compiler
of using flags to make compilers less stringent - then we are opening the door
to long-lived errors
elsewhere.

Thank you for your consideration of this concern re: coding.

Related Objects

Event Timeline

It is a common practise to use enums instead of macros to help debugging code.
In fact the GNU coding standard suggest this use.

It is also common practise for *C* code to use int and enums interchangable.
Right, we use an unsigned int but that is justified because we do not have
negative values.

The only problem I am ware of is the OS/2 (and maybe also the AIX) compiler
which makes the internal size of an enum type depend on the largest use value
(e.g. a 16 bit short instead of a 32 bit int). However, this is rarely a
problem and gpg_err_code_t anyway requires more than 16 bits.

If you can tell me an option for xlc to disable the warnings/error I can add
this to configure script. A pragma would also do.

I will look into it when I am back from vacation.

On Mon, Sep 7, 2015 at 9:24 PM, Werner Koch via BTS <gnupg@bugs.g10code.com>
wrote:

Werner Koch <wk@gnupg.org> added the comment:

It is a common practise to use enums instead of macros to help debugging
code.
In fact the GNU coding standard suggest this use.

It is also common practise for *C* code to use int and enums
interchangable.
Right, we use an unsigned int but that is justified because we do not have
negative values.

The only problem I am ware of is the OS/2 (and maybe also the AIX) compiler
which makes the internal size of an enum type depend on the largest use
value
(e.g. a 16 bit short instead of a 32 bit int). However, this is rarely a
problem and gpg_err_code_t anyway requires more than 16 bits.

If you can tell me an option for xlc to disable the warnings/error I can
add
this to configure script. A pragma would also do.


status: unread -> chatting


GnuPG's BTS <gnupg@bugs.g10code.com>
<T2074>


On 2015-09-07 3:24 PM, Werner Koch via BTS wrote:

Werner Koch<wk@gnupg.org> added the comment:

It is a common practise to use enums instead of macros to help debugging code.
In fact the GNU coding standard suggest this use.

It is also common practise for *C* code to use int and enums interchangable.
Right, we use an unsigned int but that is justified because we do not have
negative values.

The only problem I am ware of is the OS/2 (and maybe also the AIX) compiler
which makes the internal size of an enum type depend on the largest use value
(e.g. a 16 bit short instead of a 32 bit int). However, this is rarely a
problem and gpg_err_code_t anyway requires more than 16 bits.

If you can tell me an option for xlc to disable the warnings/error I can add
this to configure script. A pragma would also do.

As I search for possible compiler settings I find the following:

-qbitfields=unsigned #default is signed

“-qhalt” on page 162 -- or -- #pragma options halt
Stops compilation before producing any object, executable, or assembler
source files if the maximum severity of compile-time messages equals or
exceeds the severity you specify.
Defaults
-qhalt=s
Parameters
i Specifies that compilation is to stop for all types of errors:
warning, error and informational. Informational diagnostics (I) are of
the lowest severity.
w Specifies that compilation is to stop for warnings (W) and all types
of errors.
e Specifies that compilation is to stop for errors (E), severe errors
(S), and unrecoverable errors (U).
s Specifies that compilation is to stop for severe errors (S) and
unrecoverable errors (U).

“-qinfo” on page 174 -- or -- #pragma options info, #pragma info
Produces or suppresses groups of informational messages.

As the -qinfo is several pages, I have extracted that from the XLC
reference manual and attached those pages.

As the error messages include (S) errors - severe, it seems that -qinfo

  • to suppress these, and/or changing the bitfield type to unsigned will

be the only way forward.

As this goes beyond my ability to edit configure.ac - if you supply a
separate tarball, or a patch to be applied to a tarball you specify, I
will test asap (may be a day or two after you send it).

Sincerely,
Michael


status: unread -> chatting


GnuPG's BTS<gnupg@bugs.g10code.com>
<T2074>


See attached for fix with sun studio's compiler.

Thank you for the patch. I apply to master.
I'm going to apply to 1.6.

For 1.6, please see:

    commit d501cc4edd55d3953d7581b3f8ff0c348df31ef0
    commit 24f6c65e36edec13aa781862ff1ff45ca3e99b99

Please test.

gniibe removed a project: Restricted Project.

I believe 1.6.5 has no problem.

on vacation, will test when I am home.

On Wed, Feb 10, 2016 at 12:23 AM, NIIBE Yutaka via BTS <
gnupg@bugs.g10code.com> wrote:

NIIBE Yutaka <gniibe@fsij.org> added the comment:

I believe 1.6.5 has no problem.


status: testing -> resolved


GnuPG's BTS <gnupg@bugs.g10code.com>
<T2074>


aixtools: Had you a chance to test it?

ping - will check tonight.

On Mon, Mar 21, 2016 at 10:13 AM, Werner Koch via BTS <
gnupg@bugs.g10code.com> wrote:

Werner Koch <wk@gnupg.org> added the comment:

aixtools: Had you a chance to test it?


status: chatting -> testing


GnuPG's BTS <gnupg@bugs.g10code.com>
<T2074>


Not easy yet, need more time to dig.

configure: WARNING:


  • The config script /opt/bin/gpg-error-config was
  • built for powerpc-ibm-aix5.3.0.0 and thus may not match the
  • used host powerpc-ibm-aix5.3.7.0.
  • You may want to use the configure option --with-gpg-error-prefix
  • to specify a matching config script. ***

+ make > .buildaix/make.out
Assembler:
/tmp/xlcS0863iEd.s: line 16: Instruction mulhwu is not implemented in
the current assembly mode COM.
/tmp/xlcS0863iEd.s: line 25: Instruction mulhwu is not implemented in
the current assembly mode COM.
Assembler:
/tmp/xlcS08L3kqd.s: line 16: Instruction mulhwu is not implemented in
the current assembly mode COM.
/tmp/xlcS08L3kqd.s: line 26: Instruction mulhwu is not implemented in
the current assembly mode COM.
Assembler:
/tmp/xlcS08WUjMd.s: line 16: Instruction mulhwu is not implemented in
the current assembly mode COM.
/tmp/xlcS08WUjMd.s: line 27: Instruction mulhwu is not implemented in
the current assembly mode COM.

1500-030: (I) INFORMATION: do_twofish_setkey: Additional

optimization may be attained by recompiling and specifying MAXMEM option
with a value greater than 8192.

1500-030: (I) INFORMATION: serpent_decrypt_internal: Additional

optimization may be attained by recompiling and specifying MAXMEM option
with a value greater than 8192.
xlc: 1501-210 (W) command option -O contains an incorrect subargument
"../../src/libgcrypt-1.6.5/src/visibility.c", line 61.1: 1506-343 (S)
Redeclaration of gcry_error_from_errno differs from previous declaration
on line 192 of "../../src/libgcrypt-1.6.5/src/gcrypt.h".
"../../src/libgcrypt-1.6.5/src/visibility.c", line 61.1: 1506-050 (I)
Return type "unsigned int" in redeclaration is not compatible with the
previous return type "enum {...}".
make: 1254-004 The error code from the last command is 1.

In any case, must add a flag to change the arch, e.g., -qarch=pwr4 as
the default of -qarch=com is leading to some assembly errors/warnings.

On 23-Mar-16 17:11, Michael Felt via BTS wrote:

Michael Felt <aixtools@gmail.com> added the comment:

ping - will check tonight.

On Mon, Mar 21, 2016 at 10:13 AM, Werner Koch via BTS <
gnupg@bugs.g10code.com> wrote:

Werner Koch <wk@gnupg.org> added the comment:

aixtools: Had you a chance to test it?


status: chatting -> testing


GnuPG's BTS <gnupg@bugs.g10code.com>
<T2074>



GnuPG's BTS <gnupg@bugs.g10code.com>
<T2074>


werner renamed this task from Redeclaration of internal functions to use "external" typedef prevents build to Redeclaration of internal functions to use "external" typedef prevents build on AIX.May 6 2016, 8:33 PM

You may want to test 1.7.2 instead.

I confirmed on AIX 7.1 with GCC 4.8.1, libgcrypt 1.7.2 builds well. "make
check" goes success with no errors.
I'm closing this again, because the particular problem of typedef has been fixed.
If you have another issue, please open another report.

gniibe removed a project: Restricted Project.