This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix PR 67665: ICE when passing two empty files directly to cc1 with -g
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Andrew Pinski <pinskia at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 22 Jan 2016 12:04:34 +0100
- Subject: Re: Fix PR 67665: ICE when passing two empty files directly to cc1 with -g
- Authentication-results: sourceware.org; auth=none
- References: <CA+=Sn1=ZY=_GLPusvj=BSZMwQ3-367d1s2eKCoy86BPQpkpsWg at mail dot gmail dot com> <CAFiYyc246aubUhxGmqP+_JTpTWUc3UxFuxt79ydTDHQNfmadAg at mail dot gmail dot com> <CA+=Sn1nh2i=0ui9_WV2jkesLKAXvLRQMrd_rW-mVjt07mSaCPw at mail dot gmail dot com>
On Fri, Jan 22, 2016 at 2:17 AM, Andrew Pinski <pinskia@gmail.com> wrote:
> On Wed, Jan 13, 2016 at 4:36 AM, Richard Biener
> <richard.guenther@gmail.com> wrote:
>> On Wed, Jan 13, 2016 at 9:27 AM, Andrew Pinski <pinskia@gmail.com> wrote:
>>> Hi,
>>> The support -combine was removed a while back but cc1 still accepts
>>> more than one file if directly invoked. The support for multiple
>>> files has bit-rotten inside the C front-end now too. This patch now
>>> errors out when invoked with more than one file instead of crashing
>>> later.
>>>
>>> OK? Bootstrapped and tested on aarch64-linux-gnu with no regressions.
>>
>> Ok, but can you please simplify the following code then? The
>>
>> i = 0;
>> for (;;)
>> {
>> ...
>> if (++i >= num_in_fnames)
>> break;
>>
>> and the code following the break should be no longer needed, no?
>
> Yes. Let me resubmit the patch. Also will this still be accepted
> even though we are in stage 4?
I suppose it's a regression, so yes.
Richard.
> Thanks,
> Andrew Pinski
>
>>
>> Thanks,
>> Richard.
>>
>>> Thanks,
>>> Andrew Pinski
>>>
>>> c-family/ChangeLog:
>>> * c-opts.c (c_common_post_options): Move the error message about "two
>>> or more source files" such that it is unconditional.