Commit d59b7253 by Richard Biener Committed by Richard Biener

re PR other/80050 (gcc/genmatch.c: PVS-Studio: V590)

2017-03-17  Richard Biener  <rguenther@suse.de>

	PR middle-end/80050
	* genmatch.c (parser::next): Remove pointless check for CPP_EOF.
	(parser::peek): Likewise.

From-SVN: r246218
parent 61c81999
2017-03-17 Richard Biener <rguenther@suse.de> 2017-03-17 Richard Biener <rguenther@suse.de>
PR middle-end/80050
* genmatch.c (parser::next): Remove pointless check for CPP_EOF.
(parser::peek): Likewise.
2017-03-17 Richard Biener <rguenther@suse.de>
PR tree-optimization/80048 PR tree-optimization/80048
* sese.c (free_sese_info): Properly release rename_map and * sese.c (free_sese_info): Properly release rename_map and
copied_bb_map elements. copied_bb_map elements.
......
...@@ -3826,8 +3826,7 @@ parser::next () ...@@ -3826,8 +3826,7 @@ parser::next ()
{ {
token = cpp_get_token (r); token = cpp_get_token (r);
} }
while (token->type == CPP_PADDING while (token->type == CPP_PADDING);
&& token->type != CPP_EOF);
return token; return token;
} }
...@@ -3842,8 +3841,7 @@ parser::peek (unsigned num) ...@@ -3842,8 +3841,7 @@ parser::peek (unsigned num)
{ {
token = cpp_peek_token (r, i++); token = cpp_peek_token (r, i++);
} }
while ((token->type == CPP_PADDING while (token->type == CPP_PADDING
&& token->type != CPP_EOF)
|| (--num > 0)); || (--num > 0));
/* If we peek at EOF this is a fatal error as it leaves the /* If we peek at EOF this is a fatal error as it leaves the
cpp_reader in unusable state. Assume we really wanted a cpp_reader in unusable state. Assume we really wanted a
......
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