aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/except.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2007-09-05 23:33:46 -0400
committerJason Merrill <jason@gcc.gnu.org>2007-09-05 23:33:46 -0400
commit86ef5ebb1e0b3fbb1587396b074be65a61623e85 (patch)
tree0071d13ad9499501172974d99b0ed377b76af9b2 /gcc/cp/except.c
parent8c292a7298d84e0942957689aac056d2f9ccf627 (diff)
downloadgcc-86ef5ebb1e0b3fbb1587396b074be65a61623e85.zip
gcc-86ef5ebb1e0b3fbb1587396b074be65a61623e85.tar.gz
gcc-86ef5ebb1e0b3fbb1587396b074be65a61623e85.tar.bz2
re PR c++/15745 (exception specification incorrectly changes the type of the exception thrown)
PR c++/15745 * except.c (prepare_eh_type): Use type_decays_to. From-SVN: r128174
Diffstat (limited to 'gcc/cp/except.c')
-rw-r--r--gcc/cp/except.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/cp/except.c b/gcc/cp/except.c
index 199d185..38111b1 100644
--- a/gcc/cp/except.c
+++ b/gcc/cp/except.c
@@ -115,6 +115,9 @@ prepare_eh_type (tree type)
/* Peel off cv qualifiers. */
type = TYPE_MAIN_VARIANT (type);
+ /* Functions and arrays decay to pointers. */
+ type = type_decays_to (type);
+
return type;
}