Defect Report #067
Submission Date: 03 Dec 93
Source: Clive Feather
Item 4 - definitions of types
The terms ``signed integer type,'' ``unsigned integer type,''
and ``integral type'' are defined in subclause 126.96.36.199. The
C Standard also uses the terms ``integer type,'' ``signed
integral type,'' and ``unsigned integral type'' without defining
them. Integer-valued bitfields are also introduced in subclause 6.5.2.
- For each of the following types, which if any of the six categories
above do they belong to?
int : N /* i.e. bitfield of size N /*
signed int : N
unsigned int : N
- For each of these categories, do the const and/or volatile
qualified versions of the types belonging to the category also belong
to the category?
- Can an implementation extension add other types defined by the
C Standard to any of these six categories?
- Can an implementation define other types (e.g. __very long)
which belong to any of these six categories?
- If the answer to (c) or (d), or both, is yes, can size_t
and ptrdiff_t be one of these other types, or must it be a type
in the above list?
a) ``Signed integer type'', ``unsigned integer type'',
and plain ``integer type'' are used interchangeably with ``signed
integral type'', ``unsigned integral type'', and ``integral
type'' in the C Standard. This observation makes it easy to categorize
the types in your list.
b) Yes, see subclause 188.8.131.52.
c) No, the list in the C Standard is meant to be exhaustive. For example,
float cannot be defined as an integer type.
d) No strictly conforming program could contain an instance of such
a type. The treatment of such types is beyond the scope of the C Standard.
e) No, it must be a type in the list. For example, size_t cannot
be defined as unsigned __int24.
Previous Defect Report
< - >
Next Defect Report