OSDN Git Service

2009-05-08 Tobias Burnus <burnus@net-b.de>
[pf3gnuchains/gcc-fork.git] / gcc / read-rtl.c
index fbb67b4..5c65e26 100644 (file)
@@ -1,6 +1,6 @@
 /* RTL reader for GCC.
    Copyright (C) 1987, 1988, 1991, 1994, 1997, 1998, 1999, 2000, 2001, 2002,
-   2003, 2004, 2005, 2007
+   2003, 2004, 2005, 2007, 2008
    Free Software Foundation, Inc.
 
 This file is part of GCC.
@@ -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.  */
@@ -783,6 +787,9 @@ join_c_conditions (const char *cond1, const char *cond2)
   if (cond2 == 0 || cond2[0] == 0)
     return cond1;
 
+  if (strcmp (cond1, cond2) == 0)
+    return cond1;
+
   result = concat ("(", cond1, ") && (", cond2, ")", NULL);
   obstack_ptr_grow (&joined_conditions_obstack, result);
   obstack_ptr_grow (&joined_conditions_obstack, cond1);