This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix optimization regression in constant folder
> Why? I understand that's usually the way it is, but (to my knowledge)
> nothing in C says that I can't have a 16-bit address space and a 32-bit
> size_t. Why should DECL_SIZE be a 32-bit type in that case? Anyhow,
> that's probably an academic question; in practice, they are the same.
It seems quite natural that the result of "sizeof" ought to be just
taking TYPE_SIZE_UNIT and converting it to the user-level type.
You're right that it's not strictly *required*, but it would seem best
if no sizing or signedness conversion were required in that case.
I don't think we're disagreeing from a "language lawyer" perspective,
though.