bugwdiff - Bugs: bug #66692, Fails to build with GCC 15 in...

 
 

bug #66692: Fails to build with GCC 15 in default C23 mode

Submitter:  None
Submitted:  Tue 21 Jan 2025 05:59:47 PM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  None Privacy:  Public
Assigned to:  None Originator Name: 
Originator Email:  -email is unavailable- Open/Closed:  Open
* Mandatory Fields

Post a Comment

Add a New Comment Rich Markup
   

Discussion

Tue 21 Jan 2025 05:59:47 PM UTC, original submission:  

Since GCC 15 (of which a pre-release is now in Fedora Rawhide) builds in C23 mode by default, wdiff fails to build:


mdiff.c:56:7: error: conflicting types for 'strstr'; have 'char *(void)'
   56 | char *strstr ();
      |       ^~~~~~
In file included from ../lib/string.h:27,
                 from ../lib/gettext.h:184,
                 from wdiff.h:43,
                 from mdiff.c:20:
/usr/include/string.h:350:14: note: previous declaration of 'strstr' with type 'char *(const char *, const char *)'
  350 | extern char *strstr (const char *__haystack, const char *__needle)
      |              ^~~~~~


If I understand correctly, this redeclaration of strstr() is there in order to allow a gnulib replacement in case there is no strstr() in string.h. This seems like a pretty exotic situation today since that function is part of the C89 standard, and downstream in Fedora the simplest fix is for me to patch out the redeclaration.

In the general case, if the redeclaration is to be retained, then for C23 compatibility it needs to be changed to


  char *strstr (const char*, const char*);


since


  char *strstr ();


now signifies a function with no arguments, like


  char *strstr (void);


rather than a function with unspecified arguments.

Anonymous

 

Attached Files

This item currently has no attached files.

(Note: upload size limit is set to 4.0MiB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

 

Votes

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

History

No changes have been made to this item

Back to the top

Powered by Savane 3.16-11ef.
Corresponding source code