From ee74b9cbbdba4dc9e1c0532915d4f06751a6a561 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 1 May 2012 20:03:15 +0000 Subject: [PATCH] conformtest: Support specifying types before promotion. --- ChangeLog | 4 ++++ conform/conformtest.pl | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 8b89cd9a29a..72a5f274a29 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2012-05-01 Joseph Myers + * conform/conformtest.pl: If macro or constant types start + "promoted:", expect the symbol to be of the following type + promoted by the integer promotions. + * conform/conformtest.pl: Parse all "constant" and "macro" lines in one place. Also handle "macro-constant". diff --git a/conform/conformtest.pl b/conform/conformtest.pl index f5860ac1397..2d8cfd703c0 100644 --- a/conform/conformtest.pl +++ b/conform/conformtest.pl @@ -437,7 +437,12 @@ while ($#headers >= 0) { open (TESTFILE, ">$fnamebase.c"); print TESTFILE "$prepend"; print TESTFILE "#include <$h>\n"; - print TESTFILE "__typeof__ (($type) 0) a;\n"; + if ($type =~ /^promoted:/) { + $type =~ s/^promoted://; + print TESTFILE "__typeof__ (($type) 0 + ($type) 0) a;\n"; + } else { + print TESTFILE "__typeof__ (($type) 0) a;\n"; + } print TESTFILE "extern __typeof__ ($symbol) a;\n"; close (TESTFILE); -- 2.47.2