PR c++/15745
* except.c (prepare_eh_type): Use type_decays_to.
From-SVN: r128174
2007-09-05 Jason Merrill <jason@redhat.com>
+ PR c++/15745
+ * except.c (prepare_eh_type): Use type_decays_to.
+
PR c++/15097
* init.c (build_delete): Use build_headof to get the address of the
complete object if we aren't using the deleting destructor.
/* Peel off cv qualifiers. */
type = TYPE_MAIN_VARIANT (type);
+ /* Functions and arrays decay to pointers. */
+ type = type_decays_to (type);
+
return type;
}
--- /dev/null
+// PR c++/15745
+// { dg-do run }
+
+typedef int IntArray[10];
+IntArray i;
+
+void test_array() throw (IntArray)
+{
+ throw i;
+}
+
+int main ()
+{
+ try
+ {
+ test_array();
+ }
+ catch (IntArray) {}
+}
try {
int a[i];
throw &a; // { dg-error "variable size" }
- } catch (int (&)[i]) { // { dg-error "variable size" }
+ } catch (int (*)[i]) { // { dg-error "variable size" }
}
}