diff options
author | Erich Keane <erich.keane@intel.com> | 2017-12-11 17:36:42 +0000 |
---|---|---|
committer | Erich Keane <erich.keane@intel.com> | 2017-12-11 17:36:42 +0000 |
commit | 20a630420df42944fa7676747f31973bf2021783 (patch) | |
tree | 31ad66545e599117e0983a26f5b4f9d83a4e6f84 /test/Preprocessor | |
parent | f1094b8cc1ca05380b4fad618b7dcfdb113995e8 (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
Note: this is a recommit after a test failure took down the original (r318669)
Patch By: mibintc
Differential Revision: https://reviews.llvm.org/D34158
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@320391 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Preprocessor')
-rw-r--r-- | test/Preprocessor/ignore-pragmas.c | 10 |
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) |