This is an incomplete list of incompatibilities between C as written in the standard and C as it exists in practice for people who use gcc or clang with glibc or musl.
By default, gcc and clang recognize the asm keyword as an extension. In standard C, asm is a valid non-reserved identifier, so code that conforms to the standard may fail to compile with default settings. Compilers are not conformant by default, and the standard could make asm a reserved word as C++ does, though it has not.
The standard requires FLT_ROUNDS to reflect runtime changes to the rounding mode made through fesetround in <fenv.h>. However, gcc always defines FLT_ROUNDS as 1 (round to nearest), regardless of the runtime rounding mode. Clang provides a builtin, __builtin_flt_rounds(), but gcc does not.
The C standard specifies floating-point pragmas, added in C99 and C23, to control arithmetic behavior. Over 27 years after C99, gcc still ignores all of them as no-ops, and clang supports only the C99 pragmas. Some functionality can be replicated with command-line flags, but those apply to the whole translation unit rather than to individual functions or blocks.
The standard requires qualifiers in function return types to be discarded. Clang, however, treats them as significant, so declaring int f(); and const int f(); together produces a conflicting-types error even though the two declarations should be identical.
Source: Hacker News · Summarized by HeadlinesBriefing