Date: Mon, 31 Mar 2003 10:49:35 +0200 From: Stefan Farfeleder <stefan@fafoe.dyndns.org> To: Ying-Chieh Liao <ijliao@FreeBSD.org> Cc: current@FreeBSD.org Subject: Re: isnan() with gcc 3.2.2 on FreeBSD 5.0-C Message-ID: <20030331084936.1F1393FA9@fafoe.dyndns.org> In-Reply-To: <20030331064605.GA42030@terry.dragon2.net> References: <20030331064605.GA42030@terry.dragon2.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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 > > <code> > #include <iostream> > #include <cmath> > > using namespace std; > > int main(void) > { > cout << isnan(1.0) << endl; > return 0; > } > </code> > > <err> > 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.) > </err> > > 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030331084936.1F1393FA9>