diff options
author | Martin Sebor <msebor@redhat.com> | 2018-12-04 18:41:40 +0000 |
---|---|---|
committer | Martin Sebor <msebor@gcc.gnu.org> | 2018-12-04 11:41:40 -0700 |
commit | de117207d722031db5db9a1efafcda900ea14f77 (patch) | |
tree | b4db22c982dc8dafd0f2ae554b3780b4d8cc7b70 /gcc | |
parent | d012ab6057968dd5235a64c03c2824ee6e80eea4 (diff) | |
download | gcc-de117207d722031db5db9a1efafcda900ea14f77.zip gcc-de117207d722031db5db9a1efafcda900ea14f77.tar.gz gcc-de117207d722031db5db9a1efafcda900ea14f77.tar.bz2 |
extend.texi (attribute aligned): Expand.
gcc/ChangeLog:
* doc/extend.texi (attribute aligned): Expand.
From-SVN: r266792
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/doc/extend.texi | 24 |
2 files changed, 18 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bbfe5ae..0ab1186 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2018-12-04 Martin Sebor <msebor@redhat.com> + + * doc/extend.texi (attribute aligned): Expand. + 2018-12-04 David Edelsohn <dje.gcc@gmail.com> PR target/61976 diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index e0f9b38..0ae8bdd 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -2442,16 +2442,20 @@ and may not be available on all targets. @itemx aligned (@var{alignment}) @cindex @code{aligned} function attribute The @code{aligned} attribute specifies a minimum alignment for -the function, measured in bytes. When specified, @var{alignment} must -be an integer constant power of 2. Specifying no @var{alignment} argument -implies the maximum alignment for the target, which is often, but by no -means always, 8 or 16 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 overrides the effect of the -@option{-falign-functions} (@pxref{Optimize Options}) option for this -function. +the first instruction of the function, measured in bytes. When specified, +@var{alignment} must be an integer constant power of 2. Specifying no +@var{alignment} argument implies the ideal alignment for the target. +The @code{__alignof__} operator can be used to determine what that is +(@pxref{Alignment}). The attribute has no effect when a definition for +the function is not provided in the same translation unit. + +The attribute cannot be used to decrease the alignment of a function +previously declared with a more restrictive alignment; only to increase +it. Attempts to do otherwise are diagnosed. Some targets specify +a minimum default alignment for functions that is greater than 1. On +such targets, specifying a less restrictive alignment is silently ignored. +Using the attribute overrides 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 the system linker |