decl.c (check_initializer): Check for vector_opaque_p.
authorAldy Hernandez <aldyh@redhat.com>
Mon, 3 Mar 2003 05:31:32 +0000 (05:31 +0000)
committerAldy Hernandez <aldyh@gcc.gnu.org>
Mon, 3 Mar 2003 05:31:32 +0000 (05:31 +0000)
2003-03-02  Aldy Hernandez  <aldyh@redhat.com>

        * cp/decl.c (check_initializer): Check for vector_opaque_p.

From-SVN: r63713

gcc/cp/ChangeLog
gcc/cp/decl.c

index 30efcf37464516f8f744746d8a4b14347308a3ee..f9fb1f50d02b9e91e45d53ff3cfde0063821c94b 100644 (file)
@@ -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
index 2f29c48175663616b4405b7a9afc1756138cd4c9..216d7fef36f64e58225d91615dea2561d4b73aab 100644 (file)
@@ -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