aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2005-11-16 15:22:00 -0500
committerJason Merrill <jason@gcc.gnu.org>2005-11-16 15:22:00 -0500
commit6276e725b276838be6383f941bec392e182d63b0 (patch)
tree1881ef0d7802af8ac86d9f4c38b44d029e6eb5ac
parentf001093a6ac91b1a8fbdf56983a1b29157d05a95 (diff)
downloadgcc-6276e725b276838be6383f941bec392e182d63b0.zip
gcc-6276e725b276838be6383f941bec392e182d63b0.tar.gz
gcc-6276e725b276838be6383f941bec392e182d63b0.tar.bz2
re PR c++/24580 (virtual base class cause exception not to be caught)
PR c++/24580 * method.c (locate_copy): Also use skip_artificial_parms here. (synthesize_exception_spec): Use CLASS_TYPE_P rather than checking for RECORD_TYPE. (locate_ctor): Abort if we fail to find a default constructor. From-SVN: r107097
-rw-r--r--gcc/cp/ChangeLog8
-rw-r--r--gcc/cp/method.c6
2 files changed, 11 insertions, 3 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 6d354d9..378c324 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,11 @@
+2005-11-15 Jason Merrill <jason@redhat.com>
+
+ PR c++/24580
+ * method.c (locate_copy): Also use skip_artificial_parms here.
+ (synthesize_exception_spec): Use CLASS_TYPE_P rather than checking
+ for RECORD_TYPE.
+ (locate_ctor): Abort if we fail to find a default constructor.
+
2005-11-15 Mike Stump <mrs@apple.com>
* name-lookup.c (lookup_name_two): Add.
diff --git a/gcc/cp/method.c b/gcc/cp/method.c
index 82f4a36..f3c86d3 100644
--- a/gcc/cp/method.c
+++ b/gcc/cp/method.c
@@ -847,7 +847,7 @@ synthesize_exception_spec (tree type, tree (*extractor) (tree, void*),
continue;
while (TREE_CODE (type) == ARRAY_TYPE)
type = TREE_TYPE (type);
- if (TREE_CODE (type) != RECORD_TYPE)
+ if (!CLASS_TYPE_P (type))
continue;
fn = (*extractor) (type, client);
@@ -894,7 +894,7 @@ locate_ctor (tree type, void *client ATTRIBUTE_UNUSED)
if (sufficient_parms_p (parms))
return fn;
}
- return NULL_TREE;
+ gcc_unreachable ();
}
struct copy_data
@@ -941,7 +941,7 @@ locate_copy (tree type, void *client_)
int excess;
int quals;
- parms = TREE_CHAIN (parms);
+ parms = skip_artificial_parms_for (fn, parms);
if (!parms)
continue;
src_type = non_reference (TREE_VALUE (parms));