This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: C ABI: struct/union inconsistency
- From: Richard Henderson <rth at redhat dot com>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 27 Sep 2002 10:06:16 -0700
- Subject: Re: C ABI: struct/union inconsistency
- References: <200209252358.g8PNwBG01380@localhost.localdomain>
On Wed, Sep 25, 2002 at 04:58:11PM -0700, Mark Mitchell wrote:
> I also do not know if some piece of code in the Linux
> kernel is going to depend on the current behavior; we might want to
> have a switch for the old behavior.
I think that we should leave structures with no members whatsoever
alone. I think that as shown by the linux kernel code, this is a
useful feature.
I don't care what we do with structures with no named members, but
some unnamed members. As Joseph points out, this is undefined in C.
We might as well match whatever the C++ language requires, simply
for consistency.
r~