]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: extend.texi (PowerPC Altivec/VSX Built-in Functions): Describe when a typed...
authorBill Schmidt <wschmidt@linux.ibm.com>
Wed, 19 Dec 2018 18:34:25 +0000 (18:34 +0000)
committerWilliam Schmidt <wschmidt@gcc.gnu.org>
Wed, 19 Dec 2018 18:34:25 +0000 (18:34 +0000)
2018-12-19  Bill Schmidt  <wschmidt@linux.ibm.com>

Backport from mainline
2018-12-18  Bill Schmidt  <wschmidt@linux.ibm.com>

* doc/extend.texi (PowerPC Altivec/VSX Built-in Functions):
Describe when a typedef name can be used as the type specifier for
a vector type, and when it cannot.

From-SVN: r267284

gcc/ChangeLog
gcc/doc/extend.texi

index 894ffea28b12eeab5ca71224e8c46c345f1b396b..56b1d8f82944aa4a51d6e75873d6342f58e07d4f 100644 (file)
@@ -1,3 +1,12 @@
+2018-12-19  Bill Schmidt  <wschmidt@linux.ibm.com>
+
+        Backport from mainline
+        2018-12-18  Bill Schmidt  <wschmidt@linux.ibm.com>
+
+        * doc/extend.texi (PowerPC Altivec/VSX Built-in Functions):
+        Describe when a typedef name can be used as the type specifier for
+        a vector type, and when it cannot.
+
 2018-12-19  Segher Boessenkool  <segher@kernel.crashing.org>
 
        Backport from trunk
index b0a1b7ffac6bdd20a0b360ffeea3b95113b4aaa4..d1ba85e709a45e73c24bbb736b9a313b264bc0b1 100644 (file)
@@ -15566,7 +15566,30 @@ disabled.  To use them, you must include @code{<altivec.h>} instead.
 
 @item
 GCC allows using a @code{typedef} name as the type specifier for a
-vector type.
+vector type, but only under the following circumstances:
+
+@itemize @bullet
+
+@item
+When using @code{__vector} instead of @code{vector}; for example,
+
+@smallexample
+typedef signed short int16;
+__vector int16 data;
+@end smallexample
+
+@item
+When using @code{vector} in keyword-and-predefine mode; for example,
+
+@smallexample
+typedef signed short int16;
+vector int16 data;
+@end smallexample
+
+Note that keyword-and-predefine mode is enabled by disabling GNU
+extensions (e.g., by using @code{-std=c11}) and including
+@code{<altivec.h>}.
+@end itemize
 
 @item
 For C, overloaded functions are implemented with macros so the following