https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110348
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Created attachment 55780 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55780&action=edit gcc14-pr110348-wip.patch Untested WIP on this. Now need to figure out which usual cases I'm going to handle an easy way (I think STRIP_NOPS of ADDR_EXPR of STRING_CST, POINTER_PLUS of that plus INTEGER_CST, ADDR_EXPR of a VAR_DECL with STRING_CST DECL_INITIAL, ADDR_EXPR of ARRAY_REF of a VAR_DECL with STRING_CST DECL_INITIAL/STRING_CST for start, for others I'll need to build ARRAY_REF for each char and evaluate). Plus testcase coverage. It isn't clear what will or should happen if one uses some special execution character set, because then strings and literals will be translated into that execution character set and writing that as message might be weird.