diff options
author | Neil Booth <neil@daikokuya.demon.co.uk> | 2001-08-17 22:23:49 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2001-08-17 22:23:49 +0000 |
commit | bb74c963017da6f462498f75a5b09ff782e0137c (patch) | |
tree | 1119c95193138295f135f3d1be8fd1f94c827ca3 /gcc/cppfiles.c | |
parent | c009f01f06d52c7f4e44e666688e7e88409a501c (diff) | |
download | gcc-bb74c963017da6f462498f75a5b09ff782e0137c.zip gcc-bb74c963017da6f462498f75a5b09ff782e0137c.tar.gz gcc-bb74c963017da6f462498f75a5b09ff782e0137c.tar.bz2 |
cpperror.c (print_location): Don't take a file name; use the line map instead.
* cpperror.c (print_location): Don't take a file name; use the
line map instead.
(_cpp_begin_message): Similarly.
(cpp_ice, cpp_fatal, cpp_error, cpp_error_with_line, cpp_warning,
cpp_warning_with_line, cpp_pedwarn, cpp_pedwarn_with_line): Update.
(cpp_pedwarn_with_file_and_line): Remove.
* cppfiles.c (stack_include_file): Update; set filename to stdin
here when appropriate.
* cpphash.h (struct cpp_buffer): Remove nominal_fname.
(_cpp_begin_message): Don't take a file name.
* cppinit.c: Add comment.
* cpplex.c: Fix end-of-directive indicator.
* cpplib.c: Don't include intl.h.
(run_directive, do_diagnostic): Update.
(do_line): Update to not use nominal_fname.
(cpp_push_buffer): Don't take a filename.
* cpplib.h (struct ht): Remove.
(cpp_push_buffer): Don't take a filename.
(cpp_pedwarn_with_file_and_line): Remove.
* cppmacro.c (struct cpp_macro): Remove file.
(builtin_macro): Update.
(_cpp_create_definition): Update.
* cppmain.c: Correct comment.
* fix-header.c (read_scan_file): Update.
From-SVN: r44986
Diffstat (limited to 'gcc/cppfiles.c')
-rw-r--r-- | gcc/cppfiles.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/cppfiles.c b/gcc/cppfiles.c index 6571304..237e84f 100644 --- a/gcc/cppfiles.c +++ b/gcc/cppfiles.c @@ -287,6 +287,7 @@ stack_include_file (pfile, inc) size_t len = 0; cpp_buffer *fp; int sysp, deps_sysp; + const char *filename; /* We'll try removing deps_sysp after the release of 3.0. */ deps_sysp = pfile->system_include_depth != 0; @@ -326,7 +327,7 @@ stack_include_file (pfile, inc) } /* Push a buffer. */ - fp = cpp_push_buffer (pfile, inc->buffer, len, BUF_FILE, inc->name, 0); + fp = cpp_push_buffer (pfile, inc->buffer, len, BUF_FILE, 0); fp->inc = inc; fp->inc->refcnt++; @@ -336,7 +337,10 @@ stack_include_file (pfile, inc) pfile->include_depth++; /* Generate the call back. */ - _cpp_do_file_change (pfile, LC_ENTER, fp->nominal_fname, 1, sysp); + filename = inc->name; + if (*filename == '\0') + filename = _("<stdin>"); + _cpp_do_file_change (pfile, LC_ENTER, filename, 1, sysp); } /* Read the file referenced by INC into the file cache. |