diff options
| author | nickc <nickc@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-06-23 13:57:39 +0000 |
|---|---|---|
| committer | nickc <nickc@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-06-23 13:57:39 +0000 |
| commit | 16b982178e7f6888525bcc010f6546915a22a3fe (patch) | |
| tree | 2cbb21eea43e284bfaba02174801a19d400ab2ad /gcc/read-rtl.c | |
| parent | b588ecd79ed51f085c2b3174b0781b191c7708b6 (diff) | |
| download | ppe42-gcc-16b982178e7f6888525bcc010f6546915a22a3fe.tar.gz ppe42-gcc-16b982178e7f6888525bcc010f6546915a22a3fe.zip | |
(read_braced_string): Check for EOF. If encountered issue an error message.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68363 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/read-rtl.c')
| -rw-r--r-- | gcc/read-rtl.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/read-rtl.c b/gcc/read-rtl.c index fd17bd04072..9d08da4c94c 100644 --- a/gcc/read-rtl.c +++ b/gcc/read-rtl.c @@ -298,11 +298,13 @@ read_braced_string (ob, infile) { int c; int brace_depth = 1; /* caller-processed */ + unsigned long starting_read_rtx_lineno = read_rtx_lineno; obstack_1grow (ob, '{'); while (brace_depth) { c = getc (infile); /* Read the string */ + if (c == '\n') read_rtx_lineno++; else if (c == '{') @@ -314,6 +316,10 @@ read_braced_string (ob, infile) read_escape (ob, infile); continue; } + else if (c == EOF) + fatal_with_file_and_line + (infile, "missing closing } for opening brace on line %lu", + starting_read_rtx_lineno); obstack_1grow (ob, c); } |

