* [RFA] A missing ATTRIBUTE_UNUSED
@ 2002-01-29 9:13 Daniel Jacobowitz
2002-01-29 11:40 ` Andrew Cagney
0 siblings, 1 reply; 5+ messages in thread
From: Daniel Jacobowitz @ 2002-01-29 9:13 UTC (permalink / raw)
To: binutils
What's the policy on functions that conditionally use their arguments? I
couldn't find another example offhand, so I don't know if this patch is
right.
With this one I can do most of a -Werror build again.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
2002-01-29 Daniel Jacobowitz <drow@mvista.com>
* nm.c (print_value): Mark abfd unused.
Index: nm.c
===================================================================
RCS file: /cvs/src/src/binutils/nm.c,v
retrieving revision 1.18
diff -u -r1.18 nm.c
--- nm.c 2002/01/23 16:12:55 1.18
+++ nm.c 2002/01/29 17:02:10
@@ -1453,7 +1453,7 @@
static void
print_value (abfd, val)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
bfd_vma val;
{
#if ! defined (BFD64) || BFD_HOST_64BIT_LONG
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFA] A missing ATTRIBUTE_UNUSED
2002-01-29 9:13 [RFA] A missing ATTRIBUTE_UNUSED Daniel Jacobowitz
@ 2002-01-29 11:40 ` Andrew Cagney
2002-01-29 11:45 ` Daniel Jacobowitz
0 siblings, 1 reply; 5+ messages in thread
From: Andrew Cagney @ 2002-01-29 11:40 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: binutils
> What's the policy on functions that conditionally use their arguments? I
> couldn't find another example offhand, so I don't know if this patch is
> right.
>
> With this one I can do most of a -Werror build again.
Have a look in BFD :-)
BINUTILS uses ATTRIBUTE_UNUSED. GDB uses -Wno-unused-params.
enjoy,
Andrew
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFA] A missing ATTRIBUTE_UNUSED
2002-01-29 11:40 ` Andrew Cagney
@ 2002-01-29 11:45 ` Daniel Jacobowitz
2002-01-29 19:47 ` Alan Modra
0 siblings, 1 reply; 5+ messages in thread
From: Daniel Jacobowitz @ 2002-01-29 11:45 UTC (permalink / raw)
To: binutils
On Tue, Jan 29, 2002 at 01:51:38PM -0500, Andrew Cagney wrote:
> >What's the policy on functions that conditionally use their arguments? I
> >couldn't find another example offhand, so I don't know if this patch is
> >right.
> >
> >With this one I can do most of a -Werror build again.
>
>
> Have a look in BFD :-)
>
> BINUTILS uses ATTRIBUTE_UNUSED. GDB uses -Wno-unused-params.
This is conditionally unused, according to conditional compilation;
that's what I couldn't find an example of. I think it's fine, though.
I understand GDB's reason for not using it, and I think that perhaps we
should instead have pushed for new attributes that provide the
functionality GDB wants.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFA] A missing ATTRIBUTE_UNUSED
2002-01-29 11:45 ` Daniel Jacobowitz
@ 2002-01-29 19:47 ` Alan Modra
2002-01-29 21:43 ` Daniel Jacobowitz
0 siblings, 1 reply; 5+ messages in thread
From: Alan Modra @ 2002-01-29 19:47 UTC (permalink / raw)
To: binutils
On Tue, Jan 29, 2002 at 02:16:59PM -0500, Daniel Jacobowitz wrote:
>
> This is conditionally unused, according to conditional compilation;
> that's what I couldn't find an example of. I think it's fine, though.
I'd do exactly as you did.
--
Alan Modra
IBM OzLabs - Linux Technology Centre
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFA] A missing ATTRIBUTE_UNUSED
2002-01-29 19:47 ` Alan Modra
@ 2002-01-29 21:43 ` Daniel Jacobowitz
0 siblings, 0 replies; 5+ messages in thread
From: Daniel Jacobowitz @ 2002-01-29 21:43 UTC (permalink / raw)
To: binutils
On Wed, Jan 30, 2002 at 11:59:10AM +1030, Alan Modra wrote:
> On Tue, Jan 29, 2002 at 02:16:59PM -0500, Daniel Jacobowitz wrote:
> >
> > This is conditionally unused, according to conditional compilation;
> > that's what I couldn't find an example of. I think it's fine, though.
>
> I'd do exactly as you did.
Committed as is then.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2002-01-30 5:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-29 9:13 [RFA] A missing ATTRIBUTE_UNUSED Daniel Jacobowitz
2002-01-29 11:40 ` Andrew Cagney
2002-01-29 11:45 ` Daniel Jacobowitz
2002-01-29 19:47 ` Alan Modra
2002-01-29 21:43 ` Daniel Jacobowitz
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).