summaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2009-08-16 17:42:41 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2009-08-16 17:42:41 +0000
commitadbf3415141d38d95189c9387bbdd89b03db04eb (patch)
tree32fe1df0247ca1c2c6d69c4652436a8f5ef60956 /gcc/cp
parent7d9383c306dd44be3b3376e4f79da3c8fb66dde8 (diff)
downloadgcc-adbf3415141d38d95189c9387bbdd89b03db04eb.tar.gz
* decl2.c (mark_used): It's ok to synthesize for default args now.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@150805 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/decl2.c7
2 files changed, 5 insertions, 6 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index dc9f1cac4d7..e5ca35d90e5 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,7 @@
+2009-08-15 Jason Merrill <jason@redhat.com>
+
+ * decl2.c (mark_used): It's ok to synthesize for default args now.
+
2009-08-10 Jason Merrill <jason@redhat.com>
Implement DR 757: It's OK for a decl to use a type without linkage
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index 610d62d2e60..4644427eb03 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -3943,12 +3943,7 @@ mark_used (tree decl)
&& DECL_NONSTATIC_MEMBER_FUNCTION_P (decl)
&& DECL_DEFAULTED_FN (decl)
&& !DECL_THUNK_P (decl)
- && ! DECL_INITIAL (decl)
- /* Kludge: don't synthesize for default args. Unfortunately this
- rules out initializers of namespace-scoped objects too, but
- it's sort-of ok if the implicit ctor or dtor decl keeps
- pointing to the class location. */
- && current_function_decl)
+ && ! DECL_INITIAL (decl))
{
synthesize_method (decl);
/* If we've already synthesized the method we don't need to