* cpplib.c (cpp_push_buffer): Give stdin buffers the name <stdin>.
authorNeil Booth <neil@daikokuya.demon.co.uk>
Fri, 6 Apr 2001 21:43:53 +0000 (21:43 +0000)
committerNeil Booth <neil@gcc.gnu.org>
Fri, 6 Apr 2001 21:43:53 +0000 (21:43 +0000)
From-SVN: r41166

gcc/ChangeLog
gcc/cpplib.c

index bb179c6..7607781 100644 (file)
@@ -1,5 +1,9 @@
 2001-04-06  Neil Booth  <neil@daikokuya.demon.co.uk>
 
+       * cpplib.c (cpp_push_buffer): Give stdin buffers the name <stdin>.
+
+2001-04-06  Neil Booth  <neil@daikokuya.demon.co.uk>
+
        * configure.in: Add check for lstat.
        * configure, config.in: Regenerate.
        * cppinit.c (append_include_chain): Make empty path ".".
index 56ffbb1..be04d41 100644 (file)
@@ -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;