diff options
| author | aldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-03-03 05:31:32 +0000 |
|---|---|---|
| committer | aldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-03-03 05:31:32 +0000 |
| commit | b448d263b39c3ce9fb390e41c81a1d43648ee98b (patch) | |
| tree | cf87ac9cea0213b0b6a32b6c89e566e814dab2f1 | |
| parent | 5befa2114d9618d7a2d9932de3567accf82217ce (diff) | |
| download | ppe42-gcc-b448d263b39c3ce9fb390e41c81a1d43648ee98b.tar.gz ppe42-gcc-b448d263b39c3ce9fb390e41c81a1d43648ee98b.zip | |
2003-03-02 Aldy Hernandez <aldyh@redhat.com>
* cp/decl.c (check_initializer): Check for vector_opaque_p.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63713 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/cp/ChangeLog | 4 | ||||
| -rw-r--r-- | gcc/cp/decl.c | 6 |
2 files changed, 10 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 30efcf37464..f9fb1f50d02 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +2003-03-02 Aldy Hernandez <aldyh@redhat.com> + + * decl.c (check_initializer): Check for vector_opaque_p. + 2003-03-02 Ashif Harji <asharji@uwaterloo.ca> * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 2f29c481756..216d7fef36f 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -7772,6 +7772,12 @@ check_initializer (tree decl, tree init, int flags) scalar, so just don't call it. */ if (CP_AGGREGATE_TYPE_P (type)) init = reshape_init (type, &init); + + if ((*targetm.vector_opaque_p) (type)) + { + error ("opaque vector types cannot be initialized"); + init = error_mark_node; + } } /* If DECL has an array type without a specific bound, deduce the |

