This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Trouble with -pedantic and #include<cmath>, GCC or GLIBC bug?
- From: Volker Reichelt <reichelt at igpm dot rwth-aachen dot de>
- To: ates100 at web dot de
- Cc: gcc at gcc dot gnu dot org, bug-glibc at gnu dot org
- Date: Tue, 12 Aug 2003 18:03:09 +0200 (CEST)
- Subject: Re: Trouble with -pedantic and #include<cmath>, GCC or GLIBC bug?
- Reply-to: Volker Reichelt <reichelt at igpm dot rwth-aachen dot de>
On 12 Aug, Tolga Dalman wrote:
> hi,
>
> On Tue, 12 Aug 2003 17:32:24 +0200 (CEST) Volker Reichelt
> <reichelt@igpm.rwth-aachen.de> wrote:
>
>> This is due to line 385 in GLIBC's mathinline.h:
>>
>> return __temp + __value ?: __x
>>
>> I'm using glibc 2.2.5, but the line is still present in glibc 2.3.2.
>>
>> Since omitting the middle term of a ?: expression is a gcc extension, it's
>> a GCC bug. But since the ISO standard forbids it, it's a GLIBC bug. :-(
>
> apparantly, this has been fixed already:
>
> bits/mathinline.h: 383:
> ...
> __temp -= 1.0; \
> __temp += __value; \
> return __temp ? __temp : __x
> ...
> i'm using gentoo linux / glibc 2.3.2
Maybe it's fixed in the gentoo distribution.
But it's still open in mainline glibc (I just checked the CVS).
But maybe the fix shown above will qualify as a patch. :-)
>> Should this be addressed (i.e. fixed) in GCC or in GLIBC?
>
> i believe, this is a glibc issue.
>
> brg,
> Tolga Dalman
Regards,
Volker