summaryrefslogtreecommitdiff
path: root/gcc/f
diff options
context:
space:
mode:
authorsayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>2004-02-29 14:12:20 +0000
committersayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>2004-02-29 14:12:20 +0000
commit314852c1a53f2afeae496b1cca67ea6201da99fc (patch)
tree5bf589d49d67098d18b93f137a20d72b9a9c03d8 /gcc/f
parent905df476aa8b9760743f8759e8d25dc6212eb056 (diff)
downloadgcc-314852c1a53f2afeae496b1cca67ea6201da99fc.tar.gz
* parse.c (ffe_parse_file): Handle the case that main_input_filename
is NULL. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@78650 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/f')
-rw-r--r--gcc/f/ChangeLog5
-rw-r--r--gcc/f/parse.c6
2 files changed, 9 insertions, 2 deletions
diff --git a/gcc/f/ChangeLog b/gcc/f/ChangeLog
index 0234eb4b80b..a9941c43b1e 100644
--- a/gcc/f/ChangeLog
+++ b/gcc/f/ChangeLog
@@ -1,3 +1,8 @@
+2004-02-29 Roger Sayle <roger@eyesopen.com>
+
+ * parse.c (ffe_parse_file): Handle the case that main_input_filename
+ is NULL.
+
2004-02-24 Michael Matz <matz@suse.de>
* Make-lang.in (sta.o-warn): Delete.
diff --git a/gcc/f/parse.c b/gcc/f/parse.c
index e21dcce87b2..d822773f35b 100644
--- a/gcc/f/parse.c
+++ b/gcc/f/parse.c
@@ -31,6 +31,7 @@ extern FILE *finput;
void
ffe_parse_file (int set_yydebug ATTRIBUTE_UNUSED)
{
+ const char *fname;
ffewhereFile wf;
if (ffe_is_version ())
@@ -39,8 +40,9 @@ ffe_parse_file (int set_yydebug ATTRIBUTE_UNUSED)
if (!ffe_is_pedantic ())
ffe_set_is_pedantic (pedantic);
- wf = ffewhere_file_new (main_input_filename, strlen (main_input_filename));
- ffecom_file (main_input_filename);
+ fname = main_input_filename ? main_input_filename : "<stdin>";
+ wf = ffewhere_file_new (fname, strlen (fname));
+ ffecom_file (fname);
ffe_file (wf, finput);
ffecom_finish_compile ();