[bug #58435] make 4.3 is not c89 compliant

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[bug #58435] make 4.3 is not c89 compliant

David Boyce-5
URL:
  <https://savannah.gnu.org/bugs/?58435>

                 Summary: make 4.3 is not c89 compliant
                 Project: make
            Submitted by: None
            Submitted on: Sat 23 May 2020 10:35:54 PM UTC
                Severity: 3 - Normal
              Item Group: Build/Install
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
       Component Version: None
        Operating System: POSIX-Based
           Fixed Release: None
           Triage Status: None

    _______________________________________________________

Details:

make 4.2.1 builds with compilers that default to strict c89, but make 4.3 does
not due to use of variable argument macros (a c99 feature) in lib/verify.h.

specifically, i am using the sgi mipspro 7.4.3 compiler on irix 6.5.22.

please consider either returning to c89 compliance when compiled without
support for later standards, or officially requiring C99 and using an
autotools macro such as AC_PROG_CC_C99 to ensure that necessary flags for c99
compilation are passed to the compiler.




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?58435>

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


Reply | Threaded
Open this post in threaded view
|

[bug #58435] make 4.3 is not c89 compliant

David Boyce-5
Follow-up Comment #1, bug #58435 (project make):

i probably worded the title badly.

the fact that gnu make requires c99 features is not a problem, but if it does
require c99, then this should be clear and the configure script should be
checking for c99 support and adding flags if necessary.

however, since prior versions (4.2.1) built when in c89 mode, i was unsure if
the use of c99 features is intentional.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?58435>

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


Reply | Threaded
Open this post in threaded view
|

[bug #58435] make 4.3 is not c89 compliant

David Boyce-5
Follow-up Comment #2, bug #58435 (project make):

This code was introduced when a local implementation of strerror was replaced
with gnulib's one.

commit 4d00ceba264a9fd04241dcd2685526ce64c1346b
Author: Paul Smith <[hidden email]>
Date:   Sat Jul 13 08:34:45 2019 -0400

    Switch to the gnulib version of strerror()
   
    * bootstrap.conf: Add strerror module
    * configure.ac: Remove strerror check
    * src/misc.c: Remove local strerror() implementation
    * src/config.ami.template: Remove HAVE_STRERROR
    * src/config.h-vms.template: Ditto.
    * src/config.h.W32.template: Ditto.


Either c90 conformance has to be dropped or code from gnulib cannot be easily
integrated.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?58435>

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


Reply | Threaded
Open this post in threaded view
|

[bug #58435] make 4.3 is not c89 compliant

David Boyce-5
Follow-up Comment #3, bug #58435 (project make):

perhaps the maintainers of gnulib ought to be notified of this also...

gnu's coding standards state that c89 should be the default targeted c
standard, and c99 functionality should be checked for if used. if gnulib is
using c99 features, and is meant to be the canonical source of portability
code, that seems like an issue to me...

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?58435>

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


Reply | Threaded
Open this post in threaded view
|

[bug #58435] make 4.3 is not c89 compliant

David Boyce-5
Update of bug #58435 (project make):

                  Status:                    None => Fixed                  
             Assigned to:                    None => psmith                
             Open/Closed:                    Open => Closed                
       Component Version:                    None => 4.3                    
           Fixed Release:                    None => SCM                    
           Triage Status:                    None => Small Effort          

    _______________________________________________________

Follow-up Comment #4:

I asked the Gnulib developers and they added missing markup to gnulib modules
that require c99 support, to ensure that configure checks for it.

Since we are going to require c99 anyway due to gnulib, I updated the minimum
C version for GNU make to c99 as well.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?58435>

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