This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix PR80050


Bootstrapped and tested on x86_64-unknown-linux-gnu, applied.

Richard.

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.

Index: gcc/genmatch.c
===================================================================
--- gcc/genmatch.c	(revision 246188)
+++ gcc/genmatch.c	(working copy)
@@ -3826,8 +3826,7 @@ parser::next ()
     {
       token = cpp_get_token (r);
     }
-  while (token->type == CPP_PADDING
-	 && token->type != CPP_EOF);
+  while (token->type == CPP_PADDING);
   return token;
 }
 
@@ -3842,8 +3841,7 @@ parser::peek (unsigned num)
     {
       token = cpp_peek_token (r, i++);
     }
-  while ((token->type == CPP_PADDING
-	  && token->type != CPP_EOF)
+  while (token->type == CPP_PADDING
 	 || (--num > 0));
   /* If we peek at EOF this is a fatal error as it leaves the
      cpp_reader in unusable state.  Assume we really wanted a


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]