This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [RFA] fix child_xfer_memory in hppah-nat.c


On Mon, Feb 05, 2001 at 11:11:05AM +0200, Eli Zaretskii wrote:
>
>On Sun, 4 Feb 2001, Andrew Cagney wrote:
>
>> Christopher Faylor wrote:
>> 
>> > You might want to add an ATTRIBUTE_UNUSED to 'struct mem_attrib *mem' to
>> > stop a potential compiler warning.
>> 
>> No.  GDB doesn't use that ATTRIBUTE_UNUSED hack.  Check the archives and
>> configure.in for the relevant discussion.
>
>Could you please point to that discussion, and also identify the place in 
>configure.in that's relevant to this?  I cannot find those (but I'm not 
>sure I know what to look for).

Here are the lines from configure.in:

    # NOTE: Don't add -Wall or -Wunused, they both include
    # -Wunused-parameter which reports bogus warnings.

The TODO has some words, too:

    Frequently requested but not approved requests.

    --

    Eliminate unused argument warnings using ATTRIBUTE_UNUSED.

    The benefits on this one are thought to be marginal - GDBs design
    means that unused parameters are very common.  GCC 3.0 will also
    include the option -Wno-unused-parameter which means that ``-Wall
    -Wno-unused-parameters -Werror'' can be specified.


>Several files in the CVS use ATTRIBUTE_UNUSED (not surprisingly, 
>go32-nat.c is one of them ;-).  So I wonder what is the current say-so 
>on this matter.

I specifically added some of these to win32-nat.c, too, not too long ago.
I do remember the discussion now.  I can't say that I agree with it,
but I remember it.

It looks like at least one discussion is here:

http://sources.redhat.com/ml/gdb/2000-q1/msg00826.html

I found this yesterday by searching for "unused" but it doesn't work
today.  Apparently the htdig stuff is screwed up.

There was some more discussion on this in March, 2000 in both gdb
and gdb-patches.

cgf

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]