This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Size of basic types



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]