other/5026: __attribute__ ((unused) seems misdocumented

bh@techhouse.brown.edu bh@techhouse.brown.edu
Wed Dec 5 22:19:00 GMT 2001


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



More information about the Gcc-bugs mailing list