conformtest: Support specifying types before promotion.
authorJoseph Myers <joseph@codesourcery.com>
Tue, 1 May 2012 20:03:15 +0000 (20:03 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Tue, 1 May 2012 20:03:15 +0000 (20:03 +0000)
ChangeLog
conform/conformtest.pl

index 8b89cd9a29a7c71fdbc8d1e413dd6cdc2e54381f..72a5f274a294fcf807c32d4cbe5549df1e08e7ab 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2012-05-01  Joseph Myers  <joseph@codesourcery.com>
 
+       * 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".
 
index f5860ac13974eeaa7319146f6bc943bb5794ab03..2d8cfd703c0ab4372372b0fcbcd5a79b386c11c8 100644 (file)
@@ -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);