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


Mark Mitchell wrote:
Markus F.X.J. Oberhumer wrote:

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).


I agree with Geoff; you should be able to sprintf the name with one statement, and then prepend the length. Look at write_source_name to see how to do it easily.

Furthermore, using "__cxa" as the prefix here is wrong; the "vendor" in this case is "gnu". But, for VECTOR_TYPE, we didn't use even that explicitly, we just did "__vector". I'd suggest here just using "int<precision>" like "U5int32".

I think you mean "u5int32" ?


And should there be some sanity checks (e.g. 1 <= x <= 256), or should just any TYPE_PRECISION get allowed ?

A revised patch along those lines would be OK for 4.1.

I'll prepare a cleaned up version then.


Markus

--
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]