public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <rguenther@suse.de>
To: Bernd Edlinger <bernd.edlinger@hotmail.de>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Remove dead code from c_common_get_alias_set
Date: Mon, 24 Apr 2017 07:20:00 -0000	[thread overview]
Message-ID: <alpine.LSU.2.20.1704240857360.24645@zhemvz.fhfr.qr> (raw)
In-Reply-To: <AM4PR0701MB2162DAC1E0322ACA34B66E4CE41A0@AM4PR0701MB2162.eurprd07.prod.outlook.com>

[-- Attachment #1: Type: text/plain, Size: 1289 bytes --]

On Fri, 21 Apr 2017, Bernd Edlinger wrote:

> Hi!
> 
> 
> This removes some dead and unreachable code in c_common_get_alias_set:
> Because cc1 was recently changed to be only called with one file at a
> time, the code after "if (num_in_fnames == 1) return -1;" is no longer
> reachable, and can thus be removed.

While I think you are correct it looks like c_common_parse_file still
happily parses multiple infiles.  That is, only for
flag_preprocess_only we have a

      if (num_in_fnames > 1)
        error ("too many filenames given.  Type %s --help for usage",
               progname);

and:

gcc> ./cc1 -quiet t.c t2.c
t2.c:5:6: error: conflicting types for ‘bar’
 void bar () { struct X x; *(volatile char *)x.buf = 1; }
      ^~~
t.c:8:1: note: previous definition of ‘bar’ was here
 bar (int x)
 ^~~

which means it actually still "works" to combine two source files
(yes, the driver no longer seems to have the ability to pass down
multiple inputs to cc1).

Thus, can you first remove that "feature"?

Thanks,
Richard.

> Bootstrapped and reg-tested on x86_64-pc-linux-gnu.
> Is it OK for trunk?
> 
> 
> Thanks
> Bernd.
> 

-- 
Richard Biener <rguenther@suse.de>
SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nuernberg)

  reply	other threads:[~2017-04-24  7:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-21 19:21 Bernd Edlinger
2017-04-24  7:20 ` Richard Biener [this message]
2017-04-24 18:11   ` Bernd Edlinger
2017-04-25  8:57     ` Richard Biener

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LSU.2.20.1704240857360.24645@zhemvz.fhfr.qr \
    --to=rguenther@suse.de \
    --cc=bernd.edlinger@hotmail.de \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).