Skip to content
Snippets Groups Projects
  • Lewis Hyatt's avatar
    18cace46
    libcpp: Fix ICE lexing invalid raw string in a deferred pragma [PR117118] · 18cace46
    Lewis Hyatt authored
    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.
    18cace46
    History
    libcpp: Fix ICE lexing invalid raw string in a deferred pragma [PR117118]
    Lewis Hyatt authored
    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.