Re: Detect if the static keyword is supported in array type derivations in function parameters

Paul Eggert <[email protected]> Mon, 6 Oct 2025 16:13:22 -0700
Newsgroups gmane.comp.sysutils.autoconf.general
Organization UCLA Computer Science Department
Message-ID <[email protected]>
On 2025-10-06 13:45, Antonin D=C3=A9cimo wrote:
> Gentle ping; this is useful for a trick from Modern C, 3rd edition,
> from Jens Gustedt. See 5.4-2.
> https://inria.hal.science/hal-02383654v2/file/modernC.pdf

Thanks for the ping, though I'm a bit puzzled by the "5.4-2". Perhaps=20
you're referring to an older edition of the book? Does Gustedt recommend=20
a macro for this sort of thing?

The macro name seems pretty long, given how commonly used this would be=20
for code that uses Gustedt's style. How about a shorter name like=20
"ATIC", short for "Array TINIEST INDEX COUNT"? This macro name is short=20
and (unlike "STATIC") is unlikely to be used in existing code.

Also, we should arrange for __STDC_NO_VLA__ to be 1 on compilers that=20
don't define that macro but lack support for VLAs.