diff options
author | James E Wilson <wilson@specifixinc.com> | 2004-04-14 06:07:27 +0000 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 2004-04-13 23:07:27 -0700 |
commit | 540554f44fa5a31cdf56adcdee023a065d0f211b (patch) | |
tree | 259e4e2b6f1db319564423c1ce431cd891460cf8 /gcc | |
parent | a072d43b461d44cfe1b36106c173484b246c297e (diff) | |
download | gcc-540554f44fa5a31cdf56adcdee023a065d0f211b.zip gcc-540554f44fa5a31cdf56adcdee023a065d0f211b.tar.gz gcc-540554f44fa5a31cdf56adcdee023a065d0f211b.tar.bz2 |
Fix problem reported by Dan Berlin on gcc list.
* c-opt.c (c_common_post_options): If this_input_filename is NULL,
increment errorcount and return false instead of true.
From-SVN: r80678
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/c-opts.c | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fc28ce3..bd948e3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-04-13 James E Wilson <wilson@specifixinc.com> + + * c-opt.c (c_common_post_options): If this_input_filename is NULL, + increment errorcount and return false instead of true. + 2004-04-13 Uros Bizjak <uros@kss-loka.si>: * optabs.c (expand_twoval_unop): Reorder function arguments. diff --git a/gcc/c-opts.c b/gcc/c-opts.c index 7aa21c4..c639136 100644 --- a/gcc/c-opts.c +++ b/gcc/c-opts.c @@ -1171,8 +1171,12 @@ c_common_post_options (const char **pfilename) *pfilename = this_input_filename = cpp_read_main_file (parse_in, in_fnames[0]); + /* Don't do any compilation or preprocessing if there is no input file. */ if (this_input_filename == NULL) - return true; + { + errorcount++; + return false; + } if (flag_working_directory && flag_preprocess_only && ! flag_no_line_commands) |