------- Comment #1 from rguenth at gcc dot gnu dot org  2009-11-26 09:56 -------
Aliasing rules are indeed broken because you access a union of anonymous type
through a pointer to a union of type ieee_double_extract. 

I think you want

  union { union ieee_double_extract d; unsigned long long i; } x;

  x.d.d = 0.0 / 0.0;
  printf ("d = %g [%llx]\n", x.d.d, x.d.i);
  printf ("exp = %x\n", (unsigned int) x.d.s.exp);
  return 0;

or even simplified.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42179

Reply via email to