diff options
Diffstat (limited to 'gcc/cp/cp-tree.h')
-rw-r--r-- | gcc/cp/cp-tree.h | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index 35819ed10c4..7b4277b05b7 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -420,6 +420,8 @@ typedef enum cpp0x_warn_str CPP0X_USER_DEFINED_LITERALS, /* delegating constructors */ CPP0X_DELEGATING_CTORS, + /* inheriting constructors */ + CPP0X_INHERITING_CTORS, /* C++11 attributes */ CPP0X_ATTRIBUTES } cpp0x_warn_str; @@ -2378,7 +2380,20 @@ struct GTY((variable_size)) lang_decl { /* The thunks associated with NODE, a FUNCTION_DECL. */ #define DECL_THUNKS(NODE) \ - (LANG_DECL_FN_CHECK (NODE)->context) + (DECL_VIRTUAL_P (NODE) ? LANG_DECL_FN_CHECK (NODE)->context : NULL_TREE) + +/* Set DECL_THUNKS. */ +#define SET_DECL_THUNKS(NODE,THUNKS) \ + (LANG_DECL_FN_CHECK (NODE)->context = (THUNKS)) + +/* If NODE, a FUNCTION_DECL, is a C++11 inheriting constructor, then this + is the base it inherits from. */ +#define DECL_INHERITED_CTOR_BASE(NODE) \ + (DECL_CONSTRUCTOR_P (NODE) ? LANG_DECL_FN_CHECK (NODE)->context : NULL_TREE) + +/* Set the inherited base. */ +#define SET_DECL_INHERITED_CTOR_BASE(NODE,INH) \ + (LANG_DECL_FN_CHECK (NODE)->context = (INH)) /* Nonzero if NODE is a thunk, rather than an ordinary function. */ #define DECL_THUNK_P(NODE) \ @@ -4138,7 +4153,8 @@ typedef enum special_function_kind { sfk_deleting_destructor, /* A destructor for complete objects that deletes the object after it has been destroyed. */ - sfk_conversion /* A conversion operator. */ + sfk_conversion, /* A conversion operator. */ + sfk_inheriting_constructor /* An inheriting constructor */ } special_function_kind; /* The various kinds of linkage. From [basic.link], @@ -5319,6 +5335,7 @@ extern void use_thunk (tree, bool); extern bool trivial_fn_p (tree); extern bool maybe_explain_implicit_delete (tree); extern void explain_implicit_non_constexpr (tree); +extern void deduce_inheriting_ctor (tree); extern void synthesize_method (tree); extern tree lazily_declare_fn (special_function_kind, tree); @@ -5331,7 +5348,7 @@ extern tree get_default_ctor (tree); extern tree get_dtor (tree, tsubst_flags_t); extern tree locate_ctor (tree); extern tree implicitly_declare_fn (special_function_kind, tree, - bool); + bool, tree, tree); /* In optimize.c */ extern bool maybe_clone_body (tree); @@ -5366,6 +5383,7 @@ extern tree maybe_update_decl_type (tree, tree); extern bool check_default_tmpl_args (tree, tree, bool, bool, int); extern tree push_template_decl (tree); extern tree push_template_decl_real (tree, bool); +extern tree add_inherited_template_parms (tree, tree); extern bool redeclare_class_template (tree, tree); extern tree lookup_template_class (tree, tree, tree, tree, int, tsubst_flags_t); |