aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/cp-tree.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/cp-tree.h')
-rw-r--r--gcc/cp/cp-tree.h255
1 files changed, 177 insertions, 78 deletions
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 3b50ffec48a..b97520baeca 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -1,6 +1,6 @@
/* Definitions for C++ parsing and type checking.
Copyright (C) 1987, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002 Free Software Foundation, Inc.
+ 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
Contributed by Michael Tiemann (tiemann@cygnus.com)
This file is part of GNU CC.
@@ -43,7 +43,6 @@ struct diagnostic_context;
DELETE_EXPR_USE_GLOBAL (in DELETE_EXPR).
LOOKUP_EXPR_GLOBAL (in LOOKUP_EXPR).
TREE_INDIRECT_USING (in NAMESPACE_DECL).
- LOCAL_BINDING_P (in CPLUS_BINDING)
ICS_USER_FLAG (in _CONV)
CLEANUP_P (in TRY_BLOCK)
AGGR_INIT_VIA_CTOR_P (in AGGR_INIT_EXPR)
@@ -55,14 +54,12 @@ struct diagnostic_context;
DELETE_EXPR_USE_VEC (in DELETE_EXPR).
(TREE_CALLS_NEW) (in _EXPR or _REF) (commented-out).
TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P (in _TYPE).
- INHERITED_VALUE_BINDING_P (in CPLUS_BINDING)
ICS_ELLIPSIS_FLAG (in _CONV)
BINFO_ACCESS (in BINFO)
DECL_INITIALIZED_P (in VAR_DECL)
2: IDENTIFIER_OPNAME_P.
TYPE_POLYMORPHIC_P (in _TYPE)
ICS_THIS_FLAG (in _CONV)
- BINDING_HAS_LEVEL_P (in CPLUS_BINDING)
BINFO_LOST_PRIMARY_P (in BINFO)
TREE_PARMLIST (in TREE_LIST)
3: TYPE_USES_VIRTUAL_BASECLASSES (in a class TYPE).
@@ -100,7 +97,8 @@ struct diagnostic_context;
DECL_IMPLICIT_TYPEDEF_P (in a TYPE_DECL)
3: DECL_IN_AGGR_P.
4: DECL_C_BIT_FIELD (in a FIELD_DECL)
- DECL_MAYBE_TEMPLATE (in a FUNCTION_DECL)
+ DECL_VAR_MARKED_P (in a VAR_DECL)
+ DECL_SELF_REFERENCE_P (in a TYPE_DECL)
5: DECL_INTERFACE_KNOWN.
6: DECL_THIS_STATIC (in VAR_DECL or FUNCTION_DECL).
7: DECL_DEAD_FOR_LOCAL (in VAR_DECL).
@@ -221,13 +219,63 @@ struct diagnostic_context;
(flag_abi_version == 0 || flag_abi_version >= (N))
+/* Datatype used to temporarily save C++ bindings (for implicit
+ instantiations purposes and like). Implemented in decl.c. */
+typedef struct cxx_saved_binding cxx_saved_binding;
+
+/* Datatype that represents binding established by a declaration between
+ a name and a C++ entity. */
+typedef struct cxx_binding cxx_binding;
+
+/* (GC-)allocate a cxx_binding object. */
+#define cxx_binding_make() (ggc_alloc (sizeof (cxx_binding)))
+
+/* Zero out a cxx_binding pointed to by B. */
+#define cxx_binding_clear(B) memset ((B), 0, sizeof (cxx_binding))
+
+struct cxx_binding GTY(())
+{
+ /* Link to chain together various bindings for this name. */
+ cxx_binding *previous;
+ /* The non-type entity this name is bound to. */
+ tree value;
+ /* The type entity this name is bound to. */
+ tree type;
+ union tree_binding_u {
+ tree GTY ((tag ("0"))) scope;
+ struct cp_binding_level * GTY ((tag ("1"))) level;
+ } GTY ((desc ("%0.has_level"))) scope;
+ unsigned has_level : 1;
+ unsigned value_is_inherited : 1;
+ unsigned is_local : 1;
+};
+
+/* The type of dictionary used to map names to types declared at
+ a given scope. */
+typedef struct binding_table_s *binding_table;
+typedef struct binding_entry_s *binding_entry;
+
+/* The type of a routine repeatedly called by binding_table_foreach. */
+typedef void (*bt_foreach_proc) (binding_entry, void *);
+
+struct binding_entry_s GTY(())
+{
+ binding_entry chain;
+ tree name;
+ tree type;
+};
+
+extern void binding_table_foreach (binding_table, bt_foreach_proc, void *);
+extern binding_entry binding_table_find (binding_table, tree);
+extern void cxx_remember_type_decls (binding_table);
+
/* Language-dependent contents of an identifier. */
struct lang_identifier GTY(())
{
struct c_common_identifier c_common;
- tree namespace_bindings;
- tree bindings;
+ cxx_binding *namespace_bindings;
+ cxx_binding *bindings;
tree class_value;
tree class_template_info;
struct lang_id2 *x;
@@ -280,30 +328,28 @@ typedef struct ptrmem_cst * ptrmem_cst_t;
/* Nonzero if this binding is for a local scope, as opposed to a class
or namespace scope. */
-#define LOCAL_BINDING_P(NODE) TREE_LANG_FLAG_0 (NODE)
+#define LOCAL_BINDING_P(NODE) ((NODE)->is_local)
/* Nonzero if BINDING_VALUE is from a base class of the class which is
currently being defined. */
-#define INHERITED_VALUE_BINDING_P(NODE) TREE_LANG_FLAG_1 (NODE)
+#define INHERITED_VALUE_BINDING_P(NODE) ((NODE)->value_is_inherited)
/* For a binding between a name and an entity at a non-local scope,
defines the scope where the binding is declared. (Either a class
_TYPE node, or a NAMESPACE_DECL.) This macro should be used only
for namespace-level bindings; on the IDENTIFIER_BINDING list
BINDING_LEVEL is used instead. */
-#define BINDING_SCOPE(NODE) \
- (((struct tree_binding*)CPLUS_BINDING_CHECK (NODE))->scope.scope)
+#define BINDING_SCOPE(NODE) ((NODE)->scope.scope)
/* Nonzero if NODE has BINDING_LEVEL, rather than BINDING_SCOPE. */
-#define BINDING_HAS_LEVEL_P(NODE) TREE_LANG_FLAG_2 (NODE)
+#define BINDING_HAS_LEVEL_P(NODE) ((NODE)->has_level)
/* This is the declaration bound to the name. Possible values:
variable, overloaded function, namespace, template, enumerator. */
-#define BINDING_VALUE(NODE) \
- (((struct tree_binding*)CPLUS_BINDING_CHECK (NODE))->value)
+#define BINDING_VALUE(NODE) ((NODE)->value)
/* If name is bound to a type, this is the type (struct, union, enum). */
-#define BINDING_TYPE(NODE) TREE_TYPE (NODE)
+#define BINDING_TYPE(NODE) ((NODE)->type)
#define IDENTIFIER_GLOBAL_VALUE(NODE) \
namespace_binding ((NODE), global_namespace)
@@ -337,17 +383,6 @@ typedef struct ptrmem_cst * ptrmem_cst_t;
&& DECL_NAME (NODE) != NULL_TREE \
&& MAIN_NAME_P (DECL_NAME (NODE)))
-
-struct tree_binding GTY(())
-{
- struct tree_common common;
- union tree_binding_u {
- tree GTY ((tag ("0"))) scope;
- struct cp_binding_level * GTY ((tag ("1"))) level;
- } GTY ((desc ("BINDING_HAS_LEVEL_P ((tree)&%0)"))) scope;
- tree value;
-};
-
/* The overloaded FUNCTION_DECL. */
#define OVL_FUNCTION(NODE) \
(((struct tree_overload*)OVERLOAD_CHECK (NODE))->function)
@@ -415,8 +450,8 @@ struct tree_srcloc GTY(())
#define IDENTIFIER_TEMPLATE(NODE) \
(LANG_IDENTIFIER_CAST (NODE)->class_template_info)
-/* The IDENTIFIER_BINDING is the innermost CPLUS_BINDING for the
- identifier. It's TREE_CHAIN is the next outermost binding. Each
+/* The IDENTIFIER_BINDING is the innermost cxx_binding for the
+ identifier. It's PREVIOUS is the next outermost binding. Each
BINDING_VALUE is a DECL for the associated declaration. Thus,
name lookup consists simply of pulling off the node at the front
of the list (modulo oddities for looking up the names of types,
@@ -428,9 +463,7 @@ struct tree_srcloc GTY(())
/* The IDENTIFIER_VALUE is the value of the IDENTIFIER_BINDING, or
NULL_TREE if there is no binding. */
#define IDENTIFIER_VALUE(NODE) \
- (IDENTIFIER_BINDING (NODE) \
- ? BINDING_VALUE (IDENTIFIER_BINDING (NODE)) \
- : NULL_TREE)
+ (IDENTIFIER_BINDING (NODE) ? BINDING_VALUE (IDENTIFIER_BINDING (NODE)) : 0)
/* If IDENTIFIER_CLASS_VALUE is set, then NODE is bound in the current
class, and IDENTIFIER_CLASS_VALUE is the value binding. This is
@@ -505,7 +538,6 @@ enum cp_tree_node_structure_enum {
TS_CP_IDENTIFIER,
TS_CP_TPI,
TS_CP_PTRMEM,
- TS_CP_BINDING,
TS_CP_OVERLOAD,
TS_CP_WRAPPER,
TS_CP_SRCLOC,
@@ -521,7 +553,6 @@ union lang_tree_node GTY((desc ("cp_tree_node_structure (&%h)"),
desc ("tree_node_structure (&%h)"))) generic;
struct template_parm_index_s GTY ((tag ("TS_CP_TPI"))) tpi;
struct ptrmem_cst GTY ((tag ("TS_CP_PTRMEM"))) ptrmem;
- struct tree_binding GTY ((tag ("TS_CP_BINDING"))) binding;
struct tree_overload GTY ((tag ("TS_CP_OVERLOAD"))) overload;
struct tree_wrapper GTY ((tag ("TS_CP_WRAPPER"))) wrapper;
struct tree_srcloc GTY ((tag ("TS_CP_SRCLOC"))) srcloc;
@@ -612,7 +643,7 @@ enum cp_tree_index
CPTI_DSO_HANDLE,
CPTI_DCAST,
- CPTI_DYNAMIC_CLASSES,
+ CPTI_KEYED_CLASSES,
CPTI_MAX
};
@@ -744,15 +775,16 @@ extern GTY(()) tree cp_global_trees[CPTI_MAX];
destructors. */
#define vtt_parm_type cp_global_trees[CPTI_VTT_PARM_TYPE]
-/* A TREE_LIST of all of the dynamic classes in the program. */
+/* A TREE_LIST of the dynamic classes whose vtables may have to be
+ emitted in this translation unit. */
-#define dynamic_classes cp_global_trees[CPTI_DYNAMIC_CLASSES]
+#define keyed_classes cp_global_trees[CPTI_KEYED_CLASSES]
/* Global state. */
struct saved_scope GTY(())
{
- tree old_bindings;
+ cxx_saved_binding *old_bindings;
tree old_namespace;
tree decl_ns_list;
tree class_name;
@@ -855,8 +887,12 @@ struct language_function GTY(())
int returns_null;
int returns_abnormally;
int in_function_try_handler;
+ int in_base_initializer;
int x_expanding_p;
+ /* True if this function can throw an exception. */
+ bool can_throw : 1;
+
struct named_label_use_list *x_named_label_uses;
struct named_label_list *x_named_labels;
struct cp_binding_level *bindings;
@@ -926,6 +962,9 @@ struct language_function GTY(())
#define doing_semantic_analysis_p() (!expanding_p)
+/* Non-zero if we are processing a base initializer. Zero elsewhere. */
+#define in_base_initializer cp_function_chain->in_base_initializer
+
#define in_function_try_handler cp_function_chain->in_function_try_handler
/* Expression always returned from function, or error_mark_node
@@ -941,6 +980,12 @@ extern GTY(()) tree global_namespace;
#define ansi_assopname(CODE) \
(assignment_operator_name_info[(int) (CODE)].identifier)
+/* True if NODE is an erroneous expression. */
+
+#define error_operand_p(NODE) \
+ ((NODE) == error_mark_node \
+ || ((NODE) && TREE_TYPE ((NODE)) == error_mark_node))
+
/* INTERFACE_ONLY nonzero means that we are in an "interface"
section of the compiler. INTERFACE_UNKNOWN nonzero means
we cannot trust the value of INTERFACE_ONLY. If INTERFACE_UNKNOWN
@@ -1054,18 +1099,19 @@ enum languages { lang_c, lang_cplusplus, lang_java };
/* Nonzero iff TYPE is derived from PARENT. Ignores accessibility and
ambiguity issues. */
#define DERIVED_FROM_P(PARENT, TYPE) \
- lookup_base ((TYPE), PARENT, ba_any, NULL)
+ (lookup_base ((TYPE), PARENT, ba_any, NULL) != NULL_TREE)
/* Nonzero iff TYPE is uniquely derived from PARENT. Ignores
accessibility. */
#define UNIQUELY_DERIVED_FROM_P(PARENT, TYPE) \
- lookup_base ((TYPE), (PARENT), ba_ignore | ba_quiet, NULL)
+ (lookup_base ((TYPE), (PARENT), ba_ignore | ba_quiet, NULL) != NULL_TREE)
/* Nonzero iff TYPE is accessible in the current scope and uniquely
derived from PARENT. */
#define ACCESSIBLY_UNIQUELY_DERIVED_P(PARENT, TYPE) \
- lookup_base ((TYPE), (PARENT), ba_check | ba_quiet, NULL)
+ (lookup_base ((TYPE), (PARENT), ba_check | ba_quiet, NULL) != NULL_TREE)
/* Nonzero iff TYPE is publicly & uniquely derived from PARENT. */
#define PUBLICLY_UNIQUELY_DERIVED_P(PARENT, TYPE) \
- lookup_base ((TYPE), (PARENT), ba_not_special | ba_quiet, NULL)
+ (lookup_base ((TYPE), (PARENT), ba_not_special | ba_quiet, NULL) \
+ != NULL_TREE)
/* This is a few header flags for 'struct lang_type'. Actually,
all but the first are used only for lang_type_class; they
@@ -1159,11 +1205,12 @@ struct lang_type_class GTY(())
tree vtables;
tree typeinfo_var;
tree vbases;
- tree tags;
+ binding_table nested_udts;
tree as_base;
tree pure_virtuals;
tree friend_classes;
tree methods;
+ tree key_method;
tree decl_list;
tree template_info;
tree befriending_classes;
@@ -1284,6 +1331,11 @@ struct lang_type GTY(())
hierarchy, then we can use more efficient search techniques. */
#define TYPE_USES_VIRTUAL_BASECLASSES(NODE) (TREE_LANG_FLAG_3 (NODE))
+/* The member function with which the vtable will be emitted:
+ the first noninline non-pure-virtual member function. NULL_TREE
+ if there is no key function or if this is a class template */
+#define CLASSTYPE_KEY_METHOD(NODE) (LANG_TYPE_CLASS_CHECK (NODE)->key_method)
+
/* Vector member functions defined in this class. Each element is
either a FUNCTION_DECL, a TEMPLATE_DECL, or an OVERLOAD. All
functions with the same name end up in the same slot. The first
@@ -1365,11 +1417,12 @@ struct lang_type GTY(())
#define SET_CLASSTYPE_MARKED6(NODE) SET_CLASSTYPE_MARKED_N (NODE, 5)
#define CLEAR_CLASSTYPE_MARKED6(NODE) CLEAR_CLASSTYPE_MARKED_N (NODE, 5)
-/* A list of the nested tag-types (class, struct, union, or enum)
- found within this class. The TREE_PURPOSE of each node is the name
- of the type; the TREE_VALUE is the type itself. This list includes
+/* A binding_table of the nested tag-types (class, struct, union, or enum)
+ found within this class. The ENTRY->name of each node is the name
+ of the type; the ENTRY->type is the type itself. This table includes
nested member class templates. */
-#define CLASSTYPE_TAGS(NODE) (LANG_TYPE_CLASS_CHECK (NODE)->tags)
+#define CLASSTYPE_NESTED_UDTS(NODE) \
+ (LANG_TYPE_CLASS_CHECK (NODE)->nested_udts)
/* Nonzero if NODE has a primary base class, i.e., a base class with
which it shares the virtual function table pointer. */
@@ -1952,6 +2005,11 @@ struct lang_decl GTY(())
#define DECL_CONV_FN_P(NODE) \
(IDENTIFIER_TYPENAME_P (DECL_NAME (NODE)))
+/* If FN is a conversion operator, the type to which it converts.
+ Otherwise, NULL_TREE. */
+#define DECL_CONV_FN_TYPE(FN) \
+ (DECL_CONV_FN_P (FN) ? TREE_TYPE (DECL_NAME (FN)) : NULL_TREE)
+
/* Nonzero if NODE, which is a TEMPLATE_DECL, is a template
conversion operator to a type dependent on the innermost template
args. */
@@ -2000,7 +2058,8 @@ struct lang_decl GTY(())
(TREE_LANG_FLAG_1 (VAR_DECL_CHECK (NODE)))
/* Nonzero if the DECL was initialized in the class definition itself,
- rather than outside the class. */
+ rather than outside the class. This is used for both static member
+ VAR_DECLS, and FUNTION_DECLS that are defined in the class. */
#define DECL_INITIALIZED_IN_CLASS_P(DECL) \
(DECL_LANG_SPECIFIC (DECL)->decl_flags.initialized_in_class)
@@ -2203,6 +2262,12 @@ struct lang_decl GTY(())
(DECL_LANG_SPECIFIC (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK (NODE)) \
->decl_flags.u.template_info)
+/* For a VAR_DECL, indicates that the variable has been processed.
+ This flag is set and unset throughout the code; it is always
+ used for a temporary purpose. */
+#define DECL_VAR_MARKED_P(NODE) \
+ (DECL_LANG_FLAG_4 (VAR_DECL_CHECK (NODE)))
+
/* Template information for a RECORD_TYPE or UNION_TYPE. */
#define CLASSTYPE_TEMPLATE_INFO(NODE) \
(LANG_TYPE_CLASS_CHECK (RECORD_OR_UNION_TYPE_CHECK (NODE))->template_info)
@@ -2455,6 +2520,10 @@ struct lang_decl GTY(())
(TREE_CODE (TYPE) == BOOLEAN_TYPE \
|| TREE_CODE (TYPE) == INTEGER_TYPE)
+/* Returns true if TYPE is an integral or enumeration name. */
+#define INTEGRAL_OR_ENUMERATION_TYPE_P(TYPE) \
+ (CP_INTEGRAL_TYPE_P (TYPE) || TREE_CODE (TYPE) == ENUMERAL_TYPE)
+
/* [basic.fundamental]
Integral and floating types are collectively called arithmetic
@@ -2477,9 +2546,12 @@ struct lang_decl GTY(())
An aggregate is an array or a class with no user-declared
constructors, no private or protected non-static data members, no
- base classes, and no virtual functions. */
+ base classes, and no virtual functions.
+
+ As an extension, we also treat vectors as aggregates. */
#define CP_AGGREGATE_TYPE_P(TYPE) \
(TREE_CODE (TYPE) == ARRAY_TYPE \
+ || TREE_CODE (TYPE) == VECTOR_TYPE \
|| (CLASS_TYPE_P (TYPE) \
&& !CLASSTYPE_NON_AGGREGATE (TYPE)))
@@ -2810,16 +2882,20 @@ struct lang_decl GTY(())
(TREE_CODE (NODE) == TYPE_DECL || DECL_CLASS_TEMPLATE_P (NODE))
/* Nonzero if NODE is the typedef implicitly generated for a type when
- the type is declared. (In C++, `struct S {};' is roughly equivalent
- to `struct S {}; typedef struct S S;' in C. This macro will hold
- for the typedef indicated in this example. Note that in C++, there
- is a second implicit typedef for each class, in the scope of `S'
- itself, so that you can say `S::S'. This macro does *not* hold for
- those typedefs. */
+ the type is declared. In C++, `struct S {};' is roughly
+ equivalent to `struct S {}; typedef struct S S;' in C.
+ DECL_IMPLICIT_TYPEDEF_P will hold for the typedef indicated in this
+ example. In C++, there is a second implicit typedef for each
+ class, in the scope of `S' itself, so that you can say `S::S'.
+ DECL_SELF_REFERENCE_P will hold for that second typedef. */
#define DECL_IMPLICIT_TYPEDEF_P(NODE) \
(TREE_CODE (NODE) == TYPE_DECL && DECL_LANG_FLAG_2 (NODE))
#define SET_DECL_IMPLICIT_TYPEDEF_P(NODE) \
(DECL_LANG_FLAG_2 (NODE) = 1)
+#define DECL_SELF_REFERENCE_P(NODE) \
+ (TREE_CODE (NODE) == TYPE_DECL && DECL_LANG_FLAG_4 (NODE))
+#define SET_DECL_SELF_REFERENCE_P(NODE) \
+ (DECL_LANG_FLAG_4 (NODE) = 1)
/* A `primary' template is one that has its own template header. A
member function of a class template is a template, but not primary.
@@ -2888,10 +2964,7 @@ struct lang_decl GTY(())
entity with its own template parameter list, and which is not a
full specialization. */
#define PROCESSING_REAL_TEMPLATE_DECL_P() \
- (processing_template_decl > template_class_depth (current_class_type))
-
-/* This function may be a guiding decl for a template. */
-#define DECL_MAYBE_TEMPLATE(NODE) DECL_LANG_FLAG_4 (NODE)
+ (processing_template_decl > template_class_depth (current_scope ()))
/* Nonzero if this VAR_DECL or FUNCTION_DECL has already been
instantiated, i.e. its definition has been generated from the
@@ -3079,8 +3152,12 @@ typedef enum tsubst_flags_t {
(make_typename_type use) */
tf_ptrmem_ok = 1 << 5, /* pointers to member ok (internal
instantiate_type use) */
- tf_parsing = 1 << 6 /* called from parser
+ tf_parsing = 1 << 6, /* called from parser
(make_typename_type use) */
+ tf_conv = 1 << 8, /* We are determining what kind of
+ conversion might be permissible, not
+ actually performing the
+ conversion. */
} tsubst_flags_t;
/* The kind of checking we can do looking in a class hierarchy. */
@@ -3290,6 +3367,12 @@ extern GTY(()) varray_type local_classes;
extern int at_eof;
+/* A list of namespace-scope objects which have constructors or
+ destructors which reside in the global scope. The decl is stored
+ in the TREE_VALUE slot and the initializer is stored in the
+ TREE_PURPOSE slot. */
+extern GTY(()) tree static_aggregates;
+
/* Functions called along with real static constructors and destructors. */
extern GTY(()) tree static_ctors;
@@ -3403,7 +3486,7 @@ enum overload_flags { NO_SPECIAL = 0, DTOR_FLAG, OP_FLAG, TYPENAME_FLAG };
type is derived from the pointed to
by the first. */
#define COMPARE_RELAXED 2 /* Like COMPARE_DERIVED, but in
- reverse. Also treat enmeration
+ reverse. Also treat enumeration
types as the same as integer types
of the same width. */
#define COMPARE_REDECLARATION 4 /* The comparsion is being done when
@@ -3468,7 +3551,8 @@ enum overload_flags { NO_SPECIAL = 0, DTOR_FLAG, OP_FLAG, TYPENAME_FLAG };
TFF_TEMPLATE_HEADER: show the template<...> header in a
template-declaration.
TFF_TEMPLATE_NAME: show only template-name.
- TFF_EXPR_IN_PARENS: Parenthesize expressions. */
+ TFF_EXPR_IN_PARENS: parenthesize expressions.
+ TFF_NO_FUNCTION_ARGUMENTS: don't show function arguments. */
#define TFF_PLAIN_IDENTIFIER (0)
#define TFF_SCOPE (1)
@@ -3481,6 +3565,7 @@ enum overload_flags { NO_SPECIAL = 0, DTOR_FLAG, OP_FLAG, TYPENAME_FLAG };
#define TFF_TEMPLATE_HEADER (1 << 7)
#define TFF_TEMPLATE_NAME (1 << 8)
#define TFF_EXPR_IN_PARENS (1 << 9)
+#define TFF_NO_FUNCTION_ARGUMENTS (1 << 10)
/* Returns the TEMPLATE_DECL associated to a TEMPLATE_TEMPLATE_PARM
node. */
@@ -3528,6 +3613,7 @@ extern tree build_method_call PARAMS ((tree, tree, tree, tree, int));
extern int null_ptr_cst_p PARAMS ((tree));
extern int sufficient_parms_p PARAMS ((tree));
extern tree type_decays_to PARAMS ((tree));
+extern tree resolve_scoped_fn_name PARAMS ((tree, tree));
extern tree build_user_type_conversion PARAMS ((tree, tree, int));
extern tree build_new_function_call PARAMS ((tree, tree));
extern tree build_new_method_call (tree, tree, tree, tree, int);
@@ -3546,13 +3632,16 @@ extern tree type_passed_as PARAMS ((tree));
extern tree convert_for_arg_passing PARAMS ((tree, tree));
extern tree cp_convert_parm_for_inlining PARAMS ((tree, tree, tree));
extern int is_properly_derived_from PARAMS ((tree, tree));
-extern tree initialize_reference PARAMS ((tree, tree));
+extern tree initialize_reference PARAMS ((tree, tree, tree, tree *));
+extern tree make_temporary_var_for_ref_to_temp (tree, tree);
extern tree strip_top_quals PARAMS ((tree));
extern tree perform_implicit_conversion PARAMS ((tree, tree));
+extern tree perform_direct_initialization_if_possible (tree, tree);
/* in class.c */
extern tree build_base_path PARAMS ((enum tree_code, tree, tree, int));
extern tree convert_to_base (tree, tree, bool);
+extern tree convert_to_base_statically (tree, tree);
extern tree build_vtbl_ref PARAMS ((tree, tree));
extern tree build_vfn_ref PARAMS ((tree, tree));
extern tree get_vtable_decl PARAMS ((tree, int));
@@ -3593,6 +3682,7 @@ extern void maybe_note_name_used_in_class PARAMS ((tree, tree));
extern void note_name_declared_in_class PARAMS ((tree, tree));
extern tree get_vtbl_decl_for_binfo PARAMS ((tree));
extern tree in_charge_arg_for_name PARAMS ((tree));
+extern tree build_cxx_call PARAMS ((tree, tree, tree));
extern tree get_vtt_name PARAMS ((tree));
extern tree get_primary_binfo PARAMS ((tree));
@@ -3600,11 +3690,12 @@ extern tree get_primary_binfo PARAMS ((tree));
extern tree convert_to_reference PARAMS ((tree, tree, int, int, tree));
extern tree convert_from_reference PARAMS ((tree));
extern tree convert_lvalue PARAMS ((tree, tree));
+extern tree force_rvalue PARAMS ((tree));
extern tree ocp_convert PARAMS ((tree, tree, int, int));
extern tree cp_convert PARAMS ((tree, tree));
extern tree convert_to_void PARAMS ((tree, const char */*implicit context*/));
extern tree convert_force PARAMS ((tree, tree, int));
-extern tree build_type_conversion PARAMS ((tree, tree, int));
+extern tree build_type_conversion PARAMS ((tree, tree));
extern tree build_expr_type_conversion PARAMS ((int, tree, int));
extern tree type_promotes_to PARAMS ((tree));
extern tree perform_qualification_conversions PARAMS ((tree, tree));
@@ -3614,6 +3705,7 @@ extern void adjust_clone_args PARAMS ((tree));
/* decl.c */
extern int global_bindings_p PARAMS ((void));
extern int kept_level_p PARAMS ((void));
+extern bool innermost_scope_is_class_p (void);
extern tree getdecls PARAMS ((void));
extern void pushlevel PARAMS ((int));
extern tree poplevel PARAMS ((int,int, int));
@@ -3664,23 +3756,24 @@ extern void clear_anon_tags PARAMS ((void));
extern int decls_match PARAMS ((tree, tree));
extern int duplicate_decls PARAMS ((tree, tree));
extern tree pushdecl_top_level PARAMS ((tree));
-extern void pushdecl_class_level PARAMS ((tree));
+extern tree pushdecl_top_level_and_finish (tree, tree);
+extern bool pushdecl_class_level (tree);
extern tree pushdecl_namespace_level PARAMS ((tree));
extern tree push_using_decl PARAMS ((tree, tree));
extern tree push_using_directive PARAMS ((tree));
-extern void push_class_level_binding PARAMS ((tree, tree));
+extern bool push_class_level_binding (tree, tree);
extern tree implicitly_declare PARAMS ((tree));
extern tree declare_local_label PARAMS ((tree));
extern tree define_label PARAMS ((const char *, int, tree));
extern void check_goto PARAMS ((tree));
extern void define_case_label PARAMS ((void));
-extern tree binding_for_name PARAMS ((tree, tree));
+extern cxx_binding *binding_for_name (tree, tree);
extern tree namespace_binding PARAMS ((tree, tree));
extern void set_namespace_binding PARAMS ((tree, tree, tree));
extern tree lookup_namespace_name PARAMS ((tree, tree));
extern tree build_typename_type PARAMS ((tree, tree, tree, tree));
extern tree make_typename_type PARAMS ((tree, tree, tsubst_flags_t));
-extern tree make_unbound_class_template PARAMS ((tree, tree, int));
+extern tree make_unbound_class_template PARAMS ((tree, tree, tsubst_flags_t));
extern tree lookup_name_nonclass PARAMS ((tree));
extern tree lookup_function_nonclass PARAMS ((tree, tree));
extern tree lookup_name PARAMS ((tree, int));
@@ -3690,10 +3783,11 @@ extern tree lookup_name_namespace_only PARAMS ((tree));
extern void begin_only_namespace_names PARAMS ((void));
extern void end_only_namespace_names PARAMS ((void));
extern tree namespace_ancestor PARAMS ((tree, tree));
+extern bool is_ancestor (tree, tree);
extern tree unqualified_namespace_lookup PARAMS ((tree, int, tree *));
extern tree check_for_out_of_scope_variable (tree);
-extern int lookup_using_namespace PARAMS ((tree, tree, tree, tree, int, tree *));
-extern int qualified_lookup_using_namespace PARAMS ((tree, tree, tree, int));
+extern bool lookup_using_namespace (tree, cxx_binding *, tree, tree, int, tree *);
+extern bool qualified_lookup_using_namespace (tree, tree, cxx_binding *, int);
extern tree build_library_fn PARAMS ((tree, tree));
extern tree build_library_fn_ptr PARAMS ((const char *, tree));
extern tree build_cp_library_fn_ptr PARAMS ((const char *, tree));
@@ -3769,6 +3863,7 @@ extern int nonstatic_local_decl_p PARAMS ((tree));
extern tree declare_global_var PARAMS ((tree, tree));
extern void register_dtor_fn PARAMS ((tree));
extern tmpl_spec_kind current_tmpl_spec_kind PARAMS ((int));
+extern cxx_binding *cxx_scope_find_binding_for_name (tree, tree);
extern tree cp_fname_init PARAMS ((const char *));
extern bool have_extern_spec;
@@ -3787,7 +3882,7 @@ extern void check_member_template PARAMS ((tree));
extern tree grokfield PARAMS ((tree, tree, tree, tree, tree));
extern tree grokbitfield PARAMS ((tree, tree, tree));
extern tree groktypefield PARAMS ((tree, tree));
-extern tree grokoptypename PARAMS ((tree, tree));
+extern tree grokoptypename PARAMS ((tree, tree, tree));
extern void cplus_decl_attributes PARAMS ((tree *, tree, int));
extern tree constructor_name_full PARAMS ((tree));
extern tree constructor_name PARAMS ((tree));
@@ -3826,6 +3921,7 @@ extern void do_using_directive PARAMS ((tree));
extern void check_default_args PARAMS ((tree));
extern void mark_used PARAMS ((tree));
extern tree handle_class_head (enum tag_types, tree, tree, tree, int, int *);
+extern tree handle_class_head_apparent_template (tree, int *);
extern tree lookup_arg_dependent PARAMS ((tree, tree, tree));
extern void finish_static_data_member_decl PARAMS ((tree, tree, tree, int));
extern tree cp_build_parm_decl PARAMS ((tree, tree));
@@ -3885,19 +3981,19 @@ extern void add_friend PARAMS ((tree, tree));
extern tree do_friend PARAMS ((tree, tree, tree, tree, tree, enum overload_flags, tree, int));
/* in init.c */
-extern tree expand_member_init (tree, tree);
+extern tree expand_member_init (tree);
extern void emit_mem_initializers (tree);
extern tree build_aggr_init PARAMS ((tree, tree, int));
extern tree build_init PARAMS ((tree, tree, int));
extern int is_aggr_type PARAMS ((tree, int));
extern tree get_aggr_from_typedef PARAMS ((tree, int));
extern tree get_type_value PARAMS ((tree));
-extern tree build_zero_init (tree, bool);
+extern tree build_zero_init (tree, tree, bool);
extern tree build_member_call PARAMS ((tree, tree, tree));
extern tree build_offset_ref PARAMS ((tree, tree));
extern tree resolve_offset_ref PARAMS ((tree));
extern tree build_new PARAMS ((tree, tree, tree, int));
-extern tree build_vec_init PARAMS ((tree, tree, int));
+extern tree build_vec_init PARAMS ((tree, tree, tree, int));
extern tree build_x_delete PARAMS ((tree, int, tree));
extern tree build_delete PARAMS ((tree, tree, special_function_kind, int, int));
extern void push_base_cleanups PARAMS ((void));
@@ -4001,7 +4097,7 @@ extern tree instantiate_decl PARAMS ((tree, int));
extern tree get_bindings PARAMS ((tree, tree, tree));
extern int push_tinst_level PARAMS ((tree));
extern void pop_tinst_level PARAMS ((void));
-extern int more_specialized_class PARAMS ((tree, tree));
+extern int more_specialized_class PARAMS ((tree, tree, tree));
extern int is_member_template PARAMS ((tree));
extern int comp_template_parms PARAMS ((tree, tree));
extern int template_class_depth PARAMS ((tree));
@@ -4037,13 +4133,16 @@ extern int unemitted_tinfo_decl_p PARAMS((tree, void *));
extern int emit_tinfo_decl PARAMS((tree *, void *));
/* in search.c */
+extern bool accessible_base_p (tree, tree);
extern tree lookup_base PARAMS ((tree, tree, base_access, base_kind *));
extern int types_overlap_p PARAMS ((tree, tree));
extern tree get_vbase PARAMS ((tree, tree));
extern tree get_dynamic_cast_base_type PARAMS ((tree, tree));
extern void type_access_control PARAMS ((tree, tree));
extern int accessible_p PARAMS ((tree, tree));
+extern tree lookup_field_1 (tree, tree, bool);
extern tree lookup_field PARAMS ((tree, tree, int, int));
+extern tree lookup_nested_field PARAMS ((tree, int));
extern int lookup_fnfields_1 PARAMS ((tree, tree));
extern tree lookup_fnfields PARAMS ((tree, tree, int));
extern tree lookup_member PARAMS ((tree, tree, int, int));
@@ -4215,6 +4314,7 @@ extern tree canonical_type_variant PARAMS ((tree));
extern void unshare_base_binfos PARAMS ((tree));
extern int member_p PARAMS ((tree));
extern cp_lvalue_kind real_lvalue_p PARAMS ((tree));
+extern cp_lvalue_kind real_non_cast_lvalue_p (tree);
extern int non_cast_lvalue_p PARAMS ((tree));
extern int non_cast_lvalue_or_else PARAMS ((tree, const char *));
extern tree build_min PARAMS ((enum tree_code, tree,
@@ -4222,7 +4322,6 @@ extern tree build_min PARAMS ((enum tree_code, tree,
extern tree build_min_nt PARAMS ((enum tree_code, ...));
extern tree build_cplus_new PARAMS ((tree, tree));
extern tree get_target_expr PARAMS ((tree));
-extern tree break_out_calls PARAMS ((tree));
extern tree build_cplus_method_type PARAMS ((tree, tree, tree));
extern tree build_cplus_staticfn_type PARAMS ((tree, tree, tree));
extern tree build_cplus_array_type PARAMS ((tree, tree));
@@ -4283,8 +4382,6 @@ extern int cp_is_overload_p PARAMS ((tree));
extern int cp_auto_var_in_fn_p PARAMS ((tree,tree));
extern tree cp_copy_res_decl_for_inlining PARAMS ((tree, tree, tree, void*,
int*, void*));
-extern int cp_start_inlining PARAMS ((tree));
-extern void cp_end_inlining PARAMS ((tree));
/* in typeck.c */
extern int string_conv_p PARAMS ((tree, tree, int));
@@ -4315,7 +4412,7 @@ extern tree build_x_indirect_ref PARAMS ((tree, const char *));
extern tree build_indirect_ref PARAMS ((tree, const char *));
extern tree build_array_ref PARAMS ((tree, tree));
extern tree get_member_function_from_ptrfunc PARAMS ((tree *, tree));
-extern tree build_function_call_real PARAMS ((tree, tree, int, int));
+extern tree build_function_call_real PARAMS ((tree, tree, int));
extern tree build_function_call_maybe PARAMS ((tree, tree));
extern tree convert_arguments PARAMS ((tree, tree, tree, int));
extern tree build_x_binary_op PARAMS ((enum tree_code, tree, tree));
@@ -4352,6 +4449,8 @@ extern tree check_return_expr PARAMS ((tree));
#define cxx_sizeof(T) cxx_sizeof_or_alignof_type (T, SIZEOF_EXPR, true)
#define cxx_alignof(T) cxx_sizeof_or_alignof_type (T, ALIGNOF_EXPR, true)
extern tree build_ptrmemfunc_access_expr (tree, tree);
+extern tree build_address (tree);
+extern tree build_nop (tree, tree);
/* in typeck2.c */
extern void require_complete_eh_spec_types PARAMS ((tree, tree));