From owner-freebsd-current@FreeBSD.ORG Mon Mar 31 00:49:39 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0A75D37B401; Mon, 31 Mar 2003 00:49:39 -0800 (PST) Received: from fafoe.dyndns.org (chello212186121237.14.vie.surfer.at [212.186.121.237]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1CF7B43F93; Mon, 31 Mar 2003 00:49:38 -0800 (PST) (envelope-from stefan@fafoe.dyndns.org) Received: from frog.fafoe (frog.fafoe [192.168.2.101]) by fafoe.dyndns.org (Postfix) with ESMTP id 1F1393FA9; Mon, 31 Mar 2003 10:49:36 +0200 (CEST) Received: by frog.fafoe (Postfix, from userid 1001) id 8C106521; Mon, 31 Mar 2003 10:49:35 +0200 (CEST) Date: Mon, 31 Mar 2003 10:49:35 +0200 From: Stefan Farfeleder To: Ying-Chieh Liao Mail-Followup-To: Ying-Chieh Liao , questions@FreeBSD.org, current@FreeBSD.org References: <20030331064605.GA42030@terry.dragon2.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030331064605.GA42030@terry.dragon2.net> User-Agent: Mutt/1.5.4i Message-Id: <20030331084936.1F1393FA9@fafoe.dyndns.org> cc: questions@FreeBSD.org cc: current@FreeBSD.org Subject: Re: isnan() with gcc 3.2.2 on FreeBSD 5.0-C X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Mar 2003 08:49:40 -0000 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