diff options
author | Mark Shinwell <shinwell@codesourcery.com> | 2007-01-08 09:25:07 +0000 |
---|---|---|
committer | Mark Shinwell <shinwell@gcc.gnu.org> | 2007-01-08 09:25:07 +0000 |
commit | 00c8e9f61310542dd3948933fab738970303b9d1 (patch) | |
tree | 3d101600d4d4d5150a485676365aecf8a6e1dbd7 /gcc/doc | |
parent | 46e3b90f7e326c672c4ecddf5287f603a89d03ef (diff) | |
download | gcc-00c8e9f61310542dd3948933fab738970303b9d1.zip gcc-00c8e9f61310542dd3948933fab738970303b9d1.tar.gz gcc-00c8e9f61310542dd3948933fab738970303b9d1.tar.bz2 |
c.opt: Add -flax-vector-conversions.
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.
From-SVN: r120572
Diffstat (limited to 'gcc/doc')
-rw-r--r-- | gcc/doc/invoke.texi | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 0b1ab49..d83f661 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}. |