[ATTN] GCC and make Maintainers: SUS V5 POSIX 2024 make CC default c17

Brian Inglis Brian.Inglis@SystematicSW.ab.ca
Sun Nov 1 16:55:18 GMT 2026


On 2026-11-01 05:19, ASSI via Cygwin-apps wrote:
> Brian Inglis via Cygwin-apps writes:
>> SUS V5 POSIX 2024, quoted at bottom, shows that POSIX conformant make
>> sets the default value for CC = c17, which is not installed in Cygwin.
> 
> I've never used these version-wrapped compiler invocations in decades
> and I know of nobody who still does.
> 
>> For POSIX conformance, could we please have c17 installed in upcoming
>> releases of gcc-core, assuming there is some method for having it
>> defined and installed to support -std=c17 or -std=gnu17 by default.
> 
> The default for gcc since version 11 is -std=gnu17 already, so
> effectively that changes nothing except for the GNU extensions.  The
> existing c89/c99 wrappers force strict ANSI compliance.  I'll add the
> c17 wrapper with the same semantics as the existing ones (i.e. strict
> compliance, which is useless for just about all sources) for the next
> update.
> 
>> Could we please also have make updated to default to this setting,
>> assuming there are POSIX updates or options available.
> 
> The default is CC=cc in normal mode and CC=c99 in .POSIX: mode; which
> can't be forced via command line or POSIXLY_CORRECT=1, but requires that
> pseudo target in Makefile (so you can't just have a POSIX wrapper).  I
> have no idea how that is currently handled when compiling GNU make, I
> don't think the POSIX standard to target can be configured yet.

That's why I commented on the POSIX CC=c99 bug.

They also have to decide if they are going to do anything about the changed 
requirement for backward/forward compatibility: also support .POSIX2008 and 
.POSIX2024, default to former or latter?

https://cgit.git.savannah.gnu.org/cgit/make.git/tree/src/read.c#n1899
...
check_specials (struct nameseq *files, int set_default)
...
       if (!posix_pedantic && streq (nm, ".POSIX"))
...
            /* These default values are based on IEEE Std 1003.1-2008.
               It requires '-O 1' for [CF]FLAGS, but GCC doesn't allow
               space between -O and the number so omit it here.  */
-          define_variable_cname ("CC", "c99", o_default, 0);
+          define_variable_cname ("CC", "c17", o_default, 0);

-- 
Take care. Thanks, Brian Inglis              Calgary, Alberta, Canada

La perfection est atteinte                   Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter  not when there is no more to add
mais lorsqu'il n'y a plus rien à retrancher  but when there is no more to cut
                                 -- Antoine de Saint-Exupéry


More information about the Cygwin-apps mailing list