This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Avoid gcc specific compiler flags
> On Monday 06 March 2006 18:35, Mark Kettenis wrote:
>> > From: Paul Brook <paul@codesourcery.com>
>> > Date: Mon, 6 Mar 2006 15:18:23 +0000
>> >
>> > The attached patch allows a dejagnu target description to override the
>> > compiler flag used to disable warnings when running the gdb testsuite.
>> >
>> > Ok?
>>
>> Looks fine to me expect for a double $nowarnings in the gdb.exp bit.
>
> I don't understand this comment. Can you be more specific?
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.
Mark