(unsigned long) (short)
does really mean:
(unsigned long) (unsigned short) (short)
or
(unsigned long) (long) (short)
?
Dm.
--
Dm. Vasilev | "Free cheese can be found only in a mouse trap"
dmi...@aqm.com | <disclaimer.std> : QMS may not agree
(unsigned long) (long) (short) -- sometimes. ANSI Classic section
3.2.1.2, page 35 lines 21 to 27: "When a value with integral type is
converted to another integral type, if the value can be represented by
the new type, its value is unchanged. When a signed integer is converted
to an unsigned integer with equal or greater size, if the value of the
signed integer is nonnegative, its value is unchanged. Otherwise: if
the unsigned integer has greater size, the signed integer is first promoted
to the signed integer corresponding to the unsigned integer corresponding
to the unsigned integer; the value is converted to unsigned by adding to
it one greater than the largest number that can be represented in the
unsigned integer type."
--
<< If this were the company's opinion, I would not be allowed to post it. >>
A program in conformance will not tend to stay in conformance, because even if
it doesn't change, the standard will. Force = program size * destruction.
Every technical corrigendum is met by an equally troublesome new defect report.
The latter.
|>
|> ?
|>
|> Dm.
|> --
|> Dm. Vasilev | "Free cheese can be found only in a mouse trap"
|> dmi...@aqm.com | <disclaimer.std> : QMS may not agree
--
Chris Volpe
G.E. Corporate R&D
vol...@crd.ge.com