diff options
author | Logan Chien <tzuhsiang.chien@gmail.com> | 2013-12-14 06:45:09 +0000 |
---|---|---|
committer | Logan Chien <tzuhsiang.chien@gmail.com> | 2013-12-14 06:45:09 +0000 |
commit | 8f48c23568a122de6088455700e9d197b79bd8f8 (patch) | |
tree | 7282206b2133f9c5236bfc91d28ad58e02d28799 /src/regex.cpp | |
parent | bfd68bf0c7e32187dd4be7bd27fdec05d7b833fd (diff) | |
download | libcxx-8f48c23568a122de6088455700e9d197b79bd8f8.tar.gz |
Fix GCC unknown pragma warning in libc++.
We should check defined(__clang__) before the usage of the
clang diagnostic pragmas.
The [-Wswitch] warning in src/future.cpp should be ignored.
As the result, the equivalent GCC pragma is added.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@197314 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'src/regex.cpp')
-rw-r--r-- | src/regex.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/regex.cpp b/src/regex.cpp index e3ec2810c..fb820e2bf 100644 --- a/src/regex.cpp +++ b/src/regex.cpp @@ -69,8 +69,10 @@ regex_error::~regex_error() throw() {} namespace { +#if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wpadded" +#endif struct collationnames { @@ -78,7 +80,9 @@ struct collationnames char char_; }; +#if defined(__clang__) #pragma clang diagnostic pop +#endif const collationnames collatenames[] = { @@ -195,8 +199,10 @@ const collationnames collatenames[] = {"zero", 0x30} }; +#if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wpadded" +#endif struct classnames { @@ -204,7 +210,9 @@ struct classnames ctype_base::mask mask_; }; +#if defined(__clang__) #pragma clang diagnostic pop +#endif const classnames ClassNames[] = { |