[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [csmith-dev] int8_t usage

On Thu, Sep 8, 2011 at 10:49 AM, John Regehr <regehr@cs.utah.edu> wrote:
>> That would be 16 bit. :) I know, it's a pretty wierd arch!
> Is this a conforming C implementation?  I thought it was required that int
> is larger than char.

FYI, nope, it's only required that int be *at least as large* as
signed char.  I remember this from my comp.lang.c days. ;)  This can
cause huge problems with code that reads binary files, since you can
no longer distinguish EOF from a valid 'char' value, but hey, that's
why feof() exists.

Paulo's setup doesn't totally surprise me. I've heard rumors of DSPs
where char is 32 bits (and so is short and int and presumably long),
although I couldn't actually name any such platform if you pressed me.