This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [Itai Nahshon <nahshon@actcom.co.il>] RedHat-6.0 fails to compile with -ansi -pedantic


>>>>> Roland McGrath writes:

Roland> I'm not positive, but I think that using __extension__ here (after the =)
Roland> would silence the warnings.  But it's no real loss to just use plain C
Roland> syntax there as the patch you forwarded does.

I tried to add __extension__ and didn't succeed - instead I got a
bunch of errors.  Can you check this yourself, please?

Here's again the problematic definition - and a patch to silent 
-ansi -pedantic -O2 (but gcc produces worse code with this):
 __MATH_INLINE int
 __signbitf (float __x)
 {
-   union { float __f; int __i; } __u = { __f: __x }; return __u.__i < 0;
+  union { float __f; int __i; } __u; __u.__f = __x; return __u.__i < 0;
 }

Thanks,
Andreas

-- 
 Andreas Jaeger   aj@arthur.rhein-neckar.de    jaeger@informatik.uni-kl.de
  for pgp-key finger ajaeger@aixd1.rhrk.uni-kl.de

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]