Boston, MA 02111-1307, USA. */
#include "function.h"
+#include "hashtab.h"
#include "splay-tree.h"
#include "varray.h"
/* Usage of TREE_LANG_FLAG_?:
0: BINFO_MARKED (BINFO nodes).
+ IDENTIFIER_MARKED (IDENTIFIER_NODEs)
NEW_EXPR_USE_GLOBAL (in NEW_EXPR).
DELETE_EXPR_USE_GLOBAL (in DELETE_EXPR).
LOOKUP_EXPR_GLOBAL (in LOOKUP_EXPR).
AGGR_INIT_VIA_CTOR_P (in AGGR_INIT_EXPR)
CTOR_BEGIN_P (in CTOR_STMT)
BV_USE_VCALL_INDEX_P (in the BINFO_VIRTUALS TREE_LIST)
+ PTRMEM_OK_P (in ADDR_EXPR, OFFSET_REF)
1: IDENTIFIER_VIRTUAL_P.
TI_PENDING_TEMPLATE_FLAG.
TEMPLATE_PARMS_FOR_INLINE.
or FIELD_DECL).
NEED_TEMPORARY_P (in REF_BIND, BASE_CONV)
IDENTIFIER_TYPENAME_P (in IDENTIFIER_NODE)
- 5: Unused.
+ 5: C_IS_RESERVED_WORD (in IDENTIFIER_NODE)
6: BINFO_ACCESS (in BINFO)
Usage of TYPE_LANG_FLAG_?:
TYPE_BINFO
For an ENUMERAL_TYPE, this is ENUM_TEMPLATE_INFO.
For a TYPENAME_TYPE, this is TYPENAME_TYPE_FULLNAME.
- For a TEMPLATE_TEMPLATE_PARM, this is
- TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
+ For a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM,
+ this is TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
BINFO_VIRTUALS
For a binfo, this is a TREE_LIST. The BV_DELTA of each node
in both ABIs.
DECL_ARGUMENTS
- For a VAR_DECL this is DECL_ANON_UNION_ELEMS.
+ For a VAR_DECL this is DECL_ANON_UNION_ELEMS.
DECL_VINDEX
This field is NULL for a non-virtual function. For a virtual
a virtual function is declared, but before it is known what
function is overriden, this field is the error_mark_node.
- Temporarily, it may be set to a TREE_LIST whose TREE_VALUE is
+ Temporarily, it may be set to a TREE_LIST whose TREE_VALUE is
the virtual function this one overrides, and whose TREE_CHAIN is
the old DECL_VINDEX. */
#define VAR_FUNCTION_OR_PARM_DECL_CHECK(NODE) \
({ const tree __t = NODE; \
enum tree_code __c = TREE_CODE(__t); \
- if (__c != VAR_DECL \
- && __c != FUNCTION_DECL \
+ if (__c != VAR_DECL \
+ && __c != FUNCTION_DECL \
&& __c != PARM_DECL) \
tree_check_failed (__t, VAR_DECL, __FILE__, __LINE__, \
__FUNCTION__); \
#define VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK(NODE) \
({ const tree __t = NODE; \
enum tree_code __c = TREE_CODE(__t); \
- if (__c != VAR_DECL \
+ if (__c != VAR_DECL \
&& __c != FUNCTION_DECL \
&& __c != TYPE_DECL \
&& __c != TEMPLATE_DECL) \
tree class_value;
tree class_template_info;
struct lang_id2 *x;
+ enum rid rid_code;
};
+/* In an IDENTIFIER_NODE, nonzero if this identifier is actually a
+ keyword. C_RID_CODE (node) is then the RID_* value of the keyword,
+ and C_RID_YYCODE is the token number wanted by Yacc. */
+
+#define C_IS_RESERVED_WORD(id) TREE_LANG_FLAG_5 (id)
+#define C_RID_CODE(id) \
+ (((struct lang_identifier *) (id))->rid_code)
+
+extern const short rid_to_yy[RID_MAX];
+#define C_RID_YYCODE(id) \
+ rid_to_yy[((struct lang_identifier *) (id))->rid_code]
+
#define LANG_IDENTIFIER_CAST(NODE) \
((struct lang_identifier*)IDENTIFIER_NODE_CHECK (NODE))
tree error_locus;
};
-typedef struct
+typedef struct
{
tree t;
int new_type_flag;
tree lookups;
} flagged_type_tree;
-typedef struct
+typedef struct
{
struct tree_common common;
HOST_WIDE_INT index;
typedef struct ptrmem_cst
{
struct tree_common common;
- /* This isn't used, but the middle-end expects all constants to have
+ /* This isn't used, but the middle-end expects all constants to have
this field. */
struct rtx_def *rtl;
tree member;
&& DECL_NAME (NODE) != NULL_TREE \
&& MAIN_NAME_P (DECL_NAME (NODE)))
-/* Returns non-zero iff ID_NODE is an IDENTIFIER_NODE whose name is
- `main'. */
-#define MAIN_NAME_P(ID_NODE) \
- (strcmp (IDENTIFIER_POINTER (ID_NODE), "main") == 0)
-
struct tree_binding
{
/* 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) \
+ (IDENTIFIER_BINDING (NODE) \
? BINDING_VALUE (IDENTIFIER_BINDING (NODE)) \
: NULL_TREE)
#define IDENTIFIER_CLASS_VALUE(NODE) \
(LANG_IDENTIFIER_CAST (NODE)->class_value)
-/* The amount of time used by the file whose special "time identifier"
- is NODE, represented as an INTEGER_CST. See get_time_identifier. */
-#define TIME_IDENTIFIER_TIME(NODE) IDENTIFIER_BINDING(NODE)
-
-/* For a "time identifier" this is a INTEGER_CST. The
- TREE_INT_CST_LOW is 1 if the corresponding file is "interface only".
- The TRE_INT_CST_HIGH is 1 if it is "interface unknown". */
-#define TIME_IDENTIFIER_FILEINFO(NODE) IDENTIFIER_CLASS_VALUE (NODE)
-
/* TREE_TYPE only indicates on local and class scope the current
type. For namespace scope, the presence of a type in any namespace
is indicated with global_type_node, and the real type behind must
#define LANG_ID_FIELD(NAME,NODE) \
(LANG_IDENTIFIER_CAST (NODE)->x \
- ? LANG_IDENTIFIER_CAST (NODE)->x->NAME : 0)
+ ? LANG_IDENTIFIER_CAST (NODE)->x->NAME : 0)
#define SET_LANG_ID(NODE,VALUE,NAME) \
(LANG_IDENTIFIER_CAST (NODE)->x == 0 \
CPTI_JAVA_CHAR_TYPE,
CPTI_JAVA_BOOLEAN_TYPE,
- CPTI_VOID_ZERO,
CPTI_WCHAR_DECL,
CPTI_VTABLE_ENTRY_TYPE,
CPTI_DELTA_TYPE,
CPTI_VMI_CLASS_DESC_TYPE,
CPTI_PTM_DESC_TYPE,
CPTI_BASE_DESC_TYPE,
-
+
CPTI_CLASS_TYPE,
CPTI_RECORD_TYPE,
CPTI_UNION_TYPE,
#define java_char_type_node cp_global_trees[CPTI_JAVA_CHAR_TYPE]
#define java_boolean_type_node cp_global_trees[CPTI_JAVA_BOOLEAN_TYPE]
-#define void_zero_node cp_global_trees[CPTI_VOID_ZERO]
#define wchar_decl_node cp_global_trees[CPTI_WCHAR_DECL]
#define vtable_entry_type cp_global_trees[CPTI_VTABLE_ENTRY_TYPE]
/* The type used to represent an offset by which to adjust the `this'
/* Global state. */
-struct stmt_tree {
- tree x_last_stmt;
- tree x_last_expr_type;
-/* Non-zero if we should treat statements as full expressions. In
- particular, this variable is no-zero if at the end of a statement
- we should destroy any temporaries created during that statement.
- Similarly, if, at the end of a block, we should destroy any local
- variables in this block. Normally, this variable is non-zero,
- since those are the normal semantics of C++.
-
- However, in order to represent aggregate initialization code as
- tree structure, we use statement-expressions. The statements
- within the statement expression should not result in cleanups being
- run until the entire enclosing statement is complete. */
- int stmts_are_full_exprs_p;
-};
-
struct saved_scope {
tree old_bindings;
tree old_namespace;
varray_type lang_base;
tree *lang_stack;
tree lang_name;
- tree x_function_parms;
tree template_parms;
tree x_previous_class_type;
tree x_previous_class_values;
int x_processing_explicit_instantiation;
int need_pop_function_context;
- struct stmt_tree x_stmt_tree;
+ struct stmt_tree_s x_stmt_tree;
struct binding_level *class_bindings;
struct binding_level *bindings;
/* Parsing a function declarator leaves a list of parameter names
or a chain or parameter decls here. */
-#define current_function_parms scope_chain->x_function_parms
#define current_template_parms scope_chain->template_parms
#define processing_template_decl scope_chain->x_processing_template_decl
/* Global state pertinent to the current function. */
-struct language_function
+struct cp_language_function
{
+ struct language_function base;
+
tree x_ctor_label;
tree x_dtor_label;
tree x_current_class_ptr;
tree x_current_class_ref;
tree x_eh_spec_try_block;
- tree x_scope_stmt_stack;
tree x_in_charge_parm;
tree *x_vcalls_possible_p;
- struct rtx_def *x_result_rtx;
-
int returns_value;
int returns_null;
- int parms_stored;
int in_function_try_handler;
int x_expanding_p;
- int name_declared;
int vtbls_set_up_p;
- struct stmt_tree x_stmt_tree;
-
struct named_label_use_list *x_named_label_uses;
struct named_label_list *x_named_labels;
struct binding_level *bindings;
/* The current C++-specific per-function global variables. */
-#define cp_function_chain (cfun->language)
+#define cp_function_chain \
+ ((struct cp_language_function *) (cfun->language))
/* In a destructor, the point at which all derived class destroying
has been done, just before any base class destroying will be done. */
#define current_class_ref \
(cfun ? cp_function_chain->x_current_class_ref : NULL_TREE)
-/* Information about the current statement tree. */
-
-#define current_stmt_tree \
- (cfun \
- ? &cp_function_chain->x_stmt_tree \
- : &scope_chain->x_stmt_tree)
-
-/* When building a statement-tree, this is the last statement added to
- the tree. */
-
-#define last_tree current_stmt_tree->x_last_stmt
-
-/* The type of the last expression-statement we have seen. This is
- required because the type of a statement-expression is the type of
- the last expression statement. */
-
-#define last_expr_type current_stmt_tree->x_last_expr_type
-
/* The TRY_BLOCK for the exception-specifiers for the current
function, if any. */
#define current_eh_spec_try_block cp_function_chain->x_eh_spec_try_block
-/* The stack of SCOPE_STMTs for the current function. */
-
-#define current_scope_stmt_stack cp_function_chain->x_scope_stmt_stack
-
/* The `__in_chrg' parameter for the current function. Only used for
destructors. */
#define current_function_returns_null cp_function_chain->returns_null
-#define current_function_just_assigned_this \
- cp_function_chain->just_assigned_this
-
-#define current_function_parms_stored \
- cp_function_chain->parms_stored
-
/* Nonzero if we have already generated code to initialize virtual
function tables in this function. */
#define in_function_try_handler cp_function_chain->in_function_try_handler
+/* Nonzero if __FUNCTION__ and its ilk have been declared in this
+ function. */
+
+#define function_name_declared_p \
+ (cp_function_chain->base.x_function_name_declared_p)
+
extern tree current_function_return_value;
extern tree global_namespace;
extern int flag_no_asm;
+/* Nonzero means don't recognize any extended keywords. */
+
+extern int flag_no_gnu_keywords;
+
+/* Nonzero means recognize the named operators from C++98. */
+
+extern int flag_operator_names;
+
/* For cross referencing. */
extern int flag_gnu_xref;
would normally be, for use with WINE. */
extern int flag_short_wchar;
-/* Nonzero if squashed mangling is to be performed.
- This uses the B and K codes to reference previously seen class types
+/* Nonzero if squashed mangling is to be performed.
+ This uses the B and K codes to reference previously seen class types
and class qualifiers. */
extern int flag_do_squangling;
(TREE_CODE (t) == TEMPLATE_TYPE_PARM \
|| TREE_CODE (t) == TYPENAME_TYPE \
|| TREE_CODE (t) == TYPEOF_TYPE \
- || (TREE_CODE (t) == TEMPLATE_TEMPLATE_PARM \
- && TYPE_TEMPLATE_INFO (t)) \
+ || TREE_CODE (t) == BOUND_TEMPLATE_TEMPLATE_PARM \
|| TYPE_LANG_FLAG_5 (t))
-/* Set IS_AGGR_TYPE for T to VAL. T must be a class, struct, or
- union type. */
+/* Set IS_AGGR_TYPE for T to VAL. T must be a class, struct, or
+ union type. */
#define SET_IS_AGGR_TYPE(T, VAL) \
(TYPE_LANG_FLAG_5 (T) = (VAL))
/* The type qualifiers for this type, including the qualifiers on the
elements for an array type. */
#define CP_TYPE_QUALS(NODE) \
- ((TREE_CODE (NODE) != ARRAY_TYPE) \
+ ((TREE_CODE (NODE) != ARRAY_TYPE) \
? TYPE_QUALS (NODE) : cp_type_quals (NODE))
/* Nonzero if this type is const-qualified. */
of this by updating the size of this bitfield whenever you add or
remove a flag. */
unsigned dummy : 8;
-
+
int vsize;
tree primary_base;
has a two-argument array operator delete. */
#define TYPE_VEC_NEW_USES_COOKIE(NODE) \
(TYPE_HAS_NONTRIVIAL_DESTRUCTOR (NODE) \
- || (TYPE_LANG_SPECIFIC (NODE) \
+ || (TYPE_LANG_SPECIFIC (NODE) \
&& TYPE_VEC_DELETE_TAKES_SIZE (NODE)))
/* Nonzero means that this _CLASSTYPE node defines ways of converting
#define SET_CLASSTYPE_MARKED2(NODE) SET_CLASSTYPE_MARKED_N(NODE, 1)
#define CLEAR_CLASSTYPE_MARKED2(NODE) CLEAR_CLASSTYPE_MARKED_N(NODE, 1)
#define SET_CLASSTYPE_MARKED3(NODE) SET_CLASSTYPE_MARKED_N(NODE, 2)
-#define CLEAR_CLASSTYPE_MARKED3(NODE) CLEAR_CLASSTYPE_MARKED_N(NODE, 2)
+#define CLEAR_CLASSTYPE_MARKED3(NODE) CLEAR_CLASSTYPE_MARKED_N(NODE, 2)
#define SET_CLASSTYPE_MARKED4(NODE) SET_CLASSTYPE_MARKED_N(NODE, 3)
#define CLEAR_CLASSTYPE_MARKED4(NODE) CLEAR_CLASSTYPE_MARKED_N(NODE, 3)
#define SET_CLASSTYPE_MARKED5(NODE) SET_CLASSTYPE_MARKED_N(NODE, 4)
binfo_for_vbase. C is the most derived class for the hierarchy
containing BINFO. */
#define CANONICAL_BINFO(BINFO, C) \
- (TREE_VIA_VIRTUAL (BINFO) \
- ? binfo_for_vbase (BINFO_TYPE (BINFO), C) \
+ (TREE_VIA_VIRTUAL (BINFO) \
+ ? binfo_for_vbase (BINFO_TYPE (BINFO), C) \
: BINFO)
/* Number of direct baseclasses of NODE. */
/* Any subobject that needs a new vtable must have a vptr and must not
be a primary base (since it would then use the vtable from a
derived class.) */
-#define SET_BINFO_NEW_VTABLE_MARKED(B, C) \
+#define SET_BINFO_NEW_VTABLE_MARKED(B, C) \
(BINFO_NEW_VTABLE_MARKED (B, C) = 1, \
my_friendly_assert (!BINFO_PRIMARY_MARKED_P (B), 20000517), \
my_friendly_assert (CLASSTYPE_VFIELDS (BINFO_TYPE (B)) != NULL_TREE, \
#define CAN_HAVE_FULL_LANG_DECL_P(NODE) \
(!(TREE_CODE ((NODE)) == VAR_DECL \
|| TREE_CODE ((NODE)) == CONST_DECL \
- || TREE_CODE ((NODE)) == FIELD_DECL \
+ || TREE_CODE ((NODE)) == FIELD_DECL \
|| TREE_CODE ((NODE)) == USING_DECL))
struct lang_decl_flags
{
+ struct c_lang_decl base;
+
ENUM_BITFIELD(languages) language : 8;
unsigned operator_attr : 1;
unsigned generate_with_vtable_p : 1;
unsigned dummy : 1;
- tree context;
-
union {
/* In a FUNCTION_DECL, VAR_DECL, TYPE_DECL, or TEMPLATE_DECL, this
is DECL_TEMPLATE_INFO. */
} u2;
};
+struct unparsed_text;
+
struct lang_decl
{
struct lang_decl_flags decl_flags;
tree befriending_classes;
- /* In a FUNCTION_DECL, this is DECL_SAVED_TREE. */
- tree saved_tree;
+ /* For a virtual FUNCTION_DECL, this is DECL_VIRTUAL_CONTEXT. For a
+ non-virtual FUNCTION_DECL, this is DECL_FRIEND_CONTEXT. */
+ tree context;
/* In a FUNCTION_DECL, this is DECL_CLONED_FUNCTION. */
tree cloned_function;
union
{
tree sorted_fields;
- struct pending_inline *pending_inline_info;
- struct language_function *saved_language_function;
+ struct unparsed_text *pending_inline_info;
+ struct cp_language_function *saved_language_function;
} u;
union {
} u2;
};
-/* An un-parsed default argument looks like an identifier. */
-#define DEFARG_LENGTH(NODE) (DEFAULT_ARG_CHECK(NODE)->identifier.length)
#define DEFARG_POINTER(NODE) (DEFAULT_ARG_CHECK(NODE)->identifier.pointer)
/* Non-zero if NODE is a _DECL with TREE_READONLY set. */
/* Nonzero if NODE (a FUNCTION_DECL) is a constructor for a complete
object. */
#define DECL_COMPLETE_CONSTRUCTOR_P(NODE) \
- (DECL_CONSTRUCTOR_P (NODE) \
+ (DECL_CONSTRUCTOR_P (NODE) \
&& DECL_NAME (NODE) == complete_ctor_identifier)
/* Nonzero if NODE (a FUNCTION_DECL) is a constructor for a base
/* Nonzero if NODE (a FUNCTION_DECL) is a destructor for a complete
object. */
#define DECL_COMPLETE_DESTRUCTOR_P(NODE) \
- (DECL_DESTRUCTOR_P (NODE) \
+ (DECL_DESTRUCTOR_P (NODE) \
&& DECL_NAME (NODE) == complete_dtor_identifier)
/* Nonzero if NODE (a FUNCTION_DECL) is a destructor for a base
/* Nonzero if NODE (a FUNCTION_DECL) is a destructor for a complete
object that deletes the object after it has been destroyed. */
#define DECL_DELETING_DESTRUCTOR_P(NODE) \
- (DECL_DESTRUCTOR_P (NODE) \
+ (DECL_DESTRUCTOR_P (NODE) \
&& DECL_NAME (NODE) == deleting_dtor_identifier)
/* Nonzero if NODE (a FUNCTION_DECL) is a cloned constructor or
destructor. */
-#define DECL_CLONED_FUNCTION_P(NODE) \
- (DECL_CLONED_FUNCTION (NODE) != NULL_TREE)
+#define DECL_CLONED_FUNCTION_P(NODE) \
+ (DECL_LANG_SPECIFIC (NODE) \
+ && DECL_CLONED_FUNCTION (NODE) != NULL_TREE)
/* If DECL_CLONED_FUNCTION_P holds, this is the function that was
cloned. */
overloaded operator, ERROR_MARK is returned. Since the numerical
value of ERROR_MARK is zero, this macro can be used as a predicate
to test whether or not NODE is an overloaded operator. */
-#define DECL_OVERLOADED_OPERATOR_P(NODE) \
+#define DECL_OVERLOADED_OPERATOR_P(NODE) \
(IDENTIFIER_OPNAME_P (DECL_NAME ((NODE))) \
? DECL_LANG_SPECIFIC (NODE)->u2.operator_code : ERROR_MARK)
/* Non-zero for a FUNCTION_DECL that declares a type-info function.
This only happens in the old abi. */
-#define DECL_TINFO_FN_P(NODE) \
+#define DECL_TINFO_FN_P(NODE) \
(TREE_CODE (NODE) == FUNCTION_DECL \
&& DECL_ARTIFICIAL (NODE) \
&& DECL_LANG_SPECIFIC(NODE)->decl_flags.tinfo_fn_p)
#define SHARED_MEMBER_P(NODE) \
(TREE_CODE (NODE) == VAR_DECL || TREE_CODE (NODE) == TYPE_DECL \
|| TREE_CODE (NODE) == CONST_DECL)
-
+
/* Nonzero for FUNCTION_DECL means that this decl is a non-static
member function. */
#define DECL_NONSTATIC_MEMBER_FUNCTION_P(NODE) \
has `this' as const X *const. */
#define DECL_CONST_MEMFUNC_P(NODE) \
(DECL_NONSTATIC_MEMBER_FUNCTION_P (NODE) \
- && CP_TYPE_CONST_P (TREE_TYPE (TREE_VALUE \
+ && CP_TYPE_CONST_P (TREE_TYPE (TREE_VALUE \
(TYPE_ARG_TYPES (TREE_TYPE (NODE))))))
/* Nonzero for FUNCTION_DECL means that this member function
(TYPE_ARG_TYPES (TREE_TYPE (NODE))))))
/* Nonzero for a DECL means that this member is a non-static member. */
-#define DECL_NONSTATIC_MEMBER_P(NODE) \
- ((TREE_CODE (NODE) == FUNCTION_DECL \
+#define DECL_NONSTATIC_MEMBER_P(NODE) \
+ ((TREE_CODE (NODE) == FUNCTION_DECL \
&& DECL_NONSTATIC_MEMBER_FUNCTION_P (NODE)) \
|| TREE_CODE (NODE) == FIELD_DECL)
/* For a non-member friend function, the class (if any) in which this
friend was defined. For example, given:
-
+
struct S { friend void f (); };
the DECL_FRIEND_CONTEXT for `f' will be `S'. */
#define DECL_FRIEND_CONTEXT(NODE) \
((DECL_FRIEND_P (NODE) && !DECL_FUNCTION_MEMBER_P (NODE)) \
- ? DECL_LANG_SPECIFIC (NODE)->decl_flags.context \
+ ? DECL_LANG_SPECIFIC (NODE)->context \
: NULL_TREE)
/* Set the DECL_FRIEND_CONTEXT for NODE to CONTEXT. */
#define SET_DECL_FRIEND_CONTEXT(NODE, CONTEXT) \
- (DECL_LANG_SPECIFIC (NODE)->decl_flags.context = (CONTEXT))
+ (DECL_LANG_SPECIFIC (NODE)->context = (CONTEXT))
/* NULL_TREE in DECL_CONTEXT represents the global namespace. */
#define CP_DECL_CONTEXT(NODE) \
/* For a virtual function, the base where we find its vtable entry.
For a non-virtual function, the base where it is defined. */
#define DECL_VIRTUAL_CONTEXT(NODE) \
- (DECL_LANG_SPECIFIC (NODE)->decl_flags.context)
+ (DECL_LANG_SPECIFIC (NODE)->context)
/* 1 iff NODE has namespace scope, including the global namespace. */
#define DECL_NAMESPACE_SCOPE_P(NODE) \
(DECL_CONTEXT (NODE) \
&& TREE_CODE (DECL_CONTEXT (NODE)) == FUNCTION_DECL)
+/* 1 iff NODE is function-local, but for types. */
+#define LOCAL_CLASS_P(NODE) \
+ (decl_function_context (TYPE_MAIN_DECL (NODE)) != NULL_TREE)
+
/* For a NAMESPACE_DECL: the list of using namespace directives
The PURPOSE is the used namespace, the value is the namespace
that is the common ancestor. */
but have not yet processed it. */
#define DECL_PENDING_INLINE_P(NODE) \
(DECL_LANG_SPECIFIC (NODE)->decl_flags.pending_inline_p)
-
+
/* If DECL_PENDING_INLINE_P holds, this is the saved text of the
function. */
#define DECL_PENDING_INLINE_INFO(NODE) \
non-type template parameters. */
#define ENUM_TEMPLATE_INFO(NODE) (TYPE_BINFO (ENUMERAL_TYPE_CHECK (NODE)))
-/* Template information for a template template parameter. */
+/* Template information for a bound template template parameter. */
#define TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO(NODE) (TYPE_BINFO (NODE))
/* Template information for an ENUMERAL_, RECORD_, or UNION_TYPE. */
#define TYPE_TEMPLATE_INFO(NODE) \
(TREE_CODE (NODE) == ENUMERAL_TYPE \
? ENUM_TEMPLATE_INFO (NODE) : \
- (TREE_CODE (NODE) == TEMPLATE_TEMPLATE_PARM \
+ (TREE_CODE (NODE) == BOUND_TEMPLATE_TEMPLATE_PARM \
? TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO (NODE) : \
(TYPE_LANG_SPECIFIC (NODE) \
? CLASSTYPE_TEMPLATE_INFO (NODE) \
/* Set the template information for an ENUMERAL_, RECORD_, or
UNION_TYPE to VAL. */
-#define SET_TYPE_TEMPLATE_INFO(NODE, VAL) \
- (TREE_CODE (NODE) == ENUMERAL_TYPE \
- ? (ENUM_TEMPLATE_INFO (NODE) = VAL) \
+#define SET_TYPE_TEMPLATE_INFO(NODE, VAL) \
+ (TREE_CODE (NODE) == ENUMERAL_TYPE \
+ ? (ENUM_TEMPLATE_INFO (NODE) = VAL) \
: (CLASSTYPE_TEMPLATE_INFO (NODE) = VAL))
#define TI_TEMPLATE(NODE) (TREE_PURPOSE (NODE))
arguments, then each entry in the TREE_VEC is itself a TREE_VEC,
containing the template arguments for a single level. The first
entry in the outer TREE_VEC is the outermost level of template
- parameters; the last is the innermost.
+ parameters; the last is the innermost.
It is incorrect to ever form a template argument vector containing
only one level of arguments, but which is a TREE_VEC containing as
/* The LEVELth level of the template ARGS. The outermost level of of
args is level 1, not level 0. */
#define TMPL_ARGS_LEVEL(ARGS, LEVEL) \
- (TMPL_ARGS_HAVE_MULTIPLE_LEVELS (ARGS) \
+ (TMPL_ARGS_HAVE_MULTIPLE_LEVELS (ARGS) \
? TREE_VEC_ELT ((ARGS), (LEVEL) - 1) : ARGS)
/* Set the LEVELth level of the template ARGS to VAL. This macro does
/* Given a single level of template arguments in NODE, return the
number of arguments. */
-#define NUM_TMPL_ARGS(NODE) \
- ((NODE) == NULL_TREE ? 0 \
- : (TREE_CODE (NODE) == TREE_VEC \
+#define NUM_TMPL_ARGS(NODE) \
+ ((NODE) == NULL_TREE ? 0 \
+ : (TREE_CODE (NODE) == TREE_VEC \
? TREE_VEC_LENGTH (NODE) : list_length (NODE)))
/* Returns the innermost level of template arguments in ARGS. */
template <class T> struct S { template <class U> void f(U); }
the FUNCTION_DECL for S<int>::f<double> will have, as its
- DECL_TI_TEMPLATE, `template <class U> S<int>::f<U>'.
+ DECL_TI_TEMPLATE, `template <class U> S<int>::f<U>'.
As a special case, for a member friend template of a template
class, this value will not be a TEMPLATE_DECL, but rather a
template <class T> struct S { friend void f<int>(int, double); }
the DECL_TI_TEMPLATE will be a LOOKUP_EXPR for `f' and the
- DECL_TI_ARGS will be {int}. */
+ DECL_TI_ARGS will be {int}. */
#define DECL_TI_TEMPLATE(NODE) TI_TEMPLATE (DECL_TEMPLATE_INFO (NODE))
/* The template arguments used to obtain this decl from the most
#define DECL_TI_ARGS(NODE) TI_ARGS (DECL_TEMPLATE_INFO (NODE))
#define CLASSTYPE_TI_TEMPLATE(NODE) TI_TEMPLATE (CLASSTYPE_TEMPLATE_INFO (NODE))
#define CLASSTYPE_TI_ARGS(NODE) TI_ARGS (CLASSTYPE_TEMPLATE_INFO (NODE))
-#define ENUM_TI_TEMPLATE(NODE) \
+#define ENUM_TI_TEMPLATE(NODE) \
TI_TEMPLATE (ENUM_TEMPLATE_INFO (NODE))
#define ENUM_TI_ARGS(NODE) \
TI_ARGS (ENUM_TEMPLATE_INFO (NODE))
the class definition is complete. */
#define TEMPLATE_PARMS_FOR_INLINE(NODE) TREE_LANG_FLAG_1 (NODE)
-/* In a FUNCTION_DECL, the saved representation of the body of the
- entire function. Usually a COMPOUND_STMT, but this may also be a
- RETURN_INIT, CTOR_INITIALIZER, or TRY_BLOCK. */
-#define DECL_SAVED_TREE(NODE) \
- (DECL_LANG_SPECIFIC (FUNCTION_DECL_CHECK (NODE))->saved_tree)
-
/* In a FUNCTION_DECL, the saved language-specific per-function data. */
#define DECL_SAVED_FUNCTION_DATA(NODE) \
(DECL_LANG_SPECIFIC (FUNCTION_DECL_CHECK (NODE))->u.saved_language_function)
#define AGGR_INIT_VIA_CTOR_P(NODE) \
TREE_LANG_FLAG_0 (AGGR_INIT_EXPR_CHECK (NODE))
-/* Nonzero if this statement should be considered a full-expression. */
-#define STMT_IS_FULL_EXPR_P(NODE) TREE_LANG_FLAG_1 ((NODE))
-
/* The TYPE_MAIN_DECL for a class template type is a TYPE_DECL, not a
TEMPLATE_DECL. This macro determines whether or not a given class
type is really a template type, as opposed to an instantiation or
/* Nonzero if NODE is a TYPE_DECL that should not be visible because
it is from a dependent base class. */
-#define IMPLICIT_TYPENAME_TYPE_DECL_P(NODE) \
+#define IMPLICIT_TYPENAME_TYPE_DECL_P(NODE) \
(TREE_CODE (NODE) == TYPE_DECL \
&& DECL_ARTIFICIAL (NODE) \
&& IMPLICIT_TYPENAME_P (TREE_TYPE (NODE)))
#define TYPE_POLYMORPHIC_P(NODE) (TREE_LANG_FLAG_2 (NODE))
/* Nonzero if this class has a virtual function table pointer. */
-#define TYPE_CONTAINS_VPTR_P(NODE) \
- (TYPE_POLYMORPHIC_P (NODE) \
- || (vbase_offsets_in_vtable_p () \
+#define TYPE_CONTAINS_VPTR_P(NODE) \
+ (TYPE_POLYMORPHIC_P (NODE) \
+ || (vbase_offsets_in_vtable_p () \
&& TYPE_USES_VIRTUAL_BASECLASSES (NODE)))
extern int flag_new_for_scope;
/* [basic.fundamental]
Types bool, char, wchar_t, and the signed and unsigned integer types
- are collectively called integral types.
+ are collectively called integral types.
Note that INTEGRAL_TYPE_P, as defined in tree.h, allows enumeration
types as well, which is incorrect in C++. */
-#define CP_INTEGRAL_TYPE_P(TYPE) \
- (TREE_CODE ((TYPE)) == BOOLEAN_TYPE \
+#define CP_INTEGRAL_TYPE_P(TYPE) \
+ (TREE_CODE ((TYPE)) == BOOLEAN_TYPE \
|| TREE_CODE ((TYPE)) == INTEGER_TYPE)
/* [basic.fundamental]
#define ARITHMETIC_TYPE_P(TYPE) \
(CP_INTEGRAL_TYPE_P (TYPE) || TREE_CODE (TYPE) == REAL_TYPE)
-/* Mark which labels are explicitly declared.
- These may be shadowed, and may be referenced from nested functions. */
-#define C_DECLARED_LABEL_FLAG(label) TREE_LANG_FLAG_1 (label)
-
/* Nonzero for _TYPE means that the _TYPE defines
at least one constructor. */
#define TYPE_HAS_CONSTRUCTOR(NODE) (TYPE_LANG_FLAG_1(NODE))
&& CONSTRUCTOR_ELTS (NODE) == NULL_TREE \
&& ! TREE_HAS_CONSTRUCTOR (NODE))
-#if 0
-/* Indicates that a NON_LVALUE_EXPR came from a C++ reference.
- Used to generate more helpful error message in case somebody
- tries to take its address. */
-#define TREE_REFERENCE_EXPR(NODE) (TREE_LANG_FLAG_3(NODE))
-#endif
-
/* Nonzero for _TYPE means that the _TYPE defines a destructor. */
#define TYPE_HAS_DESTRUCTOR(NODE) (TYPE_LANG_FLAG_2(NODE))
#define TYPE_HAS_COMPLEX_INIT_REF(NODE) (TYPE_LANG_SPECIFIC(NODE)->has_complex_init_ref)
/* Nonzero if TYPE has a trivial destructor. From [class.dtor]:
-
+
A destructor is trivial if it is an implicitly declared
destructor and if:
- all of the direct base classes of its class have trivial
- destructors,
+ destructors,
- for all of the non-static data members of its class that are
- of class type (or array thereof), each such class has a
+ of class type (or array thereof), each such class has a
trivial destructor. */
#define TYPE_HAS_TRIVIAL_DESTRUCTOR(NODE) \
(!TYPE_HAS_NONTRIVIAL_DESTRUCTOR (NODE))
#define TYPE_PTRMEMFUNC_FLAG(NODE) \
(TYPE_LANG_SPECIFIC(NODE)->ptrmemfunc_flag)
+/* Indicates when overload resolution may resolve to a pointer to
+ member function. [expr.unary.op]/3 */
+#define PTRMEM_OK_P(NODE) TREE_LANG_FLAG_0 (NODE)
+
/* A pointer-to-function member type looks like:
struct {
function.
(Of course, the exact values may differ depending on the mangling
- scheme, sizes of types, and such.).
+ scheme, sizes of types, and such.).
Under the new ABI, we do:
in the object.) If the function is virtual, then PFN is one plus
twice the index into the vtable; otherwise, it is just a pointer to
the function. */
-
+
/* Get the POINTER_TYPE to the METHOD_TYPE associated with this
pointer to member function. TYPE_PTRMEMFUNC_P _must_ be true,
before using this macro. */
#define PTRMEM_CST_CLASS(NODE) \
TYPE_PTRMEM_CLASS_TYPE (TREE_TYPE (PTRMEM_CST_CHECK (NODE)))
-/* For a pointer-to-member constant `X::Y' this is the _DECL for
+/* For a pointer-to-member constant `X::Y' this is the _DECL for
`Y'. */
#define PTRMEM_CST_MEMBER(NODE) (((ptrmem_cst_t)PTRMEM_CST_CHECK (NODE))->member)
/* Define fields and accessors for nodes representing declared names. */
-#if 0
-/* C++: A derived class may be able to directly use the virtual
- function table of a base class. When it does so, it may
- still have a decl node used to access the virtual function
- table (so that variables of this type can initialize their
- virtual function table pointers by name). When such thievery
- is committed, know exactly which base class's virtual function
- table is the one being stolen. This effectively computes the
- transitive closure. */
-#define DECL_VPARENT(NODE) ((NODE)->decl.arguments)
-#endif
-
#define TYPE_WAS_ANONYMOUS(NODE) (TYPE_LANG_SPECIFIC (NODE)->was_anonymous)
/* C++: all of these are overloaded! These apply only to TYPE_DECLs. */
template <class T> struct S {
template <class U> void f(U);
- template <> void f(T);
+ template <> void f(T);
};
the `S<int>::f<int>(int)' function will appear on the
#define DECL_TEMPLATE_SPECIALIZATIONS(NODE) DECL_SIZE(NODE)
/* Nonzero for a DECL which is actually a template parameter. */
-#define DECL_TEMPLATE_PARM_P(NODE) \
+#define DECL_TEMPLATE_PARM_P(NODE) \
(DECL_LANG_FLAG_0 (NODE) \
&& (TREE_CODE (NODE) == CONST_DECL \
|| TREE_CODE (NODE) == TYPE_DECL \
/* The various kinds of access. BINFO_ACCESS depends on these being
two bit quantities. The numerical values are important; they are
- used to initialize RTTI data structures, so chaning them changes
+ used to initialize RTTI data structures, so changing them changes
the ABI. */
typedef enum access_kind {
ak_none = 0, /* Inaccessible. */
typedef enum instantiate_type_flags {
itf_none = 0, /* nothing special */
itf_complain = 1 << 0, /* complain about errors */
- itf_no_attributes = 1 << 1 /* ignore attributes on comparisons */
+ itf_no_attributes = 1 << 1, /* ignore attributes on comparisons */
+ itf_ptrmem_ok = 1 << 2, /* pointers to member ok (internal use) */
} instantiate_type_flags;
/* Non-zero means that if a label exists, and no other identifier
/* Nonzero means allow Microsoft extensions without a pedwarn. */
extern int flag_ms_extensions;
-/* Non-zero means to collect statistics which might be expensive
- and to print them when we are done. */
-extern int flag_detailed_statistics;
-
/* Non-zero means warn in function declared in derived class has the
same name as a virtual in the base class, but fails to match the
type signature of any virtual function in the base class. */
extern void decl_attributes PARAMS ((tree, tree, tree));
extern void init_function_format_info PARAMS ((void));
extern void record_function_format PARAMS ((tree, tree, int, int, int));
-extern void check_function_format PARAMS ((tree, tree, tree));
+extern void check_function_format PARAMS ((int *, tree, tree, tree));
/* Print an error message for invalid operands to arith operation CODE.
NOP_EXPR is used as a special case (see truthvalue_conversion). */
extern void binary_op_error PARAMS ((enum tree_code));
#define TINST_LINE(NODE) EXPR_WFL_LINENO (NODE)
#define TINST_FILE(NODE) EXPR_WFL_FILENAME (NODE)
-extern void maybe_print_template_context PARAMS ((void));
-
/* in class.c */
extern int current_class_depth;
#define VTABLE_PFN_NAME "__pfn"
#define VTABLE_DELTA2_NAME "__delta2"
-#define EXCEPTION_CLEANUP_NAME "exception cleanup"
+#define EXCEPTION_CLEANUP_NAME "exception cleanup"
/* The name used as a prefix for VTTs. When the new ABI mangling
scheme is implemented, this should be removed. */
#define VPTR_NAME_P(ID_NODE) (IDENTIFIER_POINTER (ID_NODE)[0] == JOINER \
&& IDENTIFIER_POINTER (ID_NODE)[1] == 'v')
#define DESTRUCTOR_NAME_P(ID_NODE) (IDENTIFIER_POINTER (ID_NODE)[1] == JOINER \
- && IDENTIFIER_POINTER (ID_NODE)[2] == '_')
+ && IDENTIFIER_POINTER (ID_NODE)[2] == '_')
#define VTABLE_NAME_P(ID_NODE) (IDENTIFIER_POINTER (ID_NODE)[1] == 'v' \
&& IDENTIFIER_POINTER (ID_NODE)[2] == 't' \
#endif /* !defined(NO_DOLLAR_IN_LABEL) || !defined(NO_DOT_IN_LABEL) */
/* Store the vbase pointer field name for type TYPE into pointer BUF. */
-#define FORMAT_VBASE_NAME(BUF,TYPE) do { \
+#define FORMAT_VBASE_NAME(BUF,TYPE) do { \
char *wbuf = (char *) alloca (TYPE_ASSEMBLER_NAME_LENGTH (TYPE) \
+ sizeof (VBASE_NAME) + 1); \
sprintf (wbuf, VBASE_NAME_FORMAT, TYPE_ASSEMBLER_NAME_STRING (TYPE)); \
(BUF) = wbuf; \
} while (0)
-/* Returns non-zero iff ID_NODE is an IDENTIFIER_NODE whose name is
- `main'. */
-#define MAIN_NAME_P(ID_NODE) \
- (strcmp (IDENTIFIER_POINTER (ID_NODE), "main") == 0)
-
/* Returns non-zero iff NODE is a declaration for the global function
`main'. */
#define DECL_MAIN_P(NODE) \
\f
/* Things for handling inline functions. */
-struct pending_inline
-{
- struct pending_inline *next; /* pointer to next in chain */
- int lineno; /* line number we got the text from */
- const char *filename; /* name of file we were processing */
- tree fndecl; /* FUNCTION_DECL that brought us here */
- int token; /* token we were scanning */
- int token_value; /* value of token we were scanning (YYSTYPE) */
-
- char *buf; /* pointer to character stream */
- int len; /* length of stream */
- unsigned int can_free : 1; /* free this after we're done with it? */
- unsigned int deja_vu : 1; /* set iff we don't want to see it again. */
- unsigned int interface : 2; /* 0=interface 1=unknown 2=implementation */
-};
-
-/* in method.c */
-extern struct pending_inline *pending_inlines;
-
/* Negative values means we know `this' to be of static type. */
extern int flag_this_is_variable;
extern int at_eof;
+/* Functions called along with real static constructors and destructors. */
+
+extern tree static_ctors;
+extern tree static_dtors;
+
enum overload_flags { NO_SPECIAL = 0, DTOR_FLAG, OP_FLAG, TYPENAME_FLAG };
/* Some macros for char-based bitfields. */
These are used in global lookup to support elaborated types and
qualifiers.
-
+
LOOKUP_PREFER_TYPES means not to accept objects, and possibly namespaces.
LOOKUP_PREFER_NAMESPACES means not to accept objects, and possibly types.
LOOKUP_PREFER_BOTH means class-or-namespace-name.
#define LOOKUP_TYPES_ONLY(f) \
(!((f) & LOOKUP_PREFER_NAMESPACES) && ((f) & LOOKUP_PREFER_TYPES))
#define LOOKUP_QUALIFIERS_ONLY(f) ((f) & LOOKUP_PREFER_BOTH)
-
+
/* These flags are used by the conversion code.
CONV_IMPLICIT : Perform implicit conversions (standard and user-defined).
CONV_REINTERPRET: Perform the explicit conversions for reinterpret_cast.
CONV_PRIVATE : Perform upcasts to private bases.
CONV_FORCE_TEMP : Require a new temporary when converting to the same
- aggregate type. */
+ aggregate type. */
#define CONV_IMPLICIT 1
#define CONV_STATIC 2
already been parsed. */
#define SF_INCLASS_INLINE 2 /* The function is an inline, defined
in the class body. */
-#define SF_EXPAND 4 /* Generate RTL for this function. */
-
/* Returns nonzero iff TYPE1 and TYPE2 are the same type, or if TYPE2
is derived from TYPE1, or if TYPE2 is a pointer (reference) to a
#define TEMPLATE_PARM_ORIG_LEVEL(NODE) (TEMPLATE_PARM_INDEX_CAST (NODE)->orig_level)
#define TEMPLATE_PARM_DECL(NODE) (TEMPLATE_PARM_INDEX_CAST (NODE)->decl)
-/* These macros are for accessing the fields of TEMPLATE_TYPE_PARM
- and TEMPLATE_TEMPLATE_PARM nodes. */
+/* These macros are for accessing the fields of TEMPLATE_TYPE_PARM,
+ TEMPLATE_TEMPLATE_PARM and BOUND_TEMPLATE_TEMPLATE_PARM nodes. */
#define TEMPLATE_TYPE_PARM_INDEX(NODE) (TYPE_FIELDS (NODE))
#define TEMPLATE_TYPE_IDX(NODE) \
(TEMPLATE_PARM_IDX (TEMPLATE_TYPE_PARM_INDEX (NODE)))
TS_FUNC_SCOPE = 1 << 8, /* show function scope */
TS_PEDANTIC_NAME = 1 << 9, /* pedantically name things */
TS_TEMPLATE_PREFIX= 1 << 10, /* show template <parms> prefix */
-
+
/* Internal use flags */
TS_TEMPLATE_PARM = 1 << 11, /* decl is really a non-type template parm */
TS_TEMPLATE_PLAIN = 1 << 12, /* don't decorate primary template_name */
-
+
TS_NEXT_BIT = 13 /* next available bit */
};
/* Returns the TEMPLATE_DECL associated to a TEMPLATE_TEMPLATE_PARM
node. */
-#define TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL(NODE) \
- (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO (NODE) \
- ? TYPE_TI_TEMPLATE (NODE) \
+#define TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL(NODE) \
+ ((TREE_CODE (NODE) == BOUND_TEMPLATE_TEMPLATE_PARM) \
+ ? TYPE_TI_TEMPLATE (NODE) \
: TYPE_NAME (NODE))
/* in lex.c */
extern void maybe_push_to_top_level PARAMS ((int));
extern void push_to_top_level PARAMS ((void));
extern void pop_from_top_level PARAMS ((void));
-extern void push_switch PARAMS ((void));
+extern void push_switch PARAMS ((tree));
extern void pop_switch PARAMS ((void));
extern tree identifier_type_value PARAMS ((tree));
extern void set_identifier_type_value PARAMS ((tree, tree));
extern tree pushdecl PARAMS ((tree));
extern tree pushdecl_top_level PARAMS ((tree));
extern void pushdecl_class_level PARAMS ((tree));
-#if 0
-extern void pushdecl_nonclass_level PARAMS ((tree));
-#endif
extern tree pushdecl_namespace_level PARAMS ((tree));
extern tree push_using_decl PARAMS ((tree, tree));
extern tree push_using_directive PARAMS ((tree));
extern void define_case_label PARAMS ((void));
extern tree getdecls PARAMS ((void));
extern tree gettags PARAMS ((void));
-#if 0
-extern void set_current_level_tags_transparency PARAMS ((int));
-#endif
extern tree binding_for_name PARAMS ((tree, tree));
extern tree namespace_binding PARAMS ((tree, tree));
extern void set_namespace_binding PARAMS ((tree, tree, tree));
extern tree finish_enum PARAMS ((tree));
extern void build_enumerator PARAMS ((tree, tree, tree));
extern int start_function PARAMS ((tree, tree, tree, int));
-extern void expand_start_early_try_stmts PARAMS ((void));
-extern void store_parm_decls PARAMS ((void));
-extern void store_return_init PARAMS ((tree));
extern tree finish_function PARAMS ((int));
extern tree start_method PARAMS ((tree, tree, tree));
extern tree finish_method PARAMS ((tree));
extern void hack_incomplete_structures PARAMS ((tree));
extern tree maybe_build_cleanup PARAMS ((tree));
-extern void cplus_expand_expr_stmt PARAMS ((tree));
extern void finish_stmt PARAMS ((void));
extern void replace_defarg PARAMS ((tree, tree));
extern void print_other_binding_stack PARAMS ((struct binding_level *));
extern tree groktypefield PARAMS ((tree, tree));
extern tree grokoptypename PARAMS ((tree, tree));
extern int copy_assignment_arg_p PARAMS ((tree, int));
-extern void cplus_decl_attributes PARAMS ((tree, tree, tree));
+extern void cplus_decl_attributes PARAMS ((tree, tree, tree));
extern tree constructor_name_full PARAMS ((tree));
extern tree constructor_name PARAMS ((tree));
extern void setup_vtbl_ptr PARAMS ((tree, tree));
-extern void defer_fn PARAMS ((tree));
+extern void defer_fn PARAMS ((tree));
extern tree get_temp_name PARAMS ((tree));
extern void finish_anon_union PARAMS ((tree));
extern tree finish_table PARAMS ((tree, tree, tree, int));
extern tree build_expr_from_tree PARAMS ((tree));
extern tree reparse_decl_as_expr PARAMS ((tree, tree));
extern tree finish_decl_parsing PARAMS ((tree));
-extern tree check_cp_case_value PARAMS ((tree));
extern void set_decl_namespace PARAMS ((tree, tree, int));
extern tree current_decl_namespace PARAMS ((void));
extern void push_decl_namespace PARAMS ((tree));
extern const char *cp_file_of PARAMS ((tree));
extern int cp_line_of PARAMS ((tree));
extern const char *language_to_string PARAMS ((enum languages, int));
+extern void print_instantiation_context PARAMS ((void));
+/* cp_printer is the type of a function which converts an argument into
+ a string for digestion by printf. The cp_printer function should deal
+ with all memory management; the functions in errfn will not free
+ the char*s returned. See error.c for an example use of this code. */
+typedef const char *cp_printer PARAMS ((tree, int));
+extern cp_printer *cp_printers[256];
+
/* in except.c */
extern void init_exception_processing PARAMS ((void));
/* in expr.c */
extern void init_cplus_expand PARAMS ((void));
-extern void fixup_result_decl PARAMS ((tree, struct rtx_def *));
extern int extract_init PARAMS ((tree, tree));
extern tree cplus_expand_constant PARAMS ((tree));
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 decl_constant_value PARAMS ((tree));
extern tree build_new PARAMS ((tree, tree, tree, int));
extern tree build_vec_init PARAMS ((tree, tree, tree, tree, int));
extern tree build_x_delete PARAMS ((tree, int, tree));
extern void set_quals_and_spec PARAMS ((tree, tree, tree));
extern void lang_init PARAMS ((void));
extern void lang_finish PARAMS ((void));
-#if 0
-extern void reinit_lang_specific PARAMS ((void));
-#endif
extern void print_parse_statistics PARAMS ((void));
-extern void extract_interface_info PARAMS ((void));
extern void do_pending_inlines PARAMS ((void));
-extern void process_next_inline PARAMS ((struct pending_inline *));
-extern struct pending_input *save_pending_input PARAMS ((void));
-extern void restore_pending_input PARAMS ((struct pending_input *));
+extern void process_next_inline PARAMS ((struct unparsed_text *));
+
extern void yyungetc PARAMS ((int, int));
-extern void reinit_parse_for_method PARAMS ((int, tree));
-extern void reinit_parse_for_block PARAMS ((int, struct obstack *));
+extern void snarf_method PARAMS ((tree));
+
extern void check_for_missing_semicolon PARAMS ((tree));
extern void note_got_semicolon PARAMS ((tree));
extern void note_list_got_semicolon PARAMS ((tree));
extern void do_pending_lang_change PARAMS ((void));
-extern int identifier_type PARAMS ((tree));
extern void see_typename PARAMS ((void));
extern tree do_identifier PARAMS ((tree, int, tree));
extern tree do_scoped_id PARAMS ((tree, int));
extern tree identifier_typedecl_value PARAMS ((tree));
-extern int real_yylex PARAMS ((void));
-extern int is_rid PARAMS ((tree));
extern tree build_lang_decl PARAMS ((enum tree_code, tree, tree));
extern void retrofit_lang_decl PARAMS ((tree));
extern tree copy_decl PARAMS ((tree));
extern void copy_lang_decl PARAMS ((tree));
extern tree cp_make_lang_type PARAMS ((enum tree_code));
extern tree make_aggr_type PARAMS ((enum tree_code));
-extern void dump_time_statistics PARAMS ((void));
extern void compiler_error PARAMS ((const char *, ...))
ATTRIBUTE_PRINTF_1;
extern void yyerror PARAMS ((const char *));
extern void clear_inline_text_obstack PARAMS ((void));
extern void maybe_snarf_defarg PARAMS ((void));
-extern tree snarf_defarg PARAMS ((void));
extern void add_defarg_fn PARAMS ((tree));
extern void do_pending_defargs PARAMS ((void));
-extern int identifier_type PARAMS ((tree));
extern void yyhook PARAMS ((int));
extern int cp_type_qual_from_rid PARAMS ((tree));
extern char *build_overload_name PARAMS ((tree, int, int));
extern tree build_static_name PARAMS ((tree, tree));
extern tree build_decl_overload_real PARAMS ((tree, tree, tree, tree,
- tree, int));
+ tree, int));
extern void set_mangled_name_for_decl PARAMS ((tree));
extern tree build_typename_overload PARAMS ((tree));
extern tree build_overload_with_type PARAMS ((tree, tree));
extern void do_type_instantiation PARAMS ((tree, tree, int));
extern tree instantiate_decl PARAMS ((tree, int));
extern tree get_bindings PARAMS ((tree, tree, tree));
-extern void add_tree PARAMS ((tree));
extern void add_maybe_template PARAMS ((tree, tree));
extern void pop_tinst_level PARAMS ((void));
extern int more_specialized_class PARAMS ((tree, tree));
extern tree tsubst_default_argument PARAMS ((tree, tree, tree));
extern tree most_general_template PARAMS ((tree));
extern tree get_mostly_instantiated_function_type PARAMS ((tree, tree *, tree *));
+extern int problematic_instantiation_changed PARAMS ((void));
+extern void record_last_problematic_instantiation PARAMS ((void));
+extern tree current_instantiation PARAMS ((void));
extern int processing_template_parmlist;
/* in repo.c */
extern tree lookup_conversions PARAMS ((tree));
extern tree binfo_for_vtable PARAMS ((tree));
extern int binfo_from_vbase PARAMS ((tree));
-extern tree dfs_walk PARAMS ((tree,
+extern tree dfs_walk PARAMS ((tree,
tree (*)(tree, void *),
tree (*) (tree, void *),
void *));
-extern tree dfs_walk_real PARAMS ((tree,
+extern tree dfs_walk_real PARAMS ((tree,
tree (*) (tree, void *),
tree (*) (tree, void *),
tree (*) (tree, void *),
extern void fixup_all_virtual_upcast_offsets PARAMS ((tree));
/* in semantics.c */
+extern void init_cp_semantics PARAMS ((void));
extern void finish_expr_stmt PARAMS ((tree));
extern tree begin_if_stmt PARAMS ((void));
extern void finish_if_stmt_cond PARAMS ((tree, tree));
extern void finish_member_declaration PARAMS ((tree));
extern void check_multiple_declarators PARAMS ((void));
extern tree finish_typeof PARAMS ((tree));
-extern void add_decl_stmt PARAMS ((tree));
extern void finish_decl_cleanup PARAMS ((tree, tree));
extern void finish_named_return_value PARAMS ((tree, tree));
extern void expand_body PARAMS ((tree));
-extern void begin_stmt_tree PARAMS ((tree *));
-extern void finish_stmt_tree PARAMS ((tree *));
extern void prep_stmt PARAMS ((tree));
-extern tree add_scope_stmt PARAMS ((int, int));
extern void do_pushlevel PARAMS ((void));
extern tree do_poplevel PARAMS ((void));
extern void finish_mem_initializers PARAMS ((tree));
-extern void genrtl_try_block PARAMS ((tree));
-extern void genrtl_handler PARAMS ((tree));
-extern void genrtl_catch_block PARAMS ((tree));
-extern void genrtl_ctor_stmt PARAMS ((tree));
-extern void genrtl_subobject PARAMS ((tree));
-extern tree genrtl_do_poplevel PARAMS ((void));
extern void clear_out_block PARAMS ((void));
-extern void genrtl_named_return_value PARAMS ((tree,
- tree));
extern tree begin_global_stmt_expr PARAMS ((void));
extern tree finish_global_stmt_expr PARAMS ((tree));
extern int peekyylex PARAMS ((void));
extern int yylex PARAMS ((void));
extern tree arbitrate_lookup PARAMS ((tree, tree, tree));
+extern tree frob_opname PARAMS ((tree));
/* in tree.c */
extern void init_tree PARAMS ((void));
extern tree break_out_target_exprs PARAMS ((tree));
extern tree get_type_decl PARAMS ((tree));
extern tree vec_binfo_member PARAMS ((tree, tree));
-extern tree decl_namespace_context PARAMS ((tree));
+extern tree decl_namespace_context PARAMS ((tree));
extern tree lvalue_type PARAMS ((tree));
extern tree error_type PARAMS ((tree));
extern tree build_ptr_wrapper PARAMS ((void *));
extern tree build_dummy_object PARAMS ((tree));
extern tree maybe_dummy_object PARAMS ((tree, tree *));
extern int is_dummy_object PARAMS ((tree));
-typedef tree (*walk_tree_fn) PARAMS ((tree *, int *, void *));
-extern tree walk_tree PARAMS ((tree *, walk_tree_fn, void *));
+extern tree walk_tree PARAMS ((tree *,
+ walk_tree_fn,
+ void *,
+ htab_t));
+extern tree walk_tree_without_duplicates PARAMS ((tree *,
+ walk_tree_fn,
+ void *));
extern tree copy_tree_r PARAMS ((tree *, int *, void *));
extern int cp_valid_lang_attribute PARAMS ((tree, tree, tree, tree));
extern tree make_ptrmem_cst PARAMS ((tree, tree));
extern int char_type_p PARAMS ((tree));
extern void verify_stmt_tree PARAMS ((tree));
extern tree find_tree PARAMS ((tree, tree));
-
+
/* in typeck.c */
extern int string_conv_p PARAMS ((tree, tree, int));
extern tree condition_conversion PARAMS ((tree));
extern tree mangle_vtbl_for_type PARAMS ((tree));
extern tree mangle_vtt_for_type PARAMS ((tree));
extern tree mangle_ctor_vtbl_for_type PARAMS ((tree, tree));
-extern tree mangle_thunk PARAMS ((tree, tree, tree));
+extern tree mangle_thunk PARAMS ((tree, tree, tree));
extern tree mangle_conv_op_name_for_type PARAMS ((tree));
extern tree mangle_guard_variable PARAMS ((tree));