This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH don't segfault in cc1 if main file mssing [fixespreprocessor/12545]
- From: "Zack Weinberg" <zack at codesourcery dot com>
- To: Per Bothner <per at bothner dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sat, 11 Oct 2003 01:06:36 -0700
- Subject: Re: PATCH don't segfault in cc1 if main file mssing [fixespreprocessor/12545]
- References: <3F87B62F.60507@bothner.com>
Per Bothner <per@bothner.com> writes:
> * c-opts.c (finish_options): Change to returns boolean - false iff
> the call to cpp_find_main_file fails.
> (c_common_init): Skip preprocess_file if finish_options failed.
> (c_common_parse_file): Break if finish_options failed.
The right thing would be not to have to call cpp_find_main_file from
finish_options - do it from c_common_parse_file instead - but in the
present state we have to, so this is OK.
zw