Fix warnings in <bits/regex_compiler.tcc>
authorJonathan Wakely <jwakely@redhat.com>
Mon, 4 Dec 2017 23:08:22 +0000 (23:08 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Mon, 4 Dec 2017 23:08:22 +0000 (23:08 +0000)
* 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
libstdc++-v3/include/bits/regex_compiler.tcc

index 046dee2..63a2dc7 100644 (file)
@@ -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
index 1f7dd91..0c89800 100644 (file)
@@ -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>