From 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 7 Apr 2024 13:41:34 -0500 Subject: new repository --- devdocs/gcc~13/type-attributes.html | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 devdocs/gcc~13/type-attributes.html (limited to 'devdocs/gcc~13/type-attributes.html') diff --git a/devdocs/gcc~13/type-attributes.html b/devdocs/gcc~13/type-attributes.html new file mode 100644 index 00000000..dce2fefa --- /dev/null +++ b/devdocs/gcc~13/type-attributes.html @@ -0,0 +1,6 @@ +

6.35 Specifying Attributes of Types ΒΆ

The keyword __attribute__ allows you to specify various special properties of types. Some type attributes apply only to structure and union types, and in C++, also class types, while others can apply to any type defined via a typedef declaration. Unless otherwise specified, the same restrictions and effects apply to attributes regardless of whether a type is a trivial structure or a C++ class with user-defined constructors, destructors, or a copy assignment.

Other attributes are defined for functions (see Declaring Attributes of Functions), labels (see Label Attributes), enumerators (see Enumerator Attributes), statements (see Statement Attributes), and for variables (see Specifying Attributes of Variables).

The __attribute__ keyword is followed by an attribute specification enclosed in double parentheses.

You may specify type attributes in an enum, struct or union type declaration or definition by placing them immediately after the struct, union or enum keyword. You can also place them just past the closing curly brace of the definition, but this is less preferred because logically the type should be fully defined at the closing brace.

You can also include type attributes in a typedef declaration. See Attribute Syntax, for details of the exact syntax for using attributes.

+

+ © Free Software Foundation
Licensed under the GNU Free Documentation License, Version 1.3.
+ https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Type-Attributes.html +

+
-- cgit v1.2.3