Liste des Groupes | Revenir à cl c |
bart <bc@freeuk.com> writes:gcc provides such an option :
[...]I understand C23 mode will be enabled by a compiler option (-std=c23);The standard says exactly nothing about compiler options. "-std=c23"
the same method could have been used to enable all std headers, and
for that to be the default.
is a convention used by *some* compilers (gcc and other compilers
designed to be compatible with it).
Hello World then becomes this one-liner:A compiler could provide such an option as a non-conforming extension
>
int main() {puts("Hello, World!");}
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.)
Les messages affichés proviennent d'usenet.