]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* decl2.c (mark_used): It's ok to synthesize for default args now.
authorJason Merrill <jason@redhat.com>
Sun, 16 Aug 2009 17:42:41 +0000 (13:42 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Sun, 16 Aug 2009 17:42:41 +0000 (13:42 -0400)
From-SVN: r150805

gcc/cp/ChangeLog
gcc/cp/decl2.c

index dc9f1cac4d7fe88e60936ee01df0411ff0a556f6..e5ca35d90e57a187552ce8dce6b3d70068034b0b 100644 (file)
@@ -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
index 610d62d2e60755525b4be15528ee1cb9930bb2c8..4644427eb03056112b753ca3959894d2cb74ffe2 100644 (file)
@@ -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