This is the mail archive of the
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.
2013-09-19 Marek Polacek <firstname.lastname@example.org>
* 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
-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
When applied to a static data member of a C++ class template, the
attribute also means that the member is instantiated if the