------- Comment #6 from jakub at gcc dot gnu dot org 2008-05-29 14:00 ------- Yeah, or: void *a;
int f0 (long *y) { *y = *(const long *) &a; return 1; } int f1 (long *y) { typedef long __attribute__ ((may_alias)) long_a; *y = *(const long_a *) &a; return 1; } int f2 (long *y) { *y = *(const long *) &a; return 1; } which IMHO should warn in f0 and f2 and not in f1. Stock trunk warns in all 3 cases, with my hack surprisingly it warns only in f0. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36369