URL:
  <https://savannah.nongnu.org/bugs/?66726>

                 Summary: cvs-1.11.23 fails to build with GCC 15
                   Group: Concurrent Versions System
               Submitter: 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
         Discussion Lock: Any
                 Release:
           Fixed Release: None
   Fixed Feature Release: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Tue 28 Jan 2025 03:15:50 PM UTC By: Petr Pisar <petrp>
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.






    _______________________________________________________
File Attachments:


-------------------------------------------------------
Name: cvs-1.11.23-Adapt-to-changes-in-GCC-15.patch  Size: 326KiB
<https://file.savannah.nongnu.org/file/cvs-1.11.23-Adapt-to-changes-in-GCC-15.patch?file_id=56823>

    AGPL NOTICE

These attachments are served by Savane. You can download the corresponding
source code of Savane at
https://savannah.nongnu.org/source/savane-85dc625814b8ab305c8a901585c95c1324ed3cf5.tar.gz

    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/bugs/?66726>

_______________________________________________
Message sent via Savannah
https://savannah.nongnu.org/

Attachment: signature.asc
Description: PGP signature

Reply via email to