https://github.com/cor3ntin commented:
>From GCC's documentation > An amendment to the 1990 standard was published in 1995. This amendment added > digraphs and __STDC_VERSION__ to the language, but otherwise concerned the > library. This amendment is commonly known as AMD1; the amended standard is > sometimes known as C94 or C95. To select this standard in GCC, use the option > -std=iso9899:199409 (with, as for other standard versions, -pedantic to > receive all required diagnostics) So this is a thing that exists. Both clang and gcc support `-std=iso9899:199409`, GCC does not support `-std=c94`. It is defined in `lib/Basic/LangOptions.cpp` and we have a few tests for it ``` lib/Driver/ToolChains/Solaris.cpp: // Use values-Xc.o for -ansi, -std=c*, -std=iso9899:199409. lib/Driver/ToolChains/Solaris.cpp: // Use values-xpg4.o for -std=c90, -std=gnu90, -std=iso9899:199409. test/Driver/solaris-ld-values.c:// RUN: %clang -std=iso9899:199409 -### %s 2>&1 \ test/Driver/unknown-std.c:// CHECK-NEXT: note: use 'iso9899:199409' for 'ISO C 1990 with amendment 1' standard test/Lexer/has_feature_c1x.c:// RUN: %clang_cc1 -E -triple x86_64-linux-gnu -std=iso9899:199409 %s -o - | FileCheck --check-prefix=CHECK-NO-1X %s test/Preprocessor/init.c:// RUN: %clang_cc1 -std=iso9899:199409 -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix C94 %s test/Sema/PR16678.c:// RUN: %clang_cc1 -DX32TYPE=ULONG -triple powerpc-unknown-linux-gnu -std=iso9899:199409 -x c %s -verify test/Sema/PR16678.c:// RUN: %clang_cc1 -DX64TYPE=ULONG -triple powerpc64-unknown-linux-gnu -std=iso9899:199409 -x c %s -verify ``` So... I do not think of a good reason to get rid of it? Even if it's probably - hopefully - not used much. https://github.com/llvm/llvm-project/pull/206403 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
