Re: isnan() with gcc 3.2.2 on FreeBSD 5.0-C

2003-03-31 Thread David Leimbach
On Monday, March 31, 2003, at 02:49 AM, Stefan Farfeleder wrote:

The isnan() macro is a new feature of C99 and thus not (yet) part of
C++.  Nevertheless you can use -D_GLIBCPP_USE_C99 to include this and
There may be no guarantee that any new parts of C99 ever make it into 
the C++
language.

C++ has always been a superset of a subset of C :).  That is to say 
that C is not
100% contained within C++.

This has gotten to be more of a problem since
the C99 standard has added things the C++ already had as well such as
_Complex and the very weird tgmath.h header that seemingly cannot even 
be
written with standard C. [I have seen the version that came with RedHat 
linux and
it involved a bunch of gcc specific code].

Anyway... Its a real world problem now and the errors people are seeing 
are due to
the fact that g++-3.x is more standards compliant than 2.x was.

Dave

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: isnan() with gcc 3.2.2 on FreeBSD 5.0-C

2003-03-31 Thread Stefan Farfeleder
On Mon, Mar 31, 2003 at 02:46:05PM +0800, Ying-Chieh Liao wrote:
> the following code snippet works fine with gcc 2.95.4 on RELENG_4
> but failed on my -current
> 
> 
> #include 
> #include 
> 
> using namespace std;
> 
> int main(void)
> {
> cout << isnan(1.0) << endl;
> return 0;
> }
> 
> 
> 
> test.cpp: In function `int main()':
> test.cpp:8: `isnan' undeclared (first use this function)
> test.cpp:8: (Each undeclared identifier is reported only once for each function
>it appears in.)
> 
> 
> what's wrong with my system ? or what can I do for it ?

The isnan() macro is a new feature of C99 and thus not (yet) part of
C++.  Nevertheless you can use -D_GLIBCPP_USE_C99 to include this and
some other non-standard C++ features.

Regards,
Stefan Farfeleder
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: isnan() with gcc 3.2.2 on FreeBSD 5.0-C

2003-03-31 Thread Kris Kennaway
On Mon, Mar 31, 2003 at 02:46:05PM +0800, Ying-Chieh Liao wrote:

> what's wrong with my system ? or what can I do for it ?

See

Message-ID: <[EMAIL PROTECTED]>

Kris


pgp0.pgp
Description: PGP signature


isnan() with gcc 3.2.2 on FreeBSD 5.0-C

2003-03-30 Thread Ying-Chieh Liao
the following code snippet works fine with gcc 2.95.4 on RELENG_4
but failed on my -current


#include 
#include 

using namespace std;

int main(void)
{
cout << isnan(1.0) << endl;
return 0;
}



test.cpp: In function `int main()':
test.cpp:8: `isnan' undeclared (first use this function)
test.cpp:8: (Each undeclared identifier is reported only once for each function
   it appears in.)


what's wrong with my system ? or what can I do for it ?
-- 
int i;main(){for(;i["]

pgp0.pgp
Description: PGP signature