From: Bill Schmidt Date: Wed, 19 Dec 2018 18:34:25 +0000 (+0000) Subject: backport: extend.texi (PowerPC Altivec/VSX Built-in Functions): Describe when a typed... X-Git-Tag: releases/gcc-7.5.0~713 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=01ba73bce3975c24d8e9bc1e5378d110aacccda3;p=thirdparty%2Fgcc.git backport: 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-19 Bill Schmidt Backport from mainline 2018-12-18 Bill Schmidt * 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 894ffea28b12..56b1d8f82944 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2018-12-19 Bill Schmidt + + Backport from mainline + 2018-12-18 Bill Schmidt + + * 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 Backport from trunk diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index b0a1b7ffac6b..d1ba85e709a4 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -15566,7 +15566,30 @@ disabled. To use them, you must include @code{} 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{}. +@end itemize @item For C, overloaded functions are implemented with macros so the following