summaryrefslogtreecommitdiff
path: root/contrib/gcc/doc/extend.texi
diff options
context:
space:
mode:
authorPedro F. Giffuni <pfg@FreeBSD.org>2013-12-22 00:45:08 +0000
committerPedro F. Giffuni <pfg@FreeBSD.org>2013-12-22 00:45:08 +0000
commitcc234fb900034fa0c6e1b6e35dcfa71c7d334670 (patch)
tree55bd6afeff4487d81fb283c54a91d8bb5bceb16e /contrib/gcc/doc/extend.texi
parent346c236e16d988455ffa991a7ec0e8f48b73eef5 (diff)
downloadsrc-test2-cc234fb900034fa0c6e1b6e35dcfa71c7d334670.tar.gz
src-test2-cc234fb900034fa0c6e1b6e35dcfa71c7d334670.zip
Notes
Diffstat (limited to 'contrib/gcc/doc/extend.texi')
-rw-r--r--contrib/gcc/doc/extend.texi25
1 files changed, 25 insertions, 0 deletions
diff --git a/contrib/gcc/doc/extend.texi b/contrib/gcc/doc/extend.texi
index d27af1083a41..5d9300ee6788 100644
--- a/contrib/gcc/doc/extend.texi
+++ b/contrib/gcc/doc/extend.texi
@@ -1577,6 +1577,7 @@ The keyword @code{__attribute__} allows you to specify special
attributes when making a declaration. This keyword is followed by an
attribute specification inside double parentheses. The following
attributes are currently defined for functions on all targets:
+@code{aligned},
@code{noreturn}, @code{returns_twice}, @code{noinline}, @code{always_inline},
@code{flatten}, @code{pure}, @code{const}, @code{nothrow}, @code{sentinel},
@code{format}, @code{format_arg}, @code{no_instrument_function},
@@ -1615,6 +1616,27 @@ is not defined in the same translation unit.
Not all target machines support this attribute.
+@item aligned (@var{alignment})
+@cindex @code{aligned} attribute
+This attribute specifies a minimum alignment for the function,
+measured in bytes.
+
+You cannot use this attribute to decrease the alignment of a function,
+only to increase it. However, when you explicitly specify a function
+alignment this will override the effect of the
+@option{-falign-functions} (@pxref{Optimize Options}) option for this
+function.
+
+Note that the effectiveness of @code{aligned} attributes may be
+limited by inherent limitations in your linker. On many systems, the
+linker is only able to arrange for functions to be aligned up to a
+certain maximum alignment. (For some linkers, the maximum supported
+alignment may be very very small.) See your linker documentation for
+further information.
+
+The @code{aligned} attribute can also be used for variables and fields
+(@pxref{Variable Attributes}.)
+
@item always_inline
@cindex @code{always_inline} function attribute
Generally, functions are not inlined unless optimization is specified.
@@ -3044,6 +3066,9 @@ up to a maximum of 8 byte alignment, then specifying @code{aligned(16)}
in an @code{__attribute__} will still only provide you with 8 byte
alignment. See your linker documentation for further information.
+The @code{aligned} attribute can also be used for functions
+(@pxref{Function Attributes}.)
+
@item cleanup (@var{cleanup_function})
@cindex @code{cleanup} attribute
The @code{cleanup} attribute runs a function when the variable goes