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: Clarification required about bitfields


See the WG14 reflector thread starting with 
<http://www.open-std.org/jtc1/sc22/wg14/13560>, and the reference back to 
the analysis of the textual history in 
<http://www.open-std.org/jtc1/sc22/wg14/11100>.  Effectively, you can 
treat choices in this area as being implementation-defined or unspecified 
(they can only arise when an implementation defines that types other than 
"a qualified or unqualified version of _Bool, signed int, unsigned int" 
can be used to declare bit-fields).

Nothing has ever defined how conversions to store out-of-range values in 
bit-fields (other than _Bool bit-fields) would work for C if an 
implementation defines such a bit-field not to have its own type (whereas 
as noted in DR#120, this all falls out naturally if you treat the type as 
including the width).

-- 
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]