This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

conformtest: Fix namespace testing

It turns out that my commit

commit 1b8f2850d8c95619598241e91a7249bba5775be1
Author: Joseph Myers <>
Date:   Tue May 1 19:59:47 2012 +0000

    conformtest: Always pass C standards options to compiler.

effectively disabled the checking for headers using symbols outside
the permitted namespace, when removing the whitelisting for particular
symbols predefined by the compiler.

This patch fixes this, along with problems shown up by this change
that were in conformtest itself or the internal include/ headers.  It
remains the case after this patch that ISO, ISO99, ISO11 and POSIX
tests have clean results given a suitable compiler version (at least
for POSIX this partly reflects inaccuracy in the expectations rather
than the headers actually being fully correct for POSIX (1996)) and
the other versions have some failures.  The namespace failures I
spot-checked for other versions looked like conformtest accurately
reflecting the expectations, whether or not those expectations are
correct for those standard versions.

Tested x86_64.

2013-08-29  Joseph Myers  <>

	* conform/ (newtoken): Treat tokens not allowed as
	(top level): Treat second token from macro or constant entries for
	allowed headers as allowed.
	* include/complex.h: Condition internal declarations on
	* include/fenv.h: Condition include of <stdbool.h> and internal
	declarations on [!_ISOMAC].

diff --git a/conform/ b/conform/
index ec2e9c3..8b97d0d 100644
--- a/conform/
+++ b/conform/
@@ -236,6 +236,8 @@ sub newtoken {
   for ($idx = 0; $idx <= $#allow; ++$idx) {
     return if (poorfnmatch ($allow[$idx], $token));
+  $errors{$token} = 1;
@@ -786,7 +788,7 @@ while ($#headers >= 0) {
       if (/^element *({([^}]*)}|([^ ]*)) *({([^}]*)}|([^ ]*)) *([A-Za-z0-9_]*) *(.*)/) {
 	push @allow, $7;
       } elsif (/^(macro|constant|macro-constant|macro-int-constant) +([a-zA-Z0-9_]*) *(?:{([^}]*)} *)?(?:([>=<!]+) ([A-Za-z0-9_-]*))?/) {
-	push @allow, $1;
+	push @allow, $2;
       } elsif (/^(type|tag) *({([^}]*)|([a-zA-Z0-9_]*))/) {
 	my($type) = "$3$4";
diff --git a/include/complex.h b/include/complex.h
index e173f1f..082e71f 100644
--- a/include/complex.h
+++ b/include/complex.h
@@ -1,11 +1,13 @@
 #ifndef _COMPLEX_H
 # include <math/complex.h>
+# ifndef _ISOMAC
 /* Return the complex inverse hyperbolic sine of finite nonzero Z,
    with the imaginary part of the result subtracted from pi/2 if ADJ
    is nonzero.  */
 extern complex float __kernel_casinhf (complex float z, int adj);
 extern complex double __kernel_casinh (complex double z, int adj);
 extern complex long double __kernel_casinhl (complex long double z, int adj);
+# endif
diff --git a/include/fenv.h b/include/fenv.h
index 9f90d17..925d4b5 100644
--- a/include/fenv.h
+++ b/include/fenv.h
@@ -1,8 +1,8 @@
 #ifndef _FENV_H
 #include <math/fenv.h>
-#include <stdbool.h>
 #ifndef _ISOMAC
+# include <stdbool.h>
 /* Now define the internal interfaces.  */
 extern int __feclearexcept (int __excepts);
@@ -22,7 +22,6 @@ libm_hidden_proto (feholdexcept)
 libm_hidden_proto (feupdateenv)
 libm_hidden_proto (fetestexcept)
 libm_hidden_proto (feclearexcept)
 /* Rounding mode context.  This allows functions to set/restore rounding mode
    only when the desired rounding mode is different from the current rounding
@@ -32,5 +31,6 @@ struct rm_ctx
   fenv_t env;
   bool updated_status;

Joseph S. Myers

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]