diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2005-08-04 21:44:32 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2005-08-04 21:44:32 +0000 |
commit | 882afc5c82545641770d4c332f982303ca89e997 (patch) | |
tree | 59345404e664520d7e84b59ae50169bee4b9b766 /gcc/cp/decl.c | |
parent | 4b957f25e68ce23d1d745e638d23e92d5d1d3d7d (diff) |
2005-07-25 Fariborz Jahanian <fjahanian@apple.com>
Radar 4187916
* cp-tree.h (can_convert_arg, fn_type_unification): New argument.
* call.c (add_template_candidate_real): Pass down 'flags' to
fn_type_unification.
(can_convert_arg): New 'flags' argument. Pass it to call to
implicit_conversion instead of LOOKUP_NORMAL.
* class.c (resolve_address_of_overloaded_function): Add
LOOKUP_NORMAL in call to can_convert_arg.
(resolve_address_of_overloaded_function): Ditto.
* decl.c (reshape_init, check_default_argument): Ditto.
* typeck.c (build_ptrmemfunc): Ditto.
* typeck2.c (digest_init): Ditto.
(unify): Add LOOKUP_NORMAL to call to type_unification_real.
* pt.c (type_unification_real): Add 'flags' argument.
(fn_type_unification): Pass 'flags' to type_unification_real.
(type_unification_real): Pass new 'flags' argument to call to
can_convert_arg.
Oked by Devang.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/apple-local-200502-branch@102748 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r-- | gcc/cp/decl.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 6f8e85e7526..1af2756eb4c 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -4396,7 +4396,8 @@ reshape_init (tree type, tree *initp) initializer is considered for the initialization of the first member of the subaggregate. */ if (!brace_enclosed_p - && can_convert_arg (type, TREE_TYPE (old_init_value), old_init_value)) + /* APPLE LOCAL radar 4187916 */ + && can_convert_arg (type, TREE_TYPE (old_init_value), old_init_value, LOOKUP_NORMAL)) { *initp = TREE_CHAIN (old_init); TREE_CHAIN (old_init) = NULL_TREE; @@ -8515,7 +8516,8 @@ check_default_argument (tree decl, tree arg) A default argument expression is implicitly converted to the parameter type. */ if (!TREE_TYPE (arg) - || !can_convert_arg (decl_type, TREE_TYPE (arg), arg)) + /* APPLE LOCAL radar 4187916 */ + || !can_convert_arg (decl_type, TREE_TYPE (arg), arg, LOOKUP_NORMAL)) { if (decl) error ("default argument for %q#D has type %qT", |