summaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
authorshinwell <shinwell@138bc75d-0d04-0410-961f-82ee72b054a4>2007-01-08 09:25:07 +0000
committershinwell <shinwell@138bc75d-0d04-0410-961f-82ee72b054a4>2007-01-08 09:25:07 +0000
commit546c47949b213b0ec5ac97d3df37ca9ef7c7bf64 (patch)
tree3d101600d4d4d5150a485676365aecf8a6e1dbd7 /gcc/doc
parentdac21d574a4bafb500582fc847f4c3e7d781f3ba (diff)
downloadgcc-546c47949b213b0ec5ac97d3df37ca9ef7c7bf64.tar.gz
gcc/
* c.opt: Add -flax-vector-conversions. * c-typeck.c (convert_for_assignment): Pass flag to vector_types_convertible_p to allow emission of note. (digest_init): Likewise. (comptypes_internal): Use vector_types_convertible_p. * c-opts.c: Handle -flax-vector-conversions. * c-common.c (flag_lax_vector_conversions): New. (vector_types_convertible_p): Unless -flax-vector conversions has been passed, disallow conversions between vectors with differing numbers of subparts and/or element types. If such a conversion is disallowed, possibly emit a note on the first occasion only to inform the user of -flax-vector-conversions. The new last argument specifies this. * c-common.h (flag_lax_vector_conversions): New. (vector_types_convertible_p): Add extra argument. * config/i386/i386.c (ix86_init_mmx_sse_builtins): Use char_type_node for V*QI type vectors. * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Update to satisfy new typechecking rules. * config/rs6000/altivec.h (vec_cmple): Use vec_cmpge. * doc/invoke.texi (C Dialect Options): Document -flax-vector-conversions. gcc/cp/ * call.c (standard_conversion): Pass flag to vector_types_convertible_p to disallow emission of note. * typeck.c (convert_for_assignment): Pass flag to vector_types_convertible_p to allow emission of note. (ptr_reasonably_similar): Pass flag to vector_types_convertible_p to disallow emission of note. gcc/testsuite/ * gcc.target/i386/20020531-1.c: Use "char" not "unsigned char" in __v8qi typedef. * gcc.target/powerpc/altivec-vec-merge.c (foo): Add casts. * gcc.dg/simd-1.c: Update dg-error directives to reflect new compiler behaviour. * gcc.dg/simd-5.c: Likewise. * gcc.dg/simd-6.c: Likewise. * g++.dg/conversion/simd1.C: Likewise. * g++.dg/conversion/simd3.C: Likewise. * g++.dg/ext/attribute-test-2.C (data): Add "vs" member. (main): Use it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120572 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/doc')
-rw-r--r--gcc/doc/invoke.texi8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 0b1ab49ce49..d83f6610bd8 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -169,7 +169,7 @@ in the following sections.
-fno-asm -fno-builtin -fno-builtin-@var{function} @gol
-fhosted -ffreestanding -fopenmp -fms-extensions @gol
-trigraphs -no-integrated-cpp -traditional -traditional-cpp @gol
--fallow-single-precision -fcond-mismatch @gol
+-fallow-single-precision -fcond-mismatch -flax-vector-conversions @gol
-fsigned-bitfields -fsigned-char @gol
-funsigned-bitfields -funsigned-char}
@@ -1381,6 +1381,12 @@ Allow conditional expressions with mismatched types in the second and
third arguments. The value of such an expression is void. This option
is not supported for C++.
+@item -flax-vector-conversions
+@opindex flax-vector-conversions
+Allow implicit conversions between vectors with differing numbers of
+elements and/or incompatible element types. This option should not be
+used for new code.
+
@item -funsigned-char
@opindex funsigned-char
Let the type @code{char} be unsigned, like @code{unsigned char}.