[PATCH] D137082: [clang][Interp] Fix dereferencing arrays with no offset applied
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 1 07:06:32 PDT 2022
aaron.ballman added a comment.
> There is a difference between a Pointer and a "Pointer to the first element of an array".
I'm pretty confused because this statement is false per the language standard (http://eel.is/c++draft/expr.sub#2). Basically, array subscripting works through pointer arithmetic, so `&array[0]` and `array` (decayed to a pointer) have the same value. Why do we need to offset to get to the first element in the interpreter?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137082/new/
https://reviews.llvm.org/D137082
More information about the cfe-commits
mailing list