diff options
Diffstat (limited to 'gcc/c-opts.c')
-rw-r--r-- | gcc/c-opts.c | 6 |
1 files changed, 5 insertions, 1 deletions
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) |