From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7095 invoked by alias); 21 Apr 2009 17:28:49 -0000 Received: (qmail 6553 invoked by alias); 21 Apr 2009 17:28:23 -0000 Date: Tue, 21 Apr 2009 17:28:00 -0000 Message-ID: <20090421172823.6552.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug libstdc++/39491] [4.4/4.5 regression] symbol __signbitl@GLIBCXX_3.4 in libstdc++ not exported anymore In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "dave at hiauly1 dot hia dot nrc dot ca" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2009-04/txt/msg01834.txt.bz2 ------- Comment #9 from dave at hiauly1 dot hia dot nrc dot ca 2009-04-21 17:28 ------- Subject: Re: [4.4/4.5 regression] symbol __signbitl@GLIBCXX_3.4 in libstdc++ not exported anymore > > I believe the problem is the symbol was exported when it shouldn't have been. > > How? This is probably because __signbitl is not present in libc and libm. hppa-linux doesn't need __signbitl because sizeof(long double)==sizeof(double). "l" library functions just call __signbit. Thus, I believe that the lack of __signbitl in glibc caused this preoblem. __signbitl doesn't seem to be required by POSIX. However, LSB 2.1 specifies it. If __signbitl should be provided by glibc, then this is a glibc bug. The signbit macro is as follows: /* Return nonzero value if sign of X is negative. */ # ifdef __NO_LONG_DOUBLE_MATH # define signbit(x) \ (sizeof (x) == sizeof (float) ? __signbitf (x) : __signbit (x)) # else # define signbit(x) \ (sizeof (x) == sizeof (float) \ ? __signbitf (x) \ : sizeof (x) == sizeof (double) \ ? __signbit (x) : __signbitl (x)) # endif This will fail if the call to __signbitl isn't optimized away. So, either the macro needs to be fixed, or __signbitl needs to be provided by glibc. The isfinite macro would have the same problem, but in that case glibc provides __finitel. > > The signbit macro is provided by math.h. > > But it's not in the baseline files showing that it is exported. This question > was originally asked here: > > http://gcc.gnu.org/ml/gcc-patches/2008-03/msg00197.html Why should a macro be exported? Dave -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39491