diff options
author | Jason Merrill <jason@yorick.cygnus.com> | 1998-10-26 00:48:20 +0000 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 1998-10-25 19:48:20 -0500 |
commit | 879fb1de5c8670e52d298bcbaa5278d4794fbe4e (patch) | |
tree | 83e85864922eb01b5b4ba921cd412652f02ad0ca /gcc | |
parent | 083c24ed0037e8e50729fb9534d64b3003592d5c (diff) | |
download | gcc-879fb1de5c8670e52d298bcbaa5278d4794fbe4e.zip gcc-879fb1de5c8670e52d298bcbaa5278d4794fbe4e.tar.gz gcc-879fb1de5c8670e52d298bcbaa5278d4794fbe4e.tar.bz2 |
typeck.c (convert_arguments): Don't handle pmf references specially.
* typeck.c (convert_arguments): Don't handle pmf references
specially.
* init.c (build_member_call): Don't try to convert to the base type
if it's ambiguous.
* typeck2.c (check_for_new_type): Don't depend on pedantic.
From-SVN: r23338
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/cp/init.c | 7 | ||||
-rw-r--r-- | gcc/cp/typeck.c | 6 | ||||
-rw-r--r-- | gcc/cp/typeck2.c | 2 |
4 files changed, 16 insertions, 9 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 69287e3..4a22f1e 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,13 @@ +1998-10-26 Jason Merrill <jason@yorick.cygnus.com> + + * typeck.c (convert_arguments): Don't handle pmf references + specially. + + * init.c (build_member_call): Don't try to convert to the base type + if it's ambiguous. + + * typeck2.c (check_for_new_type): Don't depend on pedantic. + 1998-10-25 Mark Mitchell <mark@markmitchell.com> * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all diff --git a/gcc/cp/init.c b/gcc/cp/init.c index 82e616f..3b3ee7f 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -1417,8 +1417,11 @@ build_member_call (type, name, parmlist) decl = maybe_dummy_object (type, &basetype_path); /* Convert 'this' to the specified type to disambiguate conversion - to the function's context. */ - if (decl == current_class_ref) + to the function's context. Apparently Standard C++ says that we + shouldn't do this. */ + if (decl == current_class_ref + && ! pedantic + && ACCESSIBLY_UNIQUELY_DERIVED_P (type, current_class_type)) { tree olddecl = current_class_ptr; tree oldtype = TREE_TYPE (TREE_TYPE (olddecl)); diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index 254bc39..5030030 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -3063,12 +3063,6 @@ convert_arguments (typelist, values, fndecl, flags) error ("insufficient type information in parameter list"); val = integer_zero_node; } - else if (TREE_CODE (val) == OFFSET_REF - && TREE_CODE (TREE_TYPE (val)) == METHOD_TYPE) - { - /* This is unclean. Should be handled elsewhere. */ - val = build_unary_op (ADDR_EXPR, val, 0); - } else if (TREE_CODE (val) == OFFSET_REF) val = resolve_offset_ref (val); diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c index 809b89d..8fa70c9 100644 --- a/gcc/cp/typeck2.c +++ b/gcc/cp/typeck2.c @@ -1659,6 +1659,6 @@ check_for_new_type (string, inptree) char *string; flagged_type_tree inptree; { - if (pedantic && inptree.new_type_flag) + if (inptree.new_type_flag) pedwarn ("ANSI C++ forbids defining types within %s",string); } |