Fix PR 67665: ICE when passing two empty files directly to cc1 with -g

Richard Biener richard.guenther@gmail.com
Wed Jan 13 12:36:00 GMT 2016


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?

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.



More information about the Gcc-patches mailing list