http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58467

            Bug ID: 58467
           Summary: Documentation of the "used" variable attribute needs
                    additional information
           Product: gcc
           Version: 4.8.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: psmith at gnu dot org

The "used" variable attribute in the GCC documentation (gcc/doc/extend.texi,
section "Variable Attributes") says that it can be "attached to a variable".

However, this attribute cannot be applied to auto variables, only global or
static variables.  If you try to attach __attribute__((used)) to an auto
variable you'll get a confusing error saying that you can't do that, with no
reason why, and the documentation doesn't provide any guidance.

Reply via email to