Bug#211661: gcc-3.3: With -std=c99, the NAN and INFINITY macros are not regarded as constants
Hi,
It seems that your message didn't arrive at (or wasn-t accepted by) the
BTS, as seen on <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=211661>.
Perhaps because glibc isn't a package (only a source package). It should
have been libc6-dev perhaps?
On 2003-09-30 00:00:47 +0200, Matthias Klose wrote:
> reassign glibc
> thanks
>
> isn't this a glibc issue, where NAN is defined?
Perhaps, but the definition of NAN in /usr/include/bits/nan.h
uses a gcc extension:
# define NAN \
(__extension__ \
((union { unsigned __l __attribute__((__mode__(__SI__))); float __d; }) \
{ __l: 0x7fc00000UL }).__d)
0x7fc00000UL is a constant, and as here x.__d depends only on
x.__l, x.__d could be regarded as a constant (note that there
is no intermediate variable or whatever). This would be quite
logical. But I don't know how such extensions are specified.
BTW, the code is also a bit strange: __l is defined as an unsigned
(= unsigned int), but 0x7fc00000UL is an unsigned long (this one
is a glibc problem).
--
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/> - 100%
validated (X)HTML - Acorn Risc PC, Yellow Pig 17, Championnat International
des Jeux Mathématiques et Logiques, TETRHEX, etc.
Work: CR INRIA - computer arithmetic / SPACES project at LORIA
Reply to: