This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Amend attribute used documentation (PR other/58467)
- From: Marek Polacek <polacek at redhat dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 19 Sep 2013 16:36:20 +0200
- Subject: [PATCH] Amend attribute used documentation (PR other/58467)
- Authentication-results: sourceware.org; auth=none
__attribute__((used)) is meant to be used only on VAR_DECLs that are
TREE_STATIC, but the documentation does not say that. Thus fixed.
Ok?
2013-09-19 Marek Polacek <polacek@redhat.com>
PR other/58467
* doc/extend.texi: Document that attribute used is meant to be used
on variables with static storage duration.
--- gcc/doc/extend.texi.mp 2013-09-19 16:22:16.214492101 +0200
+++ gcc/doc/extend.texi 2013-09-19 16:35:19.874041331 +0200
@@ -4891,8 +4891,9 @@ to be possibly unused. GCC does not pro
variable.
@item used
-This attribute, attached to a variable, means that the variable must be
-emitted even if it appears that the variable is not referenced.
+This attribute, attached to a variable with static storage duration, means
+that the variable must be emitted even if it appears that the variable is
+not referenced.
When applied to a static data member of a C++ class template, the
attribute also means that the member is instantiated if the
Marek