rjmccall wrote:

> > At least, it must ensure that `__size_t` is equivalent to `size_t` and 
> > generates the same mangled name.
> 
> Is that possible? @rjmccall

If `size_t` is a different type from `__size_t`, then `void foo(size_t);` 
declares a different entity from `void foo(__size_t);`. The two functions 
therefore must be mangled differently in order to allow them to coexist in the 
program. The same rule applies consistently to template specializations and 
everywhere else a type can be written.

The result is that, no, this is not possible. If you want two types to mangle 
the same way, you are really saying that they are the same type. This is 
relationship between a type and a sugaring of the type, not the relationship 
between two different types that share a representation.

https://github.com/llvm/llvm-project/pull/136542
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to