This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

other/5026: __attribute__ ((unused) seems misdocumented



>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:


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