diff options
author | Roger Sayle <roger@eyesopen.com> | 2004-02-29 14:12:20 +0000 |
---|---|---|
committer | Roger Sayle <sayle@gcc.gnu.org> | 2004-02-29 14:12:20 +0000 |
commit | b416fab4598c5fc880844ed5f8bb5e66a91eaede (patch) | |
tree | 5bf589d49d67098d18b93f137a20d72b9a9c03d8 /gcc/f | |
parent | 083474cc69d4c7dfbfde35bdf6b8a0d1e91b34b6 (diff) | |
download | gcc-b416fab4598c5fc880844ed5f8bb5e66a91eaede.zip gcc-b416fab4598c5fc880844ed5f8bb5e66a91eaede.tar.gz gcc-b416fab4598c5fc880844ed5f8bb5e66a91eaede.tar.bz2 |
parse.c (ffe_parse_file): Handle the case that main_input_filename is NULL.
* parse.c (ffe_parse_file): Handle the case that main_input_filename
is NULL.
From-SVN: r78650
Diffstat (limited to 'gcc/f')
-rw-r--r-- | gcc/f/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/f/parse.c | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/gcc/f/ChangeLog b/gcc/f/ChangeLog index 0234eb4..a9941c4 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 e21dcce..d822773 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 (); |