26_numerics/c99_classification_macros_c.cc

Jim Wilson wilson@tuliptree.org
Sat Jun 14 21:48:00 GMT 2003


Some useful history can be found by using cvs log to see when the file 
was changed, and then finding the patches on the gcc-patches mailing list.

An interesting patch is here:
http://gcc.gnu.org/ml/gcc-patches/2003-03/msg00699.html

Unforutately, it is lacking details about exactly why the change was 
made, but we can guess that we were getting cascading errors, and thus a 
single dg-error line was not sufficient.  We would get cascading errors 
if fpclassify was defined as a macro in math.h, and indeed it is on my 
system.  I offer no opinion on whether math.h or libstdc++ is wrong.  I 
haven't bothered to check any standards.

I have RHL 8.  I apparently have glibc-2.3.2 plus RH patches.

On my system, I get:

[wilson@leaf gcc]$ ./xgcc -B./ tmp.cc
tmp.cc:35: error: expected unqualified-id
tmp.cc:35: error: expected `)'
tmp.cc:35: error: expected `,' or `;'
tmp.cc:37: error: expected unqualified-id
tmp.cc:37: error: expected `)'
tmp.cc:37: error: expected `,' or `;'
tmp.cc:39: error: expected unqualified-id
tmp.cc:39: error: expected `)'
tmp.cc:39: error: expected `,' or `;'
tmp.cc:41: error: expected unqualified-id
tmp.cc:41: error: expected `)'
tmp.cc:41: error: expected `,' or `;'
tmp.cc:43: error: expected unqualified-id
tmp.cc:43: error: expected `)'
tmp.cc:43: error: expected `)'
tmp.cc:43: error: expected `,' or `;'
tmp.cc:45: error: expected unqualified-id
tmp.cc:45: error: expected `)'
tmp.cc:45: error: expected `,' or `;'
tmp.cc:47:16: macro "isgreater" requires 2 arguments, but only 1 given
tmp.cc:47: error: invalid function declaration
tmp.cc:49:21: macro "isgreaterequal" requires 2 arguments, but only 1 given
tmp.cc:49: error: invalid function declaration
tmp.cc:51:13: macro "isless" requires 2 arguments, but only 1 given
tmp.cc:51: error: invalid function declaration
tmp.cc:53:18: macro "islessequal" requires 2 arguments, but only 1 given
tmp.cc:53: error: invalid function declaration
tmp.cc:55:20: macro "islessgreater" requires 2 arguments, but only 1 given
tmp.cc:55: error: invalid function declaration
tmp.cc:57:18: macro "isunordered" requires 2 arguments, but only 1 given
tmp.cc:57: error: invalid function declaration

Jim



More information about the Gcc mailing list