diff options
author | Sandra Loosemore <sandra@codesourcery.com> | 2018-11-12 01:23:16 -0500 |
---|---|---|
committer | Sandra Loosemore <sandra@gcc.gnu.org> | 2018-11-12 01:23:16 -0500 |
commit | 8f64958b766d25f6ccf962da92983a32e4aa37ae (patch) | |
tree | 4cbf1e661bffa8fc70d9e0d07af0994835eeedac /gcc | |
parent | 31fad58fbb30f1fd37c57417d0e12a0cf13316b5 (diff) | |
download | gcc-8f64958b766d25f6ccf962da92983a32e4aa37ae.zip gcc-8f64958b766d25f6ccf962da92983a32e4aa37ae.tar.gz gcc-8f64958b766d25f6ccf962da92983a32e4aa37ae.tar.bz2 |
re PR c/69502 (attribute aligned reduces alignment contrary to documentation)
2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
PR c/69502
gcc/
* doc/extend.texi (Common Type Attributes): For the align type
attribute, copy language about decreasing alignment from the
corresponding variable attribute.
From-SVN: r266025
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/doc/extend.texi | 7 |
2 files changed, 12 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 066ef79..07661bb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2018-11-11 Sandra Loosemore <sandra@codesourcery.com> + + PR c/69502 + * doc/extend.texi (Common Type Attributes): For the align type + attribute, copy language about decreasing alignment from the + corresponding variable attribute. + 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com> * config/csky/csky.md (*fpuv2_nmulsf3_1, *fpuv2_nmuldf3_1): Handle diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index 022d0e0..ebdc0ce 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -7101,8 +7101,11 @@ up to a maximum of 8-byte alignment, then specifying @code{aligned(16)} in an @code{__attribute__} still only provides you with 8-byte alignment. See your linker documentation for further information. -The @code{aligned} attribute can only increase alignment. Alignment -can be decreased by specifying the @code{packed} attribute. See below. +When used on a struct, or struct member, the @code{aligned} attribute can +only increase the alignment; in order to decrease it, the @code{packed} +attribute must be specified as well. When used as part of a typedef, the +@code{aligned} attribute can both increase and decrease alignment, and +specifying the @code{packed} attribute generates a warning. @cindex @code{warn_if_not_aligned} type attribute @item warn_if_not_aligned (@var{alignment}) |