From 472a7639ea594cc35f62d82b12b3fa7370a3c6a4 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Mon, 4 Dec 2017 23:08:22 +0000 Subject: [PATCH] Fix warnings in * 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 --- libstdc++-v3/ChangeLog | 4 ++++ 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 046dee223c6..63a2dc71b43 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,9 @@ 2017-12-04 Jonathan Wakely + * 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 1f7dd91b643..0c89800ea94 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(args);\ + __func(__VA_ARGS__);\ else\ - __func(args);\ + __func(__VA_ARGS__);\ else\ if (!(_M_flags & regex_constants::collate))\ - __func(args);\ + __func(__VA_ARGS__);\ else\ - __func(args);\ + __func(__VA_ARGS__);\ while (false) template -- 2.30.2