This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: optimization/4922: gcc-3.0.1 and 3.0.2 generate wrong code with -O2


Synopsis: gcc-3.0.1 and 3.0.2 generate wrong code with -O2

State-Changed-From-To: open->closed
State-Changed-By: jakub
State-Changed-When: Thu Feb 21 08:11:12 2002
State-Changed-Why:
    This is not a bug in gcc, but in your code.
    Code like:
        inline UINT16* RowPos() { return (UINT16*) &nAddress; }
        *RowPos() = (UINT16) nRow;
    does not obey aliasing rules (the code is accessing
    nAddress both as 32-bit integer and 16-bit integer).
    Please read info gcc about -fstrict-aliasing.

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


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