[Bug bootstrap/53607] opt-functions.awk --> "awk: There is a regular expression error."

Daniel Richard G. skunk@iSKUNK.ORG
Sun Jan 6 16:49:00 GMT 2013

This patch addresses a build failure on HP-UX due to the vendor
awk(1) apparently treating a lone curly-brace as an incomplete
repetition operator:

awk -f /home/src/gcc-4.7.2/gcc/opt-functions.awk -f
/home/src/gcc-4.7.2/gcc/opt-read.awk \
               -f /home/src/gcc-4.7.2/gcc/opth-gen.awk \
               < optionlist > tmp-options.h
awk: There is a regular expression error.
        ?, *, or + not preceded by valid regular expression
 The source line number is 90.
 The error context is
                        if (flags ~ >>>  "^{") <<< 
gmake[3]: *** [s-options-h] Error 2
gmake[3]: Leaving directory `/tmp/gcc-build/gcc'
gmake[2]: *** [all-stage1-gcc] Error 2
gmake[2]: Leaving directory `/tmp/gcc-build'
gmake[1]: *** [stage1-bubble] Error 2
gmake[1]: Leaving directory `/tmp/gcc-build'
gmake: *** [bootstrap-lean] Error 2

Fixed by escaping two curly-braces with backslashes.

Tested by getting past that point in the bootstrap successfully on
hppa2.0w-hp-hpux11.00; formal test case not applicable.

ChangeLog entry:

        PR bootstrap/53607
        * opt-functions.awk: Fix compatibility with HP-UX awk.

Patch: See attached.


On Sun, 2012 Dec 23 3:18+0000, danglin at gcc dot gnu.org wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53607
> --- Comment #1 from John David Anglin <...> 2012-12-23 03:18:19 UTC ---
> Please send patch with ChangeLog to gcc-patches and CC me.  I will
> apply if approved.
> -- 
> Configure bugmail: http://gcc.gnu.org/bugzilla/userprefs.cgi?tab=email
> ------- You are receiving this mail because: -------
> You reported the bug.

Daniel Richard G. || skunk@iSKUNK.ORG
My ASCII-art .sig got a bad case of Times New Roman.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr53607-fix.patch
Type: text/x-patch
Size: 414 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20130106/f6d2628c/attachment.bin>

More information about the Gcc-patches mailing list