https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117118
--- Comment #7 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-13 branch has been updated by Lewis Hyatt <lhy...@gcc.gnu.org>: https://gcc.gnu.org/g:9f0c207d4534a909ec04f9ffa306718154e67d70 commit r13-9214-g9f0c207d4534a909ec04f9ffa306718154e67d70 Author: Lewis Hyatt <lhy...@gmail.com> Date: Mon Oct 14 17:59:46 2024 -0400 libcpp: Fix ICE lexing invalid raw string in a deferred pragma [PR117118] The PR shows that we ICE after lexing an invalid unterminated raw string, because lex_raw_string() pops the main buffer unexpectedly. Resolve by handling this case the same way as for other directives. libcpp/ChangeLog: PR preprocessor/117118 * lex.cc (lex_raw_string): Treat an unterminated raw string the same way for a deferred pragma as is done for other directives. gcc/testsuite/ChangeLog: PR preprocessor/117118 * c-c++-common/raw-string-directive-3.c: New test. * c-c++-common/raw-string-directive-4.c: New test.