> common base.  Consider &s.c[1] and &s + i, obviously the accesses can
> overlap - would you still say so if the base address of the first one
> would be &s.c[0]?

Yes, in the case &s.c[1] versus &s.c[0], we still have to consider the
arrays to potentially overlap.

> (really the base address of a non-variable access is the access
> itself, right?  &s.c[1] in this case)

No, it cannot be &s.c[1] here.  The base object for arrays in structs
should be the struct itself.

The base address tells you what memory object is accessed with an
offset.  For structs, you are allowed to access any of their contents
using arithmetic.  For instance in:

struct s {
  int a[2];
  int c[20];
}

you could access s.c[10] from the address of struct s with: &s.a + 12.

Reply via email to