[Bug c/58467] New: Documentation of the "used" variable attribute needs additional information
psmith at gnu dot org
gcc-bugzilla@gcc.gnu.org
Wed Sep 18 15:56:00 GMT 2013
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.
More information about the Gcc-bugs
mailing list