Title
Use of signed in bit-field declarations
Status
cd1
Section
9.2.9.3 [dcl.type.simple]
Submitter
comp.std.c++

Created on 2005-04-25.00:00:00 last changed 196 months ago

Messages

Date: 2006-10-15.00:00:00

[Voted into WP at the October, 2006 meeting.]

Date: 2005-10-15.00:00:00

Proposed resolution (October, 2005):

Change 9.2.9.3 [dcl.type.simple] paragraph 3 as indicated:

When multiple simple-type-specifiers are allowed, they can be freely intermixed with other decl-specifiers in any order. [Note: It is implementation-defined whether bit-fields and objects of char type and certain bit-fields (11.4.10 [class.bit]) are represented as signed or unsigned quantities. The signed specifier forces bit-fields and char objects and bit-fields to be signed; it is redundant with other integral types in other contexts. end note]
Date: 2005-04-25.00:00:00

9.2.9.3 [dcl.type.simple] paragraph 3 reads,

It is implementation-defined whether bit-fields and objects of char type are represented as signed or unsigned quantities. The signed specifier forces char objects and bit-fields to be signed; it is redundant with other integral types.

The last sentence in that quote is misleading w.r.t. bit-fields. The first sentence in that quote is correct but incomplete.

Proposed fix: change the two sentences to read:

It is implementation-defined whether objects of char type are represented as signed or unsigned quantities. The signed specifier forces char objects signed; it is redundant with other integral types except when declaring bit-fields (11.4.10 [class.bit]).
History
Date User Action Args
2008-10-05 00:00:00adminsetstatus: wp -> cd1
2007-05-06 00:00:00adminsetstatus: dr -> wp
2006-11-05 00:00:00adminsetmessages: + msg1435
2006-11-05 00:00:00adminsetstatus: ready -> dr
2006-04-22 00:00:00adminsetstatus: review -> ready
2005-10-22 00:00:00adminsetmessages: + msg1236
2005-10-22 00:00:00adminsetstatus: open -> review
2005-04-25 00:00:00admincreate