aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Schmidt <wschmidt@linux.ibm.com>2018-12-18 13:46:10 +0000
committerWilliam Schmidt <wschmidt@gcc.gnu.org>2018-12-18 13:46:10 +0000
commit34a9bcaf8b71771f93fe1f09e0c060767bcb7601 (patch)
tree937714942d38f75c7a3222881fda0c5787c8d4bd
parent68d459d955db9c017d948397d70a0f4f03309e93 (diff)
downloadgcc-34a9bcaf8b71771f93fe1f09e0c060767bcb7601.zip
gcc-34a9bcaf8b71771f93fe1f09e0c060767bcb7601.tar.gz
gcc-34a9bcaf8b71771f93fe1f09e0c060767bcb7601.tar.bz2
extend.texi (PowerPC Altivec/VSX Built-in Functions): Describe when a typedef name can be used as the type specifier for a vector type...
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: r267232
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/doc/extend.texi25
2 files changed, 30 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5c8fc7e..7d97a05 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+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-18 Jozef Lawrynowicz <jozef.l@mittosystems.com>
* config/msp430/msp430.h: Define TARGET_VTABLE_ENTRY_ALIGN.
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index 5d8fc94..1849120 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -16616,7 +16616,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