arocc
arocc copied to clipboard
Support statically-known indexing into string literals
This works in clang but not GCC:
_Static_assert("hello"[0] == 'h', "");
_Static_assert(("hello" + 1)[0] == 'e', "");
_Static_assert((&("hello"[1]))[0] == 'e', "");
_Static_assert((("hello" + 1) - 1)[0] == 'h', "");