about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2012-05-01 20:05:14 +0000
committerJoseph Myers <joseph@codesourcery.com>2012-05-01 20:05:14 +0000
commitc9140a622eec9919fd151cfa5d0f751f49dbc8ce (patch)
treefa4482a56e2063a131969d4580879da88f64cdd2
parent9af0bf29de57bccb94db223ff835f1867b74b489 (diff)
downloadglibc-c9140a622eec9919fd151cfa5d0f751f49dbc8ce.tar.gz
glibc-c9140a622eec9919fd151cfa5d0f751f49dbc8ce.tar.xz
glibc-c9140a622eec9919fd151cfa5d0f751f49dbc8ce.zip
conformtest: Check namespace within __attribute__.
-rw-r--r--ChangeLog4
-rw-r--r--conform/conformtest.pl5
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index adc2e18b69..c5eabf180e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2012-05-01  Joseph Myers  <joseph@codesourcery.com>
 
+	* conform/conformtest.pl ($CFLAGS_namespace): Define separately
+	from $CFLAGS, without defining away __attribute__ calls.
+	(checknamespace): Use $CFLAGS_namespace.
+
 	* conform/conformtest.pl (@keywords): Only include C99 keywords
 	for standards based on C99 or C11.
 
diff --git a/conform/conformtest.pl b/conform/conformtest.pl
index 018057f000..d3e41be4cb 100644
--- a/conform/conformtest.pl
+++ b/conform/conformtest.pl
@@ -43,7 +43,8 @@ $CFLAGS{"XOPEN2K"} = "-std=c99 -D_XOPEN_SOURCE=600";
 $CFLAGS{"XOPEN2K8"} = "-std=c99 -D_XOPEN_SOURCE=700";
 $CFLAGS{"POSIX2008"} = "-std=c99 -D_POSIX_C_SOURCE=200809L";
 
-$CFLAGS = "$flags -fno-builtin '-D__attribute__(x)=' $CFLAGS{$standard} -D_ISOMAC";
+$CFLAGS_namespace = "$flags -fno-builtin $CFLAGS{$standard} -D_ISOMAC";
+$CFLAGS = "$CFLAGS_namespace '-D__attribute__(x)='";
 
 # Check standard name for validity.
 die "unknown standard \"$standard\"" if ($CFLAGS{$standard} eq "");
@@ -262,7 +263,7 @@ sub checknamespace {
 
   undef %errors;
   $nknown = 0;
-  open (CONTENT, "$CC $CFLAGS -E $fnamebase.c -P -Wp,-dN | sed -e '/^# [1-9]/d' -e '/^[[:space:]]*\$/d' |");
+  open (CONTENT, "$CC $CFLAGS_namespace -E $fnamebase.c -P -Wp,-dN | sed -e '/^# [1-9]/d' -e '/^[[:space:]]*\$/d' |");
   loop: while (<CONTENT>) {
     chop;
     if (/^#define (.*)/) {