From 5677efb0be578c0cb8b7df83700bed0de7cbf69f Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Thu, 26 Apr 2001 15:12:55 +0000 Subject: [PATCH] c-lex.c (c_lex): Remove # from %o diagnostic formatting. .: * 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 | 4 ++++ gcc/c-lex.c | 2 +- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/g++.old-deja/g++.other/lex1.C | 12 ++++++++++++ 4 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/g++.old-deja/g++.other/lex1.C diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 092820c2060..9f8532837b9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2001-04-26 Nathan Sidwell + + * c-lex.c (c_lex): Remove # from %o diagnostic formatting. + 2001-04-26 Jakub Jelinek * integrate.c (expand_inline_function): Check for error_mark_node diff --git a/gcc/c-lex.c b/gcc/c-lex.c index f68ae35a219..6f607692f4f 100644 --- a/gcc/c-lex.c +++ b/gcc/c-lex.c @@ -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: diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 7fea9e9be4e..23436f9e1e1 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2001-04-26 Nathan Sidwell + + * g++.old-deja/g++.other/lex1.C: New test. + 2001-04-26 Jakub Jelinek * 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 index 00000000000..b639f05c39a --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.other/lex1.C @@ -0,0 +1,12 @@ +// Build don't link: +// +// Copyright (C) 2001 Free Software Foundation, Inc. +// Contributed by Nathan Sidwell 26 April 2001 + +// Bug 2510. We ICEd when a bogus char was present. + +void foo () +{ + // there is a ctrl-h on the next line +  // ERROR - stray char +} -- 2.30.2