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/13146] inheritance for nonoverlapping_component_refs_p



------- Comment #12 from rguenth at gcc dot gnu dot org  2009-01-17 12:58 -------
Note that we have to be very careful here because

struct X {
  int i;
};
struct A {
  int i;
};
struct B {
  struct A a;
  int j;
};

int foo (struct X *p, struct B *q)
{
  p->i = 0;
  q->a.i = 1;
  return p->i;
}

may be aliasing.  One need to consult the C standard and defect reports again
for the "common initial sequence" in structs stuff.


-- 


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


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