From owner-freebsd-questions@FreeBSD.ORG Fri May 19 15:08:49 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D869516A4D4 for ; Fri, 19 May 2006 15:08:49 +0000 (UTC) (envelope-from ml@netfence.it) Received: from parrot.aev.net (parrot.aev.net [212.31.247.179]) by mx1.FreeBSD.org (Postfix) with ESMTP id BBDCD43D5E for ; Fri, 19 May 2006 15:08:42 +0000 (GMT) (envelope-from ml@netfence.it) Received: from soth.ventu (adsl-ull-95-215.51-151.net24.it [151.51.215.95]) (authenticated bits=128) by parrot.aev.net (8.13.6/8.13.6) with ESMTP id k4JFCqsW022111 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 19 May 2006 17:12:58 +0200 (CEST) (envelope-from ml@netfence.it) Received: from [10.1.2.18] (alamar.ventu [10.1.2.18]) by soth.ventu (8.13.6/8.13.3) with ESMTP id k4JF7vQE001763 for ; Fri, 19 May 2006 17:07:57 +0200 (CEST) (envelope-from ml@netfence.it) Message-ID: <446DDF62.4090304@netfence.it> Date: Fri, 19 May 2006 17:08:18 +0200 From: Andrea Venturoli User-Agent: Thunderbird 1.5.0.2 (X11/20060423) MIME-Version: 1.0 To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.53 on 212.31.247.179 Subject: Loop in cmath X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2006 15:08:57 -0000 Hello. This is on a 5.4p13 i386 box; from /usr/include/c++/3.4/cmath: ... #if _GLIBCXX_USE_C99_MATH #if !_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC namespace __gnu_cxx { ... template int __capture_isnan(_Tp __f) { return isnan(__f); } ... } ... #undef isnan ... #endif /* _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC */ #endif #if _GLIBCXX_USE_C99_MATH #if !_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC namespace __gnu_cxx { ... template int isnan(_Tp __f) { return __capture_isnan(__f); } ... } namespace std { ... using __gnu_cxx::isnan; } #endif /* _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC */ #endif This results in any call to std::isnan looping thorugh the two above functions. Is this a bug? Should any macro be defined to avoid this? bye & Thanks av.