[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Making yyGLRStackItem know its type
From: |
Paul Eggert |
Subject: |
Re: Making yyGLRStackItem know its type |
Date: |
Thu, 10 Nov 2005 13:41:12 -0800 |
User-agent: |
Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) |
Akim Demaille <address@hidden> writes:
> with both cases starting by a Boolean was a bit troublesome. I do
> understand that this allows shorter and simpler names, simple
> assignments, but it is a bit unusual (to my eyes). Could it be also
> to optimize in some way to size of the union?
In general, yes, because it removes the need for the C compiler to
align the first non-bool member to the strictest alignment of all the
later members. Hence the resulting union might be smaller.
It's common usage and it conforms to the C Standard. Also, if memory
serves (I'm not a C++ expert), C++ caters to this usage as well. If
it's merely a style issue, I'd leave things be.