Sujet : Re: "A diagram of C23 basic types"
De : Keith.S.Thompson+u (at) *nospam* gmail.com (Keith Thompson)
Groupes : comp.lang.cDate : 03. Apr 2025, 19:31:08
Autres entêtes
Organisation : None to speak of
Message-ID : <85y0whjdw3.fsf@nosuchdomain.example.com>
References : 1 2 3 4 5 6 7 8 9 10 11
User-Agent : Gnus/5.13 (Gnus v5.13)
bart <
bc@freeuk.com> writes:
[...]
I understand C23 mode will be enabled by a compiler option (-std=c23);
the same method could have been used to enable all std headers, and
for that to be the default.
The standard says exactly nothing about compiler options. "-std=c23"
is a convention used by *some* compilers (gcc and other compilers
designed to be compatible with it).
Hello World then becomes this one-liner:
>
int main() {puts("Hello, World!");}
A compiler could provide such an option as a non-conforming extension
with no change in the standard. I'm not aware that any compiler
has done so, or that there's been any demand for it. One reason
for the lack of demand might be that any code that depends on it
is not portable. (Older versions of MS Visual Studio create a
"stdafx.h" header, but newer versions appear to have dropped that.)
-- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.comvoid Void(void) { Void(); } /* The recursive call of the void */