
This commit adds the /Zc:\_\_STDC\_\_ argument from MSVC, which defines \_\_STDC_\_. This means, alongside stronger feature parity with MSVC, that things that rely on \_\_STDC\_\_, such as autoconf, can work. Link to MSVC documentation of this flag: https://learn.microsoft.com/en-us/cpp/build/reference/zc-stdc?view=msvc-170
12 lines
531 B
C
12 lines
531 B
C
// Note: %s must be preceded by --, otherwise it may be interpreted as a
|
|
// command-line option, e.g. on Mac where %s is commonly under /Users.
|
|
//
|
|
// Note: see also cl-zc.cpp
|
|
|
|
// RUN: %clang_cl /TC /dev/null /E -Xclang -dM /Zc:__STDC__- 2>&1 | FileCheck %s --check-prefix=ZCSTDCIGNORED
|
|
// ZCSTDCIGNORED-NOT: #define __STDC__ 1
|
|
// ZCSTDCIGNORED: argument unused during compilation
|
|
|
|
// RUN: not %clang -Xclang -fno-ms-define-stdc %s 2>&1 | FileCheck %s --check-prefix="NOARG"
|
|
// NOARG: error: unknown argument: '-fno-ms-define-stdc'
|