Commit b5c1c988 by Jakub Jelinek Committed by Jakub Jelinek

re PR c++/69628 (Conditional jump or move depends on uninitialised value(s) in…

re PR c++/69628 (Conditional jump or move depends on uninitialised value(s) in lex_charconst(cpp_token const*) (c-lex.c:1252))

	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.

From-SVN: r233186
parent 0fd9d492
2016-02-05 Jakub Jelinek <jakub@redhat.com>
PR c++/69628
* g++.dg/parse/pr69628.C: New test.
2016-02-05 Uros Bizjak <ubizjak@gmail.com>
* gcc.dg/sancov/asan.c: Move to ...
......
// PR c++/69628
// { dg-do compile }
0''; // { dg-error "empty character constant" }
// { dg-error "expected unqualified-id before numeric constant" "" { target *-*-* } 4 }
2016-02-05 Jakub Jelinek <jakub@redhat.com>
PR c++/69628
* charset.c (cpp_interpret_charconst): Clear *PCHARS_SEEN
and *UNSIGNEDP if bailing out early due to errors.
2016-01-28 Jakub Jelinek <jakub@redhat.com>
PR pch/68176
......
......@@ -1620,10 +1620,17 @@ cpp_interpret_charconst (cpp_reader *pfile, const cpp_token *token,
if (token->val.str.len == (size_t) (2 + wide + u8))
{
cpp_error (pfile, CPP_DL_ERROR, "empty character constant");
*pchars_seen = 0;
*unsignedp = 0;
return 0;
}
else if (!cpp_interpret_string (pfile, &token->val.str, 1, &str, token->type))
else if (!cpp_interpret_string (pfile, &token->val.str, 1, &str,
token->type))
{
*pchars_seen = 0;
*unsignedp = 0;
return 0;
}
if (wide)
result = wide_str_to_charconst (pfile, str, pchars_seen, unsignedp,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment