aboutsummaryrefslogtreecommitdiff
path: root/test/Preprocessor/init.c
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-05-03 22:18:20 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-05-03 22:18:20 +0000
commit0513448ae71478fd08d7e925bab46db1ddac3dfa (patch)
treefcf439c5e7cc88855c3830f89bc09905738fbf7a /test/Preprocessor/init.c
parentd54dff026b02303a35147224de72bb44cbb53c79 (diff)
Use the standard values for the __cplusplus macro, even when in GNU mode. GCC
dropped its prior behavior of always defining __cplusplus to 1 in GNU mode in version 4.7. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156113 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Preprocessor/init.c')
-rw-r--r--test/Preprocessor/init.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/test/Preprocessor/init.c b/test/Preprocessor/init.c
index 0505fffedd..4d5c36c759 100644
--- a/test/Preprocessor/init.c
+++ b/test/Preprocessor/init.c
@@ -62,12 +62,21 @@
//
// RUN: %clang_cc1 -ffreestanding -E -dM < /dev/null | FileCheck -check-prefix FREESTANDING %s
// FREESTANDING:#define __STDC_HOSTED__ 0
-//
+//
+//
+// RUN: %clang_cc1 -x c++ -std=gnu++11 -E -dM < /dev/null | FileCheck -check-prefix GXX11 %s
+//
+// GXX11:#define __GNUG__
+// GXX11:#define __GXX_WEAK__ 1
+// GXX11:#define __cplusplus 201103L
+// GXX11:#define __private_extern__ extern
+//
+//
// RUN: %clang_cc1 -x c++ -std=gnu++98 -E -dM < /dev/null | FileCheck -check-prefix GXX98 %s
//
// GXX98:#define __GNUG__
// GXX98:#define __GXX_WEAK__ 1
-// GXX98:#define __cplusplus 1
+// GXX98:#define __cplusplus 199711L
// GXX98:#define __private_extern__ extern
//
//