mirror of git://sourceware.org/git/glibc.git
conformtest: Support specifying types before promotion.
This commit is contained in:
parent
aafc49b3fc
commit
ee74b9cbbd
|
@ -1,5 +1,9 @@
|
||||||
2012-05-01 Joseph Myers <joseph@codesourcery.com>
|
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
|
* conform/conformtest.pl: Parse all "constant" and "macro" lines
|
||||||
in one place. Also handle "macro-constant".
|
in one place. Also handle "macro-constant".
|
||||||
|
|
||||||
|
|
|
@ -437,7 +437,12 @@ while ($#headers >= 0) {
|
||||||
open (TESTFILE, ">$fnamebase.c");
|
open (TESTFILE, ">$fnamebase.c");
|
||||||
print TESTFILE "$prepend";
|
print TESTFILE "$prepend";
|
||||||
print TESTFILE "#include <$h>\n";
|
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";
|
print TESTFILE "extern __typeof__ ($symbol) a;\n";
|
||||||
close (TESTFILE);
|
close (TESTFILE);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue