Commit bb20cc46 by Andreas Jaeger

errfn.c: Move declaration of cp_printer and cp_printers to ...

        * errfn.c: Move declaration of cp_printer and cp_printers to ...
        * cp-tree.h: ... here.

        * error.c: Remove declaration of cp_printer.

From-SVN: r36557
parent 07328167
2000-09-21 Andreas Jaeger <aj@suse.de>
* errfn.c: Move declaration of cp_printer and cp_printers to ...
* cp-tree.h: ... here.
* error.c: Remove declaration of cp_printer.
2000-09-20 Mark Mitchell <mark@codesourcery.com> 2000-09-20 Mark Mitchell <mark@codesourcery.com>
* tree.c (mark_local_for_remap_r): Handle CASE_LABELs. * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
...@@ -14,7 +21,7 @@ ...@@ -14,7 +21,7 @@
2000-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 2000-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* cp-tree.h (check_function_format): Accept a `status' parameter. * cp-tree.h (check_function_format): Accept a `status' parameter.
* call.c, typeck.c: Updates calls to `check_function_format'. * call.c, typeck.c: Updates calls to `check_function_format'.
2000-09-17 Geoffrey Keating <geoffk@cygnus.com> 2000-09-17 Geoffrey Keating <geoffk@cygnus.com>
...@@ -72,7 +79,7 @@ ...@@ -72,7 +79,7 @@
* tree.c (cp_statement_code_p): Don't include SCOPE_STMT. * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
* typeck.c: Change order of includes. * typeck.c: Change order of includes.
(convert_sequence): Remove. (convert_sequence): Remove.
2000-09-14 Joseph S. Myers <jsm28@cam.ac.uk> 2000-09-14 Joseph S. Myers <jsm28@cam.ac.uk>
* lex.c (reswords): Add _Complex. * lex.c (reswords): Add _Complex.
...@@ -214,7 +221,7 @@ Thu Sep 14 12:10:45 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> ...@@ -214,7 +221,7 @@ Thu Sep 14 12:10:45 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
(finish_case_label): Remove. (finish_case_label): Remove.
* typeck.c (c_expand_return): Remove. * typeck.c (c_expand_return): Remove.
(c_expand_start_case): Likewise. (c_expand_start_case): Likewise.
2000-09-07 Gabriel Dos Reis <gdr@codesourcery.com> 2000-09-07 Gabriel Dos Reis <gdr@codesourcery.com>
* ir.texi: Document type nodes. * ir.texi: Document type nodes.
...@@ -316,7 +323,7 @@ Thu Sep 14 12:10:45 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> ...@@ -316,7 +323,7 @@ Thu Sep 14 12:10:45 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
(cp_statement_code_p): New function. (cp_statement_code_p): New function.
(walk_stmt_tree): Remove. (walk_stmt_tree): Remove.
(init_tree): Set lang_statement_code_p. (init_tree): Set lang_statement_code_p.
2000-09-06 Zack Weinberg <zack@wolery.cumb.org> 2000-09-06 Zack Weinberg <zack@wolery.cumb.org>
Integrated preprocessor. Integrated preprocessor.
...@@ -2983,11 +2990,11 @@ Mon May 15 11:46:29 2000 Donald Lindsay <dlindsay@cygnus.com> ...@@ -2983,11 +2990,11 @@ Mon May 15 11:46:29 2000 Donald Lindsay <dlindsay@cygnus.com>
Wed May 17 17:27:44 2000 Andrew Cagney <cagney@b1.cygnus.com> Wed May 17 17:27:44 2000 Andrew Cagney <cagney@b1.cygnus.com>
* decl.c (pop_label): Replace warn_unused with warn_unused_label. * decl.c (pop_label): Replace warn_unused with warn_unused_label.
* typeck.c (build_x_compound_expr): Replace warn_unused with * typeck.c (build_x_compound_expr): Replace warn_unused with
warn_unused_value. warn_unused_value.
* decl2.c (lang_decode_option): Update -Wall unused flags by * decl2.c (lang_decode_option): Update -Wall unused flags by
calling set_Wunused. calling set_Wunused.
2000-05-16 Mark Mitchell <mark@codesourcery.com> 2000-05-16 Mark Mitchell <mark@codesourcery.com>
...@@ -6327,4 +6334,3 @@ Wed Jan 26 22:19:14 2000 J"orn Rennecke <amylaar@cygnus.co.uk> ...@@ -6327,4 +6334,3 @@ Wed Jan 26 22:19:14 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
2000-01-01 Martin v. Lwis <loewis@informatik.hu-berlin.de> 2000-01-01 Martin v. Lwis <loewis@informatik.hu-berlin.de>
* call.c (build_new_method_call): Also check destructors. * call.c (build_new_method_call): Also check destructors.
...@@ -114,7 +114,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -114,7 +114,7 @@ Boston, MA 02111-1307, USA. */
TYPE_BINFO TYPE_BINFO
For an ENUMERAL_TYPE, this is ENUM_TEMPLATE_INFO. For an ENUMERAL_TYPE, this is ENUM_TEMPLATE_INFO.
For a TYPENAME_TYPE, this is TYPENAME_TYPE_FULLNAME. For a TYPENAME_TYPE, this is TYPENAME_TYPE_FULLNAME.
For a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM, For a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM,
this is TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO. this is TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
BINFO_VIRTUALS BINFO_VIRTUALS
...@@ -145,7 +145,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -145,7 +145,7 @@ Boston, MA 02111-1307, USA. */
in both ABIs. in both ABIs.
DECL_ARGUMENTS DECL_ARGUMENTS
For a VAR_DECL this is DECL_ANON_UNION_ELEMS. For a VAR_DECL this is DECL_ANON_UNION_ELEMS.
DECL_VINDEX DECL_VINDEX
This field is NULL for a non-virtual function. For a virtual This field is NULL for a non-virtual function. For a virtual
...@@ -154,7 +154,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -154,7 +154,7 @@ Boston, MA 02111-1307, USA. */
a virtual function is declared, but before it is known what a virtual function is declared, but before it is known what
function is overriden, this field is the error_mark_node. 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 virtual function this one overrides, and whose TREE_CHAIN is
the old DECL_VINDEX. */ the old DECL_VINDEX. */
...@@ -173,8 +173,8 @@ Boston, MA 02111-1307, USA. */ ...@@ -173,8 +173,8 @@ Boston, MA 02111-1307, USA. */
#define VAR_FUNCTION_OR_PARM_DECL_CHECK(NODE) \ #define VAR_FUNCTION_OR_PARM_DECL_CHECK(NODE) \
({ const tree __t = NODE; \ ({ const tree __t = NODE; \
enum tree_code __c = TREE_CODE(__t); \ enum tree_code __c = TREE_CODE(__t); \
if (__c != VAR_DECL \ if (__c != VAR_DECL \
&& __c != FUNCTION_DECL \ && __c != FUNCTION_DECL \
&& __c != PARM_DECL) \ && __c != PARM_DECL) \
tree_check_failed (__t, VAR_DECL, __FILE__, __LINE__, \ tree_check_failed (__t, VAR_DECL, __FILE__, __LINE__, \
__FUNCTION__); \ __FUNCTION__); \
...@@ -183,7 +183,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -183,7 +183,7 @@ Boston, MA 02111-1307, USA. */
#define VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK(NODE) \ #define VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK(NODE) \
({ const tree __t = NODE; \ ({ const tree __t = NODE; \
enum tree_code __c = TREE_CODE(__t); \ enum tree_code __c = TREE_CODE(__t); \
if (__c != VAR_DECL \ if (__c != VAR_DECL \
&& __c != FUNCTION_DECL \ && __c != FUNCTION_DECL \
&& __c != TYPE_DECL \ && __c != TYPE_DECL \
&& __c != TEMPLATE_DECL) \ && __c != TEMPLATE_DECL) \
...@@ -307,14 +307,14 @@ struct lang_id2 ...@@ -307,14 +307,14 @@ struct lang_id2
tree error_locus; tree error_locus;
}; };
typedef struct typedef struct
{ {
tree t; tree t;
int new_type_flag; int new_type_flag;
tree lookups; tree lookups;
} flagged_type_tree; } flagged_type_tree;
typedef struct typedef struct
{ {
struct tree_common common; struct tree_common common;
HOST_WIDE_INT index; HOST_WIDE_INT index;
...@@ -326,7 +326,7 @@ typedef struct ...@@ -326,7 +326,7 @@ typedef struct
typedef struct ptrmem_cst typedef struct ptrmem_cst
{ {
struct tree_common common; 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. */ this field. */
struct rtx_def *rtl; struct rtx_def *rtl;
tree member; tree member;
...@@ -470,7 +470,7 @@ struct tree_srcloc ...@@ -470,7 +470,7 @@ struct tree_srcloc
/* The IDENTIFIER_VALUE is the value of the IDENTIFIER_BINDING, or /* The IDENTIFIER_VALUE is the value of the IDENTIFIER_BINDING, or
NULL_TREE if there is no binding. */ NULL_TREE if there is no binding. */
#define IDENTIFIER_VALUE(NODE) \ #define IDENTIFIER_VALUE(NODE) \
(IDENTIFIER_BINDING (NODE) \ (IDENTIFIER_BINDING (NODE) \
? BINDING_VALUE (IDENTIFIER_BINDING (NODE)) \ ? BINDING_VALUE (IDENTIFIER_BINDING (NODE)) \
: NULL_TREE) : NULL_TREE)
...@@ -493,7 +493,7 @@ struct tree_srcloc ...@@ -493,7 +493,7 @@ struct tree_srcloc
#define LANG_ID_FIELD(NAME,NODE) \ #define LANG_ID_FIELD(NAME,NODE) \
(LANG_IDENTIFIER_CAST (NODE)->x \ (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) \ #define SET_LANG_ID(NODE,VALUE,NAME) \
(LANG_IDENTIFIER_CAST (NODE)->x == 0 \ (LANG_IDENTIFIER_CAST (NODE)->x == 0 \
...@@ -577,7 +577,7 @@ enum cp_tree_index ...@@ -577,7 +577,7 @@ enum cp_tree_index
CPTI_VMI_CLASS_DESC_TYPE, CPTI_VMI_CLASS_DESC_TYPE,
CPTI_PTM_DESC_TYPE, CPTI_PTM_DESC_TYPE,
CPTI_BASE_DESC_TYPE, CPTI_BASE_DESC_TYPE,
CPTI_CLASS_TYPE, CPTI_CLASS_TYPE,
CPTI_RECORD_TYPE, CPTI_RECORD_TYPE,
CPTI_UNION_TYPE, CPTI_UNION_TYPE,
...@@ -1144,8 +1144,8 @@ extern int name_mangling_version; ...@@ -1144,8 +1144,8 @@ extern int name_mangling_version;
would normally be, for use with WINE. */ would normally be, for use with WINE. */
extern int flag_short_wchar; extern int flag_short_wchar;
/* Nonzero if squashed mangling is to be performed. /* Nonzero if squashed mangling is to be performed.
This uses the B and K codes to reference previously seen class types This uses the B and K codes to reference previously seen class types
and class qualifiers. */ and class qualifiers. */
extern int flag_do_squangling; extern int flag_do_squangling;
...@@ -1220,8 +1220,8 @@ enum languages { lang_c, lang_cplusplus, lang_java }; ...@@ -1220,8 +1220,8 @@ enum languages { lang_c, lang_cplusplus, lang_java };
|| TREE_CODE (t) == BOUND_TEMPLATE_TEMPLATE_PARM \ || TREE_CODE (t) == BOUND_TEMPLATE_TEMPLATE_PARM \
|| TYPE_LANG_FLAG_5 (t)) || TYPE_LANG_FLAG_5 (t))
/* Set IS_AGGR_TYPE for T to VAL. T must be a class, struct, or /* Set IS_AGGR_TYPE for T to VAL. T must be a class, struct, or
union type. */ union type. */
#define SET_IS_AGGR_TYPE(T, VAL) \ #define SET_IS_AGGR_TYPE(T, VAL) \
(TYPE_LANG_FLAG_5 (T) = (VAL)) (TYPE_LANG_FLAG_5 (T) = (VAL))
...@@ -1246,7 +1246,7 @@ enum languages { lang_c, lang_cplusplus, lang_java }; ...@@ -1246,7 +1246,7 @@ enum languages { lang_c, lang_cplusplus, lang_java };
/* The type qualifiers for this type, including the qualifiers on the /* The type qualifiers for this type, including the qualifiers on the
elements for an array type. */ elements for an array type. */
#define CP_TYPE_QUALS(NODE) \ #define CP_TYPE_QUALS(NODE) \
((TREE_CODE (NODE) != ARRAY_TYPE) \ ((TREE_CODE (NODE) != ARRAY_TYPE) \
? TYPE_QUALS (NODE) : cp_type_quals (NODE)) ? TYPE_QUALS (NODE) : cp_type_quals (NODE))
/* Nonzero if this type is const-qualified. */ /* Nonzero if this type is const-qualified. */
...@@ -1364,7 +1364,7 @@ struct lang_type ...@@ -1364,7 +1364,7 @@ struct lang_type
of this by updating the size of this bitfield whenever you add or of this by updating the size of this bitfield whenever you add or
remove a flag. */ remove a flag. */
unsigned dummy : 8; unsigned dummy : 8;
int vsize; int vsize;
tree primary_base; tree primary_base;
...@@ -1409,7 +1409,7 @@ struct lang_type ...@@ -1409,7 +1409,7 @@ struct lang_type
has a two-argument array operator delete. */ has a two-argument array operator delete. */
#define TYPE_VEC_NEW_USES_COOKIE(NODE) \ #define TYPE_VEC_NEW_USES_COOKIE(NODE) \
(TYPE_HAS_NONTRIVIAL_DESTRUCTOR (NODE) \ (TYPE_HAS_NONTRIVIAL_DESTRUCTOR (NODE) \
|| (TYPE_LANG_SPECIFIC (NODE) \ || (TYPE_LANG_SPECIFIC (NODE) \
&& TYPE_VEC_DELETE_TAKES_SIZE (NODE))) && TYPE_VEC_DELETE_TAKES_SIZE (NODE)))
/* Nonzero means that this _CLASSTYPE node defines ways of converting /* Nonzero means that this _CLASSTYPE node defines ways of converting
...@@ -1523,7 +1523,7 @@ struct lang_type ...@@ -1523,7 +1523,7 @@ struct lang_type
#define SET_CLASSTYPE_MARKED2(NODE) SET_CLASSTYPE_MARKED_N(NODE, 1) #define SET_CLASSTYPE_MARKED2(NODE) SET_CLASSTYPE_MARKED_N(NODE, 1)
#define CLEAR_CLASSTYPE_MARKED2(NODE) CLEAR_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 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 SET_CLASSTYPE_MARKED4(NODE) SET_CLASSTYPE_MARKED_N(NODE, 3)
#define CLEAR_CLASSTYPE_MARKED4(NODE) CLEAR_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) #define SET_CLASSTYPE_MARKED5(NODE) SET_CLASSTYPE_MARKED_N(NODE, 4)
...@@ -1566,8 +1566,8 @@ struct lang_type ...@@ -1566,8 +1566,8 @@ struct lang_type
binfo_for_vbase. C is the most derived class for the hierarchy binfo_for_vbase. C is the most derived class for the hierarchy
containing BINFO. */ containing BINFO. */
#define CANONICAL_BINFO(BINFO, C) \ #define CANONICAL_BINFO(BINFO, C) \
(TREE_VIA_VIRTUAL (BINFO) \ (TREE_VIA_VIRTUAL (BINFO) \
? binfo_for_vbase (BINFO_TYPE (BINFO), C) \ ? binfo_for_vbase (BINFO_TYPE (BINFO), C) \
: BINFO) : BINFO)
/* Number of direct baseclasses of NODE. */ /* Number of direct baseclasses of NODE. */
...@@ -1692,7 +1692,7 @@ struct lang_type ...@@ -1692,7 +1692,7 @@ struct lang_type
/* Any subobject that needs a new vtable must have a vptr and must not /* 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 be a primary base (since it would then use the vtable from a
derived class.) */ 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, \ (BINFO_NEW_VTABLE_MARKED (B, C) = 1, \
my_friendly_assert (!BINFO_PRIMARY_MARKED_P (B), 20000517), \ my_friendly_assert (!BINFO_PRIMARY_MARKED_P (B), 20000517), \
my_friendly_assert (CLASSTYPE_VFIELDS (BINFO_TYPE (B)) != NULL_TREE, \ my_friendly_assert (CLASSTYPE_VFIELDS (BINFO_TYPE (B)) != NULL_TREE, \
...@@ -1806,7 +1806,7 @@ struct lang_type ...@@ -1806,7 +1806,7 @@ struct lang_type
#define CAN_HAVE_FULL_LANG_DECL_P(NODE) \ #define CAN_HAVE_FULL_LANG_DECL_P(NODE) \
(!(TREE_CODE ((NODE)) == VAR_DECL \ (!(TREE_CODE ((NODE)) == VAR_DECL \
|| TREE_CODE ((NODE)) == CONST_DECL \ || TREE_CODE ((NODE)) == CONST_DECL \
|| TREE_CODE ((NODE)) == FIELD_DECL \ || TREE_CODE ((NODE)) == FIELD_DECL \
|| TREE_CODE ((NODE)) == USING_DECL)) || TREE_CODE ((NODE)) == USING_DECL))
struct lang_decl_flags struct lang_decl_flags
...@@ -1932,7 +1932,7 @@ struct lang_decl ...@@ -1932,7 +1932,7 @@ struct lang_decl
/* Nonzero if NODE (a FUNCTION_DECL) is a constructor for a complete /* Nonzero if NODE (a FUNCTION_DECL) is a constructor for a complete
object. */ object. */
#define DECL_COMPLETE_CONSTRUCTOR_P(NODE) \ #define DECL_COMPLETE_CONSTRUCTOR_P(NODE) \
(DECL_CONSTRUCTOR_P (NODE) \ (DECL_CONSTRUCTOR_P (NODE) \
&& DECL_NAME (NODE) == complete_ctor_identifier) && 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 constructor for a base
...@@ -1964,7 +1964,7 @@ struct lang_decl ...@@ -1964,7 +1964,7 @@ struct lang_decl
/* Nonzero if NODE (a FUNCTION_DECL) is a destructor for a complete /* Nonzero if NODE (a FUNCTION_DECL) is a destructor for a complete
object. */ object. */
#define DECL_COMPLETE_DESTRUCTOR_P(NODE) \ #define DECL_COMPLETE_DESTRUCTOR_P(NODE) \
(DECL_DESTRUCTOR_P (NODE) \ (DECL_DESTRUCTOR_P (NODE) \
&& DECL_NAME (NODE) == complete_dtor_identifier) && 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 base
...@@ -1976,13 +1976,13 @@ struct lang_decl ...@@ -1976,13 +1976,13 @@ struct lang_decl
/* Nonzero if NODE (a FUNCTION_DECL) is a destructor for a complete /* Nonzero if NODE (a FUNCTION_DECL) is a destructor for a complete
object that deletes the object after it has been destroyed. */ object that deletes the object after it has been destroyed. */
#define DECL_DELETING_DESTRUCTOR_P(NODE) \ #define DECL_DELETING_DESTRUCTOR_P(NODE) \
(DECL_DESTRUCTOR_P (NODE) \ (DECL_DESTRUCTOR_P (NODE) \
&& DECL_NAME (NODE) == deleting_dtor_identifier) && DECL_NAME (NODE) == deleting_dtor_identifier)
/* Nonzero if NODE (a FUNCTION_DECL) is a cloned constructor or /* Nonzero if NODE (a FUNCTION_DECL) is a cloned constructor or
destructor. */ destructor. */
#define DECL_CLONED_FUNCTION_P(NODE) \ #define DECL_CLONED_FUNCTION_P(NODE) \
(DECL_LANG_SPECIFIC (NODE) \ (DECL_LANG_SPECIFIC (NODE) \
&& DECL_CLONED_FUNCTION (NODE) != NULL_TREE) && DECL_CLONED_FUNCTION (NODE) != NULL_TREE)
/* If DECL_CLONED_FUNCTION_P holds, this is the function that was /* If DECL_CLONED_FUNCTION_P holds, this is the function that was
...@@ -2024,7 +2024,7 @@ struct lang_decl ...@@ -2024,7 +2024,7 @@ struct lang_decl
overloaded operator, ERROR_MARK is returned. Since the numerical overloaded operator, ERROR_MARK is returned. Since the numerical
value of ERROR_MARK is zero, this macro can be used as a predicate value of ERROR_MARK is zero, this macro can be used as a predicate
to test whether or not NODE is an overloaded operator. */ 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))) \ (IDENTIFIER_OPNAME_P (DECL_NAME ((NODE))) \
? DECL_LANG_SPECIFIC (NODE)->u2.operator_code : ERROR_MARK) ? DECL_LANG_SPECIFIC (NODE)->u2.operator_code : ERROR_MARK)
...@@ -2040,7 +2040,7 @@ struct lang_decl ...@@ -2040,7 +2040,7 @@ struct lang_decl
/* Non-zero for a FUNCTION_DECL that declares a type-info function. /* Non-zero for a FUNCTION_DECL that declares a type-info function.
This only happens in the old abi. */ This only happens in the old abi. */
#define DECL_TINFO_FN_P(NODE) \ #define DECL_TINFO_FN_P(NODE) \
(TREE_CODE (NODE) == FUNCTION_DECL \ (TREE_CODE (NODE) == FUNCTION_DECL \
&& DECL_ARTIFICIAL (NODE) \ && DECL_ARTIFICIAL (NODE) \
&& DECL_LANG_SPECIFIC(NODE)->decl_flags.tinfo_fn_p) && DECL_LANG_SPECIFIC(NODE)->decl_flags.tinfo_fn_p)
...@@ -2083,7 +2083,7 @@ struct lang_decl ...@@ -2083,7 +2083,7 @@ struct lang_decl
#define SHARED_MEMBER_P(NODE) \ #define SHARED_MEMBER_P(NODE) \
(TREE_CODE (NODE) == VAR_DECL || TREE_CODE (NODE) == TYPE_DECL \ (TREE_CODE (NODE) == VAR_DECL || TREE_CODE (NODE) == TYPE_DECL \
|| TREE_CODE (NODE) == CONST_DECL) || TREE_CODE (NODE) == CONST_DECL)
/* Nonzero for FUNCTION_DECL means that this decl is a non-static /* Nonzero for FUNCTION_DECL means that this decl is a non-static
member function. */ member function. */
#define DECL_NONSTATIC_MEMBER_FUNCTION_P(NODE) \ #define DECL_NONSTATIC_MEMBER_FUNCTION_P(NODE) \
...@@ -2098,7 +2098,7 @@ struct lang_decl ...@@ -2098,7 +2098,7 @@ struct lang_decl
has `this' as const X *const. */ has `this' as const X *const. */
#define DECL_CONST_MEMFUNC_P(NODE) \ #define DECL_CONST_MEMFUNC_P(NODE) \
(DECL_NONSTATIC_MEMBER_FUNCTION_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)))))) (TYPE_ARG_TYPES (TREE_TYPE (NODE))))))
/* Nonzero for FUNCTION_DECL means that this member function /* Nonzero for FUNCTION_DECL means that this member function
...@@ -2109,8 +2109,8 @@ struct lang_decl ...@@ -2109,8 +2109,8 @@ struct lang_decl
(TYPE_ARG_TYPES (TREE_TYPE (NODE)))))) (TYPE_ARG_TYPES (TREE_TYPE (NODE))))))
/* Nonzero for a DECL means that this member is a non-static member. */ /* Nonzero for a DECL means that this member is a non-static member. */
#define DECL_NONSTATIC_MEMBER_P(NODE) \ #define DECL_NONSTATIC_MEMBER_P(NODE) \
((TREE_CODE (NODE) == FUNCTION_DECL \ ((TREE_CODE (NODE) == FUNCTION_DECL \
&& DECL_NONSTATIC_MEMBER_FUNCTION_P (NODE)) \ && DECL_NONSTATIC_MEMBER_FUNCTION_P (NODE)) \
|| TREE_CODE (NODE) == FIELD_DECL) || TREE_CODE (NODE) == FIELD_DECL)
...@@ -2163,7 +2163,7 @@ struct lang_decl ...@@ -2163,7 +2163,7 @@ struct lang_decl
/* For a non-member friend function, the class (if any) in which this /* For a non-member friend function, the class (if any) in which this
friend was defined. For example, given: friend was defined. For example, given:
struct S { friend void f (); }; struct S { friend void f (); };
the DECL_FRIEND_CONTEXT for `f' will be `S'. */ the DECL_FRIEND_CONTEXT for `f' will be `S'. */
...@@ -2244,7 +2244,7 @@ struct lang_decl ...@@ -2244,7 +2244,7 @@ struct lang_decl
but have not yet processed it. */ but have not yet processed it. */
#define DECL_PENDING_INLINE_P(NODE) \ #define DECL_PENDING_INLINE_P(NODE) \
(DECL_LANG_SPECIFIC (NODE)->decl_flags.pending_inline_p) (DECL_LANG_SPECIFIC (NODE)->decl_flags.pending_inline_p)
/* If DECL_PENDING_INLINE_P holds, this is the saved text of the /* If DECL_PENDING_INLINE_P holds, this is the saved text of the
function. */ function. */
#define DECL_PENDING_INLINE_INFO(NODE) \ #define DECL_PENDING_INLINE_INFO(NODE) \
...@@ -2289,9 +2289,9 @@ struct lang_decl ...@@ -2289,9 +2289,9 @@ struct lang_decl
/* Set the template information for an ENUMERAL_, RECORD_, or /* Set the template information for an ENUMERAL_, RECORD_, or
UNION_TYPE to VAL. */ UNION_TYPE to VAL. */
#define SET_TYPE_TEMPLATE_INFO(NODE, VAL) \ #define SET_TYPE_TEMPLATE_INFO(NODE, VAL) \
(TREE_CODE (NODE) == ENUMERAL_TYPE \ (TREE_CODE (NODE) == ENUMERAL_TYPE \
? (ENUM_TEMPLATE_INFO (NODE) = VAL) \ ? (ENUM_TEMPLATE_INFO (NODE) = VAL) \
: (CLASSTYPE_TEMPLATE_INFO (NODE) = VAL)) : (CLASSTYPE_TEMPLATE_INFO (NODE) = VAL))
#define TI_TEMPLATE(NODE) (TREE_PURPOSE (NODE)) #define TI_TEMPLATE(NODE) (TREE_PURPOSE (NODE))
...@@ -2304,7 +2304,7 @@ struct lang_decl ...@@ -2304,7 +2304,7 @@ struct lang_decl
arguments, then each entry in the TREE_VEC is itself a TREE_VEC, arguments, then each entry in the TREE_VEC is itself a TREE_VEC,
containing the template arguments for a single level. The first containing the template arguments for a single level. The first
entry in the outer TREE_VEC is the outermost level of template 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 It is incorrect to ever form a template argument vector containing
only one level of arguments, but which is a TREE_VEC containing as only one level of arguments, but which is a TREE_VEC containing as
...@@ -2330,7 +2330,7 @@ struct lang_decl ...@@ -2330,7 +2330,7 @@ struct lang_decl
/* The LEVELth level of the template ARGS. The outermost level of of /* The LEVELth level of the template ARGS. The outermost level of of
args is level 1, not level 0. */ args is level 1, not level 0. */
#define TMPL_ARGS_LEVEL(ARGS, LEVEL) \ #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) ? TREE_VEC_ELT ((ARGS), (LEVEL) - 1) : ARGS)
/* Set the LEVELth level of the template ARGS to VAL. This macro does /* Set the LEVELth level of the template ARGS to VAL. This macro does
...@@ -2349,9 +2349,9 @@ struct lang_decl ...@@ -2349,9 +2349,9 @@ struct lang_decl
/* Given a single level of template arguments in NODE, return the /* Given a single level of template arguments in NODE, return the
number of arguments. */ number of arguments. */
#define NUM_TMPL_ARGS(NODE) \ #define NUM_TMPL_ARGS(NODE) \
((NODE) == NULL_TREE ? 0 \ ((NODE) == NULL_TREE ? 0 \
: (TREE_CODE (NODE) == TREE_VEC \ : (TREE_CODE (NODE) == TREE_VEC \
? TREE_VEC_LENGTH (NODE) : list_length (NODE))) ? TREE_VEC_LENGTH (NODE) : list_length (NODE)))
/* Returns the innermost level of template arguments in ARGS. */ /* Returns the innermost level of template arguments in ARGS. */
...@@ -2369,7 +2369,7 @@ struct lang_decl ...@@ -2369,7 +2369,7 @@ struct lang_decl
template <class T> struct S { template <class U> void f(U); } template <class T> struct S { template <class U> void f(U); }
the FUNCTION_DECL for S<int>::f<double> will have, as its 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 As a special case, for a member friend template of a template
class, this value will not be a TEMPLATE_DECL, but rather a class, this value will not be a TEMPLATE_DECL, but rather a
...@@ -2379,7 +2379,7 @@ struct lang_decl ...@@ -2379,7 +2379,7 @@ struct lang_decl
template <class T> struct S { friend void f<int>(int, double); } template <class T> struct S { friend void f<int>(int, double); }
the DECL_TI_TEMPLATE will be a LOOKUP_EXPR for `f' and the 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)) #define DECL_TI_TEMPLATE(NODE) TI_TEMPLATE (DECL_TEMPLATE_INFO (NODE))
/* The template arguments used to obtain this decl from the most /* The template arguments used to obtain this decl from the most
...@@ -2390,7 +2390,7 @@ struct lang_decl ...@@ -2390,7 +2390,7 @@ struct lang_decl
#define DECL_TI_ARGS(NODE) TI_ARGS (DECL_TEMPLATE_INFO (NODE)) #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_TEMPLATE(NODE) TI_TEMPLATE (CLASSTYPE_TEMPLATE_INFO (NODE))
#define CLASSTYPE_TI_ARGS(NODE) TI_ARGS (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)) TI_TEMPLATE (ENUM_TEMPLATE_INFO (NODE))
#define ENUM_TI_ARGS(NODE) \ #define ENUM_TI_ARGS(NODE) \
TI_ARGS (ENUM_TEMPLATE_INFO (NODE)) TI_ARGS (ENUM_TEMPLATE_INFO (NODE))
...@@ -2445,7 +2445,7 @@ struct lang_decl ...@@ -2445,7 +2445,7 @@ struct lang_decl
/* Nonzero if NODE is a TYPE_DECL that should not be visible because /* Nonzero if NODE is a TYPE_DECL that should not be visible because
it is from a dependent base class. */ 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 \ (TREE_CODE (NODE) == TYPE_DECL \
&& DECL_ARTIFICIAL (NODE) \ && DECL_ARTIFICIAL (NODE) \
&& IMPLICIT_TYPENAME_P (TREE_TYPE (NODE))) && IMPLICIT_TYPENAME_P (TREE_TYPE (NODE)))
...@@ -2466,9 +2466,9 @@ struct lang_decl ...@@ -2466,9 +2466,9 @@ struct lang_decl
#define TYPE_POLYMORPHIC_P(NODE) (TREE_LANG_FLAG_2 (NODE)) #define TYPE_POLYMORPHIC_P(NODE) (TREE_LANG_FLAG_2 (NODE))
/* Nonzero if this class has a virtual function table pointer. */ /* Nonzero if this class has a virtual function table pointer. */
#define TYPE_CONTAINS_VPTR_P(NODE) \ #define TYPE_CONTAINS_VPTR_P(NODE) \
(TYPE_POLYMORPHIC_P (NODE) \ (TYPE_POLYMORPHIC_P (NODE) \
|| (vbase_offsets_in_vtable_p () \ || (vbase_offsets_in_vtable_p () \
&& TYPE_USES_VIRTUAL_BASECLASSES (NODE))) && TYPE_USES_VIRTUAL_BASECLASSES (NODE)))
extern int flag_new_for_scope; extern int flag_new_for_scope;
...@@ -2512,12 +2512,12 @@ extern int flag_new_for_scope; ...@@ -2512,12 +2512,12 @@ extern int flag_new_for_scope;
/* [basic.fundamental] /* [basic.fundamental]
Types bool, char, wchar_t, and the signed and unsigned integer types 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 Note that INTEGRAL_TYPE_P, as defined in tree.h, allows enumeration
types as well, which is incorrect in C++. */ types as well, which is incorrect in C++. */
#define CP_INTEGRAL_TYPE_P(TYPE) \ #define CP_INTEGRAL_TYPE_P(TYPE) \
(TREE_CODE ((TYPE)) == BOOLEAN_TYPE \ (TREE_CODE ((TYPE)) == BOOLEAN_TYPE \
|| TREE_CODE ((TYPE)) == INTEGER_TYPE) || TREE_CODE ((TYPE)) == INTEGER_TYPE)
/* [basic.fundamental] /* [basic.fundamental]
...@@ -2568,15 +2568,15 @@ extern int flag_new_for_scope; ...@@ -2568,15 +2568,15 @@ extern int flag_new_for_scope;
#define TYPE_HAS_COMPLEX_INIT_REF(NODE) (TYPE_LANG_SPECIFIC(NODE)->has_complex_init_ref) #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]: /* Nonzero if TYPE has a trivial destructor. From [class.dtor]:
A destructor is trivial if it is an implicitly declared A destructor is trivial if it is an implicitly declared
destructor and if: destructor and if:
- all of the direct base classes of its class have trivial - 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 - 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. */ trivial destructor. */
#define TYPE_HAS_TRIVIAL_DESTRUCTOR(NODE) \ #define TYPE_HAS_TRIVIAL_DESTRUCTOR(NODE) \
(!TYPE_HAS_NONTRIVIAL_DESTRUCTOR (NODE)) (!TYPE_HAS_NONTRIVIAL_DESTRUCTOR (NODE))
...@@ -2677,7 +2677,7 @@ extern int flag_new_for_scope; ...@@ -2677,7 +2677,7 @@ extern int flag_new_for_scope;
function. function.
(Of course, the exact values may differ depending on the mangling (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: Under the new ABI, we do:
...@@ -2690,7 +2690,7 @@ extern int flag_new_for_scope; ...@@ -2690,7 +2690,7 @@ extern int flag_new_for_scope;
in the object.) If the function is virtual, then PFN is one plus 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 twice the index into the vtable; otherwise, it is just a pointer to
the function. */ the function. */
/* Get the POINTER_TYPE to the METHOD_TYPE associated with this /* Get the POINTER_TYPE to the METHOD_TYPE associated with this
pointer to member function. TYPE_PTRMEMFUNC_P _must_ be true, pointer to member function. TYPE_PTRMEMFUNC_P _must_ be true,
before using this macro. */ before using this macro. */
...@@ -2728,7 +2728,7 @@ extern int flag_new_for_scope; ...@@ -2728,7 +2728,7 @@ extern int flag_new_for_scope;
#define PTRMEM_CST_CLASS(NODE) \ #define PTRMEM_CST_CLASS(NODE) \
TYPE_PTRMEM_CLASS_TYPE (TREE_TYPE (PTRMEM_CST_CHECK (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'. */ `Y'. */
#define PTRMEM_CST_MEMBER(NODE) (((ptrmem_cst_t)PTRMEM_CST_CHECK (NODE))->member) #define PTRMEM_CST_MEMBER(NODE) (((ptrmem_cst_t)PTRMEM_CST_CHECK (NODE))->member)
...@@ -2857,7 +2857,7 @@ extern int flag_new_for_scope; ...@@ -2857,7 +2857,7 @@ extern int flag_new_for_scope;
template <class T> struct S { template <class T> struct S {
template <class U> void f(U); 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 the `S<int>::f<int>(int)' function will appear on the
...@@ -2881,7 +2881,7 @@ extern int flag_new_for_scope; ...@@ -2881,7 +2881,7 @@ extern int flag_new_for_scope;
#define DECL_TEMPLATE_SPECIALIZATIONS(NODE) DECL_SIZE(NODE) #define DECL_TEMPLATE_SPECIALIZATIONS(NODE) DECL_SIZE(NODE)
/* Nonzero for a DECL which is actually a template parameter. */ /* 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) \ (DECL_LANG_FLAG_0 (NODE) \
&& (TREE_CODE (NODE) == CONST_DECL \ && (TREE_CODE (NODE) == CONST_DECL \
|| TREE_CODE (NODE) == TYPE_DECL \ || TREE_CODE (NODE) == TYPE_DECL \
...@@ -3396,7 +3396,7 @@ extern varray_type local_classes; ...@@ -3396,7 +3396,7 @@ extern varray_type local_classes;
#define VTABLE_PFN_NAME "__pfn" #define VTABLE_PFN_NAME "__pfn"
#define VTABLE_DELTA2_NAME "__delta2" #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 /* The name used as a prefix for VTTs. When the new ABI mangling
scheme is implemented, this should be removed. */ scheme is implemented, this should be removed. */
...@@ -3414,7 +3414,7 @@ extern varray_type local_classes; ...@@ -3414,7 +3414,7 @@ extern varray_type local_classes;
#define VPTR_NAME_P(ID_NODE) (IDENTIFIER_POINTER (ID_NODE)[0] == JOINER \ #define VPTR_NAME_P(ID_NODE) (IDENTIFIER_POINTER (ID_NODE)[0] == JOINER \
&& IDENTIFIER_POINTER (ID_NODE)[1] == 'v') && IDENTIFIER_POINTER (ID_NODE)[1] == 'v')
#define DESTRUCTOR_NAME_P(ID_NODE) (IDENTIFIER_POINTER (ID_NODE)[1] == JOINER \ #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' \ #define VTABLE_NAME_P(ID_NODE) (IDENTIFIER_POINTER (ID_NODE)[1] == 'v' \
&& IDENTIFIER_POINTER (ID_NODE)[2] == 't' \ && IDENTIFIER_POINTER (ID_NODE)[2] == 't' \
...@@ -3438,7 +3438,7 @@ extern varray_type local_classes; ...@@ -3438,7 +3438,7 @@ extern varray_type local_classes;
#endif /* !defined(NO_DOLLAR_IN_LABEL) || !defined(NO_DOT_IN_LABEL) */ #endif /* !defined(NO_DOLLAR_IN_LABEL) || !defined(NO_DOT_IN_LABEL) */
/* Store the vbase pointer field name for type TYPE into pointer BUF. */ /* 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) \ char *wbuf = (char *) alloca (TYPE_ASSEMBLER_NAME_LENGTH (TYPE) \
+ sizeof (VBASE_NAME) + 1); \ + sizeof (VBASE_NAME) + 1); \
sprintf (wbuf, VBASE_NAME_FORMAT, TYPE_ASSEMBLER_NAME_STRING (TYPE)); \ sprintf (wbuf, VBASE_NAME_FORMAT, TYPE_ASSEMBLER_NAME_STRING (TYPE)); \
...@@ -3527,7 +3527,7 @@ enum overload_flags { NO_SPECIAL = 0, DTOR_FLAG, OP_FLAG, TYPENAME_FLAG }; ...@@ -3527,7 +3527,7 @@ enum overload_flags { NO_SPECIAL = 0, DTOR_FLAG, OP_FLAG, TYPENAME_FLAG };
These are used in global lookup to support elaborated types and These are used in global lookup to support elaborated types and
qualifiers. qualifiers.
LOOKUP_PREFER_TYPES means not to accept objects, and possibly namespaces. LOOKUP_PREFER_TYPES means not to accept objects, and possibly namespaces.
LOOKUP_PREFER_NAMESPACES means not to accept objects, and possibly types. LOOKUP_PREFER_NAMESPACES means not to accept objects, and possibly types.
LOOKUP_PREFER_BOTH means class-or-namespace-name. LOOKUP_PREFER_BOTH means class-or-namespace-name.
...@@ -3555,7 +3555,7 @@ enum overload_flags { NO_SPECIAL = 0, DTOR_FLAG, OP_FLAG, TYPENAME_FLAG }; ...@@ -3555,7 +3555,7 @@ enum overload_flags { NO_SPECIAL = 0, DTOR_FLAG, OP_FLAG, TYPENAME_FLAG };
#define LOOKUP_TYPES_ONLY(f) \ #define LOOKUP_TYPES_ONLY(f) \
(!((f) & LOOKUP_PREFER_NAMESPACES) && ((f) & LOOKUP_PREFER_TYPES)) (!((f) & LOOKUP_PREFER_NAMESPACES) && ((f) & LOOKUP_PREFER_TYPES))
#define LOOKUP_QUALIFIERS_ONLY(f) ((f) & LOOKUP_PREFER_BOTH) #define LOOKUP_QUALIFIERS_ONLY(f) ((f) & LOOKUP_PREFER_BOTH)
/* These flags are used by the conversion code. /* These flags are used by the conversion code.
CONV_IMPLICIT : Perform implicit conversions (standard and user-defined). CONV_IMPLICIT : Perform implicit conversions (standard and user-defined).
...@@ -3564,7 +3564,7 @@ enum overload_flags { NO_SPECIAL = 0, DTOR_FLAG, OP_FLAG, TYPENAME_FLAG }; ...@@ -3564,7 +3564,7 @@ enum overload_flags { NO_SPECIAL = 0, DTOR_FLAG, OP_FLAG, TYPENAME_FLAG };
CONV_REINTERPRET: Perform the explicit conversions for reinterpret_cast. CONV_REINTERPRET: Perform the explicit conversions for reinterpret_cast.
CONV_PRIVATE : Perform upcasts to private bases. CONV_PRIVATE : Perform upcasts to private bases.
CONV_FORCE_TEMP : Require a new temporary when converting to the same CONV_FORCE_TEMP : Require a new temporary when converting to the same
aggregate type. */ aggregate type. */
#define CONV_IMPLICIT 1 #define CONV_IMPLICIT 1
#define CONV_STATIC 2 #define CONV_STATIC 2
...@@ -3640,7 +3640,7 @@ enum overload_flags { NO_SPECIAL = 0, DTOR_FLAG, OP_FLAG, TYPENAME_FLAG }; ...@@ -3640,7 +3640,7 @@ enum overload_flags { NO_SPECIAL = 0, DTOR_FLAG, OP_FLAG, TYPENAME_FLAG };
#define TEMPLATE_PARM_ORIG_LEVEL(NODE) (TEMPLATE_PARM_INDEX_CAST (NODE)->orig_level) #define TEMPLATE_PARM_ORIG_LEVEL(NODE) (TEMPLATE_PARM_INDEX_CAST (NODE)->orig_level)
#define TEMPLATE_PARM_DECL(NODE) (TEMPLATE_PARM_INDEX_CAST (NODE)->decl) #define TEMPLATE_PARM_DECL(NODE) (TEMPLATE_PARM_INDEX_CAST (NODE)->decl)
/* These macros are for accessing the fields of TEMPLATE_TYPE_PARM, /* These macros are for accessing the fields of TEMPLATE_TYPE_PARM,
TEMPLATE_TEMPLATE_PARM and BOUND_TEMPLATE_TEMPLATE_PARM nodes. */ TEMPLATE_TEMPLATE_PARM and BOUND_TEMPLATE_TEMPLATE_PARM nodes. */
#define TEMPLATE_TYPE_PARM_INDEX(NODE) (TYPE_FIELDS (NODE)) #define TEMPLATE_TYPE_PARM_INDEX(NODE) (TYPE_FIELDS (NODE))
#define TEMPLATE_TYPE_IDX(NODE) \ #define TEMPLATE_TYPE_IDX(NODE) \
...@@ -3668,19 +3668,19 @@ enum tree_string_flags ...@@ -3668,19 +3668,19 @@ enum tree_string_flags
TS_FUNC_SCOPE = 1 << 8, /* show function scope */ TS_FUNC_SCOPE = 1 << 8, /* show function scope */
TS_PEDANTIC_NAME = 1 << 9, /* pedantically name things */ TS_PEDANTIC_NAME = 1 << 9, /* pedantically name things */
TS_TEMPLATE_PREFIX= 1 << 10, /* show template <parms> prefix */ TS_TEMPLATE_PREFIX= 1 << 10, /* show template <parms> prefix */
/* Internal use flags */ /* Internal use flags */
TS_TEMPLATE_PARM = 1 << 11, /* decl is really a non-type template parm */ 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_TEMPLATE_PLAIN = 1 << 12, /* don't decorate primary template_name */
TS_NEXT_BIT = 13 /* next available bit */ TS_NEXT_BIT = 13 /* next available bit */
}; };
/* Returns the TEMPLATE_DECL associated to a TEMPLATE_TEMPLATE_PARM /* Returns the TEMPLATE_DECL associated to a TEMPLATE_TEMPLATE_PARM
node. */ node. */
#define TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL(NODE) \ #define TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL(NODE) \
((TREE_CODE (NODE) == BOUND_TEMPLATE_TEMPLATE_PARM) \ ((TREE_CODE (NODE) == BOUND_TEMPLATE_TEMPLATE_PARM) \
? TYPE_TI_TEMPLATE (NODE) \ ? TYPE_TI_TEMPLATE (NODE) \
: TYPE_NAME (NODE)) : TYPE_NAME (NODE))
/* in lex.c */ /* in lex.c */
...@@ -3950,11 +3950,11 @@ extern tree grokbitfield PARAMS ((tree, tree, tree)); ...@@ -3950,11 +3950,11 @@ extern tree grokbitfield PARAMS ((tree, tree, tree));
extern tree groktypefield PARAMS ((tree, tree)); extern tree groktypefield PARAMS ((tree, tree));
extern tree grokoptypename PARAMS ((tree, tree)); extern tree grokoptypename PARAMS ((tree, tree));
extern int copy_assignment_arg_p PARAMS ((tree, int)); 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_full PARAMS ((tree));
extern tree constructor_name PARAMS ((tree)); extern tree constructor_name PARAMS ((tree));
extern void setup_vtbl_ptr PARAMS ((tree, 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 tree get_temp_name PARAMS ((tree));
extern void finish_anon_union PARAMS ((tree)); extern void finish_anon_union PARAMS ((tree));
extern tree finish_table PARAMS ((tree, tree, tree, int)); extern tree finish_table PARAMS ((tree, tree, tree, int));
...@@ -4019,6 +4019,13 @@ extern const char *cp_file_of PARAMS ((tree)); ...@@ -4019,6 +4019,13 @@ extern const char *cp_file_of PARAMS ((tree));
extern int cp_line_of PARAMS ((tree)); extern int cp_line_of PARAMS ((tree));
extern const char *language_to_string PARAMS ((enum languages, int)); extern const char *language_to_string PARAMS ((enum languages, int));
extern void print_instantiation_context PARAMS ((void)); 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 */ /* in except.c */
extern void init_exception_processing PARAMS ((void)); extern void init_exception_processing PARAMS ((void));
...@@ -4114,7 +4121,7 @@ extern void init_method PARAMS ((void)); ...@@ -4114,7 +4121,7 @@ extern void init_method PARAMS ((void));
extern char *build_overload_name PARAMS ((tree, int, int)); extern char *build_overload_name PARAMS ((tree, int, int));
extern tree build_static_name PARAMS ((tree, tree)); extern tree build_static_name PARAMS ((tree, tree));
extern tree build_decl_overload_real PARAMS ((tree, tree, 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 void set_mangled_name_for_decl PARAMS ((tree));
extern tree build_typename_overload PARAMS ((tree)); extern tree build_typename_overload PARAMS ((tree));
extern tree build_overload_with_type PARAMS ((tree, tree)); extern tree build_overload_with_type PARAMS ((tree, tree));
...@@ -4241,11 +4248,11 @@ extern int at_function_scope_p PARAMS ((void)); ...@@ -4241,11 +4248,11 @@ extern int at_function_scope_p PARAMS ((void));
extern tree lookup_conversions PARAMS ((tree)); extern tree lookup_conversions PARAMS ((tree));
extern tree binfo_for_vtable PARAMS ((tree)); extern tree binfo_for_vtable PARAMS ((tree));
extern int binfo_from_vbase 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 *),
tree (*) (tree, void *), tree (*) (tree, void *),
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 *), tree (*) (tree, void *),
tree (*) (tree, void *), tree (*) (tree, void *),
...@@ -4409,7 +4416,7 @@ extern tree array_type_nelts_top PARAMS ((tree)); ...@@ -4409,7 +4416,7 @@ extern tree array_type_nelts_top PARAMS ((tree));
extern tree break_out_target_exprs PARAMS ((tree)); extern tree break_out_target_exprs PARAMS ((tree));
extern tree get_type_decl PARAMS ((tree)); extern tree get_type_decl PARAMS ((tree));
extern tree vec_binfo_member PARAMS ((tree, 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 lvalue_type PARAMS ((tree));
extern tree error_type PARAMS ((tree)); extern tree error_type PARAMS ((tree));
extern tree build_ptr_wrapper PARAMS ((void *)); extern tree build_ptr_wrapper PARAMS ((void *));
...@@ -4427,7 +4434,7 @@ extern tree maybe_dummy_object PARAMS ((tree, tree *)); ...@@ -4427,7 +4434,7 @@ extern tree maybe_dummy_object PARAMS ((tree, tree *));
extern int is_dummy_object PARAMS ((tree)); extern int is_dummy_object PARAMS ((tree));
extern tree walk_tree PARAMS ((tree *, extern tree walk_tree PARAMS ((tree *,
walk_tree_fn, walk_tree_fn,
void *, void *,
htab_t)); htab_t));
extern tree walk_tree_without_duplicates PARAMS ((tree *, extern tree walk_tree_without_duplicates PARAMS ((tree *,
walk_tree_fn, walk_tree_fn,
...@@ -4445,7 +4452,7 @@ extern int count_trees PARAMS ((tree)); ...@@ -4445,7 +4452,7 @@ extern int count_trees PARAMS ((tree));
extern int char_type_p PARAMS ((tree)); extern int char_type_p PARAMS ((tree));
extern void verify_stmt_tree PARAMS ((tree)); extern void verify_stmt_tree PARAMS ((tree));
extern tree find_tree PARAMS ((tree, tree)); extern tree find_tree PARAMS ((tree, tree));
/* in typeck.c */ /* in typeck.c */
extern int string_conv_p PARAMS ((tree, tree, int)); extern int string_conv_p PARAMS ((tree, tree, int));
extern tree condition_conversion PARAMS ((tree)); extern tree condition_conversion PARAMS ((tree));
...@@ -4571,7 +4578,7 @@ extern tree mangle_typeinfo_string_for_type PARAMS ((tree)); ...@@ -4571,7 +4578,7 @@ extern tree mangle_typeinfo_string_for_type PARAMS ((tree));
extern tree mangle_vtbl_for_type PARAMS ((tree)); extern tree mangle_vtbl_for_type PARAMS ((tree));
extern tree mangle_vtt_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_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_conv_op_name_for_type PARAMS ((tree));
extern tree mangle_guard_variable PARAMS ((tree)); extern tree mangle_guard_variable PARAMS ((tree));
......
...@@ -19,21 +19,13 @@ You should have received a copy of the GNU General Public License ...@@ -19,21 +19,13 @@ You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */ Boston, MA 02111-1307, USA. */
#include "config.h" #include "config.h"
#include "system.h" #include "system.h"
#include "tree.h" #include "tree.h"
#include "cp-tree.h" #include "cp-tree.h"
#include "toplev.h" #include "toplev.h"
/* 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 this file 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];
/* Whether or not we should try to be quiet for errors and warnings; this is /* Whether or not we should try to be quiet for errors and warnings; this is
used to avoid being too talkative about problems with tentative choices used to avoid being too talkative about problems with tentative choices
when we're computing the conversion costs for a method call. */ when we're computing the conversion costs for a method call. */
...@@ -76,7 +68,7 @@ cp_thing (errfn, atarg1, format, ap) ...@@ -76,7 +68,7 @@ cp_thing (errfn, atarg1, format, ap)
cp_printer * function; cp_printer * function;
int alternate; int alternate;
int maybe_here; int maybe_here;
/* ignore text */ /* ignore text */
if (*f != '%') if (*f != '%')
{ {
...@@ -175,7 +167,7 @@ cp_thing (errfn, atarg1, format, ap) ...@@ -175,7 +167,7 @@ cp_thing (errfn, atarg1, format, ap)
buf[offset] = '\0'; buf[offset] = '\0';
/* If ATARG1 is set, but we haven't extracted any arguments, then /* If ATARG1 is set, but we haven't extracted any arguments, then
extract one tree argument for ATARG. */ extract one tree argument for ATARG. */
if (nargs == 0 && atarg1) if (nargs == 0 && atarg1)
atarg = va_arg (ap, tree); atarg = va_arg (ap, tree);
......
...@@ -36,7 +36,7 @@ enum pad { none, before, after }; ...@@ -36,7 +36,7 @@ enum pad { none, before, after };
TFF_CLASS_SCOPE: if possible, include the class-name part of a TFF_CLASS_SCOPE: if possible, include the class-name part of a
qualified-id. This flag may be implied in some circumstances by qualified-id. This flag may be implied in some circumstances by
TFF_NAMESPACE_SCOPE. TFF_NAMESPACE_SCOPE.
TFF_SCOPE: the combinaison of the two above. TFF_SCOPE: the combinaison of the two above.
TFF_CHASE_TYPDEF: print the original type-id instead of the typedef-name. TFF_CHASE_TYPDEF: print the original type-id instead of the typedef-name.
TFF_DECL_SPECIFIERS: print decl-specifiers. TFF_DECL_SPECIFIERS: print decl-specifiers.
TFF_CLASS_KEY_OR_ENUM: precede a class-type name (resp. enum name) with TFF_CLASS_KEY_OR_ENUM: precede a class-type name (resp. enum name) with
...@@ -90,8 +90,6 @@ typedef struct ...@@ -90,8 +90,6 @@ typedef struct
put_whitespace (TFI) = none; \ put_whitespace (TFI) = none; \
} while (0) } while (0)
typedef const char *cp_printer ();
#define obstack_chunk_alloc xmalloc #define obstack_chunk_alloc xmalloc
#define obstack_chunk_free free #define obstack_chunk_free free
...@@ -116,7 +114,7 @@ static char *scratch_firstobj; ...@@ -116,7 +114,7 @@ static char *scratch_firstobj;
# define OB_PUTI(CST) do { sprintf (digit_buffer, HOST_WIDE_INT_PRINT_DEC, (HOST_WIDE_INT)(CST)); \ # define OB_PUTI(CST) do { sprintf (digit_buffer, HOST_WIDE_INT_PRINT_DEC, (HOST_WIDE_INT)(CST)); \
OB_PUTCP (digit_buffer); } while (0) OB_PUTCP (digit_buffer); } while (0)
# define OB_END_TEMPLATE_ID() \ # define OB_END_TEMPLATE_ID() \
(((obstack_next_free (&scratch_obstack) != obstack_base (&scratch_obstack) \ (((obstack_next_free (&scratch_obstack) != obstack_base (&scratch_obstack) \
&& obstack_next_free (&scratch_obstack)[-1] == '>') \ && obstack_next_free (&scratch_obstack)[-1] == '>') \
? OB_PUTC (' ') : (void)0), OB_PUTC ('>')) ? OB_PUTC (' ') : (void)0), OB_PUTC ('>'))
...@@ -256,7 +254,7 @@ dump_scope (scope, flags) ...@@ -256,7 +254,7 @@ dump_scope (scope, flags)
{ {
if (scope == NULL_TREE) if (scope == NULL_TREE)
return; return;
if (TREE_CODE (scope) == NAMESPACE_DECL) if (TREE_CODE (scope) == NAMESPACE_DECL)
{ {
if (scope != global_namespace) if (scope != global_namespace)
...@@ -298,7 +296,7 @@ dump_qualifiers (t, p) ...@@ -298,7 +296,7 @@ dump_qualifiers (t, p)
int ix; int ix;
int quals = TYPE_QUALS (t); int quals = TYPE_QUALS (t);
int do_after = p == after; int do_after = p == after;
if (quals) if (quals)
{ {
for (ix = 0; ix != 3; ix++) for (ix = 0; ix != 3; ix++)
...@@ -431,7 +429,7 @@ dump_template_bindings (parms, args) ...@@ -431,7 +429,7 @@ dump_template_bindings (parms, args)
dump_template_argument (arg, TS_PLAIN); dump_template_argument (arg, TS_PLAIN);
else else
OB_PUTS ("{missing}"); OB_PUTS ("{missing}");
++arg_idx; ++arg_idx;
need_comma = 1; need_comma = 1;
} }
...@@ -450,7 +448,7 @@ dump_type (t, flags) ...@@ -450,7 +448,7 @@ dump_type (t, flags)
{ {
if (t == NULL_TREE) if (t == NULL_TREE)
return; return;
if (TYPE_PTRMEMFUNC_P (t)) if (TYPE_PTRMEMFUNC_P (t))
goto offset_type; goto offset_type;
...@@ -487,12 +485,12 @@ dump_type (t, flags) ...@@ -487,12 +485,12 @@ dump_type (t, flags)
break; break;
} }
/* else fallthrough */ /* else fallthrough */
case TEMPLATE_DECL: case TEMPLATE_DECL:
case NAMESPACE_DECL: case NAMESPACE_DECL:
dump_decl (t, flags & ~TS_DECL_TYPE); dump_decl (t, flags & ~TS_DECL_TYPE);
break; break;
case COMPLEX_TYPE: case COMPLEX_TYPE:
OB_PUTS ("complex "); OB_PUTS ("complex ");
dump_type (TREE_TYPE (t), flags); dump_type (TREE_TYPE (t), flags);
...@@ -593,7 +591,7 @@ dump_typename (t, flags) ...@@ -593,7 +591,7 @@ dump_typename (t, flags)
enum tree_string_flags flags; enum tree_string_flags flags;
{ {
tree ctx = TYPE_CONTEXT (t); tree ctx = TYPE_CONTEXT (t);
if (TREE_CODE (ctx) == TYPENAME_TYPE) if (TREE_CODE (ctx) == TYPENAME_TYPE)
dump_typename (ctx, flags); dump_typename (ctx, flags);
else else
...@@ -638,7 +636,7 @@ dump_aggr_type (t, flags) ...@@ -638,7 +636,7 @@ dump_aggr_type (t, flags)
OB_PUTCP (variety); OB_PUTCP (variety);
OB_PUTC (' '); OB_PUTC (' ');
} }
if (flags & TS_CHASE_TYPEDEFS) if (flags & TS_CHASE_TYPEDEFS)
t = TYPE_MAIN_VARIANT (t); t = TYPE_MAIN_VARIANT (t);
...@@ -659,7 +657,7 @@ dump_aggr_type (t, flags) ...@@ -659,7 +657,7 @@ dump_aggr_type (t, flags)
/* Because the template names are mangled, we have to locate /* Because the template names are mangled, we have to locate
the most general template, and use that name. */ the most general template, and use that name. */
tree tpl = CLASSTYPE_TI_TEMPLATE (t); tree tpl = CLASSTYPE_TI_TEMPLATE (t);
while (DECL_TEMPLATE_INFO (tpl)) while (DECL_TEMPLATE_INFO (tpl))
tpl = DECL_TI_TEMPLATE (tpl); tpl = DECL_TI_TEMPLATE (tpl);
name = tpl; name = tpl;
...@@ -694,8 +692,8 @@ dump_aggr_type (t, flags) ...@@ -694,8 +692,8 @@ dump_aggr_type (t, flags)
deal with prefix and suffix. deal with prefix and suffix.
Arrays must also do this for DECL nodes, like int a[], and for things like Arrays must also do this for DECL nodes, like int a[], and for things like
int *[]&. int *[]&.
Return indicates how you should pad an object name after this. I.e. you Return indicates how you should pad an object name after this. I.e. you
want to pad non-*, non-& cores, but not pad * or & types. */ want to pad non-*, non-& cores, but not pad * or & types. */
...@@ -705,20 +703,20 @@ dump_type_prefix (t, flags) ...@@ -705,20 +703,20 @@ dump_type_prefix (t, flags)
enum tree_string_flags flags; enum tree_string_flags flags;
{ {
enum pad padding = before; enum pad padding = before;
if (TYPE_PTRMEMFUNC_P (t)) if (TYPE_PTRMEMFUNC_P (t))
{ {
t = TYPE_PTRMEMFUNC_FN_TYPE (t); t = TYPE_PTRMEMFUNC_FN_TYPE (t);
goto offset_type; goto offset_type;
} }
switch (TREE_CODE (t)) switch (TREE_CODE (t))
{ {
case POINTER_TYPE: case POINTER_TYPE:
case REFERENCE_TYPE: case REFERENCE_TYPE:
{ {
tree sub = TREE_TYPE (t); tree sub = TREE_TYPE (t);
padding = dump_type_prefix (sub, flags); padding = dump_type_prefix (sub, flags);
/* A tree for a member pointer looks like pointer to offset, /* A tree for a member pointer looks like pointer to offset,
so let the OFFSET_TYPE case handle it. */ so let the OFFSET_TYPE case handle it. */
...@@ -792,7 +790,7 @@ dump_type_prefix (t, flags) ...@@ -792,7 +790,7 @@ dump_type_prefix (t, flags)
dump_type (t, flags); dump_type (t, flags);
padding = before; padding = before;
break; break;
default: default:
sorry ("`%s' not supported by dump_type_prefix", sorry ("`%s' not supported by dump_type_prefix",
tree_code_name[(int) TREE_CODE (t)]); tree_code_name[(int) TREE_CODE (t)]);
...@@ -865,7 +863,7 @@ dump_type_suffix (t, flags) ...@@ -865,7 +863,7 @@ dump_type_suffix (t, flags)
OB_PUTC (']'); OB_PUTC (']');
dump_type_suffix (TREE_TYPE (t), flags); dump_type_suffix (TREE_TYPE (t), flags);
break; break;
case ENUMERAL_TYPE: case ENUMERAL_TYPE:
case IDENTIFIER_NODE: case IDENTIFIER_NODE:
case INTEGER_TYPE: case INTEGER_TYPE:
...@@ -944,7 +942,7 @@ dump_global_iord (t) ...@@ -944,7 +942,7 @@ dump_global_iord (t)
OB_PUTS ("destructors"); OB_PUTS ("destructors");
else else
my_friendly_abort (352); my_friendly_abort (352);
OB_PUTS (" for "); OB_PUTS (" for ");
OB_PUTCP (input_filename); OB_PUTCP (input_filename);
OB_PUTC (')'); OB_PUTC (')');
...@@ -999,11 +997,11 @@ dump_decl (t, flags) ...@@ -999,11 +997,11 @@ dump_decl (t, flags)
} }
if (flags & TS_DECORATE) if (flags & TS_DECORATE)
OB_PUTS ("typedef "); OB_PUTS ("typedef ");
dump_simple_decl (t, DECL_ORIGINAL_TYPE (t) dump_simple_decl (t, DECL_ORIGINAL_TYPE (t)
? DECL_ORIGINAL_TYPE (t) : TREE_TYPE (t), ? DECL_ORIGINAL_TYPE (t) : TREE_TYPE (t),
flags); flags);
break; break;
case VAR_DECL: case VAR_DECL:
if (DECL_NAME (t) && VTABLE_NAME_P (DECL_NAME (t))) if (DECL_NAME (t) && VTABLE_NAME_P (DECL_NAME (t)))
{ {
...@@ -1040,7 +1038,7 @@ dump_decl (t, flags) ...@@ -1040,7 +1038,7 @@ dump_decl (t, flags)
dump_decl (TREE_OPERAND (t, 0), flags & ~TS_DECL_TYPE); dump_decl (TREE_OPERAND (t, 0), flags & ~TS_DECL_TYPE);
OB_PUTS ("::"); OB_PUTS ("::");
dump_decl (TREE_OPERAND (t, 1), flags); dump_decl (TREE_OPERAND (t, 1), flags);
break; break;
case ARRAY_REF: case ARRAY_REF:
dump_decl (TREE_OPERAND (t, 0), flags); dump_decl (TREE_OPERAND (t, 0), flags);
...@@ -1172,17 +1170,17 @@ dump_template_decl (t, flags) ...@@ -1172,17 +1170,17 @@ dump_template_decl (t, flags)
{ {
tree orig_parms = DECL_TEMPLATE_PARMS (t); tree orig_parms = DECL_TEMPLATE_PARMS (t);
tree parms; tree parms;
int i; int i;
if (flags & TS_TEMPLATE_PREFIX) if (flags & TS_TEMPLATE_PREFIX)
{ {
for (parms = orig_parms = nreverse (orig_parms); for (parms = orig_parms = nreverse (orig_parms);
parms; parms;
parms = TREE_CHAIN (parms)) parms = TREE_CHAIN (parms))
{ {
tree inner_parms = INNERMOST_TEMPLATE_PARMS (parms); tree inner_parms = INNERMOST_TEMPLATE_PARMS (parms);
int len = TREE_VEC_LENGTH (inner_parms); int len = TREE_VEC_LENGTH (inner_parms);
OB_PUTS ("template <"); OB_PUTS ("template <");
for (i = 0; i < len; i++) for (i = 0; i < len; i++)
{ {
...@@ -1270,7 +1268,7 @@ dump_function_decl (t, flags) ...@@ -1270,7 +1268,7 @@ dump_function_decl (t, flags)
OB_PUTS ("static "); OB_PUTS ("static ");
else if (TYPE_POLYMORPHIC_P (t)) else if (TYPE_POLYMORPHIC_P (t))
OB_PUTS ("virtual "); OB_PUTS ("virtual ");
/* Print the return type? */ /* Print the return type? */
if (show_return) if (show_return)
show_return = !DECL_CONV_FN_P (t) && !DECL_CONSTRUCTOR_P (t) show_return = !DECL_CONV_FN_P (t) && !DECL_CONSTRUCTOR_P (t)
...@@ -1291,26 +1289,26 @@ dump_function_decl (t, flags) ...@@ -1291,26 +1289,26 @@ dump_function_decl (t, flags)
dump_scope (CP_DECL_CONTEXT (t), flags); dump_scope (CP_DECL_CONTEXT (t), flags);
dump_function_name (t, flags); dump_function_name (t, flags);
if (!(flags & TS_DECL_TYPE)) if (!(flags & TS_DECL_TYPE))
return; return;
if (TREE_CODE (fntype) == METHOD_TYPE && parmtypes) if (TREE_CODE (fntype) == METHOD_TYPE && parmtypes)
/* Skip "this" parameter. */ /* Skip "this" parameter. */
parmtypes = TREE_CHAIN (parmtypes); parmtypes = TREE_CHAIN (parmtypes);
/* Skip past the "in_charge" parameter. */ /* Skip past the "in_charge" parameter. */
if (DECL_HAS_IN_CHARGE_PARM_P (t)) if (DECL_HAS_IN_CHARGE_PARM_P (t))
parmtypes = TREE_CHAIN (parmtypes); parmtypes = TREE_CHAIN (parmtypes);
dump_parameters (parmtypes, flags); dump_parameters (parmtypes, flags);
if (show_return) if (show_return)
dump_type_suffix (TREE_TYPE (fntype), flags); dump_type_suffix (TREE_TYPE (fntype), flags);
if (TREE_CODE (fntype) == METHOD_TYPE) if (TREE_CODE (fntype) == METHOD_TYPE)
dump_qualifiers (TREE_TYPE (TREE_VALUE (TYPE_ARG_TYPES (fntype))), dump_qualifiers (TREE_TYPE (TREE_VALUE (TYPE_ARG_TYPES (fntype))),
before); before);
if (flags & TS_FUNC_THROW) if (flags & TS_FUNC_THROW)
dump_exception_spec (TYPE_RAISES_EXCEPTIONS (fntype), flags); dump_exception_spec (TYPE_RAISES_EXCEPTIONS (fntype), flags);
...@@ -1347,7 +1345,7 @@ dump_parameters (parmtypes, flags) ...@@ -1347,7 +1345,7 @@ dump_parameters (parmtypes, flags)
break; break;
} }
dump_type (TREE_VALUE (parmtypes), flags); dump_type (TREE_VALUE (parmtypes), flags);
if ((flags & TS_PARM_DEFAULTS) && TREE_PURPOSE (parmtypes)) if ((flags & TS_PARM_DEFAULTS) && TREE_PURPOSE (parmtypes))
{ {
OB_PUTS (" = "); OB_PUTS (" = ");
...@@ -1414,7 +1412,7 @@ dump_function_name (t, flags) ...@@ -1414,7 +1412,7 @@ dump_function_name (t, flags)
if (DECL_LANG_SPECIFIC (t) && DECL_TEMPLATE_INFO (t) if (DECL_LANG_SPECIFIC (t) && DECL_TEMPLATE_INFO (t)
&& !DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION (t) && !DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION (t)
&& (DECL_TEMPLATE_SPECIALIZATION (t) && (DECL_TEMPLATE_SPECIALIZATION (t)
|| TREE_CODE (DECL_TI_TEMPLATE (t)) != TEMPLATE_DECL || TREE_CODE (DECL_TI_TEMPLATE (t)) != TEMPLATE_DECL
|| DECL_TEMPLATE_SPECIALIZATION (DECL_TI_TEMPLATE (t)) || DECL_TEMPLATE_SPECIALIZATION (DECL_TI_TEMPLATE (t))
|| PRIMARY_TEMPLATE_P (DECL_TI_TEMPLATE (t)))) || PRIMARY_TEMPLATE_P (DECL_TI_TEMPLATE (t))))
...@@ -1434,7 +1432,7 @@ dump_template_parms (info, primary, flags) ...@@ -1434,7 +1432,7 @@ dump_template_parms (info, primary, flags)
enum tree_string_flags flags; enum tree_string_flags flags;
{ {
tree args = info ? TI_ARGS (info) : NULL_TREE; tree args = info ? TI_ARGS (info) : NULL_TREE;
if (primary && flags & TS_TEMPLATE_PLAIN) if (primary && flags & TS_TEMPLATE_PLAIN)
return; return;
flags &= ~(TS_AGGR_TAGS | TS_TEMPLATE_PLAIN); flags &= ~(TS_AGGR_TAGS | TS_TEMPLATE_PLAIN);
...@@ -1447,13 +1445,13 @@ dump_template_parms (info, primary, flags) ...@@ -1447,13 +1445,13 @@ dump_template_parms (info, primary, flags)
int len = 0; int len = 0;
int ix = 0; int ix = 0;
int need_comma = 0; int need_comma = 0;
if (TREE_CODE (args) == TREE_VEC) if (TREE_CODE (args) == TREE_VEC)
{ {
if (TREE_VEC_LENGTH (args) > 0 if (TREE_VEC_LENGTH (args) > 0
&& TREE_CODE (TREE_VEC_ELT (args, 0)) == TREE_VEC) && TREE_CODE (TREE_VEC_ELT (args, 0)) == TREE_VEC)
args = TREE_VEC_ELT (args, TREE_VEC_LENGTH (args) - 1); args = TREE_VEC_ELT (args, TREE_VEC_LENGTH (args) - 1);
len = TREE_VEC_LENGTH (args); len = TREE_VEC_LENGTH (args);
} }
else if (TREE_CODE (args) == TREE_LIST) else if (TREE_CODE (args) == TREE_LIST)
...@@ -1473,7 +1471,7 @@ dump_template_parms (info, primary, flags) ...@@ -1473,7 +1471,7 @@ dump_template_parms (info, primary, flags)
} }
if (need_comma) if (need_comma)
OB_PUTS (", "); OB_PUTS (", ");
if (!arg) if (!arg)
OB_PUTS ("{template parameter error}"); OB_PUTS ("{template parameter error}");
else else
...@@ -1486,17 +1484,17 @@ dump_template_parms (info, primary, flags) ...@@ -1486,17 +1484,17 @@ dump_template_parms (info, primary, flags)
tree tpl = TI_TEMPLATE (info); tree tpl = TI_TEMPLATE (info);
tree parms = DECL_TEMPLATE_PARMS (tpl); tree parms = DECL_TEMPLATE_PARMS (tpl);
int len, ix; int len, ix;
parms = TREE_CODE (parms) == TREE_LIST ? TREE_VALUE (parms) : NULL_TREE; parms = TREE_CODE (parms) == TREE_LIST ? TREE_VALUE (parms) : NULL_TREE;
len = parms ? TREE_VEC_LENGTH (parms) : 0; len = parms ? TREE_VEC_LENGTH (parms) : 0;
for (ix = 0; ix != len; ix++) for (ix = 0; ix != len; ix++)
{ {
tree parm = TREE_VALUE (TREE_VEC_ELT (parms, ix)); tree parm = TREE_VALUE (TREE_VEC_ELT (parms, ix));
if (ix) if (ix)
OB_PUTS (", "); OB_PUTS (", ");
dump_decl (parm, flags & ~TS_DECL_TYPE); dump_decl (parm, flags & ~TS_DECL_TYPE);
} }
} }
...@@ -1595,12 +1593,12 @@ dump_expr (t, flags) ...@@ -1595,12 +1593,12 @@ dump_expr (t, flags)
if (TREE_CODE (type) == ENUMERAL_TYPE) if (TREE_CODE (type) == ENUMERAL_TYPE)
{ {
tree values = TYPE_VALUES (type); tree values = TYPE_VALUES (type);
for (; values; for (; values;
values = TREE_CHAIN (values)) values = TREE_CHAIN (values))
if (tree_int_cst_equal (TREE_VALUE (values), t)) if (tree_int_cst_equal (TREE_VALUE (values), t))
break; break;
if (values) if (values)
OB_PUTID (TREE_PURPOSE (values)); OB_PUTID (TREE_PURPOSE (values));
else else
...@@ -1725,7 +1723,7 @@ dump_expr (t, flags) ...@@ -1725,7 +1723,7 @@ dump_expr (t, flags)
case AGGR_INIT_EXPR: case AGGR_INIT_EXPR:
{ {
tree fn = NULL_TREE; tree fn = NULL_TREE;
if (TREE_CODE (TREE_OPERAND (t, 0)) == ADDR_EXPR) if (TREE_CODE (TREE_OPERAND (t, 0)) == ADDR_EXPR)
fn = TREE_OPERAND (TREE_OPERAND (t, 0), 0); fn = TREE_OPERAND (TREE_OPERAND (t, 0), 0);
...@@ -1749,7 +1747,7 @@ dump_expr (t, flags) ...@@ -1749,7 +1747,7 @@ dump_expr (t, flags)
{ {
tree fn = TREE_OPERAND (t, 0); tree fn = TREE_OPERAND (t, 0);
tree args = TREE_OPERAND (t, 1); tree args = TREE_OPERAND (t, 1);
if (TREE_CODE (fn) == ADDR_EXPR) if (TREE_CODE (fn) == ADDR_EXPR)
fn = TREE_OPERAND (fn, 0); fn = TREE_OPERAND (fn, 0);
...@@ -1900,7 +1898,7 @@ dump_expr (t, flags) ...@@ -1900,7 +1898,7 @@ dump_expr (t, flags)
/* An ADDR_EXPR can have reference type. In that case, we /* An ADDR_EXPR can have reference type. In that case, we
shouldn't print the `&' doing so indicates to the user shouldn't print the `&' doing so indicates to the user
that the expression has pointer type. */ that the expression has pointer type. */
|| (TREE_TYPE (t) || (TREE_TYPE (t)
&& TREE_CODE (TREE_TYPE (t)) == REFERENCE_TYPE)) && TREE_CODE (TREE_TYPE (t)) == REFERENCE_TYPE))
dump_expr (TREE_OPERAND (t, 0), flags | TS_EXPR_PARENS); dump_expr (TREE_OPERAND (t, 0), flags | TS_EXPR_PARENS);
else else
...@@ -1954,7 +1952,7 @@ dump_expr (t, flags) ...@@ -1954,7 +1952,7 @@ dump_expr (t, flags)
while (TREE_CODE (next) == POINTER_TYPE) while (TREE_CODE (next) == POINTER_TYPE)
next = TREE_TYPE (next); next = TREE_TYPE (next);
if (TREE_CODE (next) == FUNCTION_TYPE) if (TREE_CODE (next) == FUNCTION_TYPE)
{ {
if (flags & TS_EXPR_PARENS) if (flags & TS_EXPR_PARENS)
...@@ -2006,7 +2004,7 @@ dump_expr (t, flags) ...@@ -2006,7 +2004,7 @@ dump_expr (t, flags)
t = TREE_TYPE (TYPE_PTRMEMFUNC_FN_TYPE (TREE_TYPE (t))); t = TREE_TYPE (TYPE_PTRMEMFUNC_FN_TYPE (TREE_TYPE (t)));
t = TYPE_METHOD_BASETYPE (t); t = TYPE_METHOD_BASETYPE (t);
virtuals = TYPE_BINFO_VIRTUALS (TYPE_MAIN_VARIANT (t)); virtuals = TYPE_BINFO_VIRTUALS (TYPE_MAIN_VARIANT (t));
n = tree_low_cst (idx, 0) - first_vfun_index (t); n = tree_low_cst (idx, 0) - first_vfun_index (t);
/* Map vtable index back one, to allow for the null pointer to /* Map vtable index back one, to allow for the null pointer to
...@@ -2109,7 +2107,7 @@ dump_expr (t, flags) ...@@ -2109,7 +2107,7 @@ dump_expr (t, flags)
case ALIGNOF_EXPR: case ALIGNOF_EXPR:
if (TREE_CODE (t) == SIZEOF_EXPR) if (TREE_CODE (t) == SIZEOF_EXPR)
OB_PUTS ("sizeof ("); OB_PUTS ("sizeof (");
else else
{ {
my_friendly_assert (TREE_CODE (t) == ALIGNOF_EXPR, 0); my_friendly_assert (TREE_CODE (t) == ALIGNOF_EXPR, 0);
OB_PUTS ("__alignof__ ("); OB_PUTS ("__alignof__ (");
...@@ -2154,7 +2152,7 @@ dump_expr (t, flags) ...@@ -2154,7 +2152,7 @@ dump_expr (t, flags)
dump_expr (TREE_OPERAND (t, 1), flags & ~TS_EXPR_PARENS); dump_expr (TREE_OPERAND (t, 1), flags & ~TS_EXPR_PARENS);
OB_PUTS ("} "); OB_PUTS ("} ");
break; break;
case LOOP_EXPR: case LOOP_EXPR:
OB_PUTS ("while (1) { "); OB_PUTS ("while (1) { ");
dump_expr (TREE_OPERAND (t, 0), flags & ~TS_EXPR_PARENS); dump_expr (TREE_OPERAND (t, 0), flags & ~TS_EXPR_PARENS);
...@@ -2173,7 +2171,7 @@ dump_expr (t, flags) ...@@ -2173,7 +2171,7 @@ dump_expr (t, flags)
OB_PUTID (DECL_NAME (TREE_VALUE (t))); OB_PUTID (DECL_NAME (TREE_VALUE (t)));
break; break;
} }
/* else fall through */ /* else fall through */
/* This list is incomplete, but should suffice for now. /* This list is incomplete, but should suffice for now.
It is very important that `sorry' does not call It is very important that `sorry' does not call
...@@ -2272,9 +2270,9 @@ context_as_string (context, flags) ...@@ -2272,9 +2270,9 @@ context_as_string (context, flags)
enum tree_string_flags flags; enum tree_string_flags flags;
{ {
OB_INIT (); OB_INIT ();
dump_scope (context, flags); dump_scope (context, flags);
OB_FINISH (); OB_FINISH ();
return (char *)obstack_base (&scratch_obstack); return (char *)obstack_base (&scratch_obstack);
...@@ -2365,7 +2363,7 @@ decl_to_string (decl, verbose) ...@@ -2365,7 +2363,7 @@ decl_to_string (decl, verbose)
else if (TREE_CODE (decl) == FUNCTION_DECL) else if (TREE_CODE (decl) == FUNCTION_DECL)
flags |= TS_DECL_TYPE | TS_FUNC_NORETURN; flags |= TS_DECL_TYPE | TS_FUNC_NORETURN;
flags |= TS_TEMPLATE_PREFIX; flags |= TS_TEMPLATE_PREFIX;
OB_INIT (); OB_INIT ();
dump_decl (decl, flags); dump_decl (decl, flags);
...@@ -2395,14 +2393,14 @@ fndecl_to_string (fndecl, verbose) ...@@ -2395,14 +2393,14 @@ fndecl_to_string (fndecl, verbose)
int verbose; int verbose;
{ {
enum tree_string_flags flags; enum tree_string_flags flags;
flags = TS_FUNC_THROW | TS_DECL_TYPE; flags = TS_FUNC_THROW | TS_DECL_TYPE;
if (verbose) if (verbose)
flags |= TS_PARM_DEFAULTS; flags |= TS_PARM_DEFAULTS;
OB_INIT (); OB_INIT ();
dump_decl (fndecl, flags); dump_decl (fndecl, flags);
OB_FINISH (); OB_FINISH ();
return (char *)obstack_base (&scratch_obstack); return (char *)obstack_base (&scratch_obstack);
...@@ -2470,12 +2468,12 @@ type_to_string (typ, verbose) ...@@ -2470,12 +2468,12 @@ type_to_string (typ, verbose)
int verbose; int verbose;
{ {
enum tree_string_flags flags; enum tree_string_flags flags;
flags = 0; flags = 0;
if (verbose) if (verbose)
flags |= TS_AGGR_TAGS; flags |= TS_AGGR_TAGS;
flags |= TS_TEMPLATE_PREFIX; flags |= TS_TEMPLATE_PREFIX;
OB_INIT (); OB_INIT ();
dump_type (typ, flags); dump_type (typ, flags);
...@@ -2504,7 +2502,7 @@ args_to_string (p, verbose) ...@@ -2504,7 +2502,7 @@ args_to_string (p, verbose)
enum tree_string_flags flags = 0; enum tree_string_flags flags = 0;
if (verbose) if (verbose)
flags |= TS_AGGR_TAGS; flags |= TS_AGGR_TAGS;
if (p == NULL_TREE) if (p == NULL_TREE)
return ""; return "";
...@@ -2590,7 +2588,7 @@ cp_print_error_function (buffer, dc) ...@@ -2590,7 +2588,7 @@ cp_print_error_function (buffer, dc)
os = output_buffer_state (buffer); os = output_buffer_state (buffer);
output_set_prefix (buffer, prefix); output_set_prefix (buffer, prefix);
if (current_function_decl == NULL) if (current_function_decl == NULL)
output_add_string (buffer, "At global scope:"); output_add_string (buffer, "At global scope:");
else else
...@@ -2649,17 +2647,17 @@ print_instantiation_full_context (buffer) ...@@ -2649,17 +2647,17 @@ print_instantiation_full_context (buffer)
{ {
if (current_function_decl == TINST_DECL (p)) if (current_function_decl == TINST_DECL (p))
/* Avoid redundancy with the the "In function" line. */; /* Avoid redundancy with the the "In function" line. */;
else else
output_verbatim (buffer, "%s: In instantiation of `%s':\n", file, output_verbatim (buffer, "%s: In instantiation of `%s':\n", file,
decl_as_string (TINST_DECL (p), decl_as_string (TINST_DECL (p),
TS_DECL_TYPE | TS_FUNC_NORETURN)); TS_DECL_TYPE | TS_FUNC_NORETURN));
line = TINST_LINE (p); line = TINST_LINE (p);
file = TINST_FILE (p); file = TINST_FILE (p);
p = TREE_CHAIN (p); p = TREE_CHAIN (p);
} }
} }
print_instantiation_partial_context (buffer, p, file, line); print_instantiation_partial_context (buffer, p, file, line);
} }
...@@ -2739,7 +2737,7 @@ cp_tree_printer (buffer) ...@@ -2739,7 +2737,7 @@ cp_tree_printer (buffer)
| TFF_FUNCTION_DEFAULT_ARGUMENTS; | TFF_FUNCTION_DEFAULT_ARGUMENTS;
print_function_argument_list (buffer, &tfi); print_function_argument_list (buffer, &tfi);
break; break;
case 'D': case 'D':
tree_being_formatted (&tfi) = tree_being_formatted (&tfi) =
va_arg (output_buffer_format_args (buffer), tree); va_arg (output_buffer_format_args (buffer), tree);
...@@ -2750,7 +2748,7 @@ cp_tree_printer (buffer) ...@@ -2750,7 +2748,7 @@ cp_tree_printer (buffer)
| TFF_EXCEPTION_SPECIFICATION | TFF_CHASE_NAMESPACE_ALIAS; | TFF_EXCEPTION_SPECIFICATION | TFF_CHASE_NAMESPACE_ALIAS;
print_declaration (buffer, &tfi); print_declaration (buffer, &tfi);
break; break;
case 'E': case 'E':
tree_being_formatted (&tfi) = tree_being_formatted (&tfi) =
va_arg (output_buffer_format_args (buffer), tree); va_arg (output_buffer_format_args (buffer), tree);
...@@ -2758,22 +2756,22 @@ cp_tree_printer (buffer) ...@@ -2758,22 +2756,22 @@ cp_tree_printer (buffer)
tree_formatting_flags (&tfi) = TFF_SCOPE; tree_formatting_flags (&tfi) = TFF_SCOPE;
print_expression (buffer, &tfi); print_expression (buffer, &tfi);
break; break;
case 'F': case 'F':
tree_being_formatted (&tfi) = tree_being_formatted (&tfi) =
va_arg (output_buffer_format_args (buffer), tree); va_arg (output_buffer_format_args (buffer), tree);
if (be_verbose) if (be_verbose)
tree_formatting_flags (&tfi) = TFF_SCOPE | TFF_DECL_SPECIFIERS tree_formatting_flags (&tfi) = TFF_SCOPE | TFF_DECL_SPECIFIERS
| TFF_RETURN_TYPE | TFF_FUNCTION_DEFAULT_ARGUMENTS | TFF_RETURN_TYPE | TFF_FUNCTION_DEFAULT_ARGUMENTS
| TFF_EXCEPTION_SPECIFICATION; | TFF_EXCEPTION_SPECIFICATION;
print_function_declaration (buffer, &tfi); print_function_declaration (buffer, &tfi);
break; break;
case 'P': case 'P':
print_function_parameter print_function_parameter
(buffer, va_arg (output_buffer_format_args (buffer), int)); (buffer, va_arg (output_buffer_format_args (buffer), int));
break; break;
case 'T': case 'T':
tree_being_formatted (&tfi) = tree_being_formatted (&tfi) =
va_arg (output_buffer_format_args (buffer), tree); va_arg (output_buffer_format_args (buffer), tree);
...@@ -2782,17 +2780,17 @@ cp_tree_printer (buffer) ...@@ -2782,17 +2780,17 @@ cp_tree_printer (buffer)
| TFF_RETURN_TYPE | TFF_EXCEPTION_SPECIFICATION; | TFF_RETURN_TYPE | TFF_EXCEPTION_SPECIFICATION;
print_type_id (buffer, &tfi); print_type_id (buffer, &tfi);
break; break;
case 'V': case 'V':
tree_being_formatted (&tfi) = tree_being_formatted (&tfi) =
va_arg (output_buffer_format_args (buffer), tree); va_arg (output_buffer_format_args (buffer), tree);
print_cv_qualifier_seq (buffer, &tfi); print_cv_qualifier_seq (buffer, &tfi);
break; break;
default: default:
return 0; return 0;
} }
return 1; return 1;
} }
...@@ -2806,7 +2804,7 @@ print_function_argument_list (buffer, tfi) ...@@ -2806,7 +2804,7 @@ print_function_argument_list (buffer, tfi)
} }
/* Print a declaration represented by tree_being_formatted (TFI) /* Print a declaration represented by tree_being_formatted (TFI)
onto buffer. */ onto buffer. */
static void static void
print_declaration (buffer, tfi) print_declaration (buffer, tfi)
output_buffer *buffer __attribute__ ((__unused__)); output_buffer *buffer __attribute__ ((__unused__));
...@@ -2859,7 +2857,7 @@ print_type_id (buffer, tfi) ...@@ -2859,7 +2857,7 @@ print_type_id (buffer, tfi)
if (flags & TFF_CHASE_TYPEDEF) if (flags & TFF_CHASE_TYPEDEF)
tree_being_formatted (tfi) = tree_being_formatted (tfi) =
typedef_original_name (tree_being_formatted (tfi)); typedef_original_name (tree_being_formatted (tfi));
/* A type-id is of the form: /* A type-id is of the form:
type-id: type-id:
type-specifier-seq abstract-declarator(opt) */ type-specifier-seq abstract-declarator(opt) */
...@@ -2880,7 +2878,7 @@ print_type_id (buffer, tfi) ...@@ -2880,7 +2878,7 @@ print_type_id (buffer, tfi)
case FUNCTION_TYPE: case FUNCTION_TYPE:
ptr_mem_fun: ptr_mem_fun:
print_rest_of_abstract_declarator (buffer, tfi); print_rest_of_abstract_declarator (buffer, tfi);
default: default:
break; break;
} }
...@@ -2940,7 +2938,7 @@ print_type_specifier_seq (buffer, tfi) ...@@ -2940,7 +2938,7 @@ print_type_specifier_seq (buffer, tfi)
/* Because the abstract-declarator can modify the type-specifier-seq /* Because the abstract-declarator can modify the type-specifier-seq
in a highly non linear manner, we pretty-print its prefix here. in a highly non linear manner, we pretty-print its prefix here.
The suffix part is handled by print_rest_of_abstract_declarator. */ The suffix part is handled by print_rest_of_abstract_declarator. */
/* A RECORD_TYPE is also used to represent a pointer to member /* A RECORD_TYPE is also used to represent a pointer to member
function. */ function. */
case RECORD_TYPE: case RECORD_TYPE:
...@@ -2951,7 +2949,7 @@ print_type_specifier_seq (buffer, tfi) ...@@ -2951,7 +2949,7 @@ print_type_specifier_seq (buffer, tfi)
TREE_TYPE (TYPE_PTRMEMFUNC_FN_TYPE (t)); TREE_TYPE (TYPE_PTRMEMFUNC_FN_TYPE (t));
print_type_id (buffer, tfi); print_type_id (buffer, tfi);
print_whitespace (buffer, tfi); print_whitespace (buffer, tfi);
/* Then the beginning of the abstract-declarator part. */ /* Then the beginning of the abstract-declarator part. */
tree_being_formatted (tfi) = tree_being_formatted (tfi) =
TYPE_METHOD_BASETYPE (TYPE_PTRMEMFUNC_FN_TYPE (t)); TYPE_METHOD_BASETYPE (TYPE_PTRMEMFUNC_FN_TYPE (t));
...@@ -3001,7 +2999,7 @@ print_type_specifier_seq (buffer, tfi) ...@@ -3001,7 +2999,7 @@ print_type_specifier_seq (buffer, tfi)
tree_being_formatted (tfi) = TREE_TYPE (t); tree_being_formatted (tfi) = TREE_TYPE (t);
print_type_id (buffer, tfi); print_type_id (buffer, tfi);
print_whitespace (buffer, tfi); print_whitespace (buffer, tfi);
/* Then, the containing class. */ /* Then, the containing class. */
tree_being_formatted (tfi) = TYPE_OFFSET_BASETYPE (t); tree_being_formatted (tfi) = TYPE_OFFSET_BASETYPE (t);
print_nested_name_specifier (buffer, tfi); print_nested_name_specifier (buffer, tfi);
...@@ -3191,9 +3189,9 @@ print_rest_of_abstract_declarator (buffer, tfi) ...@@ -3191,9 +3189,9 @@ print_rest_of_abstract_declarator (buffer, tfi)
{ {
tree t = tree_being_formatted (tfi); tree t = tree_being_formatted (tfi);
enum tree_code code = TREE_CODE (t); enum tree_code code = TREE_CODE (t);
/* An abstract-declarator has the form: /* An abstract-declarator has the form:
abstract-declarator: abstract-declarator:
ptr-operator abstract-declarator(opt) ptr-operator abstract-declarator(opt)
direct-abstract-declarator direct-abstract-declarator
...@@ -3310,7 +3308,7 @@ print_rest_of_abstract_declarator (buffer, tfi) ...@@ -3310,7 +3308,7 @@ print_rest_of_abstract_declarator (buffer, tfi)
sorry_for_unsupported_tree (t); sorry_for_unsupported_tree (t);
/* fall throught. */ /* fall throught. */
case ERROR_MARK: case ERROR_MARK:
break; break;
} }
} }
...@@ -3338,7 +3336,7 @@ print_cv_qualifier_seq (buffer, tfi) ...@@ -3338,7 +3336,7 @@ print_cv_qualifier_seq (buffer, tfi)
print_identifier (buffer, qualifier[i]); print_identifier (buffer, qualifier[i]);
put_whitespace (tfi) = before; put_whitespace (tfi) = before;
} }
if (pad_after) if (pad_after)
{ {
output_add_space (buffer); output_add_space (buffer);
...@@ -3406,7 +3404,7 @@ print_nested_name_specifier (buffer, tfi) ...@@ -3406,7 +3404,7 @@ print_nested_name_specifier (buffer, tfi)
} }
} }
tree_being_formatted (tfi) = t; tree_being_formatted (tfi) = t;
} }
static void static void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment