Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 943704 - dev-libs/ell-0.70 fails with gcc-15.0.0_pre20241117: multiple error: incompatible types when returning type '_Bool'
Summary: dev-libs/ell-0.70 fails with gcc-15.0.0_pre20241117: multiple error: incompat...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Ben Kohler
URL:
Whiteboard:
Keywords: PATCH
: 943707 (view as bug list)
Depends on:
Blocks: c23-porting
  Show dependency tree
 
Reported: 2024-11-18 04:26 UTC by tdr
Modified: 2024-11-20 17:17 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
ell build failure (ell-0.70:20241118-041236-build.log.txt,47.48 KB, text/plain)
2024-11-18 04:27 UTC, tdr
Details
emerge --info (tdr-emerge--info.txt,6.30 KB, text/plain)
2024-11-18 04:28 UTC, tdr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tdr 2024-11-18 04:26:46 UTC
15.0.0_pre20241117 default to using -std=gnu23 

multiple wrong type error messages when type _Bool is received as return when other types expected



Reproducible: Always

Actual Results:  
ell/settings.c:1521:24: error: incompatible types when returning type '_Bool' but 'const char *' was expected
 1521 |                 return false;
      |                        ^~~~~
/bin/sh ./libtool  --tag=CC   --mode=compile x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I.    -fvisibility=hidden -DUNITDIR=\""./unit/"\" -DCERTDIR=\""./unit/"\" -march=native -O3 -flto=56 -mprefer-vector-width=512 -fno-vect-cost-model -pipe -fsigned-char -fPIE -c -o ell/sysctl.lo ell/sysctl.c
/bin/sh ./libtool  --tag=CC   --mode=compile x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I.    -fvisibility=hidden -DUNITDIR=\""./unit/"\" -DCERTDIR=\""./unit/"\" -march=native -O3 -flto=56 -mprefer-vector-width=512 -fno-vect-cost-model -pipe -fsigned-char -fPIE -c -o ell/minheap.lo ell/minheap.c
/bin/sh ./libtool  --tag=CC   --mode=compile x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I.    -fvisibility=hidden -DUNITDIR=\""./unit/"\" -DCERTDIR=\""./unit/"\" -march=native -O3 -flto=56 -mprefer-vector-width=512 -fno-vect-cost-model -pipe -fsigned-char -fPIE -c -o ell/notifylist.lo ell/notifylist.c
make[1]: *** [Makefile:2051: ell/dbus.lo] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile:2051: ell/settings.lo] Error 1
libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -fvisibility=hidden -DUNITDIR=\"./unit/\" -DCERTDIR=\"./unit/\" -march=native -O3 -flto=56 -mprefer-vector-width=512 -fno-vect-cost-model -pipe -fsigned-char -c ell/time.c  -fPIC -DPIC -o ell/.libs/time.o
libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -fvisibility=hidden -DUNITDIR=\"./unit/\" -DCERTDIR=\"./unit/\" -march=native -O3 -flto=56 -mprefer-vector-width=512 -fno-vect-cost-model -pipe -fsigned-char -c ell/gpio.c  -fPIC -DPIC -o ell/.libs/gpio.o
libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -fvisibility=hidden -DUNITDIR=\"./unit/\" -DCERTDIR=\"./unit/\" -march=native -O3 -flto=56 -mprefer-vector-width=512 -fno-vect-cost-model -pipe -fsigned-char -c ell/path.c  -fPIC -DPIC -o ell/.libs/path.o
libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -fvisibility=hidden -DUNITDIR=\"./unit/\" -DCERTDIR=\"./unit/\" -march=native -O3 -flto=56 -mprefer-vector-width=512 -fno-vect-cost-model -pipe -fsigned-char -c ell/icmp6.c  -fPIC -DPIC -o ell/.libs/icmp6.o
ell/cert.c: In function 'cert_get_extension':
ell/cert.c:390:32: error: incompatible types when returning type '_Bool' but 'const uint8_t *' {aka 'const unsigned char *'} was expected
  390 |                         return false;
      |                                ^~~~~
