int i;
void *p=(void *)&i;
gives strict-aliasing warning
 but
int i,*o;
o=&i;
void *p= o;
doesn't give any warning

-- 
           Summary: strict aliasing with temporary variable never gives
                    warnings
           Product: gcc
           Version: 3.3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: varun0005 at gmail dot com
                CC: gcc-bugs at gcc dot gnu dot org


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

Reply via email to