aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2018-07-06 16:31:24 +0200
committerAndreas K. Hüttel <dilfridge@gentoo.org>2018-08-04 20:46:30 +0200
commitccaf06e57f10002b5377dee2618893eb33f2f6ac (patch)
treed005af28f896b9c2c0cdb5c1f2a3cad6ebdf7ebe
parentmath: Set 387 and SSE2 rounding mode for tgamma on i386 [BZ #23253] (diff)
downloadglibc-ccaf06e57f10002b5377dee2618893eb33f2f6ac.tar.gz
glibc-ccaf06e57f10002b5377dee2618893eb33f2f6ac.tar.bz2
glibc-ccaf06e57f10002b5377dee2618893eb33f2f6ac.zip
conform/conformtest.pl: Escape literal braces in regular expressions
This suppresses Perl warnings like these: Unescaped left brace in regex is deprecated here (and will be fatal in Perl 5.32), passed through in regex; marked by <-- HERE in m/^element *({ <-- HERE ([^}]*)}|([^{ ]*)) *({([^}]*)}|([^{ ]*)) *([A-Za-z0-9_]*) *(.*)/ at conformtest.pl line 370. Reviewed-by: Carlos O'Donell <carlos@redhat.com> (cherry picked from commit ddb3c626b0a159de3547d901420198b626c29554) (cherry picked from commit 33d1bde2de968f34c15f90183d0599eae7fb01d2)
-rw-r--r--ChangeLog5
-rw-r--r--conform/conformtest.pl26
2 files changed, 18 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index 8c614045a4..2171f76fa9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2018-07-06 Florian Weimer <fweimer@redhat.com>
+
+ * conform/conformtest.pl (checknamespace): Escape literal braces
+ in regular expressions.
+
2018-06-21 Florian Weimer <fweimer@redhat.com>
[BZ #23253]
diff --git a/conform/conformtest.pl b/conform/conformtest.pl
index 3e851d44ab..f2f5013c50 100644
--- a/conform/conformtest.pl
+++ b/conform/conformtest.pl
@@ -369,7 +369,7 @@ while ($#headers >= 0) {
s/^optional-//;
$optional = 1;
}
- if (/^element *({([^}]*)}|([^{ ]*)) *({([^}]*)}|([^{ ]*)) *([A-Za-z0-9_]*) *(.*)/) {
+ if (/^element *(\{([^}]*)\}|([^{ ]*)) *(\{([^}]*)\}|([^{ ]*)) *([A-Za-z0-9_]*) *(.*)/) {
my($struct) = "$2$3";
my($type) = "$5$6";
my($member) = "$7";
@@ -558,7 +558,7 @@ while ($#headers >= 0) {
"Symbol \"$symbol\" has not the right value.", $res,
$xfail);
}
- } elsif (/^type *({([^}]*)|([a-zA-Z0-9_]*))/) {
+ } elsif (/^type *(\{([^}]*)|([a-zA-Z0-9_]*))/) {
my($type) = "$2$3";
my($maybe_opaque) = 0;
@@ -588,7 +588,7 @@ while ($#headers >= 0) {
? "NOT AVAILABLE"
: "Type \"$type\" not available."), $missing, $optional,
$xfail);
- } elsif (/^tag *({([^}]*)|([a-zA-Z0-9_]*))/) {
+ } elsif (/^tag *(\{([^}]*)|([a-zA-Z0-9_]*))/) {
my($type) = "$2$3";
# Remember that this name is allowed.
@@ -609,7 +609,7 @@ while ($#headers >= 0) {
compiletest ($fnamebase, "Testing for type $type",
"Type \"$type\" not available.", $missing, 0, $xfail);
- } elsif (/^function *({([^}]*)}|([a-zA-Z0-9_]*)) [(][*]([a-zA-Z0-9_]*) ([(].*[)])/) {
+ } elsif (/^function *(\{([^}]*)\}|([a-zA-Z0-9_]*)) [(][*]([a-zA-Z0-9_]*) ([(].*[)])/) {
my($rettype) = "$2$3";
my($fname) = "$4";
my($args) = "$5";
@@ -646,7 +646,7 @@ while ($#headers >= 0) {
"Function \"$fname\" has incorrect type.", $res, 0,
$xfail);
}
- } elsif (/^function *({([^}]*)}|([a-zA-Z0-9_]*)) ([a-zA-Z0-9_]*) ([(].*[)])/) {
+ } elsif (/^function *(\{([^}]*)\}|([a-zA-Z0-9_]*)) ([a-zA-Z0-9_]*) ([(].*[)])/) {
my($rettype) = "$2$3";
my($fname) = "$4";
my($args) = "$5";
@@ -683,7 +683,7 @@ while ($#headers >= 0) {
"Function \"$fname\" has incorrect type.", $res, 0,
$xfail);
}
- } elsif (/^variable *({([^}]*)}|([a-zA-Z0-9_]*)) ([a-zA-Z0-9_]*) *(.*)/) {
+ } elsif (/^variable *(\{([^}]*)\}|([a-zA-Z0-9_]*)) ([a-zA-Z0-9_]*) *(.*)/) {
my($type) = "$2$3";
my($vname) = "$4";
my($rest) = "$5";
@@ -715,7 +715,7 @@ while ($#headers >= 0) {
compiletest ($fnamebase, "Test for type of variable $fname",
"Variable \"$vname\" has incorrect type.", $res, 0, $xfail);
- } elsif (/^macro-function *({([^}]*)}|([a-zA-Z0-9_]*)) ([a-zA-Z0-9_]*) ([(].*[)])/) {
+ } elsif (/^macro-function *(\{([^}]*)\}|([a-zA-Z0-9_]*)) ([a-zA-Z0-9_]*) ([(].*[)])/) {
my($rettype) = "$2$3";
my($fname) = "$4";
my($args) = "$5";
@@ -814,11 +814,11 @@ while ($#headers >= 0) {
s/^xfail(\[([^\]]*)\])?-//;
s/^optional-//;
- if (/^element *({([^}]*)}|([^ ]*)) *({([^}]*)}|([^ ]*)) *([A-Za-z0-9_]*) *(.*)/) {
+ if (/^element *(\{([^}]*)\}|([^ ]*)) *(\{([^}]*)\}|([^ ]*)) *([A-Za-z0-9_]*) *(.*)/) {
push @allow, $7;
} elsif (/^(macro|constant|macro-constant|macro-int-constant) +([a-zA-Z0-9_]*) *(?:{([^}]*)} *)?(?:([>=<!]+) ([A-Za-z0-9_-]*))?/) {
push @allow, $2;
- } elsif (/^(type|tag) *({([^}]*)|([a-zA-Z0-9_]*))/) {
+ } elsif (/^(type|tag) *(\{([^}]*)|([a-zA-Z0-9_]*))/) {
my($type) = "$3$4";
# Remember that this name is allowed.
@@ -829,13 +829,13 @@ while ($#headers >= 0) {
} else {
push @allow, $type;
}
- } elsif (/^function *({([^}]*)}|([a-zA-Z0-9_]*)) [(][*]([a-zA-Z0-9_]*) ([(].*[)])/) {
+ } elsif (/^function *(\{([^}]*)\}|([a-zA-Z0-9_]*)) [(][*]([a-zA-Z0-9_]*) ([(].*[)])/) {
push @allow, $4;
- } elsif (/^function *({([^}]*)}|([a-zA-Z0-9_]*)) ([a-zA-Z0-9_]*) ([(].*[)])/) {
+ } elsif (/^function *(\{([^}]*)\}|([a-zA-Z0-9_]*)) ([a-zA-Z0-9_]*) ([(].*[)])/) {
push @allow, $4;
- } elsif (/^variable *({([^}]*)}|([a-zA-Z0-9_]*)) ([a-zA-Z0-9_]*)/) {
+ } elsif (/^variable *(\{([^}]*)\}|([a-zA-Z0-9_]*)) ([a-zA-Z0-9_]*)/) {
push @allow, $4;
- } elsif (/^macro-function *({([^}]*)}|([a-zA-Z0-9_]*)) ([a-zA-Z0-9_]*) ([(].*[)])/) {
+ } elsif (/^macro-function *(\{([^}]*)\}|([a-zA-Z0-9_]*)) ([a-zA-Z0-9_]*) ([(].*[)])/) {
push @allow, $4;
} elsif (/^symbol *([a-zA-Z0-9_]*) *([A-Za-z0-9_-]*)?/) {
push @allow, $1;