summaryrefslogtreecommitdiff
path: root/test/Preprocessor
diff options
context:
space:
mode:
authorErich Keane <erich.keane@intel.com>2017-11-20 17:57:42 +0000
committerErich Keane <erich.keane@intel.com>2017-11-20 17:57:42 +0000
commite868ee475466df3eb9e752331c5c4a6dc9cdf58d (patch)
treebd4fbf46175f54651e017bb38710956fd0f555f3 /test/Preprocessor
parente45231fd48ab31692aedfdcf5b6471a33d6c77f7 (diff)
For Linux/gnu compatibility, preinclude <stdc-predef.h> if the file is available
As reported in llvm bugzilla 32377. Here’s a patch to add preinclude of stdc-predef.h. The gcc documentation says “On GNU/Linux, <stdc-predef.h> is pre-included.” See https://gcc.gnu.org/gcc-4.8/porting_to.html; The preinclude is inhibited with –ffreestanding. Basically I fixed the failing test cases by adding –ffreestanding which inhibits this behavior. I fixed all the failing tests, including some in extra/test, there's a separate patch for that which is linked here Patch By: mibintc Differential Revision: https://reviews.llvm.org/D34158 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@318669 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Preprocessor')
-rw-r--r--test/Preprocessor/ignore-pragmas.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/Preprocessor/ignore-pragmas.c b/test/Preprocessor/ignore-pragmas.c
index e2f9ef3dfa..965b23e8ab 100644
--- a/test/Preprocessor/ignore-pragmas.c
+++ b/test/Preprocessor/ignore-pragmas.c
@@ -1,8 +1,8 @@
-// RUN: %clang_cc1 -E %s -Wall -verify
-// RUN: %clang_cc1 -Eonly %s -Wall -verify
-// RUN: %clang -M -Wall %s -Xclang -verify
-// RUN: %clang -E -frewrite-includes %s -Wall -Xclang -verify
-// RUN: %clang -E -dD -dM %s -Wall -Xclang -verify
+// RUN: %clang_cc1 -E %s -Wall -ffreestanding -verify
+// RUN: %clang_cc1 -Eonly %s -Wall -ffreestanding -verify
+// RUN: %clang -M -Wall -ffreestanding %s -Xclang -verify
+// RUN: %clang -E -frewrite-includes %s -Wall -ffreestanding -Xclang -verify
+// RUN: %clang -E -dD -dM %s -Wall -ffreestanding -Xclang -verify
// expected-no-diagnostics
#pragma GCC visibility push (default)