Unfortunately no compiler does that, as far as I know, and even if it
did it would be hard to test for it.
I'm not thinking of anything miraculous. Simply check if the resulting
__STDC_VERSION__ == 202311L. If not, don't use it. Isn't this value
actually specified in the standard?
To some extent this is a historical accident.
I understand the difference between C and C++ history and behavior. What
I don't understand is why it is desirable for Autoconf to forcibly, and
seemingly arbitrarily, prefer C23 over any other standard (and not doing
so for C++). It doesn't seem like Autoconf's business. -k