summaryrefslogtreecommitdiffstats
path: root/gcc/cpplib.c
diff options
context:
space:
mode:
authorneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2001-04-06 21:43:53 +0000
committerneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2001-04-06 21:43:53 +0000
commitd057862f33821d9a1614e8b9bebf7d48c9a07ca3 (patch)
tree272a3d594cf2b366a38308868fb9da68694f5c98 /gcc/cpplib.c
parent98233b427b3458677e437d580d19f9270a851aa6 (diff)
downloadppe42-gcc-d057862f33821d9a1614e8b9bebf7d48c9a07ca3.tar.gz
ppe42-gcc-d057862f33821d9a1614e8b9bebf7d48c9a07ca3.zip
* cpplib.c (cpp_push_buffer): Give stdin buffers the name <stdin>.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@41166 138bc75d-0d04-0410-961f-82ee72b054a4
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;
OpenPOWER on IntegriCloud