+1999-12-15 Richard Henderson <rth@cygnus.com>
+
+ * cp-tree.h (make_aggr_type): Declare.
+ * lex.c (cp_make_lang_type): Don't SET_IS_AGGR_TYPE.
+ (make_aggr_type): New.
+
+ * decl.c (build_typename_type, init_decl_processing): Use it.
+ (build_ptrmemfunc_type, xref_tag): Likewise.
+ * except.c (call_eh_info): Likewise.
+ * init.c (init_init_processing): Likewise.
+ * pt.c (process_template_parm, lookup_template_class): Likewise.
+ * rtti.c (expand_class_desc): Likewise.
+ * semantics.c (begin_class_definition, finish_typeof): Likewise.
+ * tree.c (copy_template_template_parm): Likewise.
+
1999-12-15 Jason Merrill <jason@yorick.cygnus.com>
* cp-tree.def (TEMPLATE_PARM_INDEX): Calculate size using
(generate_ctor_or_dtor_function): Adjust accordingly.
1999-11-24 Geoffrey Keating <geoffk@cygnus.com>
- Greg McGary <gkm@gnu.org>
+ Greg McGary <gkm@gnu.org>
* decl.c (duplicate_decls): Merge
DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT,
* pt.c (tsubst_enum): Adjust according to build_enumerator changes.
Wed Nov 10 12:43:21 1999 Philippe De Muyter <phdm@macqel.be>
- Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+ Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* cp-tree.h: Test `GCC_VERSION', not `HAVE_GCC_VERSION'.
1999-11-02 Scott Snyder <snyder@fnal.gov>
- * decl2.c (build_expr_from_tree): Handle REALPART_EXPR and
- IMAGPART_EXPR.
+ * decl2.c (build_expr_from_tree): Handle REALPART_EXPR and
+ IMAGPART_EXPR.
* pt.c (tsubst_copy): Likewise.
1999-11-01 Jason Merrill <jason@yorick.cygnus.com>
1999-10-7 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
- * cp-tree.h (cp_make_lake_type): Renamed from make_lang_type.
- * lex.c (cp_make_lake_type): Likewise.
- * tree.c (init_tree): Init make_lang_type_fn.
+ * cp-tree.h (cp_make_lake_type): Renamed from make_lang_type.
+ * lex.c (cp_make_lake_type): Likewise.
+ * tree.c (init_tree): Init make_lang_type_fn.
1999-10-07 Mark Mitchell <mark@codesourcery.com>
1999-09-28 Gabriel Dos Reis <gdr@codesourcery.com>
- * pt.c (most_general_template): Adjust declaration.
+ * pt.c (most_general_template): Adjust declaration.
- * cp-tree.h: (most_general_template): Declare.
+ * cp-tree.h: (most_general_template): Declare.
- * error.c (dump_template_value): Rename to ...
- (dump_template_argument): This.
- (dump_template_argument_list): New function.
- (dump_type): Use it.
- (dump_template_parameter): New function.
- (dump_template_decl): Use it.
- (dump_template_bindings): New function.
- (dump_function_decl): Use it. Pretty print function template
- instantiations.
+ * error.c (dump_template_value): Rename to ...
+ (dump_template_argument): This.
+ (dump_template_argument_list): New function.
+ (dump_type): Use it.
+ (dump_template_parameter): New function.
+ (dump_template_decl): Use it.
+ (dump_template_bindings): New function.
+ (dump_function_decl): Use it. Pretty print function template
+ instantiations.
1999-09-28 Nathan Sidwell <nathan@acm.org>
1999-09-17 Mark Mitchell <mark@codesourcery.com>
- Turn on function-at-a-time processing.
+ Turn on function-at-a-time processing.
* cp-tree.h (doing_semantic_analysis_p): New macro.
(SF_DEFAULT): Define to zero, not SF_EXPAND.
(start_handler_parms): Change prototype.
(init_search_processing): Use vptr_identifier.
1999-09-05 Richard Henderson <rth@cygnus.com>
- Bernd Schmidt <bernds@cygnus.co.uk>
- Mark Mitchell <mark@codesourcery.com>
+ Bernd Schmidt <bernds@cygnus.co.uk>
+ Mark Mitchell <mark@codesourcery.com>
* Makefile.in (parse.o): Depend on ggc.h.
(decl2.o): Depend on ggc.h.
* typeck.c (common_type): Use same_type_p, not pointer equality,
to compare types.
- * cp-tree.h (build_lang_field_decl): Remove.
+ * cp-tree.h (build_lang_field_decl): Remove.
* class.c (build_vtable): Replace calls to build_lang_field_decl
with build_lang_decl.
(prepare_fresh_vtable): Likewise.
1999-08-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
- * lex.c (lang_identify): Likewise.
+ * lex.c (lang_identify): Likewise.
1999-08-09 Bernd Schmidt <bernds@cygnus.co.uk>
Sat Jul 17 23:51:30 1999 Jeffrey A Law (law@cygnus.com)
- * Makefile.in (INTERFACE): Bump to 2.
+ * Makefile.in (INTERFACE): Bump to 2.
1999-07-17 Alexandre Oliva <oliva@dcc.unicamp.br>
-
+
* typeck2.c (my_friendly_abort): Updated URL with bug reporting
instructions to gcc.gnu.org. Removed e-mail address.
1999-06-28 Richard Henderson <rth@cygnus.com>
- * decl.c (cp_finish_decl): Fix typo in cp_warning_at call.
+ * decl.c (cp_finish_decl): Fix typo in cp_warning_at call.
1999-06-28 Jason Merrill <jason@yorick.cygnus.com>
result in a valid non-type template argument.
1999-05-21 Mark Mitchell <mark@codesourcery.com>
- Nathan Sidwell <nathan@acm.org>
+ Nathan Sidwell <nathan@acm.org>
* Make-lang.in (cc1plus): Make it depend on gxx.gperf.
* cp-tree.h: Fix typo in documentation on pointers-to-members.
extern void retrofit_lang_decl PROTO((tree));
extern void copy_lang_decl PROTO((tree));
extern tree cp_make_lang_type PROTO((enum tree_code));
+extern tree make_aggr_type PROTO((enum tree_code));
extern void dump_time_statistics PROTO((void));
extern void compiler_error PVPROTO((const char *, ...))
ATTRIBUTE_PRINTF_1;
}
/* Build the TYPENAME_TYPE. */
- t = make_lang_type (TYPENAME_TYPE);
+ t = make_aggr_type (TYPENAME_TYPE);
TYPE_CONTEXT (t) = FROB_CONTEXT (context);
TYPENAME_TYPE_FULLNAME (t) = fullname;
TREE_TYPE (t) = base_type;
/* This is just some anonymous class type. Nobody should ever
need to look inside this envelope. */
- class_star_type_node = build_pointer_type (make_lang_type (RECORD_TYPE));
+ class_star_type_node = build_pointer_type (make_aggr_type (RECORD_TYPE));
if (flag_huge_objects)
delta_type_node = long_integer_type_node;
}
else
{
- vtable_entry_type = make_lang_type (RECORD_TYPE);
+ vtable_entry_type = make_aggr_type (RECORD_TYPE);
fields[0] = build_lang_decl (FIELD_DECL, delta_identifier,
delta_type_node);
fields[1] = build_lang_decl (FIELD_DECL, index_identifier,
unqualified_variant
= build_ptrmemfunc_type (TYPE_MAIN_VARIANT (type));
- u = make_lang_type (UNION_TYPE);
+ u = make_aggr_type (UNION_TYPE);
SET_IS_AGGR_TYPE (u, 0);
fields[0] = build_lang_decl (FIELD_DECL, pfn_identifier, type);
fields[1] = build_lang_decl (FIELD_DECL, delta2_identifier,
finish_builtin_type (u, "__ptrmemfunc_type", fields, 1, ptr_type_node);
TYPE_NAME (u) = NULL_TREE;
- t = make_lang_type (RECORD_TYPE);
+ t = make_aggr_type (RECORD_TYPE);
/* Let the front-end know this is a pointer to member function... */
TYPE_PTRMEMFUNC_FLAG (t) = 1;
{
struct binding_level *old_b = class_binding_level;
- ref = make_lang_type (code);
+ ref = make_aggr_type (code);
TYPE_CONTEXT (ref) = context;
#ifdef NONNESTED_CLASSES
/* struct cp_eh_info. This must match exception.cc. Note that this
type is not pushed anywhere. */
- t1= make_lang_type (RECORD_TYPE);
+ t1= make_aggr_type (RECORD_TYPE);
fields[0] = build_lang_decl (FIELD_DECL,
get_identifier ("handler_label"), ptr_type_node);
fields[1] = build_lang_decl (FIELD_DECL,
finish_builtin_type (t1, "eh_context", fields, 3, ptr_type_node);
t1 = build_pointer_type (t1);
- t1= make_lang_type (RECORD_TYPE);
+ t1= make_aggr_type (RECORD_TYPE);
fields[0] = build_lang_decl (FIELD_DECL,
get_identifier ("match_function"), ptr_type_node);
fields[1] = build_lang_decl (FIELD_DECL,
/* N.B.: The fourth field LEN is expected to be
the number of fields - 1, not the total number of fields. */
finish_builtin_type (t1, "__eh_info", fields, 2, ptr_type_node);
- t = make_lang_type (RECORD_TYPE);
+ t = make_aggr_type (RECORD_TYPE);
fields[0] = build_lang_decl (FIELD_DECL,
get_identifier ("eh_info"), t1);
fields[1] = build_lang_decl (FIELD_DECL, get_identifier ("value"),
/* Define the structure that holds header information for
arrays allocated via operator new. */
- BI_header_type = make_lang_type (RECORD_TYPE);
+ BI_header_type = make_aggr_type (RECORD_TYPE);
nelts_identifier = get_identifier ("nelts");
fields[0] = build_lang_decl (FIELD_DECL, nelts_identifier, sizetype);
{
struct lang_type *pi;
- SET_IS_AGGR_TYPE (t, 1);
-
pi = (struct lang_type *) ggc_alloc (sizeof (struct lang_type));
bzero ((char *) pi, (int) sizeof (struct lang_type));
return t;
}
+tree
+make_aggr_type (code)
+ enum tree_code code;
+{
+ tree t = cp_make_lang_type (code);
+
+ if (IS_AGGR_TYPE_CODE (code))
+ SET_IS_AGGR_TYPE (t, 1);
+
+ return t;
+}
+
void
dump_time_statistics ()
{
if (parm && TREE_CODE (parm) == TEMPLATE_DECL)
{
- t = make_lang_type (TEMPLATE_TEMPLATE_PARM);
+ t = make_aggr_type (TEMPLATE_TEMPLATE_PARM);
/* This is for distinguishing between real templates and template
template parameters */
TREE_TYPE (parm) = t;
}
else
{
- t = make_lang_type (TEMPLATE_TYPE_PARM);
+ t = make_aggr_type (TEMPLATE_TYPE_PARM);
/* parm is either IDENTIFIER_NODE or NULL_TREE */
decl = build_decl (TYPE_DECL, parm, t);
}
}
else
{
- t = make_lang_type (TREE_CODE (template_type));
+ t = make_aggr_type (TREE_CODE (template_type));
CLASSTYPE_DECLARED_CLASS (t)
= CLASSTYPE_DECLARED_CLASS (template_type);
CLASSTYPE_GOT_SEMICOLON (t) = 1;
/* A reasonably close approximation of __class_type_info::base_info */
- base_info_type_node = make_lang_type (RECORD_TYPE);
+ base_info_type_node = make_aggr_type (RECORD_TYPE);
/* Actually const __user_type_info * */
fields [0] = build_lang_decl
if (t == error_mark_node
|| ! IS_AGGR_TYPE (t))
{
- t = make_lang_type (RECORD_TYPE);
+ t = make_aggr_type (RECORD_TYPE);
pushtag (make_anon_name (), t, 0);
}
if (TYPE_BEING_DEFINED (t))
{
- t = make_lang_type (TREE_CODE (t));
+ t = make_aggr_type (TREE_CODE (t));
pushtag (TYPE_IDENTIFIER (t), t, 0);
}
maybe_process_partial_specialization (t);
{
tree t;
- t = make_lang_type (TYPEOF_TYPE);
+ t = make_aggr_type (TYPEOF_TYPE);
TYPE_FIELDS (t) = expr;
return t;
tree template = TYPE_NAME (t);
tree t2;
- t2 = make_lang_type (TEMPLATE_TEMPLATE_PARM);
+ t2 = make_aggr_type (TEMPLATE_TEMPLATE_PARM);
template = copy_node (template);
copy_lang_decl (template);