[GCC-XML] fails to parse __float128 on linux 32-bits, OK in 64-bits

Steve M. Robbins steve at sumost.ca
Sun Dec 18 17:58:40 EST 2011


Hi,

While investigating a build failure (ITK on Debian [1]), I discovered
that fftw3 now uses the GCC extension __float128 for quad precision
arithmetic.  In a nutshell, the following code builds OK using
Debian's GCC 4.6.2-9 on both my amd64 machine and a 32-bit chroot on
the same machine.  Gccxml, however, differs: it parses OK on 64-bits,
but complains when used with the 32-bit compiler.


	int main(int ac, char* av[])
	{
	    /* Modeled on code in fftw3.h, from about line 370 */

	/* __float128 (quad precision) is a gcc extension on i386, x86_64, and ia64
	   for gcc >= 4.6 (compiled in FFTW with --enable-quad-precision) */

	#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) \
	 && (defined(__i386__) || defined(__x86_64__) || defined(__ia64__))
	    typedef __float128 quadcomplex[2];
	#endif

	    return 0;
	}

The 32-bit gccxml invocation produces this output:

	steve at riemann{Testing}gccxml float128.c 
	float128.c: In function 'int main(int, char**)':
	float128.c:13: error: '__float128' does not name a type


Is there an easy solution to this?  I can make gccxml accept this
input by doing:

	steve at riemann{Testing}gccxml -D__float128=double float128.c 

But I'm afraid this will mess up the API of fftw output by gccxml.  Ideas?

Thanks,
-Steve


[1] https://buildd.debian.org/status/fetch.php?pkg=wrapitk-python&arch=i386&ver=3.20.1.2&stamp=1323582679
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: Digital signature
URL: <http://public.kitware.com/pipermail/gccxml/attachments/20111218/db9c0172/attachment.sig>


More information about the gccxml mailing list