-
Notifications
You must be signed in to change notification settings - Fork 8
Description
Full name of submitter (unless configured in github; will be published with the issue): Jay Ghiron
Reference (section label): [conv.rank]/1
Issue description:
The first rule defining that no two signed integer types have the same conversion rank says that char is a signed integer type:
No two signed integer types other than char and signed char (if char is signed) have the same rank, even if they have the same representation.
However, char is never a signed integer type even if it is signed. Even if it was a signed integer type, wchar_t can be signed too so it should be mentioned too.
The rule defining the conversion rank of bool allows it to have a greater rank than extended integer types, even those with a width greater than one.
The rank of bool is less than the rank of all standard integer types.
It seems unintended to allow this as a possibility. C has adjusted its wording recently to require bool have the lowest conversion rank, see N3747.
Suggested resolution:
Modify [conv.rank]/1.1:
No two signed integer types
other than char and signed char (if char is signed)have the same rank, even if they have the same representation.
Modify [conv.rank]/1.7:
The rank of bool is less than the rank of all
standardother integer types.
Add a new footnote which is linked to at the end of [conv.rank]/1.1:
char and wchar_t are not signed integer types, even if they are signed.