Open
Description
Clang's documents explicitly specify that cXX
modes, in contrast to gnuXX
modes, define __STRICT_ANSI__
. However, it does not seem to be the case on Windows.
Tested:
clang version 20.1.7
Target: x86_64-pc-windows-msvc
Thread model: posix
On macOS, running clang -std=c11 -Xclang -dM -E - < /dev/null
and clang -std=gnu11 -Xclang -dM -E - < /dev/null
produce a single line of difference – #define __STRICT_ANSI__ 1
. On Windows, however, both have identical outputs; __STRICT_ANSI__
is never defined.
This makes it hard to detect the availability on GNU extensions in headers.