This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: options.h build fails with mawk


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]
 	}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]