bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Sam James <sam@gentoo.org>
To: bug-texinfo@gnu.org
Cc: Gnulib bugs <bug-gnulib@gnu.org>
Subject: -Wlto-type-mismatch warning in error()
Date: Wed, 7 Dec 2022 20:57:45 +0000	[thread overview]
Message-ID: <D666386E-B8DE-4B99-AEF6-6F24A4B97441@gentoo.org> (raw)

[-- 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 --]

             reply	other threads:[~2022-12-07 20:58 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-07 20:57 Sam James [this message]
2022-12-07 21:10 ` -Wlto-type-mismatch warning in error() 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D666386E-B8DE-4B99-AEF6-6F24A4B97441@gentoo.org \
    --to=sam@gentoo.org \
    --cc=bug-gnulib@gnu.org \
    --cc=bug-texinfo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).