diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2017-12-04 23:08:22 +0000 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2017-12-04 23:08:22 +0000 |
commit | 472a7639ea594cc35f62d82b12b3fa7370a3c6a4 (patch) | |
tree | f184262caa3ce0de69ce48a988c049498cd6ae38 | |
parent | 9ed83a33c0a826cb190f60552d930c38a80ad46c (diff) | |
download | gcc-472a7639ea594cc35f62d82b12b3fa7370a3c6a4.zip gcc-472a7639ea594cc35f62d82b12b3fa7370a3c6a4.tar.gz gcc-472a7639ea594cc35f62d82b12b3fa7370a3c6a4.tar.bz2 |
Fix warnings in <bits/regex_compiler.tcc>
* include/bits/regex_compiler.tcc: Use C-style comment to work around
PR preprocessor/61638.
(__INSERT_REGEX_MATCHER): Replace GNU extension with __VA_ARGS__.
From-SVN: r255392
-rw-r--r-- | libstdc++-v3/ChangeLog | 4 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/regex_compiler.tcc | 16 |
2 files changed, 13 insertions, 7 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 046dee2..63a2dc7 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,9 @@ 2017-12-04 Jonathan Wakely <jwakely@redhat.com> + * include/bits/regex_compiler.tcc: Use C-style comment to work around + PR preprocessor/61638. + (__INSERT_REGEX_MATCHER): Replace GNU extension with __VA_ARGS__. + * config/io/basic_file_stdio.h (__basic_file): Remove name of unused parameter. * include/bits/boost_concept_check.h: Add pragmas to disable diff --git a/libstdc++-v3/include/bits/regex_compiler.tcc b/libstdc++-v3/include/bits/regex_compiler.tcc index 1f7dd91..0c89800 100644 --- a/libstdc++-v3/include/bits/regex_compiler.tcc +++ b/libstdc++-v3/include/bits/regex_compiler.tcc @@ -30,8 +30,9 @@ // FIXME make comments doxygen format. +/* // This compiler refers to "Regular Expression Matching Can Be Simple And Fast" -// (http://swtch.com/~rsc/regexp/regexp1.html"), +// (http://swtch.com/~rsc/regexp/regexp1.html), // but doesn't strictly follow it. // // When compiling, states are *chained* instead of tree- or graph-constructed. @@ -51,7 +52,8 @@ // article. // // That's why we introduced dummy node here ------ "end_tag" is a dummy node. -// All dummy node will be eliminated at the end of compiling process. +// All dummy nodes will be eliminated at the end of compilation. +*/ namespace std _GLIBCXX_VISIBILITY(default) { @@ -292,18 +294,18 @@ namespace __detail return true; } -#define __INSERT_REGEX_MATCHER(__func, args...)\ +#define __INSERT_REGEX_MATCHER(__func, ...)\ do\ if (!(_M_flags & regex_constants::icase))\ if (!(_M_flags & regex_constants::collate))\ - __func<false, false>(args);\ + __func<false, false>(__VA_ARGS__);\ else\ - __func<false, true>(args);\ + __func<false, true>(__VA_ARGS__);\ else\ if (!(_M_flags & regex_constants::collate))\ - __func<true, false>(args);\ + __func<true, false>(__VA_ARGS__);\ else\ - __func<true, true>(args);\ + __func<true, true>(__VA_ARGS__);\ while (false) template<typename _TraitsT> |