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: Undefined behavior due to 6.5.16.1p3


On Wed, Mar 11, 2015 at 05:31:01PM +0100, Vincent Lefevre wrote:
> > (in C only one union member can be active at any time,
> > we as extension allow type punning through unions etc.)
> 
> I disagree that it is an extension. The standard does not say
> that "one union member can be active at any time".

That is not a standard wording, but what I meant is
6.2.6.1p7 - that when you store some union member other union members take
unspecified values.

	Jakub


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