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 | b0d5be563b65ac06ff8b470a6069edd711233136 (patch) | |
tree | 9a62e69359f8b5857cde89be5d8193eaa405e86c /libcxx/src/regex.cpp | |
parent | ca83921ddc4f80f2248638599df50a41fbfb1e08 (diff) | |
download | bcm5719-llvm-b0d5be563b65ac06ff8b470a6069edd711233136.tar.gz bcm5719-llvm-b0d5be563b65ac06ff8b470a6069edd711233136.zip |
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.
llvm-svn: 197314
Diffstat (limited to 'libcxx/src/regex.cpp')
-rw-r--r-- | libcxx/src/regex.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libcxx/src/regex.cpp b/libcxx/src/regex.cpp index e3ec2810c77..fb820e2bfed 100644 --- a/libcxx/src/regex.cpp +++ b/libcxx/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[] = { |