From: Rask Ingemann Lambertsen <rask@sygehus.dk>
To: gcc-patches@gcc.gnu.org
Subject: [PATCH] Improve fatal_expected_char() EOF reporting
Date: Tue, 28 Nov 2006 20:52:00 -0000 [thread overview]
Message-ID: <20061128204354.GC3563@sygehus.dk> (raw)
Hi.
In read-rtl.c, fatal_expected_char() can output a binary EOF if
end-of-file is reached unexpectedly. One way that this can happen is if a
define_insn is at the end of the file and the terminating ')' is missing.
This patches changes fatal_expected_char() to print "EOF" instead.
Bootstrapped and regtested on i686-pc-linux-gnu with all default languages
with no new failures.
Much to my suprise, it "fixes" some failures:
=== libjava tests ===
Running target unix
FAIL: SyncTest execution - gij test
FAIL: SyncTest execution - gij test
=== libmudflap tests ===
Running target unix
FAIL: libmudflap.cth/pass39-frag.c (rerun 16) execution test
FAIL: libmudflap.cth/pass39-frag.c (rerun 16) output pattern test
I don't see how that can happen. The tests must be broken somehow.
ChangeLog:
2006-11-28 Rask Ingemann Lambertsen <rask@sygehus.dk>
* read-rtl.c (fatal_expected_char): Print EOF as text rather that
its binary representation.
Index: read-rtl.c
===================================================================
--- read-rtl.c (revision 119204)
+++ read-rtl.c (working copy)
@@ -219,8 +219,12 @@
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 macro_group callbacks for modes. */
--
Rask Ingemann Lambertsen
next reply other threads:[~2006-11-28 20:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-28 20:52 Rask Ingemann Lambertsen [this message]
2006-11-28 22:28 ` Mike Stump
2006-11-30 20:07 ` Rask Ingemann Lambertsen
2006-11-30 22:53 ` Mike Stump
2007-08-10 8:52 ` PING " Rask Ingemann Lambertsen
2007-08-24 0:44 ` Ian Lance Taylor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061128204354.GC3563@sygehus.dk \
--to=rask@sygehus.dk \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).