public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [incremental] Patch: FYI: handle error_mark in checksumming
@ 2007-12-14 22:17 Tom Tromey
  0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2007-12-14 22:17 UTC (permalink / raw)
  To: Gcc Patch List

I'm checking this in on the incremental-compiler branch.

The test suite points out that cpp can return a number token whose
value is an error mark.  This updates the checksummer to cope.

Tom

ChangeLog:
2007-12-14  Tom Tromey  <tromey@redhat.com>

	* c-parser.c (c_parser_update_checksum): Handle ERROR_MARK.

Index: c-parser.c
===================================================================
--- c-parser.c	(revision 130792)
+++ c-parser.c	(working copy)
@@ -1138,7 +1138,10 @@
     case CPP_NUMBER:
     case CPP_CHAR:
     case CPP_WCHAR:
-      update_numeric_checksum (current_hash, token->value);
+      /* In some cases we can see a numeric token whose value is an
+	 error mark.  */
+      if (TREE_CODE (token->value) != ERROR_MARK)
+	update_numeric_checksum (current_hash, token->value);
       break;
 
     default:

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-12-14 21:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-14 22:17 [incremental] Patch: FYI: handle error_mark in checksumming Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).