Bug 2336032 - aime fails to build with GCC 15/C23 ("int true;")
Summary: aime fails to build with GCC 15/C23 ("int true;")
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: aime
Version: 42
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Filipe Rosset
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: gcc-15-mass-prebuild
TreeView+ depends on / blocked
 
Reported: 2025-01-06 22:52 UTC by Dave Malcolm
Modified: 2025-02-26 13:21 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Dave Malcolm 2025-01-06 22:52:45 UTC
I'm experimentally rebuilding rawhide with the not-yet-released GCC 15 to see if anything breaks, and to help write the porting guide.  See https://fedoraproject.org/wiki/User:Dmalcolm/gcc-15

My test build with GCC 15 failed:
https://copr.fedorainfracloud.org/coprs/dmalcolm/gcc-15-smoketest-3.failed/build/8476068/

whereas my test build with GCC 14 succeeded:
https://copr.fedorainfracloud.org/coprs/dmalcolm/gcc-15-smoketest-3.failed.checker/build/8477634/

Looking at the failure logs e.g.
https://download.copr.fedorainfracloud.org/results/dmalcolm/gcc-15-smoketest-3.failed/fedora-rawhide-x86_64/08476068-aime/builder-live.log.gz
I see:

a1-l.s.c: In function ‘beta_call’:
a1-l.s.c:171:21: error: expected identifier or ‘(’ before ‘true’
  171 |                 int true;
      |                     ^~~~
a1-l.s.c:178:22: error: lvalue required as left operand of assignment
  178 |                 true = link_data->variable.type;
      |                      ^


This is due to GCC 15 now defaulting to -std=gnu23, whereas GCC 14 defaulted to -std=gnu17, and "true" is a reserved word in C23.  It's probably fixable by renaming the variable (or by manually adding -std=gnu17 to the C build flags)


Reproducible: Always

Comment 1 Aoife Moloney 2025-02-26 13:21:29 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 42 development cycle.
Changing version to 42.


Note You need to log in before you can comment on or make changes to this bug.