This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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]

Re: Patch to xfail c99_classification_macros_c.cc on *-*-linux*


On Sat, 9 Sep 2005, Ian Lance Taylor wrote:

> > 	* testsuite/26_numerics/cmath/c99_classification_macros_c.cc:
> > 	XFAIL on *-*-linux*, not *-*-linux-gnu.
> 
> Perhaps I should mention that this test passes for me on Fedora Core
> 4?  I haven't bothered to investigate it.  Configuration triplet is
> i686-pc-linux-gnu, kernel is 2.6.12-1.1387_FC4, glibc is 2.3.5-10.

This test passes or fails depending on such factors as whether it is built 
using PCH and whether the testing is done in the build tree or with an 
installed toolchain (which can affect whether PCH is used).  I don't think 
any version of glibc or libstdc++ has a reliable fix (ensuring that 
#include <math.h> does not result in definitions of the problem macros as 
macros for C++), but if you preinclude the PCH for stdc++.h then that 
includes <cmath> which includes <math.h> and then undefines the macros, so 
the include of <math.h> in the testcase itself then does nothing and the 
test passes.

-- 
Joseph S. Myers               http://www.srcf.ucam.org/~jsm28/gcc/
    jsm@polyomino.org.uk (personal mail)
    joseph@codesourcery.com (CodeSourcery mail)
    jsm28@gcc.gnu.org (Bugzilla assignments and CCs)


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