This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Fix optimization regression in constant folder
> I don't see a reason that sizetype has to match size_t.
I'm not sure I correctly remember what the original reason for that
is, but the one that I'm aware of is this: it can't be smaller than
size_t because then you can't represent all sizes that are valid in
the language (which is what the range of size_t is supposed to mean).
But if it's larger than size_t, you are doing run-time calculations in
a wider mode and that's (usually) less efficient. Since it can't be
smaller and shouldn't be wider, it has to be the same size.