typedef int myint __attribute__((may_alias)); int foo(void *p) { myint *q = (int *)p; return *q; }
gcc -S t.c -Wall -O2 t.c: In function foo: t.c:5: warning: pointer targets in initialization differ in signedness -- Summary: [4.2/4.3/4.4 Regression] Attribute may_alias causes invalid warning Product: gcc Version: 4.4.0 Status: UNCONFIRMED Keywords: diagnostic Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: rguenth at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39464