[clang] [Clang] Make the result type of sizeof/pointer subtraction/size_t lit… (PR #136542)

Alejandro Colomar via cfe-commits cfe-commits at lists.llvm.org
Wed May 21 04:31:44 PDT 2025


alejandro-colomar wrote:

Hi!

I don't see it mentioned, so I'll note it down here.  The standard allows this:

```c
typedef typeof(sizeof(0))  size_t;
```

as a valid implementation of `size_t`.

It would be good to keep this in mind to not accidentally break it.  (Not saying this would break it; just to be cautious.)

https://github.com/llvm/llvm-project/pull/136542


More information about the cfe-commits mailing list