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]

[Bug c/74751] gcc can't generate correct code


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=74751

xujian <jeanerpp at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |CLOSED

--- Comment #3 from xujian <jeanerpp at gmail dot com> ---
(In reply to Jakub Jelinek from comment #2)
> This is invalid, violates C aliasing rules.
> If you don't want to change your code, you can use -fno-strict-aliasing,
> otherwise e.g. replace the bogus ShortCopy with memcpy?

Thanks a lot!
"-fno-strict-aliasing" can solve our issue.
It is so tricky since different version of gcc behaviour differently regarding
this issue. We used 3.4.6/4.4.7 before, and did not encouter this.

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