public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Joseph S. Myers" <joseph@codesourcery.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Richard Henderson <rth@redhat.com>,
	Jason Merrill <jason@redhat.com>,
	    Tom Tromey <tromey@redhat.com>,
	Jan Kratochvil <jkratoch@redhat.com>,
	    gcc-patches@gcc.gnu.org, Roland McGrath <roland@redhat.com>
Subject: Re: [RFC PATCH] -grecord-gcc-switches (PR other/32998)
Date: Thu, 21 Jul 2011 20:22:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.64.1107212002540.20626@digraph.polyomino.org.uk> (raw)
In-Reply-To: <20110712234608.GR2687@tyan-ft48-01.lab.bos.redhat.com>

On Wed, 13 Jul 2011, Jakub Jelinek wrote:

> Ideally we'd just include explicitly passed options from command line that
> haven't been overridden by other command line options, and would sort them,
> so that there are higher chances of DW_AT_producer strings being merged
> (e.g. -O2 -ffast-math vs. -ffast-math -O2 are now different strings, and
> similarly -O2 vs. -O3 -O2 vs. -O0 -O1 -Ofast -O2), but I'm not sure if it is
> easily possible using current option handling framework.

I don't think there's enough structure for that, although prune_options 
could always be enhanced to cover more cases of overridden options.

> +	  default:
> +	    if (save_decoded_options[j].orig_option_with_args_text[0] != '-')
> +	      continue;

Should instead be ignoring OPT_SPECIAL_*.

> +	    switch (save_decoded_options[j].orig_option_with_args_text[1])
> +	      {
> +	      case 'M':
> +	      case 'i':
> +	      case 'W':

It would be better to check the canonical option text rather than the 
original text.  Normally this wouldn't make any difference because the 
driver will have passed canonical options to cc1, but if someone calls cc1 
directly then I think aliases should still act the same as the options 
they are aliases for in this regard.

> +		continue;
> +	      case 'n':
> +		if (save_decoded_options[j].orig_option_with_args_text[2]
> +		    == 'o')
> +		  continue;

When would a "-no" option ever get passed to cc1?

-- 
Joseph S. Myers
joseph@codesourcery.com

  parent reply	other threads:[~2011-07-21 20:07 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-13  0:17 Jakub Jelinek
2011-07-13 14:04 ` Jason Merrill
2011-07-13 14:34   ` Jakub Jelinek
2011-07-13 14:35     ` Jason Merrill
2011-07-14  9:48       ` Jakub Jelinek
2011-07-14 16:31         ` Jason Merrill
2011-07-14 16:32           ` Jakub Jelinek
2011-07-14 16:40             ` Jason Merrill
2011-07-21 20:22 ` Joseph S. Myers [this message]
2011-07-21 20:50   ` Jakub Jelinek
2011-07-21 21:01     ` Joseph S. Myers
2011-07-22 13:27       ` [PATCH] -grecord-gcc-switches (PR other/32998, take 2) Jakub Jelinek
2011-07-22 14:06         ` Joseph S. Myers
2011-07-22 14:11           ` [PATCH] -grecord-gcc-switches (PR other/32998, take 3) Jakub Jelinek
2011-07-22 20:43             ` Jason Merrill

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=Pine.LNX.4.64.1107212002540.20626@digraph.polyomino.org.uk \
    --to=joseph@codesourcery.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=jason@redhat.com \
    --cc=jkratoch@redhat.com \
    --cc=roland@redhat.com \
    --cc=rth@redhat.com \
    --cc=tromey@redhat.com \
    /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).