[Bug libelf/23884] New: error: ‘__elf32_msize’ specifies less restrictive attribute than its target ‘elf32_fsize’: ‘const’ [-Werror=missing-attributes]
mliska at suse dot cz
sourceware-bugzilla@sourceware.org
Thu Nov 15 08:48:00 GMT 2018
https://sourceware.org/bugzilla/show_bug.cgi?id=23884
Bug ID: 23884
Summary: error: ‘__elf32_msize’ specifies less restrictive
attribute than its target ‘elf32_fsize’: ‘const’
[-Werror=missing-attributes]
Product: elfutils
Version: unspecified
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libelf
Assignee: unassigned at sourceware dot org
Reporter: mliska at suse dot cz
CC: elfutils-devel at sourceware dot org
Target Milestone: ---
It's a new warning that comes with recent GCC 9:
$ make V=1
make --no-print-directory all-recursive
Making all in config
make[2]: Nothing to be done for 'all'.
Making all in m4
make[2]: Nothing to be done for 'all'.
Making all in lib
make[2]: Nothing to be done for 'all'.
Making all in libelf
gcc -D_GNU_SOURCE -DHAVE_CONFIG_H -DLOCALEDIR='"/usr/local/share/locale"' -I.
-I.. -I. -I. -I../lib -I.. -std=gnu99 -Wall -Wshadow -Wformat=2
-Wold-style-definition -Wstrict-prototypes -Wlogical-op -Wduplicated-cond
-Wnull-dereference -Wimplicit-fallthrough=5 -Werror -Wunused -Wextra
-Wstack-usage=262144 -D_FORTIFY_SOURCE=2 -g -O2 -MT elf32_fsize.o -MD -MP
-MF .deps/elf32_fsize.Tpo -c -o elf32_fsize.o elf32_fsize.c
In file included from ../config.h:134,
from elf32_fsize.c:31:
libelfP.h:47:30: error: ‘__elf32_msize’ specifies less restrictive attribute
than its target ‘elf32_fsize’: ‘const’ [-Werror=missing-attributes]
47 | #define __elfw2_(Bits, Name) __elf##Bits##_##Name
| ^~~~~
../lib/eu-config.h:60:26: note: in definition of macro ‘strong_alias’
60 | extern __typeof (name) aliasname __attribute__ ((alias (#name)));
| ^~~~~~~~~
elf32_fsize.c:68:1: note: in expansion of macro ‘local_strong_alias’
68 | local_strong_alias (elfw2(LIBELFBITS, fsize), __elfw2(LIBELFBITS,
msize))
| ^~~~~~~~~~~~~~~~~~
libelfP.h:52:29: note: in expansion of macro ‘__elfw2_’
52 | #define __elfw2(Bits, Name) __elfw2_(Bits, Name)
| ^~~~~~~~
elf32_fsize.c:68:47: note: in expansion of macro ‘__elfw2’
68 | local_strong_alias (elfw2(LIBELFBITS, fsize), __elfw2(LIBELFBITS,
msize))
| ^~~~~~~
In file included from elf32_fsize.c:35:
libelfP.h:48:28: note: ‘__elf32_msize’ target declared here
48 | #define elfw2_(Bits, Name) elf##Bits##_##Name
| ^~~
libelfP.h:53:27: note: in expansion of macro ‘elfw2_’
53 | #define elfw2(Bits, Name) elfw2_(Bits, Name)
| ^~~~~~
elf32_fsize.c:43:1: note: in expansion of macro ‘elfw2’
43 | elfw2(LIBELFBITS, fsize) (Elf_Type type, size_t count, unsigned int
version)
| ^~~~~
cc1: all warnings being treated as errors
make[2]: *** [Makefile:786: elf32_fsize.o] Error 1
make[1]: *** [Makefile:485: all-recursive] Error 1
make: *** [Makefile:401: all] Error 2
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Elfutils-devel
mailing list