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/34803] wrong code for dereferencing type-punned pointer



------- Comment #2 from pinskia at gcc dot gnu dot org  2008-01-15 22:47 -------

  unsigned char *extptr;

      ((aliasing_u) &extptr)->p = c;


Well you are obviously violating c aliasing rules here.  the warning does not
happen is a different issue.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|wrong code for dereferencing|wrong code for dereferencing
                   |type-punned pointer         |type-punned pointer


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


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