Re: GNU make 3.81 with GCC 14

Greg Troxel <[email protected]> Sun, 08 Sep 2024 17:48:41 -0400
Newsgroups gmane.os.netbsd.devel.toolchain
Message-ID <[email protected]>
Lloyd Parkes <[email protected]> writes:

> Does the following look like a good idea to add to
> tools/gmake/Makefile? I can create a PR for it easily enough.
>
> 	.if ${HAVE_GCC} > 13
> 	HOST_CFLAGS+=		-std=gnu89
> 	.endif

My quick reaction is that in theory, each program is written in a
specific language family member (LFM, that I'd call a "language" but
others disagree), such as C89 or C89-with-gnu-stuff.

Additionally, compilers support multiple LFMs, and unhelpfully default
to newer ones, rater than enforcing that programs in newfangled LFMs
have to pass --std.

So if make that we have is documented to build with gnu89, we should
just set --std=gnu89 always.

Or is it c99-almost, and this is a kludge?  What is gcc14 defaulting to
for a c std?  Is it really anything newer than c99?