[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [csmith-dev] int8_t usage
I can't think of anything would go wrong if you hack stdint.h to make a
8-bit type effectively 16-bit. That's probably your best bet. Tell us if
anything gets broken that way: it's likely Csmith's fault.
On Thu, 08 Sep 2011 11:35:48 -0600, John Regehr <email@example.com>
> Hi Paulo,
> Out of curiosity, what size is a char on your architecture?
> Csmith has no particular requirement about int8_t that I can think of.
> In fact I expect that you could probably hack a header file to typedef
> it to be something totally different.
> As a longer-term solution I believe we should eliminate the use of
> fixed-width types in Csmith output. These served a purpose at one
> point, but (as far as I know) no longer do.
> Probably the right thing is to have a separate flag enabling/disabling
> generation of each native C type: char, unsigned char, signed char,
> short, unsigned short, etc.
> I don't think any of this is hard, but the changes are probably tedious.
> Any thoughts, Xuejun and Yang?
> On 9/8/11 11:06 AM, Paulo J. Matos wrote:
>> I am testing an architecture whose register size is 16. Therefore, we
>> can't represent 8bits and we don't have an int8_t. According to the
>> stdint.h reference an int8_t should represent _exactly_ 8 bits.
>> if it is the case that at least 8 bits should be represented then
>> int_least8_t should be used.
>> My question is as follows, does CSmith require variables whose value is
>> exactly 8bits when it uses int8_t? If not can you please move to
>> int_least8_t? If you really require in some situations int8_t, can you
>> please have an option to disable variables of this type?
>> Paulo Matos
>> Member of the CSR plc group of companies. CSR plc registered in England
>> and Wales, registered number 4187346, registered office Churchill
>> Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United
>> More information can be found at www.csr.com. Follow CSR on Twitter at
>> http://twitter.com/CSR_PLC and read our blog at www.csr.com/blog