Size of basic types

Jean-Eric Cuendet jec@rptec.ch
Thu Dec 2 21:04:00 GMT 2004


>>Is it possible to have:
>>int => 32
>>long => 32
>>long long => 64
>>void* => 64
> 
> 
> No.  This will never be supported.

OK, thanks for your quick answer.
But is it possible in GCC to define my custom types.
Saying:
   newtype MyInt [32bits]
or something like that?
I can not do a typedef.

My main problem is that:
On 32bits platform:
   OurBool => int => 32bits
   OurInt  => long => 32bits
   OurLong => long long => 64bits
But in 64 bits:
   OurBool => int => 32bits
   OurInt  => long => 64bits      <=== The problem
   OurLong => long long => 64bits

So I changed OurInt to int instead of long. But then, I have problems 
because we have overloaded methods with OurInt and OurBool, which were 
different in 32bits mode (int and long) but are the same now in 64bits 
(the 2 are int)...
Any idea how to resolve that?

Thanks a lot.
-jec



More information about the Gcc mailing list