This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Size of basic types
- From: Zack Weinberg <zack at codesourcery dot com>
- To: Paul Schlie <schlie at comcast dot net>
- Cc: <gcc at gcc dot gnu dot org>
- Date: Fri, 03 Dec 2004 18:47:20 -0800
- Subject: Re: Size of basic types
- References: <BDD51BA3.81E7%schlie@comcast.net>
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