Undefined behavior in 950605-1.c

Richard Henderson rth@redhat.com
Thu Jul 25 13:25:00 GMT 2002


On Thu, Jul 25, 2002 at 03:22:46PM +0300, Momchil Velikov wrote:
> Alan> Ah, but what is the promoted type of "unsigned char"?  int!

Except if sizeof(char) == sizeof(int).

> Isn't that the case with architectures
> with a definition of PROMOTE_MODE, which does not change UNSIGNEDP or
> sets it to 1, e.g, ARM, PPC, V850 ?

PROMOTE_MODE has nothing to do with C types.  It's for efficiency
in the generated rtl *only*.  If a strictly conforming program can
notice the existance of PROMOTE_MODE, there is a bug.


r~



More information about the Gcc mailing list