Size of basic types

Zack Weinberg zack@codesourcery.com
Sat Dec 4 02:47:00 GMT 2004


Paul Schlie wrote:
> > Zack Weinberg writes:
> >>Jean-Eric Cuendet <jec@rptec.ch> writes:
> >> Hi,
> >> I work under 64 bits Linux on AMD64 and GCC 3.4
> >> I have:
> >> int => 32
> >> long => 64
> >> long long => 64
> >> void* => 64
> >>
> >> Is it possible to have:
> >> int => 32
> >> long => 32
> >> long long => 64
> >> void* => 64
> >
> > No.  This will never be supported
> 
> Do you mean GCC can't support the desired type size specification
> for some reason; or that it's not consistent Linux's 64-bit
> kernel/library API type size requirements/assumptions?

I mean primarily that it's not consistent with the amd64-linux
platform ABI and therefore would require a hell of a lot of work to
implement (you'd need e.g. a new C library port) which I do not think
is worth doing.

Secondarily, I consider it an important property of C-as-she-is-spoke
that sizeof(void*) <= sizeof(long), and I do not think GCC should ever
facilitate breaking that property.

zw



More information about the Gcc mailing list