aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/cp-tree.h
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2010-07-15 16:45:35 -0400
committerJason Merrill <jason@gcc.gnu.org>2010-07-15 16:45:35 -0400
commit10746f37151f5301116f642efa6b9a19c17e2aee (patch)
treed24edade7e9292821567ee6d7750184f5d39c55d /gcc/cp/cp-tree.h
parent8e7af53e4a83fec17fed87aa5193f9144f1061e3 (diff)
downloadgcc-10746f37151f5301116f642efa6b9a19c17e2aee.zip
gcc-10746f37151f5301116f642efa6b9a19c17e2aee.tar.gz
gcc-10746f37151f5301116f642efa6b9a19c17e2aee.tar.bz2
re PR c++/44909 ([C++0x] Copy constructors implicitly deleted)
PR c++/44909 * call.c (add_function_candidate): If we're working on an implicit declaration, don't consider candidates that won't match. * typeck.c (same_type_ignoring_top_level_qualifiers_p): Now a fn. * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): Adjust. Revert: * cp-tree.h (struct lang_type_class): Add has_user_opeq. (TYPE_HAS_USER_OPEQ): New. * decl.c (grok_special_member_properties): Set it. * class.c (add_implicitly_declared_members): Don't lazily declare constructors/operator= if a base or member has a user-declared one. (check_bases_and_members, check_bases): Adjust. (check_field_decls, check_field_decl): Adjust. From-SVN: r162233
Diffstat (limited to 'gcc/cp/cp-tree.h')
-rw-r--r--gcc/cp/cp-tree.h13
1 files changed, 2 insertions, 11 deletions
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index d5b0161..13d43da 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -289,11 +289,6 @@ typedef struct ptrmem_cst * ptrmem_cst_t;
#define same_type_p(TYPE1, TYPE2) \
comptypes ((TYPE1), (TYPE2), COMPARE_STRICT)
-/* Returns nonzero iff TYPE1 and TYPE2 are the same type, ignoring
- top-level qualifiers. */
-#define same_type_ignoring_top_level_qualifiers_p(TYPE1, TYPE2) \
- same_type_p (TYPE_MAIN_VARIANT (TYPE1), TYPE_MAIN_VARIANT (TYPE2))
-
/* Nonzero if we are presently building a statement tree, rather
than expanding each statement as we encounter it. */
#define building_stmt_tree() (cur_stmt_list != NULL_TREE)
@@ -1326,7 +1321,6 @@ struct GTY(()) lang_type_class {
unsigned lazy_move_assign : 1;
unsigned has_complex_move_ctor : 1;
unsigned has_complex_move_assign : 1;
- unsigned has_user_opeq : 1;
/* When adding a flag here, consider whether or not it ought to
apply to a template instance if it applies to the template. If
@@ -1335,7 +1329,7 @@ struct GTY(()) lang_type_class {
/* There are some bits left to fill out a 32-bit word. Keep track
of this by updating the size of this bitfield whenever you add or
remove a flag. */
- unsigned dummy : 3;
+ unsigned dummy : 4;
tree primary_base;
VEC(tree_pair_s,gc) *vcall_indices;
@@ -3143,10 +3137,6 @@ more_aggr_init_expr_args_p (const aggr_init_expr_arg_iterator *iter)
user-declared constructor. */
#define TYPE_HAS_USER_CONSTRUCTOR(NODE) (TYPE_LANG_FLAG_1 (NODE))
-/* ...or a user-declared operator=. */
-#define TYPE_HAS_USER_OPEQ(NODE) \
- (LANG_TYPE_CLASS_CHECK (NODE)->has_user_opeq)
-
/* When appearing in an INDIRECT_REF, it means that the tree structure
underneath is actually a call to a constructor. This is needed
when the constructor must initialize local storage (which can
@@ -5433,6 +5423,7 @@ extern int type_unknown_p (const_tree);
enum { ce_derived, ce_normal, ce_exact };
extern bool comp_except_specs (const_tree, const_tree, int);
extern bool comptypes (tree, tree, int);
+extern bool same_type_ignoring_top_level_qualifiers_p (tree, tree);
extern bool compparms (const_tree, const_tree);
extern int comp_cv_qualification (const_tree, const_tree);
extern int comp_cv_qual_signature (tree, tree);