AaronBallman wrote:

> That is not possible, and this is exactly what I'm worried about with all 
> this discussion about making `size_t` more "built-in". `size_t` is specified 
> to be a typedef of a (platform-dependent) standard integer type, and it needs 
> to continue to behave that way; we cannot actually make it a different type, 
> no matter how much cleaner we personally think the language would be if it 
> were. That is not fundamentally changed by the committee adding the `%z` 
> format specifier or `19z` literals or anything like that.

Er, I feel like I must be missing something, because I think we can do this. 
`size_t` is defined to be an implementation-defined unsigned integer type. It 
is *not* required to be defined to `unsigned int` or `unsigned long`, etc 
explicitly, or even a standard integer type at all. So I think we can define it 
to be `__size_t`, so long as that type is compatible with the platform-specific 
underlying type.

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