summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2001-11-29 22:40:55 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2001-11-29 22:40:55 +0000
commit1db21cbfd914287046e03c2112601df5b5b16b2f (patch)
treebfc2210bfe809594f6690e9f9c9a1b6e5b77ab38
parent82505826d9766da454432ba9e3989b625203b08e (diff)
downloadgcc-1db21cbfd914287046e03c2112601df5b5b16b2f.tar.gz
* c-lex.c (init_c_lex): Canonicalize "-" filename to "".
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47461 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/c-lex.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 2d42c7c7e18..8370ef9025d 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,9 @@
2001-11-29 Jakub Jelinek <jakub@redhat.com>
+ * c-lex.c (init_c_lex): Canonicalize "-" filename to "".
+
+2001-11-29 Jakub Jelinek <jakub@redhat.com>
+
* gcc.c (ASM_DEBUG_SPEC): Only check HAVE_AS_G*_DEBUG_FLAG
macros for the supported debugging types.
diff --git a/gcc/c-lex.c b/gcc/c-lex.c
index ea824ec239e..3867ef2069e 100644
--- a/gcc/c-lex.c
+++ b/gcc/c-lex.c
@@ -142,7 +142,7 @@ init_c_lex (filename)
/* Start it at 0. */
lineno = 0;
- if (filename == NULL)
+ if (filename == NULL || !strcmp (filename, "-"))
filename = "";
return cpp_read_main_file (parse_in, filename, ident_hash);