[cfe-dev] Addition of new characters for new types in USR generation

Leonard Chan via cfe-dev cfe-dev at lists.llvm.org
Tue May 15 08:02:15 PDT 2018


Hello,

I am in the process of implementing fixed point types in C as part of the
extension proposed in
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1169.pdf. This involves
adding 24 new types and we would like some suggestions on how to approach
reserving USR characters for these types.

Essentially there are 4 different qualities that distinguish these types:
- _Fract v _Accum
- signed v unsigned
- size (short, unspecified, long)
- and saturated v unsaturated

Examples:
signed short _Accum
_Sat unsigned long _Fract

It seems that most alphanumeric characters are already taken. Would it be
fine if I just took up 24 more characters or is there a cleaner solution?
If more than 1 character is allowed to represent one type, this could also
help reduce the number characters taken.

I also see that some types share the same USR character (like Char_U/Char_S
and Float16/Half). What constitutes 2 types having the same USR code?

Thanks,
Leo



More information about the cfe-dev mailing list