On Fri, Nov 13, 2026 at 02:35:34PM -0800, Andrea Pinski wrote:
> The main thing I am worried about is that STRING_CST can be used with
> more than byte sized objects (like wide strings or UTF16 strings) and
> the above does not check that when you build the array_ref.
Yeah, exactly, this will do the wrong thing on
u"test" + idx or U"test" + idx or L"test" + idx.
When turning it into ARRAY_REF, you either should punt for non-byte
cases, or the idx would need to be divided by the size of the STRING_CST
array element (but how to find out if it isn't a multiple of it?).
Jakub