* opts.sh: Quote '+' in regex.
authorNeil Booth <neil@daikokuya.co.uk>
Sun, 15 Jun 2003 15:28:24 +0000 (15:28 +0000)
committerNeil Booth <neil@gcc.gnu.org>
Sun, 15 Jun 2003 15:28:24 +0000 (15:28 +0000)
From-SVN: r67978

gcc/ChangeLog
gcc/opts.sh

index dbdc371caf693b89eee4d373db800dded524393b..3b0e24a66fce325fe5851dce6c43ae4c83a85033 100644 (file)
@@ -1,3 +1,7 @@
+2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
+
+       * opts.sh: Quote '+' in regex.
+
 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
 
        * c-opts.c (lang_flags): Update for new spelling of flags.
index afa3221a8cca3893c10acf7c9990fed494d91de3..0816931c4cbb79c49d1acd9df91b0f17a146e082 100644 (file)
@@ -48,7 +48,9 @@ ${AWK} '
        flags = " " flags " "
        result = "0"
        for (j = 0; j < n_langs; j++) {
-           if (flags ~ " " langs[j] " ")
+           regex = " " langs[j] " "
+           gsub ( "+", "\\+", regex )
+           if (flags ~ regex)
                result = result " | " macros[j]
        }
         if (flags ~ " Common ") result = result " | CL_COMMON"