[Bug middle-end/36369] [4.3/4.4 Regression] may_alias broken with previous uses of non attributed type in some cases
jakub at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Thu May 29 14:01:00 GMT 2008
------- 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
More information about the Gcc-bugs
mailing list