Unsigned considerations
Chris Torek
chris at trantor.umd.edu
Mon Feb 8 21:02:56 AEST 1988
Speaking of unsigned conversions, unless it has changed recently (which
I doubt), the dpANS says that given
unsigned short u;
... <expression involving u> ...
the type of that part of the expression may be either `int' (signed)
or `unsigned int' (unsigned) depending on the relative ranges of
`int' and `unsigned short'. The expression will be of type `int'
if all unsigned short values (e.g., 0..65535) can be fit into a
signed integer (e.g., on a VAX). The expression will be `unsigned
int' if an integer cannot hold values in 0..65535 (e.g., on a
PDP-11).
This is *not* what is done by current PCC variants, and seems to
me a horrible misfeature.
In-Real-Life: Chris Torek, Univ of MD Computer Science, +1 301 454 7163
(hiding out on trantor.umd.edu until mimsy is reassembled in its new home)
Domain: chris at mimsy.umd.edu Path: not easily reachable
More information about the Comp.lang.c
mailing list