Copyright (C) 2000-2012 |
GNU Info (gcc-300.info)AttributesAttributes in trees =================== Attributes, as specified using the `__attribute__' keyword, are represented internally as a `TREE_LIST'. The `TREE_PURPOSE' is the name of the attribute, as an `IDENTIFIER_NODE'. The `TREE_VALUE' is a `TREE_LIST' of the arguments of the attribute, if any, or `NULL_TREE' if there are no arguments; the arguments are stored as the `TREE_VALUE' of successive entries in the list, and may be identifiers or expressions. The `TREE_CHAIN' of the attribute is the next attribute in a list of attributes applying to the same declaration or type, or `NULL_TREE' if there are no further attributes in the list. Attributes may be attached to declarations and to types; these attributes may be accessed with the following macros. At present only machine-dependent attributes are stored in this way (other attributes cause changes to the declaration or type or to other internal compiler data structures, but are not themselves stored along with the declaration or type), but in future all attributes may be stored like this. - Tree Macro: tree DECL_MACHINE_ATTRIBUTES (tree DECL) This macro returns the attributes on the declaration DECL. - Tree Macro: tree TYPE_ATTRIBUTES (tree TYPE) This macro returns the attributes on the type TYPE. |