ell/cert.c:396:32: error: incompatible types when returning type '_Bool' but 'const uint8_t *' {aka 'const unsigned char *'} was expected
  396 |                         return false;
      |                                ^~~~~
ell/cert.c:406:40: error: incompatible types when returning type '_Bool' but 'const uint8_t *' {aka 'const unsigned char *'} was expected
  406 |                                 return false;
      |                                        ^~~~~
ell/cert.c:414:32: error: incompatible types when returning type '_Bool' but 'const uint8_t *' {aka 'const unsigned char *'} was expected
  414 |                         return false;
      |                                ^~~~~


works with gcc:15.0.0_pre20241110
Comment 1 tdr 2024-11-18 04:27:04 UTC
Created attachment 908912 [details]
ell build failure
Comment 2 tdr 2024-11-18 04:28:13 UTC
Created attachment 908913 [details]
emerge --info
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-11-18 04:51:04 UTC
*** Bug 943707 has been marked as a duplicate of this bug. ***
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-11-18 05:28:41 UTC
ben, I'm going to go ahead and fix this given it has patches upstream and I expect a lot of people to hit this w/ testing - hope that's ok
Comment 6 Larry the Git Cow gentoo-dev 2024-11-18 05:35:17 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=047579dd5fdbd32b836c75634fdce4d7ddf89607

commit 047579dd5fdbd32b836c75634fdce4d7ddf89607
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-11-18 05:34:05 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-11-18 05:34:48 +0000

    dev-libs/ell: fix C23 compat
    
    Closes: https://bugs.gentoo.org/943704
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-libs/ell/ell-0.70-r1.ebuild                    | 63 ++++++++++++++++++++
 .../0001-settings-fix-std-c23-build-failure.patch  | 43 ++++++++++++++
 .../0.70/0002-cert-fix-std-c23-build-failure.patch | 67 ++++++++++++++++++++++
 .../0.70/0003-dbus-fix-std-c23-build-failure.patch | 45 +++++++++++++++
 .../0004-test-rtnl-fix-std-c23-build-failure.patch | 58 +++++++++++++++++++
 5 files changed, 276 insertions(+)
Comment 7 Larry the Git Cow gentoo-dev 2024-11-19 03:52:56 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d2facc542948cfb79193220e7beb9d1c9837df8a

commit d2facc542948cfb79193220e7beb9d1c9837df8a
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-11-19 03:48:42 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-11-19 03:52:22 +0000

    sys-devel/gcc: backport C23 fix to 15.0.0_pre20241117
    
    Backport a -std=gnu23/-std=c23 fix to 15.0.0_pre20241117 which prevented
    coersion from _Bool to NULL. Note that this is still dodgy code and some
    are proposing this be banned in a future C version (maybe even C2y), but
    it shouldn't be rejected in this version at least.
    
    I've added Closes tags for all bugs which, at a glance, look related,
    but I haven't re-tested them all and one or two might need reopening.
    
    Bug: https://gcc.gnu.org/PR112556
    Closes: https://bugs.gentoo.org/943862
    Closes: https://bugs.gentoo.org/943861
    Closes: https://bugs.gentoo.org/943843
    Closes: https://bugs.gentoo.org/943811
    Closes: https://bugs.gentoo.org/943809
    Closes: https://bugs.gentoo.org/943753
    Closes: https://bugs.gentoo.org/943715
    Closes: https://bugs.gentoo.org/943704
    Closes: https://bugs.gentoo.org/942958
    Signed-off-by: Sam James <sam@gentoo.org>

 ...llow-bool-and-enum-null-pointer-constants.patch | 244 +++++++++++++++++++++
 sys-devel/gcc/gcc-15.0.0_pre20241117-r2.ebuild     |  54 +++++
 2 files changed, 298 insertions(+)