From 9af0bf29de57bccb94db223ff835f1867b74b489 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 1 May 2012 20:04:44 +0000 Subject: [PATCH] conformtest: Use correct keyword set for underlying C standard. --- ChangeLog | 3 +++ conform/conformtest.pl | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index cc86a62..adc2e18 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2012-05-01 Joseph Myers + * conform/conformtest.pl (@keywords): Only include C99 keywords + for standards based on C99 or C11. + * conform/data/iso646.h-data [ISO || POSIX || XPG3 || XPG4]: Disable tests. * conform/data/stdint.h-data [ISO || POSIX || XPG3 || XPG4 || diff --git a/conform/conformtest.pl b/conform/conformtest.pl index 4704deb..018057f 100644 --- a/conform/conformtest.pl +++ b/conform/conformtest.pl @@ -64,12 +64,15 @@ die "unknown standard \"$standard\"" if ($CFLAGS{$standard} eq ""); # $mustprepend{'wordexp.h'} = "#include \n"; # } -# These are the ISO C99 keywords. +# These are the ISO C90 keywords. @keywords = ('auto', 'break', 'case', 'char', 'const', 'continue', 'default', 'do', 'double', 'else', 'enum', 'extern', 'float', 'for', 'goto', - 'if', 'inline', 'int', 'long', 'register', 'restrict', 'return', + 'if', 'int', 'long', 'register', 'return', 'short', 'signed', 'sizeof', 'static', 'struct', 'switch', 'typedef', 'union', 'unsigned', 'void', 'volatile', 'while'); +if ($CFLAGS{$standard} =~ /-std=(c99|c1x)/) { + push (@keywords, 'inline', 'restrict'); +} # Make a hash table from this information. while ($#keywords >= 0) { -- 2.7.4