Hello. Running: $ echo "0'';" | valgrind --leak-check=yes --trace-children=yes ./gcc/xg++ -Bgcc -std=c++14 -xc++ - produces: ==14976== Conditional jump or move depends on uninitialised value(s) ==14976== at 0xB1A59D: lex_charconst(cpp_token const*) (c-lex.c:1252) ==14976== by 0xB18692: c_lex_with_flags(tree_node**, unsigned int*, unsigned char*, int) (c-lex.c:550) ==14976== by 0x92889A: cp_lexer_get_preprocessor_token(cp_lexer*, cp_token*) (parser.c:792) ==14976== by 0x928545: cp_lexer_new_main() (parser.c:656) ==14976== by 0x92BD1A: cp_parser_new() (parser.c:3687) ==14976== by 0x97B2C0: c_parse_file() (parser.c:37354) ==14976== by 0xB23FDA: c_common_parse_file() (c-opts.c:1064) ==14976== by 0x11225EE: compile_file() (toplev.c:465) ==14976== by 0x1124B96: do_compile() (toplev.c:1988) ==14976== by 0x1124E21: toplev::main(int, char**) (toplev.c:2096) ==14976== by 0x1B4DE9F: main (main.c:39) Thanks, Martin
Created attachment 37568 [details] gcc6-pr69628.patch Untested fix.
Author: jakub Date: Fri Feb 5 19:39:48 2016 New Revision: 233186 URL: https://gcc.gnu.org/viewcvs?rev=233186&root=gcc&view=rev Log: PR c++/69628 * charset.c (cpp_interpret_charconst): Clear *PCHARS_SEEN and *UNSIGNEDP if bailing out early due to errors. * g++.dg/parse/pr69628.C: New test. Added: trunk/gcc/testsuite/g++.dg/parse/pr69628.C Modified: trunk/gcc/testsuite/ChangeLog trunk/libcpp/ChangeLog trunk/libcpp/charset.c
Fixed.