This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
26_numerics/c99_classification_macros_c++.cc fails on cygwin
- From: "Billinghurst, David (CRTS)" <David dot Billinghurst at riotinto dot com>
- To: <libstdc++ at gcc dot gnu dot org>
- Date: Sat, 5 Jul 2003 00:59:04 +1000
- Subject: 26_numerics/c99_classification_macros_c++.cc fails on cygwin
Test 26_numerics/c99_classification_macros_c++.cc fails on cygwin.
I have reduced the problem, but don't understand what's happening.
The reduced test case is
#include <cmath>
void fpclassify() { }
which fails with
bug.cc:2: error: expected unqualified-id
bug.cc:2: error: expected `)'
bug.cc:2: error: expected `,' or `;'
bug.cc:2: error: expected unqualified-id
bug.cc:2: error: expected `,' or `;'
###########################################
This can be further reduced to
/* From /usr/include/float.h */
extern int __fpclassifyf (float x);
extern int __fpclassifyd (double x);
#define fpclassify(x) (__extension__ ({__typeof__(x) __x = (x); \
(sizeof (__x) == sizeof (float)) ? __fpclassifyf(__x) : __fpclassifyd(__x);}))
void fpclassify() { }
#############################################
The preprocessed source becomes
void (__extension__ ({__typeof__() __x = (); (sizeof (__x) == sizeof (float)) ? __fpclassifyf(__x) : __fpclassifyd(__x);})) { }