c-lex.c (c_lex): Remove # from %o diagnostic formatting.
authorNathan Sidwell <nathan@codesourcery.com>
Thu, 26 Apr 2001 15:12:55 +0000 (15:12 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Thu, 26 Apr 2001 15:12:55 +0000 (15:12 +0000)
.: * c-lex.c (c_lex): Remove # from %o diagnostic formatting.
testsuite:
* g++.old-deja/g++.other/lex1.C: New test.

From-SVN: r41588

gcc/ChangeLog
gcc/c-lex.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.old-deja/g++.other/lex1.C [new file with mode: 0644]

index 092820c20603667ce25be2c8887a8a484f4ee180..9f8532837b9f2140c3a90e91097bee11ca541885 100644 (file)
@@ -1,3 +1,7 @@
+2001-04-26  Nathan Sidwell <nathan@codesourcery.com>
+
+       * c-lex.c (c_lex): Remove # from %o diagnostic formatting.
+
 2001-04-26  Jakub Jelinek  <jakub@redhat.com>
 
        * integrate.c (expand_inline_function): Check for error_mark_node
index f68ae35a219adfa8f354df929fbd0103d0c5f1e0..6f607692f4fb34ff51ca5bfd044667bfc5e3a3dc 100644 (file)
@@ -993,7 +993,7 @@ c_lex (value)
       if (ISGRAPH (tok.val.c))
        error ("stray '%c' in program", tok.val.c);
       else
-       error ("stray '\\%#o' in program", tok.val.c);
+       error ("stray '\\%o' in program", tok.val.c);
       goto retry;
       
     case CPP_NAME:
index 7fea9e9be4e8d3715d81d870ce764fca121d23d5..23436f9e1e1dc68ea8617ab0dba624a812dc357d 100644 (file)
@@ -1,3 +1,7 @@
+2001-04-26  Nathan Sidwell <nathan@codesourcery.com>
+
+       * g++.old-deja/g++.other/lex1.C: New test.
+
 2001-04-26  Jakub Jelinek  <jakub@redhat.com>
 
        * gcc.dg/noncompile/20010425-1.c: New test.
diff --git a/gcc/testsuite/g++.old-deja/g++.other/lex1.C b/gcc/testsuite/g++.old-deja/g++.other/lex1.C
new file mode 100644 (file)
index 0000000..b639f05
--- /dev/null
@@ -0,0 +1,12 @@
+// Build don't link:
+// 
+// Copyright (C) 2001 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 26 April 2001 <nathan@codesourcery.com>
+
+// Bug 2510. We ICEd when a bogus char was present.
+
+void foo ()
+{
+  // there is a ctrl-h on the next line
+  \b // ERROR - stray char
+}