------- Comment #4 from hjl dot tools at gmail dot com 2008-07-26 18:05 ------- This works for me:
Index: class.c =================================================================== --- class.c (revision 138172) +++ class.c (working copy) @@ -4107,7 +4107,7 @@ type_has_user_provided_constructor (tree bool type_has_user_provided_default_constructor (tree t) { - tree fns; + tree fns, args; if (!TYPE_HAS_USER_CONSTRUCTOR (t)) return false; @@ -4116,10 +4116,17 @@ type_has_user_provided_default_construct { tree fn = OVL_CURRENT (fns); if (TREE_CODE (fn) == FUNCTION_DECL - && user_provided_p (fn) - && (skip_artificial_parms_for (fn, DECL_ARGUMENTS (fn)) - == NULL_TREE)) - return true; + && user_provided_p (fn)) + { + if (skip_artificial_parms_for (fn, DECL_ARGUMENTS (fn)) + == NULL_TREE) + return true; + args = FUNCTION_FIRST_USER_PARMTYPE (fn); + while (args && TREE_PURPOSE (args)) + args = TREE_CHAIN (args); + if (!args || args == void_list_node) + return true; + } } return false; Is this correct? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36944