aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/doc/extend.texi11
2 files changed, 16 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 3b42488..143a439 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2018-11-15 Sandra Loosemore <sandra@codesourcery.com>
+
+ PR other/56334
+ * doc/extend.texi (Common Function Attributes): Clarify linker
+ restrictions on "aligned" attribute.
+ (Common Variable Attributes): Likewise. Mention that linker
+ restrictions don't apply to stack-allocated variables.
+
2018-11-15 Joern Rennecke <joern.rennecke@riscy-ip.com>
* gensupport.c (add_predicate_code): Properly handle ZERO_EXTRACT
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index 15d973a..d4b1046 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -2396,7 +2396,8 @@ alignment this overrides the effect of the
function.
Note that the effectiveness of @code{aligned} attributes may be
-limited by inherent limitations in your linker. On many systems, the
+limited by inherent limitations in the system linker
+and/or object file format. On some 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
@@ -6132,8 +6133,9 @@ 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.
-Note that the effectiveness of @code{aligned} attributes may be limited
-by inherent limitations in your linker. On many systems, the linker is
+Note that the effectiveness of @code{aligned} attributes for static
+variables may be limited by inherent limitations in the system linker
+and/or object file format. On some systems, the linker is
only able to arrange for variables to be aligned up to a certain maximum
alignment. (For some linkers, the maximum supported alignment may
be very very small.) If your linker is only able to align variables
@@ -6141,6 +6143,9 @@ 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.
+Stack variables are not affected by linker restrictions; GCC can properly
+align them on any target.
+
The @code{aligned} attribute can also be used for functions
(@pxref{Common Function Attributes}.)