This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: C ABI: struct/union inconsistency
Richard Henderson <rth@redhat.com> writes:
[...]
| > That means we lose C/C++ compatibility even for a type which is in
| > the common subset of both languages.
|
| Compatibility between C and C++ is interesting from a data sharing
| standpoint. Empty classes contain no data to be shared, ergo are
| not interesting.
The point is that do we really want
struct S s[190];
assert (s != s + 189);
have different behaviour in that common subset.
I think we should retain objects' identities the same in that common
subset.
-- Gaby