read-rtl.c (fatal_expected_char): Print EOF as text rather that its binary representa...
authorRask Ingemann Lambertsen <rask@sygehus.dk>
Tue, 20 Nov 2007 17:24:51 +0000 (18:24 +0100)
committerRask Ingemann Lambertsen <rask@gcc.gnu.org>
Tue, 20 Nov 2007 17:24:51 +0000 (17:24 +0000)
* read-rtl.c (fatal_expected_char): Print EOF as text rather that
its binary representation.

From-SVN: r130318

gcc/ChangeLog
gcc/read-rtl.c

index beb2370d220aa0fbcdfef7deb51a2c976516d7cb..291479ea3af5cfa65cbf84b670e420a6fe209593 100644 (file)
@@ -1,3 +1,8 @@
+2007-11-20  Rask Ingemann Lambertsen  <rask@sygehus.dk>
+
+       * read-rtl.c (fatal_expected_char): Print EOF as text rather that
+       its binary representation.
+
 2007-11-20  Richard Guenther  <rguenther@suse.de>
 
        * tree-ssa-operands.c (add_virtual_operand): Consistently prune
index fbb67b47785a35212aa45253416975dc756c9eb3..cc8fd974a2f8b3a368d1b610457e710a6f950a1d 100644 (file)
@@ -218,8 +218,12 @@ fatal_with_file_and_line (FILE *infile, const char *msg, ...)
 static void
 fatal_expected_char (FILE *infile, int expected_c, int actual_c)
 {
-  fatal_with_file_and_line (infile, "expected character `%c', found `%c'",
-                           expected_c, actual_c);
+  if (actual_c == EOF)
+    fatal_with_file_and_line (infile, "expected character `%c', found EOF",
+                             expected_c);
+  else
+    fatal_with_file_and_line (infile, "expected character `%c', found `%c'",
+                             expected_c, actual_c);
 }
 
 /* Implementations of the iterator_group callbacks for modes.  */