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: How to use _Generic with bit-fields


I wonder if ISO C really ought to have a new Constraint "The controlling 
expression of a generic selection shall not be an expression that 
designates a bit-field member." (so requiring a diagnostic), much like 
such expressions being disallowed in sizeof, to reflect the special nature 
of bit-fields and their types in C.  Or, more weakly, to allow the cbrt 
example, "If the controlling expression of a generic selection is an 
expression that designates a bit-field member, it is unspecified whether 
the type of that expression is considered compatible with any integer 
types named in its generic association list.".

-- 
Joseph S. Myers
joseph@codesourcery.com


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