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]

Re: GCC C bug: sizeof a union of structs returns zero value


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~


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