Movatterモバイル変換


[0]ホーム

URL:


Next:, Previous:, Up:Attributes Specific to GCC   [Contents][Index]


6.4.2 Specifying Attributes of Variables

You can use attributes to specify special propertiesof variables, function parameters, or structure, union, and, in C++, classmembers. Some attributes are currentlydefined generically for variables. Other attributes are defined forvariables on particular target systems. Other attributes are availablefor functions (seeDeclaring Attributes of Functions), labels (seeLabel Attributes),enumerators (seeEnumerator Attributes), statements(seeStatement Attributes), and for types (seeSpecifying Attributes of Types).Other front ends might define more attributes(seeExtensions to the C++ Language).

GCC provides two different ways to specify attributes: the traditionalGNU syntax using ‘__attribute__ ((...))’ annotations, and thenewer standard C and C++ syntax using ‘[[...]]’ with the‘gnu::’ prefix on attribute names. Note that the exact rules forplacement of attributes in your source code are different depending onwhich syntax you use. SeeAttribute Syntax, for details.


[8]ページ先頭

©2009-2026 Movatter.jp