This is the mail archive of the gcc-patches@gcc.gnu.org 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


Geoffrey Keating wrote:
"Markus F.X.J. Oberhumer" <markus@oberhumer.com> writes:
>>
[...]
>>
/* 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.

> [...]

Instead of a switch statement, why not something like


sprintf (name, "__cxa_int%d", TYPE_PRECISION (type));

?

Explicit is better than implicit.


Also note that the length ("u12") of the string has to be encoded, so there still had to be some test (>= 10 && <= 99).

--
Markus Oberhumer, <markus@oberhumer.com>, http://www.oberhumer.com/


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