Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Mark Kettenis" <mark.kettenis@xs4all.nl>
To: "Paul Brook" <paul@codesourcery.com>
Cc: "Mark Kettenis" <mark.kettenis@xs4all.nl>, gdb-patches@sourceware.org
Subject: Re: [patch] Avoid gcc specific compiler flags
Date: Tue, 07 Mar 2006 18:45:00 -0000	[thread overview]
Message-ID: <15758.192.87.1.22.1141750319.squirrel@webmail.xs4all.nl> (raw)
In-Reply-To: <200603071519.38581.paul@codesourcery.com>

>> I was talking about the following fragment:
>>
>> +    set nowarnings [lsearch -exact $options nowarnings]
>> +    if {$nowarnings != -1} {
>> +	if [target_info exists gdb,nowarnings_flag] {
>> +	    set flag "additional_flags=[target_info gdb,nowarnings_flag]"
>> +	} else {
>> +	    set flag "additional_flags=-w"
>> +	}
>> +	set options [lreplace $options $nowarnings $nowarnings $flag]
>>
>> There's a double $nowarnings on that last line.  or is that intentional?
>> In that case I don't understand this code completely, and it needs a
>> comment to explain it.
>
> That's deliberate.
>
> The code replaces the "nowarnings" option with
> additional_flags=[something]
> $nowarnings is the index of the nowarnings option in the list of options.
> The lreplace function replaces a range of list items. In this case we want
> to
> replace a single list element so the start and end of the range are the
> same.
>
> I've added the following comment and applied the patch.
>
> # Replace the "nowarnings" option with the appropriate additional_flags
> # to disable compiler warnings.

That sounds good to me!  Please commit.

Mark



      reply	other threads:[~2006-03-07 16:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-07  5:02 Paul Brook
2006-03-07  5:23 ` Mark Kettenis
2006-03-07 15:19   ` Paul Brook
2006-03-07 16:52     ` Mark Kettenis
2006-03-07 17:46       ` Paul Brook
2006-03-07 18:45         ` Mark Kettenis [this message]

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=15758.192.87.1.22.1141750319.squirrel@webmail.xs4all.nl \
    --to=mark.kettenis@xs4all.nl \
    --cc=gdb-patches@sourceware.org \
    --cc=paul@codesourcery.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