summaryrefslogtreecommitdiff
path: root/gcc/cpplib.c
diff options
context:
space:
mode:
authorNeil Booth <neil@daikokuya.demon.co.uk>2001-04-06 21:43:53 +0000
committerNeil Booth <neil@gcc.gnu.org>2001-04-06 21:43:53 +0000
commit62fce11f4521012120b124433bfa5a76c81917ee (patch)
tree272a3d594cf2b366a38308868fb9da68694f5c98 /gcc/cpplib.c
parent2d9fea5d4b0ddbfb7c2ad7dc28e1fec7f5476dfc (diff)
downloadgcc-62fce11f4521012120b124433bfa5a76c81917ee.tar.gz
* cpplib.c (cpp_push_buffer): Give stdin buffers the name <stdin>.
From-SVN: r41166
Diffstat (limited to 'gcc/cpplib.c')
-rw-r--r--gcc/cpplib.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/cpplib.c b/gcc/cpplib.c
index 56ffbb17bc7..be04d415925 100644
--- a/gcc/cpplib.c
+++ b/gcc/cpplib.c
@@ -1812,7 +1812,10 @@ cpp_push_buffer (pfile, buffer, len, type, filename)
pfile->lexer_pos.output_line = 1;
}
- new->nominal_fname = filename;
+ if (*filename == '\0')
+ new->nominal_fname = _("<stdin>");
+ else
+ new->nominal_fname = filename;
new->type = type;
new->prev = pfile->buffer;
new->pfile = pfile;