summaryrefslogtreecommitdiff
path: root/gcc/cp/decl2.c
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2011-11-14 14:34:33 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2011-11-14 14:34:33 +0000
commit1e87b08a4c89ee453308a0b09b5bc40a5e3bec10 (patch)
treeed7af923d74901a7a6ff5d07ef176a640a585ba7 /gcc/cp/decl2.c
parentcbacd2740bd9c2dfe6a0a755f74ddb45781a0665 (diff)
downloadgcc-1e87b08a4c89ee453308a0b09b5bc40a5e3bec10.tar.gz
2011-11-14 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 181350 using svnmerge git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@181351 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/decl2.c')
-rw-r--r--gcc/cp/decl2.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index 3dc5a69df54..05f4b42ac73 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -495,6 +495,7 @@ check_member_template (tree tmpl)
decl = DECL_TEMPLATE_RESULT (tmpl);
if (TREE_CODE (decl) == FUNCTION_DECL
+ || DECL_ALIAS_TEMPLATE_P (tmpl)
|| (TREE_CODE (decl) == TYPE_DECL
&& MAYBE_CLASS_TYPE_P (TREE_TYPE (decl))))
{
@@ -4346,6 +4347,14 @@ mark_used (tree decl)
&& !DECL_DEFAULTED_OUTSIDE_CLASS_P (decl)
&& ! DECL_INITIAL (decl))
{
+ /* Defer virtual destructors so that thunks get the right
+ linkage. */
+ if (DECL_VIRTUAL_P (decl) && !at_eof)
+ {
+ note_vague_linkage_fn (decl);
+ return true;
+ }
+
/* Remember the current location for a function we will end up
synthesizing. Then we can inform the user where it was
required in the case of error. */
@@ -4357,7 +4366,7 @@ mark_used (tree decl)
on the stack (such as overload resolution candidates).
We could just let cp_write_global_declarations handle synthesizing
- this function, since we just added it to deferred_fns, but doing
+ this function by adding it to deferred_fns, but doing
it at the use site produces better error messages. */
++function_depth;
synthesize_method (decl);