[COMMITTED] contrib: Fix make_sunver.pl warning

Message ID yddzg9cxygc.fsf@CeBiTec.Uni-Bielefeld.DE
State Unresolved
Headers
Series [COMMITTED] contrib: Fix make_sunver.pl warning |

Checks

Context Check Description
snail/gcc-patch-check warning Git am fail log

Commit Message

Rainer Orth Feb. 17, 2023, 12:34 p.m. UTC
  Petr informed me that perl 5.32 bundled with Solaris 11.4 warns about
make_sunver.pl:

Unescaped left brace in regex is passed through in regex; marked by <-- HERE in m/^([ \t]*){ <-- HERE $/ at /vol/gcc/src/hg/master/local/libgomp/../contrib/make_sunver.pl line 216.

I didn't notice since I'm using a common installation of perl 5.12
across Solaris versions that doesn't show that warning.

His patch fixes the issue.  Tested on Solaris 11.3 (perl 5.12) and 11.4
(perl 5.32).

Committed to trunk.

	Rainer
  

Patch

# HG changeset patch
# Parent  a9c533b97d6828dce4fa8418864a1fa65f5c46b3
contrib: Fix make_sunver.pl warning

diff --git a/contrib/make_sunver.pl b/contrib/make_sunver.pl
--- a/contrib/make_sunver.pl
+++ b/contrib/make_sunver.pl
@@ -213,7 +213,7 @@  while (<F>) {
     if (/^[ \t]*$/) { print; next; }
 
     # Lines of the form '{'
-    if (/^([ \t]*){$/) {
+    if (/^([ \t]*)\{$/) {
 	if ($in_extern) {
 	    print "$1##{\n";
 	} else {