This is the mail archive of the
mailing list for the GCC project.
Re: [RFC] [C++ ABI] support non-standard integer types in mangle.c
- From: Geoffrey Keating <geoffk at geoffk dot org>
- To: "Markus F.X.J. Oberhumer" <markus at oberhumer dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: 03 Mar 2005 15:49:18 -0800
- Subject: Re: [RFC] [C++ ABI] support non-standard integer types in mangle.c
- References: <4226377B.email@example.com>
"Markus F.X.J. Oberhumer" <firstname.lastname@example.org> writes:
> The patch below tries to address some limitations in cp/mangle.c when using
> non-standard, non-supported or otherwise deprecated size-type options.
> This patch enhances but does not change the existing C++ ABI - current
> gcc versions just abort with an ICE.
> Quoting from the patch:
> /* Allow for cases where TYPE is not one of the shared
> integer type nodes and write a "vendor extended builtin
> type" with the name __cxa_int16, __cxa_uint16,
> __cxa_int32, __cxa_uint32, __cxa_int64 or
> __cxa_uint64, respectively.
> Siutations like this can happen if you have an
> __attribute__((__mode__(__SI__))) type and use exotic
> switches like '-mint64' on MIPS or '-mint8' on AVR.
> Of course, this is undefined by the C++ ABI (and
> '-mint8' is not even Standard C conforming), but when
> using such special options you're pretty much in nowhere
> land anyway.
> [previous versions of gcc just used to abort with an ICE if
> the precision was not 128]
> I'm using this for quite some time on experimental ILP64 and SILP64
> gcc versions on AMD64 and PPC64. Comments?
Instead of a switch statement, why not something like
sprintf (name, "__cxa_int%d", TYPE_PRECISION (type));