bugConcurrent Versions System - Bugs: bug #66726, cvs-1.11.23 fails to build with...

 
 

bug #66726: cvs-1.11.23 fails to build with GCC 15

Submitter:  Petr Pisar <petrp>
Submitted:  Tue 28 Jan 2025 03:15:50 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Release: 
Fixed Release:  None Fixed Feature Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 28 Jan 2025 03:15:50 PM UTC, original submission:  

GCC 15 moved a default C language standard to ISO 23. As a result
function declarations without an argument means no argument. That
caused a mismatch with how the functions are called. An example:
   
        getdate.y:76:26: error: conflicting types for ‘gmtime’; have ‘struct tm *(void)’
           76 | extern struct tm        *gmtime();
              |                          ^~~~~~
        In file included from xtime.h:23,
                         from getdate.y:46:
        /usr/include/time.h:132:19: note: previous declaration of ‘gmtime’ with type ‘struct tm (const time_t )’ {aka ‘struct tm (const long int )’}
          132 | extern struct tm *gmtime (const time_t *__timer) __THROW;
              |                   ^~~~~~

That prevents from building with GCC 15 (unless a user passes an appropriate -std= option in CFLAGS).
   
Also K&R protoype syntax is deprecated and GCC polluted the output with
many warnings like this:
   
        getdate.y: In function ‘ToSeconds’:
        getdate.y:579:1: warning: old-style function definition [-Wold-style-definition]
          579 | static time_t
              | ^~~~~~~~~

The attached patch ports cvs to GCC 15.

Petr Pisar <petrp>

 

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

Attach Files:
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by petrp (Submitted the item)
  •  

    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.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2025-01-28 petrp Attached File- Added cvs-1.11.23-Adapt-to-changes-in-GCC-15.patch, #56823

    Back to the top

    Powered by Savane 3.14-962f.
    Corresponding source code