defining big types on avr-gcc

Andrew Haley aph@redhat.com
Tue Aug 3 16:34:00 GMT 2010


On 08/03/2010 05:15 PM, Massimiliano Cialdi wrote:
> Il giorno mar, 03/08/2010 alle 17.03 +0100, Andrew Haley ha scritto:
> 
>> I don't think it is.  gcc uses ssize_t (or, to be precise, a signed
>> integer type based on sizetype) internally when constructing the size
>> of an array.  Given that array offsets can be negative or positive.
>> this seems reasonable enough.
> I get the same warning also if I cast to size_t:
> 
> size_t p = (size_t)&(((big_dummy_t*)0)->singledata);
> 
> Is reasonable to think that that offset could be negative, but I obtain
> that warning also if I write:
> 
> dummy_t *p;
> p = &(((big_dummy_t*)0)->singledata);

That's right: gcc uses ssize_t internally.

> there is no way to "force" gcc to use 32bit integer?

Not with the ABI you're using, no.  gcc doesn't decide how big sizetype
is.

Andrew.



More information about the Gcc-help mailing list