optimization/4620: Wrong code generated with -O2 for sparc-sun-solaris2.5.1

rth@gcc.gnu.org rth@gcc.gnu.org
Wed Apr 3 00:48:00 GMT 2002


Synopsis: Wrong code generated with -O2 for sparc-sun-solaris2.5.1

State-Changed-From-To: analyzed->closed
State-Changed-By: rth
State-Changed-When: Wed Apr  3 00:41:49 2002
State-Changed-Why:
    Not a bug.
    
      long long lll;
      unsigned *p;
      p = (unsigned *)&lll;
    
    This code violates ISO C aliasing rules (6.5/7).
    With GCC, one can use a union for this, though
    you should note that even that isn't portable.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=4620



More information about the Gcc-bugs mailing list