https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103415
Bug ID: 103415 Summary: [12 Regression] ICE in cpp_interpret_string_1, at libcpp/charset.c:1739 Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Started between 20210808 and 20210822 : $ cat z1.c #define n(x...) = #__VA_OPT__(x##1) const char *c n(1, 2); $ gcc-12-20211121 -c z1.c z1.c:1:20: warning: __VA_OPT__ can only appear in the expansion of a C++20 variadic macro 1 | #define n(x...) = #__VA_OPT__(x##1) | ^ z1.c:2:1: internal compiler error: in cpp_interpret_string_1, at libcpp/charset.c:1739 2 | const char *c n(1, 2); | ^~~~~ 0x18b9877 cpp_interpret_string_1 ../../libcpp/charset.c:1739 0x18b9aed cpp_interpret_string(cpp_reader*, cpp_string const*, unsigned long, cpp_string*, cpp_ttype) ../../libcpp/charset.c:1819 0x78aad3 c_parser_string_literal(c_parser*, bool, bool) ../../gcc/c/c-parser.c:7410 0x78b528 c_parser_postfix_expression ../../gcc/c/c-parser.c:9023 0x795b12 c_parser_unary_expression ../../gcc/c/c-parser.c:8255 0x796b5f c_parser_cast_expression ../../gcc/c/c-parser.c:8097 0x796e19 c_parser_binary_expression ../../gcc/c/c-parser.c:7900 0x79800b c_parser_conditional_expression ../../gcc/c/c-parser.c:7600 0x7986d1 c_parser_expr_no_commas ../../gcc/c/c-parser.c:7515 0x79eaf9 c_parser_initializer ../../gcc/c/c-parser.c:5212 0x7aef2a c_parser_declaration_or_fndef ../../gcc/c/c-parser.c:2282 0x7b70cf c_parser_external_declaration ../../gcc/c/c-parser.c:1780 0x7b79fb c_parser_translation_unit ../../gcc/c/c-parser.c:1653 0x7b79fb c_parse_file() ../../gcc/c/c-parser.c:23280 0x808eb2 c_common_parse_file() ../../gcc/c-family/c-opts.c:1240