[cfe-commits] implicit sign/bitwidth conversions during array indexing?
eli.friedman at gmail.com
Mon Nov 17 09:54:04 PST 2008
On Mon, Nov 17, 2008 at 9:49 AM, Ted Kremenek <kremenek at apple.com> wrote:
> My question is whether or not Sema should insert an implicit cast here from
> long long to int? It seems strange that there is an implicit cast from
> short to int but not from long long to int.
Actually, if I recall correctly, there isn't an implicit cast either
way for the case of array subscripting.
The issue with inserting an implicit cast from long long to int is
that conceptually, it isn't there! The fact that we truncate long
long to i32 in CodeGen is really just an artifact of the
implementation on 32-bit machines.
More information about the cfe-commits