1 // This test verifies that the correct macros are predefined. 2 // 3 // RUN: %clang_cc1 %s -E -dM -triple i686-pc-win32 -fms-extensions -fms-compatibility \ 4 // RUN: -fmsc-version=1300 -o - | FileCheck %s --check-prefix=CHECK-MS 5 // CHECK-MS: #define _INTEGRAL_MAX_BITS 64 6 // CHECK-MS: #define _MSC_EXTENSIONS 1 7 // CHECK-MS: #define _MSC_VER 1300 8 // CHECK-MS: #define _M_IX86 600 9 // CHECK-MS: #define _M_IX86_FP 10 // CHECK-MS: #define _WIN32 1 11 // CHECK-MS-NOT: #define __GNUC__ 12 // 13 // RUN: %clang_cc1 %s -E -dM -ffast-math -o - \ 14 // RUN: | FileCheck %s --check-prefix=CHECK-FAST-MATH 15 // CHECK-FAST-MATH: #define __FAST_MATH__ 16 // CHECK-FAST-MATH: #define __FINITE_MATH_ONLY__ 1 17 // 18 // RUN: %clang_cc1 %s -E -dM -ffinite-math-only -o - \ 19 // RUN: | FileCheck %s --check-prefix=CHECK-FINITE-MATH-ONLY 20 // CHECK-FINITE-MATH-ONLY: #define __FINITE_MATH_ONLY__ 1 21 // 22 // RUN: %clang %s -E -dM -fno-finite-math-only -o - \ 23 // RUN: | FileCheck %s --check-prefix=CHECK-NO-FINITE-MATH-ONLY 24 // CHECK-NO-FINITE-MATH-ONLY: #define __FINITE_MATH_ONLY__ 0 25 // 26 // RUN: %clang_cc1 %s -E -dM -o - \ 27 // RUN: | FileCheck %s --check-prefix=CHECK-FINITE-MATH-FLAG-UNDEFINED 28 // CHECK-FINITE-MATH-FLAG-UNDEFINED: #define __FINITE_MATH_ONLY__ 0 29