This is the mail archive of the gcc@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: bug in GCC or C++ standard ?


On 11/12/08, René Bürgel <r.buergel@unicontrol.de> wrote:
> Mark Tall schrieb:
> > On 12/11/2008, René Bürgel <r.buergel@unicontrol.de> wrote:
> > > If all members of the union are const, why don't you just
> > > make the union itself const?
> >
> > The const for the union seems to be ignored
>
> I'd say, that's the real bug, at least from my point of view. I
> don't know, if this case is handled in the standard, but as
> "const union" is declaration and definition the const shouldn't
> be ignored.

I doubt that the C++ committee has ever addressed this issue.
The general thinking would be "if you cannot change fields, you
don't need the union".  I see why the approach was taken.

The C++ draft standard is in review now.  If you have specific
recommendations, now would be a good time to forward them as
comments to your national representative to ISO.

-- 
Lawrence Crowl


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