Public Comment Number PC-UK0025 ISO/IEC CD 9899 (SC22N2620) Public Comment =========================================== Date: 1998-01-03 Author: Clive D.W. Feather Author Affiliation: Self Postal Address: Demon Internet Limited 322 Regents Park Road London N3 2QQ United Kingdom E-mail Address: Telephone Number: +44 181 371 1138 Fax Number: +44 181 371 1037 Number of individual comments: 1 Comment 1. Category: Editorial change/non-normative contribution Committee Draft subsection: 6.1.3.2 Title: clarify the explanation of the types of an integer constant Detailed description: 6.1.3.2p5 is rather difficult to read. Better would be to replace it with a table, like this: The type of an integer constant is the first one marked with an X in the corresponding column of the table in which its value can be represented: Suffix: - - U L L LU LL LL LLU Base: D O/H - D O/H - D O/H - signed int X X unsigned int X X signed long X X X X unsigned long X X X X signed long long X X X X X X unsigned long long X X X X X X /signed extended/ X X X /unsigned extended/ X X X /any extended/ X X X Notes: suffixes may be in either case, and where there are two suffixes, in either order. D = decimal O/H = octal or hexadecimal If an integer constant cannot be represented by any standard type in its list, it may be represented by an extended integer type if there is one that can represent that value. The type must be signed or unsigned if so indicated. Alternatively, the ad hoc nature of the present description could be replaced by one more structured: The type of an integer constant is the first one in the following list in which its value can be represented: /signed int/, /unsigned int/, /signed long int/, /unsigned long int/, /signed long long int/, /unsigned long long int/ and subject to the following restrictions: - if suffixed by /u/ or /U/, then omit the signed types - if decimal and not suffixed by /u/ or /U/, then omit the unsigned types - if suffixed by /l/ or /L/, then omit the first pair - if suffixed by /ll/ or /LL/, then omit the first two pairs If an integer constant cannot be represented by any of the types permitted by the above, it may be represented by an extended integer type if there is one that can represent that value and which has the same signedness as at least one of the permitted standard types.