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 middle-end/36369] [4.3/4.4 Regression] may_alias broken with previous uses of non attributed type in some cases



------- 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


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