Hi! { is a special character in ERE, so gawk rightfully complains in POSIXLY_CORRECT mode. The regex is meant to look for { at the beginning of line. Neither "^\{" nor "^\\{" works though, but "^[{]" does. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
2016-12-12 Jakub Jelinek <ja...@redhat.com> PR other/78766 * opt-functions.awk (opt_args): Use [{] instead of { in regexps. --- gcc/opt-functions.awk.jj 2016-01-04 14:55:50.000000000 +0100 +++ gcc/opt-functions.awk 2016-12-12 09:38:02.229155459 +0100 @@ -61,10 +61,10 @@ function opt_args(name, flags) if (flags !~ " " name "\\(") return "" sub(".* " name "\\(", "", flags) - if (flags ~ "^{") + if (flags ~ "^[{]") { - sub ("^{", "", flags) - sub("}\\).*", "", flags) + sub ("^[{]", "", flags) + sub ("}\\).*", "", flags) } else sub("\\).*", "", flags) Jakub