options.h build fails with mawk

Neil Booth neil@daikokuya.co.uk
Sun Jun 15 19:23:00 GMT 2003


Richard Henderson wrote:-

> ... bug succeeds with gawk.
> 
> ||/ Name           Version        Description
> +++-==============-==============-============================================
> ii  mawk           1.3.3-11       a pattern scanning and text processing langu
> ii  gawk           3.1.2-2        GNU awk, a pattern scanning and processing l

Sigh.  Awk appears to be a portability cesspit, though it's still easier
than writing the script in C.

Neil.

	* opts.sh: Quote '+' in regex.

Index: opts.sh
===================================================================
RCS file: /cvs/gcc/gcc/gcc/opts.sh,v
retrieving revision 1.12
diff -u -p -b -r1.12 opts.sh
--- opts.sh	15 Jun 2003 15:28:24 -0000	1.12
+++ opts.sh	15 Jun 2003 19:20:29 -0000
@@ -49,7 +49,7 @@ ${AWK} '
 	result = "0"
 	for (j = 0; j < n_langs; j++) {
 	    regex = " " langs[j] " "
-	    gsub ( "+", "\\+", regex )
+	    gsub ( "\+", "\\+", regex )
 	    if (flags ~ regex)
 		result = result " | " macros[j]
 	}



More information about the Gcc-bugs mailing list