From 6e1b3a7c949003ce1051d5bff4d162a80b418122 Mon Sep 17 00:00:00 2001 From: Aldy Hernandez Date: Mon, 3 Mar 2003 05:31:32 +0000 Subject: [PATCH] decl.c (check_initializer): Check for vector_opaque_p. 2003-03-02 Aldy Hernandez * cp/decl.c (check_initializer): Check for vector_opaque_p. From-SVN: r63713 --- gcc/cp/ChangeLog | 4 ++++ gcc/cp/decl.c | 6 ++++++ 2 files changed, 10 insertions(+) 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 + + * decl.c (check_initializer): Check for vector_opaque_p. + 2003-03-02 Ashif Harji * 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 -- 2.30.2