bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
* -Wlto-type-mismatch warning in error()
@ 2022-12-07 20:57 Sam James
  2022-12-07 21:10 ` Arsen Arsenović
  2022-12-07 21:37 ` Gavin Smith
  0 siblings, 2 replies; 17+ messages in thread
From: Sam James @ 2022-12-07 20:57 UTC (permalink / raw)
  To: bug-texinfo; +Cc: Gnulib bugs

[-- Attachment #1: Type: text/plain, Size: 1967 bytes --]

Hi,

Compiling texinfo 7.0.1 with CFLAGS="-O2 -flto -Werror=lto-type-mismatch" results
in the following:
```
make[3]: Entering directory '/var/tmp/portage/sys-apps/texinfo-7.0.1/work/texinfo-7.0.1/install-info'
x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I..  -I.. -I../gnulib/lib -I../gnulib/lib -DLOCALEDIR=\"/usr/share/locale\"   -O2 -flto -Werror=lto-type-mismatch     -O2 -flto -Werror=lto-type-mismatch -ggdb3 -Werror=implicit-function-declaration -Werror=implicit-int -c -o install-info.o install-info.c
x86_64-pc-linux-gnu-gcc  -O2 -flto -Werror=lto-type-mismatch     -O2 -flto -Werror=lto-type-mismatch -ggdb3 -Werror=implicit-function-declaration -Werror=implicit-int  -Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 -Wl,-z,pack-relative-relocs -o ginstall-info install-info.o ../gnulib/lib/libgnu.a
../gnulib/lib/error.h:33:13: error: type of ‘error’ does not match original declaration [-Werror=lto-type-mismatch]
   33 | extern void error (int __status, int __errnum, const char *__format, ...)
      |             ^
install-info.c:218:1: note: type mismatch in parameter 1
  218 | error (const char *fmt, ...)
      | ^
install-info.c:218:1: note: ‘error’ was previously declared here
install-info.c:218:1: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
lto1: some warnings being treated as errors
lto-wrapper: fatal error: //usr/bin/x86_64-pc-linux-gnu-gcc returned 1 exit status
compilation terminated.
/usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:1514: ginstall-info] Error 1
```

This is with GCC 12.2.1 20221203.

We've also seen this in GNU make, so not sure if it's a
gnulib problem or not, as it may be in lib/error.h (hence CCing bug-gnulib):
- https://bugs.gentoo.org/863713 (texinfo)
- https://bugs.gentoo.org/863824 (make)

Best,
sam

[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 358 bytes --]

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

end of thread, other threads:[~2022-12-11  4:25 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-07 20:57 -Wlto-type-mismatch warning in error() Sam James
2022-12-07 21:10 ` Arsen Arsenović
2022-12-07 21:37 ` Gavin Smith
2022-12-08  0:21   ` Bruno Haible
2022-12-08  6:16     ` Eli Zaretskii
2022-12-08  8:25       ` Arsen Arsenović via Gnulib discussion list
2022-12-08 10:55         ` Eli Zaretskii
2022-12-08 11:31           ` Arsen Arsenović
2022-12-08 19:00           ` namespacing issues with Gnulib Bruno Haible
2022-12-08 20:10             ` Eli Zaretskii
2022-12-08 20:19             ` Arsen Arsenović
2022-12-08 20:54               ` Paul Eggert
2022-12-10  1:48         ` -Wlto-type-mismatch warning in error() Gavin Smith
2022-12-10  1:50           ` Gavin Smith
2022-12-10 21:42           ` Paul Eggert
2022-12-11  4:24         ` Jeffrey Walton
2022-12-09 12:00     ` Florian Weimer

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).