Bug 2144041

Summary: binutils: Port to modern C
Product: [Fedora] Fedora Reporter: Florian Weimer <fweimer>
Component: binutilsAssignee: Nick Clifton <nickc>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: aoliva, dvlasenk, fweimer, jakub, nickc, sam, sipoyare, yahmad
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: binutils-2.39-6.fc38 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-11-23 17:40:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2137512    

Description Florian Weimer 2022-11-18 18:45:59 UTC
In my tests, I see a few implicit ints/implicit function declarations:

conftest.c:107: defaulting to int
conftest.c:119: defaulting to int
conftest.c:121: implicit function declaration: exit
conftest.c:59: implicit function declaration: strcmp
conftest.c:203: implicit function declaration: strlen
conftest.c:191: implicit function declaration: exit
conftest.c:183: defaulting to int
conftest.c:206: implicit function declaration: strcpy
conftest.c:208: implicit function declaration: strncmp

I think those are from libiberty, so there is likely overlap with GDB (bug 2143992). Syncing with GCC might fix those.

Comment 1 Nick Clifton 2022-11-23 17:07:20 UTC
Fixed in binutils-2.39-6.fc38.

Note - in addition to the libiberty fixes I found once place in the gas configuration tests where it was using strcmp without #include <string.h>, so I fixed that as well.

Comment 2 Florian Weimer 2022-11-23 17:40:58 UTC
Thank you! Could you share a links to the upstream commits? Then I can put them into the documentation repository.

We don't need to backport this to earlier releases.

Comment 3 Nick Clifton 2022-11-24 12:35:24 UTC
(In reply to Florian Weimer from comment #2)
> Thank you! Could you share a links to the upstream commits?  

Sure:
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=0075c53724f78c78aa1692cc8e3bf1433eeb0b9f