This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: GCC C bug: sizeof a union of structs returns zero value
- From: Richard Henderson <rth at redhat dot com>
- To: hugh at xelerance dot com
- Cc: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 17 Dec 2004 01:03:52 -0800
- Subject: Re: GCC C bug: sizeof a union of structs returns zero value
- References: <200412170252.iBH2qZls014673@road.toad.com>
On Thu, Dec 16, 2004 at 06:52:35PM -0800, Hugh Daniel wrote:
> char ccc[ sizeof( union{ struct aaa; struct bbb; })];
In ISO Standard C, this doesn't do what you think it does.
What you are attempting to use is an ill-conceived Microsoft
extension. You can enable *some* amount of support for this
in gcc by using -fms-extensions.
r~