This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: splay-tree.h needs type adjustment for _WIN64.
- From: Kai Tietz <Kai dot Tietz at onevision dot com>
- To: Paolo Bonzini <bonzini at gnu dot org>
- Cc: gcc-patches at gcc dot gnu dot org, Paolo Bonzini <paolo dot bonzini at gmail dot com>
- Date: Thu, 28 Jun 2007 13:40:59 +0200
- Subject: Re: PATCH: splay-tree.h needs type adjustment for _WIN64.
Paolo Bonzini <paolo.bonzini@gmail.com> wrote on 28.06.2007 13:19:16:
>
> > for the support of gcc on native _WIN64 platform it is needed to use
the
> > "long long" as scalar value. On _WIN64 the size of the "long int" type
> > remains 4 bytes wide, but a pointer value is 8 bytes wide.
>
> What size are size_t and ptrdiff_t (well, the latter is signed so it
> doesn't matter in this case, but I'm curious...)? uintptr_t may also be
> useful (see the macro in config/stdint.m4).
The sizes of size_t and ptrdiff_t are 8 bytes (a "long long"). The use of
uintptr_t could be used, but there are targets, where the "long" type has
a bigger size than a pointer (I think it was the m68hc11). But splay needs
the maximum of a "long" and a pointer, not the maximum of an "int" and
pointer. This makes this change necessary.
Cheers,
i.A. Kai Tietz
| (\_/) This is Bunny. Copy and paste Bunny
| (='.'=) into your signature to help him gain
| (")_(") world domination.
------------------------------------------------------------------------------------------
OneVision Software Entwicklungs GmbH & Co. KG
Dr.-Leo-Ritter-StraÃe 9 - 93049 Regensburg
Tel: +49.(0)941.78004.0 - Fax: +49.(0)941.78004.489 - www.OneVision.com
Commerzbank Regensburg - BLZ 750 400 62 - Konto 6011050
Handelsregister: HRA 6744, Amtsgericht Regensburg
KomplementÃrin: OneVision Software Entwicklungs Verwaltungs GmbH
Dr.-Leo-Ritter-StraÃe 9 â 93049 Regensburg
Handelsregister: HRB 8932, Amtsgericht Regensburg - GeschÃftsfÃhrer:
Ulrike DÃhler, Manuela Kluger