https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108372
Bug ID: 108372 Summary: [12 regression] -E -fdirectives-only crash Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: preprocessor Assignee: unassigned at gcc dot gnu.org Reporter: thiago at kde dot org Target Milestone: --- Probably similar to many other bugs related to -E -fdirectives-only. This option is used by icecc <https://github.com/icecc/icecream>. Test: g++ -std=c++17 -include type_traits -E -xc++ /dev/null -o /dev/null -fdirectives-only Tested with: gcc version 13.0.0 20230110 (experimental) (GCC) Output: In file included from <command-line>: /home/tjmaciei/dev/gcc/include/c++/13.0.0/type_traits:2948:25: error: missing binary operator before token "(" 2948 | bool _Nothrow = noexcept(_S_conv<_Tp>(_S_get())), | ^ /home/tjmaciei/dev/gcc/include/c++/13.0.0/type_traits:3033:27: internal compiler error: unspellable token PRAGMA_EOL 3033 | ~__nonesuch() = delete; | ^ 0xc4c472 c_cpp_diagnostic(cpp_reader*, cpp_diagnostic_level, cpp_warning_reason, rich_location*, char const*, __va_list_tag (*) [1]) /home/tjmaciei/src/gcc/gcc/c-family/c-common.cc:6694 0x229a914 cpp_diagnostic_at /home/tjmaciei/src/gcc/libcpp/errors.cc:67 0x229a914 cpp_diagnostic /home/tjmaciei/src/gcc/libcpp/errors.cc:82 0x229aa73 cpp_error(cpp_reader*, cpp_diagnostic_level, char const*, ...) /home/tjmaciei/src/gcc/libcpp/errors.cc:96 0x22a58d3 cpp_spell_token(cpp_reader*, cpp_token const*, unsigned char*, bool) /home/tjmaciei/src/gcc/libcpp/lex.cc:4426 0x22a663a cpp_token_as_text(cpp_reader*, cpp_token const*) /home/tjmaciei/src/gcc/libcpp/lex.cc:4442 0x229e43c _cpp_parse_expr /home/tjmaciei/src/gcc/libcpp/expr.cc:1389 0x2296981 do_if /home/tjmaciei/src/gcc/libcpp/directives.cc:2076 0x2298b68 _cpp_handle_directive /home/tjmaciei/src/gcc/libcpp/directives.cc:572 0x22a6e7d cpp_directive_only_process(cpp_reader*, void*, void (*)(cpp_reader*, CPP_DO_task, void*, ...)) /home/tjmaciei/src/gcc/libcpp/lex.cc:5272 0xc76faf scan_translation_unit_directives_only /home/tjmaciei/src/gcc/gcc/c-family/c-ppoutput.cc:431 0xc76faf preprocess_file(cpp_reader*) /home/tjmaciei/src/gcc/gcc/c-family/c-ppoutput.cc:104 0xc750b8 c_common_init() /home/tjmaciei/src/gcc/gcc/c-family/c-opts.cc:1227 0xa6d0ce cxx_init() /home/tjmaciei/src/gcc/gcc/cp/lex.cc:338 0x95d1c1 lang_dependent_init /home/tjmaciei/src/gcc/gcc/toplev.cc:1815 0x95d1c1 do_compile /home/tjmaciei/src/gcc/gcc/toplev.cc:2110 Please submit a full bug report, with preprocessed source. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions.