Liste des Groupes | Revenir à cl c |
On 4/4/24 09:15, Janis Papanagnou wrote:
...Since I remember C had always just defined a '<=' (or '>=') relation
between the unsized basic integral data types.
There's several things not quite right about the form of that
sentence, so I'm not quite sure what you meant to say, but C
originally defined the relational operators for any arithmetic type
(and for pointers to compatible object types), including the unsigned
types..
Some complications have been added since then. When extended integer
types and _Bool were added, the definitions were adjusted so that the
integer promotion rules apply to _Bool, and extended integer types are
included along with other integer types. When _Complex and _Imaginary
were added, the operands to the relational operators were explicitly
required to be real (which, as C defines the term, includes all
integer types). When decimal floating types were introduced, they
added a prohibition on comparing such values with values that had a
standard floating types. However, nothing matching the restrictions
you imply has ever been true.
Les messages affichés proviennent d'usenet.