
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
10 lines
665 B
C++
10 lines
665 B
C++
// RUN: %clang_cl /TC /dev/null /E -Xclang -dM 2> /dev/null | FileCheck -match-full-lines %s --check-prefix=NOSTDC
|
|
// RUN: %clang_cl /TC /dev/null /E -Xclang -dM /Zc:__STDC__ 2> /dev/null | FileCheck -match-full-lines %s --check-prefix=YESSTDC
|
|
// __STDC__ should never be defined in C++ mode with fms-compatibility.
|
|
// RUN: %clang_cl /dev/null /E -Xclang -dM 2>&1 | FileCheck %s --check-prefix=NOSTDC
|
|
// RUN: %clang_cl /dev/null /E -Xclang -dM /Zc:__STDC__ 2>&1 | FileCheck %s --check-prefix=ZCSTDCIGNORED
|
|
// YESSTDC: #define __STDC__ 1
|
|
// NOSTDC-NOT: #define __STDC__ 1
|
|
// ZCSTDCIGNORED-NOT: #define __STDC__ 1
|
|
// ZCSTDCIGNORED: argument unused during compilation
|