This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
other/5026: __attribute__ ((unused) seems misdocumented
- From: bh at techhouse dot brown dot edu
- To: gcc-gnats at gcc dot gnu dot org
- Date: 6 Dec 2001 04:40:16 -0000
- Subject: other/5026: __attribute__ ((unused) seems misdocumented
- Reply-to: bh at techhouse dot brown dot edu
>Number: 5026
>Category: other
>Synopsis: __attribute__ ((unused) seems misdocumented
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: unassigned
>State: open
>Class: doc-bug
>Submitter-Id: net
>Arrival-Date: Wed Dec 05 20:46:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: Benoit Hudson
>Release: 3.0.1
>Organization:
>Environment:
>Description:
node (gcc.info)Function Attributes says:
`unused'
This attribute, attached to a function, means that the function is
meant to be possibly unused. GCC will not produce a warning for
this function. GNU C++ does not currently support this attribute
as definitions without parameters are valid in C++.
Does that last sentence make any sense at all?
>How-To-Repeat:
>Fix:
Here's a possible rewriting which may be clearer overall:
`unused'
GCC -Wunused will warn about functions it finds that
are not used. Attaching this attribute to a function
will disable the warning for that function.
>Release-Note:
>Audit-Trail:
>Unformatted: