This is the mail archive of the 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: [RFC] [C++ ABI] support non-standard integer types in mangle.c

"Markus F.X.J. Oberhumer" <> 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));


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