* decl.c (make_typename_type): Use my_friendly_assert.
[official-gcc.git] / gcc / cp / ChangeLog
blob8f188b659b317808c4e99d44103734d607d75f5e
1 2003-08-15  Nathan Sidwell  <nathan@codesourcery.com>
3         * decl.c (make_typename_type): Use my_friendly_assert.
4         * pt.c (tsubst_aggr_type): Rearrange context substitution.
6 Thu Aug 14 12:19:25 CEST 2003  Jan Hubicka  <jh@suse.cz>
8         * method.c (use_thunk): Expand body directly.
10 2003-08-12  Mark Mitchell  <mark@codesourcery.com>
12         PR c++/11703
13         * call.c (type_passed_as): Use TYPE_SIZE, not TYPE_PRECISION to
14         determine whether or not to promote types.
15         (convert_for_arg_passing): Likewise.
16         * decl2.c (cp_build_parm_decl): Do not set DECL_ARG_TYPE in
17         templates.
18         * pt.c (tsubst_decl): Do not expect it to be set.
20         PR c++/9512
21         PR c++/10923
22         * cp-tree.h (check_elaborated_type_specifier): Declare.
23         (handle_class_head): Remove.
24         (note_got_semicolon): Likewise.
25         (note_list_got_semicolon): Likewise.
26         (finish_class_definition): Likewise.
27         * decl.c (check_elaborated_type_specifier): Make it public.
28         Robustify.
29         (handle_class_head): Remove.
30         * parser.c (cp_parser_elaborated_type_specifier): Use
31         check_elaborated_type_specifier.
32         (cp_parser_class_specifier): Do not call finish_class_definition.
33         (cp_parser_class_head): Or handle_class_head.  Check for
34         over-qualified names.
35         * semantics.c (finish_class_definition): Remove.
37         * parser.c (cp_parser_check_for_definition_in_return_type): New
38         function.
39         (cp_parser_simple_declaration): Adjust call to
40         cp_parser_init_declarator.
41         (cp_parser_decl_specifier_seq): Change type of
42         declares_class_or_enum parameter.
43         (cp_parser_explicit_instantiation): Adjust accordingly.
44         (cp_parser_type_specifier): Change type of
45         declares_class_or_enum parameter.
46         (cp_parser_init_declarator): Add declares_class_or_enum
47         parameter.
48         (cp_parser_parameter_declaration): Adjust call to
49         cp_parser_decl_specifier_seq.
50         (cp_parser_function_definition): Likewise.
51         (cp_parser_member_declaration): Likewise.
52         (cp_parser_single_declaration): Likewise.
53         
54         * cp-tree.h (lang_type_class): Remove has_call_overloaded,
55         has_array_ref_overloaded, has_arrow_overloaded, and got_semicolon.
56         (TYPE_OVERLOADS_CALL_EXPR): Remove.
57         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
58         (TYPE_OVERLOADS_ARROW): Likewise.
59         (CLASSTYPE_GOT_SEMICOLON): Likewise.
60         * class.c (check_bases): Do not set them.
61         (finish_struct_1): Likewise.
62         * decl.c (cp_finish_decl): Do not set CLASSTYPE_GOT_SEMICOLON.
63         (build_ptrmemfunc_type): Likewise.
64         (grok_op_properties): Do not set TYPE_OVERLOADS_*.
65         (start_function): Do not check CLASSTYPE_GOT_SEMICOLON.
66         * decl2.c (grokfield): Do not set CLASSTYPE_GOT_SEMICOLON.
67         * lex.c (note_got_semicolon): Remove.
68         (note_list_got_semicolon): Likewise.
69         * parser.c (cp_parser_simple_declaration): Do not call
70         note_list_got_semicolon.
71         * pt.c (list_eq): Remove.
72         (lookup_template_class): Do not set CLASSTYPE_GOT_SEMICOLON.
73         (instantiate_class_template): Do not set TYPE_OVERLOADS*.
74         (instantiate_class_template): Do not set CLASSTYPE_GOT_SEMICOLON.
75         * ptree.c (cxx_print_type): Do not print them.
76         * semantics.c (finish_member_class_template): Do not call
77         note_list_got_semicolon.
78         
79 2003-08-11  Aldy Hernandez  <aldyh@redhat.com>
81         * call.c (standard_conversion): Opaque pointers interconvert.
83         * testsuite/g++.dg/other/opaque-3.C: New.
85 2003-08-11  Mark Mitchell  <mark@codesourcery.com>
87         * typeck.c (merge_types): Handle cv-qualified pointer-to-member
88         types correctly.
90 2003-08-10  Mark Mitchell  <mark@codesourcery.com>
92         PR c++/11789
93         * cp-tree.h (get_vbase): Remove.
94         (get_vbase_types): Remove.
95         * init.c (expand_member_init): Correct logic for looking up base
96         classes.
98 2003-08-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
100         * error.c (dump_expr): Tidy.
101         * cxx-pretty-print.c (pp_cxx_nonconsecutive_character): New.
102         (pp_cxx_begin_template_argument_list): Likewise.
103         (pp_cxx_end_template_argument_list): Likewise.
104         (is_destructor_name): Likewise.
105         (pp_cxx_unqualified_id): Likewise.
106         (pp_cxx_qualified_id): Likewise.
107         (pp_cxx_id_expression): Likewise.
108         (pp_cxx_new_expression): Likewise.
109         (pp_cxx_delete_expression): Likewise.
110         (pp_cxx_pm_expression): Likewise.
111         (pp_cxx_type_specifier): Rework.
112         (pp_cxx_type_id): Likewise.
113         (pp_cxx_primary_expression): Likewise.
114         (pp_cxx_postfix_expression): Likewise.
115         (pp_cxx_unary_expression): Likewise.
116         (pp_cxx_multiplicative_expression): Likewise.
117         (pp_cxx_conditional_expression): Likewise.
118         (pp_cxx_assignment_expression): Likewise.
119         (pp_cxx_pretty_printer_init): Tidy.
121 2003-08-10  Nathan Sidwell  <nathan@codesourcery.com>
123         * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): non-NULL
124         NODE is always a TREE_VEC of non-zero size.
125         (NUM_TMPL_ARGS): NODE is always a TREE_VEC.
126         * decl2.c (arg_assoc): Template args will be a vec.
127         * error.c (dump_decl) <TEMPLATE_ID_EXPR case>: Call
128         dump_template_argument_list.
129         (dump_template_parms): Args will be a vec.
130         * parser.c (cp_parser_template_argument_list): Produce a
131         vector, not a list.
132         * pt.c (coerce_template_parms): Args are always vectors.
133         (mangle_class_name_for_template): Likewise.
134         (lookup_template_function): Likewise.
135         (lookup_template_class): Likewise.
136         (tsubst_template_args): Likewise.
137         (tsubst_baselink): Use tsubst_template_args.
138         (tsubst_qualified_id): Likewise.
139         (tsubst_copy) <TEMPLATE_ID_EXPR case>: Likewise.
140         (tsubst_copy_and_build) <TEMPLATE_ID_EXPR case>: Likewise.
141         (any_dependent_template_args_p):  Args are always vectors.
142         * tree.c (cp_tree_equal): Add TEMPLATE_ID_EXPR case.
144         PR c++/11670
145         * call.c (convert_like_real): Add rvalue binding error message.
146         * error.c (dump_expr) <NOP_EXPR case>: Detect when the no expr is
147         really a cast.
148         
149         PR c++/10530
150         * pt.c (dependent_type_p_r): A dependent template-id is a class
151         type with dependent template arguments, or a bound template
152         template parameter.
153         (type_dependent_expression_p): A template function decl cannot
154         have a dependent context.
156 2003-08-07  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
158         PR c++/5767
159         * parser.c (cp_parser_class_name): Return immediately when scope
160         is error_mark_node.
162 2003-08-07  Aldy Hernandez  <aldyh@redhat.com>
164         * cp/Make-lang.in (cp/call.o): Add dependency for target.h.
166         * cp/call.c (standard_conversion): Support opaque types.
167         Include target.h.
168         (strip_top_quals): Use cp_build_qualified_type instead of
169         TYPE_MAIN_VARIANT.
171         * cp/typeck.c (convert_for_assignment): Support opaque types.
173         * testsuite/g++.dg/other/opaque-1.C: New.
175         * testsuite/g++.dg/other/opaque-2.C: New.
177 2003-08-06  Aldy Hernandez  <aldyh@redhat.com>
179         * decl.c (grokparms): Use cp_build_qualified_type instead
180         TYPE_MAIN_VARIANT.
182 2003-08-05  Gabriel Dos Reis  <gdr@integrable-solutions.net>
184         * cxx-pretty-print.h: New file.
185         * cxx-pretty-print.c: Likewise.
186         * error.c (scratch_pretty_printer): Change type.
187         (init_error): Tidy.
188         (dump_aggr_type): Likewise.
189         (dump_global_iord): Likewise.
190         (dump_expr): Likewise.
191         (dump_char): Remove.
192         * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTITCS): Define.
193         (cxx_initialize_diagnostics): New function.
194         * Make-lang.in (CXX_OBJS): Add cp/cxx-pretty-print.o
195         (CXX_PRETTY_PRINT_H): New variable.
196         (cp/cxx-pretty-print.o): New rule.
197         (cp/cp-lang.o): Update dependence.
198         (cp/error.o): Likewise.
200 2003-08-05  Steven Bosscher  <steven@gcc.gnu.org>
202         * cp-tree.h (struct lang_decl): Don't include c_lang_decl.
203         (DECL_DECLARED_INLINE_P): Remove.
204         * decl2.c (import_export_decl): Only look at DECL_DECLARED_INLINE_P
205         if decl is a FUNCTION_DECL.  This never made sense, but now it is
206         required to avoid a tree check failure.
207         * decl.c (grokfndecl): Don't touch DID_INLINE_FUNC.
208         * optimize.c (maybe_clone_body): Likewise.
210 2003-08-04  Roger Sayle  <roger@eyesopen.com>
212         * decl.c (cxx_insert_default_attributes): Delete.
213         * cp-tree.h (cxx_insert_default_attributes): Don't prototype.
214         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Don't define.
216 2003-08-03  Nathan Sidwell  <nathan@codesourcery.com>
218         PR c++/11704
219         * pt.c (type_dependent_expression_p): Cope with COMPONENT_REF with
220         unknown type.
222         PR c++/11766
223         * typeck.c (comp_ptr_ttypes_real): Don't loop on pointers to
224         member functions.
226 2003-08-02  Nathan Sidwell  <nathan@codesourcery.com>
228         PR c++/9447
229         * cp-tree.def (USING_DECL): Document its type.
230         * class.c (pushclass): If we're entering a template, push any
231         dependent using decls it has.
232         * decl2.c (do_class_using_decl): Refactor. Type is NULL iff it is
233         a dependent scope.
234         * pt.c (tsubst_decl) <USING_DECL case>: Set type.
235         (tsubst): Remove USING_DECL checks.
236         (type_dependent_expression_p): Remove USING_DECL case.
237         * semantics.c (finish_member_declaration): A USING_DECL's type
238         indicates whether it is dependent.
240 2003-08-02  Nathan Sidwell  <nathan@codesourcery.com>
242         * cp-tree.h (pushclass): Remove unneeded parameter.
243         * class.c (pushclass): Remove unneeded MODIFY parm. Adjust.
244         (push_nested_class): Adjust pushclass call.
245         * pt.c (instantiate_class_template): Likewise.
246         * semantics.c (begin_class_definition): Likewise.
248 2003-08-01  Nathanael Nerode  <neroden@gcc.gnu.org>
250         * typeck2.c (add_exception_specifier): Use 'bool' where appropriate.
252 2003-08-01  Mark Mitchell  <mark@codesourcery.com>
254         PR c++/11697
255         * decl.c (decls_match): Don't ignore the types of template
256         classes.
258         PR c++/11744
259         * pt.c (tsubst_copy_and_build): Refine Koenig lookup logic.
261 2003-08-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
263         PR c++/8442, c++/8806
264         * decl.c (qualify_lookup): Accept TEMPLATE_DECL if types are
265         preferred.
266         (check_elaborated_type_specifier): Add allow_template_p
267         parameter.  Check tag mismatch and class template.
268         (xref_tag): Add template_header_p parameter.  Add assertion
269         that name is an IDENTIFIER_NODE.  Remove implicit typename
270         warning.  Simplify lookup process if globalize is true.
271         (cxx_init_decl_processing): Adjust call to xref_tag.
272         (xref_tag_from_type): Likewise.
273         * decl2.c (handle_class_head): Likewise.
274         * parser.c (cp_parser_elaborated_type_specifier,
275         cp_parser_class_head): Likewise.
276         * rtti.c (init_rtti_processing, build_dynamic_cast1,
277         tinfo_base_init, emit_support_tinfos): Likewise.
278         * class.c (is_base_of_enclosing_class): Remove.
279         * pt.c (convert_template_argument): Don't accept RECORD_TYPE as
280         template template argument.
281         * cp-tree.h (xref_tag): Adjust declaration.
282         (is_base_of_enclosing_class): Remove.
283         * NEWS: Document template template argument change.
285 2003-08-01  Nathan Sidwell  <nathan@codesourcery.com>
287         * parser.c (cp_parser_init_declarator,
288         cp_paser_member_declaration): Reformat.
289         * pt.c (lookup_template_class, type_unification_real, unify,
290         type_dependent_expression_p): Reformat.
292         PR c++/11295
293         * cp-tree.h (tubst_flags_t): Add tf_stmt_expr_cmpd,
294         tf_stmt_expr_body.
295         (finish_stmt_expr_expr): Declare.
296         * parser.c (cp_parser_primary_expression): Tell
297         cp_parser_compount_statement that it is a statement expression.
298         (cp_parser_statement, cp_parser_labeled_statement,
299         cp_parser_compound_statement, cp_parser_statement_seq_opt): Add
300         in_statement_expr_p parameter.
301         (cp_parser_expression_statement): Likewise. Call
302         finish_stmt_expr_expr for final expression of a statement
303         expression.
304         (cp_parser_for_init_statement,
305         cp_parser_implicitly_scoped_statement,
306         cp_parser_already_scoped_statement, cp_parser_function_definition,
307         cp_parser_try_block, cp_parser_handled): Adjust.
308         * pt.c (tsubst_copy) <STMT_EXPR case>: Pass tf_stmt_expr.
309         (tsubst_expr): Process tf_stmt_expr and tf_stmt_exprs flags.
310         (tsubst_expr) <EXPR_STMT case>: Check tf_stmt_exprs flag.
311         * semantics.c (finish_expr_stmt): Do not deal with statement
312         expressions.
313         (begin_stmt_expr): Clear last_expr_type.
314         (finish_stmt_expr_expr): New.
315         (finish_stmt_expr): Process the value expression.
316         
317         * typeck.c (build_compound_expr): If RHS is a TARGET_EXPR, put the
318         compound expr inside the target's initializer.
319         
320         PR c++/11525
321         * parser.c (cp_parser_primary_expression): Do not set
322         non-constant-p merely because it is a dependent scope.
324         PR c++/9447
325         * decl2.c (do_class_using_decl): Set type to NULL_TREE.
326         * semantics.c (finish_expr_stmt): Do not convert to void in a
327         template.
329 2003-07-31  Nathan Sidwell  <nathan@codesourcery.com>
331         * pt.c (coerce_template_parms): Refactor.
332         (fn_type_unification): Increment processing_template_decl when
333         tsubsting an incomplete set of explicit args.
335         PR c++/11347
336         * pt.c (instantiate_class_template): Increment
337         processing_template_decl around the tsubst of a template member
338         class.
339         (tsubst_qualified_id): Assert we do not have a dependent scope.
341         * pt.c (coerce_template_template_parms, lookup_template_class,
342         can_complete_type_without_circularity, instantiate_class_template,
343         tsubst_decl, unify): Reformat.
345 Thu Jul 31 01:07:41 CEST 2003  Jan Hubicka  <jh@suse.cz>
347         * decl2.c (maybe_make_one_only): Use mark_referenced.
348         * method.c (use_thunk): Likewsie.
350 Wed Jul 30 19:12:48 CEST 2003  Jan Hubicka  <jh@suse.cz>
352         * class.c (build_vtable_entry_ref): Kill.
353         (build_vtbl_ref_1): Do not call build_vtable_entry_ref.
354         (build_vfn_ref): Do not call build_vtable_entry_ref.
355         * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Kill.
356         * cp-tree.h (prepare_assemble_variable): Kill.
357         * cp-decl.c (prepare_assemble_variable): Kill.
359 2003-07-29  Geoffrey Keating  <geoffk@apple.com>
361         * parser.c (cp_lexer_new_main): Use c_common_no_more_pch instead
362         of setting valid_pch by hand.
364 2003-07-29  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
366         * decl.c (finish_enum): Initialize underlying_type.
368 2003-07-29  Nathan Sidwell  <nathan@codesourcery.com>
370         PR c++/9447
371         * decl.c (add_binding): Add bval local variable.
372         (push_class_level_binding): Likewise. Allow a USING_DECL to be
373         pushed.
374         * decl2.c (do_class_using_decl):  The type of a using decl is
375         unknown.
376         * parser.c (cp_parser_postfix_expression): Refactor unqualified-id
377         function call lookup code.
378         * pt.c (tsubst): A USING_DECL will have unknown type.
379         (tsubst_copy_and_build): Allow a using decl.
380         (type_dependent_expression_p): A USING_DECL will make it
381         dependent.
382         * semantics.c (finish_member_declaration): Push a dependent using
383         declaration.
385 2003-07-28  Mark Mitchell  <mark@codesourcery.com>
387         PR c++/11530
388         * parser.c (cp_parser_postfix_expression): Do not call mark_used.
389         * semantics.c (finish_id_expression): Call mark_used for all
390         declarations.
392 2003-07-28  Mark Mitchell  <mark@codesourcery.com>
394         PR c++/11667
395         * call.c (standard_conversion): Allow all integral->enumeral
396         conversions, after marking them as bad.
397         * decl.c (finish_enum): Make sure that all enumerators are
398         properly converted to the underlying type.
399         (build_enumerator): Set DECL_CONTEXT for namespace-scope
400         enumeration types.
401         * pt.c (tsubst_copy): Adjust handling of CONST_DECLs accordingly.
402         (tsubst_enum): Tidy.
404         * Make-lang.in (typeck.o): Depend on convert.h.
405         (class.o): Likewise.
406         (rtti.o): Likewise.
407         * call.c: Include convert.h.
408         (convert_arg_to_ellipsis): Use convert_to_real.
409         * class.c: Include convert.h.
410         (build_base_path): Use convert_to_integer.
411         * rtti.c: Include convert.h.
412         (build_headof): Use convert_to_integer.
413         * typeck.c: Include convert.h.
414         (decay_conversion): Use convert_to_integer.
415         (build_unary_op): Use build_nop.
416         (get_delta_difference): Use convert_to_integer.
417         (build_ptrmemfunc): Avoid unncessary conversions.
419 Mon Jul 28 23:55:10 CEST 2003  Jan Hubicka  <jh@suse.cz>
421         * decl2.c (mark_member_pointers): Verify that member pointer points to
422         the function.
424 2003-07-28  Nathan Sidwell  <nathan@codesourcery.com>
426         * cp-tree.h (begin_compound_stmt): No scope arg is a bool.
427         (finish_compound_stmt): Remove no scope arg.
428         * decl.c (register_dtor_fn): Adjust begin_compound_stmt and
429         end_compound_stmt calls.
430         (expand_static_init, begin_destructor_body, begin_function_body,
431         finish_function_body): Likewise.
432         * decl2.c (start_objects, finish_objects,
433         start_static_storage_duration_function,
434         finish_static_storage_duration_function): Likewise.
435         * init.c (begin_init_stmts, finish_init_stmts,
436         construct_virtual_base, build_vec_init): Likewise.
437         * method.c (do_build_assign_ref, synthesize_method): Likewise.
438         * parser.c (cp_parser_compound_statement,
439         cp_parser_implicitly_scoped_statement,
440         cp_parser_already_scoped_statement): Likewise.
441         * pt.c (tsubst_expr): Likewise.
442         * semantics.c (begin_compound_stmt): No scope arg is a bool.
443         (finish_compound_stmt): Remove no scope arg.
445         * error.c (dump_expr) <COMPOUND_EXPR case>: A compound expr is
446         always dyadic.
448 2003-07-27  Mark Mitchell  <mark@codesourcery.com>
450         * call.c (standard_conversion): Tweak handling of
451         pointer-to-member types.
452         * pt.c (tsubst): Correctly qualify pointers-to-data member types.
453         * typeck.c (comp_ptr_ttypes_real): Check qualifiers on
454         pointer-to-data member types.
456 2003-07-27  Nathan Sidwell  <nathan@codesourcery.com>
458         * parser.c (cp_parser_type_parameter): Reformat.
459         (cp_parser_parameter_declaration): Deprecate default args where
460         not allowed.
462 2003-07-26  Nathan Sidwell  <nathan@codesourcery.com>
464         * cfns.h: Rebuilt.
466         * cp-tree.h (begin_init_stmts, finish_init_stmts): Remove.
467         (begin_global_stmt_expr, finish_global_stmt_expr): Remove.
468         * init.c (begin_init_stmts): Make static. Return is_global
469         value. Always call begin_stmt_expr.
470         (finish_init_stmts): Make static. Add is_global parm. Always
471         building a stmt tree.
472         (build_aggr_init): Adjust begin_init_stmts, finish_init_stmts calls.
473         (build_vec_init): Likewise. Always building a stmt tree.
474         (expand_default_init): Always building a stmt tree.
475         (get_temp_regvar): Likewise.
476         * semantics.c (begin_global_stmt_expr,
477         finish_global_stmt_expr): Remove.
479 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
481         * cp-tree.h (build_compound_expr): Take LHS & RHS args.
482         (build_x_compound_expr_from_list): Declare.
483         * typeck.c (build_x_compound_expr_from_list): New.
484         (build_x_compound_expr): Adjust.
485         (build_compound_expr): Remove unreachable code. Take two
486         parameters, adjust.
487         * decl.c (grok_reference_init): Use
488         build_x_compound_expr_from_list.
489         (expand_static_init): Adjust build_compound_expr call.
490         (cxx_maybe_build_cleanup): Likewise.
491         * init.c (perform_member_init): Use
492         build_x_compound_expr_from_list.
493         (build_new_1): Likewise.
494         (build_vec_delete): Adjust build_compound_expr calls.
495         (build_vbase_delete): Likewise.
496         * typeck2.c (store_init_value): Use
497         build_x_compound_expr_from_list.
498         (build_functional_cast): Likewise.
500 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
502         * cp-tree.h (enum tsubst_flags_t): Add tf_user.
503         * decl.c (make_typename_type): Pass it.
504         * pt.c (lookup_template_class): Use it.
505         (resolve_typename_type): Pass it.
506         * semantics.c (finish_template_type): Pass it.
508 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
510         PR c++/11617
511         * cp-tree.h (qualified_name_lookup_error): Declare.
512         * pt.c (tsubst_qualified_id): Use qualified_name_lookup_error for
513         errors.
514         (tsubst_expr) <DECL_STMT case>: Likewise.
515         (tsubst_copy_and_build) <COMPONENT_REF case>: Likewise.
516         * semantics.c (qualified_name_lookup_error): New, broken out of ...
517         (finish_id_expression): ... here. Use it.
519 2003-07-25  Falk Hueffner  <falk.hueffner@student.uni-tuebingen.de>
521         * cfns.gperf: Add '%%' delimiter to placate gperf 3.0.
523 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
525         PR c++/11596
526         * pt.c (maybe_fold_nontype_arg, maybe_fold_nontype_args): Remove.
527         (tsubst_template_arg): New.
528         (tsubst_template_arg_vector): Rename to ...
529         (tsubst_template_args): ... this. Accept a TREE_LIST form. Use
530         tsubst_template_arg.
531         (coerce_template_parms): Use tsubst_template_arg for default
532         value.
533         (tsubst_template_parms): Likewise.
534         (tsubst_aggr_type): Adjust.
535         (tsubst_decl): Likewise.
536         (tsubst): Use tsubst_template_arg for a DOMAIN. Adjust.
537         (tsubst_copy) <TEMPLATE_ID_EXPR case>: Use tsubst_template_args.
539 2003-07-25 Gabriel Dos Reis  <gdr@integrable-solutions.net>
541         * Make-lang.in (cp/error.o): Depend on DIAGNOSTIC_H.
542         * error.c: Use the new pretty-printer framework.
544 2003-07-24  Per Bothner  <pbothner@apple.com>
546         * decl.c (pushdecl_class_level): Don't use push_srcloc/pop_srcloc
547         which causes errors messages to incorrectly mention included files.
549 2003-07-24  Mark Mitchell  <mark@codesourcery.com>
551         * cp-tree.h (convert_to_base_statically): Declare.
552         * call.c (build_special_member_call): Convert INSTANCE to the base
553         type.
554         * class.c (convert_to_base_statically): New method.
555         * init.c (construct_virtual_base): Use it.
556         * method.c (do_build_assign_ref): Fix typo in comment.
558 2003-07-24  Jason Merrill  <jason@redhat.com>
560         * decl.c: Just set truthvalue_* to boolean_*.
562 2003-07-24  Nathan Sidwell  <nathan@codesourcery.com>
564         * decl.c (reshape_init): Remove unreachable code.
566 2003-07-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
568         PR c++/11513
569         * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): Use current_scope.
571 2003-07-23  Mark Mitchell  <mark@codesourcery.com>
573         PR c++/11645
574         * cp-tree.h (accessible_base_p): Declare.
575         * call.c (build_over_call): Use it.
576         * search.c (accessible_base_p): New function, split out from ...
577         (lookup_base): ... here.
579         PR c++/11517
580         * call.c (build_conditional_expr): Use perform_implicit_conversion
581         and error_operand_p.  Robustify.
582         * typeck.c (build_unary_op): Use perform_implicit_conversion.
584 2003-07-23  Nathan Sidwell  <nathan@codesourcery.com>
586         PR c++/10953
587         * parser.c (cp_parser_nested_name_specifier): Reset scope on
588         failure.
589         (cp_parser_elaborated_type_specifier): Likewise.
591 2003-07-22  Mark Mitchell  <mark@codesourcery.com>
593         Eliminate use of POINTER_TYPE for pointers-to-members.
594         * call.c (standard_conversion): Rework pointer-to-member handling.
595         Add comments.
596         (add_builtin_candidate): Likewise.
597         (resolve_scoped_fn_name): Remove.
598         (build_conditional_expr): Rework pointer-to-member handling.
599         (compare_ics): Likewise.
600         * class.c (check_field_decls): Use TYPE_PTR_P.
601         * cp-lang.c (cp_var_mod_type_p): Rework pointer-to-member
602         handling.
603         * cp-tree.h (SCALAR_TYPE_P): Use TYPE_PTR_TO_MEMBER_P.
604         (TYPE_PTRMEM_P): Add comment.
605         (TYPE_PTR_P): Simplify.
606         (TYPE_PTROB_P): Correct definition.
607         (TYPE_PTR_TO_MEMBER_P): New macro.
608         (TYPE_PTRMEM_CLASS_TYPE): Adjust.
609         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
610         (resolved_scoped_fn_name): Remove declaration.
611         (build_offset_ref): Change prototype.
612         (resolve_offset_ref): Remove.
613         (comp_target_types): Remove.
614         * cvt.c (cp_convert_to_pointer): Rework pointer-to-member
615         handling.
616         (convert_to_reference): Use can_convert.
617         (ocp_convert): Improve error handling.  Rework pointer-to-member
618         handling.
619         (perform_qualification_conversions): Rework pointer-to-member
620         handling.
621         * decl.c (build_ptrmem_type): Handle functions too.
622         (create_array_type_for_decl): Remove OFFSET_TYPE error message.
623         (grokdeclarator): Use OFFSET_TYPE for pointers to data members.
624         (grokparms): Remove OFFSET_TYPE error message.
625         * dump.c (cp_dump_tree): Rework pointer-to-member handling.
626         * error.c (dump_type_prefix): Likewise.
627         * expr.c (cplus_expand_constant): Use build_nop.
628         * init.c (build_offset_ref): Add address_p parameter.  Fold in
629         necessary bits from resolve_offset_ref.
630         (resolve_offset_ref): Remove.
631         * parser.c (cp_parser_postfix_expression): Remove special case
632         code for OFFSET_TYPE.
633         * pt.c (convert_nontype_argument): Rework pointer-to-member
634         handling.
635         (convert_template_argument): Likewise.
636         (unify): Likewise.
637         (invalid_nontype_parm_type_p): Likewise.
638         (dependent_type_p_r): Likewise.
639         * rtti.c (get_tinfo_decl): Remove OFFSET_TYPE special case.
640         (target_incomplete_p_): Rework pointer-to-member
641         handling.
642         (get_pseudo_ti_init): Likewise.
643         (get_pseudo_ti_desc): Likewise.
644         * semantics.c (finish_qualified_id_expr): Adjust call to
645         build_offset_ref.  Remove use of resolve_offset_ref.
646         * tree.c (pod_type_p): Use TYPE_PTR_TO_MEMBER_P.
647         * typeck.c (target_type): Use TYPE_PTRMEM_P.
648         (type_unknown_p): Remove obsolete code about the time before
649         non-dependent expressions were handled correctly.
650         (qualify_type_recursive): Remove.
651         (composite_pointer_type_r): New function.
652         (composite_pointer_type): Use it.
653         (merge_types): Remove dead comments.
654         (comp_cv_target_types): Remove.
655         (comp_target_types): Likewise.
656         (comp_target_parms): Likewise.
657         (cxx_sizeof_or_alignof_type): Remove OFFSET_TYPE error.
658         (build_indirect_ref): Use TYPE_PTR_TO_MEMBER_P.
659         (build_binary_op): Do not use of comp_target_types.
660         (pointer_diff): Remove OFFSET_TYPE case.
661         (build_unary_op): Adjust pointer-to-member handling.
662         (unary_complex_lvalue): Likewise.
663         (check_for_casting_away_constness): Add description parameter.
664         (build_static_cast): Pass it.
665         (build_reinterpret_cast): Use check_for_casting_away_constness.
666         (build_const_cast): Adjust pointer-to-member handling.
667         (build_c_cast): Likewise.
668         (convert_for_assignment): Remove OFFSET_TYPE error message.
669         (comp_ptr_ttypes_real): Adjust pointer-to-member handling.
670         (comp_ptr_ttypes_reinterpret): Remove.
671         (casts_away_constness_r): Adjust pointer-to-member handling.
672         (casts_away_constness): Liekwise.
673         (strip_all_pointer_quals): Remove.
674         * typeck2.c (digest_init): Adjust pointer-to-member handling.
675         (build_m_component_ref): Likewise.
676         
677 2003-07-22  Wolfgang Bangerth  <bangerth@dealii.org>
679         * lex.c (unqualified_fn_lookup_error): Mention that the error
680         message needs to be kept in synch with the manual.
682 2003-07-22  Nathan Sidwell  <nathan@codesourcery.com>
684         PR c++/11614
685         * decl.c (grokdeclarator): An array member is only a flexible
686         array member if the field itself is the array.
688 2003-07-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
690         PR c++/10793
691         * decl.c (xref_basetypes): Handle error_mark_node.
693 2003-07-22  Nathan Sidwell  <nathan@codesourcery.com>
695         * cp-tree.h (enum cp_lvalue_kind): Add clk_packed.
696         * tree.c (lvalue_p_1): Set it.
697         * class.c (check_field): Don't allow non-packed non-POD fields to
698         be packed.
699         * call.c (reference_binding): Need a temporary for all bitfield
700         and packed fields.
701         (convert_like_real): Check it is ok to make a temporary here.
703 2003-07-21  Nathan Sidwell  <nathan@codesourcery.com>
705         * cp-tree.h (hack_identifier): Remove.
706         * method.c (hack_identifier): Remove.
707         * semantics.c (finish_id_expression): Expand hack_identifier
708         here. Simplify.
710 2003-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
712         * call.c class.c decl.c decl2.c g++spec.c lex.c parser.c pt.c rtti.c
713         semantics.c typeck.c: Remove unnecessary casts.
715 2003-07-18  Nathan Sidwell  <nathan@codesourcery.com>
717         * cp-tree.h (hack_identifier): Remove.
718         * method.c (hack_identifier): Remove.
719         * semantics.c (finish_id_expression): Expand hack_identifier
720         here. Simplify.
722 2003-07-18  Nathan Sidwell  <nathan@codesourcery.com>
724         * cp-tree.h (finish_non_static_data_member): Add object param.
725         * method.c (hack_identifier): Adjust.
726         * pt.c (tsubst_copy_and_build) <COMPONENT_REF case>: Don't search
727         again for a FIELD_DECL.
728         * semantics.c (finish_non_static_data_member): Add object
729         parameter. Always save the DECL in the COMPONENT_REF.
730         * call.c (resolve_scoped_fn_name): Adjust.
732 2003-07-17  Zack Weinberg  <zack@codesourcery.com>
734         * pt.c (get_bindings): Make definition consistent with
735         forward declaration.
737 2003-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
739         PR c++/7809
740         * friend.c (add_friend): Check access for member functions
741         and templates.
743 2003-07-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
745         PR c++/10668
746         * typeck.c (build_class_member_access_expr): Improve diagnostic.
748 2003-07-16  Mark Mitchell  <mark@codesourcery.com>
750         PR c++/11547
751         * cp-tree.h (DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P): New
752         macro.
753         (DECL_PRETTY_FUNCTION_P): Use VAR_DECL_CHECK.
754         * decl.c (duplicate_decls): Merge
755         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
756         * parser.c (cp_parser_postfix_expression): Adjust call to
757         cp_parser_initializer_list and
758         cp_parser_parenthesized_expression_list.
759         (cp_parser_parenthesized_expression_list): Add non_constant_p.
760         (cp_parser_new_placement): Adjust call to
761         cp_parser_parenthesized_expression_list.
762         (cp_parser_direct_new_declarator): Likewise.
763         (cp_parser_conditional_expression): Remove.
764         (cp_parser_constant_expression): Parse an assignment-expression,
765         not a conditional-expression.
766         (cp_parser_simple_declaration): Resolve expression/declaration
767         ambiguity more quickly.
768         (cp_parser_mem_initializer): Adjust call to
769         cp_parser_parenthesized_expression_list.
770         (cp_parser_init_declarator): Keep track of whether or not the
771         initializer is a constant-expression.
772         (cp_parser_initializer): Add non_constant_p parameter.
773         (cp_parser_initializer_clause): Likewise.
774         (cp_parser_initializer_list): Likewise.
775         (cp_parser_attribute_list): Adjust call to
776         cp_parser_parenthesized_expression_list.
777         (cp_parser_functional_cast): Likewise.
778         * pt.c (tsubst_decl): Copy
779         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
780         (tsubst_expr): Tweak use of DECL_PRETTY_FUNCTION_P.
781         * semantics.c (finish_id_expression): Use
782         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
784 2003-07-16  Neil Booth  <neil@daikokuya.co.uk>
786         * lang-options.h: Remove.
788 2003-07-16  Andrew Pinski  <pinskia@physics.uc.edu>
790         PR c/10962
791         * class.c (field_decl_cmp): Remove.
792         (resort_field_decl_cmp): Remove.
793         (resort_sorted_fields): Remove.
794         (add_fields_to_vec): Rename to ...
795         (add_fields_to_record_type): this.
796         (finish_struct_1): Change to be using
797         sorted_fields_type's fields.
798         * cp-tree.h (lang_decl): In lang_decl_u3
799         change sorted_fields to be a pointer to
800         sorted_fields_type.
801         (resort_sorted_fields): Remove prototype.
802         * search.c (lookup_field_1): Change to be using
803         sorted_fields_type's fields.
805 2003-07-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
807         PR c++/5421
808         * decl.c (grokdeclarator): Handle TEMPLATE_ID_EXPR if friend
809         is a member of other class.
810         * friend.c (do_friend): Don't build TEMPLATE_DECL if friend
811         is a specialization of function template.
813 2003-07-16  Gabriel Dos Reis  <gdr@integrable-solutions.net>
815         PR c++/10903
816         * pt.c (convert_nontype_argument): Fix thinko in diagnostic.
817         Improve.
819 2003-07-15  Mark Mitchell  <mark@codesourcery.com>
821         * cp-tree.def (LOOKUP_EXPR): Remove.
822         * cp-tree.h (cp_id_kind): Add CP_ID_KIND_UNQUALIFIED_DEPENDENT.
823         (LOOKUP_EXPR_GLOBAL): Remove.
824         (get_bindings): Remove.
825         (is_aggr_type_2): Remove.
826         * call.c (resolved_scoped_fn_name): Remove support for
827         LOOKUP_EXPR.
828         * decl.c (grokfndecl): Likewise.
829         (grokdeclarator): Likewise.
830         * error.c (dump_decl): Likewise.
831         (dump_expr): Likewise.
832         * friend.c (do_friend): Likewise.
833         * init.c (build_offset_ref): Likewise.
834         * lex.c (unqualified_fn_lookup_error): Use pedwarn.  Do not create
835         LOOKUP_EXPRs
836         * mangle.c (write_expression): Remove support for LOOKUP_EXPR.
837         * parser.c (cp_parser_postfix_expression): Modify Koenig lookup
838         test.
839         * pt.c (get_bindings): Give it internal linkage.
840         (check_explicit_specialization): Remove support for LOOKUP_EXPR.
841         (lookup_template_function): Likewise.
842         (for_each_tempalte_parm_r): Likewise.
843         (tsubst_decl): Likewise.
844         (tsubst_qualified_id): Handle template template parameters.
845         (tsubst_copy): Remove support for LOOKUP_EXPR.
846         (tsubst_copy_and_build): Likewise.
847         (most_general_template): Likewise.
848         (value_dependent_expression_p): Likewise.
849         (type_dependent_expression_p): Note that IDENTIFIER_NODEs are
850         always dependent.
851         * semantics.c (perform_koenig_lookup): Do not create
852         IDENTIFIER_NODEs.
853         (finish_fname): Likewise.
854         (finish_id_expression): Likewise.
855         * tree.c (is_aggr_type_2): Remove.
857 2003-07-16  Gabriel Dos Reis  <gdr@integrable-solutions.net>
859         PR c++/11531
860         * typeck.c (check_return_expr): Fix thinko in diagnostic.
862 2003-07-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
864         PR c++/10108
865         * pt.c (tsubst_decl) <TEMPLATE_DECL>: Add a check for
866         error_mark_node.
868 2003-07-14  Mark Mitchell  <mark@codesourcery.com>
870         PR c++/11509
871         * pt.c (dependent_scope_ref_p): New function.
872         (value_dependent_expression_p): Use it.
873         (type_dependent_expression_p): Likewise.
875         * pt.c (tsubst_friend_function): Use reregister_specialization.
877         PR c++/7019
878         * cp-tree.h (lookup_qualified_name): Adjust prototype.
879         * decl.c (lookup_qualified_name): Add complain parameter.  Adjust
880         call to is_aggr_type.
881         * parser.c (cp_parser_lookup_name): Adjust call to
882         lookup_qualified_name.
883         * pt.c (tsubst_qualified_id): Likewise.
884         (tsubst_copy_and_build): Likewise.
885         * semantics.c (finish_qualified_id_expr): Deal with erroneous
886         expressions.
888 2003-07-14  Gabriel Dos Reis <gdr@integrable-solutions.net>
890         PR c++/11510
891         * call.c (op_error): Properly format  REALPART_EXPR and
892         IMAGPART_EXPR.
893         * error.c (dump_expr): Likewise.
895 2003-07-14  Gabriel Dos Reis <gdr@integrable-solutions.net>
897         * error.c (dump_expr): Handle EMPTY_CLASS_EXPR.
899 2003-07-14  Gabriel Dos Reis  <gdr@integrable-solutions.net>
901         PR c++/5293
902         * call.c (initialize_reference): Improve diagnostic.
904 2003-07-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
906         PR c++/11154
907         * pt.c (more_specialized_class): Add full_args parameter.
908         (most_specialized_class): Adjust calls to more_specialized_class.
909         * cp-tree.h (more_specialized_class): Adjust declaration.
911 2003-07-14  Dan Nicolaescu  <dann@ics.uci.edu>
913         * lex.c (enum tree_node_kind): Delete.
915 2003-07-13  Mark Mitchell  <mark@codesourcery.com>
917         PR c++/11503
918         * cp-tree.h (DECL_SELF_REFERENCE_P): New macro.
919         (SET_DECL_SELF_REFERENCE_P): Likewise.
920         * class.c (build_self_reference): Use SET_DECL_SELF_REFERENCE_P.
921         * pt.c (tsubst_decl): Copy it.
922         * search.c (lookup_base): Use DECL_SELF_REFERENCE_P.
924         * pt.c (reregister_specialization): Fix thinko in previous change.
926         * cp-tree.h (cp_id_kind): New type.
927         (unqualified_name_lookup_error): Change prototype.
928         (unqualified_fn_lookup_error): New function.
929         (do_identifier): Remove.
930         (do_scoped_id): Likewise.
931         (tsubst_copy_and_build): Change prototype.
932         (reregister_specialization): New function.
933         (perform_koenig_lookup): Likewise.
934         (finish_id_expression): Likewise.
935         * call.c (build_method_call): Adjust call to
936         unqualified_name_lookup_error.
937         * decl.c (duplicate_decls): Use reregister_specialization.
938         * lex.c (is_global): Remove.
939         (unqualified_name_lookup_error): Return a value.
940         (do_identifier): Remove.
941         (do_scoped_id): Likewise.
942         (identifier_typedecl_value): Remove.
943         (unqualified_fn_lookup_error): New function.
944         * parser.c (cp_parser_id_kind): Remove.
945         (cp_parser_non_constant_id_expression): Remove.
946         (cp_parser_primary_expression): Use finish_id_expression.
947         (cp_parser_class_or_namespace_name): Use cp_id_kind, not
948         cp_parser_id_kind.
949         (cp_parser_postfix_expression): Use perform_koenig_lookup.
950         (cp_parser_template_argument): Use cp_id_kind.
951         (cp_parser_fold_non_dependent_expr): Adjust call to
952         tsubst_copy_and_build.
953         * pt.c (unregister_specialization): Rename to ...
954         (reregister_specialization): This.
955         (tsubst_friend_function): Use it.
956         (maybe_fold_nontype_arg): Adjust call to tsubst_copy_and_build.
957         (tsubst_qualified_id): Likewise.
958         (tsubst_expr): Likewise.
959         (tsubst_copy_and_build): Add function_p parameter.  Use
960         finish_id_expression.  Introduce RECUR macro.
961         (tsubst_non_call_postfix_expression): New function.
962         (regenerate_decl_from_template): Use reregister_specialization.
963         * semantics.c (perform_koenig_lookup): New function.
964         (finish_id_expression): Likewise.
966 2003-07-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
968         * pt.c (push_access_scope_real): Remove.
969         (push_access_scope): Move code from push_access_scope_real.
970         (pop_access_scope): Don't check for TEMPLATE_DECL.
971         (instantiate_template): Defer access checking during template
972         substitution.
973         (regenerate_decl_from_template): Tidy.
975 2003-07-11  Nathanael Nerode  <neroden@gcc.gnu.org>
977         PR c++/11437
978         * operators.def: Add definitions for __imag__, __real__.
980 2003-07-11  Nathan Sidwell  <nathan@codesourcery.com>
982         PR c++/11050
983         * parser.c (cp_parser_expression_list): Rename to ...
984         (cp_parser_parenthesized_expression_list): ... here. Add attribute
985         parameter, parse the surounding parentheses.
986         (cp_parser_skip_to_closing_parenthesis): Add recover and or_comma
987         parameters. Return int.
988         (cp_parser_skip_to_closing_parenthesis or comma): Remove.
989         (cp_parser_postfix_expression): Adjust function call parsing.
990         (cp_parser_new_placement): Adjust.
991         (cp_parser_new_initializer): Likewise.
992         (cp_parser_cast_expression): Likewise.
993         (cp_parser_selection_statement): Likewise.
994         (cp_parser_mem_initializer): Likewise.
995         (cp_parser_asm_definition): Likewise.
996         (cp_parser_init_declarator): Likewise.
997         (cp_parser_declarator): Make
998         cdtor_or_conv_p an int ptr.
999         (cp_parser_direct_declarator): Likewise. Check for a parameter
1000         list on cdtors & conv functions.
1001         (cp_parser_initializer): Adjust.
1002         (cp_parser_member_declaration): Adjust.
1003         (cp_parser_attribute_list): Move code into
1004         cp_parser_parens_expression_list.
1005         (cp_parser_functional_cast): Adjust.
1006         * pt.c (type_dependent_expression_p): Erroneous expressions are
1007         non-dependent.
1009 2003-07-11  Geoffrey Keating  <geoffk@apple.com>
1011         * decl.c (cp_finish_decl): Handle 'used' attribute.
1013         * cp-lang.c (c_reset_state): New dummy routine.
1014         * cp-tree.h (finish_file): Move prototype to c-common.h.
1015         * parser.c (c_parse_file): Rename from yyparse; don't call finish_file.
1017 2003-07-11  Mark Mitchell  <mark@codesourcery.com>
1019         PR c++/8327
1020         * pt.c (tsubst_qualified_id): Implement suggested resolution for
1021         Core Issue 2.
1022         (type_dependent_expression_p): Likewise.
1024 2003-07-10  Mark Mitchell  <mark@codesourcery.com>
1026         * typeck.c (build_binary_op): Do not warn about signed
1027         vs. unsigned comparisons in the bodies of templates.
1029         PR c++/9411
1030         * parser.c (cp_parser_postfix_expression): Check dependency of
1031         functions.
1033 2003-07-09  Mark Mitchell  <mark@codesourcery.com>
1035         PR c++/10032
1036         * decl.c (cxx_init_decl_processing): With -pedantic, pedwarns are
1037         still errors.
1039         PR c++/10527
1040         * error.c (decl_to_string): Do not print default argument
1041         expressions.
1043         * cp-tree.h (break_out_calls): Remove declaration.
1044         * tree.c (break_out_calls): Remove.
1045         * typeck.c (build_modify_expr): Avoid invalid sharing of trees.
1047 2003-07-09  Nathan Sidwell  <nathan@codesourcery.com>
1049         PR c++ 9483
1050         * class.c (check_field_decls): Pass DECL_NAME to constructor_name_p.
1051         * decl2.c (constructor_name_p): Avoid repeated constructor_name
1052         calls.
1053         * decl.c (grokdeclarator): Refactor ctor/dtor detection.
1055 2003-07-09  Mark Mitchell  <mark@codesourcery.com>
1057         * typeck.c (build_x_unary_op): Take note of the fact that
1058         PREINCREMENT_EXPR and POSTINCREMENT_EXPR are binary operations on
1059         trees.
1061         * parser.c (cp_parser_primary_expression): Preserve the form of
1062         qualified expressions in templates, even if they are not
1063         dependent.
1064         * pt.c (convert_nontype_argument): Handle non-dependent SCOPE_REFs.
1065         (tsubst_qualified_id): Likewise.
1066         * search.c (accessible_p): Treat everything in the body of a
1067         template as accessible.
1069 2003-07-08  Mark Mitchell  <mark@codesourcery.com>
1071         * cp-tree.def (NON_DEPENDENT_EXPR): New node.
1072         * cp-tree.h (build_call_from_tree): Remove.
1073         (build_member_call): Likewise.
1074         (dependent_template_arg_p): Remove.
1075         (any_dependent_template_arguments_p): New function.
1076         (dependent_template_id_p): Likewise.
1077         (any_type_dependent_arguments_p): Likewise.
1078         (build_non_dependent_expr): Likewise.
1079         (build_non_dependent_args): Likewise.
1080         (build_x_compound_expr): Adjust prototype.
1081         * call.c (build_new_method_call): Handle non-dependent expressions
1082         correctly.
1083         * decl2.c (grok_array_decl): Likewise.
1084         (build_offset_ref_call_from_tree): Likewise.
1085         (build_call_from_tree): Remove.
1086         * error.c (dump_decl): Handle NON_DEPENDENT_EXPR.
1087         (dump_expr): Likewise.
1088         * init.c (build_member_call): Remove.
1089         * mangle.c (write_expression): Update handling for template-ids.
1090         * parser.c (cp_parser_primary_expression): Use
1091         any_dependent_template_arguments_p.  Update constant-expression
1092         handling.
1093         (cp_parser_postfix_expression): Use
1094         any_type_dependent_arguments_p.  Simplify call processing.
1095         (cp_parser_unary_expression): Simplify.
1096         (cp_parser_expression): Adjust for changes to
1097         build_x_compound_expr.
1098         (cp_parser_template_argument): Implement standard-conforming
1099         parsing of non-type template arguments.
1100         (cp_parser_direct_declarator): Use
1101         cp_parser_fold_non_dependent_expr.
1102         (cp_parser_fold_non_dependent_expr): New function.
1103         (cp_parser_next_token_ends_template_argument_p): Likewise.
1104         * pt.c (convert_template_argument): Do not call
1105         maybe_fold_nontype_arg.
1106         (tsubst_baselink): Likewise.
1107         (tsubst_copy_and_build): Share common code.  Make sizeof/alignof
1108         processing work correctly for non-dependent expressions.  Adjust
1109         handling of COMPOUND_EXPR.  Simplify call processing.
1110         (value_dependent_expression_p): Deal with functional casts and
1111         sizeof/alignof correctly.
1112         (type_dependent_expression_p): Handle overloaded functions.
1113         (any_type_dependent_arguments_p): New function.
1114         (any_dependent_template_arguments_p): Likewise.
1115         (dependent_template_p): Treat SCOPE_REFs as dependent.
1116         (dependent_template_id_p): Simplify.
1117         (build_non_dependent_expr): New function.
1118         (build_non_dependent_args): Likewise.
1119         * semantics.c (finish_stmt_expr): Don't make dependent
1120         statement-expresions have void type.
1121         (finish_call_expr): Handle non-dependent expressions
1122         correctly.
1123         * tree.c (lvalue_p_1): Treat NON_DEPENDENT_EXPRs as lvalues.
1124         * typeck.c (cxx_sizeof_or_alignof_type): Give the expression
1125         type size_t, even in templates.
1126         (expr_sizeof): Likewise.
1127         (finish_class_member_access_expr): Handle non-dependent expressions
1128         correctly.
1129         (build_x_indirect_ref): Likewise.
1130         (build_x_binary_op): Likewise.
1131         (build_x_unary_op): Likewise.
1132         (build_x_conditional_expr): Likewise.
1133         (build_x_compound_expr): Likewise.
1134         * typeck2.c (build_x_arrow): Likewise.
1136 Wed Jul  9 02:28:39 CEST 2003  Jan Hubicka  <jh@suse.cz>
1138         * cp-lang.c (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): New.
1139         * decl.c (duplicate_decls): Use DECL_ESTIMATED_INSNS.
1140         (start_function): Use DECL_ESTIMATED_INSNS.
1141         * optimize.c (maybe_clone_body): Use DECL_ESTIMATED_INSNS.
1143         * decl2.c (maybe_emit_vtables): Fix marking vtables as needed in
1144         unit-at-a-time
1146 2003-07-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1148         PR c++/11030
1149         * pt.c (instantiate_class_template): Don't call xref_tag to
1150         inject name when the friend class is a specialization.
1152 2003-07-07  Mark Mitchell  <mark@codesourcery.com>
1154         * cp-tree.h (build_scoped_method_call): Remove.
1155         (lookup_qualified_name): Remove parameter.
1156         (tsubst_copy_and_build): Declare.
1157         (finish_qualified_object_call_expr): Remove.
1158         (check_accessibility_of_qualified_id): New function.
1159         (finish_qualified_id_expr): Likewise.
1160         (non_reference): Likewise.
1161         (build_expr_from-tree): Remove.
1162         * call.c (non_reference): Remove.
1163         (build_scoped_method_call): Likewise.
1164         (build_method_call): Use error_operand_p.  Assert that we are not
1165         processing a template.
1166         (standard_conversion): Use non_reference.
1167         * class.c (build_vtbl_entry_ref): Likewise.
1168         (build_vtbl_ref_1): Likewise.
1169         * cvt.c (build_expr_type_conversion): Use non_reference.
1170         * decl.c (lookup_qualified_name): Remove flags parameter.
1171         (grok_op_properties): Use non_reference.
1172         * decl2.c (grok_array_decl): Likewise.
1173         (build_expr_from_tree): Remove.
1174         (build_offset_ref_call_from_tree): Update comment.
1175         * error.c (parm_to_string): Call reinit_global_formatting_buffer.
1176         * except.c (prepare_eh_types): Use non_reference.
1177         (can_convert_eh): Likewise.
1178         * init.c (build_dtor_call): Avoid using build_method_call.
1179         * mangle.c (write_template_param): Remove misleading comment.
1180         * method.c (locate_copy): Use non_reference.
1181         * parser.c (cp_parser_scope_through_which_access_occurs): Remove.
1182         (cp_parser_primary_expression): Do not create SCOPE_REFs is
1183         non-dependent contexts.
1184         (cp_parser_postfix_expression): Use finish_qualified_id_expr.
1185         (cp_parser_direct_declarator): Use tsubst_copy_and_build, not
1186         build_expr_from_tree.
1187         (cp_parser_lookup_name): Adjust call to lookup_qualified_name.
1188         Use check_accessibility_of_qualified_id.
1189         * pt.c (maybe_fold_nontype_arg): Use tsubst_copy_and_build, not
1190         build_expr_from_tree.
1191         (tsubst_baselink): New function.
1192         (tsubst_qualified_id): Likewise.
1193         (tsubst_copy): Use them.  Remove support for METHOD_CALL_EXPR.
1194         (tsubst_expr): Adjust call to lookup_qualified_name.
1195         (tsubst_copy_and_build): Handle SCOPE_REFs specially.  Adjust
1196         handling of CALL_EXPRs.
1197         (value_dependent_expression_p): Use INTEGRAL_OR_ENUMERATION_TYPE_P.
1198         * rtti.c (get_tinfo_decl_dynamic): Use non_reference.
1199         * search.c (check_final_overrider): Likewise.
1200         * semantics.c (check_accessibility_of_qualified_id): New function.
1201         (finish_qualified_object_call_expr): Remove.
1202         * typeck.c (target_type): Use non_reference.
1203         (cxx_sizeof_or_alignof_type): Likewise.
1204         (dubious_conversion_warnings): Likewise.
1205         (convert_for_initialization): Likewise.
1206         (non_reference): New function.
1208 2003-07-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1210         * decl.c (print_binding_level, print_other_binding_stack,
1211         print_binding_stack): Merge uses of HOST_PTR_PRINTF with adjacent
1212         stdio calls.
1213         * ptree.c (cxx_print_decl, cxx_print_binding): Likewise.
1215 2003-07-07  Andreas Jaeger  <aj@suse.de>
1217         * friend.c: Convert to ISO C90 prototypes.
1219         * Make-lang.in ($(srcdir)/cp/cfns.h): Use ANSI-C as output
1220         language.
1221         * cfns.h: Regenerate.
1223         * typeck.c: Convert remaining prototypes to ISO C90.
1224         * search.c: Likewise.
1226         * decl2.c (build_expr_from_tree): Convert prototype to ISO C90.
1227         * semantics.c (expand_or_defer_fn): Likewise
1228         * mangle.c (discriminator_for_string_literal): Likewise.
1229         * g++spec.c (lang_specific_driver): Likewise.
1231         * search.c (lookup_base_r): Remove unused variable.
1233 2003-07-07  Nathan Sidwell  <nathan@codesourcery.com>
1235         * semantics.c: (genrtl_try_block) Adjust emit_line_note
1236         calls.
1238 2003-07-07  Andreas Jaeger  <aj@suse.de>
1240         * search.c (lookup_base_r): Remove unused variable.
1242 2003-07-06  Michael Chastain  <mec@shout.net>
1244         PR debug/10055
1245         * lex.c (cxx_init): Call push_srcloc and pop_srcloc rather than
1246         assigning to input_filename directly.
1248 2003-07-06  Kazu Hirata  <kazu@cs.umass.edu>
1250         * call.c: Fix comment formatting.
1251         * class.c: Likewise.
1252         * cp-tree.h: Likewise.
1253         * decl.c: Likewise.
1254         * decl2.c: Likewise.
1255         * error.c: Likewise.
1256         * method.c: Likewise.
1257         * name-lookup.c: Likewise.
1258         * parser.c: Likewise.
1259         * pt.c: Likewise.
1260         * rtti.c: Likewise.
1261         * search.c: Likewise.
1262         * typeck.c: Likewise.
1264 2003-07-06  Mark Mitchell  <mark@codesourcery.com>
1266         PR c++/11345
1267         * search.c (lookup_base_r): Remove is_non_public and
1268         within_current_scope parameters.  Remove other dead code.
1269         (lookup_base): Adjust call to lookup_base_r.
1270         (adjust_result_of_qualified_name_lookup): Improve comment.
1271         * semantics.c (finish_call_expr): Use maybe_dummy_object.
1273 2003-07-06  Neil Booth  <neil@daikokuya.co.uk>
1275         * cp-lang.c (LANG_HOOKS_HANDLE_FILENAME,
1276         LANG_HOOKS_MISSING_ARGUMENT): Override.
1278 2003-07-05  Mark Mitchell  <mark@codesourcery.com>
1280         PR c++/11431
1281         * typeck.c (build_static_cast): Check for reference conversions
1282         earlier.
1284 2003-07-04  Mark Mitchell  <mark@codesourcery.com>
1286         * cp-tree.h (perform_integral_promotions): Declare.
1287         * call.c (build_addr_func): Use decay_conversion.
1288         (convert_arg_to_ellipsis): Likewise.  Remove misleading comment.
1289         (convert_for_arg_passing): Use perform_integral_promotions.
1290         * cvt.c (build_expr_type_conversion): Use decay_conversion.
1291         (type_promotes_to): Do not return a cv-qualified type.
1292         * decl.c (grok_reference_init): Fix formatting.
1293         (get_atexit_node): Use decay_conversion.
1294         (build_enumerator): Use perform_integral_promotions.
1295         * init.c (build_vec_init): Use decay_conversion.
1296         * semantics.c (finish_expr_stmt): Likewise.
1297         (finish_switch_cond): Use perform_integral_promotions.
1298         * typeck.c (default_conversion): Likewise.
1299         (perform_integral_promotions): New function.
1300         (build_indirect_ref): Use decay_conversion.
1301         (build_array_ref): Use perform_integral_promotions.
1302         (convert_arguments): Use decay_conversion.
1303         (build_unary_op): Use perform_integral_promotions.
1304         (build_c_cast): Use decay_conversion.
1305         (build_modify_expr): Likewise.
1306         (convert_for_initialization): Likewise.
1307         * typeck2.c (build_x_arrow): Likewise.
1309 2003-07-04  Kazu Hirata  <kazu@cs.umass.edu>
1311         * call.c: Fix comment typos.
1312         * class.c: Likewise.
1313         * cp-tree.h: Likewise.
1314         * cvt.c: Likewise.
1315         * decl2.c: Likewise.
1316         * decl.c: Likewise.
1317         * init.c: Likewise.
1318         * mangle.c: Likewise.
1319         * parser.c: Likewise.
1320         * pt.c: Likewise.
1321         * search.c: Likewise.
1322         * semantics.c: Likewise.
1323         * tree.c: Likewise.
1324         * typeck.c: Likewise.
1326 2003-07-04  Zack Weinberg  <zack@codesourcery.com>
1328         * parser.c (cp_lexer_read_token): No need to handle string
1329         constant concatenation.
1331 2003-07-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1333         * cp-tree.h (GCC_DIAG_STYLE, ATTRIBUTE_GCC_CXXDIAG): Define.
1334         (cp_error_at, cp_warning_at, cp_pedwarn_at): Mark with
1335         ATTRIBUTE_GCC_CXXDIAG.
1337 2003-07-03  Mark Mitchell  <mark@codesourcery.com>
1339         * call.c (build_addr_func): Handle bound pointers-to-members.
1340         (build_method_call): Do not call resolve_offset_ref.
1341         (implicit_conversion): Likewise.
1342         (resolve_scoped_fn_name): Use finish_non_static_data_member, not
1343         resolve_offset_ref.
1344         (resolve_args): Do not call resolve_offset_ref.
1345         (build_conditional_expr): Likewise.
1346         (build_new_method_call): Likewise.
1347         * cp-tree.def (OFFSET_REF): Update documentation.
1348         * cvt.c (cp_convert_to_pointer): Update handling of conversions from
1349         pointers to members to pointers.
1350         (ocp_convert): Do not call resolve_offset_ref.
1351         (convert_to_void): Likewise.
1352         (build_expr_type_conversion): Likewise.
1353         * decl2.c (delete_sanity): Likewise.
1354         * init.c (resolve_offset_ref): Simplify greatly.
1355         (build_vec_delete): Do not call resolve_offset_ref.
1356         * parser.c (cp_parser_postfix_expression): Call resolve_offset_ref
1357         if appropriate.
1358         (cp_parser_unary_expression): Use
1359         cp_parser_simple_cast_expression.
1360         (cp_parser_delete_expression): Likewise.
1361         (cp_parser_cast_expression): Likewise.
1362         (cp_parser_pm_expression): Use cp_parser_binary_op.
1363         (cp_parser_simple_cast_expression): New function.
1364         * rtti.c (build_dynamic_cast_1): Do not call resolve_offset_ref.
1365         * semantics.c (finish_increment_expr): Likewise.
1366         (finish_typeof): Likewise.
1367         * tree.c (lvalue_p_1): Do not handle OFFSET_REF.
1368         * typeck.c (require_complete_type): Do not handle OFFSET_REFs.
1369         (decay_conversion): Do not call resolve_offset_ref.
1370         (finish_class_member_access_expr): Likewise.
1371         (convert_arguments): Likewise.
1372         (build_x_binary_op): Handle DOTSTAR_EXPR.
1373         (condition_conversion): Do not call resolve_offset_ref.
1374         (unary_complex_lvalue): Likewise.
1375         (build_static_cast): Likewise.
1376         (build_reinterpret_cast): Likewise.
1377         (build_const_cast): Likewise.
1378         (build_c_cast): Likewise.
1379         (build_modify_expr): Likewise.
1380         (convert_for_assignment): Likewise.
1381         (convert_for_initialization): Likewise.
1382         * typeck2.c (build_x_arrow): Likewise.
1383         (build_m_component_ref): Simplify.
1385         * call.c (build_scoped_method_call): Use convert_to_void.
1386         (build_method_call): Likewise.
1387         * class.c (check_field_decls): Remove dead code.
1388         * cvt.c (convert_from_reference): Remove OFFSET_TYPE handling.
1389         * decl2.c (grok_array_decl): Remove dead code.
1390         (arg_assoc_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
1391         as pointer-to-member representation.
1392         * init.c (build_offset_ref): Tidy.
1393         (build_vec_delete_1): Use convert_to_void.
1394         * mangle.c (write_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
1395         as pointer-to-member representation.
1397 2003-07-03  Nathan Sidwell  <nathan@codesourcery.com>
1399         PR c++/9162
1400         * decl.c (grokdeclarator): Return friend decls, not
1401         void_type_node.
1402         * decl2.c (grokfield): Alter friend decl check.
1403         * parser.c (struct cp_parser): Document default_arg chain on
1404         unparsed_functions_queue.
1405         (cp_parser_save_default_args): New.
1406         (cp_parser_init_declarator, cp_parser_function_definition,
1407         cp_parser_member_declaration): Call it.
1408         (cp_parser_class_specifier): Remove unused variable. Alter
1409         processing of unparsed_functions_queue.
1411 2003-07-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1413         * class.c (add_method, check_field_decl): Fix format specifier.
1414         * decl.c (duplicate_decls, pushdecl, check_goto,
1415         fixup_anonymous_aggr, maybe_commonize_var, grokdeclarator,
1416         start_enum): Likewise.
1417         * decl2.c (ambiguous_decl): Likewise.
1418         * pt.c (redeclare_class_template): Likewise.
1420 2003-07-02  Nathan Sidwell  <nathan@codesourcery.com>
1422         PR c++/10219
1423         * pt.c (type_unification_real): Don't unify exprs of error type.
1424         * tree.c (error_type): Don't die on error_type.
1426         PR c++/9779
1427         * decl2.c (arg_assoc_class): Don't die on NULL type.
1428         * typeck.c (type_unknown_p): Don't die on untyped expressions.
1430 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
1432         PR c++/6949
1433         * decl2.c (grokfield): Create TEMPLATE_DECLs for methods in local
1434         classes.
1436 2003-07-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1438         * error.c (locate_error): %P takes an `int', not a `tree'.
1440 Wed Jul  2 00:36:48 CEST 2003  Jan Hubicka  <jh@suse.cz>
1442         * decl2.c (defer_fn): Set DECL_DEFER_OUTPUT.
1443         (finish-file): Do not process function with DECL_DEFER_OUTPUT clear;
1444         clear DECL_DEFER_OUTPUT once function is processed; avoid flags
1445         massaging.
1447         * cp-tree.h (DECL_NEEDED_P): Support unit-at-a-time
1448         (expand_or_defer_fn): Declare.
1449         (lower_function): Declare.
1450         * decl.c (start_cleanup_fn): Use expand_or_defer_fn.
1451         * decl2.c: Include cgraph.h and varpool.h
1452         (maybe_emit_vtables):  Make explicit instantations as needed.
1453         (mark_member_pointers, lower_function): New functions.
1454         (finish_file): Do unit-at-a-time.
1455         * method.c (synthesize_method): Use expand_or_defer_fn.
1456         * optimize.c (maybe_clone_body): Use expand_or_defer_fn.
1457         * parser.c (cp_parser_function_definition_after_decl): Use
1458         expand_or_defer_fn.
1459         * pt.c (instantiate_decl): Likewise.
1460         * semantics.c: Include cgraph.h
1461         (expand_or_defer_fn): Break out from ...
1462         (expand_body): ... here; deal with unit-at-a-time.
1463         * cp-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION,
1464         LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Define.
1466 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
1468         * call.c (resolve_scoped_fn_name): Return error_mark_node for
1469         erroneous cases.
1471 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
1473         PR c++/11149
1474         * call.c (resolve_scoped_fn_name): Check that the qualifying scope
1475         is a class type.
1477 2003-07-01  Giovanni Bajo  <giovannibajo@libero.it>
1479         PR c++/8046
1480         * error.c (dump_decl): Handle BIT_NOT_EXPR as
1481         pseudo destructor calls.
1483 2003-07-01  Nathan Sidwell  <nathan@codesourcery.com>
1485         * cp-tree.h (define_label): Replace filename and lineno
1486         arguments with a location_t.
1487         * decl.c (pop_label): Adjust define_label call.
1488         (define_label): Replace filename and lineno arguments with a
1489         location_t.
1490         * semantics.c (finish_label): Adjust define_label call.
1492 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
1494         PR c++/9559
1495         * decl2.c (grokfield): Do not build NOP_EXPRs around the
1496         error_mark_node.
1498 2003-06-30  Neil Booth  <neil@daikokuya.co.uk>
1500         * Make-lang.in: Update.
1501         * cp-lang.c (c_language): Define.
1502         (LANG_HOOKS_INIT_OPTIONS): Use common hook.
1503         * cp-tree.h (cxx_init_options): Remove.
1504         * lex.c: Don't include diagnostic.h.
1505         (cxx_init_options): Remove.
1507 2003-06-30  Giovanni Bajo  <giovannibajo@libero.it>
1509         PR c++/4933
1510         * error.c (dump_expr): Support correctly the COMPOUND_EXPR
1511         tree generated within a template. Use dump_expr to dump an
1512         expression sizeof.
1514 2003-06-30  Giovanni Bajo  <giovannibajo@libero.it>
1516         * mangle.c (write_expression): Exit gracefully when trying to
1517         mangle a CALL_EXPR.
1519 2003-06-30  Giovanni Bajo  <giovannibajo@libero.it>
1521         PR c++/10750
1522         * parser.c (cp_parser_primary_expression): A VAR_DECL with a
1523         (value- or type-) dependent expression as DECL_INITIAL is a
1524         valid constant-expression (at parser time).
1526 2003-06-30  Giovanni Bajo <giovannibajo@libero.it>
1528         PR c++/11106
1529         * error.c (dump_decl): Call dump_decl to dump the DECL_NAME for a
1530         USING_DECL, instead of print_tree_identifier.
1532 2003-06-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1534         * cp-tree.h (language_to_string): Adjust declaration.
1535         * dump.c (cp_dump_tree): Adjust usage.
1536         * error.c (dump_char): Use output_formatted_scalar. Tidy.
1537         (parm_to_string): Lose unused parameter.  Tidy.
1538         (expr_to_string): Likewise.
1539         (code_to_string): Likewise.
1540         (language_to_string): Likewise.
1541         (op_to_string): Likewise.
1542         (assop_to_string): Likewise.
1543         (digit_buffer): Remove.
1544         (dump_type): Format builtin vector type as __vector__.
1546 2003-06-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1548         * error.c (print_integer): Remove.
1549         (dump_type_suffix): Adjust.
1550         (dump_expr): Likewise.
1552 2003-06-28  Nathan Sidwell  <nathan@codesourcery.com>
1554         * error.c (print_instantiation_partial_context): Take a
1555         location_t.
1556         (print_instantiation_full_context): Adjust.
1557         (print_instantiation_context): Adjust.
1559         * cp-tree.h (cp_line_of, cp_file_of): Remove.
1560         * error.c (cp_line_of, cp_file_of): Merge into ...
1561         (location_of): ... here. Make static, return a location_t.
1562         (cp_error_at, cp_warning_at, cp_pedwarn_at): Adjust.
1564 2003-06-28  Nathan Sidwell  <nathan@codesourcery.com>
1566         PR c++/10784
1567         * call.c (joust): Move warn_conversion check outwards.
1569 2003-06-27  Zack Weinberg  <zack@codesourcery.com>
1571         * decl.c (build_typename_type)
1572         * mangle.c (write_template_template_arg)
1573         * parser.c (cp_parser_scope_through_which_access_occurs)
1574         * pt.c (push_access_scope_real, push_access_scope, pop_access_scope)
1575         * repo.c (get_base_filename)
1576         * semantics.c (maybe_convert_cond):
1577         Mark the definition static, matching the forward declaration.
1579 2003-06-27  Mark Mitchell  <mark@codesourcery.com>
1581         PR c++/10468
1582         * pt.c (tsubst): Handle qualified TYPEOF_TYPEs correctly.
1584 2003-06-27  Mark Mitchell  <mark@codesourcery.com>
1586         PR c++/10796
1587         * decl.c (finish_enum): Implement DR377.
1589         * decl.c (cp_finish_decl): Don't make variables with reference
1590         type readonly while they are being initialized.
1592 2003-06-26  Mark Mitchell  <mark@codesourcery.com>
1594         PR c++/11332
1595         * typeck.c (build_static_cast): Avoid returning expressions with
1596         reference type.
1598 2003-06-26  Nathan Sidwell  <nathan@codesourcery.com>
1600         * call.c (build_op_delete_call): Use strip_array_call. Correct
1601         error message to say 'delete' or 'delete[]'.
1603 2003-06-26  Giovanni Bajo  <giovannibajo@libero.it>
1605         PR c++/8266
1606         * pt.c (check_explicit_specialization): When looking up a
1607         template function from an identifier outside class-scope, bind
1608         it to CP_DECL_CONTEXT.
1610 2003-06-25  Mark Mitchell  <mark@codesourcery.com>
1612         PR c++/10990
1613         * search.c (lookup_base_r): Rely on accessible_p, rather than
1614         trying to emulate that logic here.
1616         PR c++/10931
1617         * call.c (convert_like): Pass issue_conversion_warnings.
1618         (convert_like_with_context): Likewise.
1619         (convert_like_real): Add issue_conversion_warnings parameter.
1620         (perform_direct_initialization_if_possible): New function.
1621         * cp-tree.h (perform_direct_initialization_if_possible): Declare it.
1622         * typeck.c (check_for_casting_away_constness): New function.
1623         (build_static_cast): Rewrite.
1625 2003-06-24  Nathan Sidwell  <nathan@codesourcery.com>
1627         * call.c (enforce_access): Assert we get a binfo.
1628         (build_op_delete_call): Pass a binfo to
1629         perform_or_defer_access_check.
1630         * class.c (alter_access): Likewise.
1631         * decl.c (make_typename_type): Likewise.
1632         (make_unbound_class_template): Likewise.
1633         * lex.c (do_identifier): Likewise.
1634         * method.c (hack_identifier): Likewise.
1635         * parser.c (cp_parser_lookup_name): Likewise.
1636         * search.c (lookup_member): Likewise. Move IDENTIFIER_CLASS_VALUE
1637         test.
1638         * semantics.c (finish_non_static_data_member): Likewise.
1639         (perform_or_defer_access_check): Expect a binfo.
1640         * typeck.c (comptypes): Expect types.
1642         * mangle.c (find_substitution): Don't pass a non-type to same_type_p
1643         * friend.c (make_friend_class): Likewise.
1644         * pt.c (check_default_tmpl_args): Likewise.
1645         (lookup_template_class): Likewise.
1647 Tue Jun 24 15:30:05 CEST 2003  Jan Hubicka  <jh@suse.cz>
1649         * method.c (thunk_labelno): Move outside ifdef block to make garbage
1650         collector happy.
1652 Tue Jun 24 13:52:34 CEST 2003  Jan Hubicka  <jh@suse.cz>
1654         * class.c (build_vtable): Make vtables.
1655         * cp-tree.h (DECL_VTABLE_OR_VTT_P): New macro.
1656         * decl2.c (output_vtable_inherit): Rename to ...
1657         (prepare_assemble_variable): ... this one; change interface.
1658         (maybe_emit_vtables): Do not call output_vtable_inherit.
1659         * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Define.
1660         * cp-tree.h (prepare_assemble_variable): New.
1662 2003-06-23  Andrew Pinski <pinskia@physics.uc.edu>
1664         * method.c: add prototype for make_alias_for_thunk.
1665         (thunk_labelno, make_alias_for_thunk): only define
1666         if ASM_OUTPUT_DEF is defined.
1668 2003-06-23  Jakub Jelinek  <jakub@redhat.com>
1670         * method.c (thunk_labelno): New variable.
1671         (make_alias_for_thunk): New function.
1672         (use_thunk): Use it if defined ASM_OUTPUT_DEF.  Put the thunk
1673         into the same section as the function it is calling.
1674         Include gt-cp-method.h.
1675         * Make-lang.in (gt-cp-method.h): Depend on s-gtype.
1676         (cp/method.o): Depend on gt-cp-method.h.
1677         * config-lang.in (gtfiles): Add $(srcdir)/cp/method.c.
1679 Mon Jun 23 19:41:27 CEST 2003  Jan Hubicka  <jh@suse.cz>
1681         * decl.c (register_dtor_fn): Mark cleanup as used.
1682         * decl2.c (mark_vtable_entries): Skip nops.
1683         * rtti.c (get_tinfo_ptr): Mark tinfo as used.
1684         (build_dynamic_cast_1): Likewise.
1685         (tinfo_base_init): Likewise.
1686         (emit_tinfo_decl): Likewise.
1688 2003-06-23  Jakub Jelinek  <jakub@redhat.com>
1690         * mangle.c (hash_type): Val is the TREE_LIST itself, not a pointer
1691         to it.
1693 2003-06-21  Gabriel Dos Reis <gdr@integrable-solutions.net>
1695         PR c++/10784
1696         * call.c (joust): Warn about choosing conversion sequence only if
1697         -Wconversion.
1699 2003-06-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1701         PR c++/10864
1702         * call.c (op_error): Tidy.
1703         * error.c (dump_expr): Properly format 'T()' when T is an
1704         aggregate type.
1706 2003-06-21  Gabriel Dos Reis <gdr@integrable-solutions.net>
1708         PR c++/10915
1709         * decl.c (grok_op_properties): Warn possible confusing conversion
1710         only if -Wconversion.
1712 2003-06-20  Mark Mitchell  <mark@codesourcery.com>
1714         PR c++/10749
1715         * parser.c (cp_parser_class_head): See through dependent names
1716         when parsing a class-head.
1718         PR c++/10845
1719         * pt.c (try_class_unification): Correct handling of member class
1720         templates.
1722 2003-06-20  Nathan Sidwell  <nathan@codesourcery.com>
1724         * semantics.c (genrtl_finish_function): Adjust
1725         expand_function_end call.
1727 2003-06-19  Mark Mitchell  <mark@codesourcery.com>
1729         PR c++/10939
1730         * pt.c (tsubst_decl): Do not try to substitute into non-dependent
1731         functions.
1732         (value_dependent_expression_p): Correct logic for FUNCTION_DECLs.
1734         PR c++/9649
1735         * cp-tree.h (pushdecl_class_level): Change prototype.
1736         (push_class_level_binding): Likewise.
1737         * decl.c (add_binding): Reject duplicate static data members.
1738         (pushdecl_class_level): Return a value indicating whether or not
1739         the binding was valid.
1740         (push_class_level_binding): Likewise.
1741         * semantics.c (finish_member_declaration): Don't keep invalid
1742         declarations.
1744         PR c++/11041
1745         * call.c (initialize_reference): Do not use cp_finish_decl to emit
1746         temporary variables.
1747         * cp-tree.h (static_aggregates): Declare.
1748         (pushdecl_top_level_and_finish): Likewise.
1749         * decl.c (pushdecl_top_level_1): New function.
1750         (pushdecl_top_level): Use it.
1751         (pushdecl_top_level_and_finish): New function.
1752         (initialize_local_var): Remove redundant code.
1753         (cp_finish_decl): Remove support for RESULT_DECLs.  Don't check
1754         building_stmt_tree.
1755         * decl.h (static_aggregates): Remove.
1756         * decl2.c (get_guard): Use pushdecl_top_level_and_finish.
1757         * rtti.c (get_tinfo_decl): Use pushdecl_top_level_and_finish.
1758         (tinfo_base_init): Likewise.
1760 2003-06-19  Matt Austern  <austern@apple.com>
1762         PR c++/11228
1763         * init.c (build_zero_init): Assert that number of array elements
1764         is an integer constant.
1765         (build_default_init) Don't use build_zero_init for arrays with
1766         variable number of elements.
1768 2003-06-19  Andreas Jaeger  <aj@suse.de>
1770         * cp-tree.h: Remove duplicated declarations.
1772 2003-06-18  Nathanael Nerode  <neroden@gcc.gnu.org>
1774         * pt.c: Convert to ISO C.
1775         * semantics.c: Convert to ISO C.
1777 2003-06-18  Nathan Sidwell  <nathan@codesourcery.com>
1779         * cp-tree.h (comp_except_specs, compparms, cp_has_mutable_p,
1780         at_least_as_qualified_p, more_qualified_p): Return bool.
1781         * typeck.c: ANSIFY function definitions.
1782         (comp_array_types): Take redeclaration bool parameter.
1783         (comptypes): Rearrange STRICT handling.
1784         (at_least_as_qualified_p, more_qualified_p,
1785         comp_cv_qualification): Cache cv quals.
1786         (compparms): Rearrange loop.
1788 2003-06-18  Nathan Sidwell  <nathan@codesourcery.com>
1790         * cp-tree.h (COMPARE_RELAXED): Rename to ...
1791         (COMPARE_DERIVED): ... here. Adjust comment.
1792         (resolve_typename_type_in_current_instantiation): Remove.
1793         (cp_tree_equal, comptypes): Return a bool.
1794         * cvt.c (convert_to_reference): Adjust comptypes call.
1795         * pt.c (template_args_equal, unify,): Adjust cp_tree_equal call.
1796         (resolve_typename_type_in_current_instantiation): Remove.
1797         * tree.c (cp_tree_equal): Return bool. Cope with TEMPLATE_DECLs and
1798         IDENTIFIER_NODEs. Abort if undeciderable. Adjust recursive
1799         calls. Refactor code.
1800         * typeck.c (comp_array_types): Return bool. Lose callback.
1801         parameter. Adjust cp_tree_equal calls.
1802         (comptypes): Return bool. Adjust strict handling. Remove relaxed
1803         enumeration and java type handling. Deal with typename types here.
1804         Adjust recursive and cp_tree_equals calls. Adjust base and derived
1805         checking.
1806         (comp_target_types): Remove unreachable code. Adjust
1807         same_or_base_type_p calls.
1808         (ptr_reasonably_similar): Adjust base and derived check.
1810         * typeck.c (maybe_warn_about_returning_address_of_local): Remove
1811         unused calculation.
1812         (check_return_expr): Adjust error messages.
1813         * cp-tree.def (SCOPE_REF): Correct comment.
1815 2003-06-17  Mark Mitchell  <mark@codesourcery.com>
1817         * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
1818         string again.
1820 2003-06-17  Robert Abeles  <rabeles@archaelogic.com>
1822         * optimize.c (dump_function): Form complete flag name by
1823         prefixing 'fdump-' to string returned by dump_flag_name().
1825 2003-06-17  Mark Mitchell  <mark@codesourcery.com>
1827         * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
1828         string.
1830 2003-06-17  Jason Merrill  <jason@redhat.com>
1832         PR c++/10929
1833         * decl.c (grokfndecl): Don't mark a function inline for
1834         -finline-functions if it isn't defined.
1836 2003-06-17  Mark Mitchell  <mark@codesourcery.com>
1838         PR c++/10712
1839         * class.c (handle_using_decl): Robustify.
1841         PR c++/11105
1842         * cp-tree.h (DECL_CONV_FN_TYPE): New method.
1843         * mangle.c (struct globals): Remove internal_mangling_p.
1844         (write_unqualified_name): Use DECL_CONV_FN_TYPE.
1845         (write_template_parm): Don't write out the level number.
1846         (conv_type_names): New variable.
1847         (hash_type): New function.
1848         (compare_type): Likewise.
1849         (mangle_conv_op_name_for_type): Don't try to mangle conversion
1850         operator names.
1851         * search.c (lookup_conversion_operator): New function.
1852         (lookup_fnfields_1): Use it.
1854 2003-06-17  Andreas Jaeger  <aj@suse.de>
1856         * except.c: Remove duplicate declaration of push_eh_cleanup.
1858         * call.c: Remove extra declaration of inhibit_warnings.
1860 2003-06-16  Nathanael Nerode  <neroden@gcc.gnu.org>
1862         2003-06-16  Jens-Michael Hoffmann  <jensmh@gmx.de>
1863         * mangle.c: Convert to ISO C.
1865 2003-06-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1867         * cp/decl.c, cp/pt.c, cp/search.c, cp/tree.c: Don't use the PTR
1868         macro.
1870 2003-06-16  Nathanael Nerode  <neroden@gcc.gnu.org>
1872         * tree.c: Convert to ISO C.
1874 2003-06-16  Kazu Hirata  <kazu@cs.umass.edu>
1876         * cp-tree.h: Follow spelling conventions.
1877         * mangle.c: Likewise.
1878         * method.c: Likewise.
1879         * parser.c: Likewise.
1881 2003-06-14  Nathan Sidwell  <nathan@codesourcery.com>
1883         * decl.c (start_function): Adjust init_function_start call.
1884         * method.c (use_thunk): Likewise.
1885         * semantics.c (genrtl_start_function): Likewise.
1887 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
1889         * Make-lang.in: Remove c-options.o.
1891 2003-06-13  Nathanael Nerode  <neroden@gcc.gnu.org>
1893         * lex.c: Convert to ISO C.
1895         2003-05-19  Jens-Michael Hoffmann  <jensmh@gmx.de>
1896         * init.c: removes use of PARAMS macro.  Use ISO style function
1897         declarations.  (Not copyright-significant change.)
1899         * rtti.c: Remove PARAMS.
1901         * typeck2.c: Convert to ISO C.
1903 2003-06-12  Mark Mitchell  <mark@codesourcery.com>
1905         PR c++/10635
1906         * typeck.c (build_c_cast): Check that the destination type is
1907         complete.
1909 2003-06-11  Mark Mitchell  <mark@codesourcery.com>
1911         PR c++/10432
1912         * cp-tree.h (finish_declarator): Remove.
1913         * decl.c (cp_finish_decl): Make sure to pop_nested_class even for
1914         erroneous declarations.
1915         * semantics.c (finish_declarator): Remove.
1917 2003-06-11  Roger Sayle  <roger@eyesopen.com>
1919         * decl2.c (generate_ctor_or_dtor_function): Avoid expanding a
1920         global static constructor/destructor if it will be empty, i.e.
1921         either doesn't call any ctors/dtors or only calls pure or const
1922         ctors/dtors.
1924 2003-06-11  Mark Mitchell  <mark@codesourcery.com>
1926         * mangle.c (tm_p.h): Include it.
1927         * Make-lang.in (cp/mangle.o): Depend on $(TM_P_H).
1929         PR c++/11131
1930         * tree.c (cp_cannot_inline_fn): Check for "inline" before
1931         instantiation.
1933 2003-06-10  Jason Merrill  <jason@redhat.com>
1935         PR c++/10968
1936         * pt.c (mark_decl_instantiated): Clear DECL_COMDAT.
1938 2003-06-10  Andrew Pinski  <pinskia@physics.uc.edu>
1940         * decl.c (start_cleanup_fn): Move static 'counter' out, mark with GTY.
1941         (start_cleanup_cnt): New.
1943 2003-06-10  Mark Mitchell  <mark@codesourcery.com>
1945         PR c++/11131
1946         * cp-tree.h (template_for_substitution): Declare.
1947         * decl2.c (mark_used): Use it when figuring out whether or not a
1948         function is inline.
1949         * pt.c (template_for_substitution): Give it external linkage.
1950         * tree.c (cp_cannot_inline_tree_fn): Instantiate as early as
1951         possible.
1953 2003-06-09  Zack Weinberg  <zack@codesourcery.com>
1955         PR 8861
1956         * mangle.c (write_real_cst): New function.  Implement
1957         ABI-compliant mangling of floating-point literals when
1958         -fabi-version>=2; provide backward compatibility with 3.3 when
1959         -fabi-version=1 (with warning).  Clarify commentary.
1960         (write_template_arg_literal): Use write_real_cst.
1962 2003-06-07  Andreas Jaeger  <aj@suse.de>
1964         * cp/decl.c (xref_tag): Remove undefined macro NONNESTED_CLASSES.
1966 2003-06-07  Neil Booth  <neil@daikokuya.co.uk>
1968         * cp-lang.c (LANG_HOOKS_DECODE_OPTON): Drop.
1969         (LANG_HOOKS_HANDLE_OPTION): Override.
1970         * cp-tree.h (cxx_init_options): Update.
1971         * lex.c (cxx_init_options): Update.
1973 Thu Jun  5 18:33:40 CEST 2003  Jan Hubicka  <jh@suse.cz>
1975         * Make-lang.in:  Add support for stageprofile and stagefeedback
1977 2003-06-04  J"orn Rennecke <joern.rennecke@superh.com>
1979         * decl.c (grokdeclarator): Error_mark_node in, error_mark_node out.
1981 2003-06-04  Andreas Jaeger  <aj@suse.de>
1983         * g++spec.c (lang_specific_driver): Remove ALT_LIBM usage.
1985 2003-06-03  Jason Merrill  <jason@redhat.com>
1987         * cp/cp-tree.h (CP_AGGREGATE_TYPE_P): Accept vectors.
1989         * cp/decl.c (reshape_init): Handle vectors.
1991         * testsuite/g++.dg/init/array10.C: New.
1993 2003-06-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1995         PR c++/10940
1996         * pt.c (check_explicit_specialization): Check for 'static'
1997         earlier.
1999 2003-05-31  Diego Novillo  <dnovillo@redhat.com>
2001         * class.c (dump_array): Call CONSTRUCTOR_ELTS to access
2002         the operand of a CONSTRUCTOR node.
2004 2003-05-31  Gabriel Dos Reis <gdr@integrable-solutions.net>
2006         * decl.c (cp_binding_level::this_entity): Rename from this_class.
2007         (cxx_scope_descriptor): New function.
2008         (cxx_scope_debug): Likewise.
2009         (push_binding_level): Use it.
2010         (pop_binding_level): Likewise.
2011         (suspend_binding_level): Likewise.
2012         (resume_binding_level): Likewise.
2013         (pushlevel_class): Adjust use of this_class.
2014         (pushtag): Likewise.
2015         (lookup_name_real): Likewise.
2016         (global_scope_name): New variable.
2017         (initialize_predefined_identifiers): Initialize it.
2018         (push_namespace): Use it.
2019         (make_cxx_scope): New function.
2020         (pushlevel): Use it.
2021         (pushlevel_class): Likewise.
2022         (push_binding_level): Simplify.  Loose the last two arguments.
2023         (make_binding_level): Remove.
2024         (initial_push__namespace_scope): New function.
2025         (push_namespace): Use it.  Simplify.
2026         (cxx_init_decl_processing): Likewise.
2027         (declare_namespace_level): Remove.
2029 2003-05-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2031         PR c++/10956
2032         * pt.c (instantiate_decl): Don't use full template arguments if
2033         we are dealing with specializations.
2035 2003-05-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2037         * decl.c (ENABLE_SCOPE_CHECKING): Rename from DEBUG_BINDING_LEVELS.
2038         (binding_depth): Unconditionally define.
2039         (is_class_level): Likewise.
2040         (indent): Likewise.  Take an indenting parameter.
2041         (push_binding_level): Remove conditional definittion.
2042         (pop_binding_level): Likewise.
2043         (suspend_binding_level): Likewise.
2044         (resume_binding_level): Likewise.
2045         (pushlevel): Likewise.
2046         (pushlevel_class): Likewise.
2047         (poplevel_class): Likewise.
2048         (pop_everything): Likewise.
2050 2003-05-27  Gabriel Dos Reis <gdr@integrable-solutions.net>
2052         * name-lookup.h (global_scope_p): New macro.
2053         * decl.c (pop_binding_level): Use it.  Don't refer directly to
2054         global_binding_level.
2055         (suspend_binding_level): Likewise.
2056         (global_bindings_p): Likewise.
2057         (print_other_binding_stack): Likewise.
2058         (print_binding_stack): Likewise.
2059         (maybe_push_to_top_level): Likewise.
2060         (pushdecl_namespace_level): Likewise.
2061         (cxx_init_decl_processing): Likewise.
2062         (start_decl): Likewise.
2063         (cp_finish_decl): Likewise.
2064         (start_function): Likewise.
2065         (global_binding_level): Remove.
2067 2003-05-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2069         * parser.c (cp_parser_explicit_instantiation): Restore old
2070         access before template instantiation.
2072 2003-05-23  Geoffrey Keating  <geoffk@apple.com>
2074         * lang-specs.h: Use -o to specify preprocessor's output file.
2075         Make -no-integrated-cpp work when building PCH files.
2077 2003-05-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2079         PR c++/10682
2080         * pt.c (instantiate_class_template): Use DECL_ARTIFICIAL to
2081         check for implicitly created typedef to an enum.
2083 2003-05-21  Jason Merrill  <jason@redhat.com>
2085         * init.c (build_vec_delete): Copy the address into a temporary
2086         variable before calling build_vec_delete_1.
2087         * decl2.c (delete_sanity): Don't call stabilize_reference.
2089 2003-05-21  Nathan Sidwell  <nathan@codesourcery.com>
2091         * pt.c (register_specialization): Update the decl's location,
2092         if necessary.
2093         (check_explicit_specialization): Likewise.
2095 2003-05-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2097         * error.c (dump_expr): Use HOST_WIDE_INT_PRINT_DOUBLE_HEX.
2099 2003-05-21  Danny Smith  <dannysmith@users.sourceforge.net>
2101         PR c++/9738
2102         * decl.c (duplicate_decls): Re-invoke make_decl_rtl
2103         if the old decl had instantiated DECL_RTL.
2104         (Base on Richard Henderson 2003-05-13 patch to c-decl.c).
2106 2003-05-19  Matt Austern  <austern@apple.com>
2108         * lang-options.h: Document -Wno-invalid-offsetof
2109         * typeck.c (build_class_member_access_expr): Don't complain about
2110         (Foo *)p->x for non-POD Foo if warn_invalid_offset is zero.
2112 2003-05-18 Andrew Pinski <pinskia@physics.uc.edu>
2114         * name-lookup.c (free_binding_entry): fix where the GTY markers are.
2115         (binding_entry_make): Make entry->chain NULL after getting an entry.
2116         fix the spelling of chain in a comment.
2117         (binding_table_free): speed up by having temporary variable.
2118         (binding_table_new): set table->chain to be NULL after allocating
2119         a table.
2120         (cxx_binding_make): use gcc_alloc instead of ggc_alloc_cleared and set
2121         binding->previous to NULL after getting an binding for speed.
2123 2003-05-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2125         * cp-tree.h (struct lang_type_class): Replace data member tags
2126         with hash-table nested_udts.
2127         (CLASSTYPE_NESTED_UTDS): Rename from CLASSTYPE_TAGS.
2128         * class.c (unreverse_member_declarations): Don't touch
2129         CLASSTYPE_TAGS.
2130         (pushclass): Use cxx_remember_type_decls.
2131         * decl.c (struct cp_binding_level): Replace data member tags with
2132         hash-table type_decls.
2133         (pop_binding_level): Handle level->type_decls.
2134         (kept_level_p): Adjust.
2135         (poplevel): Remove unused local variable.
2136         (bt_print_entry): New function.
2137         (print_binding_level): Use it.
2138         (push_namespace): Build current_binding_level->type_decls.
2139         (maybe_process_template_type_declaration): Adjust.
2140         (pushtag): Likewise.
2141         (clear_anon_tags): Use binding_table_remove_anonymous_types.
2142         (gettags): Remove.
2143         (cxx_remember_type_decls):  Rename from storetags.  Adjust.
2144         (lookup_tag): Use binding_table_find_anon_type.  Tidy.
2145         (lookup_tag_reverse): Use binding_table_reverse_maybe_remap.
2146         (cxx_init_decl_processing): Build global_binding_level->type_decls.
2147         (store_parm_decls): Remove pointless code.
2148         * name-lookup.c (free_binding_entry): New variable.
2149         (ENTRY_INDEX): New macro.
2150         (struct binding_table_s): New datatype.
2151         (binding_entry_make): New function.
2152         (binding_entry_free): Likewise.
2153         (binding_table_construct): Likewise.
2154         (binding_table_free): Likewise.
2155         (binding_table_new): Likewise.
2156         (binding_table_expand): Likewise.
2157         (binding_table_insert): Likewise.
2158         (binding_table_find): Likewise.
2159         (binding_table_find_anon_type): Likewise.
2160         (binding_table_reverse_maybe_remap): Likewise.
2161         (binding_table_remove_anonymous_types): Likewise.
2162         (binding_table_foreach): Likewise.
2163         * name-lookup.h (binding_table): New type.
2164         (binding_entry): Likewise.
2165         (bt_foreach_proc): Likewise.
2166         (struct binding_entry_s): New datatype.
2167         (SCOPE_DEFAULT_HT_SIZE): New macro.
2168         (CLASS_SCOPE_HT_SIZE): Likewise.
2169         (NAMESPACE_ORDINARY_HT_SIZE): Likewise.
2170         (NAMESPACE_STD_HT_SIZE): Likewise.
2171         (GLOBAL_SCOPE_HT_SIZE): Likewise.
2172         (binding_table_new): Declare.
2173         (binding_table_free): Likewise.
2174         (binding_table_insert): Likewise.
2175         (binding_table_find_anon_type): Likewise.
2176         (binding_table_reverse_maybe_remap): Likewise.
2177         (binding_table_remove_anonymous_types): Likewise.
2178         (binding_table_foreach): Likewise.
2179         (binding_table_find): Likewise.
2180         (cxx_remember_type_decls): Likewise.
2181         * pt.c (bt_instantiate_type_proc): New function.
2182         (do_type_instantiation): Use it.
2183         * search.c (lookup_field_r): Use binding_table_find.
2185 2003-05-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2187         * semantics.c (perform_deferred_access_checks): Don't discard
2188         checked access.
2190 2003-05-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2192         * error.c (cp_error_at, cp_warning_at, cp_pedwarn_at): Eliminate
2193         libiberty VA_ macros, always use stdarg.
2194         * rtti.c (create_pseudo_type_info): Likewise.
2195         * tree.c (build_min_nt, build_min): Likewise.
2197 2003-05-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2199         * ptree.c (cxx_print_type, cxx_print_xnode): Use string
2200         concatentation on HOST_WIDE_INT_PRINT_* format specifier to
2201         collapse multiple function calls into one.
2202         * tree.c (debug_binfo): Likewise.
2204 2003-05-15  Jason Merrill  <jason@redhat.com>
2206         PR c++/5388
2207         * call.c (conditional_conversion): Don't consider implicit
2208         conversions if T2 is a base of T1.
2209         * cp-tree.h (DERIVED_FROM_P, UNIQUELY_DERIVED_FROM_P): Make boolean.
2210         (ACCESSIBLY_UNIQUELY_DERIVED_P, PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
2212         * parser.c (cp_parser_primary_expression): Convert a static data
2213         member from reference.
2215 2003-05-15  Mark Mitchell  <mark@codesourcery.com>
2217         * call.c (build_op_delete_call): Avoid creating unnecessary types.
2218         * class.c (instantiate_type): Remove tests for tf_no_attributes.
2219         * cp-tree.h (tsubst_flags_t): Remove tf_no_attributes.
2220         (COMPARE_NO_ATTRIBUTES): Remove.
2221         * typeck.c (comptypes): Do not check COMPARE_NO_ATTRIBUTES.
2223         PR c++/8385
2224         * semantics.c (finish_typeof): Refine type-dependency check.
2226 2003-05-13  Jason Merrill  <jason@redhat.com>
2228         * typeck.c (build_modify_expr): Don't always stabilize the lhs and
2229         rhs.  Do stabilize the lhs of a MODIFY_EXPR used on the lhs.
2231 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2233         * method.c (synthesize_method): Call push/pop_deferring_access_checks.
2235 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2237         PR c++/10230, c++/10481
2238         * semantics.c (finish_non_static_data_member): Handle when the
2239         non-static member is not from a base of the current class type.
2241 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2243         PR c++/10552
2244         * pt.c (tsubst_copy): Handle TEMPLATE_DECL that is a member class
2245         template and has dependent context.
2247 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2249         * pt.c (instantiate_decl): Call push/pop_deferring_access_checks.
2251 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2253         PR c++/9252
2254         * cp-tree.h (saved_scope): Remove check_access field.
2255         (tsubst_flags_t): Remove tf_parsing.
2256         * decl.c (maybe_push_to_top_level): Don't initialize
2257         scope_chain->check_access.
2258         (make_typename_type, make_unbound_class_template): Don't use
2259         tf_parsing.
2260         (register_dtor_fn): Use push/pop_deferring_access_checks
2261         instead of scope_chain->check_access.
2262         * method.c (use_thunk): Likewise.
2263         * parser.c (cp_parser_explicit_instantiation
2264         (cp_parser_constructor_declarator_p): Don't call
2265         push/pop_deferring_access_checks here.
2266         (cp_parser_template_argument, cp_parser_class_name): Don't use
2267         tf_parsing.
2268         (yyparse): Check flag_access_control.
2269         * pt.c (instantiate_class_template): Call
2270         push/pop_deferring_access_checks.
2271         * semantics.c (push_deferring_access_checks): Propagate
2272         dk_no_check.
2273         (perform_or_defer_access_check): Make sure basetype_path is
2274         a type before comparison.
2275         * call.c (build_op_delete_call, build_over_call): Use
2276         perform_or_defer_access_check.
2277         * class.c (alter_access): Likewise.
2278         * init.c (build_offset_ref): Likewise.
2279         * lex.c (do_identifier): Likewise.
2280         * method.c (hack_identifier): Likewise.
2281         * search.c (lookup_member): Likewise.
2282         * semantics.c (finish_non_static_data_member): Likewise.
2283         (simplify_aggr_init_exprs_r): Use push/pop_deferring_access_checks
2284         instead of flag_access_control.
2286 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2288         PR c++/9554
2289         * parser.c (cp_parser_class_name): Remove check_access parameter.
2290         All caller adjusted.  Update declaration.
2291         (cp_parser_lookup_name): Likewise.
2292         * semantics.c (push_deferring_access_checks): Change parameter type
2293         to enum deferring_kind.  All caller adjusted.
2294         (resume_deferring_access_checks): Adjust to use new enum.
2295         (stop_deferring_access_checks): Likewise.
2296         (perform_or_defer_access_check): Likewise.
2297         * cp-tree.h (deferring_kind): New enum.
2298         (deferred_access): Adjust field type.
2299         (push_deferring_access_checks): Update declaration.
2301 2003-05-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2303         PR c++/10555, c++/10576
2304         * pt.c (lookup_template_class): Handle class template with
2305         multiple levels of parameters when one of the levels contain
2306         errors.
2308 2003-05-08  Jason Merrill  <jason@redhat.com>
2310         * init.c (build_new_1): Don't reuse a TARGET_EXPR in an
2311         expression.  Undo some of the recent reorg.
2313 2003-05-07  Richard Henderson  <rth@redhat.com>
2315         PR c++/10570
2316         * cfns.gperf: Comment out POSIX thread cancellation points,
2317         plus abort and raise.
2318         * cfns.h: Regenerate.
2320 2003-05-07  Jason Merrill  <jason@redhat.com>
2322         * call.c (build_conditional_expr): Don't assume that the folded
2323         expression has result_type.
2325 2003-05-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2327         * typeck.c (build_unary_op): Deal with const qualifier in
2328         invalid pointer-to-member earlier.
2330 2003-05-05  Jason Merrill  <jason@redhat.com>
2332         PR c++/9537
2333         * call.c (conditional_conversion): Build an RVALUE_CONV if
2334         we're just changing the cv-quals.
2335         (build_conditional_expr): Don't call convert to change
2336         cv-quals.
2338 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2340         PR c++/10496
2341         * typeck.c (build_unary_op): Don't output const qualifier when
2342         output invalid pointer-to-member diagnostics.
2344 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2346         * decl.c: Fix typos.
2348 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2350         PR c++/4494
2351         * decl.c (start_function): Use same_type_p to check return type
2352         of main.
2354 2003-05-03  Zack Weinberg  <zack@codesourcery.com>
2356         PR c/10604
2357         * cp/typeck.c (build_x_compound_expr): No need to check
2358         extra_warnings as well as warn_unused_value.
2360 2003-05-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2362         PR c++/9364, c++/10553, c++/10586
2363         * decl.c (make_typename_type): Don't crash on illegal code.
2365 2003-05-03  Nathan Sidwell  <nathan@codesourcery.com>
2367         * class.c (finish_struct): Use location_t and input_location
2368         directly.
2369         * decl.c (make_label_decl): Likewise.
2370         (use_label): Likewise.
2371         * decl2.c (warn_if_unknown_interface): Likewise.
2372         (start_static_initialization_or_destruction): Likewise.
2373         (generate_ctor_or_dtor_function): Likewise.
2374         (finish_file): Likewise.
2375         * error.c (print_instantiation_full_context): Likewise.
2376         * init.c (create_temporary_var): Likewise.
2377         * method.c (synthesize_method): Likewise.
2378         * parser.c (cp_token): Likewise.
2379         (cp_lexer_set_source_position_from_token): Likewise.
2380         (cp_lexer_get_preprocessor_token): Likewise.
2381         (cp_parser_statement): Likewise.
2382         * pt.c (tsubst_friend_function): Likewise.
2383         (instantiate_class_template): Likewise.
2384         (tsubst_decl): Likewise.
2385         (tsubst): Likewise.
2386         (instantiate_decl): Likewise.
2387         * semantics.c (begin_class_definition): Likewise.
2388         (expand_body): Likewise.
2390 2003-05-01  Nathan Sidwell  <nathan@codesourcery.com>
2392         * class.c (finish_struct): Rename lineno to input_line.
2393         * decl.c (push_binding_level, pop_binding_level,
2394         suspend_binding_level, resume_binding_level, make_label_decl,
2395         use_label, start_function): Likewise.
2396         * decl2.c (warn_if_unknown_interface,
2397         start_static_initialization_or_destruction,
2398         generate_ctor_or_dtor_function, finish_file): Likewise.
2399         * error.c (cp_line_of, print_instantiation_full_context,
2400         print_instantiation_context): Likewise.
2401         * except.c (check_handlers_1, check_handlers): Likewise.
2402         * init.c (create_temporary_var): Likewise.
2403         * method.c (use_thunk, synthesize_method): Likewise.
2404         * parser.c (cp_lexer_set_source_position_from_token,
2405         cp_lexer_get_preprocessor_token): Likewise.
2406         * pt.c (push_tinst_level, pop_tinst_level,
2407         tsubst_friend_function, instantiate_class_template, tsubst_decl,
2408         tsubst, tsubst_expr, instantiate_decl): Likewise.
2409         * semantics.c (genrtl_try_block, finish_label_stmt,
2410         begin_class_definition, expand_body,
2411         genrtl_finish_function): Likewise.
2412         * tree.c (build_min_nt, build_min): Likewise.
2414 2003-05-01  Mark Mitchell  <mark@codesourcery.com>
2416         * decl2.c (comdat_linkage): Don't externalize explicit
2417         instantiations.
2419 2003-05-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2421         PR c++/10554
2422         * decl2.c (do_class_using_decl): Check if operand 0 of SCOPE_REF
2423         is not NULL.
2425 2003-05-01  Steven Bosscher  <steven@gcc.gnu.org>
2427         * cp-tree.h (struct lang_id2): Remove.  Move fields from here...
2428         (struct lang_identifier): ... to here.
2429         (LANG_ID_FIELD): Remove.
2430         (SET_LANG_ID): Remove.
2431         (IDENTIFIER_LABEL_VALUE): Adjust for new lang_identifier.
2432         (SET_IDENTIFIER_LABEL_VALUE): Likewise.
2433         (IDENTIFIER_IMPLICIT_DECL): Likewise.
2434         (SET_IDENTIFIERL_IMPLICIT_DECL): Likewise.
2435         (IDENTIFIER_ERROR_LOCUS): Likewise.
2436         (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
2438 2003-05-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2440         PR c++/8772
2441         * pt.c (convert_template_argument): Correct diagnostic.
2443 2003-04-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2445         PR c++/9432, c++/9528
2446         * decl2.c (validate_nonmember_using_decl): Handle SCOPE_REF.
2448 2003-04-30  Garbiel Dos Reis  <gcc@integrable-solutions.net>
2450         * decl.c (check_previous_goto_1): Adjust prototype.
2451         (check_previous_goto): Adjust use.
2452         (check_switch_goto): Likewise.
2453         (use_label): Adjust.
2454         (check_previous_goto_1): Don't use pedwarn_with_file_and_line.
2455         (struct named_label_use_list): Use location_t datatype.
2457 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
2459         PR c++/10551
2460         * pt.c (mark_decl_instantiated): Defer all explicit instantiations
2461         that have not yet been written out.
2463 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
2465         PR c++/10549
2466         * class.c (layout_class_type): Mark overlong bitfields as having
2467         the maximum size permitted by their type, after layout.
2469         PR c++/10527
2470         * error.c (dump_expr): Correctly handling of NEW_EXPR.4
2472 2003-04-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2474         * call.c (build_operator_new_call): Fix typo.
2475         * lang-options.h: Likewise.
2477 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
2479         PR c++/10515
2480         * cp-tree.h (lookup_field_1): Declare it.
2481         * search.c (lookup_field_1): Make it public.
2482         * decl.c (reshape_init): Handle designated initializers.
2484         * decl.c (maybe_commonize_var): Further tweak support for systems
2485         without weak symbols.
2487 2003-04-27  Mark Mitchell  <mark@codesourcery.com>
2489         * decl.c (maybe_commonize_var): Fix thinko in last patch.
2491 2003-04-27  Mark Mitchell  <mark@codesourcery.com>
2493         PR c++/10506
2494         * method.c (use_thunk): Decrement immediate_size_expand.
2496         PR c++/10503
2497         * cp-tree.h (DECL_VAR_MARKED_P): New macro.
2498         (DECL_MAYBE_TEMPLATE): Remove.
2499         * class.c (fixed_type_or_null): Avoid infinite recursion.
2501         * decl.c (maybe_commonize_var): Make the code match the comments.
2502         * pt.c (instantiate_decl): Move call to import_export_decl.
2504 2003-04-26  Mark Mitchell  <mark@codesourcery.com>
2506         * decl2.c (finish_file): Fix merge botch.
2508 2003-04-25  Mark Mitchell  <mark@codesourcery.com>
2510         * decl2.c (finish_file): Don't call import_export_decl for
2511         functions that are not defined.
2512         (handle_class_head): Robustify.
2513         * pt.c (instantiate_decl): Do not call cp_finish_decl for
2514         variables that are not defined.
2516 2003-04-24  Sylvain Pion  <Sylvain.Pion@mpi-sb.mpg.de>
2518         * call.c (print_z_candidates): Fix off by one error.
2520 2003-04-24  Nathan Sidwell  <nathan@codesourcery.com>
2522         PR c++/10337
2523         * call.c (joust): Don't warn about conversion ops that are exact
2524         or cv-conversions. Rearrange to avoid multiple type comparisons.
2526 2003-04-23  Mark Mitchell  <mark@codesourcery.com>
2528         PR c++/10471
2529         * call.c (build_cxx_call): Robustify.
2531 2003-04-23  Neil Booth  <neil@daikokuya.co.uk>
2533         * Make-lang.in (lex.o): Remove mbchar.h.
2534         * lex.c (MULTIBYTE_CHARS): Lose.
2535         * parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled
2536         in c-lex.c.
2538 2003-04-23  Mark Mitchell  <mark@codesourcery.com>
2540         PR c++/9847
2541         * cp-tree.h (duplicate_tag_error): Remove.
2542         * class.c (duplicate_tag_error): Remove.
2543         * semantics.c (begin_class_definition): Return immediately for a
2544         duplicate class definition.
2546         PR c++/10451
2547         * decl.c (grokdeclarator): Correct logic for "mutable" errors.
2549 2003-04-22  Mark Mitchell  <mark@codesourcery.com>
2551         PR c++/10446
2552         * search.c (lookup_fnfields_1): Handle empty slots in the method
2553         vector.
2555         PR c++/10428
2556         * decl.c (check_elaborated_type_specifier): New function, split
2557         out from ...
2558         (xref_tag): ... here.  Use the new function in more places.
2560         * rtti.c (throw_bad_typeid): Use build_cxx_call.
2562 2003-04-21  Mark Mitchell  <mark@codesourcery.com>
2564         * call.c (build_over_call): Use build_cxx_call.
2565         (build_cxx_call): New method, split out of build_over_call.
2566         * cp-tree.h (language_function): Add can_throw.
2567         (build_cxx_call): Declare it.
2568         * decl.c (finish_function): If a function does not contain any
2569         calls to functions that can throw an exception, indicate that
2570         fact.
2571         * decl2.c (mark_used): Do not defer the instantiation of
2572         functions, if the current function does not throw.
2573         * optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones.
2574         * pt.c (instantiate_decl): Make sure import_export_decl is called
2575         before emitting things.
2576         * rtti.c (throw_bad_cast): Use build_cxx_call.
2577         (build_dynamic_cast_1): Likewise.
2578         * typeck.c (build_function_call): Likewise.
2580 2003-04-21  Nathan Sidwell  <nathan@codesourcery.com>
2582         PR c++/9881
2583         * typeck.c (build_unary_op): Fold all COMPONENT_REF addr
2584         expressions. Reverts my 2002-08-08 patch.
2586         * typeck.c (comp_ptr_ttypes_real): Swap final && operands for
2587         cheaper early exit.
2589 2003-04-20  Nathan Sidwell  <nathan@codesourcery.com>
2591         * cp/decl2.c (start_static_storage_duration_function): Take count
2592         arg, don't check if it wraps round.
2593         (generate_ctor_or_dtor_function): Add locus arg, use it.
2594         (generate_ctor_and_dtor_functions_for_priority): Data arg is a
2595         locus.
2596         (finish_file): Set line numbers to past EOF for synthesized
2597         functions.
2599 2003-04-20  Nathan Sidwell  <nathan@codesourcery.com>
2601         PR c++/10405
2602         * search.c (lookup_field_1): Final scan goes backwards for
2603         types, forwards for non-types.
2605 2003-04-17  Roger Sayle  <roger@eyesopen.com>
2607         PR c/10375
2608         * decl.c (duplicate_decls): Preserve "const", "noreturn" and
2609         "nothrow" function attributes.
2611 2003-04-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2613         PR c++/10347
2614         * pt.c (type_dependent_expression_p): Handle array new.
2616 2003-04-15  Mark Mitchell  <mark@codesourcery.com>
2618         PR c++/10381
2619         * parser.c (cp_parser_primary_expression): Reorganize logic for
2620         dealing with name lookup failures.
2622 2003-04-15  Jason Merrill  <jason@redhat.com>
2624         * decl2.c (mark_used): Don't instantiate anything if
2625         skip_evaluation.
2627 2003-04-14  Ziemowit Laski  <zlaski@apple.com>
2629         * tree.c (build_cplus_array_type_1): Do not call
2630         uses_template_parms() on a NULL index_type.
2632 2003-04-13  Roger Sayle  <roger@eyesopen.com>
2634         * decl.c (duplicate_decls): Preserve pure and malloc attributes.
2636 2003-04-12  Mark Mitchell  <mark@codesourcery.com>
2638         PR c++/10300
2639         * init.c (build_new_1): Reorganize.
2641 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
2643         * class.c (initialize_array)
2644         * decl.c (reshape_init)
2645         * decl2.c (build_expr_from_tree)
2646         * init.c (build_zero_init)
2647         * pt.c (tsubst_copy, tsubst_copy_and_build)
2648         * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer)
2649         (ptm_initializer, class_initializer, get_pseudo_ti_init)
2650         * semantics.c (finish_compound_literal)
2651         * typeck.c (build_ptrmemfunc1)
2652         * typeck2.c (store_init_value, process_init_constructor)
2653         (build_functional_cast): Use build_constructor.
2655 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
2657         * call.c (print_z_candidates): Use gcc_gettext_width, not
2658         strlen, to determine how much padding to use.
2660 2003-04-10  Zack Weinberg  <zack@codesourcery.com>
2662         * decl.c: Update all calls to shadow_warning.
2664 2003-04-10  Mark Mitchell  <mark@codesourcery.com>
2666         * class.c (layout_class_type): Correct handling for overlong
2667         bit-fields whose width is the same as an integer type.
2669 2003-04-06  Zack Weinberg   <zack@codesourcery.com>
2671         * cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero.
2672         * cp-lang.c (cp_tree_size): New function.
2673         (LANG_HOOKS_TREE_SIZE): Override.
2675         * cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct
2676         tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill.
2677         (union lang_tree_node): Remove common and srcloc members.
2678         (build_srcloc_here): Don't prototype.
2679         * decl.c (cp_tree_node_structure): Kill SRCLOC case.
2680         * pt.c (pending_templates): Correct comment.
2681         * tree.c (build_srcloc, build_srcloc_here): Kill.
2683 2003-04-06  Zack Weinberg   <zack@codesourcery.com>
2685         * call.c: Include intl.h.
2686         (print_z_candidate): Always use inform; get rid of errfn
2687         argument. Reorganize so that all the strings get picked up
2688         by xgettext.  Note obligation of caller to pass first argument
2689         through gettext.
2690         (print_z_candidates): Update to match.  Indent second and
2691         successive candidates by strlen() of translated message.
2692         (joust): Restructure ambiguous-conversion pedwarn so that
2693         translators see a complete sentence.  Update calls to
2694         print_z_candidate.
2696         * Make-lang.in (cp/call.o): Update dependencies.
2698 2003-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2700         * decl.c (set_current_binding_level): Delete, revert last change.
2701         (current_binding_level): Modify to allow it as as lvalue.
2703 2003-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2705         * name-lookup.c (find_binding): Pass appropriate pointer type to
2706         POP_TIMEVAR_AND_RETURN.
2708 2003-04-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2710         * Make-lang.in (cp-warn): Add $(STRICT_WARN).
2711         * cp-tree.h: Don't insist on having GNUC.
2713 2003-04-03  Jason Merrill  <jason@redhat.com>
2715         * cvt.c (ocp_convert): Only abort if we try to convert an object
2716         of TREE_ADDRESSABLE type.
2718         * class.c (build_vtable): Set DECL_ALIGN here.
2719         (get_vtable_decl): Not here.
2720         (layout_vtable_decl): Or here.
2721         (create_vtable_ptr): Or here.
2722         (layout_class_type): Or here.
2723         (check_bitfield_decl): Don't mess with field alignment.
2725 2003-04-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2727         * operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR,
2728         DEF_ASSN_OPERATOR): Delete spurious semi-colon.
2729         * rtti.c (dfs_class_hint_mark): Likewise.
2731         * decl.c (push_local_name, push_class_level_binding,
2732         maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in
2733         functions returning void.
2734         * decl2.c (add_using_namespace): Likewise.
2736         * decl.c (print_binding_level, print_other_binding_stack,
2737         print_binding_stack): Cast argument of %p specifier to void*.
2738         * ptree.c (cxx_print_decl): Likewise.
2740         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
2741         VAR_FUNCTION_OR_PARM_DECL_CHECK,
2742         VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
2743         BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK,
2744         LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__.
2746         * decl.c (set_current_binding_level): New macro.  Use throughout
2747         when setting the current binding level.
2749         * cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma
2750         in enum.
2751         * method.c (mangling_flags): Likewise.
2753         * cp-tree.h (lang_type_header): Add __extension__ and use
2754         CHAR_BITFIELD for members.
2756 2003-04-02  Geoffrey Keating  <geoffk@apple.com>
2758         PR other/9274
2759         * mangle.c: Include gt-cp-mangle.h.
2760         (subst_identifiers): Mark with GTY.
2761         * config-lang.in (gtfiles): Add cp/mangle.c.
2762         * Make-lang.in: (gt-cp-mangle.h): New rule.
2763         (cp/mangle.o): Depends on gt-cp-mangle.h.
2765 2003-04-01  Andrew Pinski  <pinskia@physics.uc.edu>
2767         * config-lang.in (gtfiles): Add \$(srcdir)/cp/name-lookup.c
2768         after \$(srcdir)/cp/name-lookup.h.
2769         * name-lookup.c: (cxx_binding_make): Use ggc_alloc_clearedinstead
2770         of ggc_alloc.  Include gt-cp-name-lookup.h at the end of the file.
2771         * Make-lang.in: (gt-cp-name-lookup.h): Is generated by gengtype.
2772         (cp/name-lookup.o): Depends on gt-cp-name-lookup.h.
2774 2003-03-31  Jason Merrill  <jason@redhat.com>
2776         PR java/10145
2777         * class.c (check_field_decl): Don't set DECL_ALIGN.
2779 2003-03-30  Mark Mitchell  <mark@codesourcery.com>
2781         PR c++/7647
2782         * decl.c (grokdeclarator): Tidy, slightly.
2783         * search.c (lookup_field_1): Add want_type parameter.
2784         (lookup_field_r): Adjust call to lookup_field_1.
2786 2003-03-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2788         * Make-lang.in (cp/name-lookup.o): Add more dependencies.
2790 2003-03-30  Gabriel Dos Reis <gdr@integrable-solutions.net>
2792         * cp-tree.h (binding_for_name: Move to name-lookup.h  Adjust
2793         prototype.
2794         (cxx_scope_find_binding_for_name): Likewise.
2795         * decl.c (find_binding: Move to name-lookup.c.
2796         (binding_for_name): Likewise.
2797         (cxx_scope_find_binding_for_name): Likewise.
2798         (BINDING_LEVEL):  Remove.
2799         (push_binding): Tidy.
2800         (push_class_binding): Likewise.
2801         (pop_binding): Likewise.
2802         (poplevel): Likewise.
2803         (poplevel_class): Likewise.
2804         (set_identifier_type_value_with_scope): Likewise.
2805         (push_overloaded_decl): Likewise.
2806         (lookup_tag): Likewise.
2807         (unqualified_namespace_lookup): Likewise.
2808         (lookup_name_current_level): Likewise.
2809         (maybe_inject_for_scope_var): Likewise.
2810         (namespace_binding): Move to name-lookup.c.
2811         (set_namespace_binding): Likewise.
2812         * decl2.c (lookup_using_namespace): Tidy.
2813         (qualified_lookup_using_namespace): Likewise.
2814         (do_toplevel_using_decl): Likewise.
2815         * name-lookup.c: Include "timevar.h"
2816         * name-lookup.h (cxx_scope):  Declare.
2817         (struct cxx_binding): Lose member "has_level".  Adjust "scope"
2818         member declaration.
2819         (BINDING_SCOPE): Adjust definition.
2820         (BINDING_HAS_LEVEL_P): Remove.
2822 2003-03-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2824         * name-lookup.c: New file.
2825         * name-lookup.h: Likewise..
2826         * decl.c (push_binding): Adjust use cxx_binding_make.
2827         (free_bindings): Move to name-lookup.c
2828         (pop_binding): Use cxx_binding_free.
2829         (binding_for_name): Tidy.
2830         * cp-tree.h: Include "name-lookup.h"
2831         (cxx_binding_make): Move to name-lookup.h
2832         (cxx_binding_clear): Likewise.
2833         (struct cxx_binding): Likewise.
2834         (LOCAL_BINDING_P): Likewise.
2835         (INHERITED_VALUE_BINDING_P): Likewise.
2836         (BINDING_SCOPE): Likewise.
2837         (BINDING_HAS_LEVEL_P): Likewise.
2838         (BINDING_VALUE): Likewise.
2839         (BINDING_TYPE): Likewise.
2840         * config-lang.in (gtfiles): Add cp/name-lookup.h
2841         * Make-lang.in (cp/name-lookup.o): New rule.
2842         (CXX_OBJS): Add cp/name-lookup.o
2843         (CXX_TREE_H): Add cp/name-lookup.h
2845 2003-03-28  Jason Merrill  <jason@redhat.com>
2847         PR c++/10245
2848         * cvt.c (force_rvalue): New fn.
2849         * call.c (build_conditional_expr): Use it.
2850         * cp-tree.h: Declare it.
2852 2003-03-28  Mike Stump  <mrs@apple.com>
2854         * error.c (dump_expr): Add 0x to printed hex numbers to make
2855         output match source code better.
2857 2003-03-28  Mark Mitchell  <mark@codesourcery.com>
2859         PR c++/10218
2860         * decl.c (grokfndecl): Return NULL_TREE for bogus out-of-class
2861         definitions.
2863         * decl2.c (generate_ctor_or_dtor_function): Tolerate a
2864         non-existant ssdf_decls array.
2865         (finish_file): Call generator_ctor_or_dtor_function when there are
2866         static constructors or destructors and no other static
2867         initializations.
2869 2003-03-28  Nathan Sidwell  <nathan@codesourcery.com>
2871         PR c++/10047
2872         * decl2.c (finish_file): Don't warn about explicitly instantiated
2873         inline decls.
2875 2003-03-27  Nathan Sidwell  <nathan@codesourcery.com>
2877         PR c++/10224
2878         * pt.c (lookup_template_class): Only check instantiated args if
2879         they do not contain template parameters.
2881 2003-03-27  Nathan Sidwell  <nathan@codesourcery.com>
2883         PR c++/10158
2884         * parser.c (cp_parser_function_definition): Set
2885         DECL_INITIALIZED_IN_CLASS for members.
2886         * pt.c (instantiate_decl): Only reduce the template args for
2887         friends that are not defined in class.
2889 2003-03-25  Jason Merrill  <jason@redhat.com>
2891         * call.c (print_z_candidate): Change name of first arg to msgid.
2892         (joust): Add comment for translators.
2894 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
2896         PR c++/9898, PR c++/383, DR 322
2897         * pt.c (maybe_adjust_types_for_deduction) <DEDUCE_CONV>: Look
2898         through reference types on both PARM and ARG.
2900 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
2902         PR c++/10119
2903         * error.c (dump_expr) <BASELINK>: Use dump_expr.
2904         * pt.c (maybe_fold_nontype_args): New function.
2905         (tsubst_copy) <SCOPE_REF>: Subst any template_id args.
2906         <TEMPLATE_ID_EXPR>: Break out folding code, call it.
2907         (tsubst_copy_and_build) <TEMPLATE_ID_EXPR>: Call
2908         maybe_fold_nontype_args.
2910 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
2912         PR c++/10026
2913         * decl2.c (arg_assoc_type) <ERROR_MARK>: Don't die.
2915 2003-03-23  Mark Mitchell  <mark@codesourcery.com>
2917         PR c++/7086
2918         * typeck.c (cxx_mark_addressable):  Adjust call to
2919         gen_mem_addressof or put_var_into_stack.
2921 2003-03-22  Nathan Sidwell  <nathan@codesourcery.com>
2923         PR c++/9978, c++/9708
2924         * cp-tree.h (instantiate_template): Add tsubst_flags parameter.
2925         * call.c (add_template_candidate_real): Adjust
2926         instantiate_template call.
2927         * class.c (resolve_address_of_overloaded_function): Likewise.
2928         * decl.c (build_enumerator): Set TREE_CONSTANT.
2929         * pt.c (check_instantiated_args): New.
2930         (push_inline_template_parms_recursive): Set TREE_CONSTANT,
2931         TREE_READONLY.
2932         (build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY.
2933         (reduce_template_parm_level): Likewise.
2934         (process_template_parm): Likewise.
2935         (check_explicit_specialization): Adjust instantiate_template call.
2936         (convert_template_argument): Don't check non-type argument here.
2937         (lookup_template_class): Check them here.
2938         (tsubst_friend_function): Adjust instantiate_template call.
2939         (instantiate_template): Add tsubst_flags parameter, use it. Check
2940         instantiated args.
2942 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
2944         * decl.c: Update calls to shadow_warning.
2946 2003-03-21  Nathan Sidwell  <nathan@codesourcery.com>
2948         PR c++/9898
2949         * error.c (dump_decl) [CONST_DECL]: Print '<enumerator>'.
2950         (dump_expr) [CONSTRUCTOR]: Print default ctor as a function call.
2952 2003-03-20  Mark Mitchell  <mark@codesourcery.com>
2954         * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope
2955         friends.
2956         * cp/pt.c (instantiate_class_template): Fix formatting.
2958 2003-03-14  Matt Austern  <austern@apple.com>
2960         * cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray.
2961         (unemitted_tinfo_decl_p): Remove.
2962         (emit_tinfo_decl): Change declaration to remove unused parameter.
2963         * decl2.c (finish_file): Change tinfo emission to loop through
2964         unemitted_tinfo_decls array instead of looping through all decls.
2965         * rtti.c (unemitted_tinfo_decl_p): Declare as static, remove
2966         unused second parameter.
2967         (init_rtti_processing): initialize unemitted_tinfo_decls varray.
2968         (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls.
2969         (emit_tinfo_decl): remove unused second parameter, add assertion
2970         that decl hasn't already been emitted.
2972 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
2974         * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
2975         type from 'int' to 'bool'. Replace 0 and 1 with true and false in
2976         return statements.
2978 2003-03-19  Jason Merrill  <jason@redhat.com>
2980         PR c++/8316, c++/9315, c++/10136
2981         * call.c (print_z_candidate): Split out from...
2982         (print_z_candidiates): ...here.
2983         (joust): Use it.
2985 2003-03-17  Roger Sayle  <roger@eyesopen.com>
2987         PR c++/10031
2988         * decl.c (duplicate_decls): Use the new type when prototyping
2989         anticipated decls, even when the types match.  This defines the
2990         exception list for the built-in function.
2992 2003-03-17  Jason Merrill  <jason@redhat.com>
2994         PR c++/10091
2995         * typeck.c (build_class_member_access_expr): Compare
2996         TYPE_MAIN_VARIANTs.
2998 2003-03-17  Mark Mitchell  <mark@codesourcery.com>
3000         PR c++/9639
3001         * parser.c (cp_parser_declarator_id): Clear parser->scope.
3003 2003-03-16  Jason Merrill  <jason@redhat.com>
3005         PR c++/9993
3006         * decl.c (finish_function): Only allow the NRVO to use variables
3007         declared at function scope.
3009 2003-03-17  Andreas Jaeger  <aj@suse.de>
3011         * Make-lang.in (cp/TAGS): Remove.
3013 2003-03-16  Nathan Sidwell  <nathan@codesourcery.com>
3015         PR c++/9629
3016         * cp-tree.h (struct language_function): Add in_base_initializer.
3017         (in_base_initializer): define it.
3018         (expand_member_init): Remove INIT param.
3019         * init.c (expand_member_init): Remove INIT param, return the member.
3020         (emit_mem_initializers): Set in_base_initializer.
3021         * class.c (build_base_path): Check in_base_initializer.
3022         * parser.c (cp_parser_mem_initializer): Set in_base_initializer.
3023         * pt.c (tsubst_initializer_list): Likewise.
3025 2003-03-16   Gabriel Dos Reis <gdr@integrable-solutions.net>
3027         * decl.c (binding_for_name): Fix initialization thinko.
3029 2003-03-15  Gabriel Dos Reis <gdr@integrable-solutions.net>
3031         Compile-time improvement: 2/n.
3032         * cp-tree.h (struct cxx_binding): New datatype;
3033         (struct lang_identifier): Use it.
3034         (LOCAL_BINDING_P): Adjust definition.
3035         (INHERITED_VALUE_BINDING_P): Likewise.
3036         (BINDING_SCOPE): Likewise.
3037         (BINDING_HAS_LEVEL_P): Likewise.
3038         (BINDING_VALUE): Likewise.
3039         (BINDING_TYPE): Likewise.
3040         (IDENTIFIER_VALUE): Likewise.
3041         (struct tree_binding): Remove.
3042         (TS_CP_BINDING): Likewise.
3043         ((union lang_tree_node): Remove field "binding".
3044         (cxx_binding_clear): New macro.
3045         (binding_for_name): Adjust return type.
3046         (qualified_lookup_using_namespace): Adjust prototype.
3047         (lookup_using_namespace): Adjust prototype.
3048         (cxx_scope_find_binding_for_name): Declare.
3049         * cp-tree.def: Remove CPLUS_BINDING definition.
3050         * decl.c (push_binding): Adjust local variable type.
3051         (add_binding): Likewise.
3052         (push_class_binding): Likewise.
3053         (pop_binding): Likewise.
3054         (poplevel): Likewise.
3055         (poplevel_class): Likewise.
3056         (free_bindings):  Adjust type.
3057         (find_binding): Adjust return type, add a third parameter. Remove
3058         non-useful assertion now that we use static typing.
3059         (cxx_scope_find_binding_for_name): New function.
3060         (binding_for_name): Use it.  Adjust local variable type. Simplify.
3061         (namespace_binding):  Simplify.
3062         (set_namespace_binding): Likewise.
3063         (set_identifier_type_value_with_scope): Adjust local variable type.
3064         (lookup_tag): Don't type-abuse of local variable 'old'.
3065         (lookup_namespace_name): Likewise.  Allocate binding on stack.
3066         (select_decl): Adjust prototype.
3067         (unqualified_namespace_lookup):  Allocate binding on stack.
3068         Don't type-abuse of local variable 'val'.
3069         (lookup_name_real): Likewise.
3070         (maybe_inject_for_scope_var): Adjust local variable type.
3071         (cp_tree_node_structure): Remove CPLUS_BINDING case label.
3072         (namespace_binding): Adjust logic, simplify.
3073         (BINDING_LEVEL): Adjust definition.
3074         (push_class_level_binding): Adjust local variable type.
3075         (struct cxx_saved_binding): Adjust field 'binding' type.
3076         * decl2.c (ambiguous_decl): Adjust prototype.
3077         (lookup_using_namespace): Adjust local variable type.
3078         (qualified_lookup_using_namespace): Catch type error and correct
3079         ensueing logic error.
3080         (do_nonmember_using_decl): Adjust local variable type.  Allocate
3081         temporary cxx_binding on stack.
3082         (do_toplevel_using_decl): Adjust local variable type.
3083         * ptree.c (cxx_print_cxx_binding): New function.
3084         (cxx_print_identifier): Use it.
3085         (cxx_print_xnode): Delete CPLUS_BINDING case label.
3087 2003-03-15  Roger Sayle  <roger@eyesopen.com>
3089         * tree.c (count_functions): Fix whitespace.
3091 2003-03-15  Neil Booth  <neil@daikokuya.co.uk>
3093         * Make-lang.in: Update.
3095 2003-03-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3097         PR c++/6440
3098         * pt.c (maybe_process_partial_specialization): Handle
3099         member class template when enclosing class template is
3100         explicit specialized.
3101         (most_general_template): Stop looking when DECL is already
3102         specialized.
3104 2003-03-13  Jason Merrill  <jason@redhat.com>
3106         PR c++/9420
3107         * search.c (lookup_conversions): Call complete_type here.
3108         * call.c (implicit_conversion): Not here.
3110 2003-03-13  Mark Mitchell  <mark@codesourcery.com>
3112         * decl2.c (do_nonmember_using_decl): Correct handling of
3113         simultaneous type/non-type bindings.
3115         * call.c (initialize_reference): Remove bogus assertion.
3116         * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
3118 2003-03-12  Andrew Lewycky  <andrew@mxc.ca>
3120         PR c++/7050
3121         * expr.c (cxx_expand_expr): Return const0_rtx for throw
3122         expressions.
3124 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
3126         PR c++/9474
3127         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
3128         to merge old and new declarations.
3130 2003-03-12  Alexandre Oliva  <aoliva@redhat.com>
3132         * g++.1: Remove.
3133         * Make-lang.in (c++.generated-manpages): Build cp/g++.1.
3134         (cp/g++.1): Build it from scratch in the build tree.
3135         (c++.install-man): Depend on it.  Install it from the build tree.
3136         (c++.mostlyclean): Clean it.
3138 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
3140         PR c++/9474
3141         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
3142         to merge old and new declarations.
3144         PR c++/9924
3145         * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
3147 2003-03-11  Jason Merrill  <jason@redhat.com>
3149         PR c++/9820
3150         * search.c (lookup_member): Fix handling of functions in a class
3151         being defined.
3153 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
3155         PR c++/8700
3156         * call.c (convert_class_to_reference): Adjust usage of
3157         splice_viable.
3158         (any_viable): Remove.
3159         (splice_viable): Combine with any_viable.
3160         (print_z_candidates): Avoid printing duplicates.
3161         (build_user_type_conversion_1): Adjust usage of splice_viable.
3162         (build_new_function_call): Likewise.
3163         (build_operator_new_call): Likewise.
3164         (build_object_call): Likewise.
3165         (build_conditional_expr): Likewise.
3166         (build_new_op): Likewise.
3167         (build_new_method_call): Likewise.
3168         (joust): Remove spurious comment.
3169         * cp-tree.h (DECL_FRIENDLIST): Correct documentation.
3170         * decl2.c (arg_assoc_class): Simplify.
3171         * friend.c (add_friend): Likewise.
3173 2003-03-11  Jason Merrill  <jason@redhat.com>
3175         PR c++/8660
3176         * decl2.c (check_classfn): A member template only matches a
3177         member template.
3179 2003-03-11  Neil Booth  <neil@daikokuya.co.uk>
3181         * Make-lang.in (CXX_C_OBJS): Update.
3182         * lang-specs.h: Don't define __GNUG__ here.
3184 2003-03-10  Mark Mitchell  <mark@codesourcery.com>
3186         * call.c (perform_overload_resolution): New function.
3187         (build_new_function_call): Use it.
3188         (build_operator_new_call): Likewise.
3189         (add_candidates): Add explicit_targs and template_only parameters.
3190         (build_new_op): Adjust accordingly.
3191         * cp-tree.h (build_operator_new_call): New function.
3192         (build_function_call_real): Remove.
3193         (build_function_call_maybe): Likewise.
3194         * init.c (build_new_1): Use build_operator_new_call.
3195         * typeck.c (build_function_call_real): Rename to ...
3196         (build_function_call): ... this.
3198 2003-03-10  Devang Patel  <dpatel@apple.com>
3200         PR c++/9394
3201         * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
3203 2003-03-10  Jason Merrill  <jason@redhat.com>
3205         PR c++/9798
3206         * decl.c (push_using_directive): Push before recursing.
3208         PR c++/9868, c++/9524
3209         * call.c (resolve_scoped_fn_name): Handle the case of a function
3210         pointer member.
3212         * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
3213         argument in the pointer-to-member case.
3215 2003-03-09  Mark Mitchell  <mark@codesourcery.com>
3217         PR c++/9373
3218         * cp-lang.c (cxx_get_alias_set): Use alias set zero for
3219         pointers to member functions.
3221         PR c++/8534
3222         * decl.c (build_ptrmemfunc_type): Do not allow default arugments
3223         in pointer-to-member-function types.
3225 2003-03-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3227         * expr.c (cplus_expand_constant): Use C90 prototype style.
3228         (cxx_expand_expr): Likewise.
3230 2003-03-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3232         PR c++/9970
3233         * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
3234         functions.
3236 2003-03-08  Geoffrey Keating  <geoffk@apple.com>
3238         * lang-specs.h (c++-header): Change .pch to .gch.
3240 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
3242         * cp-tree.h (cxx_init): Update prototype.
3243         * lex.c (cxx_init): Similarly.
3245 2003-03-08  Mark Mitchell  <mark@codesourcery.com>
3247         PR c++/9823
3248         * cp-tree.h (begin_mem_initializers): Remove.
3249         * parser.c (cp_parser_mem_initializer_list): Inline it here.
3250         Do not call finish_mem_initializers if not in a constructor.
3251         (cp_parser_class_head): Fix typo in error message.
3252         * semantics.c (begin_mem_initializers): Remove.
3253         * testsuite/g++.dg/parser/constructor1.C: New test.
3255         PR c++/9809
3256         * call.c (add_function_candidate): Skip builtin fuctions that have
3257         not yet been declared.
3259         PR c++/9982
3260         * init.c (build_new_1): Correct logic for determining whether or
3261         not to use an array cookie.
3263         PR c++/9524
3264         * parser.c (cp_parser_postfix_expression): Call
3265         finish_non_static_data_member, even when processing_template_decl.
3267         PR c++/9912
3268         * cp-tree.h (is_ancestor): New function.
3269         (handle_class_head): Change prototype.
3270         * decl2.c (is_namespace_ancestor): Rename to ...
3271         (namespace_anecestor): ... this.
3272         (set_decl_namespace): Adjust accordingly.
3273         (handle_class_head): Remove unncessary parameters.
3274         * parser.c (cp_parser_class_head): Check that
3275         nested-name-specifiers are used appropriately.
3277 2003-03-07  Mark Mitchell  <mark@codesourcery.com>
3279         * call.c (reference_binding): Remove REF_IS_VAR parameter.
3280         (implicit_conversion): Adjust call to reference_binding.
3281         (make_temporary_var_for_ref_to_type): Add TYPE parameter.
3282         (initialize_reference): Adjust handling for references bound to
3283         rvalues.
3284         * cp-tree.h (make_temporary_var_for_ref_to_temp): Change
3285         prototype.
3286         (real_non_cast_lvalue_p): New method.
3287         * cvt.c (build_up_reference): Adjust use of
3288         make_temporary_var_for_ref_to_temp.
3289         * tree.c (real_non_cast_lvalue_p): New method.
3291 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3293         * except.c (init_exception_processing): Use C90 prototype style.
3294         (cp_protect_cleanup_actions): Likewise.
3295         (prepare_eh_type): Likewise.
3296         (build_eh_type_type): Likewise.
3297         (build_exc_ptr): Likewise.
3298         (do_begin_catch): Likewise.
3299         (dtor_nothrow): Likewise.
3300         (do_end_catch): Likewise.
3301         (push_eh_cleanup): Likewise.
3302         (decl_is_java_type): Likewise.
3303         (choose_personality_routine): Likewise.
3304         (initialize_handler_parm): Likewise.
3305         (expand_start_catch_block): Likewise.
3306         (expand_end_catch_block): Likewise.
3307         (begin_eh_spec_block): Likewise.
3308         (finish_eh_spec_block): Likewise.
3309         (do_allocate_exception): Likewise.
3310         (do_free_exception): Likewise.
3311         (wrap_cleanups_r): Likewise.
3312         (stabilize_throw_expr): Likewise.
3313         (build_throw): Likewise.
3314         (complete_ptr_ref_or_void_ptr_p): Likewise.
3315         (is_admissible_throw_operand): Likewise.
3316         (nothrow_libfn_p): Likewise.
3317         (can_convert_eh): Likewise.
3318         (check_handlers_1): Likewise.
3319         (check_handlers): Likewise.
3321 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
3323         * call.c (merge_conversion_sequences): New function.
3324         (build_conv): Set ICS_USER_FLAG for USER_CONVs.
3325         (convert_class_to_reference): Correct handling of second
3326         standard conversion sequence in a user-defined conversion
3327         sequence.
3328         (build_user_type_conversion_1): Use merge_conversion_sequences.
3329         * cp-tree.def: Add comments for CONV nodes.
3330         * rtti.c (get_tinfo_decl): Use build_address/build_nop.
3332 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3334         * error.c (init_error): Use C90 prototype style.
3335         (dump_scope): Likewise.
3336         (dump_qualifiers): Likewise.
3337         (dump_template_argument): Likewise.
3338         (dump_template_argument_list): Likewise.
3339         (dump_template_parameter): Likewise.
3340         (dump_template_bindings): Likewise.
3341         (dump_type): Likewise.
3342         (dump_typename): Likewise.
3343         (class_key_or_enum): Likewise.
3344         (dump_aggr_type): Likewise.
3345         (dump_type_prefix): Likewise.
3346         (dump_type_suffix): Likewise.
3347         (dump_global_iord): Likewise.
3348         (dump_simple_decl): Likewise.
3349         (dump_decl): Likewise.
3350         (dump_template_decl): Likewise.
3351         (dump_function_decl): Likewise.
3352         (dump_parameters): Likewise.
3353         (dump_exception_spec): Likewise.
3354         (dump_function_name): Likewise.
3355         (dump_template_parms): Likewise.
3356         (dump_char): Likewise.
3357         (dump_expr_list): Likewise.
3358         (dump_expr): Likewise.
3359         (dump_binary_op): Likewise.
3360         (dump_unary_op): Likewise.
3361         (type_as_string): Likewise.
3362         (expr_as_string): Likewise.
3363         (decl_as_string): Likewise.
3364         (context_as_string): Likewise.
3365         (lang_decl_name): Likewise.
3366         (cp_file_of): Likewise.
3367         (cp_line_of): Likewise.
3368         (decl_to_string): Likewise.
3369         (expr_to_string): Likewise.
3370         (fndecl_to_string): Likewise.
3371         (code_to_string): Likewise.
3372         (language_to_string): Likewise.
3373         (parm_to_string): Likewise.
3374         (op_to_string): Likewise.
3375         (type_to_string): Likewise.
3376         (assop_to_string): Likewise.
3377         (args_to_string): Likewise.
3378         (cv_to_string): Likewise.
3379         (cxx_print_error_function): Likewise.
3380         (cp_diagnostic_starter): Likewise.
3381         (cp_diagnostic_finalizer): Likewise.
3382         (cp_print_error_function): Likewise.
3383         (function_category): Likewise.
3384         (print_instantiation_full_context): Likewise.
3385         (print_instantiation_partial_context): Likewise.
3386         (maybe_print_instantiation_context): Likewise.
3387         (print_instantiation_context): Likewise.
3388         (cp_printer): Likewise.
3389         (print_integer): Likewise.
3390         (print_non_consecutive_character): Likewise.
3391         (locate_error): Likewise.
3393 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
3395         PR c++/9965
3396         * call.c (reference_binding): Add ref_is_var parameter.
3397         (implicit_conversion): Adjust call to reference_binding.
3398         (initialize_reference): Likewise.
3400         PR c++/9400
3401         * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
3402         PARM_DECLs.
3404         PR c++/9791
3405         * class.c (get_basefndecls): Use lookup_fnfields_1.
3407 2003-03-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3409         PR c++/9188
3410         * parser.c (cp_parser_type_parameter): Remove redundant `expect'
3411         in error message.
3412         (cp_parser_single_declaration): Likewise.
3414 2003-03-05  Jason Merrill  <jason@redhat.com>
3416         PR c++/9440
3417         * call.c (build_conditional_expr): Use convert rather than an
3418         explicit NOP_EXPR.
3420 2003-03-02  Matt Austern  <austern@apple.com>
3422         * decl.c (cp_binding_level): Add static_decls varray member.
3423         (add_decl_to_level): Add static/inline namespace scope
3424         declarations to static_decls array.
3425         (wrapup_global_for_namespace): Pass static_decls only, instead of
3426         all decls, to wrapup_global_declarations/check_global_declarations.
3427         (push_namespace): Initialize static_decls for ordinary namespaces.
3428         (cxx_init_decl_processing): Initialize static_decls for global
3429         namespace.
3431 2003-03-05  Mark Mitchell  <mark@codesourcery.com>
3433         * class.c (end_of_class): Correct thinko.
3435 2003-03-04  Nathanael Nerode  <neroden@gcc.gnu.org>
3437         * config-lang.in: Replace ${libstdcxx_version} by its value.
3439 2003-03-04  Gabriel Dos Reis <gdr@integrable-solutions.net>
3441         * cp-tree.h (cxx_saved_binding): Declare.
3442         (struct saved_scope): Adjust type of field 'old_binding'.
3443         * decl.c (cxx_saved_binding_make): New macro.
3444         (struct cxx_saved_binding): Define.
3445         (store_bindings): Adjust prototype.  Use cxx_saved_binding to save
3446         C++ bindings.
3447         (maybe_push_to_top_level): Adjust local variable type.
3448         (pop_from_top_level): Likewise.
3450 2003-03-04  Tom Tromey  <tromey@redhat.com>
3452         * Make-lang.in (c++.tags): New target.
3454 2003-03-04  Neil Booth  <neil@daikokuya.co.uk>
3456         * Make-lang.in: Update.
3458 2003-03-03  Jason Merrill  <jason@redhat.com>
3460         * decl.c (finish_enum): Do set the type in a template. Simplify.
3461         * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
3463 2003-03-03  Mark Mitchell  <mark@codesourcery.com>
3465         PR c++/9878
3466         * call.c (convert_class_to_reference): Correct conversion
3467         sequences.
3468         (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
3469         (implicit_conversion): Adjust call to reference_binding.
3470         (add_candidate): Change type of candidates parameter.
3471         (add_function_candidate): Likewise.
3472         (add_conv_candidate): Likewise.
3473         (build_builtin_candidate): Likewise.
3474         (add_builtin_candidate): Likewise.
3475         (add_builtin_candidates): Likewise.
3476         (add_template_candidate_real): Likewise.
3477         (add_template_candidate): Likewise.
3478         (add_template_conv_candidate): Likewise.
3479         (build_user_type_conversion_1): Adjust accordingly.
3480         (build_object_call): Likewise.
3481         (build_conditional_expr): Likewise.
3482         (add_candidates): Likewise.
3483         (build_new_op): Likewise.
3484         (convert_like_real): Use USER_CONV_CAND.  Use build_nop.
3485         (build_new_method_call): Adjust calls to add_function_candidate.
3486         (make_temporary_var_for_ref_to_temp): New function.
3487         (initialize_reference): Add decl parameter.
3488         * class.c (build_rtti_vtbl_entries): Use build_address and
3489         build_nop.
3490         * cp-tree.h (initialize_reference): Change prototype.
3491         (make_temporary_var_for_ref_to_temp): New function.
3492         (build_type_conversion): Change prototype.
3493         (build_address): New function.
3494         (build_nop): Likewise.
3495         * cvt.c (cp_convert_to_pointer): Adjust call to
3496         build_type_conversion.  Avoid indicating redundant NOP_EXPRs.
3497         Use build_nop.
3498         (convert_to_pointer_force): Use build_nop.
3499         (build_up_reference): Use make_temporary_var_for_ref_to_temp.
3500         (convert_to_reference): Adjust call to build_type_conversion.
3501         (ocp_convert): Likewise.
3502         (build_type_conversion): Remove for_sure parameter.
3503         * decl.c (grok_reference_init): Use initialize_reference.
3504         * typeck.c (build_address): New function.
3505         (build_nop): Likewise.
3506         (build_unary_op): Use them.
3507         (build_ptrmemfunc): Tidy slightly.
3508         (convert_for_initialization): Adjust call to
3509         initialize_reference.
3510         * typeck2.c (store_init_value): Remove #if 0'd code.
3512 2003-03-03  Jason Merrill  <jason@redhat.com>
3514         * decl.c (start_function): Clear DECL_NUM_STMTS.
3516         * class.c (get_vtable_decl): Use vtbl_type_node.
3517         (build_primary_vtable): Check for it.
3519 2003-03-02  Aldy Hernandez  <aldyh@redhat.com>
3521         * decl.c (check_initializer): Check for vector_opaque_p.
3523 2003-03-02  Ashif Harji  <asharji@uwaterloo.ca>
3525         * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
3526           invoke an external cpp during compilation.
3528 2003-03-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3530         * decl.c (duplicate_decls): Convert use of warning_with_decl() to
3531         that of warning().
3532         (start_decl): Likewise.
3533         (start_function): Likewise.
3535 2003-03-01  Neil Booth  <neil@daikokuya.co.uk>
3537         * Make-lang.in (CXX_C_OBJS): Update.
3539 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
3541         PR c++/9892
3542         * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
3543         instantiating it.
3545 2003-02-28  Aldy Hernandez  <aldyh@redhat.com>
3547         * parser.c (cp_parser_init_declarator): Revert opaque
3548         vector_opaque_p change.
3549         Do not include target.h.
3551 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
3553         PR c++/9879
3554         * cp-tree.h (build_zero_init): Add parameter.
3555         * decl.c (cp_finish_decl): Adjust call.
3556         * init.c (build_zero_init): Add nelts parameter.  Adjust recursive
3557         calls.
3558         (build_default_init): Add nelts parameter.  Adjust calls to
3559         build_zero_init.
3560         (build_new_1): Adjust call to build_default_init.
3561         * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
3563 2003-02-26  Devang Patel  <dpatel@apple.com>
3565         * decl.c (finish_enum): Merge two 'for' loops. Copy value node if
3566         required.  Postpone enum setting for template decls.
3567         (build_enumerator): Delay copying value node until finish_enum
3568         (). Remove #if 0'ed code.
3569         * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
3570         (tsubst_copy): Add check for enum type.
3572 2003-02-25  Mark Mitchell  <mark@codesourcery.com>
3574         PR c++/9683
3575         * decl2.c (prune_vars_needing_no_initialization): Do not throw
3576         away initializations for DECL_EXTERNAL VAR_DECLs.
3577         (finish_file): Adjust accordingly.
3578         * pt.c (instantiate_decl): Do not defer VAR_DECLs.
3580 2003-02-24 Gabriel Dos Reis  <gdr@integrable-solutions.net>
3582         * decl.c (add_binding): Time TV_NAME_LOOKUP.
3583         (push_class_binding): Likewise.
3584         (set_namespace_binding): Likewise.
3586 2003-02-24  Mark Mitchell  <mark@codesourcery.com>
3588         PR c++/9836
3589         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
3590         specializations back to the main template.
3591         * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
3592         * pt.c (resolve_typename_type): Likewise.
3594 2003-02-24  Jeffrey D. Oldham  <oldham@codesourcery.com>
3596         PR c++/9778
3597         * pt.c (tsubst_copy_and_build): For a templated function inside a
3598         scope, process template arguments.
3600 2003-02-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3602         PR c++/9602
3603         * typeck2.c (abstract_virtuals_error): Don't check when
3604         TYPE is still template parameter dependent.
3606 2003-02-23  Mark Mitchell  <mark@codesourcery.com>
3608         PR c++/5333
3609         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
3610         * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
3611         * pt.c (instantiate_class_template): Don't try to instantiate
3612         dependent types.
3613         (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
3615 2003-02-21  Mark Mitchell  <mark@codesourcery.com>
3617         PR c++/9749
3618         * decl.c (grokdeclarator): Do not allow parameters with variably
3619         modified types.
3621 2003-02-21  Nathan Sidwell  <nathan@codesourcery.com>
3623         * search.c (grow_bfs_bases): Remove. Fold into ...
3624         (bfs_walk): ... here, fix fencepost error. Fix merge lossage
3625         in previous patch.
3627 2003-02-20  Mark Mitchell  <mark@codesourcery.com>
3629         PR c++/9729
3630         * mangle.c (mangle_conv_op_name_for_type): Issue an error message
3631         when the G++ 3.2 ABI prevents correct compilation.
3633 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
3635         Change base class access representation. Share virtual base
3636         binfos.
3637         * cp/call.c (build_special_member_call): Remove binfo_for_vbase
3638         call.
3639         * cp/class.c (build_base_path): Likewise.
3640         (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
3641         (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
3642         (make_new_vtable): Adjust.
3643         (force_canonical_binfo_r): Delete.
3644         (force_canonical_binfo): Delete.
3645         (mark_primary_virtual_base): Delete.
3646         (dfs_unshared_virtual_bases): Delete.
3647         (mark_primary_bases): Adjust.
3648         (maybe_warn_about_overly_private_class): Adjust.
3649         (dfs_base_derived_from): Delete.
3650         (base_derived_from): Follow the inheritance chain.
3651         (struct find_final_overrider_data): Add vpath member.
3652         (dfs_find_final_overrider): Adjust.
3653         (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
3654         (find_final_overrider): Adjust.
3655         (update_vtable_entry_for_fn): Adjust.
3656         (modify_all_vtables): Adjust.
3657         (walk_subobject_offsets): Adjust.
3658         (layout_nonempty_base_or_field): Adjust.
3659         (layout_empty_base): Remove last parameter. Adjust.
3660         (build_base_field): Adjust.
3661         (build_base_fields): Adjust.
3662         (propagate_binfo_offsets): Remove last parameter. Adjust.
3663         (dfs_set_offset_for_unshared_vbases): Delete.
3664         (layout_virtual_bases): Adjust.
3665         (finish_struct_1): Adjust.
3666         (init_class_processing): Don't init access nodes.
3667         (dfs_get_primary_binfo): Delete.
3668         (get_primary_binfo): Adjust.
3669         (dump_class_hierarchy_r): Remove most derived arg, add IGO
3670         parameter. Adjust.
3671         (dump_class_hierarchy): Adjust.
3672         (finish_vtbls): Adjust.
3673         (get_original_base): Delete.
3674         (build_vtt_inits): Adjust.
3675         (dfs_build_secondary_vptr_vtt_inits): Adjust.
3676         (dfs_ctor_vtable_bases_queue_p): Adjust.
3677         (build_ctor_vtbl_group): Adjust.
3678         (dfs_accumulate_vtbl_inits): Adjust.
3679         (build_vtbl_initializer): Adjust.
3680         (build_vbase_offset_vtbl_entries): Adjust.
3681         (add_vcall_offset_vtbl_entries_1): Adjust.
3682         * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
3683         (access_*_node): Remove.
3684         (CANONICAL_BINFO): Delete.
3685         (BINFO_UNSHARED_MARKED): Remove.
3686         (BINFO_MARKED): Set LANG_FLAG_0 directly.
3687         (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
3688         (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
3689         (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
3690         Delete.
3691         (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
3692         (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
3693         (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
3694         Delete.
3695         (BINFO_DEPENDENT_BASE_P): New.
3696         (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
3697         index.
3698         (markedp, unmarkedp): Adjust.
3699         (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
3700         dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
3701         find_vbase_instance, binfo_for_vbase): Delete.
3702         (copied_binfo, original_binfo): Declare.
3703         (finish_base_specifier): Add virtual_p arg.
3704         (unshare_base_binfos): Delete.
3705         (copy_base_binfos): Declare.
3706         (reverse_path): Delete.
3707         * cp/decl.c (xref_basetypes): Access and virtuality passed
3708         differently. Don't copy direct base binfos here. Call
3709         copy_base_binfos.
3710         * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
3711         (initialize_vtbl_ptrs): Adjust.
3712         (expand_member_init): Adjust.
3713         * cp/parser.c (cp_parser_base_specifier): Adjust.
3714         * cp/pt.c (instantiate_class_template): Adjust.
3715         (get_template_base_recursive): Adjust.
3716         * cp/rtti.c (get_pseudo_ti_init): Adjust.
3717         (get_pseudo_ti_desc): Adjust.
3718         * cp/tree.c (unshare_base_binfos): Rename to ...
3719         (copy_base_binfos): ... here, reimplement.
3720         (make_binfo): Set BINFO_DEPENDENT_BASE_P.
3721         (reverse_path): Remove.
3722         * cp/typeck.c (get_delta_difference): Adjust error messages.
3723         * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
3724         * cp/search.c (lookup_base_r): Adjust.
3725         (dynamic_cast_base_recurse): Adjust.
3726         (canonical_binfo): Remove.
3727         (dfs_canonical_queue): Remove.
3728         (dfs_assert_unmarked_p): Remove.
3729         (assert_canonical_unmarked): Remove.
3730         (shared_marked_p, shared_unmarked_p): Remove.
3731         (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
3732         (dfs_access_in_type): Adjust.
3733         (access_in_type): Adjust.
3734         (dfs_accessible_queue_p): Adjust.
3735         (dfs_accessible_p): Adjust.
3736         (is_subobject_of_p_1, is_subobject_of_p): Remove.
3737         (struct lookup_field_info): Remove from_dep_base_p field.
3738         (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
3739         (lookup_field_r): Remove dependent base code.
3740         (lookup_member): Likewise.
3741         (dfs_walk, dfs_walk_real): Add access arg to queue fn.
3742         (dfs_unmarked_real_bases_queue_p): Remove.
3743         (dfs_marked_real_bases_queue_p): Remove.
3744         (dfs_skip_vbases): Remove.
3745         (dfs_get_pure_virtuals): Adjust.
3746         (markedp, unmarkedp): Adjust.
3747         (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
3748         (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
3749         (dfs_unmark): Adjust.
3750         (dfs_get_vbase_types):Remove.
3751         (dfs_build_inheritance_graph_order): Remove.
3752         (get_vbase_types): Remove
3753         (dfs_find_vbase_instance): Remove.
3754         (find_vbase_instance): Remove.
3755         (dfs_debug_unmarkedp): Adjust.
3756         (dependent_base_p): Remove.
3757         (dfs_push_type_decls): Adjust.
3758         (dfs_push_decls): Adjust.
3759         (dfs_no_overlap_yet): Adjust.
3760         (copied_binfo): New function.
3761         (original_binfo): New function.
3762         (binfo_for_vbase): Remove.
3764 2003-02-18  Zack Weinberg  <zack@codesourcery.com>
3766         * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
3767         (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
3768         vectors, for speed.
3770 2003-02-18  Mark Mitchell  <mark@codesourcery.com>
3772         PR c++/9704
3773         * class.c (layout_class_type): In the 3.2 ABI, take into account
3774         trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
3776 2003-02-18  Matt Austern <austern@apple.com>
3778         * cp/cp-lang.c: Change lang hooks so that final_write_globals does
3779         nothing for C++.
3780         * cp/decl.c (wrapup_globals_for_namespace): Remove special
3781         handling of global namespace.
3783 2003-02-18  Geoffrey Keating  <geoffk@apple.com>
3785         * cp-tree.h (rid_to_yy): Delete.
3786         (C_RID_YYCODE): Delete.
3787         (finish_file): Delete redundant declaration.
3789 2003-02-18  Jason Merrill  <jason@redhat.com>
3791         PR c++/9623
3792         * decl.c (reshape_init): Don't mess with initializer labels.
3794         PR c++/9485
3795         * parser.c (cp_parser_postfix_expression): Set idk properly for
3796         object->scope::member.
3798 2003-02-18  Ben Elliston  <bje@redhat.com>
3800         PR other/7350
3801         * decl.c (duplicate_decls): Fix typo in comment.
3803 2003-02-17  Michael Elizabeth Chastain <mec@shout.net>
3805         PR debug/9717
3806         * class.c (build_base_field): Mark fields for base classes with
3807         DECL_IGNORED_P.
3809 2003-02-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3811         PR c++/9457
3812         * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
3813         CONSTRUCTOR_ELTS only once.
3815 2003-02-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3817         PR c++/9459
3818         * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
3819         (dump_type_suffix): Likewise.
3821 2003-02-14  Nathan Sidwell  <nathan@codesourcery.com>
3823         * search.c: ANSIfy function declarations and definitions.
3824         * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
3825         * call.c (build_method_call, resolve_scoped_fn_name,
3826         build_java_interface_fn_ref): Adjust lookup_field, lookup_member
3827         calls.
3828         * class.c (handle_using_decl): Likewise.
3829         * decl.c (make_typename_type, make_unmound_class_template,
3830         start_decl, compute_array_index_type): Likewise.
3831         * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
3832         * init.c (expand_member_init, build_member_call): Likewise.
3833         * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
3834         resolve_typename_type): Likewise.
3835         * typeck.c (lookup_destructor, finish_class_member_access_exprm
3836         build_prememfunc_access_expr): Likewise.
3838 2003-02-13  Gabriel Dos Reis <gdr@integrable-solutions.net>
3840         * decl2.c: Include "timevar.h".
3841         (namespace_ancestor): Time name lookup.
3842         (add_using_namespace): Likewise.
3843         (lookup_using_namespace): Likewise.
3844         (qualified_lookup_using_namespace): Likewise.
3845         (decl_namespace): Likewise.
3846         (lookup_arg_dependent): Likewise.
3847         * lex.c (do_identifier): Likewise.
3848         (do_scoped_id): Likewise.
3849         * pt.c (lookup_template_class): Likewise.
3851 2003-02-14   Andrew Pinski <pinskia@physics.uc.edu>
3853         * decl.c: (define_label): Fix warning for return 0 instead of NULL.
3855 2003-02-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3857         * decl.c: Include "timevar.h".
3858         (poplevel): Time name lookup.
3859         (find_binding): Likewise.
3860         (push_namespace): Likewise.
3861         (pop_nested_namespace): Likewise.
3862         (store_bindings): Likewise.
3863         (maybe_push_to_top_level): Likewise.
3864         (pop_from_top_level): Likewise.
3865         (push_local_name): Likewise.
3866         (pushtag): Likewise.
3867         (pushdecl): Likewise.
3868         (pushdecl_with_scope): Likewise.
3869         (pushdecl_namespace_level): Likewise.
3870         (pushdecl_top_level): Likewise.
3871         (pushdecl_class_level): Likewise.
3872         (push_class_level_binding): Likewise.
3873         (push_using_decl): Likewise.
3874         (push_using_directive): Likewise.
3875         (push_overloaded_decl): Likewise.
3876         (lookup_label): Likewise.
3877         (define_label): Likewise.
3878         (lookup_tag): Likewise.
3879         (lookup_tag_reverse): Likewise.
3880         (lookup_namespace_name): Likewise.
3881         (select_decl): Likewise.
3882         (unqualified_namespace_lookup): Likewise.
3883         (lookup_name_real): Likewise.
3884         (lookup_name_current_level): Likewise.
3885         (lookup_type_current_level): Likewise.
3886         (maybe_inject_for_scope_var): Likewise.
3887         (xref_tag): Likewise.
3889         * Make-lang.in (cp/decl.o): Add dependency on timevar.h
3891 2003-02-12  Phil Edwards  <pme@gcc.gnu.org>
3893         * decl.c (build_enumerator):  Remove unneeded test.
3895 2003-02-09  Dan Nicolaescu  <dann@ics.uci.edu>
3897         * cp-tree.h (struct lang_type_header): Make all fields unsigned
3898         char.
3900 2003-02-03  Mark Mitchell  <mark@codesourcery.com>
3902         PR c++/7129
3903         * call.c (z_candidate): Add args.
3904         (convert_class_to_reference): Set it.
3905         (implicit_conversion): Tidy.
3906         (add_candidate): Add args parameter.
3907         (add_function_candidate): Adjust call to add_candidate.
3908         (add_conv_candidate): Likewise.
3909         (build_builtin_candidate): Likewise.
3910         (build_user_type_conversion_1): Eliminate wasteful tree_cons
3911         usage.
3912         (build_new_function_call): Likewise.
3913         (build_object_call): Likewise.
3914         (add_candidates): New function.
3915         (build_new_op): Use it.
3916         (covert_like_real): Adjust call to build_over_call.
3917         (build_over_call): Remove args parameter.
3918         * operators.def: Add <?= and >?=.
3920 2003-02-01  Richard Sandiford  <rsandifo@redhat.com>
3922         * typeck.c (build_indirect_ref): Don't check flag_volatile.
3924 2003-01-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3926         PR c++/8849
3927         * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
3929 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
3931         * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
3932         BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
3933         (BINFO_LANG_ELTS): New #define.
3934         * tree.c (make_binfo): Use BINFO_LANG_ELTS.
3936 2003-01-30  Geoffrey Keating  <geoffk@apple.com>
3938         * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
3940 2003-01-30  Mark Mitchell  <mark@codesourcery.com>
3942         * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
3943         for class types.
3944         * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
3945         rather than TYPE_LANG_FLAG_0.
3946         (TYPE_BUILT_IN): Remove.
3947         (TYPE_DEPENDENT_P): New macro.
3948         (TYPE_DEPENDENT_P_VALID): Likewise.
3949         (lang_type_class): Add fields_readonly.
3950         * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
3951         * pt.c (dependent_type_p_r): New function, split out from ...
3952         (dependent_type_p): ... here.  Memoize results.
3953         * search.c (dependent_base_p): Use dependent_type_p, not
3954         uses_template_parms.
3955         * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
3956         for class types.
3958 2003-01-29  Mark Mitchell  <mark@codesourcery.com>
3960         * call.c (build_field_call): Use build_new_op, not build_opfncall.
3961         (prep_operand): New function.
3962         (build_new_op): Use it.  Remove dead code.
3963         * class.c (pushclass): Change "modify" parameter type from int to
3964         bool.
3965         (currently_open_class): Use same_type_p, not pointer equality.
3966         (push_nested_class): Adjust calls to pushclass, remove modify
3967         parameter.
3968         * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
3969         (pushclass): Change prototype.
3970         (push_nested_class): Likewise.
3971         (grokoptypename): Remove.
3972         (build_opfncall): Remove.
3973         (value_dependent_expression_p): Declare.
3974         (resolve_typename_type): Likewise.
3975         (resolve_typename_type_in_current_instantiation): Likewise.
3976         (enter_scope_of): Remove.
3977         (tsubst): Remove.
3978         (tsubst_expr): Likewise.
3979         (tsubst_copy): Likewise.
3980         (tsubst_copy_and_build): Likewise.
3981         * decl.c (warn_about_implicit_typename_lookup): Remove.
3982         (finish_case_label): Return error_mark_node for erroneous labels.
3983         (start_decl): Adjust calls to push_nested_class.
3984         (grokfndecl): Call push_scope/pop_scope around call to
3985         duplicate_decls.
3986         (grokdeclarator): Do not call tsubst.
3987         (start_function): Adjust calls to push_nested_class.
3988         * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
3989         (check_classfn): Use push_scope/pop_scope around type comparisions.
3990         (grokoptypename): Remove.
3991         (push_sscope): Adjust call to push_nested_class.
3992         * error.c (dump_type): Show cv-qualification of typename types.
3993         * init.c (build_member_call): Use build_new_op, not
3994         build_opfncall.
3995         * method.c (build_opfncall): Remove.
3996         * parser.c (cp_parser): Add allow_non_constant_expression_p and
3997         non_constant_expression_p.
3998         (cp_parser_constant_expression): Adjust prototype.
3999         (cp_parser_resolve_typename_type): Remove.
4000         (cp_parser_non_constant_expression): New function.
4001         (cp_parser_non_constant_id_expression): Likewise.
4002         (cp_parser_new): Set allow_non_constant_expression_p and
4003         non_constant_expression_p.
4004         (cp_parser_primary_expression): Reject `this' and `va_arg' in
4005         constant-expressions.  Note that dependent names aren't really
4006         constant.
4007         (cp_parser_postfix_expression): Reject conversions to non-integral
4008         types in constant-expressions.  Neither are increments or
4009         decrements.
4010         (cp_parser_unary_expression): Reject increments and decrements in
4011         constant-expressions.
4012         (cp_parser_direct_new_declarator): Adjust call to
4013         cp_parser_constant_expression.
4014         (cp_parser_cast_expression): Reject conversions to non-integral
4015         types in constant-expressions.
4016         (cp_parser_assignment_expression): Rejects assignments in
4017         constant-expressions.
4018         (cp_parser_expression): Reject commas in constant-expressions.
4019         (cp_parser_labeled_statement): Adjust call to
4020         cp_parser_constant_expression.
4021         (cp_parser_direct_declarator): Simplify array bounds, even in
4022         templates, when they are non-dependent.  Use
4023         resolve_typename_type, not cp_parser_resolve_typename_type.
4024         (cp_parser_class_head): Use resolve_typename_type, not
4025         cp_parser_resolve_typename_type.
4026         (cp_parser_member_declaration): Adjust call to
4027         cp_parser_constant_expression.
4028         (cp_parser_constant_initializer): Likewise.
4029         (cp_parser_constructor_declarator): Use resolve_typename_type, not
4030         cp_parser_resolve_typename_type.
4031         (cp_parser_late_parsing_default_args): Adjust call to
4032         push_nested_class.
4033         * pt.c (tsubst): Give it internal linkage.
4034         (tsubst_expr): Likewise.
4035         (tsubst_copy): Likewise.
4036         (tsubst_copy_and_build): Likewise.
4037         (push_access_scope_real): Likewise.
4038         (tsubst_friend_class): Likewise.
4039         (instantiate_class_template): Adjust call to pushclass.
4040         (value_dependent_expression_p): Give it external linkage.
4041         Robustify.
4042         (resolve_typename_type): New function.
4043         * semantics.c (finish_call_expr): Use build_new_op, not
4044         build_opfncall.
4045         (begin_constructor_declarator): Remove.
4046         (begin_class_definition): Adjust call to pushclass.
4047         (enter_scope_of): Remove.
4048         * typeck.c (comptypes): Resolve typename types as appropriate.
4049         (build_x_indirect_ref): Use build_new_op, not build_opfncall.
4050         (build_x_compound_expr): Likewise.
4051         (build_modify_expr): Likewise.
4052         (build_x_modify_expr): Likewise.
4053         * typeck2.c (build_x_arrow): Likewise.
4055 2003-01-29  Fariborz Jahanian  <fjahanian@apple.com>
4057         * pt.c (last_pending_template) Declare GTY().
4059 2003-01-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4061         PR c++/8591
4062         * parser.c (cp_parser_elaborated_type_specifier): Convert
4063         TEMPLATE_DECL to TYPE_DECL only when processing template friends.
4064         (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
4066 2003-01-28  Nathan Sidwell  <nathan@codesourcery.com>
4068         PR c++/9437
4069         * pt.c (unify): Don't unify '*T' with 'U C::*'.
4071         PR c++/3902
4072         * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
4073         inside a declarator.
4075 2003-01-27  Nathan Sidwell  <nathan@codesourcery.com>
4077         * class.c (update_vtable_entry_for_fn): Add index parameter.
4078         Generate vcall thunk for covariant overriding from a virtual
4079         primary base.
4080         (dfs_modify_vtables): Adjust.
4082 2003-01-25  Nathan Sidwell  <nathan@codesourcery.com>
4084         PR c++/9403
4085         * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
4086         template keyword.
4087         (cp_parser_base_specifier): Look for and consume a
4088         TEMPLATE keyword. Replace switch with array index.
4090         PR c++/795
4091         * semantics.c (finish_non_static_data_member): Remember the
4092         field's type even in a template.
4094         PR c++/9415
4095         * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
4096         already scoped.
4098         PR c++/8545
4099         * parser.c (cp_parser_cast_expression): Be more tentative.
4101 2003-01-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4103         * cp-tree.h (flagged_type_tree_s): Remove.
4104         (check_for_new_type): Likewise.
4105         * typeck2.c (check_for_new_type): Likewise.
4107 2003-01-23  Nathanael Nerode  <neroden@gcc.gnu.org>
4109         * dump.c: ANSIfy function declarations and definitions.
4111         * cp-tree.h, decl.h: Get rid of PARAMS.  Again.
4113 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
4115         PR c++/9354
4116         * init.c (build_new): Set the type of the new-expression, even
4117         when processing_templte_decl.
4119         PR c++/9216
4120         * parser.c (cp_parser_primary_expression): Improve error message
4121         for templates used in an expression context.
4123         PR c++/8696
4124         * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
4125         parse when encountering "typedef".
4127 2003-01-22  Nathanael Nerode  <neroden@gcc.gnu.org>
4129         * class.c, parser.c: ANSIfy function definitions and declarations.
4131 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
4133         PR c++/9328
4134         * error.c (dump_decl): For an OVERLOAD, just print the name of the
4135         function; it doesn't make sense to try to print its type.
4136         * semantics.c (finish_typeof): Issue errors about invalid uses.
4138         PR c++/9298
4139         * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
4140         function.
4141         (cp_parser_expression_statement): Use it.
4142         (cp_parser_explicit_instantiation): Likewise.
4143         * pt.c (do_decl_instantiation): Improve error handling logic.
4145 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
4147         PR c++/9384
4148         * parser.c (cp_parser_using_declaration): Issue error messages
4149         about name resolution failures here.
4151         PR c++/9388
4152         * class.c (currently_open_derived_class): Use dependent_type_p.
4153         * cp-tree.h (dependent_type_p): New function.
4154         (dependent_template_arg_p): Likewise.
4155         (dependent_template_p): Likewise.
4156         (type_dependent_expression_p): Likewise.
4157         * parser.c (cp_parser_dependent_type_p): Remove.
4158         (cp_parser_value_dependent_type_p): Likewise.
4159         (cp_parser_type_dependent_expression_p): Likewise.
4160         (cp_parser_dependent_template_arg_p): Likewise.
4161         (cp_parser_dependent_template_id_p): Likewise.
4162         (cp_parser_dependent_template_p): Likewise.
4163         (cp_parser_diagnose_invalid_type_name): Replace
4164         cp_parser_dependent_type_p with dependent_type_p, etc.
4165         (cp_parser_primary_expresion): Likewise.
4166         (cp_parser_nested_name_specifier_opt): Likewise.
4167         (cp_parser_postfix_expression): Likewise.
4168         (cp_parser_unary_expression): Likewise.
4169         (cp_parser_template_name): Likewise.
4170         (cp_parser_class_name): Likewise.
4171         (cp_parser_lookup_name): Likewise.
4172         * pt.c (dependent_type_p): New function.
4173         (value_dependent_expression_p): Likewise.
4174         (type_dependent_expression_p): Likewise.
4175         (dependent_template_arg_p): Likewise.
4176         (dependent_template_id_p): Likewise.
4177         (dependent_template_p): Likewise.
4179         PR c++/9285
4180         PR c++/9294
4181         * parser.c (cp_parser_simple_declaration): Return quickly when
4182         encountering errors.
4184 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4186         Make-lang.in (cp/decl.o-warn): Add -Wno-error.
4188 2003-01-17  Jason Merrill  <jason@redhat.com>
4190         PR c++/9167, c++/9358
4191         * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
4193 2003-01-17  Jason Merrill  <jason@redhat.com>
4195         PR c++/9342
4196         * call.c (build_conditional_expr): Always do lvalue-rvalue
4197         conversion.
4199 2003-01-17  Mark Mitchell  <mark@codesourcery.com>
4201         PR c++/9294
4202         * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
4203         * cp-tree.h (BASELINK_BINFO): Adjust.
4204         (BASELINK_FUNCTIONS): Likewise.
4205         (BASELINK_ACCESS_BINFO): Likewise.
4206         (tree_baselink): New structure.
4207         (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
4208         (lang_tree_node): Add baselink.
4209         * decl.c (cp_tree_node_structure): Add BASELINK case.
4210         * search.c (build_baselink): Adjust.
4211         * tree.c (cp_walk_subtrees): Add BASELINK case.  Remove BASELINK_P
4212         test from TREE_LIST case.
4214         PR c++/9272
4215         * parser.c (cp_parser_constructor_declarator_p): Do not assume
4216         that a constructor cannot be declared outside of its own class.
4218         * parser.c (cp_parser_resolve_typename_type): If the scope cannot
4219         be resolved, neither can the qualified name.
4221         * rtti.c (get_pseudo_ti_desc): Fix thinko.
4223 2003-01-16  Jason Merrill  <jason@redhat.com>
4225         PR c++/8564
4226         * init.c (build_vec_init): Re-add maxindex parm.
4227         (perform_member_init, build_aggr_init): Pass it.
4228         (build_new_1): Pass it. Use an incomplete array type for full_type.
4229         * typeck.c (build_modify_expr): Pass it.
4230         * cp-tree.h: Adjust.
4232 2003-01-16  Jeffrey D. Oldham  <oldham@codesourcery.com>
4234         * cp-tree.h (tsubst_copy_and_build): New declaration.
4235         * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
4236         (tsubst_expr): Use 'tsubst_copy_and_build'.  Update initial comment.
4237         (tsubst_copy_and_build): New function.
4239 2003-01-16  Mark Mitchell  <mark@codesourcery.com>
4241         * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
4242         (PARTIAL_INSTANTIATION_P): Remove.
4243         (IMPLICIT_TYPENAME_P): Likewise.
4244         (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
4245         (build_typename_type): Remove declaration.
4246         (parmlist_is_exprlist): Likewise.
4247         * decl.c (build_typename_type): Make it static, remove third
4248         parameter.
4249         (push_class_binding): Don't do implicit typename stuff.
4250         (make_typename_type): Likewise.
4251         (lookup_name_real): Likewise.
4252         (grokdeclarator): Don't try to convert declarations into
4253         initializations.  Don't do implicit typename stuff.
4254         (parmlist_is_exprlist): Remove.
4255         (xref_basetypes): Simplify.
4256         * decl2.c (grokfield): Don't try to convert declarations into
4257         initializations.
4258         (build_anon_union_vars): Do this while processing templates, too.
4259         (finish_anon_union): Likewise.
4260         * error.c (dump_type): Remove implicit typename handling.
4261         * parser.c (cp_parser_diagnose_invalid_type_name): New method.
4262         (cp_parser_primary_expression): Correct handling of names not
4263         found by unqualified name lookup in templates.
4264         (cp_parser_nested_name_specifier_opt): Avoid checking dependency
4265         of types when possible.
4266         (cp_parser_simple_declaration): Complain intelligently about some
4267         invalid declarations.
4268         (cp_parser_member_declaration): Likewise.
4269         (cp_parser_constructor_declarator_p): Don't check when we're in a
4270         function scope.
4271         * pt.c (instantiate_class_template): Remove
4272         PARTIAL_INSTANTIATION_P gunk.
4273         * search.c (lookup_field_r): Don't build implicit typenames.
4274         (marked_pushdecls_p): Don't enter dependent base types.
4275         (unmarked_pushdecls_p): Likewise.
4276         * semantics.c (begin_class_definition): Remove implicit typename
4277         stuff.
4279 2003-01-16  Nathan Sidwell  <nathan@codesourcery.com>
4281         PR c++/9212
4282         * parser.c (cp_parser_direct_declarator): If accepting either
4283         abstract or named, the name must be an unqualified-id.
4285 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4287         * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
4289 2003-01-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4291         * decl2.c (check_classfn): Fix uninitialized warning.
4292         (build_anon_union_vars): Likewise.
4293         * pt.c (tsubst_copy): Likewise.
4295 2003-01-14  Jeffrey D. Oldham  <oldham@codesourcery.com>
4297         Further conform g++'s __vmi_class_type_info to the C++ ABI
4298         specification.
4299         * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
4300         the specification.
4301         (class_hint_flags): Likewise.
4303 2003-01-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4305         * config-lang.in: Add semantics.c to gtfiles.
4306         * cp-tree.h (flagged_type_tree_s): Remove lookups field.
4307         (saved_scope): Likewise.
4308         (type_lookups): Remove.
4309         (deferred_access): New structure.
4310         (type_access_control): Remove.
4311         (save_type_access_control): Likewise.
4312         (reset_type_access_control): Likewise.
4313         (decl_type_access_control): Likewise.
4314         (push_deferring_access_checks): Declare.
4315         (resume_deferring_access_checks): Likewise.
4316         (stop_deferring_access_checks): Likewise.
4317         (pop_deferring_access_checks): Likewise.
4318         (get_deferred_access_checks): Likewise.
4319         (pop_to_parent_deferring_access_checks): Likewise.
4320         (perform_deferred_access_checks): Likewise.
4321         (perform_or_defer_access_check): Likewise.
4322         * decl.c (make_typename_type): Use perform_or_defer_access_check.
4323         (make_unbound_class_template): Likewise.
4324         (grokdeclarator): Don't call decl_type_access_control.
4325         * parser.c (cp_parser_context): Remove deferred_access_checks
4326         and deferring_access_checks_p fields.
4327         (cp_parser_context_new): Adjust.
4328         (cp_parser): Remove access_checks_lists.
4329         (cp_parser_defer_access_check): Remove.
4330         (cp_parser_start_deferring_access_checks): Remove.
4331         (cp_parser_stop_deferring_access_checks): Remove.
4332         (cp_parser_perform_deferred_access_checks): Remove.
4333         (cp_parser_nested_name_specifier_opt): Use new deferred access
4334         functions.
4335         (cp_parser_simple_declaration): Likewise.
4336         (cp_parser_template_id): Likewise.
4337         (cp_parser_function_definition): Likewise.
4338         (cp_parser_class_specifier): Likewise.
4339         (cp_parser_lookup_name): Likewise.
4340         (cp_parser_single_declaration): Likewise.
4341         (cp_parser_pre_parsed_nested_name_specifier): Likewise.
4342         (cp_parser_parse_tentatively): Likewise.
4343         (cp_parser_parse_definitely): Likewise.
4344         (yyparse): Likewise.
4345         (cp_parser_init_declarator): Remove access_checks parameter.
4346         Use new deferred access functions.
4347         (cp_parser_function_definition_from_specifiers_and_declarator):
4348         Likewise.
4349         (cp_parser_class_head): Remove deferring_access_checks_p and
4350         saved_access_checks parameters.  Use new deferred access functions.
4351         (cp_parser_member_specification_opt): Don't call
4352         reset_type_access_control.
4353         * search.c (type_access_control): Remove.
4354         * semantics.c: Include "gt-cp-semantics.h".
4355         (deferred_type_access_control): Remove.
4356         (deferred_access_stack): New variable.
4357         (deferred_access_free_list): Likewise.
4358         (push_deferring_access_checks): New function.
4359         (resume_deferring_access_checks): Likewise.
4360         (stop_deferring_access_checks): Likewise.
4361         (pop_deferring_access_checks): Likewise.
4362         (get_deferred_access_checks): Likewise.
4363         (pop_to_parent_deferring_access_checks): Likewise.
4364         (perform_deferred_access_checks): New function, adapted from
4365         cp_parser_perform_deferred_access_checks.
4366         (perform_or_defer_access_check): New function, adapted from
4367         cp_parser_defer_access_check.
4368         (current_type_lookups): Remove.
4369         (deferred_type_access_control): Likewise.
4370         (decl_type_access_control): Likewise.
4371         (save_type_access_control): Likewise.
4372         (reset_type_access_control): Likewise.
4373         (begin_function_definition): Adjust.
4374         (begin_class_definiton): Likewise.
4376 2003-01-13  Jason Merrill  <jason@redhat.com>
4378         PR c++/8748
4379         * class.c (build_base_path): Take the address before calling save_expr.
4381         * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
4382         all the ambiguous conversions are bad.
4384         * class.c (maybe_warn_about_overly_private_class): Don't stop
4385         searching when we find a nonprivate method.
4387         * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
4389 2003-01-12  Mark Mitchell  <mark@codesourcery.com>
4391         * cp-tree.h (get_arglist_len_in_bytes): Remove.
4393         PR c++/9264
4394         * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
4395         typeame types more robustly.
4397 2003-01-11  Phil Edwards  <pme@gcc.gnu.org>
4399         * parser.c:  Fix comment typos.
4401 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
4403         PR c++/9099
4404         * parser.c (cp_parser_scope_through_which_access_occurs): Handle
4405         an object_type which is not a class type.
4407 2003-01-10  Geoffrey Keating  <geoffk@apple.com>
4409         * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
4410         (cp_parser_late_parsing_default_args): Likewise.
4412 2003-01-10  Nathanael Nerode  <neroden@gcc.gnu.org>
4414         * cfns.gperf: ANSIfy function declarations.
4415         * cfns.h: Regenerate.
4416         * cp-tree.h: ANSIfy function declarations.
4418 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
4420         * cp-tree.h (reparse_absdcl_as_expr): Remove.
4421         (reparse_absdcl_as_casts): Likewise.
4422         (reparse_decl_as_expr): Likewise.
4423         (finish_decl_parsing): Likewise.
4424         * decl2.c (reparse_absdcl_as_expr): Remove.
4425         (reparse_absdcl_as_casts): Likewise.
4426         (repase_decl_as_expr): Likewise.
4427         (finish_decl_parsing): Likewise.
4429         PR c++/9128
4430         PR c++/9153
4431         PR c++/9171
4432         * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
4433         function.
4434         (cp_parser_nested_name_specifier_opt): Correct the
4435         check_dependency_p false.
4436         (cp_parser_postfix_expression): Fix formatting.
4437         (cp_parser_decl_specifier_seq): Avoid looking for constructor
4438         declarators when possible.
4439         (cp_parser_template_id): Avoid performing name-lookup when
4440         possible.
4441         (cp_parser_class_head): Do not count specializations when counting
4442         levels of templates.
4443         (cp_parser_constructor_declarator_p): Return immediately if
4444         there's no chance that the tokens form a constructor declarator.
4445         * rtti.c (throw_bad_typeid): Add comment.  Do not return an
4446         expression with reference type.
4447         (get_tinfo_decl_dynamic): Do not return an expression with
4448         reference type.
4449         (build_typeid): Add comment.  Do not return an expression with
4450         reference type.
4451         * typeck.c (build_class_member_access_expr): Improve handling of
4452         conditionals and comma-expressions as objects.
4454 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
4456         * cfns.gperf: ANSIfy function declarations.
4457         * cfns.h: Regenerate.
4458         * cp-tree.h: ANSIfy function declarations.
4459         * parser.c: ANSIfy function declarations & definitions.
4461         * decl.c (bad_specifiers): Fix parameter order error I introduced.
4463 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
4465         Merge from pch-branch:
4467         2003-01-09  Geoffrey Keating  <geoffk@apple.com>
4469         Merge to tag pch-merge-20030102:
4471         * semantics.c (finish_translation_unit): Don't call finish_file.
4472         * parser.c: Don't include ggc.h.
4473         (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
4474         read first token here.  Don't allow PCH files after the first
4475         token is read.
4476         (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
4477         (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
4478         (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
4479         (cp_parser_late_parsing_for_member): Don't duplicate call to
4480         cp_lexer_set_source_position_from_token.
4481         (cp_parser_late_parsing_default_args): Likewise.
4482         (yyparse): Call finish_file after clearing the_parser.
4484         2002-12-11  Geoffrey Keating  <geoffk@apple.com>
4486         * Make-lang.in: Remove $(GGC_H) from all dependencies.
4487         (CXX_TREE_H): Add $(GGC_H).
4488         * class.c: Don't include ggc.h.
4489         (field_decl_cmp): Make parameters be 'const void *' to match qsort.
4490         (method_name_cmp): Likewise.
4491         (resort_data): New variable.
4492         (resort_field_decl_cmp): New.
4493         (resort_method_name_cmp): New.
4494         (resort_sorted_fields): New.
4495         (resort_type_method_vec): New.
4496         (finish_struct_methods): Delete cast.
4497         (finish_struct_1): Delete cast.
4498         * cp-tree.h: Include ggc.h.
4499         (struct lang_type_class): Add reorder attribute to field `methods'.
4500         (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
4501         (resort_sorted_fields): New prototype.
4502         (resort_type_method_vec): New prototype.
4503         * call.c: Don't include ggc.h.
4504         * decl.c: Likewise.
4505         * decl2.c: Likewise.
4506         * init.c: Likewise.
4507         * lex.c: Likewise.
4508         * method.c: Likewise.
4509         * optimize.c: Likewise.
4510         * parse.y: Likewise.
4511         * pt.c: Likewise.
4512         * repo.c: Likewise.
4513         * search.c: Likewise.
4514         * semantics.c: Likewise.
4515         * spew.c: Likewise.
4516         * tree.c: Likewise.
4518         * lang-specs.h: Remove comment.
4520         2002-12-03  Geoffrey Keating  <geoffk@apple.com>
4522         * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
4523         (operator_name_info): Mark to be saved for PCH, specify size.
4524         (assignment_operator_name_info): Likewise.
4526         2002-11-19  Geoffrey Keating  <geoffk@apple.com>
4528         * decl.c (anon_cnt): Mark to be saved for PCH.
4530         2002-10-25  Geoffrey Keating  <geoffk@apple.com>
4532         * lex.c  (init_reswords): Delete now-untrue comment.
4533         Allocate ridpointers using GGC.
4535         2002-10-04  Geoffrey Keating  <geoffk@apple.com>
4537         * cp-tree.h (union lang_decl_u2): Add tags to all fields.
4539         * g++spec.c (lang_specific_driver): Don't include standard
4540         libraries in `added'.
4542         2002-08-27  Geoffrey Keating  <geoffk@redhat.com>
4544         * decl2.c (finish_file): Call c_common_write_pch.
4545         * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
4547         2002-08-17  Geoffrey Keating  <geoffk@redhat.com>
4549         * g++spec.c (lang_specific_driver): Treat .h files as C++ header
4550         files when using g++.
4551         * lang-specs.h: Handle compiling C++ header files.
4553 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
4555         * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
4557 2003-01-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4559         * pt.c (push_access_scope_real): Call push_to_top_level for
4560         function in namespace scope.
4561         (pop_access_scope): Call pop_from_top_level for function in
4562         namespace scope.
4564 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
4566         * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
4568 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
4570         * Make-lang.in (c++.install-common, c++.install-man,
4571         c++.uninstall): Prepend $(DESTDIR) to destination paths in
4572         all (un)installation commands.
4573         (c++.install-common): Rewrite $(LN) commands to support
4574         DESTDIR with "ln" as well as with "ln -s".
4576 2003-01-08  Jason Merrill  <jason@redhat.com>
4578         * parser.c (cp_parser_primary_expression): See through explicitly
4579         scoped ALIAS_DECLs, too.
4581 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
4583         * decl.c: Remove some #if 0 code.
4585         * decl.c: ANSIfy function declarations.
4587 2003-01-07  Mark Mitchell  <mark@codesourcery.com>
4589         * parser.c (cp_parser_asm_definition): Correct handling of omitted
4590         operands.
4592 2003-01-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4594         PR c++/9030
4595         * decl.c (make_typename_type): Check access only when tf_error.
4596         (make_unbound_class_template): Likewise.
4597         * pt.c (saved_access_scope): New variable.
4598         (push_access_scope_real): New function.
4599         (push_access_scope): Likewise.
4600         (pop_access_scope): Likewise.
4601         (tsubst_default_argument): Use them.
4602         (instantiate_template): Likewise.
4603         (regenerate_decl_from_template): Likewise.
4604         (instantiate_decl): Likewise.
4605         (get_mostly_instantiated_function_type): Likewise.
4607 2003-01-07  Nathanael Nerode <neroden@gcc.gnu.org>
4609         * tree.c: Delete bogus #if 0 code.
4611 2003-01-07  Andreas Schwab  <schwab@suse.de>
4613         * class.c (layout_class_type): Don't use
4614         PCC_BITFIELD_TYPE_MATTERS if not defined.
4616 2003-01-06  Mark Mitchell  <mark@codesourcery.com>
4618         PR c++/9165
4619         * decl2.c (build_cleanup): Mark the object as used.
4621         * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
4622         (hash_local_specialization): New function.
4623         (register_local_specialization): Revert 2003-01-05 change.
4624         (instantiate_decl): Use hash_local_specialization when creating
4625         the local_specializations table.
4627         * decl2.c (mark_used): Do not synthesize thunks.
4629         * class.c (layout_class_type): Correct handling of unnamed
4630         bitfields wider than their types.
4632         PR c++/9189
4633         * parser.c (cp_parser): Remove default_arg_types.  Update
4634         documentation for unparsed_functions_queues.
4635         (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
4636         parameter.
4637         (cp_parser_new): Don't set parser->default_arg_types.
4638         (cp_parser_function_definition): Adjust usage of
4639         unparsed_funtions_queues.
4640         (cp_parser_class_specifier): Don't mess with
4641         parser->default_arg_types.  Handle default argument processing in
4642         a separate phase from function body processing.
4643         (cp_parser_template_declaration_after_export): Adjust usage of
4644         unparsed_functions_queues.
4645         (cp_parser_late_parsing_for_member): Do not handle default
4646         arguments.
4648 2003-01-06  Nathan Sidwell  <nathan@codesourcery.com>
4650         PR c++/9109
4651         * parser.c (cp_parser_declarator_kind): New enum.
4652         (cp_parser_declarator): Adjust.
4653         (cp_parser_direct_declarator): Adjust. Allow for either named or
4654         abstract declarator. Prefer abstract, if possible. Allow
4655         parenthesized function name.
4656         (cp_parser_condition): Adjust cp_parser_declarator call.
4657         (cp_parser_explicit_instantiation): Likewise.
4658         (cp_parser_init_declarator): Likewise.
4659         (cp_parser_type_id): Likewise.
4660         (cp_parser_function_definition): Likewise.
4661         (cp_parser_member_declaration): Likewise.
4662         (cp_parser_parameter_declaration): Use cp_parser_declarator to do
4663         the tentative parsing.
4664         (cp_parser_exception_declaration): Likewise.
4666 2003-01-05  Mark Mitchell  <mark@codesourcery.com>
4668         * parser.c (cp_parser_template_parameter): Adjust call to
4669         cp_parser_parameter_declaration.
4670         (cp_parser_parameter_declaration_list): Likewise.
4671         (cp_parser_parameter_declaration): Replace
4672         greater_than_is_operator_p with template_parm_p parameter.  Do not
4673         cache tokens for template default arguments.
4675         * pt.c (retrieve_local_specialization): Use htab_find, not
4676         htab_find_with_hash.
4677         (register_local_specialization): Use htab_find_slot, not
4678         htab_find_slot_with_hash.
4679         (instantiate_decl): Pass a hash function to htab_create.
4681 2003-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4683         * parser.c (cp_parser_binary_expression,
4684         cp_parser_multiplicative_expression,
4685         cp_parser_additive_expression, cp_parser_shift_expression,
4686         cp_parser_relational_expression, cp_parser_equality_expression,
4687         cp_parser_and_expression, cp_parser_exclusive_or_expression,
4688         cp_parser_inclusive_or_expression,
4689         cp_parser_logical_and_expression, cp_parser_logical_or_expression,
4690         cp_parser_binary_expression): Const-ify.
4692 2003-01-04  Mark Mitchell  <mark@codesourcery.com>
4694         * method.c (use_thunk): Disable access control while building the
4695         body of the thunk.
4697 2003-01-03  Nathanael Nerode  <neroden@gcc.gnu.org>
4699         * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
4700         front end.
4702 2003-01-03  Matt Austern  <austern@apple.com>
4704         * cp-tree.h (struct lang_type_class): add field for key method
4705         (cp_global_trees): rename dynamic_classes to keyed_classes
4706         (key_method): add definition
4707         * class.c (finish_struct_1): compute class's key method, and add
4708         the class to keyed_classes list if there is no key method.
4709         * decl.c (finish_function): add class to keyed_classes list if we
4710         see a definition of the class's key method.
4711         * pt.c (instantiate_class_template): add template specialization
4712         of a dynamic class to keyed_classes list.
4713         * decl2.c (key_method): remove
4714         (finish_file): iterate only through keyed_classes list when
4715         deciding whether to emit vtables, remove class from its list after
4716         we do the emission.
4718 2003-01-02  Jason Merrill  <jason@redhat.com>
4720         * call.c (build_conditional_expr): Stabilize lvalues properly.
4721         * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
4722         * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
4723         Don't allow CALL_EXPR or VA_ARG_EXPR, either.
4725         * call.c (convert_like_real): Call decl_constant_value for an
4726         IDENTITY_CONV even if there are no more conversions.
4728         * cvt.c (build_up_reference): Don't push unnamed temps.
4730         * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
4732         * dump.c (cp_dump_tree): Don't try to dump class-specific fields
4733         for a backend struct.
4735         * except.c (wrap_cleanups_r, build_throw): Make
4736         MUST_NOT_THROW_EXPRs void.
4737         * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
4739         * init.c (build_vec_delete_1): Pre-evaluate the base address.
4741         * init.c (get_temp_regvar): Simplify logic.
4743         * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
4744         our replacement is a decl.
4746         * decl.c (cp_make_fname_decl): Push the decls inside the
4747         outermost scope.
4749 2003-01-03  Nathan Sidwell  <nathan@codesourcery.com>
4751         PR c++/45, c++/3784
4752         * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
4753         the same too.
4755 2003-01-03  Graham Stott  <graham.stott@btinternet.com>
4757         * parser.c (struct cp_parser): Add access_checks_lists field
4758         (cp_parser_simple_declaration): Use.
4759         (cp_parser_init_declarator): Likewise.
4761 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
4763         * parser.c (cp_parser_declaration): Accept the __extension__
4764         keyword before the declaration.
4766         PR c++/2843
4767         * parser.c (cp_parser_parameter_declaration): Allow attributes to
4768         appear after the declarator.
4770         * call.c (build_new_method_call): Fix typo in message format
4771         string.
4773 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
4775         * parser.c (cp_lexer_next_token_is): Declare it inline.
4776         (cp_lexer_set_source_position_from_token): Likewise.
4777         (cp_lexer_debugging_p): Likewise.
4778         (cp_parser_parsing_tentatively): Likewise.
4779         (cp_parser_nested_name_specifier_opt): Reduce the number of calls
4780         to the cp_lexer_peek_token.
4782         * parser.c (cp_parser_sizeof_operand): Do not evaluate the
4783         expression.
4785 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
4787         * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
4788         cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
4789         cp/repo.c: Fix copyright years.
4791 2003-01-01  Neil Booth  <neil@daikokuya.co.uk>
4793         * lex.c: Remove superfluous include of cpplib.h.
4794         (CONSTRAINT): Define without conditions.
4795         (init_cp_pragma): Use c_register_pragma.
4797 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
4799         * .cvsignore: Remove.
4801 2002-12-31  Steven Bosscher  <s.bosscher@student.tudelft.nl>
4803         * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
4804           except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
4805           lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
4806           pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
4807           typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
4808           copyright header.
4809         * lex.h: parse.y is dead, so don't mention it.  Also replace the
4810           copyright header with the default GNU copyright header.
4812 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
4814         * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
4815         (lookup_name_namespace_only): Likewise.
4816         (begin_only_namespace_names): Likewise.
4817         (end_only_namespace_names): Likewise.
4818         * decl.c (only_namespace_names): Remove.
4819         (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
4820         (lookup_name_real): Do not check only_namespace_names.
4821         (lookup_name_namespace_only): Remove.
4822         (begin_only_namespace_names): Likewise.
4823         (end_only_namespace_names): Likewise.
4824         * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
4825         nested-name-specifiers more gracefully.
4826         (cp_parser_class_or_namespace_name): Avoid looking up namespace
4827         names when they cannot possibly appear.
4828         (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
4829         (cp_parser_elaborated_type_specifier): Likewise.
4830         (cp_parser_namespace_name): Only look for namespace names.
4831         (cp_parser_lookup_name): Add is_namespace parameter.
4832         (cp_parser_lookup_name_simple): Adjust call to
4833         cp_parser_lookup_name.
4835         * parser.c (cp_parser_dependent_type_p): Fix thinko.
4837 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
4839         * .cvsignore: Update.
4841 2002-12-31  Nathan Sidwell  <nathan@codesourcery.com>
4843         * class.c (modify_vtable_entry): Remove unused variable.
4844         (get_vcall_index): Always expect a non-thunk.
4845         (update_vtable_entry_for_fn): Combine covariant adjustments, when
4846         overriding a thunk. Pass get_vcall_index a non-thunk.
4848         * decl2.c (finish_file): Mark undefined inlines as extern.
4850 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
4852         * cp-tree.def (RETURN_INIT): Remove.
4853         * cp-tree.h (DECL_IN_MEMORY_P): Remove.
4854         (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
4855         (note_level_for_for): Remove.
4856         (note_level_for_try): Likewise.
4857         (note_level_for_catch): Likewise.
4858         (finish_named_return_value): Likewise.
4859         (do_pushlevel): Change prototype.
4860         (pending_lang_change): Remove.
4861         * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
4862         sk_for.
4863         (note_level_for_for): Remove.
4864         (note_level_for_try): Likewise.
4865         (note_level_for_catch): Likewise.
4866         (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
4867         * parser.c (cp_parser_context_free_list): Make it "deletable".
4868         (cp_parser_template_argument): Remove misleading comment.
4869         * pt.c (tsubst_expr): Remove RETURN_INIT code.
4870         * semantics.c (genrtl_named_return_value): Remove.
4871         (do_pushlevel): Take a scope kind as an argument.
4872         (begin_if_stmt): Adjust.
4873         (begin_while_stmt): Likewise.
4874         (begin_for_stmt): Likewise.
4875         (finish_for_init_stmt): Likewise.
4876         (begin_switch_stmt): Likewise.
4877         (begin_handler): Likewise.
4878         (begin_compound_stmt): Likewise.
4879         (finish_named_return_value): Remove.
4880         (cp_expand_stmt): Remove RETURN_INIT case.
4881         * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
4883 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
4885         PR c++/9112
4886         * parser.c (cp_parser_direct_declarator): Handle erroneous
4887         parenthesized declarators correctly.
4889 2002-12-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4891         * cp-tree.h (pending_lang_change): Declare.
4893 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
4895         * parser.c (cp_parser_context_free_list): New variable.
4896         (cp_parser_context_new): Use it.
4897         (cp_parser_error): Check return code from
4898         cp_parser_simulate_error.
4899         (cp_parser_simulate_error): Return a value.
4900         (cp_parser_id_expression): Optimize common case.
4901         (cp_parser_class_name): Likewise.
4902         (cp_parser_class_specifier): Adjust call to
4903         cp_parser_late_parsing_default_args.
4904         (cp_parser_lookup_name): Optimize common case.
4905         (cp_parser_late_parsing_for_member): Adjust call to
4906         cp_parser_late_parsing_default_args.
4907         (cp_parser_late_parsing_default_args): Add scope parameter.
4908         (cp_parser_require): Avoid creating the error message unless it's
4909         needed.
4910         (cp_parser_parse_definitely): Place free'd contexts on the free
4911         list.
4913         * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
4915 2002-12-30  David Edelsohn  <edelsohn@gnu.org>
4917         * parser.c (cp_parser_parameter_declaration_clause): Treat system
4918         header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
4920 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
4922         * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
4923         GCC, not GNU CC.
4925 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
4927         * parse.y: Remove.
4928         * spew.c: Likewise.
4929         * Make-lang.in (gt-cp-spew.h): Remove.
4930         * cp-tree.h (do_pending_lang_change): Remove.
4931         (do_identifier): Change prototype.
4932         (finish_id_expr): Remove.
4933         * decl.c (lookup_name_real): Remove yylex variable.
4934         * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
4935         * lex.c (init_cpp_parse): Remove.
4936         (reduce_cmp): Likewise.
4937         (token_cmp): Likewise.
4938         (yychar): Likewise.
4939         (lastiddecl): Likewise.
4940         (token_count): Likewise.
4941         (reduce_count): Likewise.
4942         (yyhook): Likewise.
4943         (print_parse_statistics): Likewise.
4944         (do_pending_lang_change): Likewise.
4945         (do_identifier): Remove parsing parameter.
4946         * lex.h (lastiddecl): Remove.
4947         (looking_for_typename): Remove.
4948         (looking_for_template): Likewise.
4949         (pending_lang_change): Likewise.
4950         (yylex): Likewise.
4951         * semantics.c (finish_id_expr): Remove.
4953         * decl.c (grokdeclarator): Diagnost "extern thread" and "static
4954         thread" correctly.
4956 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
4958         * decl.c, decl2.c, decl.h:  GCC, not GNU CC.  This is the C++ front
4959         end, not the C front end.
4961 2002-12-30  Nathan Sidwell  <nathan@codesourcery.com>
4963         * cp-tree.h (THUNK_TARGET): New macro.
4964         (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
4965         (finish_thunk): Remove offset parms.
4966         * class.c (find_final_overrider): Look through thunks.
4967         (get_vcall_index): Use THUNK_TARGET.
4968         (update_vtable_entry_for_fn): Look through thunks. Set covariant
4969         fixed offset here. Adjust finish_thunk call.
4970         (build_vtbl_initializer): Adjust finish_thunk calls.
4971         * mangle.c (mangle_call_offset): Remove superfluous if.
4972         (mangle_thunk): Adjust.
4973         * method.c (make_thunk): Adjust.
4974         (finish_thunk): Adjust.
4975         (thunk_adjust): Remove assert.
4976         (use_thunk): Use THUNK_TARGET
4977         * dump1.c (cp_dump_tree): Adjust thunk dumping.
4979         PR c++/9054
4980         * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
4981         * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
4983 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4985         Remove traditional C constructs 4/n.
4986         * decl2.c (grok_method_quals, warn_if_unknown_interface,
4987         grok_x_components, cp_build_parm_decl, build_artificial_parm,
4988         maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
4989         delete_sanity, check_member_template, check_java_method,
4990         check_classfn, finish_static_data_member_decl, grokfield,
4991         grokbitfield, grokoptypename, grok_function_init,
4992         cplus_decl_attributes, constructor_name, defer_fn,
4993         build_anon_union_vars, finish_anon_union, coerce_new_type,
4994         coerce_delete_type, comdat_linkage, maybe_make_one_only,
4995         key_method, import_export_vtable, import_export_class,
4996         output_vtable_inherit, import_export_decl, import_export_tinfo,
4997         build_cleanup, get_guard, get_guard_bits, get_guard_cond,
4998         set_guard, start_objects, finish_objects,
4999         start_static_storage_duration_function,
5000         finish_static_storage_duration_function, get_priority_info,
5001         start_static_initialization_or_destruction,
5002         finish_static_initialization_or_destruction,
5003         do_static_initialization, do_static_destruction,
5004         prune_vars_needing_no_initialization, write_out_vars,
5005         reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
5006         add_using_namespace, merge_functions, ambiguous_decl,
5007         lookup_using_namespace, lookup_using_namespace,
5008         qualified_lookup_using_namespace, set_decl_namespace,
5009         decl_namespace, current_decl_namespace, push_decl_namespace,
5010         pop_decl_namespace, push_scope, pop_scope, add_function,
5011         arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
5012         lookup_arg_dependent, do_namespace_alias,
5013         validate_nonmember_using_decl, do_nonmember_using_decl,
5014         do_toplevel_using_decl, do_local_using_decl,
5015         do_class_using_decl, do_using_directive, check_default_args,
5016         mark_used, handle_class_head): Use C90 prototypings.  Use booleans.
5017         * parser.c (cp_parser_class_head): Use booleanss.
5018         * decl.c (walk_globals, walk_vtables): Likewise.
5019         * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
5020         walk_globals): Change return type from 'int' to 'bool'.
5021         * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
5022         throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
5023         build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
5024         get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
5025         qualifier_flags, tinfo_base_init, generic_initializer,
5026         ptr_initializer, dfs_class_hint_mark, ptm_initializer,
5027         dfs_class_hint_unmark, class_hint_flags, class_initializer,
5028         typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
5029         get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
5030         unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
5031         * repo.c (repo_compile_flags, repo_template_declared,
5032         repo_template_defined, repo_class_defined, repo_get_id,
5033         repo_template_used, repo_vtable_used, repo_inline_used,
5034         repo_tinfo_used, repo_template_instantiated, extract_string,
5035         open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
5036         finish_repo): Likewise.
5037         * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
5038         cxx_print_xnode): Likewise..
5039         * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
5040         cxx_warn_unused_global_decl, cp_expr_size): Likewise.
5041         * cxxfilt.c (demangle_it, print_demangler_list, usage,
5042         standard_symbol_characters, hp_symbol_characters, main, fatal):
5043         Likewise.
5044         (strip_underscore):  Change type from 'int' to 'bool'.
5045         (main): Use boolean constants.
5047 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5049         Remove traditional C constructs 3/n.
5050         * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
5051         build_up_reference, warn_ref_binding, convert_to_reference,
5052         convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
5053         convert_to_void, convert, convert_force, build_type_conversion,
5054         build_expr_type_conversion, type_promotes_to,
5055         perform_qualification_conversions): Use C90 prototyping style.
5056         * decl2.c (grok_array_decl): Use boolean constant.
5057         (delete_sanity): Likewise.
5058         * typeck.c (build_unary_op): Likewise.
5059         * semantics.c (finish_switch_cond): Likewise.
5060         * parser.c (cp_parser_direct_new_declarator): Likewise.
5061         * init.c (build_new): Likewise.
5063 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
5065         * Make-lang.in (po-generated): Remove parse.c.
5066         (CXX_OBJS): Remove parse.o and spew.o.  Add parser.o.
5067         ($(srcdir)/cp/parse.h): Remove target.
5068         ($(srcdir)/cp/parse.c): Likewise.
5069         (gt-cp-parse.h): Likewise.
5070         (gt-cp-parser.h): New target.
5071         (c++.distclean): Do not remove parse.output.
5072         (c++.maintainer-clean): Do not remove parse.c or parse.h.
5073         (cp/spew.o): Remove target.
5074         (cp/lex.o): Adjust dependencies.
5075         (cp/pt.o): Likewise.
5076         (cp/parse.o): Likewise.
5077         (cp/TAGS): Do not mention parse.c.
5078         (cp/parser.o): New target.
5079         * NEWS: Mention the new parser.
5080         * call.c (build_scoped_method_call): Simplify.
5081         (build_method_call): Likewise.
5082         (build_new_function_call): Adjust calls to add_function_candidate
5083         and add_template_candidate.
5084         (build_new_op): Improve handling of erroroneous operands.
5085         (convert_default_arg): Remove circular argument processing.
5086         (name_as_c_string): New function.
5087         (build_new_method_call): Use it.
5088         (perform_implicit_conversion): Use error_operand_p.
5089         * class.c (finish_struct_anon): Use constructor_name_p.
5090         (check_field_decls): Likewise.
5091         (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
5092         (resolve_address_of_overloaded_function): Likewise.
5093         (instantiate_type): Tweak pointer-to-member handling.
5094         (get_primary_binfo): Remove incorrect assertion.
5095         * config-lang.in (gtfiles): Add parser.c, remove parse.c.
5096         * cp-tree.h (DEFARG_TOKENS): New macro.
5097         (default_arg): New structure.
5098         (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
5099         (lang_tree_node): Add default_arg.
5100         (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
5101         (type_info_ref_type): New macro.
5102         (saved_scope): Make processing_explicit_instantiation a boolean.
5103         (check_access): New field.
5104         (unparsed_text): Remove.
5105         (language_function): Remove unparsed_inlines.
5106         (error_operand_p): New macro.
5107         (lang_decl): Adjust pending_inline_info.
5108         (DEFARG_POINTER): Remove.
5109         (tag_types): Add typenames.
5110         (lookup_ualified_name): Declare.
5111         (lookup_name_real): Likewise.
5112         (shadow_tag): Adjust prototype.
5113         (get_scope_of_declarator): Declare it.
5114         (process_next_inline): Remove it.
5115         (check_for_missing_semicolon): Likewise.
5116         (maybe_get_template_decl_from_type_decl): Declare it.
5117         (finish_label_stmt): Adjust prototype.
5118         (finish_non_static_data_meber): Declare it.
5119         (finish_pseudo_destructor_call_expr): Rename to ...
5120         (finish_pseudo_destructor_expr): ... this.
5121         (finish_compound_literal): Declare it.
5122         (begin_inline_definitions): Remove it.
5123         (init_spew): Remove.
5124         (peekyylex): Likewise.
5125         (arbitrate_lookup): Likewise.
5126         (frob_opname): Likewise.
5127         (maybe_snarf_defarg): Likewise.
5128         (add_defarg_fn): Likewise.
5129         (do_pending_defargs): Likewise.
5130         (done_pending_defargs): Likewise.
5131         (unprocessed_defarg_fn): Likewise.
5132         (replace_defarg): Likewise.
5133         (end_input): Likewise.
5134         (get_overloaded_fn): Likewise.
5135         * cvt.c (convert_to_reference): Improve error handling.
5136         * decl.c (lookup_name_real): Do not declare it static.
5137         (maybe_push_to_top_level): Set check_access.
5138         (identifier_type_value): Adjust call to lookup_name_real.
5139         (lookup_qualified_name): New method.
5140         (lookup_name_real): Remove special-case parsing code.
5141         (lookup_name-nonclass): Adjust call to lookup_name_real.
5142         (lookup_name_namespace_only): Likewise.
5143         (lookup_name): Likewise.
5144         (check_tag_decl): Return the type declared.
5145         (shadow_tag): Likewise.
5146         (register_dtor_fn): Tweak check_access.
5147         (grokfndecl): Use constructor_name_p.
5148         (get_scope_of_declarator): New function.
5149         (grokdeclarator): Obscure tweaks for slightly different declarator
5150         representations.
5151         (start_method): Return error_mark_node to indicate failure.
5152         (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
5153         * decl2.c (constructor_name_full): Simplify.
5154         (constructor_name): Use it.
5155         (build_expr_from_tree): Adjust for changes to do new parser.
5156         (push_scope): Improve robustness.
5157         (validate_nonmember_using_decl): Process declarations, not names.
5158         (do_class_using_decl): Likewise.
5159         (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
5160         here.
5161         * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
5162         * expr.c (cxx_expand_expr): Handle BASELINKs.
5163         * init.c (member_init_ok_or_else): Issue more errors.
5164         (build_offset_ref): Tweak handling of FUNCTION_DECLs.
5165         * lex.c: Do not include parse.h.
5166         (yypring): Do not declare.
5167         (yylval): Likewise.
5168         (make_reference_declarator): Remove error-generating code.
5169         (rid_to_yy): Remove.
5170         (cxx_init): Do not call init_spew.
5171         (yypring): Remove.
5172         (check_for_missing_semicolon): Remove.
5173         * lex.h (got_scope): Remove.
5174         (got_object): Remove.
5175         * method.c (hack_identifier): Use finish_non_static_data_member.
5176         (implicitly_declare_fn): Adjust use of constructor_name.
5177         * parser.c: New file.
5178         * pt.c (parse.h): Do not include it.
5179         (maybe_get_template_decl_from_template): Do not declare it.
5180         (finish_member_template_decl): Tweak.
5181         (begin_explicit_instantiation): Adjust for
5182         processing_explicit_instantiation being boolean.
5183         (end_explicit_instantiation): Likewise.
5184         (maybe_process_partial_specialization): Tighten specialization
5185         test.
5186         (retrieve_local_specialization): Adjust ue of hash table.
5187         (eq_local_specializations): New function.
5188         (register_local_specialization): Likewise.
5189         (push_template_decl_real): Remove unnecessary test.
5190         (maybe_get_template_decl_from_type_decl): Don't make it static.
5191         (for_each_template_parm_r): Handle TYPEOF_TYPE.
5192         (tsubst_copy): Use retrieive_local_specialization to handle
5193         PARM_DECL.  Adjust handling of CONST_DECLs.  Handle BASELINKs.
5194         Handle COMPONENT_REFs with pseudo-destructor-expressions.
5195         Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
5196         (tsubst_expr): Pass decls, not names, to do_local_using_decl.
5197         (unify): Tweak handling of CONST_DECLs.
5198         (regenerate_decl_from_template): Use push_nested_class.
5199         (template_for_substitution): New funciton.
5200         (instantiate_decl): Use it.  Register parameters as local
5201         specializations.
5202         * rtti.c (init_rtti_processing): Set type_info_ref_type.
5203         (build_typeid): Use it.
5204         (get_typeid): Likeise.
5205         * search.c (accessible_p): Use check_access, not
5206         flag_access_control.
5207         (adjust_result_of_qualified_name_lookup): Pay attention to the
5208         context_class.
5209         * semantics.c (finish_asm_stmt): Adjust error handling.
5210         (finish_label_stmt): Return the statement.
5211         (finish_non_static_data_member): New function.
5212         (finish_class_expr): Handle BASELINKs.
5213         (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
5214         (finish_object_call_expr): Simplify handling during templates.
5215         (finish_pseudo_destructor_call_expr): Rename to ...
5216         (finish_pseudo_dtor_expr): ... this.
5217         (finish_compound_literal): New function.
5218         (begin_inline_definitions): Remove.
5219         (finish_sizeof): Remove special template handling.
5220         * spew.c: Do not include parse.h.
5221         * tree.c (get_overloaded_fn): Remove.
5222         * typeck.c (build_class_member_access_expr): Handle
5223         PSEUDO_DTOR_EXPR.  Adjust handling of static member functions.
5224         (lookup_destructor): New function.
5225         (finish_class_member_access_expr): Use it.
5226         (convert_arguments): Simplify.
5227         (build_unary_op): Handle BASELINKs.
5229 2002-12-26  Nathan Sidwell  <nathan@codesourcery.com>
5231         PR c++/4803
5232         * decl2.c (mark_used): Defer inline functions.
5233         (finish_file): Merge deferred_fns loops. Check all used
5234         inline functions have a definition.
5235         * method.c (make_thunk): Thunks are not inline.
5237         PR c++/5116, c++/764
5238         * call.c (build_new_op): Make sure template class operands are
5239         instantiated.
5241 2002-12-24  Nathan Sidwell  <nathan@codesourcery.com>
5243         PR C++/7964
5244         * cp-tree.h (resolve_scoped_fn_name): Prototype.
5245         * call.c (resolve_scoped_fn_name): New function. Deal with
5246         more template expansion. Broken out of ...
5247         * parse.y (parse_finish_call_expr): ... here. Call it.
5248         * decl2.c (build_expr_from_tree, CALL_EXPR): Use
5249         resolve_scoped_fn_name and build_call_from_tree.
5251         PR c++/9053
5252         * decl.c (duplicate_decls): Templates may be disambiguated by
5253         return type.
5255         PR c++/8702
5256         * decl2.c (check_classfn): Use lookup_fnfield_1. List all
5257         conversion operators on failure.
5259 2002-12-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5261         Remove traditional C constructs 2/n.
5262         * call.c (tourney, build_field_call, equal_functions, joust,
5263         compare_ics, build_over_call, build_java_interface_fn_ref,
5264         convert_like_real, op_error, build_object_call, resolve_args,
5265         build_vfield_ref, check_dtor_name, build_scoped_method_call,
5266         build_addr_func, build_call, build_method_call, null_ptr_cst_p,
5267         sufficient_parms_p, build_conv, non_reference, strip_top_quals,
5268         standard_conversion, reference_related_p,
5269         reference_compatible_p, convert_class_to_reference,
5270         direct_reference_binding, reference_binding,
5271         ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
5272         add_template_conv_candidate, any_viable, any_strictly_viable,
5273         build_this, splice_viable, print_z_candidates,
5274         build_user_type_conversion, build_new_function_call,
5275         conditional_conversion, build_conditional_expr, build_new_op,
5276         build_op_delete_call, enforce_access, call_builtin_trap,
5277         convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
5278         convert_default_arg, type_passed_as, convert_for_arg_passing,
5279         in_charge_arg_for_name, is_properly_derived_from,
5280         maybe_handle_implicit_object, maybe_handle_ref_bind,
5281         source_type, add_warning, can_convert, can_convert_arg,
5282         perform_implicit_conversion, can_convert_arg_bad,
5283         initialize_reference, add_conv_candidate,
5284         add_template_candidate_real, add_template_candidate): Ansify.
5286 2002-12-22  Nathan Sidwell  <nathan@codesourcery.com>
5288         PR c++/8572
5289         * cp-tree.h (grokoptypename): Add SCOPE parameter.
5290         * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
5291         if in a template scope.
5292         * parse.y (unoperator): Return the scope.
5293         (operator_name): Adjust grokoptypename call.
5295 2002-12-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5297         * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
5298         * decl.c (make_unbound_class_template): Adjust.  Check for tf_error.
5299         * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
5301 2002-12-20  Kazu Hirata  <kazu@cs.umass.edu>
5303         * ChangeLog: Fix a typo.
5304         * class.c: Fix comment typos.
5305         * cp-tree.h: Likewise.
5307 2002-12-18  Jason Merrill  <jason@redhat.com>
5309         Handle anonymous unions at the tree level.
5310         C++ ABI change: Mangle anonymous unions using the name of their
5311         first named field (by depth-first search).  Should not cause
5312         binary compatibility problems, though, as the compiler previously
5313         didn't emit anything for affected unions.
5314         * cp-tree.def (ALIAS_DECL): New tree code.
5315         * decl2.c (build_anon_union_vars): Build ALIAS_DECLs.  Return the
5316         first field, not the largest.
5317         (finish_anon_union): Don't mess with RTL.  Do set DECL_ASSEMBLER_NAME,
5318         push the decl, and write it out at namespace scope.
5319         * decl.c (lookup_name_real): See through an ALIAS_DECL.
5320         (pushdecl): Add namespace bindings for ALIAS_DECLs.
5321         * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
5322         of a decl which doesn't have one.
5323         * typeck.c (build_class_member_access_expr): Don't recurse if
5324         we already have the type we want.
5326 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5328         PR c++/8099
5329         * friend.c (make_friend_class): Allow partial specialization
5330         when declaration is not a template friend.
5332 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5334         PR c++/3663
5335         * pt.c (lookup_template_class): Copy TREE_PRIVATE and
5336         TREE_PROTECTED to created decl nodes.
5338 2002-12-18  Mark Mitchell  <mark@codesourcery.com>
5340         * class.c (build_base_field): Do not set DECL_PACKED on the
5341         FIELD_DECL.
5343 2002-12-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5345         * cp-tree.h (struct tree_srcloc): Use location_t.
5346         (SOURCE_LOCUS): New.
5347         (SRCLOC_FILE, SRCLOC_LINE): Adjust.
5349 2002-12-17  Jason Merrill  <jason@redhat.com>
5351         * decl.c (finish_function): Also complain about no return in
5352         templates.
5353         * semantics.c (finish_return_stmt): Also call check_return_expr in
5354         templates.
5355         * typeck.c (check_return_expr): In a template, just remember that we
5356         saw a return.
5358 2002-12-16  Jason Merrill  <jason@redhat.com>
5360         * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
5361         of the CALL_EXPR.
5363         * semantics.c (do_pushlevel): Call pushlevel after adding the
5364         SCOPE_STMT.
5365         (do_poplevel): Call poplevel before adding the SCOPE_STMT.
5366         * parse.y (function_body): Go back to using compstmt.
5367         * decl.c (pushdecl): Skip another level to get to the parms level.
5369         * call.c (build_new_method_call): Use is_dummy_object to determine
5370         whether or not to evaluate the object parameter to a static member
5371         function.
5373 2002-12-14  Jason Merrill  <jason@redhat.com>
5375         * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
5376         return slot for normal functions.  Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
5377         * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
5378         don't bother with an AGGR_INIT_EXPR.
5379         (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
5380         just generate a new decl normally.  Take return slot parm.
5381         * cp-tree.h: Adjust prototype.
5383 2002-12-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5385         PR C++/8031
5386         * cvt.c (convert_to_pointer_force): Don't try comparing against
5387         erronous type.
5389 2002-12-13  Geoffrey Keating  <geoffk@apple.com>
5391         * cp-tree.h: Have the multiple-include guards around
5392         the entire file.
5394 2002-12-10  David Edelsohn  <edelsohn@gnu.org>
5396         * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
5397         for SPEW_DEBUG.
5398         (snarf_method): Same.
5399         (snarf_defarg): Same.
5401 2002-12-10  Mark Mitchell  <mark@codesourcery.com>
5403         PR c++/8372
5404         * pt.c (tsubst_copy): Handle destructor names more correctly.
5406 2002-12-10  Matt Austern   <austern@apple.com>
5408         * cp-tree.h: get rid of needs_virtual_reinit bit.
5410 2002-12-09  Mark Mitchell  <mark@codesourcery.com>
5412         * NEWS: Document removal of in-class initialization extension for
5413         static data members of non-arithmetic, non-enumeration type.
5414         * decl.c (check_static_variable_definition): Do not allow that
5415         extension.
5416         * decl2.c (grokfield): Do not call digest_init when processing
5417         templates.
5419 2002-12-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5421         * error.c (dump_expr): Fix format specifier warning.
5423 2002-12-04  Geoffrey Keating  <geoffk@apple.com>
5425         * class.c (finish_struct_1): Correct comment.
5426         * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
5428 2002-12-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5430         PR C++/8799
5431         * error.c (dump_expr): Don't ever try to dump a non-existent
5432         expression.
5434 2002-12-03  Nathan Sidwell  <nathan@codesourcery.com>
5436         Implement covariant returns.
5437         * cp-tree.h (IS_AGGR_TYPE_2): Remove.
5438         (struct lang_decl_flags): Add this_thunk_p flag.
5439         Rename vcall_offset to virtual_offset.
5440         (struct lang_decl): Rename delta to fixed_offset.
5441         (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
5442         (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
5443         (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
5444         (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
5445         (make_thunk): Add this_adjusting arg.
5446         (finish_thunk): Declare.
5447         (mangle_thunk): Add this_adjusting arg.
5448         * class.c (get_vcall_index): Use base function for lookup.
5449         (update_vtable_entry_for_fn): Generate covariant thunk.
5450         (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
5451         (build_vtbl_initializer): Use base function for lookup.
5452         Finish covariant thunk here. Adjust thunk generation.
5453         * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
5454         Adjust thunk dumping.
5455         * mangle.c (mangle_call_offset): New function.
5456         (mangle_thunk): Adjust for covariant thunks.
5457         * method.c (make_thunk): Adjust. Do not set name here.
5458         (finish_thunk): New function. Set name here.
5459         (use_thunk): Generate covariant thunks too.
5460         (thunk_adjust): New function.
5461         * search.c (covariant_return_p): Remove. Fold into ...
5462         (check_final_overrider): ... here. Simplify.
5463         * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
5465 2002-12-03  Jason Merrill  <jason@redhat.com>
5467         PR c++/8674
5468         * call.c (build_over_call): Check specifically for TARGET_EXPR
5469         when eliding.
5471         PR c++/8461, c++/8625
5472         * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
5473         (cp_convert_parm_for_inlining): Remove.
5474         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
5475         Remove.
5476         * cp-tree.h (ADDR_IS_INVISIREF): Remove.
5477         * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
5479         * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
5480         an ambiguous conversion.
5482 2002-12-03  Mark Mitchell  <mark@codesourcery.com>
5484         PR c++/8688
5485         * decl.c (reshape_init): Handle erroneous initializers.
5487 2002-12-02  Mark Mitchell  <mark@codesourcery.com>
5489         PR c++/8720
5490         * spew.c (remove_last_token): Make sure that last_chunk is set
5491         correctly.
5493         PR c++/8615
5494         * error.c (dump_expr): Handle character constants with
5495         TREE_OVERFLOW set.
5497 2002-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5499         DR 180
5500         * decl.c (grokdeclarator): Require class-key for all friend class.
5501         Output the correct type and context in the error message.
5503 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
5505         PR c++/5919
5506         * pt.c (unify): Use variably_modified_type_p to test validity of
5507         template argument types.
5509         PR c++/8727
5510         * cp-tree.h (lang_type_class): Add typeinfo_var.
5511         (CLASSTYPE_TYPEINFO_VAR): New macro.
5512         * rtti.c (get_tinfo_decl): Use it.
5514         PR c++/8663
5515         * init.c (expand_member_init): Always get the main variant of a
5516         base class.
5518 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
5520         PR c++/8332
5521         PR c++/8493
5522         * decl.c (cxx_init_decl_processing): Use size_type_node, not
5523         c_size_type_node.
5524         * decl2.c (coerce_new_type): Likewise.
5525         * except.c (do_allocate_exception): Likewise.
5527 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
5529         * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
5530         dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
5531         lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
5532         repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
5533         typeck2.c: Include coretypes.h and tm.h.
5534         * Make-lang.in: Update dependencies.
5536 2002-11-30  Mark Mitchell  <mark@codesourcery.com>
5538         PR c++/8227
5539         * decl.c (layout_var_decl): Deal gracefully with erroneous types.
5540         (check_initializer): Validate the type of the initialized
5541         variable, even if the initializer is absent.
5542         * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
5544         PR c++/8214
5545         * typeck.c (convert_for_assignment): Do not use
5546         decl_constant_value on the operand.
5548         PR c++/8511
5549         * pt.c (instantiate_decl): Handle template friends defined outside
5550         of the class correctly.
5552 2002-11-29  Joe Buck <jbuck@synopsys.com>
5554         * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
5555         anonymous structs.
5557 2002-11-29  Mark Mitchell  <mark@codesourcery.com>
5559         * class.c (walk_subobject_offsets): Recur on binfos as well as on
5560         types.
5561         (layout_nonempty_base_or_field): Pass it a binfo when processing a
5562         base class.
5563         (layout_empty_base): Likewise.
5564         (build_base_field): Likewise.
5566 2002-11-27  Mark Mitchell  <mark@codesourcery.com>
5568         * class.c (build_base_field): Make sure we get the canonical base
5569         when descending through primary bases.
5571 2002-11-26  Geoffrey Keating  <geoffk@apple.com>
5573         * decl.c (check_initializer): Don't error on initialisation of
5574         a scalar with a brace-enclosed expression.
5576 2002-11-26  Nathan Sidwell  <nathan@codesourcery.com>
5578         * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
5579         (template_parms_equal): Remove prototype.
5580         * typeck.c (buuld_indirect_ref): Reformat.
5582 2002-11-25  Jason Merrill  <jason@redhat.com>
5584         * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
5585         and a DO_STMT.
5587 2002-11-25  Mark Mitchell  <mark@codesourcery.com>
5589         * tree.c (cp_build_qualified_type_real): Correct handling of
5590         array types.
5591         * class.c (walk_subobject_offsets): Fix thinko.
5592         (build_base_field): Record offsets of empty bases in primary
5593         virtual bases.
5594         (layout_class_type): Record offsets of empty bases in fields.
5596         * search.c (is_subobject_of_p_1): Fix thinko.
5597         (lookup_field_queue_p): Likewise.
5599 2002-11-24  Mark Mitchell  <mark@codesourcery.com>
5601         * class.c (layout_class_type): Reuse tail padding when laying out
5602         virtual bases.
5604 2002-11-22  Mark Mitchell  <mark@codesourcery.com>
5606         * rtti.c (qualifier_flags): Fix thinko.
5608 2002-11-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5610         Remove traditional C constructs 1/n.
5611         * cp-tree.h (init_method, set_mangled_name_for_decl,
5612         build_opfncall, hack_identifier, make_thunk, use_thunk,
5613         synthesize_method, implicitly_declare_fn,
5614         skip_artificial_parms_for, optimize_function, calls_setjmp_p,
5615         maybe_clone_body): Remove use of PARAMS.
5617         * method.c (do_build_assign_ref, do_build_copy_constructor,
5618         synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
5619         Likewise.
5620         (synthesize_method): Use 'bool' type and constants instead of
5621         'int'.
5622         (locate_copy): Likewise.
5623         (implicitly_declare_fn): Likewise.
5625         * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
5626         Remove old-style declaration.
5627         (maybe_clone_body): Use 'bool' type and constants.
5629 2002-11-21  Glen Nakamura  <glen@imodulo.com>
5631         PR c++/8342
5632         * typeck.c (get_member_function_from_ptrfunc): Make sure that a
5633         SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
5634         of the branches of a COND_EXPR.
5636 2002-11-19  Mark Mitchell  <mark@codesourcery.com>
5638         * pt.c (for_each_template_parm): Free allocated memory.
5639         * search.c (is_subobject_of_p_1): New function.
5640         (is_subobject_of_p): Avoid walking virtual bases multiple times.
5642 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
5644         * g++spec.c (lang_specific_spec_functions): New.
5646 2002-11-15  Kazu Hirata  <kazu@cs.umass.edu>
5648         * ChangeLog: Follow spelling conventions.
5649         * class.c: Likewise.
5650         * decl2.c: Likewise.
5652 2002-11-14  Zack Weinberg  <zack@codesourcery.com>
5654         * search.c (dfs_push_decls): Do not try to reorder elements
5655         3..n of method_vec if method_vec has only two elements.
5656         Reverse order of two tests to avoid accessing unallocated
5657         memory.
5659 2002-11-14  Mark Mitchell  <mark@codesourcery.com>
5661         * class.c (dfs_find_final_overrider): Adjust so that the most
5662         derived object is a binfo, rather than a class type.
5663         (find_final_overrider): Likewise.
5664         (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
5665         (add_vcall_offset): Likewise.
5667 2002-11-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5669         PR c++/8389
5670         * pt.c (instantiate_template): Push class scope for member
5671         functions.
5672         (get_mostly_instantiated_function_type): Likewise.  Don't call
5673         tsubst on context.  Remove CONTEXTP and TPARMSP parameters.
5674         * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
5675         * mangle.c (write_encoding, write_unqualified_name): Adjust.
5677 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
5679         * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
5680         vcall offfsets.  Split out ...
5681         (add_vcall_offset): ... new function.
5683         PR c++/8338
5684         * pt.c (for_each_template_parm): Add htab parameter.
5685         (process_partial_specialization): Adjust call.
5686         (push_template_decl_real): Likewise.
5687         (pair_fn_data): Add visited.
5688         (for_each_template_parm_r): Avoid walking duplicates more than
5689         once.
5690         (uses_template_parms): Adjust call to for_each_template_parm.
5692 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
5694         * class.c (add_implicitly_declared_members): Put implicitly
5695         declared functions at the end of TYPE_METHODs when -fabi-version
5696         is at least 2.
5698 2002-11-05  Geoffrey Keating  <geoffk@apple.com>
5700         * decl2.c (finish_file): Correct spelling.
5702 2002-11-03  Mark Mitchell  <mark@codesourcery.com>
5704         * call.c (build_special_member_call): Do not try to lookup VTTs by
5705         name.
5706         * class.c (vtbl_init_data): Add generate_vcall_entries.
5707         (get_vtable_decl): Do not look up virtual tables by name.
5708         (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
5709         (set_primary_base): Do not set CLASSTYPE_RTTI.
5710         (determine_primary_base): Likewise.
5711         (get_matching_virtual): Remove.
5712         (get_vcall_index): New function.
5713         (update_vtable_entry_for_fn): Do not try to use virtual thunks
5714         when they are not required.  Assign vcall indices at this point.
5715         (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
5716         Do update dynamic_classes.
5717         (build_vtt): Do not add VTTs to the symbol table.
5718         (build_ctor_vtbl_group): Likewise.
5719         (build_vtbl_initializer): Simplify handling of vcall indices.
5720         (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
5721         for the most derived class.
5722         (add_vcall_offset_vtbl_entries_1): But do not actually add them to
5723         the vtable.
5724         * cp-tree.h (dynamic_classes): New macro.
5725         (lang_type_class): Remove rtti.  Add vtables.  Add vcall_indices.
5726         (CLASSTYPE_RTTI): Remove.
5727         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
5728         (CLASSTYPE_VCALL_INDICES): New macro.
5729         (CLASSTYPE_VTABLES): Likewise.
5730         (BV_USE_VCALL_INDEX_P): Remove.
5731         (build_vtable_path): Remove.
5732         * decl2.c (finish_vtable_vardecl): Remove.
5733         (key_method): Remove #if 0'd code.
5734         (finish_vtable_vardecl): Rename to ...
5735         (maybe_emit_vtables): ... this.
5736         (finish_file): Use it.
5737         * search.c (look_for_overrides_here): Update comment.
5739 2002-11-01  Zack Weinberg  <zack@codesourcery.com>
5741         PR c/7353 redux
5742         * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
5744 2002-10-30  Jason Merrill  <jason@redhat.com>
5746         PR c++/8186
5747         * cp-tree.h (ADDR_IS_INVISIREF): New macro.
5748         * call.c (convert_for_arg_passing): Set it.
5749         * except.c (stabilize_throw_expr): Recurse for such an arg.
5751 2002-10-31  Mark Mitchell  <mark@codesourcery.com>
5753         * cp-tree.h (lang_decl_flags): Remove init_priority.
5754         (lang_decl): Add delta.
5755         (GLOBAL_INIT_PRIORITY): Remove.
5756         (THUNK_DELTA): Revise definition.
5757         * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
5758         * dump.c (cp_dump_tree): Don't dump it.
5760 2002-10-30  Mark Mitchell  <mark@codesourcery.com>
5762         PR c++/8160
5763         * typeck2.c (process_init_constructor): Call complete_array_type.
5765         PR c++/8149
5766         * decl.c (make_typename_type): Issue errors about invalid results.
5768 2002-10-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5770         Core issue 287, PR c++/7639
5771         * cp-tree.h (lang_type_class): Add decl_list field.
5772         (CLASSTYPE_DECL_LIST): New macro.
5773         (maybe_add_class_template_decl_list): Add declaration.
5774         * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
5775         (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
5776         (maybe_add_class_template_decl_list): New function.
5777         (add_implicitly_declared_members): Use it.
5778         * decl.c (maybe_process_template_type_declaration): Likewise.
5779         (pushtag): Likewise.
5780         * friend.c (add_friend): Likewise.
5781         (make_friend_class): Likewise.
5782         * semantics.c (finish_member_declaration): Likewise.
5783         (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
5784         * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
5785         to process members and friends in the order of declaration.
5787 2002-10-29  Mark Mitchell  <mark@codesourcery.com>
5789         PR c++/8287
5790         * decl.c (finish_destructor_body): Create the label to jump to
5791         when returning from a destructor here.
5792         (finish_function_body): Rather than here.
5794 2002-10-25  Zack Weinberg  <zack@codesourcery.com>
5796         PR c++/7266
5797         * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
5798         SCOPE_REF is not null before dereferencing it.
5800 2002-10-25  Mark Mitchell  <mark@codesourcery.com>
5802         * call.c (build_over_call): Use DECL_CONTEXT, not
5803         DECL_VIRTUAL_CONTEXT.
5804         * class.c (modify_vtable_entry): Don't mess with
5805         DECL_VIRTUAL_CONTEXT.
5806         (set_vindex): Remove.
5807         (set_primary_base): Remove vfuns_p parameter.
5808         (determine_primary_base): Likewise.
5809         (modify_all_vtables): Likewise.
5810         (layout_class_type): Likewise.  Adjust calls to other functions
5811         accordingly.
5812         (finish_struct_1): Adjust calls to modified functions.  Set
5813         DECL_VINDEX here.
5814         * cp-tree.h (lang_type_class): Remove vsize.
5815         (CLASSTYPE_VSIZE): Remove.
5816         (lang_decl): Remove thunks.
5817         (DECL_THUNKS): Adjust.
5818         (DECL_VIRTUAL_CONTEXT): Remove.
5819         (duplicate_decls): Don't copy it.
5820         * pt.c (build_template_decl): Don't set it.
5821         (tsubst_decl): Likewise.
5822         * typeck.c (expand_ptrmemfunc_cst): Don't use it.
5824         * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
5825         (build_vtable_entry): Remove.
5826         * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
5827         (lang_decl): Add thunks.
5828         (DECL_THUNKS): New macro.
5829         * decl.c (duplicate_decls): Copy it.
5830         * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
5831         * semantics.c (emit_associated_thunks): Simplify.
5833 2002-10-24  David Edelsohn  <edelsohn@gnu.org>
5835         PR c++/7228
5836         * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
5837         lang_type structure exists before accessing field.
5838         (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
5839         (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
5840         (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
5841         * class.c (check_field_decls): Use new macros.
5842         * typeck2.c (process_init_constructor): Remove redundant check for
5843         existence of lang_type structure.
5845 2002-10-24  Mark Mitchell  <mark@codesourcery.com>
5847         * class.c (end_of_base): New method.
5848         (end_of_class): Use it.  Check indirect virtual bases.
5850         * class.c (check_field_decls): Fix typo.
5852 2002-10-23  Mark Mitchell  <mark@codesourcery.com>
5854         PR c++/8067
5855         * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
5856         related variables.
5858         PR c++/7679
5859         * spew.c (next_token): Do not return an endless stream of
5860         END_OF_SAVED_INPUT tokens.
5861         (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
5862         the cached token stream.
5863         (snarf_defarg): Likewise.
5865 2002-10-23  Zack Weinberg  <zack@codesourcery.com>
5867         * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
5868         variably_modified_type_p.
5869         * cp-tree.h: Remove prototype of variably_modified_type_p.
5870         * tree.c (variably_modified_type_p): Remove; now implemented
5871         in language-independent code.
5873 2002-10-22  Mark Mitchell  <mark@codesourcery.com>
5875         PR c++/6579
5876         * spew.c (snarf_parenthesized_expression): New function.
5877         (snarf_block): Use it.
5879 2002-10-22  Richard Henderson  <rth@redhat.com>
5881         * method.c (use_thunk): Always compute vcall_value; assert that
5882         it is not zero.  Use can_output_mi_thunk; use output_mi_thunk
5883         for vcall thunks as well.
5885 2002-10-21  Mark Mitchell  <mark@codesourcery.com>
5887         * class.c (empty_base_at_nonzero_offset_p): New function.
5888         (layout_nonempty_base_or_field): Do not check for conflicts when
5889         laying out a virtual base using the GCC 3.2 ABI.
5890         (build_base_field): Correct checking for presence of empty classes
5891         at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
5893         * class.c (include_empty_classes): Use normalize_rli.
5894         (layout_class_type): Likewise.
5896         * decl.c (reshape_init): Tweak handling of character arrays.
5898         PR c++/8218
5899         * cp-tree.h (lang_type_class): Add contains_empty_class_p.
5900         (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
5901         * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
5902         (check_field_decls): Likewise.
5903         (layout_class_type): Likewise.
5904         (finish_struct_1): Initialize it.
5905         (walk_subobject_offsets): Use it to prune searches.
5907 2002-10-20  Mark Mitchell  <mark@codesourcery.com>
5909         * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
5910         * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
5911         TARGET_ASM_OUTPUT_MI_THUNK in comments.
5913 2002-10-18  Zack Weinberg  <zack@codesourcery.com>
5915         * decl.c (start_decl): Point users of the old initialized-
5916         typedef extension at __typeof__.
5918 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
5920         * Make-lang.in (method.o): Depend on TARGET_H.
5921         * method.c (target.h): Include it.
5922         (use_thunk): Use target hooks.  Use vcall thunks, if available.
5924 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
5926         * class.c (base_derived_from): Make sure return value is a bool.
5928 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
5930         * class.c (find_final_overrider_data_s): Remove overriding_fn and
5931         overriding_base.
5932         (dfs_base_derived_from): New function.
5933         (base_derived_from): Likewise.
5934         (dfs_find_final_overrider): Use base_derived_from.
5935         (find_final_overrider): Adjust.
5937 2002-10-18  Jason Merrill  <jason@redhat.com>
5939         PR c++/8080
5940         * semantics.c (finish_for_cond, finish_while_cond): Don't mess
5941         with condition decls in a template.
5943 2002-10-17  Nathan Sidwell  <nathan@codesourcery.com>
5945         * class.c (add_method): Compare template parms too.
5947 2002-10-17  Mark Mitchell  <mark@codesourcery.com>
5949         PR c++/7584
5950         * class.c (handle_using_decl): Allow the declaration used to be
5951         from an ambiguous base.
5953         * pt.c (convert_template_argument): Revert this change:
5954                 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
5955                 * pt.c (convert_template_argument): Do not fold non-type
5956                 template rguments when inside a template.
5958         * init.c (expand_default_init): Handle brace-enclosed initializers
5959         correctly.
5961 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
5963         * mangle.c (write_expression): Correct handling of enumeration
5964         constants.
5965         (write_template_arg): Likewise.
5966         * pt.c (convert_template_argument): Do not fold non-type template
5967         arguments when inside a template.
5969         PR c++/7478
5970         * cvt.c (convert_to_reference): Allow references as the incoming
5971         type.
5973 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
5975         PR c++/7524
5976         * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
5977         build_qualified_type.
5979 2002-10-15  Richard Henderson  <rth@redhat.com>
5981         * error.c (dump_expr): Use real_to_decimal directly, and with
5982         the new arguments.
5984 2002-10-15  Mark Mitchell  <mark@codesourcery.com>
5986         * decl.c (reshape_init): Fix typo.
5988         * cp-tree.h (operator_name_info_t): Add arity.
5989         * lex.c (init_operators): Initialize it.
5990         * mangle.c (write_conversion_operator_name): New function.
5991         (write_unqualified_name): Use it.
5992         (write_template_args): Accept template arguments as a TREE_LIST.
5993         (write_expression): Adjust handling of qualified names to match
5994         specification.
5996 2002-10-15  Jason Merrill  <jason@redhat.com>
5998         * call.c (call_builtin_trap): New fn.
5999         (convert_arg_to_ellipsis): Use it.  Downgrade error to warning.
6000         (build_call): Don't set current_function_returns_abnormally outside
6001         a function.
6003 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
6005         * class.c (check_field_decls): Remove empty_p parameter.  Instead,
6006         clear CLASSTYPE_EMPTY_P.
6007         (build_base_field): Likewise.
6008         (build_base_fields): Likewise.
6009         (check_bases_and_members): Likewise.
6010         (create_vtbl_ptr): Likewise.
6011         (layout_class_type): Likewise.  Ensure that empty classes have
6012         size zero when used as base classes in the 3.2 ABI.
6013         (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
6014         CLASSTYPE_NEARLY_EMPTY_P.  Adjust calls to avoid passing empty_p
6015         parameter.
6016         (is_empty_class): Correct definition when using post-3.2 ABI.
6017         * cp-tree.h (lang_type_class): Add empty_p.
6018         (CLASSTYPE_EMPTY_P): New macro.
6020 2002-10-12  Nathan Sidwell  <nathan@codesourcery.com>
6022         * init.c (build_delete): Do not apply save_expr for arrays.
6023         (build_vec_delete): Likewise.
6025 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
6027         * decl.c (layout_var_decl): Call layout_decl even for variables
6028         whose type is an array with unspecified bounds.
6030         PR c++/7176
6031         * lex.c (do_identifier): Add another option for the parsing
6032         parameter.
6033         * parse.y (do_id): Use it.
6035 2002-10-11  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6037         PRs C++/6803, C++/7721 and C++/7803
6038         * decl.c (grokdeclarator): Gracefully handle template-name as
6039         decl-specifier.
6041 2002-10-11  Jason Molenda  <jmolenda@apple.com>
6043         * init.c (build_field_list): Provide uses_unions_p with a default
6044         value.
6046 2002-10-11  Mark Mitchell  <mark@codesourcery.com>
6048         PR c++/5661
6049         * cp-tree.h (variably_modified_type_p): New function.
6050         (grokdeclarator) Tighten check for variably modified types as
6051         fields.
6052         * pt.c (convert_template_argument): Do not allow variably modified
6053         types as template arguments.
6054         * tree.c (variably_modified_type_p): New function.
6056         * NEWS: Document removal of "new X = ..." extension.
6057         * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
6058         brace-enclosed initializers.
6059         * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
6060         (initialize_local_var): Remove declaration.
6061         (expand_static_init): Likewise.
6062         * decl.c (next_initializable_field): New function.
6063         (reshape_init): Likewise.
6064         (check_initializer): Use them.  Build dynamic initializer for
6065         aggregates here too.
6066         (initialize_local_var): Simplify, and incorporate cleanup
6067         insertion code as well.
6068         (destroy_local_var): Remove.
6069         (cp_finish_decl): Tidy.
6070         (expand_static_init): Fold checks for whether or not a variable
6071         needs initialization into this function.  Simplify.
6072         * decl2.c (do_static_initialization): Simplify.
6073         * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
6074         be done for us automatically.
6075         (expand_default_init): Handle brace-enclosed initializers
6076         correctly.
6077         (expand_aggr_init_1): Remove RTL-generation code.
6078         (build_vec_init): Remove "new X = ..." support.
6079         * parse.y (new_initializer): Likewise.
6080         * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
6081         brace-enclosed initializer.
6082         (create_pseudo_type_info): Likewise.
6083         * typeck2.c (store_init_value): Don't try to handle digest_init
6084         being called more than once.
6085         (digest_init): Tidy handling of brace-enclosed initializers.
6087 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6089         * decl.c (typename_hash): Use htab_hash_pointer.
6091 2002-10-10  Jim Wilson  <wilson@redhat.com>
6093         * decl.c (duplicate_decls): Don't call decl_attributes.
6095 2002-10-09  Zack Weinberg  <zack@codesourcery.com>
6097         PR c/7353
6098         * decl.c (start_decl): Unconditionally issue error for
6099         'typedef foo = bar'.
6100         (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
6101         (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
6103 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6105         * decl2.c (prune_vtable_vardecl): Delete unused function.
6107 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
6109         PR c++/7754
6110         * decl2.c (finish_anon_union): Do not expand anonymous unions when
6111         procesing template functions.
6112         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
6113         type. Call layout_decl.
6114         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
6116 2002-10-07  Richard Henderson  <rth@redhat.com>
6118         * decl2.c, pt.c: Revert c++/7754 fix.
6120 2002-10-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6122         PR c++/7804
6123         * error.c (dump_expr) [REAL_CST]: Output in decimal format.
6125 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
6127         PR c++/7931
6128         * pt.c (for_each_template_parm_r): Handle BASELINKs.
6130         PR c++/7754
6131         * decl2.c (finish_anon_union): Do not expand anonymous unions when
6132         procesing template functions.
6133         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
6134         type. Call layout_decl.
6135         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
6137 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
6139         PR c++/8006
6140         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
6141         template parameters.
6142         (globals): Add entity and need_abi_warning.
6143         (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
6144         CLASSTYPE_TEMPLATE_INFO.
6145         (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
6146         TYPE_TI_TEMPLATE.
6147         (write_prefix): Handle typename types correctly.
6148         (write_template_prefix): Handle template template parameters
6149         correctly.
6150         (start_mangling): Add entity parameter.
6151         (finish_mangling): Warn about names whose mangling will change.
6152         (mangle_decl_string): Adjust.
6153         (mangle_type_string): Likewise.
6154         (mangle_special_for_type): Likewise.
6155         (mangle_ctor_vtbl_for_type): Likewise.
6156         (mangle_thunk): Likewise.
6157         (mangle_guard_variable): Likewise.
6158         (mangle_ref_init_variable): Likewise.
6160 2002-10-02  Mark Mitchell  <mark@codesourcery.com>
6162         PR c++/7188.
6163         * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
6164         * cp-tree.h (emit_base_init): Rename to ....
6165         (emit_mem_initializers): ... this.
6166         (expand_member_init): Change prototype.
6167         * init.c (perform_member_init): Compute explicit, rather than
6168         requiring it as a parameter.
6169         (sort_member_init): Rename to ...
6170         (sort_mem_initializers): ... this.  Process bases and data members
6171         together.
6172         (sort_base_init): Remove.
6173         (emit_base_init): Rename to ...
6174         (emit_mem_initializers): ... this.
6175         (expand_aggr_vbase_init_1): Remove.
6176         (construct_virtual_bases): Rename to ...
6177         (construct_virtual_base): ... this.
6178         (expand_member_init): Rework handling of base initializers.
6179         * method.c (do_build_copy_constructor): Use
6180         finish_mem_initializers.
6181         * parse.y (member_init): Adjust calls to expand_member_init.
6182         * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
6183         (tsubst_initializer_list): Use expand_member_init.
6184         * semantics.c (finish_mem_intiailizers): Simplify.
6186 2002-10-02  Matt Austern  <austern@apple.com>
6187         * decl.c (walk_vtables_r): Fixed typo that caused result to
6188         never get a nonzero value.
6190 2002-10-02  Roger Sayle  <roger@eyesopen.com>
6192         PR optimization/6627
6193         * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
6194         from here, and move it to tree.h.
6195         * decl.c (cxx_init_decl_processing): If storing the vbit
6196         in function pointers, ensure that force_align_functions_log
6197         is atleast one.
6199 2002-10-02  Matt Austern  <austern@apple.com>
6201         * class.c (check_field_decls): Changed warning about const member
6202         variables so that it doesn't get issued for a class aggregate.
6204 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
6206         * decl.c (cp_finish_decl): Make sure array types are laid out,
6207         even if the array bounds are unknown.
6209 2002-10-01  Steve Ellcey  <sje@cup.hp.com>
6211         * class.c (build_vtbl_initializer): Change build_c_cast
6212         to build1.
6214 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
6216         * decl.c (cp_finish_decl): Make sure array types are laid out,
6217         even if the array bounds are unknown.
6219         * decl.c (cp_finish_decl): Correct check for dynamic
6220         initialization of thread-local storage.
6222 2002-09-30  Nathan Sidwell  <nathan@codesourcery.com>
6224         * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
6225         overloaded.
6227 2002-09-30  Steve Ellcey  <sje@cup.hp.com>
6229         * class.c (build_vtbl_initializer): Add cast.
6230         (add_vcall_offset_vtbl_entries_1):
6231         Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
6233 2002-09-30  Mark Mitchell  <mark@codesourcery.com>
6235         * class.c (walk_subobject_offsets): Correct the calculation of
6236         offsets for virtual bases.  Correct the counting of array
6237         elements.
6238         (layout_nonempty_base_or_field): Simplify.  Correct the
6239         calculation of offsets to be propagated through the binfo
6240         hierarchy.
6241         (build_base_field): Avoid creating a FIELD_DECL for empty bases.
6242         Add the FIELD_DECL to TYPE_FIELDS.
6243         (build_base_fields): Adjust accordingly.
6244         (layout_virtual_bases): Use build_base_field.
6245         (end_of_class): Return a tree, not an integer.
6246         (warn_about_ambiguous_direct_bases): Rename to ...
6247         (warn_about_ambiguous_bases): ... this.
6248         (include_empty_classes): New function.
6249         (layout_class_type): Create an alternative version of the type to
6250         be used when as a base class type.  Do not call
6251         finish_record_layout until we are done laying out the class.
6252         * cp-tree.h (lang_type_class): Remove size, size_unit.  Add
6253         as_base.
6254         (CLASSTYPE_SIZE): Reimplement.
6255         (CLASSTYPE_SIZE_UNIT): Likewise.
6256         (CLASSTYPE_ALIGN): Likweise.
6257         (CLASSTYPE_USER_ALIGN): Likewise.
6258         (CLASSTYPE_AS_BASE): New macro.
6259         (DECL_INITIALIZED_P): Likewise.
6260         (extract_init): Remove prototype.
6261         (build_forced_zero_init): Rename to ...
6262         (build_zero_init): ... this.
6263         (force_store_init_value): Remove.
6264         * decl.c (obscure_complex_init): Remove.
6265         (duplicate_decls): Copy DECL_INITIALIZED_P.
6266         (check_initializer): Do not leave junk in DECL_INITIAL.
6267         (cp_finish_decl): Handle zero-initialization of entities with
6268         static storage duration.
6269         * expr.c (extract_init): Remove.
6270         * init.c (build_forced_zero_init): Remove.
6271         (build_zero_init): New function.
6272         (build_default_init): Use it.
6273         (build_field_list): Skip FIELD_DECLs for base subobjects.
6274         (push_base_cleanups): Likewise.
6275         * method.c (do_build_assign_ref): Likewise.
6276         (synthesize_exception_spec): Likewise.
6277         * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
6278         (regenerate_decl_from_template): To not set DECL_INITIAL for a
6279         static data member whose initialization took place in its class.
6280         (instantiate_decl): Do not pass an initializer to cp_finish_decl
6281         in that situation.
6282         * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
6283         (dfs_unuse_fields): Likewise.
6284         * tree.c (pod_type_p): Handle error_mark_node.
6285         (zero_init_p): Likewise.
6286         * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
6287         subobjects.
6288         * typeck2.c (store_init_value): Remove #if 0'd code.
6289         (force_store_init_value): Remove.
6290         (process_init_constructor): Use build_zero_init.
6292 2002-09-29  Nathan Sidwell  <nathan@codesourcery.com>
6294         PR c++/7788
6295         * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
6297 2002-09-29  Kazu Hirata  <kazu@cs.umass.edu>
6299         * cp-tree.h: Fix comment typos.
6300         * decl.c: Likewise.
6301         * pt.c: Likewise.
6303 2002-09-25  Mark Mitchell  <mark@codesourcery.com>
6305         * cp/class.c (contains_empty_class_p): New method.
6306         (walk_subobject_offsets): Correct computation of field offset.
6307         (layout_empty_base): Correct placement of emtpy base classes.
6308         (layout_class_type): Warn about ABI changes.
6310 2002-09-23  Mark Mitchell  <mark@codesourcery.com>
6312         * cp/class.c (layout_virtual_bases): Do not round the size of the
6313         type to a multiple of the alignment before laying out virtual bases.
6314         (layout_class_type): Correct handling of bit-fields that are wider
6315         than their type inside unions.  Round the size of the type to a
6316         even number of bytes when computing the size without virtual
6317         bases.
6318         * cp/cp-tree.h (abi_version_at_least): New macro.
6320 2002-09-21  Kazu Hirata  <kazu@cs.umass.edu>
6322         * ChangeLog: Follow spelling conventions.
6323         * ChangeLog.2: Likewise.
6324         * call.c: Likewise.
6325         * class.c: Likewise.
6326         * cp-tree.h: Likewise.
6327         * cvt.c: Likewise.
6328         * decl.c: Likewise.
6329         * decl2.c: Likewise.
6330         * except.c: Likewise.
6331         * friend.c: Likewise.
6332         * g++spec.c: Likewise.
6333         * init.c: Likewise.
6334         * lex.c: Likewise.
6335         * mangle.c: Likewise.
6336         * method.c: Likewise.
6337         * operators.def: Likewise.
6338         * optimize.c: Likewise.
6339         * pt.c: Likewise.
6340         * rtti.c: Likewise.
6341         * search.c: Likewise.
6342         * semantics.c: Likewise.
6343         * spew.c: Likewise.
6344         * tree.c: Likewise.
6345         * typeck.c: Likewise.
6347 2002-09-18  Devang Patel  <dpatel@apple.com>
6349         * cp/cp-tree.h: New prototype for walk_vtabls().
6350         * cp/decl.c (walk_vtables_r): New function.
6351         (struct cp_binding_level): Add new members, namespaces,
6352         names_size and vtables.
6353         (add_decl_to_level): Add decl in namespaces or vtables
6354         chain, if conditions match.
6355         (walk_vtables): New function.
6356         (walk_namespaces_r): Travers separate namespace chain
6357         for namespace decls.
6358         (wrapup_globals_for_namespace): Use names_size instead
6359         of list_length().
6360         * cp/decl2.c (finish_file): Use walk_vtables() instead of
6361         walk_globals() to walk vtable decls.
6363 2002-09-18  Nathan Sidwell  <nathan@codesourcery.com>
6365         * decl.c (grokdeclarator): Use assert, not internal_error. Don't
6366         ICE with invalid pointers & references.
6368 2002-09-17  Zack Weinberg  <zack@codesourcery.com>
6370         * Make-lang.in: Remove all references to the demangler.
6371         * cxxfilt.c: Moved to binutils.
6373 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
6375         PR c++/7718
6376         * pt.c (tsubst_decl): Remove assert.
6378         Remove DR 295 implementation.
6379         * pt.c (check_cv_quals_for_unify): Disable function & method cases.
6380         * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
6381         about ignoring volatile qualifiers.
6383         * search.c (lookup_member): Correct documentation.
6385 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
6387         * cp-tree.h (union lang_tree_node): Add chain_next option.
6389 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
6391         * parse.y (parse_finish_call_expr): Check lookup_member result.
6393         PR c++/7015
6394         * semantic.c (finish_asm_stmt): Fix operand/output_operands
6395         thinko.
6396         * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
6398 2002-09-15  Nathan Sidwell  <nathan@codesourcery.com>
6400         PR c++/7919
6401         * call.c (build_over_call): Convert this pointer for fns found by
6402         using decls.
6404 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
6406         * ChangeLog: Follow spelling conventions.
6407         * ChangeLog.1: Likewise.
6409 2002-09-14  Nathan Sidwell  <nathan@codesourcery.com>
6411         PR c++/7768
6412         * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
6414 2002-09-14  Kazu Hirata  <kazu@cs.umass.edu>
6416         * error.c: Fix comment formatting.
6417         * except.c: Likewise.
6418         * expr.c: Likewise.
6419         * friend.c: Likewise.
6420         * g++spec.c: Likewise.
6421         * init.c: Likewise.
6422         * lex.c: Likewise.
6423         * mangle.c: Likewise.
6424         * method.c: Likewise.
6425         * optimize.c: Likewise.
6426         * pt.c: Likewise.
6427         * rtti.c: Likewise.
6428         * search.c: Likewise.
6429         * semantics.c: Likewise.
6430         * spew.c: Likewise.
6431         * tree.c: Likewise.
6432         * typeck.c: Likewise.
6433         * typeck2.c: Likewise.
6435 2002-09-13  Matt Austern  <austern@apple.com>
6437         PR C++/7828
6438         * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
6439         * cp/call.c: Change call-by-const-reference mechanism to use
6440         non_cast_lvalue_p when deciding whether the create a temporary.
6441         We need a temporary when passing, e.g. (long) x by const ref.
6443 2002-09-13  Nathan Sidwell  <nathan@codesourcery.com>
6445         * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
6447 2002-09-13  Kazu Hirata  <kazu@cs.umass.edu>
6449         * decl.c: Fix comment formatting.
6450         * decl2.c: Likewise.
6452 2002-09-12  Kazu Hirata  <kazu@cs.umass.edu>
6454         * call.c: Fix comment formatting.
6455         * class.c: Likewise.
6456         * cp-lang.c: Likewise.
6457         * cp-tree.h: Likewise.
6458         * cvt.c: Likewise.
6460 2002-09-11  Zack Weinberg  <zack@codesourcery.com>
6462         * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
6463         and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
6464         * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
6465         minor adjustments (use version_string, eliminate yet another
6466         duplicate of xmalloc)
6468 2002-09-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6470         * cp-tree.h (require_complete_eh_spec_types): Add prototype.
6472 2002-09-05  Jason Merrill  <jason@redhat.com>
6474         * typeck2.c (add_exception_specifier): Only pedwarn for an
6475         incomplete type.
6476         (require_complete_eh_spec_types): New fn.
6477         (cxx_incomplete_type_diagnostic): Also support pedwarning.
6478         * typeck.c (complete_type_or_diagnostic): Likewise.
6479         * call.c (build_call): Call require_complete_eh_spec_types.
6480         * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
6481         on an incomplete type.
6483 2002-09-04  Jakub Jelinek  <jakub@redhat.com>
6485         * decl.c (start_cleanup_fn): Clear interface_only before
6486         start_function, restore it afterwards.
6488 2002-09-02  Nathan Sidwell  <nathan@codesourcery.com>
6490         * cp-tree.h (finish_builtin_type): Remove.
6491         * decl2.c (finish_builtin_type): Move to common code.
6492         * decl.c (build_ptrmemfunc_type): Adjust.
6493         * rtti.c (create_pseudo_type_info): Adjust.
6494         (create_tinfo_types): Adjust.
6496 2002-08-31  Jason Merrill  <jason@redhat.com>
6498         * cp-lang.c (cp_expr_size): Allow initialization from a
6499         CONSTRUCTOR.
6501 2002-08-30  Richard Henderson  <rth@redhat.com>
6503         PR opt/7515
6504         * tree.c: Include target.h.
6505         (cp_cannot_inline_tree_fn): Don't auto-inline functions that
6506         don't bind locally.
6507         * Makefile.in (tree.o): Update.
6509 2002-08-27  Mark Mitchell  <mark@codesourcery.com>
6511         * class.c (layout_virtual_bases): Warn about bugs in G++ that
6512         result in incorrect object layouts.
6513         (layout_class_type): Likewise.
6515 2002-08-24  Matt Austern  <austern@apple.com>
6517         * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
6518         are allowable.
6519         (real_lvalue_p): Update caller.
6520         (lvalue_p): Ditto.
6521         (non_cast_lvalue_or_else): New.
6522         * tree.h: Declare it.
6523         * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
6525 2002-08-22  Mark Mitchell  <mark@codesourcery.com>
6527         * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
6528         and COND_EXPR specially; fix error message output.
6530 2002-08-22  Jason Merrill  <jason@redhat.com>
6532         * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
6533         * semantics.c (nullify_returns_r): Likewise.
6535 2002-08-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6537         Fix PR/7621
6538         * typeck.c (finish_class_member_access_expr): Diagnose cases where
6539         name lookup finds nothing.
6541 2002-08-15  Jason Merrill  <jason@redhat.com>
6543         * semantics.c (finish_then_clause): Remove redundant assignment.
6544         (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
6545         extra binding level outside the if/switch statement.
6546         (finish_while_cond, finish_for_cond): Rewrite complex condition
6547         into the loop body.
6549 2002-08-15  Alexandre Oliva  <aoliva@redhat.com>
6551         * parse.y (sizeof, alignof, typeof): New non-terminals to
6552         increment skip_evaluation.  Replace terminals with them and
6553         decrement skip_evaluation at the end of rules using them.
6554         * decl2.c (mark_used): Don't assemble_external if
6555         skipping evaluation.
6557 2002-08-15  Gabriel Dos Reis  <gdr@nerim.net>
6559         Fix PR/7504
6560         * parse.y (parse_finish_call_expr): Handle incomplete
6561         type used to name a scope.
6563 2002-08-15  Nathan Sidwell  <nathan@codesourcery.com>
6565         PR c++/7598
6566         * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
6567         regression caused by my 2002-08-08 patch.
6569 2002-08-13  Mark Mitchell  <mark@codesourcery.com>
6571         * decl.c (pushdecl_class_level): Honor requests to bind names to
6572         OVERLOADs.
6574 2002-08-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6576         * decl2.c (build_call_from_tree): Fix uninitialized variable.
6577         * parse.y (parse_finish_call_expr): Likewise.
6578         * repo.c (old_args, old_dir, old_main): Const-ify.
6580 2002-08-11  Gabriel Dos Reis  <gdr@nerim.net>
6582         * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE
6583         DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
6584         * optimize.c (maybe_clone_body): Likewise.
6585         * pt.c (tsubst_enum): Likewise.
6586         (lookup_template_class): Likewise.
6587         * tree.c (cp_copy_res_decl_for_inlining): Likewise.
6589 2002-08-10  Neil Booth  <neil@daikokuya.co.uk>
6591         * lang-specs.h: Remove -ansi.
6593 2002-08-10  Nathan Sidwell  <nathan@codesourcery.com>
6595         * tree.c (maybe_dummy_object): Replace // with /* */
6597 2002-08-09  Mark Mitchell  <mark@codesourcery.com>
6599         * call.c (standard_conversion): Use build_ptrmem_type.
6600         * cp-tree.h (build_ptrmem_type): New function.
6601         (adjust_result_of_qualified_name_lookup): Likewise.
6602         * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
6603         static data members.
6604         (build_ptrmem_type): New function.
6605         (grokdeclarator): Do not use build_offset_type when encountering a
6606         qualified name.
6607         * parse.y (parse_finish_call_expr): Use
6608         adjust_result_of_qualified_name_lookup.
6609         * search.c (adjust_result_of_qualified_name_lookup): New function.
6610         * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
6611         accessing OFFSET_TYPEs directly.
6613 2002-08-08  Mike Stump  <mrs@apple.com>
6615         * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
6616         (type_decays_to): Likewise.
6617         * class.c (find_final_overrider): Likewise.
6618         (maybe_note_name_used_in_class): Likewise.
6619         * decl.c (current_tmpl_spec_kind): Likewise.
6620         (add_binding): Likewise.
6621         (push_class_binding): Likewise.
6622         (duplicate_decls): Likewise.
6623         (layout_var_decl): Likewise.
6624         (grokfndecl): Likewise.
6625         (grokdeclarator): Likewise.
6626         (check_default_argument): Likewise.
6627         * decl2.c (handle_class_head): Likewise.
6628         * error.c (dump_template_decl): Likewise.
6629         * init.c (build_offset_ref): Likewise.
6630         * pt.c (check_specialization_scope): Likewise.
6631         (determine_specialization): Likewise.
6632         (check_explicit_specialization): Likewise.
6633         (maybe_check_template_type): Likewise.
6634         (process_partial_specialization): Likewise.
6635         (check_default_tmpl_args): Likewise.
6636         (push_template_decl_real): Likewise.
6637         (convert_template_argument): Likewise.
6638         (try_class_unification): Likewise.
6639         (get_bindings_real): Likewise.
6640         (do_decl_instantiation): Likewise.
6641         * semantics.c (begin_function_definition): Likewise.
6642         (finish_member_declaration): Likewise.
6643         (check_multiple_declarators): Likewise.
6644         * typeck.c (comp_array_types): Likewise.
6645         (comptypes): Likewise.
6646         (expr_sizeof): Likewise.
6647         (build_binary_op): Likewise.
6648         (dubious_conversion_warnings): Likewise.
6649         (check_return_expr): Likewise.
6651 2002-08-08  Mark Mitchell  <mark@codesourcery.com>
6653         * typeck.c (build_class_member_access_expr): Do not return
6654         error_mark_node when no error has occurred.
6656 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
6658         * typeck.c (build_component_addr): Remove.
6659         (build_unary_op): Just check it's not a bitfield, and then build
6660         an ADDR_EXPR.
6662 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
6664         * class.c (convert_to_base): Correct check for error_mark_node.
6665         (create_vtable_ptr): Remove unused VFUNS_P parm.
6667 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
6669         * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
6671 2002-08-07  Mark Mitchell  <mark@codesourcery.com>
6673         Rework build_component_ref.
6674         * call.c (build_vfield_ref): Do not go through build_component_ref.
6675         (build_field_call): Use build_class_member_access_expr.
6676         (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
6677         (build_object_call): Likewise.
6678         * class.c (convert_to_base): New function.
6679         (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
6680         (instantiate_type): Handle BASELINKs.
6681         * cp-tree.def (BASELINK): New tree code.
6682         * cp-tree.h (BASELINK_P): Reimplement.
6683         (SET_BASELINK_P): Remove.
6684         (BASELINK_BINFO): Reimplement.
6685         (BASELINK_FUNCTIONS): Likewise.
6686         (BASELINK_ACCESS_BINFO): Likewise.
6687         (BASELINK_OPTYPE): Likewise.
6688         (convert_to_base): New function.
6689         (name_p): Likewise.
6690         (build_object_ref): Remove.
6691         (build_component_ref_1): Likewise.
6692         (build_component_ref): Likewise.
6693         (build_x_component_ref): Likewise.
6694         (build_class_member_access_expr): New function.
6695         (finish_class_member_access_expr): Likewise.
6696         (build_ptrmemfunc_access_expr): Likewise.
6697         * decl.c (grokdeclarator): Handle BASELINKs.
6698         * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
6699         finish_class_member_access_expr.
6700         (arg_assoc): Handle BASELINKs.
6701         (do_class_using_decl): Likewise.
6702         * error.c (dump_decl): Likewise.
6703         (dump_expr): Use build_ptrmemfunc_access_expr.
6704         * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
6705         destructors.
6706         (build_throw): Use BASELINK_FUNCTIONS.
6707         * init.c (perform_member_init): Use
6708         build_class_member_access_expr.
6709         (build_offset_ref): Handle BASELINKs.  Use
6710         build_class_member_access_expr.
6711         * method.c (hack_identifier): Likewise.
6712         * parse.y (do_id): Use BASELINK, not TREE_LIST.
6713         (primary): Remove uses of build_object_ref.
6714         * pt.c (lookup_template_function): Handle BASELINKs.
6715         (resolve_overloaded_unification): Likewise.
6716         * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
6717         (lookup_field): Use BASELINK, not TREE_LIST.
6718         (lookup_fnfiels): Likewise.
6719         (setup_class_bindings): Likewise.
6720         * semantics.c (finish_object_call_expr): Do not use
6721         build_method_call when we already know what function is being
6722         called.
6723         * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
6724         * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
6725         TREE_CHAIN.
6726         (name_p): New function.
6727         * typeck.c (build_object_ref): Remove.
6728         (build_component_ref_1): Likewise.
6729         (build_x_component_ref): Likewise.
6730         (build_class_member_access_expr): New function.
6731         (finish_class_member_access_expr): Likewise.
6732         (build_ptrmemfunc_access_expr): Likewise.
6733         (get_member_function_from_ptrfunc): Use
6734         build_ptrmemfunc_access_expr.
6735         (build_binary_op): Likewise.
6736         (build_unary_op): Likewise.
6737         (build_ptrmemfunc): Likewise.
6738         (pfn_from_ptrmemfunc): Likewise.
6739         * typeck2.c (build_m_component_ref): Adjust comment.
6741 2002-08-07  Neil Booth  <neil@daikokuya.co.uk>
6743         * Make-lang.in (CXX_C_OBJS): Update.
6744         * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
6745         * cp-tree.h (cxx_decode_option): Remove.
6746         * decl2.c (compare_options, lang_f_options, unsupported_options,
6747         cxx_decode_option): Remove.
6749 2002-08-06  Gabriel Dos Reis  <gdr@nerim.net>
6751         * typeck.c (build_x_unary_op): Handle pointer-to-member.
6753 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
6755         * class.c: Don't include obstack.h.
6756         (popclass):
6757         * decl2.c: Delete bogus comment.
6758         * error.c: Don't include obstack.h.
6759         * except.c: Likewise.
6760         (dump_type): Correct comment.
6761         * method.c: Don't include obstack.h.
6762         * tree.c: Likewise.
6764 2002-08-04  Gabriel Dos Reis  <gdr@nerim.net>
6766         Fix PR/2213
6767         * cvt.c (cp_convert_to_pointer): Reject conversions from integral
6768         expressions to pointer-to-data-member of pointer-to-member-functions.
6770 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
6772         * cvt.c (ocp_convert): Delete obsolete code.
6773         * parse.y (permanent_obstack): Delete declaration.
6774         * pt.c (permanent_obstack): Delete declaration.
6775         * repo.c (permanent_obstack): Delete declaration.
6776         (open_repo_file): Use xmalloc instead of permanent_obstack.
6777         (init_repo): Use xstrdup instead of permanent_obstack.
6779 2002-08-04  Nathan Sidwell  <nathan@codesourcery.com>
6781         * cp-tree.h (VF_DERIVED_VALUE): Remove.
6782         * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
6784 2002-08-03  Nathan Sidwell  <nathan@codesourcery.com>
6786         PR 7470.
6787         C++ ABI change - vfunc ordering.
6788         * class.c (add_virtual_function): Remove.
6789         (dfs_modify_all_vtables): Take list of all declared
6790         virtuals. Assign all that are not in primary base.
6791         (check_for_override): Adjust comments.
6792         (create_vtable_ptr): Take single list of virtuals. Build chain
6793         of declared virtuals here.
6794         (layout_class_type): Take single list of virtuals. Adjust.
6795         (finish_struct_1): Keep virtuals on single list. Adjust.
6797 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
6799         * init.c (build_member_call): Use build_new_method_call, not
6800         build_method_call.
6802 2002-08-02  Krister Walfridsson  <cato@df.lth.se>
6804         * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
6806 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
6808         * call.c (build_method_call): Issue a more helpful error message
6809         about ambiguous method names.
6811 2002-08-02  Nathan Sidwell  <nathan@codesourcery.com>
6813         * tree.c (build_shared_int_cst): Make cache file scope, and
6814         GTY it.
6816 2002-08-02  Jason Merrill  <jason@redhat.com>
6818         * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
6819         (cp_expr_size): New fn.
6820         * call.c (build_over_call): Lose empty class hackery.
6821         (convert_arg_to_ellipsis): Promote non-POD warning to error.
6822         * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
6824         * semantics.c (expand_body): Do tree optimization in the function
6825         context, too.
6827 2002-08-01  Neil Booth  <neil@daikokuya.co.uk>
6829         * cp-tree.h: Move all warning and flag declarations to c-common.h.
6830         * decl.c: Move all warning and flag variables to c-common.c.
6831         * decl2.c: Move all warning and flag variables to c-common.c.
6832         * lex.c (flag_digraphs): Remove.
6833         (warn_traditional): Now in c-common.c.
6835 2002-07-31  Mark Mitchell  <mark@codesourcery.com>
6837         * call.c (build_field_call): Do not look up the field by name.
6838         (build_method_call): Simplify.
6839         (struct z_candidate): Add access_path and conversion_path.  Remove
6840         basetype_path.
6841         (convert_class_to_reference): Adjust use of
6842         add_function_candidate.
6843         (add_candidate): Add conversion_path argument.
6844         (add_function_candidate): Use it.
6845         (add_conv_dndidate): Likewise.
6846         (build_builtin_candidate): Likewise.
6847         (add_template_candidate_real): Add conversion_path argument.
6848         (add_template_conv_candidate): Likewise.
6849         (add_template_candidate): Likewise.
6850         (build_user_type_conversion_1): Use it.
6851         (build_new_function_call): Remove name lookup code.  Adjust use of
6852         add_template_candidate and add_function_candidate.
6853         (build_new_op): Likewise.
6854         (convert_like_real): Use build_special_member_call.
6855         (build_over_call): Use cand->conversion_path.
6856         (build_special_member_call): New method.
6857         (build_new_method_call): Remove name lookup code.
6858         * cp-tree.def (OFFSET_REF): Update documentation.
6859         (TEMPLATE_ID_EXPR): Likewise.
6860         * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
6861         (BASELINK_OPTYPE): Likewise.
6862         (build_new_method_call): Adjust prototype.
6863         (build_special_member_call): New method.
6864         (build_baselink): New method.
6865         (build_offset_ref_call_from_tree): Likewise.
6866         (build_call_from_tree): Likewise.
6867         (finish_qualified_call_expr): Remove.
6868         (finish_call_expr): Adjust prototype.
6869         (build_x_function_call): Remove.
6870         * cvt.c (ocp_convert): Use build_special_member_call.
6871         * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
6872         (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
6873         CALL_EXPR.
6874         (build_offset_ref_call_from_tree): New function.
6875         (build_call_from_tree): Likewise.
6876         * init.c (expand_cleanup): Use build_special_member_call.
6877         (expand_default_init): Likewise.
6878         (build_member_call): Use finish_call_expr.
6879         (build_new_1): Use build_special_member_call.
6880         (push_base_cleanups): Likewise.
6881         * method.c (do_build_assign_ref): Likewise.
6882         * parse.y (template_id): Do not pass a COMPONENT_REF to
6883         lookup_template_function.
6884         (primary): Use parse_finish_call_epxr, not finish_call_expr.
6885         (parse_finish_call_expr): New function.
6886         * pt.c (lookup_template_function): Add assertions.
6887         * search.c (lookup_base): Allow T to be a binfo.
6888         (build_baselink): New function.
6889         (lookup_member): Use it.
6890         * semantics.c (finish_call_expr): Do not do name lookup.
6891         (finish_object_call_expr): Remove #if 0'd code.
6892         (finish_qualified_call_expr): Remove.
6893         * typeck.c (build_x_function_call): Remove.
6894         (build_static_case): Use build_special_member_call.
6895         * typeck2.c (build_functional_cast): Likewise.
6897 2002-07-30  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
6899         * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
6901 2002-07-30  Gabriel Dos Reis  <gdr@nerim.net>
6903         * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
6905 2002-07-30  Nathan Sidwell  <nathan@codesourcery.com>
6907         * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
6908         documentation.
6910 2002-07-29  Alan Modra  <amodra@bigpond.net.au>
6912         * cp-tree.h: Comment typo fix.
6914 2002-07-29  Richard Earnshaw  <rearnsha@arm.com>
6916         * spew.c (space_for_token): Allocate zeroed memory for a new token
6917         chunk.
6919 2002-07-27  Roger Sayle  <roger@eyesopen.com>
6921         * decl.c (builtin_function_1): No need to explicitly mark
6922         BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
6924 2002-07-27  Roger Sayle  <roger@eyesopen.com>
6926         * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
6928 2002-07-26  Jason Merrill  <jason@redhat.com>
6930         * call.c (build_over_call): Likewise.
6931         (cp_convert_parm_for_inlining): New fn.
6932         (convert_for_arg_passing): New fn.
6933         (convert_default_arg, build_over_call): Use it.
6934         (type_passed_as): New fn.
6935         * pt.c (tsubst_decl): Use it.
6936         * decl2.c (cp_build_parm_decl): New fn.
6937         (build_artificial_parm): Use it.
6938         (start_static_storage_duration_function): Likewise.
6939         * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
6940         (grokparms): Don't mess with DECL_ARG_TYPE.
6941         * typeck.c (convert_arguments): Use convert_for_arg_passing.
6942         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
6943         Define.
6944         * cp-tree.h: Declare new fns.
6946 2002-07-26  Neil Booth  <neil@daikokuya.co.uk>
6948         * cp-tree.h (flag_operator_names): Remove.
6949         * decl2.c (flag_operator_names): Remove.
6950         (lang_f_options): Remove operator-names.
6951         * lex.c (D_OPNAME): Remove.
6952         (reswords): Remove operator names.
6953         (rid_to_yy): Remove operator names.
6954         (init_reswords): No need to handle D_OPNAME.
6955         * spew.c (read_process_identifier): There are no operator
6956         names.
6958 2002-07-26  Jason Merrill  <jason@redhat.com>
6960         * dump.c (cp_dump_tree): Call c_dump_tree.
6961         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
6963 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
6965         * error.c (print_whitespace): Remove.
6966         * g++spec.c (LIBUNWIND): Move.
6967         * mangle.c (mangled_position, write_signed_number): Remove.
6969 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
6971         * decl2.c (cxx_decode_option): Similarly.
6973 2002-07-25  Gabriel Dos Reis  <gdr@nerim.net>
6975         * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
6976         (cxx_sizeof_or_alignof_type): Take a third argument.
6977         (cxx_sizeof): Adjust definition.
6978         (cxx_alignof): Likewise.
6979         * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
6980         * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
6981         complaining.
6982         (c_sizeof_nowarn): Remove definition.
6983         (build_unary_op): Use cxx_sizeof_nowarn.
6985 2002-07-24  Geoffrey Keating  <geoffk@redhat.com>
6987         * tree.c (cp_build_qualified_type_real): When copying
6988         pointer-to-method types, unshare the record that holds
6989         the cached pointer-to-member-function type.
6991 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
6993         * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
6995 2002-07-23  Gabriel Dos Reis  <gdr@nerim.net>
6997         Fix PR/7363:
6998         * typeck.c (cxx_sizeof_or_alignof_type): New function.
6999         (c_sizeof): Remove definition.
7000         (expr_sizeof): Use cxx_sizeof.
7001         * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
7002         * decl.c (finish_destructor_body): Use cxx_sizeof.
7003         * semantics.c (finish_alignof): Likewise.
7004         (finish_alignof): Use cxx_alignof.
7005         * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
7006         (cxx_sizeof_or_alignof_type): Declare.
7007         (my_friendly_assert): Move to ../c-common.h.
7009 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
7011         * class.c, method.c, pt.c, search.c: Don't define obstack macros.
7013 2002-07-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7015         PR c++/7347, c++/7348
7016         * cp-tree.h (tsubst_flags_t): Add tf_parsing.
7017         * decl.c (make_typename_type): Use it.
7018         (make_unbound_class_template): Likewise.
7019         (lookup_name_real): Don't call type_access_control if scope is
7020         template parameter dependent.
7021         * parse.y (template_arg): Call make_unbound_class_template with
7022         tf_parsing set.
7023         (nest_name_specifier): Call make_typename_type with tf_parsing set.
7024         (typename_sub0): Likewise.
7025         (typename_sub1): Likewise.
7026         (instantiate_decl): Push class scope.
7027         * pt.c (regenerate_decl_from_template): Call pushclass and popclass
7028         for both static variable and member function template.
7029         (instantiate_decl) Call pushclass and popclass when tsubst'ing type
7030         and arguments.
7031         * search.c (type_access_control): Do type access for TEMPLATE_DECL
7032         too.
7034 2002-07-20  Roger Sayle  <roger@eyesopen.com>
7036         * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
7037         test by using positive_option.  Make whitespace consistent.
7039 2002-07-20  Gabriel Dos Reis  <gdr@nerim.net>
7041         * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
7042         members with 'locus'.  Adjust use throughout.
7043         (struct feed):  Likewise.
7044         (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
7045         Adjust use.
7046         (snarf_defarg): Use error(), not error_with_file_and_line().
7048 2002-07-19  Chris Demetriou  <cgd@broadcom.com>
7050         * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
7051         cpp_options is included.
7053 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7055         PR c++/2862, c++/2863
7056         * pt.c (determine_specialization): Compare the length of
7057         TYPE_ARG_TYPES.  Tidy.
7059 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7061         PR c++/3797
7062         * decl.c (duplicate_decls): Don't propagate inlining parameters from
7063         olddecl to newdecl when newdecl is a specialization of the
7064         instantiation olddecl.
7066 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7068         PR c++/4802, c++/5387
7069         * decl.c (make_typename_type): Use enforce_access.
7071 2002-07-17  Scott Snyder <snyder@fnal.gov>
7073         PR c++/7320
7074         * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
7076 2002-07-12  Mark Mitchell  <mark@codesourcery.com>
7078         * class.c (add_method): Correct handling of conversion operators.
7080 2002-07-11  Mark Mitchell  <mark@codesourcery.com>
7082         PR c++/7224
7083         * class.c (add_method): Simplify.
7085 2002-07-11  Jason Merrill  <jason@redhat.com>
7087         PR c++/7279
7088         * tree.c (cp_copy_res_decl_for_inlining): Also copy
7089         TREE_ADDRESSABLE.
7091 2002-07-10  Graham Stott  <graham.stott@btinternet.com>
7093         * pt.c (template_parm_this_level_p, push_template_decl_real):
7094         Pass depth as int pointer.
7096 2002-07-11  Tim Josling  <tej@melbpc.org.au>
7098         Remove front end hard coding from gengtype.c.
7100         * config-lang.in (gtfiles): Add files needed for this front end.
7102 2002-07-10  Mark Mitchell  <mark@codesourcery.com>
7104         * cp-tree.h (unqualified_name_lookup_error): Declare it.
7105         (begin_function_definition): Adjust prototype.
7106         * lex.c (unqualified_name_lookup_error): New function, split out
7107         from ...
7108         (do_identifier): ... here.
7109         * parse.y (parse_begin_function_definition): New function.
7110         (fn.def1): Use it.
7111         * semantics.c (begin_function_definition): Accept decl-specifiers
7112         and attributes as separate parameters.
7114 2002-07-10  Jason Merrill  <jason@redhat.com>
7116         PR c++/6255
7117         * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
7118         modifying the old one.
7120 2002-07-09  Mark Mitchell  <mark@codesourcery.com>
7122         * cp-tree.h (constructor_name_p): Declare it.
7123         (check_template_template_default_arg): Likewise.
7124         * class.c (handle_using_decl): Use constructor_name_p.
7125         * decl.c (grokdeclarator): Likewise.
7126         * decl2.c (constructor_name_p): Define it.
7127         * init.c (build_member_call): Use constructor_name_p.
7128         * parse.y (template_parm): Use check_template_template_default_arg.
7129         * pt.c (check_explicit_specialization): Use constructor_name_p.
7130         * semantics.c (check_template_template_default_arg): New function.
7132 2002-07-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7134         * pt.c (can_complete_type_without_circularity): Add static to
7135         function definition.
7137 2002-07-08  Mark Mitchell  <mark@codesourcery.com>
7139         * cp-tree.h (have_extern_spec): Declare it
7140         * decl.c (have_extern_spec): Define it.
7141         (start_decl): Eliminate use of used_extern_spec.
7142         (start_function): Likewise.
7143         * parse.y (have_extern_spec): Remove declaration.
7144         (used_extern_spec): Likewise.
7145         (frob_specs): Eliminate use of used_extern_spec.
7146         (.hush_warning): Likewise.
7148 2002-07-07  Mark Mitchell  <mark@codesourcery.com>
7150         * Make-lang.in (cp/parse.o): Depend on decl.h.
7151         * cp-tree.h (do_decl_instantiation): Change prototype.
7152         * parse.y: Include decl.h.
7153         (parse_decl_instantiation): New function.
7154         (explicit_instantiation): Use it.
7155         * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
7156         and DECLSPECS.
7158 2002-07-07  Roger Sayle  <roger@eyesopen.com>
7160         * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
7161         constructor and destructor tests when passed a TEMPLATE_DECL.
7163 2002-07-05  Jason Merrill  <jason@redhat.com>
7165         * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
7166         pointers.
7168         PR optimization/7145
7169         * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
7171 2002-07-05  Nathan Sidwell  <nathan@codesourcery.com>
7173         Repair damage on weak-impared targets caused by my previous patch.
7174         * cp-tree.h (import_export_tinfo): Add parameter.
7175         * decl2.c (import_export_tinfo): Add parameter, post adjust
7176         DECL_COMDAT.
7177         * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
7178         import_export_tinfo.
7180 2002-07-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7182         PR c++/6944
7183         * init.c (build_aggr_init): Remove qualifiers of init before calling
7184         build_vec_init.
7185         (build_vec_init): Flatten multi-dimensional array during cleanup.
7186         (build_vec_delete_1): Abort if the type of each element is array.
7188 2002-07-03  Graham Stott  <graham.stott@btinternet.com>
7190         * pt.c (instantiate_class_template): Fix typo.
7192 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7194         * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
7195         by CVS conflict in my last patch.
7197 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7199         PR c++/6716
7200         * pt.c (can_complete_type_without_circularity): New function.
7201         (instantiate_class_template): Use it.
7202         * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
7203         message due to incomplete fields.
7205 2002-07-01  Mark Mitchell  <mark@codesourcery.com>
7207         PR c++/7112
7208         * mangle.c (write_expression): Add mangling for sizeof when
7209         applied to a type.
7210         * operators.def: Remove stale comment.
7212 2002-06-30  Nathan Sidwell  <nathan@codesourcery.com>
7214         * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
7215         (CPTI_TYPE_INFO_PTR_TYPE): ... this.
7216         (tinfo_decl_type): Replace with ...
7217         (type_info_ptr_type): ... this.
7218         (import_export_tinfo): Declare.
7219         (tinfo_decl_p): Rename to ...
7220         (unemitted_tinfo_decl_p): ... this.
7221         * decl2.c (import_export_decl): Break out tinfo handling into ...
7222         (import_export_tinfo): ... here. New function.
7223         (finish_file): Adjust.
7224         * rtti.c (TINFO_REAL_NAME): New macro.
7225         (init_rtti_processing): Create the tinfo types.
7226         (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
7227         (get_tinfo_decl): Adjust.
7228         (get_tinfo_ptr): New function.
7229         (get_type_id): Use it.
7230         (tinfo_base_init): Create vtable decl here, if it doesn't exist.
7231         (ptr_initializer): Use get_tinfo_ptr.
7232         (ptm_initializer): Likewise.
7233         (synthesize_tinfo_var): Break into ...
7234         (get_pseudo_ti_init): ... this. Just create the initializer.
7235         (get_pseudo_ti_desc): .. and this.
7236         (create_real_tinfo_var): Remove.
7237         (create_pseudo_type_info): Don't create the vtable decl here.
7238         (get_vmi_pseudo_type_info): Remove.
7239         (create_tinfo_types): Adjust.
7240         (tinfo_decl_p): Rename to ...
7241         (unemitted_tinfo_decl_p): ... here. Adjust.
7242         (emit_tinfo_decl): Adjust. Create the initializer.
7244 2002-06-27  Mark Mitchell  <mark@codesourcery.com>
7246         PR c++/6695
7247         * pt.c (tsubst_friend_class): Substitute into the context of the
7248         friend before using it.
7250 2002-06-26  Mark Mitchell  <mark@codesourcery.com>
7252         * cp-tree.h (xref_tag): Change prototype.
7253         (handle_class_head): Likewise.
7254         (build_x_component_ref): Likewise.
7255         * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
7256         (xref_tag): Take attributes as a separate parameter.
7257         (xref_tag_from_type): Adjust call to xref_tag.
7258         * decl2.c (build_expr_from_tree): Adjust call to
7259         build_x_component_ref.
7260         (handle_class_head): Take attributes as a separate parameter.
7261         * parse.y (parse_xref_tag): New function.
7262         (parse_handle_class_head): Likewise.
7263         (primary): Use parse_xref_tag.
7264         (class_head_decl): Use parse_handle_class_head.
7265         (class_head_defn): Likewise.
7266         * rtti.c (init_rtti_processing): Adjust call to xref_tag.
7267         (build_dynamic_cast_1): Likewise.
7268         (create_pseudo_type_info): Likewise.
7269         (emit_support_tinfos): Likewise.
7270         * typeck.c (build_object_ref): Adjust call to
7271         build_x_component_ref.
7272         (build_x_component_ref): Remove protect parameter.
7274 2002-06-25  Mark Mitchell  <mark@codesourcery.com>
7276         * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
7277         * class.c (handle_using_decl): Likewise.
7278         (instantiate_type): Likewise.
7279         * cp-tree.h (BASELINK_FUNCTIONS): New macro.
7280         (xref_basetypes): Change prototype.
7281         (begin_mem_initializers): New function.
7282         (get_overloaded_fn): Likewise.
7283         * decl.c (xref_basetypes): Simplify.
7284         * error.c (dump_expr): Use BASELINK_FUNCTIONS.
7285         * init.c (build_offset_ref): Likewise.
7286         * parse.y (base_init): Use begin_mem_initializers().
7287         (structsp): Adjust call to xref_basetypes.
7288         * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
7289         (instantiate_class_template): Adjust call to xref_basetypes.
7290         * semantics.c (begin_mem_initializers): New function.
7291         * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
7292         (really_overlaoded_fn): Likewise.
7293         (get_overloaded_fn): New function.'
7294         (get_first_fn): USe BASELINK_FUNCTIONS.
7296 2002-06-24  Mark Mitchell  <mark@codesourcery.com>
7298         * cp-tree.h (SCALAR_TYPE_P): New macro.
7299         (check_for_out_of_scope_variable): New function.
7300         (at_class_scope_p): Likewise.
7301         (finish_fname): Likewise.
7302         * class.c (finish_struct): Use at_function_scope_p.
7303         * decl.c (check_for_out_of_scope_variable): New function, split
7304         out from do_identifier.
7305         (finish_enum): Use at_function_scope_p.
7306         * lex.c (do_identifier): Use check_for_out_of_scope_variable.
7307         * parse.y (VAR_FUNC_NAME): Give it <ttype>.  Use finish_fname.
7308         (primary): Use at_function_scope_p.
7309         * search.c (at_class_scope_p): New function.
7310         * semantics.c (finish_fname): Likewise.
7311         (check_multiple_declarators): Use at_function_scope_p.
7313 2002-06-23  Mark Mitchell  <mark@codesourcery.com>
7315         * parse.y (parse_scoped_id): New function.
7316         (primary): Use it.
7317         * cp-tree.h (do_scoped_id): Adjust declaration.
7318         * lex.c (do_scoped_id): Remove call to yylex.
7319         * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
7320         * typeck2.c (add_exception_specifier): Use tree_cons, rather than
7321         expanding it inline.
7323 2002-06-23  Matt Thomas  <matt@3am-software.com>
7325         * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
7326         "#if VMS_TARGET".
7328 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7330         * mangle.c (integer_type_codes): Const-ify.
7332 2002-06-20  Richard Henderson  <rth@redhat.com>
7334         PR c++/6747
7335         * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
7336         Call put_var_into_stack.
7338 2002-06-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7340         * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
7341         array size calculation.
7343 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7345         PR c++/6892
7346         * pt.c (tsubst_expr): Handle FILE_STMT.
7348 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7350         PR c++/6723
7351         * pt.c (lookup_template_class): Don't build complete argument of
7352         BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
7353         argument.
7355 2002-06-19  Akim Demaille  <akim@epita.fr>
7357         * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
7358         decl.h's TYPENAME.
7359         * spew.c, lex.c: Adjust.
7360         * parse.y (explicit_instantiation): Add empty action to override
7361         the default $$ = $1 where it introduces a type clash.
7363 2002-06-14  Jason Merrill  <jason@redhat.com>
7365         * semantics.c (begin_for_stmt): Push the 'for' scope before
7366         adding the FOR_STMT.
7368         C++ ABI changes.
7369         * class.c (build_base_field): Set DECL_PACKED.
7370         (layout_class_type): Don't use tail padding of PODs.
7371         * mangle.c (write_unqualified_name): Fix template conversion op
7372         mangling.
7374 2002-06-16  Richard Henderson  <rth@redhat.com>
7376         PR opt/6793
7377         * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
7378         after template instantiation.
7380 2002-06-16  Richard Henderson  <rth@redhat.com>
7382         * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
7384 2002-06-15  Gabriel Dos Reis  <gdr@codesourcery.com>
7386         * cp-tree.h (compiler_error): Remove declaration.
7387         * lex.c (compiler_error): Remove definition.
7389 2002-06-14  Steve Ellcey  <sje@cup.hp.com>
7391         * g++spec.c (LIBUNWIND): New.
7392         (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
7394 2002-06-13  Jessica Han  <jessica@cup.hp.com>
7396         * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
7397         (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
7398         (build_vbase_offset_vtbl_entries): Likewise.
7399         * rtti.c (build_headof): Likewise.
7400         (get_tinfo_decl_dynamic): Likewise.
7401         (create_pseudo_type_info): Likewise.
7403 2002-06-12  Stan Shebs  <shebs@apple.com>
7405         * mpw-config.in: Remove file, no longer used.
7406         * mpw-make.sed: Ditto.
7408 2002-06-07  Zack Weinberg  <zack@codesourcery.com>
7410         * decl2.c: Update call to cpp_handle_option.
7412 2002-06-07  H.J. Lu  (hjl@gnu.org)
7414         * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
7416 2002-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
7418         * error.c (cp_error_at): Fix typo.
7420 2002-06-04  Gabriel Dos Reis  <gdr@codesourcery.com>
7422         * error.c (cp_diagnostic_starter): Adjust call.
7423         (maybe_print_instantiation_context): Change prototype to take a
7424         'diagnostic_info *'.
7425         (print_instantiation_full_context): Likewise.
7426         (print_instantiation_partial_context): Likewise.
7427         (cp_diagnostic_starter): Likewise.
7428         (cp_diagnostic_finalizer): Likewise.
7429         (cp_print_error_function): Likewise.
7430         (cp_printer): Take a secondary parameter as a 'text_info *'.
7431         Remove output_state savings.  Adjust calls.
7433 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
7435         * pt.c (inline_parm_levels): Mark for GC.
7437         * mangle.c (start_mangling): Allocate G.substitutions here...
7438         (init_mangle): ... rather than here.
7439         (finish_mangling): Clear the varray pointer when done with it.
7440         * spew.c (yylexstring): Don't use VARRAY_FREE.
7441         * search.c (bfs_walk): Don't use VARRAY_FREE.
7442         * decl2.c (pending_statics): Use gengtype to mark.
7443         (deferred_fns): Likewise.
7444         (ssdf_decls): Likewise.
7445         (init_decl2): Delete.
7446         * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
7447         (cxx_init_decl_processing): Don't call init_decl2.
7448         (cxx_pop_function_context): Don't use VARRAY_FREE.
7449         * cp-tree.h (struct saved_scope): No need for special marking
7450         of varrays.
7451         (struct language_function): Likewise.
7452         (local_classes): Use gengtype to mark.
7453         (init_decl2): Delete prototype.
7454         * class.c (init_class_processing): Don't use
7455         ggc_add_tree_varray_root.
7456         (build_vtbl_initializer): Don't use VARRAY_FREE.
7458         * decl.c (typename_compare): Don't use same_type_p.
7460         * decl.c: Include hashtab.h instead of hash.h.
7461         (typename_hash): Update to use htab_h.
7462         (typename_compare): Likewise.
7463         (typename_htab): Use gengtype to mark.
7464         (build_typename_type): Update to use htab_h.
7465         * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
7467         * Make-lang.in (gt-cp-tree.h): New rule.
7468         (cp/tree.o): Depend on gt-cp-tree.h.
7469         * config-lang.in (gtfiles): Add cp/tree.c.
7470         * tree.c: Include gt-cp-tree.h.
7471         (list_hash_table): Use gengtype to mark.
7472         (init_tree): Use gengtype to mark trees.
7474         * Make-lang.in (cp/decl.o): Add debug.h dependency.
7475         * call.c (struct z_candidate): Use gengtype.
7476         (USER_CONV_CAND): Use WRAPPER_ZC.
7477         (convert_class_to_reference): Use build_zc_wrapper.
7478         (build_type_conversion_1): Likewise.
7479         (build_over_call): Use WRAPPER_ZC.
7480         (add_warning): Use build_zc_wrapper.
7481         * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
7482         * cp-tree.h (struct lang_identifier): Use gengtype.
7483         (struct template_parm_index_s): Likewise.
7484         (struct ptrmem_cst): Likewise.
7485         (struct tree_binding): Likewise.
7486         (struct tree_overload): Likewise.
7487         (struct tree_srcloc): Likewise.
7488         (struct tree_wrapper): Likewise.  Also modify to have a pointer
7489         to struct z_candidate rather than void.
7490         (enum cp_tree_node_structure_enum): New.
7491         (union lang_tree_node): New.
7492         (cxx_mark_tree): Delete prototype.
7493         (cp_tree_node_structure): New prototype.
7494         (build_ptr_wrapper): Delete prototype.
7495         (build_int_wrapper): Delete prototype.
7496         (build_zc_wrapper): New prototype.
7497         * decl.c: Include debug.h
7498         (cxx_mark_tree): Delete.
7499         (cp_tree_node_structure): New.
7500         * tree.c (build_ptr_wrapper): Delete.
7501         (build_int_wrapper): Delete.
7502         (build_zc_wrapper): New.
7504         * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
7505         Correct typo.  Patch from k_fukui@highway.ne.jp.
7507         * semantics.c (current_stmt_tree): Update for change to
7508         struct language_function.
7509         (finish_mem_initializers): Likewise.
7510         * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
7511         * cp-tree.h (struct language_function): Rename from
7512         cp_language_function.  Change all uses.
7513         (cp_function_chain): Don't need to cast.
7515         * class.c (duplicate_tag_error): Reset discriminator.
7516         (check_bases_and_members): Update for data structure changes.
7517         * cp-tree.h (struct lang_id2): Use gengtype.
7518         (flagged_type_tree): Likewise.
7519         (SET_LANG_ID): Use GGC on struct lang_id2.
7520         (struct cp_language_function): Use gengtype.  Remove field
7521         'x_vcalls_possible_p'.
7522         (current_vcalls_possible_p): Delete.
7523         (struct lang_type_header): New.
7524         (struct lang_type_class): Rename from struct lang_type.  Include
7525         struct lang_type_header.
7526         (struct lang_type_ptrmem): New.
7527         (struct lang_type): New.
7528         (LANG_TYPE_CLASS_CHECK): New.  Use it in all the appropriate macros.
7529         (LANG_TYPE_PTRMEM_CHECK): New.  Use it in all the appropriate macros.
7530         (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
7531         (struct lang_decl_flags): Use gengtype.  Add discriminators.
7532         (struct lang_decl): Use gengtype.  Add and use discriminators.
7533         Update the macros that reference moved fields.
7534         (LANG_DECL_U2_CHECK): New function.  Use it when appropriate.
7535         (SET_DECL_THUNK_P): Set discriminator too.
7536         (clear_inline_text_obstack): Delete prototype.
7537         (finish_inline_definitions): Delete prototype.
7538         (mark_pending_inlines): Delete prototype.
7539         (lang_check_failed): New prototype.
7540         * decl.c (struct named_label_use_list): Use gengtype.
7541         (struct named_label_list): Likewise.
7542         (mark_binding_level): Delete.
7543         (mark_named_label_lists): Delete.
7544         (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
7545         (cxx_init_decl_processing): Use generated marker routine.
7546         (begin_destructor_body): Delete dead set to
7547         current_vcalls_possible_p.
7548         (mark_lang_function): Delete.
7549         (mark_cp_function_context): Delete.
7550         (lang_mark_tree): Use generated marker routines.
7551         * decl2.c (start_objects): Set discriminator when setting
7552         GLOBAL_INIT_PRIORITY.
7553         * lex.c (retrofit_lang_decl): Set discriminators.
7554         (copy_lang_type): Update for changes to lang_type structure.
7555         (cp_make_lang_type): Set discriminator.
7556         * parse.y: Use gengtype on YYLVAL.  Don't use dots in identifiers.
7557         * search.c: Include ggc.h.
7558         * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
7559         (finish_inline_definitions): Delete.
7560         * spew.c (struct token): Use gengtype.
7561         (struct token_chunk): New.
7562         (struct unparsed_text): Use gengtype.  Store tokens in chunks.
7563         (struct feed): Use gengtype.
7564         (feed_obstack): Delete.
7565         (feed): Mark as GC root.
7566         (pending_inlines): Mark as GC root.
7567         (pending_inlines_tail): Likewise.
7568         (processing_these_inlines): Likewise.
7569         (token_obstack): Make static.
7570         (first_token): Likewise.
7571         (init_spew): Don't initialize deleted things; use gengtype for roots.
7572         (clear_inline_text_obstack): Delete.
7573         (feed_input): Use GC for struct feed.  Update for changes to
7574         struct unparsed_text.
7575         (mark_pending_inlines): Delete.
7576         (next_token): Rename from add_token.  Change all callers.  Update
7577         for changes to struct unparsed_text.
7578         (space_for_token): New.
7579         (remove_last_token): New.
7580         (alloc_unparsed_text): New.
7581         (snarf_block): Take an unparsed_text.  Update for changes to struct
7582         unparsed_text.
7583         (snarf_method): Update for changes to struct unparsed_text.
7584         (snarf_defarg): Update for changes to struct unparsed_text.
7585         * tree.c (lang_check_failed): New.
7587         * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
7588         gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
7589         (cp/spew.o): Add dependency on gt-<filename>.h.
7590         (cp/decl2.o): Add dependency on gt-<filename>.h.
7591         (cp/call.o): Add dependency on gt-<filename>.h.
7592         (cp/pt.o): Add dependency on gt-<filename>.h.
7593         (cp/repo.o): Add dependency on gt-<filename>.h.
7594         (cp/parse.o): Add dependency on gt-<filename>.h.
7595         * call.c: Use gengtype for roots.
7596         * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
7597         decl2.c parse.y pt.c repo.c spew.c.
7598         * cp-tree.h: Use gengtype for roots.
7599         (struct saved_scope): Use GGC, gengtype.
7600         (cp_parse_init): Delete prototype.
7601         (init_pt): Delete prototype.
7602         * decl.c: Use gengtype for roots.
7603         (mark_saved_scope): Delete.
7604         (cxx_init_decl_processing): Don't call deleted initilisation
7605         routines.
7606         (signed_size_zero_node): Delete, unused.
7607         * decl.h: Use gengtype for roots.
7608         * decl2.c: Use gengtype for roots.
7609         * lex.h: Use gengtype for roots.
7610         * parse.y: Use gengtype for roots.
7611         (cp_parse_init): Delete.
7612         * pt.c: Use gengtype for roots.
7613         (init_pt): Delete.
7614         * repo.c: Use gengtype for roots.
7615         * spew.c: Use gengtype for roots.
7617         * Make-lang.in: Allow for filename changes.  Add gtype-cp.h.
7618         (cp/decl.o): Add dependency on gtype-cp.h.
7619         * decl.c: Remove use of add_deletable_root, use GTY marker instead.
7620         Include gtype-cp.h.  Allow for filename changes.
7622         * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
7623         (cp/decl.o): Add cp/gt-decl.h dependency.
7624         * config-lang.in (gtfiles): New.
7625         * tree.h: Rename struct binding_level to struct cp_binding_level.
7626         * decl.c: Rename struct binding_level to struct cp_binding_level.
7627         Include cp/gt-decl.h.
7628         (struct cp_binding_level): Use gengtype.
7629         (make_binding_level): Use GGC on struct cp_binding_level.
7630         (mark_binding_level): Use gt_ggc_m_cp_binding_level.
7631         (cxx_init_decl_processing): Mark free_binding_level as
7632         deletable.
7634         * decl.c (mark_cp_function_context): Update calling sequence.
7636         * decl.c (start_function): Don't free 'struct
7637         cp_language_function'.
7638         (pop_cp_function_context): Likewise.
7639         (save_function_data): Allocate it using GC.
7640         * semantics.c (genrtl_start_function): Don't free 'struct
7641         cp_language_function'.
7643 2002-05-31  Matthew Woodcraft  <mattheww@chiark.greenend.org.uk>
7645         * lang-specs.h: Use cpp_debug_options.
7647 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
7649         * mangle.c, tree.c: Include real.h.
7650         * Make-lang.in: Update dependency lists.
7652 2002-05-25  Neil Booth  <neil@daikokuya.demon.co.uk>
7654         * lex.c: Don't include c-lex.h.
7655         * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
7657 2002-05-23  Neil Booth  <neil@daikokuya.demon.co.uk>
7659         * spew.c (yyungetc, snarf_block): Remove indent_level handling.
7661 2002-05-22  Richard Henderson  <rth@redhat.com>
7663         * decl.c (obscure_complex_init): Check for VAR_DECL
7664         before using DECL_THREAD_LOCAL.
7666 2002-05-22  Richard Henderson  <rth@redhat.com>
7668         * decl.c (check_tag_decl): Handle RID_THREAD.
7669         (obscure_complex_init): Reject run-time init of tls.
7670         (grokvardecl, grokdeclarator): Handle RID_THREAD.
7671         * lex.c (reswords): Add __thread.
7672         (rid_to_yy): Map RID_THREAD to SCSPEC.
7674 2002-05-22  Neil Booth  <neil@daikokuya.demon.co.uk>
7676         * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
7677         * cp-tree.h (cxx_post_options): Kill.
7678         * cp-lex.c (cxx_post_options): Kill.
7680 2002-05-21  Richard Henderson  <rth@redhat.com>
7682         * lex.c (rid_to_yy): Add RID_THREAD.
7684 2002-05-21  Alexandre Oliva  <aoliva@redhat.com>
7686         * init.c (build_vec_init): Test for trivial copy-assignment when
7687         copy-assigning arrays.
7689 2002-05-20  Andreas Jaeger  <aj@suse.de>
7691         * init.c (build_default_init): Remove unused variable.
7693 2002-05-20  Alexandre Oliva  <aoliva@redhat.com>
7695         * call.c (any_strictly_viable): New.
7696         (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
7698 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7700         * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
7702 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7704         PR c++/186, DR 259
7705         * pt.c (do_decl_instantiation): Don't complain explicit
7706         instantiation after explicit specialization.
7707         (do_type_instantiation): Likewise.
7709 2002-05-19  Alexandre Oliva  <aoliva@redhat.com>
7711         * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
7712         renamed from...
7713         (complete_type_or_else): ... this.  Redefined as macro.
7714         (cxx_incomplete_type_diagnostic): Declare.
7715         (cxx_incomplete_type_error): Define as macro.
7716         * init.c (build_delete): Warn about incomplete types other than
7717         void, and use the built-in operator delete for them.
7718         * typeck.c (complete_type_or_diagnostic): Renamed from
7719         complete_type_or_else.  Added warn_only argument, passed to...
7720         * typeck2.c (cxx_incomplete_type_diagnostic): ... this.  Print
7721         warnings or errors depending on new warn_only argument.  Renamed
7722         from...
7723         (cxx_incomplete_type_error): ... this.  New implementation in
7724         terms of cxx_incomplete_type_diagnostic.
7726 2002-05-18  Jason Merrill  <jason@redhat.com>
7728         PR c++/6611
7729         * decl2.c (import_export_decl): If we clear
7730         DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
7732 2002-05-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7734         PR c++/6620
7735         * pt.c (verify_class_unification): Don't check if PARM is template
7736         parameter dependent.  Simplify.
7737         (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
7738         parameter dependent expression.
7740 2002-05-14  Jason Merrill  <jason@redhat.com>
7742         * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
7743         Do set DECL_COMDAT.
7744         (synthesize_tinfo_var): Take the public decl.
7745         (create_real_tinfo_var): Likewise.  Check DECL_COMDAT.
7746         (emit_tinfo_decl): Adjust.  Call import_export_decl.
7747         * decl2.c (import_export_decl): Simplify tinfo decl handling.
7749 2002-05-14  Alexandre Oliva  <aoliva@redhat.com>
7751         * cp-tree.h (struct lang_type): Added non_zero_init.
7752         (CLASSTYPE_NON_ZERO_INIT_P): New macro.
7753         (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
7754         * class.c (check_field_decls): Test non_zero_init.
7755         * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
7756         zero-to-NULL conversions.
7757         * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
7758         type that needs zero-initialization without zeros.
7759         (check_initializer_decl): Compute zero-initializer for types
7760         that require a non-trivial one.
7761         * init.c (build_forced_zero_init): New function.
7762         (build_default_init): Use it.
7763         * tree.c (zero_init_p): New function.
7764         * typeck2.c (force_store_init_value): New function.
7765         (process_init_constructor): Create non-trivial zero-initializers
7766         for array members and class fields.
7768 2002-05-14  Neil Booth  <neil@daikokuya.demon.co.uk>
7770         * lang-specs.h: Remove redundant -lang-c++.
7772 2002-05-13  Jason Merrill  <jason@redhat.com>
7774         * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
7775         (fixed_type_or_null): See through reference vars.
7776         (build_base_path): Vtable contents are constant.
7777         * typeck.c (get_member_function_from_ptrfunc): Likewise.
7779 2002-05-12  Jason Merrill  <jason@redhat.com>
7781         * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
7782         structs are safe.
7784 2002-05-09  Neil Booth  <neil@daikokuya.demon.co.uk>
7786         * cp-tree.h (flag_ansi): Remove.
7787         * decl2.c (flag_ansi): Remove.
7788         (cxx_decode_option): Set flag_iso and flag_undef.
7790 2002-05-09  Jason Merrill  <jason@redhat.com>
7792         * typeck.c (get_member_function_from_ptrfunc): Reorganize.
7793         Use subtraction rather than a bitmask to get the index.
7794         * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
7796         * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
7798 2002-05-07  Neil Booth  <neil@daikokuya.demon.co.uk>
7800         * Make-lang.in (decl2.o): Update.
7801         * cp-tree.h (warn_multichar): Remove.
7802         * decl2.c: Include c-common.h.
7803         (warn_multichar): Remove.
7805 2002-05-03  Jason Merrill  <jason@redhat.com>
7807         * tree.c (build_cplus_array_type): Only const and volatile get
7808         special handling.
7810         * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
7812 2002-04-30  Mark Mitchell  <mark@codesourcery.com>
7814         ABI change, returning simple classes from functions.
7815         * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
7816         TYPE_HAS_TRIVIAL_INIT_REF is false or
7817         TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
7819 2002-04-30  Jason Merrill  <jason@redhat.com>
7821         PR debug/6436
7822         * decl.c (grokdeclarator): Don't override TYPE_NAME of an
7823         anonymous class with a typedef if there are attributes.
7825 2002-04-29  Paul Eggert  <eggert@twinsun.com>
7827         * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
7829 2002-04-29  Jakub Jelinek  <jakub@redhat.com>
7831         PR c++/6477
7832         * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
7833         non-NULL first.
7835 2002-04-29  Mark Mitchell  <mark@codesourcery.com>
7837         PR c++/6492
7838         * pt.c (tsubst_friend_class): If the friend has an explicit scope,
7839         enter that scope before name lookup.
7841         PR c++/6486
7842         * method.c (do_build_copy_constructor): Avoid building
7843         cv-qualified reference types.
7845 2002-04-29  Nathan Sidwell  <nathan@codesourcery.com>
7847         PR c++/5719
7848         * decl.c (grok_op_properties): Assignment ops don't have to return
7849         by value. operator% should.
7851 2002-04-28  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
7853         PR c/6343
7854         * decl.c (duplicate_decls): Call merge_weak.
7856 2002-04-26  Richard Henderson  <rth@redhat.com>
7858         * parse.y (malloced_yyss, malloced_yyvs): New.
7859         (yyoverflow): Re-add.  Set them.
7860         (free_parser_stacks): New.
7862 2002-04-26  Mark Mitchell  <mark@codesourcery.com>
7864         PR c++/6497
7865         * method.c (do_build_assign_ref): Pass a derivation to
7866         build_method_call when calling base class assignment operators.
7868 2002-04-26  Richard Henderson  <rth@redhat.com>
7870         * parse.y (yyoverflow): Revert.
7872 2002-04-26  Richard Henderson  <rth@redhat.com>
7874         PR c/3581
7875         * parse.y (string): Remove.  Update all uses to use STRING
7876         instead, and not call combine_strings.
7877         * rtti.c (tinfo_name): Use fix_string_type.
7878         * semantics.c (finish_asm_stmt): Don't call combine_strings.
7879         * spew.c (yylexstring): New.
7880         (read_token): Use it.
7882 2002-04-25  Richard Henderson  <rth@redhat.com>
7884         PR c/2161
7885         * parse.y (yyoverflow): New.
7887 2002-04-25  Jason Merrill  <jason@redhat.com>
7889         PR c++/5607
7890         * search.c (check_final_overrider): No longer static.
7891         * class.c (update_vtable_entry_for_fn): Call it.
7892         * cp-tree.h: Adjust.
7894 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
7896         * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
7897         * cp-tree.h (cxx_set_yydebug): Die.
7898         * lex.c (YYDEBUG): Get from c-lex.h.
7899         (cxx_set_yydebug): Remove.
7900         * parse.y: Include c-lex.h.
7901         (YYDEBUG): Get from c-lex.h.
7903 2002-04-24  Mark Mitchell  <mark@codesourcery.com>
7905         PR c++/6438.
7906         * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
7907         void.
7909 2002-04-24  Neil Booth  <neil@daikokuya.demon.co.uk>
7911         * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
7912         LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
7913         Redefine.
7914         * cp-tree.h (cp_attribute_table): Rename.
7915         * decl.c (lang_attribute_table): Remove declaration.
7916         (cxx_init_decl_processing): Don't set it.
7917         * tree.c (cp_attribute_table): Rename.
7919 2002-04-24  Jason Merrill  <jason@redhat.com>
7921         PR c++/6331
7922         * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
7923         * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
7924         The pedwarn for array assignment is now unconditional.
7925         * tree.c (build_cplus_array_type_1): Still process simple array types
7926         normally in templates.
7928         PR c++/6395
7929         * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
7930         stuff for comdats.
7932 2002-04-23  Jakub Jelinek  <jakub@redhat.com>
7934         * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
7935         node with attributes.
7937 2002-2-23  David O'Brien  <obrien@FreeBSD.org>
7939         * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
7940         Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
7942 2002-04-23  Mark Mitchell  <mark@codesourcery.com>
7944         PR c++/6256:
7945         * pt.c (tsubst_friend_class): Handle templates with explicit
7946         nested names.
7948         PR c++/6331:
7949         * typeck.c (merge_types): Remember the cv-qualification of pointer
7950         types when merging them.
7952 2002-04-20  Neil Booth  <neil@daikokuya.demon.co.uk>
7954         * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
7955         LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
7956         * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
7957         cxx_mark_function_context): New.
7958         * decl.c (push_cp_function_context, pop_cp_function_context,
7959         mark_cp_function_context): Rename for consistency.
7960         (cxx_init_decl_processing): Don't set old hooks.
7962 2002-04-19  Neil Booth  <neil@daikokuya.demon.co.uk>
7964         * call.c (convert_type_from_ellipsis): Rename, update.
7965         * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
7966         * cp-tree.h (convert_type_from_ellipsis): Rename.
7967         * decl.c (cxx_init_decl_processing): Don't set hook.
7969 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
7971         * call.c (build_new_method_call): Update.
7972         * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
7973         * cp-tree.h (cxx_incomplete_type_error): New.
7974         * decl.c (grokdeclarator, grokparms): Update.
7975         * decl2.c (check_classfn): Update.
7976         * pt.c (tsubst): Update.
7977         * typeck.c (complete_type_or_else, expr_sizeof,
7978         decay_conversion): Update.
7979         * typeck2.c (incomplete_type_error): Rename.
7980         (add_exception_specifier): Update.
7982 2002-04-18  Jason Merrill  <jason@redhat.com>
7984         PR c++/5658
7985         * search.c (setup_class_bindings): A class template qualifies as a
7986         type binding.
7988 2002-04-17  Jakub Jelinek  <jakub@redhat.com>
7990         PR c++/6316
7991         * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
7992         before expanding.
7994 2002-04-16  Mark Mitchell  <mark@codesourcery.com>
7996         * init.c (begin_init_stmts): Remove commented out code.
7997         (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
7998         * semantics.c (begin_gobal_stmt_expr): Adjust call to
7999         expand_start_stmt_expr.
8001 2002-04-15  Mark Mitchell  <mark@codesourcery.com>
8003         * decl.c (register_dtor_fn): Pass the address of dso_handle, not
8004         dso_handle itself, to __cxa_atexit.
8006 2002-04-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
8008         * error.c (cxx_print_error_function): Adjust call to macros.
8010 2002-04-14  Jakub Jelinek  <jakub@redhat.com>
8012         * class.c (layout_virtual_bases): Do all dsize computation on trees.
8014 2002-04-14  Jason Merrill  <jason@redhat.com>
8016         * typeck.c (get_member_function_from_ptrfunc): Don't do
8017         gratuitious division and multiplication on
8018         ptrmemfunc_vbit_in_delta targets.
8020 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
8022         PR c++/5373.
8023         * semantics.c (finish_expr_stmt): Remember the type of the
8024         expression before any conversions are performed.
8026 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
8028         PR c++/5189.
8029         * call.c (add_template_candidate_real): Do not treat member
8030         templates as copy constructors.
8032 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
8034         * decl.c (duplicate_decls): Do not copy the RTL for a variable
8035         declaration if the old variable had an incomplete type and the new
8036         variable does not.
8037         (complete_vars): Do not call layout_decl for completed variables.
8039 2002-04-12  Richard Sandiford  <rsandifo@redhat.com>
8041         * decl.c (duplicate_decls): Don't try to unify an implicit typedef
8042         with an explicit one.
8043         (follow_tag_typedef): New.
8044         (lookup_tag): Use it to extract the tag of an explicit typedef.
8045         (xref_tag): Likewise.
8047 2002-04-11  Andrew Haley  <aph@redhat.com>
8049         * typeck.c (type_after_usual_arithmetic_conversions):
8050         If two types have the same variant, return immediately.
8051         When two floating-point operands are the same precision:
8052           convert to float if one of the operands is float;
8053           if neither operand is one of the standard types, return the type
8054           of the first operand.
8056 2002-04-10  Nathan Sidwell  <nathan@codesourcery.com>
8058         PR c++/5507
8059         * decl.c (make_typename_type): Remove implicit typenameness.
8061 2002-04-09  Jason Merrill  <jason@redhat.com>
8063         PR optimization/6189
8064         * semantics.c (genrtl_start_function): Don't free
8065         DECL_SAVED_FUNCTION_DATA for inline functions.
8067         * init.c (build_member_call): For now, don't convert to
8068         intermediate base if it would cause an error.
8070 2002-04-08  Paolo Carlini  <pcarlini@unitus.it>
8072         * parse.y (namespace_qualifier, maybe_identifier,
8073         begin_explicit_instantiation, end_explicit_instantiation,
8074         apparent_template_type, .finish_template_type,
8075         do_id, maybe_init, defarg_again, component_decl_1):
8076         Add ending ';', in accordance with POSIX.
8078 2002-04-06  Mark Mitchell  <mark@codesourcery.com>
8080         PR c++/5571
8081         * class.c (layout_class_type): Remember incomplete static
8082         variables.
8083         (finish_struct_1): Call complete_vars, not
8084         hack_incomplete_structures.
8085         * cp-tree.h (hack_incomplete_structures): Rename to ...
8086         (complete_vars): ... this.
8087         (struct saved_scope): Remove incomplete.
8088         (namespace_scope_incomplete): Remove.
8089         * decl.c (struct binding_level): Remove incomplete.
8090         (incomplete_vars): New variable.
8091         (mark_binding_level): Don't mark incomplete.
8092         (print_binding_level): Don't print it.
8093         (mark_saved_scope): Don't mark incomplete.
8094         (pushdecl): Use maybe_register_incopmlete_var.
8095         (cxx_init_decl_processing): Register incomplete_vars for GC.
8096         (start_decl_1): Clarify error message.
8097         (hack_incomplete_vars): Remove.
8098         (maybe_register_incomplete_var): New function.
8099         (complete_vars): Likewise.
8101 2002-04-06  Jason Merrill  <jason@redhat.com>
8103         PR c++/4934
8104         * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
8105         set before checking it.
8107         PR c++/525
8108         * init.c (build_member_call): Use build_scoped_ref.
8109         (resolve_offset_ref): Likewise.
8110         * call.c (build_scoped_method_call): Likewise.
8111         * tree.c (maybe_dummy_object): Kludge around current_class_type being
8112         wrong.
8113         * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
8114         * cp-tree.h: Adjust.
8116         * init.c (push_base_cleanups): Just use build_scoped_method_call.
8118         PR c++/6179
8119         * method.c (implicitly_declare_fn): Pass unqualified type to
8120         synthesize_exception_spec.
8122 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
8124         * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
8125         * cvt.c: Update comment.
8126         * init.c (expand_cleanup_for_base): Update.
8127         * semantics.c (finish_parenthesized_expr): Update.
8128         * typeck.c (cp_truthvalue_conversion): Update.
8130 2002-04-04  Jason Merrill  <jason@redhat.com>
8132         * semantics.c (finish_eh_cleanup): New fn.
8133         * cp-tree.h: Add prototype.
8134         * init.c (perform_member_init, expand_cleanup_for_base): Use
8135         finish_eh_cleanup.
8136         * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
8137         * cp-tree.h: Remove references.
8138         * decl.c (begin_constructor_body, end_constructor_body): Likewise.
8139         * dump.c (cp_dump_tree): Likewise.
8140         * pt.c (tsubst_expr): Likewise.
8141         * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
8142         (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
8143         * tree.c (cp_statement_code_p): Likewise.
8145         * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
8147         PR c++/5636
8148         * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
8149         cleanup for nrv.
8151         PR c++/5104
8152         * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
8153         specifiers.
8154         [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
8156 2002-04-03  Richard Henderson  <rth@redhat.com>
8158         * cp-lang.c (cxx_warn_unused_global_decl): New.
8159         (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
8161 2002-04-03  Neil Booth  <neil@daikokuya.demon.co.uk>
8163         * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
8164         * tree.c (init_tree): Don't set hook.
8166 2002-04-03  Roger Sayle  <roger@eyesopen.com>
8168         PR c++/5998:
8169         * decl.c (duplicate_decls): Don't mess with assembler names when
8170         redeclaring builtin functions as static.
8172 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
8174         * call.c (build_addr_func): Update.
8175         * class.c (resolve_address_of_overloaded_function): Update.
8176         * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
8177         * cp-tree.h (cxx_mark_addressable): New.
8178         * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
8179         * decl2.c (build_cleanup): Update.
8180         * except.c (build_throw): Update.
8181         * init.c (resolve_offset_ref): Update.
8182         * pt.c (convert_nontype_argument): Update.
8183         * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
8184         * typeck.c (decay_conversion, build_array_ref, build_unary_op,
8185         unary_complex_lvalue): Update.
8186         (mark_addressable): Rename.
8188 2002-04-01  Roger Sayle  <roger@eyesopen.com>
8190         PR c++/5998:
8191         * decl.c (duplicate_decls):  Overwrite the RTL when (and only
8192         when) overwriting a built-in function.  Don't use COPY_DECL_RTL,
8193         but follow the SET_DECL_RTL idiom used elsewhere in the function.
8195 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
8197         * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
8198         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
8199         * decl.c (grokdeclarator): Update.
8200         * mangle.c (write_integer_cst): Update.
8201         * typeck.c (build_binary_op): Update.
8203 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
8205         * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
8206         * lex.c (cxx_init): Don't set hook.
8208 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
8210         * Make-lang.in (error.o): Update.
8211         * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
8212         * cp-tree.h (struct diagnostic_context): Predeclare.
8213         (cxx_print_error_function): New.
8214         * error.c: Include langhooks-def.h.
8215         (lang_print_error_function): Rename.  Update.
8216         (init_error): Don't set hook.
8218 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
8220         * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
8221         Redefine.
8222         * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
8223         * decl.c (finish_enum): Similarly.
8224         * error.c (dump_type): Similarly.
8225         * lex.c (cxx_init): Similarly.
8226         * mangle.c (write_builtin_type): Similarly.
8227         * typeck.c (comptypes): Similarly.
8229 2002-03-28  Roger Sayle  <roger@eyesopen.com>
8231         PR c++/5998:
8232         * decl.c (cxx_init_decl_processing): Re-enable built-in functions
8233         in the g++ front-end.
8234         (duplicate_decl): Allow redefinition of anticipated built-ins.
8235         Fix inlining problem by over-writing the old DECL_RTL.
8236         (lookup_namespace_name): Fail to find an identifier in the
8237         specified namespace if its still anticipated.
8238         (builtin_function_1): New function split out from builtin_function
8239         to create a builtin in the current namespace with given context.
8240         (builtin_function): Call builtin_function_1 to define the
8241         appropriate builtins in both the std and global namespaces.
8242         (select_decl): Don't test for anticipated decls here.
8243         (unqualified_namespace_lookup): Instead ignore them whilst
8244         searching through scopes and namespaces.
8245         * decl2.c (do_nonmember_using_decl): If a using declaration
8246         specifies an anticipated built-in function, mark it as no longer
8247         anticipated in that scope.
8248         (ambiguous_decl):  Avoid resolving to an anticipated decl.
8249         * lex.c (do_scoped_id): Fail to find an identifier in the global
8250         namespace if its still anticipated.
8252 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
8254         * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
8255         * cp-tree.h (cp_make_lang_type): Rename.
8256         * lex.c (cp_make_lang_type): Rename.
8257         (make_aggr_type): Update.
8258         * tree.c (init_tree): Don't set make_lang_type_fn.
8260 2002-03-29  Jakub Jelinek  <jakub@redhat.com>
8262         PR c++/6073
8263         * class.c (finish_struct_1): Update static field's DECL_MODE even
8264         if its type is a variant of t.
8266 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
8268         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
8269         * cp-tree.h (cxx_insert_default_attributes): New.
8270         * decl.c (insert_default_attributes): Rename.
8272 2002-03-27  Mark Mitchell  <mark@codesourcery.com>
8274         PR c++/4884
8275         * call.c (build_op_delete_call): Allow for the fact the placement
8276         may be a COMPOUND_EXPR.
8278 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
8280         * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
8281         * cp-tree.h (init_cplus_expand): Remove.
8282         (cxx_expand_expr): New.
8283         * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
8284         fix prototype.
8285         (init_cplus_expand): Remove.
8286         * lex.c (cxx_init): Don't call init_cplus_expand.
8288 2002-03-26  Mark Mitchell  <mark@codesourcery.com>
8290         PR c++/4884.
8291         * init.c (build_new_1): Allow for the fact the result of
8292         build_function_call may be a COMPOUND_EXPR.
8294 2002-03-26  Nathan Sidwell  <nathan@codesourcery.com>
8296         PR c++/5682
8297         * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
8298         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
8299         (dfs_skip_nonprimary_vbases_markedp): Remove.
8300         * search.c (get_shared_vbase_if_not_primary): Remove.
8301         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
8302         (dfs_skip_nonprimary_vbases_markedp): Remove.
8303         (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
8304         (dfs_marked_real_bases_queue_p): Likewise.
8306 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
8308         * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
8309         * cp-tree.h (cxx_mark_tree): New.
8310         * decl.c (lang_mark_tree): Rename cxx_mark_tree.
8312 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
8314         * cp-tree.h (cxx_maybe_build_cleanup): New.
8315         * decl.c (destroy_local_var, hack_incomplete_structures): Update.
8316         (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
8317         * tree.c (build_target_expr): Update.
8318         * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
8320 2002-03-24  Neil Booth  <neil@daikokuya.demon.co.uk>
8322         * decl2.c (cxx_decode_option): Handle -E.
8323         * lang-specs.h (default_compilers): Preprocess with cc1plus.
8324         * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
8326 2002-03-23  Jakub Jelinek  <jakub@redhat.com>
8328         PR c++/6037
8329         * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
8331 2002-03-23  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
8333         * error.c (dump_type): Be careful about implicit typenames.
8335 2002-03-21  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
8337         PR C++/3656
8338         * semantics.c (finish_base_specifier): Handle erronous base
8339         classes.
8341 2002-03-22  Zack Weinberg  <zack@codesourcery.com>
8343         * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
8344         REAL_IS_NOT_DOUBLE.
8346 2002-03-22  Jeff Knaggs  <jknaggs@redhat.com>
8348         * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
8349         an index into the vtable_entry array regardless of
8350         TARGET_PTRMEMFUNC_VBIT_LOCATION.
8352 2002-03-21  Aldy Hernandez  <aldyh@redhat.com>
8354         * tree.c (cp_cannot_inline_tree_fn): Same.
8356 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
8358         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
8359         insert_block, getdecls, global_bindings_p): New.
8361 2002-03-20  Nathan Sidwell  <nathan@codesourcery.com>
8363         PR c++/4361
8364         * mangle.c (struct globals) Add internal_mangling_p member.
8365         (write_template_param): Do internal mangling, if needed.
8366         (mangle_conv_op_name_for_type): Request internal mangling.
8368 2002-03-20  Jason Merrill  <jason@redhat.com>
8370         PR c++/2136
8371         * init.c (build_delete): Check access for a member op delete here.
8372         * decl2.c (delete_sanity): Not here.
8374 2002-03-19  Jason Merrill  <jason@redhat.com>
8376         PR c++/5118
8377         * class.c (get_vfield_name): Use the constructor_name.
8379 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
8381         * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
8382         * cp-tree.h (lang_printable_name): Rename.
8383         * error.c (lang_decl_name): Use new hook.
8384         * lex.c (cxx_init): Remove old hook.
8385         * pt.c (tsubst_decl): Use new hook.
8386         * tree.c (lang_printable_name): Rename.
8388 2002-03-18  Eric Botcazou  <ebotcazou@multimania.com>
8390         PR c++/3882
8391         * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
8392         (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
8393         only after recording the declaration.
8395 2002-03-18  Jason Merrill  <jason@redhat.com>
8397         PR c++/2039
8398         * init.c (resolve_offset_ref): Hand off to build_component_ref.
8400         PR c++/4222, c++/5995
8401         * call.c (build_over_call): Fix empty class logic.
8403         PR c++/3870
8404         * cp-tree.h (struct saved_scope): Add last_parms field.
8405         * decl.c (maybe_push_to_top_level): Save last_function_parms.
8406         (pop_from_top_level): Restore it.
8408         PR c++/4377
8409         * mangle.c (write_expression): Strip NOP_EXPRs sooner.  Also strip
8410         NON_LVALUE_EXPRs.
8412         PR c++/4003
8413         * pt.c (tsubst_friend_function): Use decl_namespace_context.
8415         PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
8416         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
8417         type with a nontrivial destructor.
8419 2002-03-17  Jason Merrill  <jason@redhat.com>
8421         PR c++/4460
8422         * class.c (build_base_path): Virtual base layout is fixed in
8423         in-charge [cd]tors.
8425 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
8427         * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
8428         * parse.y (yyparse): Remove macro.
8430 2002-03-17  Jason Merrill  <jason@redhat.com>
8432         PR c++/5757
8433         * init.c (build_new_1): Pass the right pointer to op delete.
8435 2002-03-16  Nathan Sidwell  <nathan@codesourcery.com>
8437         PR c++/4361
8438         * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
8439         conversion operators go.
8440         (struct lang_decl_flags): Add template_conv_p and unused
8441         bitfields.
8442         (DECL_TEMPLATE_CONV_FN_P): New macro.
8443         * call.c (build_user_type_conversion_1): Don't check second type
8444         conversion of overload set first.
8445         * class.c (add_method): Make sure templated conversion operators
8446         all end up on slot 2.
8447         * lex.c (do_identifier): A conversion operator token might be
8448         satisfied by a templated conversion operator.
8449         * pt.c (check_explicit_specialization): Use
8450         CLASSTYPE_FIRST_CONVERSION_SLOT.
8451         (template_parm_this_level_p): New function.
8452         (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
8453         * search.c (lookup_fnfields_1): Template conversions will be on
8454         the first slot.
8455         * typeck.c (build_component_ref): Preserve the type of an
8456         conversion operator name on the overload type.
8457         (build_x_function_call): Retrieve the conversion operator name.
8459 2002-03-15  Richard Henderson  <rth@redhat.com>
8461         * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
8463 2002-03-15  Mark Mitchell  <mark@codesourcery.com>
8465         * cp-tree.h (CLEANUP_DECL): Remove.
8466         (CLEANUP_EXPR): Likewise.
8467         * decl.c (destroy_local_var): Simplify.
8468         (maybe_build_cleanup): Tidy.
8469         * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
8470         * semantics.c (cp_expand_stmt): Likewise.
8471         * cp/tree.c (cp_statement_code_p): Likewise.
8473 2002-03-15  Jason Merrill  <jason@redhat.com>
8475         PR c++/5857
8476         * decl.c (duplicate_decls): Use merge_types instead of common_type.
8477         * typeck.c (common_type): Just hand off to
8478         type_after_usual_arithmetic_conversions and
8479         composite_pointer_type.
8480         (merge_types): New fn.
8481         (commonparms): Use it instead of common_type.
8482         (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
8483         (composite_pointer_type): Also handle attributes.
8484         * cp-tree.h: Declare merge_types.
8486         * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
8487         variables.
8488         * decl2.c (maybe_make_one_only): Also mark the decl as needed.
8490 2002-03-14  Richard Henderson  <rth@redhat.com>
8492         * decl.c: Include c-pragma.h.
8493         (start_decl, start_function): Invoke maybe_apply_pragma_weak.
8494         * Make-lang.in: Update dependencies.
8496 2002-03-14  Jakub Jelinek  <jakub@redhat.com>
8498         PR c++/5908
8499         * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
8500         * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
8502 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
8504         * mangle.c (write_builtin_type): Handle 128-bit integers even if
8505         they are not a standard integer type.
8507 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
8509         * cp-tree.h (init_init_processing): Remove declaration.
8510         * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
8511         * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
8513 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8515         * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
8516         Define.
8517         * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
8518         tree_code_length.
8519         * lex.c (cplus_tree_code_type, cplus_tree_code_length,
8520         cplus_tree_code_name): Delete.
8521         (cxx_init): Don't call add_c_tree_codes, instead set
8522         lang_unsafe_for_reeval.  Don't try to copy into the various
8523         tree_code arrays.
8525 2002-03-12  Nathan Sidwell  <nathan@codesourcery.com>
8527         PR c++/5659
8528         * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
8529         * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
8530         definitions.
8532 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
8534         Revert 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>,
8535         DR209 is now not a defect.
8536         * cp-tree.h (skip_type_access_control): Remove.
8537         * decl.c (grokdeclarator): Do type access control for friend
8538         declarations.
8539         * semantics.c (decl_type_access_control): Don't reset
8540         current_type_lookups.
8541         (save_type_access_control): Always save the lookups.
8542         (skip_type_access_control): Remove.
8543         (finish_class_definition): Don't change type_lookups.
8545 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
8547         Revert 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>,
8548         It is incorrect.
8549         * typeck.c (build_static_cast): Compare non-qualified types
8550         with pointer to member conversions.
8552 2002-03-11  Dan Nicolaescu  <dann@ics.uci.edu>
8553             Daniel Berlin  <dan@dberlin.org>
8555         * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
8556         (cxx_get_alias_set): Use it.
8558 2002-03-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8560         * cp-tree.h (stabilize_expr): Prototype.
8562 2002-03-08  Craig Rodrigues  <rodrigc@gcc.gnu.org>
8564         * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
8565         conditional return void.
8567 2002-03-08  Neil Booth  <neil@daikokuya.demon.co.uk>
8569         * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
8570         * cp-tree.h (cxx_unsave): New.
8571         * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
8572         (init_tree): Update.
8574 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8576         * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
8577         explicit sizeof/sizeof.
8578         * decl2.c (cxx_decode_option): Likewise.
8579         * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
8581 2002-03-02  Nathan Sidwell  <nathan@codesourcery.com>
8583         PR c++/775
8584         * decl.c (lookup_tag): Only reject enum/class mismatch, not
8585         class/union mismatch.
8586         * parse.y (check_class_key): New function.
8587         (structsp): Call it.
8589 2002-03-01  Michael Matz  <matz@suse.de>
8591         * typeck.c (cp_pointer_int_sum): Complete inner type which is
8592         used later by size_in_bytes().
8594 2002-03-01  Phil Edwards  <pme@gcc.gnu.org>
8596         * cp-tree.h:  Require __GNUC__ to be #defined.
8597         (build_init):  Add missing prototype.
8599 2002-03-01  Jason Merrill  <jason@redhat.com>
8601         * except.c: Don't include decl.h or obstack.h.  Do include
8602         tree-inline.h.
8603         (build_throw): Destroy temporaries from the thrown
8604         expression before calling __cxa_throw.  Construct a thrown
8605         temporary directly into the exception object.
8606         (stabilize_throw_expr): New function.
8607         (wrap_cleanups_r): New function.
8608         * tree.c (stabilize_expr): New function.
8609         * init.c (build_init): New function.
8610         * Make-lang.in (cp/except.o): Adjust .h deps.
8612 2002-02-28  Jason Merrill  <jason@redhat.com>
8614         * search.c (lookup_base_r): Don't clear is_non_public just because
8615         we found a friendly scope.
8617         * decl.c (finish_function): Only warn about missing return
8618         statement with -Wreturn-type.
8620 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
8622         * class.c (build_clone): Update.
8623         * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
8624         * cp-tree.h (cxx_dup_lang_specific_decl): New.
8625         * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
8626         (copy_decl): Update.
8627         * method.c (make_thunk): Update.
8629 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
8631         * decl2.c: Delete traditional-mode-related code copied from
8632         the C front end but not used, or used only to permit the
8633         compiler to link.
8635 2002-02-24 Craig Rodrigues  <rodrigc@gcc.gnu.org>
8637         PR c++/4093
8638         * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
8639         to void.
8641 2002-02-22  Jakub Jelinek  <jakub@redhat.com>
8643         PR other/5746
8644         * semantics.c (finish_switch_cond): Don't call get_unwidened
8645         if error_mark_node.
8647 2002-02-22  Nathan Sidwell  <nathan@codesourcery.com>
8649         PR c++/2645, DR 295
8650         * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
8651         tf_keep_type_decl.
8652         (make_typename_type): Use tsubst_flags_t.
8653         * decl.c (make_typename_type): Adjust. Return non-artificial
8654         TYPE_DECLs, if required.
8655         (grokdeclarator): Simplify CVR qualification handling. Allow bad
8656         qualifiers on typedef types.
8657         * decl2.c (handle_class_head): Adjust make_typename_type call.
8658         * parse.y (nested_name_specifier): Likewise.
8659         (typename_sub0): Likewise.
8660         (typename_sub1): Likewise.
8661         * pt.c (convert_template_argument): Adjust make_typename_type
8662         return value.
8663         (tsubst): Adjust cp_build_qualified_type_real calls.
8664         (check_cv_quals_for_unify): Cope with allowing bad qualifications
8665         on template type parms.
8666         (instantiate_decl): Recheck substitutions to give warnings on bad
8667         qualifications.
8668         * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
8670 2002-02-21  Aldy Hernandez  <aldyh@redhat.com>
8672         * cp/decl.c (duplicate_decls): Merge always_inline attribute.
8674         * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
8675         unless DECL_ALWAYS_INLINE.
8677 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
8679         * typeck.c (cp_pointer_int_sum): Renamed from
8680         pointer_int_sum, call pointer_int_sum.
8682 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
8684         * decl.c (duplicate_decls): Return 0 if issued error about
8685         redeclaration.
8687 2002-02-19  Jason Merrill  <jason@redhat.com>
8689         ABI change: Mangle `void (A::*)() const' as
8690         M1AKFvvE, not MK1AFvvE.
8691         * mangle.c (write_function_type): Write cv-quals for member
8692         function type here.
8693         (write_pointer_to_member_type): Not here.
8695 2002-02-18  Jason Merrill  <jason@redhat.com>
8697         * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
8698         (do_decl_instantiation): Likewise.
8700 2002-02-17  Craig Rodrigues  <rodrigc@gcc.gnu.org>
8702         PR c++/5685
8703         * decl.c (duplicate_decls): Make warning unconditional
8704         if duplicate default argument declarations are present.
8706 2002-02-17  Jakub Jelinek  <jakub@redhat.com>
8708         * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
8709         shortening.
8711 2002-02-15  Nathan Sidwell  <nathan@codesourcery.com>
8713         * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
8714         remove incorrect comment. Move #if 0'd code to common path. Use
8715         IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
8717 2002-02-13  Jason Merrill  <jason@redhat.com>
8719         * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
8720         (finish_function): Don't warn if current_function_returns_null.
8722         * typeck2.c (digest_init): Do handle values of vector type.
8724         * typeck2.c (digest_init, process_init_constructor): Treat vectors
8725         like arrays.
8727 2002-02-11  Jason Merrill  <jason@redhat.com>
8729         * parse.y (reserved_declspecs): Don't handle attributes.
8730         (reserved_typespecquals): Handle them here.
8731         * Make-lang.in (parse.c): Adjust expected conflicts.
8733 2002-02-08  Jakub Jelinek  <jakub@redhat.com>
8735         * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
8736         instead of compstmt.
8737         (compstmt_or_stmtexpr): Renamed from compstmt.
8738         (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
8740 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
8742         Rename instantiate_type_flags to tsubst_flags_t & expand use.
8743         * cp-tree.h (instantiate_type_flags): Rename to ...
8744         (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
8745         add tf_warning flag.
8746         (instantiate_type): Adjust prototype.
8747         (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
8748         do_type_instantiation, cp_build_qualified_type_real): Likewise.
8749         cp_build_qualified_type: Adjust.
8750         * class.c (instantiate_type): Adjust parameter. Rename itf_* to
8751         tf_*.
8752         * call.c (standard_conversion): Rename itf_* to tf_*.
8753         (reference_binding): Likewise.
8754         (convert_like_real): Likewise.
8755         * cvt.c (cp_convert_to_pointer): Likewise.
8756         (convert_to_reference): Likewise.
8757         * decl.c (lookup_namespace_name): Use tf_* flags.
8758         (make_typename_type): Likewise.
8759         (grokdeclarator): Likewise.
8760         * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
8761         (coerce_template_template_parms, convert_template_argument,
8762         coerce_template_parms, maybe_get_template_decl_from_type_decl,
8763         lookup_template_class, tsubst_friend_function, tsubst_friend_class,
8764         instantiate_class_template, tsubst_template_arg_vector,
8765         tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
8766         tsubst_decl, tsubst_arg_types, tsubst_function_type,
8767         tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
8768         instantiate_template, fn_type_unification,
8769         resolve_overloaded_unification, verify_class_unification,
8770         unify, get_bindings_real, do_type_instantiation,
8771         regenerate_decl_from_template, instantiate_decl,
8772         tsubst_initializer_list, tsubst_enum,
8773         get_mostly_instantiated_function_type,
8774         invalid_nontype_parm_type_p): Likewise.
8775         * tree.c (cp_build_qualified_type_real): Likewise.
8776         * typeck.c (build_binary_op): Rename itf_* to tf_*.
8777         (build_ptrmemfunc): Likewise.
8778         (convert_for_assignment): Likewise.
8780 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
8782         PR c++/109
8783         * decl.c (grokdeclarator): Allow friend declarations from
8784         dependent types.
8785         * decl2.c (handle_class_head): Don't push into template parm contexts.
8786         * pt.c (push_template_decl_real): Template parm contexts are never
8787         being defined.
8789 2002-02-05  Alexandre Oliva  <aoliva@redhat.com>
8791         * class.c: Include target.h.
8792         (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
8793         BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
8794         bit-field layout.
8795         * Make-lang.in: Adjust deps.
8797 2002-02-05  Jason Merrill  <jason@redhat.com>
8799         * error.c (dump_type): Be more helpful about VECTOR_TYPE.
8801 2002-02-04  Jakub Jelinek  <jakub@redhat.com>
8803         * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
8804         (finish_switch_cond): Set SWITCH_TYPE.
8806 2002-02-04  Richard Henderson  <rth@redhat.com>
8808         * method.c (use_thunk): Always initialize the block tree.  Reindent.
8809         * semantics.c (expand_body): Emit thunks after function, not before.
8811 2002-02-04  Jason Merrill  <jason@redhat.com>
8813         * decl.c (start_function): Call cplus_decl_attributes immediately
8814         after grokdeclarator.
8816         * decl.c (start_function): Combine DECL_RESULT handling code.
8818 2002-02-03  Jason Merrill  <jason@redhat.com>
8820         * xref.c: Remove.
8821         * Make-lang.in (CXX_OBJS): Remove cp/xref.o
8822         (cp/xref.o): Remove dependencies.
8823         * class.c (finish_struct_1, check_methods): Don't call xref fns.
8824         (finish_struct_1): Likewise.
8825         * friend.c (make_friend_class): Likewise.
8826         * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
8827         * spew.c (read_process_identifier): Likewise.
8829 2002-02-01  Jason Merrill  <jason@redhat.com>
8831         PR c++/4872
8832         * decl.c (finish_function): Warn about a non-void function with
8833         no return statement and no abnormal exit.
8834         * cp-tree.h (struct cp_language_function): Add returns_abnormally.
8835         (current_function_returns_abnormally): New macro.
8836         * call.c (build_call): Set it.
8838         * typeck.c (build_component_ref): Always complain about offsetof
8839         constructs on non-PODs.  Only make it an error for members of
8840         virtual bases.
8842         * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
8843         (dump_function_decl): Always dump parms.
8845         * decl2.c (finish_static_data_member_decl): Complain about a local
8846         class with a static data member.
8848         PR c++/4286
8849         * search.c (lookup_field_1): Don't xref a static data member
8850         just because we looked it up.
8852 2002-01-31  Jason Merrill  <jason@redhat.com>
8854         * Make-lang.in (parse.c): Handle .output file.
8856         PR c++/3395
8857         * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
8858         not TREE_TYPE.
8859         * semantics.c (finish_class_definition): Adjust.
8861         Allow attributes in parms and casts.
8862         * parse.y (named_parm): Don't strip attrs.
8863         (declmods): Remove 'attributes' production.
8864         (nonempty_cv_qualifiers): Accept attributes.
8865         (ATTRIBUTE): Give precedence.
8866         * decl.c (groktypename): Handle attributes.
8867         (grokparms): Likewise.
8869 2002-01-29  Jakub Jelinek  <jakub@redhat.com>
8871         * decl2.c (cxx_decode_option): Pass 0 as last argument to
8872         cpp_handle_option.
8873         * lang-specs.h: Use cpp_unique_options instead of cpp_options
8874         when used together with cc1_options.
8876 2002-01-29  Nathan Sidwell  <nathan@codesourcery.com>
8878         PR c++/5132
8879         * typeck2.c (digest_init): Make sure non-array core type is
8880         instantiated.
8881         * decl2.c (reparse_absdcl_as_casts): Just store the type in the
8882         constructor, rather than build a new one.
8883         (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
8884         PURPOSE of constructor elts.
8886 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
8888         * Make-lang.in (parse.c): Adjust expected number of
8889         shift-reduce conflicts.
8890         (decl.o): Depend on diagnostic.h.
8891         * decl.c: Include diagnostic.h.
8892         (grokdeclarator): Check for null pointer.
8893         (finish_function): Don't abort when
8894         current_binding_level->parm_flag != 1, if errors have
8895         occurred; throw away the statement tree and extra binding
8896         levels, and continue.
8897         * lex.c (note_list_got_semicolon): Check for null pointer.
8898         * method.c (hack_identifier): Just return error_mark_node if
8899         value is error_mark_node.
8900         * parse.y (primary: TYPEID(type_id)): No need to use
8901         TYPE_MAIN_VARIANT here.
8902         (handler_seq): Accept an empty list of catch clauses and
8903         generate a fake handler block to avoid later crashes.
8904         (ansi_raise_identifier): Accept the error token too.
8905         * semantics.c (begin_class_definition,
8906         finish_class_definition): Check for error_mark_node.
8908 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
8910         * typeck2.c (friendly_abort): Delete definition.
8911         * cp-tree.h (friendly_abort): Don't prototype.
8912         (my_friendly_assert): Use fancy_abort.
8914 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
8916         * cp-tree.h (my_friendly_abort): Remove.
8918 2002-01-23  Jakub Jelinek  <jakub@redhat.com>
8920         * spew.c (pending_inlines, pending_inlines_tail,
8921         processing_these_inlines): Make static.
8922         (mark_pending_inlines): Remove static.
8923         (begin_parsing_inclass_inline): If in function, save pi
8924         for GC to cp_function_chain->unparsed_inlines instead.
8925         (process_next_inline): Likewise.
8926         * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
8927         (mark_pending_inlines): Add prototype.
8928         * decl.c (spew_debug): Remove unused extern.
8929         (mark_lang_function): Call mark_pending_inlines.
8931 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
8933         * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
8934         init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
8935         semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
8936         Change my_fancy_abort() to abort().
8938 2002-01-23  Jason Merrill  <jason@redhat.com>
8940         PR c++/5453
8941         * class.c (fixed_type_or_null): Fix thinko.
8943         PR c++/3331
8944         * init.c (resolve_offset_ref): Use build_indirect_ref.
8946         * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
8948 2002-01-22  Jason Merrill  <jason@redhat.com>
8950         * parse.y (function_body): Suppress the block for the outermost
8951         curly braces.
8952         * decl.c (pushdecl): Don't try to skip it.
8953         (begin_function_body): Keep the block we create, not the next one.
8954         * init.c (emit_base_init): Don't mess with keep_next_level.
8956         * class.c (build_base_path): Tweak formatting.
8958 2002-01-19  Nathan Sidwell  <nathan@codesourcery.com>
8960         Fix regression introduced with patch for c++/775
8961         * parse.y (class_head_defn): Check for template specializations
8962         with a different class-key.
8964 2002-01-17  Jason Merrill  <jason@redhat.com>
8966         * decl.c (begin_constructor_body, begin_destructor_body): New fns.
8967         (begin_function_body): Call them and keep_next_level.
8968         * init.c (emit_base_init): Call keep_next_level.
8969         * semantics.c (setup_vtbl_ptr): Lose.
8970         * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
8971         (vtbls_set_up_p): Lose.
8972         * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
8973         * method.c (do_build_copy_constructor): Likewise.
8974         (synthesize_method): Call finish_mem_initializers.
8975         * parse.y (nodecls): Likewise.
8977         * error.c (dump_type_suffix): Print the exception specs before
8978         recursing.
8979         (dump_function_decl): Here, too.
8981         * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
8983 2002-01-10  Ira Ruben   <ira@apple.com>
8985         PR c++/907
8986         * decl.c (start_method): Handle attrlist.
8988 2002-01-10  Jakub Jelinek  <jakub@redhat.com>
8990         * decl2.c (max_tinst_depth): Increase default limit to 500.
8992 2002-01-10  Graham Stott  <grahams@redhat.com>
8994         * spew.c (YYCHAR): Uppercase macro parameter and add
8995         parenthesis.
8996         (YYCODE): Likewise.
8997         (NAME): Uppercase macro parameter.
8999 2002-01-09  Graham Stott  <grahams@redhat.com>
9001         * decl.h (grokdeclarator): Wrap long line.
9003         * semantics.c (FINISH_COND): Uppercase macro paramaters and
9004         add parenthesis.
9006 2002-01-08  Graham Stott  <grahams@redhat.com>
9008         * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
9009         (PALLOC): Uppercase macro parameter and whitespace.
9010         (SALLOC): Uppercase macro parameter.
9011         (SFREE): Uppercase macros parameter, add parenthese and
9012         whitespace.
9013         (STREQL): Uppercase macro parameter and whitespace.
9014         (STRNEQ): Likewise.
9015         (STRLSS): Likewise.
9016         (STRLEQ): Likewise.
9017         (STRGTR): Likewise.
9018         (STRGEQ): Likewise.
9020         * call.c (convert_like): Add parenthesis and wrap.
9021         (convert_like_with_context): Likewise.
9022         (ICS_RANK): Whitespace.
9023         (NEED_TEMPORARY_P): Remove parenthesis.
9025         * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
9026         whitespace.
9027         (VTT_MARKED_BINFO_P): Likewise.
9029         * decl.c (BINDING_LEVEL): Add parenthesis.
9030         (DEF_OPERATOR): Likewise.
9032         * mangle.c (MANGLE_TRACE): Add parenthesis.
9033         (MANGLE_TRACE_TREE): Likewise.
9034         (write_signed_number): Likewise.
9035         (write_unsigned_number): Likewise.
9037         * pt.c (ccat): Uppercase macro parameter.
9038         (cat): Likewise
9040         * search.c (SET_BINFO_ACCESS): Add parenthesis.
9042 2002-01-07  Jason Merrill  <jason@redhat.com>
9044         * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
9045         to pedwarn.
9047         PR c++/3536
9048         * method.c (make_thunk): If !flag_weak, give the thunk the
9049         function's linkage.
9050         (use_thunk): Here, too.
9052 2002-01-07  Graham Stott  <grahams@redhat.com>
9054         * error.c: Update copyright date.
9055         (print_scope_operator): Add parenthesis.
9056         (print_left_paren): Likewise.
9057         (print_right_paren): Likewise.
9058         (print_left_bracket): Likewise.
9059         (print_right_bracket): Likewise.
9060         (print_template_argument_list_start): Likewise.
9061         (print_template_argument_list_end): Likewise.
9062         (print_non_consecutive_character): Likewise.
9063         (print_tree_identifier): Likewise.
9064         (print_identifier): Likewise.
9065         (NEXT_CODE): Uppercase macro parameter.
9066         (ident_fndecl): Delete unused.
9067         (GLOBAL_THING): Likewise.
9069 2002-01-06  Graham Stott  <grahams@redhat.com>
9071         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
9072         (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
9073         (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
9074         (RECORD_OR_UNION_TYPE_CHECK): Likewise.
9075         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
9076         (C_IS_RESERVED_WORD): Uppercase macro parameter.
9077         (C_RID_YYCODE) Likewise.
9078         (ptrmem_cst): Use rtx.
9079         (LOCAL_BINDING_P): Add whitespace.
9080         (INHERITED_VALUE_BINDING_P): Likewise.
9081         (BINDING_SCOPE): Wrap long line.
9082         (BINDING_HAS_LEVEL_P): Remove parenthesis.
9083         (BINDING_VALUE): Wrap long line.
9084         (BINDING_TYPE): Whitespace.
9085         (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
9086         (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
9087         (IDENTIFIER_NAMESPACE_VALUE): Likewise.
9088         (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
9089         (same_type_p): Uppercase macro parameters.
9090         (same_type_ignoring_top_level_qualifiers_p): Likewise.
9091         (OVL_FUNCTION): Wrap long line.
9092         (OVL_CHAIN): Whitespace.
9093         (OVL_CURRENT): Add parenthesis and whitespace.
9094         (OVL_NEXT): Whitespace.
9095         (OVL_USED): Likewise.
9096         (IDENTIFIER_TYPE_VALUE): Likewise.
9097         (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
9098         (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
9099         (LANG_ID_FIELD): Whitespace.
9100         (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
9101         (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
9102         (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
9103         (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
9104         (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
9105         (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
9106         (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
9107         (IDENTIFIER_VIRTUAL_P): Likewise.
9108         (IDENTIFIER_OPNAME_P): Likewise.
9109         (IDENTIFIER_TYPENAME_P): Remove parenthesis.
9110         (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
9111         (C_SET_EXP_ORIGINAL_CODE): Likewise.
9112         (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
9113         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
9114         (IS_AGGR_TYPE): Uppercase macro parameter.
9115         (CLASS_TYPE_P): Likewise.
9116         (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
9117         (IS_AGGR_TYPE_2): Whitespace.
9118         (TAGGED_TYPE_P): Uppercase macro parameter.
9119         (TYPE_BUILT_IN): Whitespace.
9120         (TYPE_FOR_JAVA): Likewise.
9121         (FUNCTION_ARG_CHAIN): Remove parenthesis.
9122         (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
9123         (FUNCTION_FIRST_USER_PARAM): Likewise.
9124         (PROMOTES_TO_AGGR_TYPE): Whitespace.
9125         (DERIVED_FROM_P): Add parenthesis and wrap.
9126         (UNIQUELY_DERIVED_FROM_P): Likewise.
9127         (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
9128         (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
9129         (CLASSTYPE_USE_TEMPLATE): Whitespace.
9130         (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
9131         (TYPE_GETS_DELETE): Add parenthesis.
9132         (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
9133         (TYPE_HAS_ASSIGN_REF): Likewise,
9134         (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
9135         (TYPE_HAS_INIT_REF): Likewise.
9136         (TYPE_HAS_CONST_INIT_REF): Likewise.
9137         (TYPE_BEING_DEFINED): Likewise.
9138         (TYPE_LANG_SPECIFIC): Likewise.
9139         (CLASSTYPE_RTTI): Likewise.
9140         (TYPE_OVERLOADS_CALL_EXPR): Likewise.
9141         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
9142         (TYPE_OVERLOADS_ARROW): Likewise.
9143         (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
9144         (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
9145         (CLASSTYPE_METHOD_VEC): Likewise.
9146         (CLASSTYPE_MARKED_N): Likewise.
9147         (CLASSTYPE_MARKED): Likewise.
9148         (CLASSTYPE_MARKED2): Likewise.
9149         (CLASSTYPE_MARKED3): Likewise.
9150         (CLASSTYPE_MARKED4): Likewise.
9151         (CLASSTYPE_MARKED5): Likewise.
9152         (CLASSTYPE_MARKED6): Likewise.
9153         (SET_CLASSTYPE_MARKED): Whitespace.
9154         (CLEAR_CLASSTYPE_MARKED): Likewise.
9155         (SET_CLASSTYPE_MARKED2): Likewise.
9156         (CLEAR_CLASSTYPE_MARKED2): Likewise.
9157         (SET_CLASSTYPE_MARKED3): Likewise.
9158         (CLEAR_CLASSTYPE_MARKED3): Likewise.
9159         (SET_CLASSTYPE_MARKED4): Likewise.
9160         (CLEAR_CLASSTYPE_MARKED4): Likewise.
9161         (SET_CLASSTYPE_MARKED5): Likewise.
9162         (CLEAR_CLASSTYPE_MARKED5): Likewise.
9163         (SET_CLASSTYPE_MARKED6): Likewise.
9164         (CLEAR_CLASSTYPE_MARKED6): Likewise.
9165         (CLASSTYPE_TAGS): Likewise.
9166         (CLASSTYPE_VSIZE): Likewise.
9167         (CLASSTYPE_VBASECLASSES): Likewise.
9168         (CANONICAL_BINFO): Add parenthesis.
9169         (CLASSTYPE_SIZE(NODE): Likewise.
9170         (CLASSTYPE_SIZE_UNIT): Likewise.
9171         (CLASSTYPE_ALIGN(NODE): Likewise.
9172         (CLASSTYPE_USER_ALIGN): Likewise.
9173         (TYPE_JAVA_INTERFACE): Likewise.
9174         (CLASSTYPE_PURE_VIRTUALS): Likewise.
9175         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
9176         (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
9177         (CLASSTYPE_HAS_MUTABLE): Likewise.
9178         (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
9179         (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
9180         (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
9181         (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
9182         (CLASSTYPE_INTERFACE_ONLY): Likewise.
9183         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
9184         (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
9185         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
9186         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
9187         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
9188         (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
9189         (BINFO_UNSHARED_MARKED): Whitespace.
9190         (BINFO_MARKED): Whitespace and wrap.
9191         (SET_BINFO_MARKED): Likewise.
9192         (CLEAR_BINFO_MARKED): Likewise.
9193         (BINFO_VTABLE_PATH_MARKED): Likewise.
9194         (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
9195         (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
9196         (BINFO_SUBVTT_INDEX): Remove parenthesis.
9197         (BINFO_VPTR_INDEX): Likewise.
9198         (BINFO_PRIMARY_BASE_OF): Likewise,
9199         (CLASSTYPE_VFIELDS): Whitespace.
9200         (VF_DERIVED_VALUE): Wrap long line.
9201         (NAMESPACE_LEVEL): Whitespace.
9202         (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
9203         (DEFARG_POINTER): Whitespace.
9204         (DECL_NEEDED_P): Remove parenthesis.
9205         (DECL_LANGUAGE): Whitespace.
9206         (SET_DECL_LANGUAGE): Add parenthesis.
9207         (DECL_CONSTRUCTOR_P): Whitespace and wrap.
9208         (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
9209         (DECL_IN_AGGR_P): Whitespace.
9210         (DECL_FRIEND_P): Likewise.
9211         (DECL_BEFRIENDING_CLASSES): Likewise.
9212         (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
9213         (DECL_NONCONVERTING_P): Whitespace.
9214         (DECL_PURE_VIRTUAL_P): Likewise.
9215         (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
9216         (DECL_PENDING_INLINE_INFO): Whitespace.
9217         (DECL_SORTED_FIELDS): Likewise.
9218         (DECL_DEFERRED_FN): Likewise.
9219         (DECL_TEMPLATE_INFO): Likewise.
9220         (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
9221         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
9222         (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
9223         (TMPL_ARGS_LEVEL): Likewise.
9224         (SET_TMPL_ARGS_LEVEL): Likewise.
9225         (INNERMOST_TEMPLATE_PARMS): Whitespace.
9226         (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
9227         (INTEGRAL_CODE_P(CODE): Add parenthesis.
9228         (CP_INTEGRAL_TYPE_P): Remove parenthesis.
9229         (TYPE_HAS_CONSTRUCTOR): Whitespace.
9230         (TREE_HAS_CONSTRUCTOR): Likewise.
9231         (TYPE_HAS_DESTRUCTOR): Likewise.
9232         (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
9233         (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
9234         (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
9235         (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
9236         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
9237         (TYPE_PTRMEMFUNC_P): Likewise.
9238         (TYPE_PTRMEMFUNC_FLAG): Likewise.
9239         (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
9240         (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
9241         (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
9242         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
9243         (DECL_ACCESS): Whitespace.
9244         (DECL_GLOBAL_CTOR_P): Remove parenthesis.
9245         (DECL_GLOBAL_DTOR_P): Likewise.
9246         (GLOBAL_INIT_PRIORITY): Likewise.
9247         (DECL_TEMPLATE_PARMS): Likewise.
9248         (DECL_TEMPLATE_RESULT): Likewise.
9249         (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
9250         (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
9251         (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
9252         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
9253         (PRIMARY_TEMPLATE_P): Add parenthesis.
9254         (DECL_USE_TEMPLATE): Whitespace.
9255         (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
9256         (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
9257         (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
9258         (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
9259         (CALL_DECLARATOR_PARMS): Remove parenthesis.
9260         (CALL_DECLARATOR_QUALS): Likewise.
9261         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
9262         (TEMP_NAME_P): Wrap.
9263         (VFIELD_NAME_P): Likewise.
9264         (B_SET): Uppercase macro parameters and add parenthesis.
9265         (B_CLR): Likewise.
9266         (B_TST): Likewise.
9267         (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
9268         (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
9269         (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
9270         (same_or_base_type_p): Likewise.
9271         (cp_deprecated): Likewise.
9273 2002-01-05  Richard Henderson  <rth@redhat.com>
9275         * semantics.c (expand_body): Revert last change.
9277 2002-01-04  Jason Merrill  <jason@redhat.com>
9279         PR c++/4122
9280         * class.c (update_vtable_entry_for_fn): Set delta to zero for a
9281         lost primary.
9283         * class.c (build_vtbl_initializer): Check for a lost primary
9284         before calculating the vtable entry to throw away.
9286 2002-01-02  Jason Merrill  <jason@redhat.com>
9288         * semantics.c (expand_body): Call outlining_inline_function when
9289         emitting an inline function out of line.
9291 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
9293         PR c++/5116, c++/764 reversion
9294         * call.c (build_new_op): Revert the instantiations. They are
9295         incorrect.
9297 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
9299         PR c++/5089
9300         * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
9302 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
9304         PR c++/3716
9305         * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
9306         (tsubst, case POINTER_TYPE): Handle pmfs here.
9307         (tsubst, case OFFSET_TYPE): Check it is not an offset to
9308         reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
9310 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
9312         PR c++/35
9313         * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
9314         (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
9315         * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
9316         PARM_DECL.
9317         (tsubst_template_parms): Break up loop statements.
9318         (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
9319         parm PARM_DECLs don't get promoted.
9321 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
9323         PR c++/5123
9324         * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
9325         (build_x_function_call): Cope with a COMPONENT_REF containing a
9326         TEMPLATE_ID_EXPR.
9328 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
9330         PR c++/5213
9331         * pt.c (convert_template_argument): Be more careful determining
9332         when RECORD_TYPE templates are or are not templates.
9334 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
9336         PR c++/775
9337         * cp-tree.h (handle_class_head): Adjust prototype.
9338         * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
9339         parameters. Use for all class heads.
9340         * parse.y (named_class_head_sans_basetype, named_class_head,
9341         named_complex_class_head_sans_basetype,
9342         named_class_head_sans_basetype_defn,
9343         unnamed_class_head): Remove.
9344         (class_head, class_head_apparent_template): Recognize class heads
9345         (class_head_decl, class_head_defn): New reductions. Process class
9346         heads.
9347         (structsp): Adjust class definition and class declaration
9348         reductions.
9349         (maybe_base_class_list): Give diagnostic on empty list.
9351 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
9353         PR c++/4379
9354         * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
9355         single non-static member.
9356         (unary_complex_lvalue): If it cannot be a pointer to member, don't
9357         make it so. Check it is not pointer to reference.
9359 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
9361         PR c++/5132
9362         * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
9363         are processing a template decl.
9365 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
9367         PR c++/5116, c++/764
9368         * call.c (build_new_op): Make sure template class operands are
9369         instantiated. Simplify arglist construction.
9371 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
9373         * call.c (build_user_type_conversion_1): Use my_friendly_assert
9374         rather than if ... abort.
9375         * cvt.c (convert_to_reference): Likewise.
9376         * semantics.c (setup_vtbl_ptr): Likewise.
9377         * pt.c (lookup_template_class): Comment typo.
9379 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
9381         PR c++/5125
9382         * pt.c (push_template_decl_real): Make sure DECL has
9383         DECL_LANG_SPECIFIC.
9385 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
9387         PR c++/335
9388         * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
9389         for non-reference fields.
9390         * typeck.c (require_complete_type): Use resolve_offset_ref).
9392 2001-12-26  Nathan Sidwell  <nathan@codesourcery.com>
9394         PR c++/196
9395         * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
9397 2001-12-24  Nathan Sidwell  <nathan@codesourcery.com>
9399         PR c++/160
9400         * typeck.c (build_modify_expr): Remove old unreachable code & tidy
9401         up. Don't stabilize_references when initializing a reference.
9403 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9405         * decl2.c (lang_f_options): Const-ify.
9407 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
9409         * config-lang.in (diff_excludes): Remove.
9411 2001-12-19  Nathan Sidwell  <nathan@codesourcery.com>
9413         PR c++/90
9414         * typeck.c (build_function_call_real): Use original function
9415         expression for errors.
9417 2001-12-18  Jason Merrill  <jason@redhat.com>
9419         PR c++/3242
9420         * class.c (add_method): Do compare 'this' quals when trying to match a
9421         used function.  Don't defer to another used function.
9423 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
9425         * pt.c (instantiate_clone): Remove, fold into ...
9426         (instantiate_template): ... here. Simplify by removing mutual
9427         recursion.
9428         * typeck2.c (build_m_component_ref): Don't cv qualify the function
9429         pointed to by a pointer to function.
9430         * class.c (delete_duplicate_fields_1): Typo.
9432 2001-12-18  Jason Merrill  <jason@redhat.com>
9434         C++ ABI change: destroy value arguments in caller.
9435         * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
9436         create an extra binding level for the parameters.
9437         * decl.c (store_parm_decls): Don't do parameter cleanups.
9439 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
9441         * call.c (build_new_method_call): Use '%#V'.
9442         * error.c (cv_to_string): Use V parameter to determine padding.
9444 2001-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
9446         * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
9447         spellings in messages.
9449 2001-12-17  Zack Weinberg  <zack@codesourcery.com>
9451         * cp-tree.h: Delete #defines for cp_error, cp_warning,
9452         cp_pedwarn, and cp_compiler_error.
9453         * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
9454         except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
9455         rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
9456         typeck2.c: Change calls to the above macros to use their
9457         language-independent equivalents: error, warning, pedwarn, and
9458         internal_error respectively.
9460 2001-12-16  Neil Booth  <neil@daikokuya.demon.co.uk>
9462         * decl2.c (finish_file): Remove back_end_hook.
9464 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
9466         * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
9467         cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
9468         pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
9470 2001-12-15  Joseph S. Myers  <jsm28@cam.ac.uk>
9472         * lang-options.h: Use American spelling in messages.
9474 2001-12-13  Jason Merrill  <jason@redhat.com>
9476         * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
9478         Use cleanups to run base and member destructors.
9479         * init.c (push_base_cleanups): New function, split out from...
9480         (build_delete): ...here.  Lose !TYPE_HAS_DESTRUCTOR code.
9481         * decl.c (finish_destructor_body): Move vbase destruction code to
9482         push_base_cleanups.
9483         (begin_function_body, finish_function_body): New fns.
9484         (finish_function): Move [cd]tor handling and call_poplevel to
9485         finish_function_body.
9486         (pushdecl): Skip the new level.
9487         * semantics.c (genrtl_try_block): Don't call end_protect_partials.
9488         (setup_vtbl_ptr): Call push_base_cleanups.
9489         * method.c (synthesize_method): Call {begin,end}_function_body.
9490         * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
9491         * cp-tree.h: Declare new fns.
9492         * parse.y (function_body, .begin_function_body): New nonterminals.
9493         (fndef, pending_inline, function_try_block): Use function_body.
9494         (ctor_initializer_opt, function_try_block): No longer has a value.
9495         (base_init): Remove .set_base_init token.
9496         (.set_base_init, compstmt_or_error): Remove.
9497         * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
9499         * optimize.c (maybe_clone_body): Fix parameter updating.
9501 2001-12-12  Jason Merrill  <jason@redhat.com>
9503         * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
9504         * semantics.c (genrtl_start_function): Don't pass
9505         parms_have_cleanups or push an extra binding level.
9506         (genrtl_finish_function): Lose cleanup_label cruft.
9508         * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
9509         (ctor_label): Remove.
9510         * semantics.c (finish_return_stmt): Lose ctor_label support.
9511         * decl.c (finish_constructor_body, mark_lang_function): Likewise.
9512         * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
9513         dtor_label.
9515         * call.c (build_new_method_call): Let resolves_to_fixed_type_p
9516         check for [cd]tors.
9517         * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
9519         * decl.c (finish_function): Check VMS_TARGET, not VMS.
9521         * decl.c (start_cleanup_fn): Remove redundant pushlevel.
9522         (end_cleanup_fn): And poplevel.
9524         * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
9525         if we're in a template.
9527 2001-12-12  Jakub Jelinek  <jakub@redhat.com>
9529         * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
9530         ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
9531         THIS_NAME_P): Delete.
9532         * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
9533         THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
9534         with internal naming scheme.
9535         * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
9537 2001-12-12  Nathan Sidwell  <nathan@codesourcery.com>
9539         * decl.c (grokdeclarator): Deprecated implicit typename use.
9541 2001-12-11  Nathan Sidwell  <nathan@codesourcery.com>
9543         PR g++/51
9544         * parse.y (frob_specs): Indicate it is a language linkage which
9545         contained the extern.
9546         * decl.c (grokdeclarator): Allow extern language linkage with
9547         other specifiers.
9549 2001-12-10  Nathan Sidwell  <nathan@codesourcery.com>
9551         PR g++/72
9552         * decl.c (add_binding): Don't reject duplicate typedefs involving
9553         template parameters.
9555 2001-12-10  Neil Booth  <neil@daikokuya.demon.co.uk>
9557         * parse.y, semantics.c: Similarly.
9559 2001-12-09  Nathan Sidwell  <nathan@codesourcery.com>
9561         PR g++/87
9562         * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
9563         (copy_args_p): Rename to ...
9564         (copy_fn_p): ... here.
9565         (grok_special_member_properties): New function.
9566         (grok_op_properties): Lose VIRTUALP parameter.
9567         (copy_assignment_arg_p): Remove.
9568         * call.c (build_over_call): Use copy_fn_p.
9569         * decl.c (grokfndecl): Reformat. Adjust call to
9570         grok_op_properties.
9571         (copy_args_p): Rename to ...
9572         (copy_fn_p): ... here. Reject template functions. Check for pass
9573         by value.
9574         (grok_special_member_properties): Remember special functions.
9575         (grok_ctor_properties): Don't remember them here, just check.
9576         (grok_op_properties): Likewise.
9577         (start_method): Call grok_special_member_properties.
9578         * decl2.c (grokfield): Likewise.
9579         (copy_assignment_arg_p): Remove.
9580         (grok_function_init): Don't remember abstract assignment here.
9581         * pt.c (instantiate_class_template): Call
9582         grok_special_member_properties.
9583         (tsubst_decl): Adjust grok_op_properties call.
9585 2001-12-08  Aldy Hernandez  <aldyh@redhat.com>
9587         * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
9588         RID_TYPES_COMPATIBLE_P.
9590 2001-12-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
9592         * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
9593         call to build_aggr_init.
9594         * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
9596 2001-12-08  Neil Booth  <neil@daikokuya.demon.co.uk>
9598         * parse.y: Replace uses of the string non-terminal with STRING.
9599         Don't perform string concatentaion here.
9600         (string): Remove non-terminal.
9601         * semantics.c (finish_asm_stmt): Don't concatenate strings here.
9603 2001-12-05  Jason Merrill  <jason@redhat.com>
9605         * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
9606         (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
9607         * tree.c (cp_start_inlining, cp_end_inlining): New fns.
9608         * pt.c (push_tinst_level): No longer static.
9609         * cp-tree.h: Declare them.
9611         * init.c (resolve_offset_ref): Don't check access for the base
9612         conversion to access a FIELD_DECL.
9614         * cp-tree.h (TYPE_REFFN_P): New macro.
9615         * decl.c (bad_specifiers): Check it, too.
9617         * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
9618         on the __*_type_info type if we haven't seen a definition.
9620 2001-12-05  Neil Booth  <neil@daikokuya.demon.co.uk>
9622         * decl.c: Include c-common.h.
9623         (shadow_warning): Move to c-common.c.
9625 2001-12-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9627         * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
9629 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
9631         * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
9633 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
9635         PR g++/164
9636         * init.c (sort_base_init): Allow binfos to be directly specified.
9637         * method.c (do_build_copy_constructor): Explicitly convert to the
9638         base instance.
9639         (do_build_assign_ref): Likewise.
9641 2001-12-03  Hans-Peter Nilsson  <hp@bitrange.com>
9643         * decl.c (xref_basetypes): Don't use C99 construct in tag_code
9644         declaration and initialization.
9646 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
9648         * typeck2.c: Remove leading capital from diagnostic messages, as
9649         per GNU coding standards.
9651 2001-12-03  Mumit Khan  <khan@nanotech.wisc.edu>
9653         PR c++/3394
9654         * decl.c (xref_basetypes): Handle attributes between
9655         'class' and name.
9657 2001-12-03  Nathan Sidwell  <nathan@codesourcery.com>
9659         PR g++/3381
9660         * parse.y (named_complex_class_head_sans_basetype): Add new
9661         reduction.
9662         * Make-lang.in (parse.c): Adjust expected conflict count.
9664 2001-12-03  Jason Merrill  <jason@redhat.com>
9666         * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
9667         immediate binfos for our virtual bases.
9669 2001-12-02  Neil Booth  <neil@daikokuya.demon.co.uk>
9671         * call.c (build_java_interface_fn_ref): Similarly.
9672         * except.c (is_admissible_throw_operand): Similarly.
9673         * init.c (build_java_class_ref): Similarly.
9674         * xref.c (open_xref_file): Similarly.
9676 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
9678         * class.c (finish_struct): Remove trailing periods from messages.
9679         * decl.c (check_tag_decl): Similarly.
9680         * lex.c (cxx_set_yydebug): Similarly.
9681         * typeck2.c (friendly_abort): Similarly.
9683 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
9685         PR c++/3048
9686         * cp-tree.h (ovl_member): Remove.
9687         * decl2.c (merge_functions): Handle extern "C" functions
9688         specially.
9689         * tree.c (ovl_member): Remove.
9691 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
9693         PR c++/4842
9694         * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
9695         FUNCTION_DECL, as input.
9696         (mark_overriders): Remove.
9697         (warn_hidden): Rework for the new ABI.
9699 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
9701         PR c++/3471
9702         * call.c (convert_like_real): Do not build additional temporaries
9703         for rvalues of class type.
9705 2001-11-28  Nathan Sidwell  <nathan@codesourcery.com>
9707         * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
9708         (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
9709         (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
9710         (DERIVED_FROM_P): Likewise.
9711         (enum base_access): Renumber, add ba_quiet bit mask.
9712         (get_binfo): Remove.
9713         (get_base_distance): Remove.
9714         (binfo_value): Remove.
9715         (ACCESSIBLY_DERIVED_FROM_P): Remove.
9716         * call.c (standard_conversion): Use lookup_base.
9717         * class.c (strictly_overrides): Likewise.
9718         (layout_virtual_bases): Likewise.
9719         (warn_about_ambiguous_direct_bases): Likewise.
9720         (is_base_of_enclosing_class): Likewise.
9721         (add_vcall_offset_vtbl_entries_1): Likewise.
9722         * cvt.c (build_up_reference): Adjust comment.
9723         * init.c (build_member_call): Reformat.
9724         * search.c (get_binfo): Remove.
9725         (get_base_distance_recursive): Remove.
9726         (get_base_distance): Remove.
9727         (lookup_base_r): Tweak.
9728         (lookup_base): Add ba_quiet control. Complete the types here.
9729         (covariant_return_p): Use lookup_base.
9730         * tree.c (binfo_value): Remove.
9731         (maybe_dummy_object): Use lookup_base.
9732         * typeck.c (build_static_cast): Use lookup_base.
9733         (get_delta_difference): Likewise.
9734         * typeck2.c (binfo_or_else): Use lookup_base.
9735         (build_scoped_ref): Add back error_mark_check.
9736         (build_m_component_ref): Use lookup_base.
9738 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
9740         * Make-lang.in (c++.generated-manpages): New dummy target.
9742 2001-11-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9744         * Make-lang.in (cp-lang.o): Depends on c-common.h.
9745         * cp-lang.c (c-common.h): Include.
9746         (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
9747         * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
9748         * expr.c (init_cplus_expand): Don't set lang_expand_constant.
9750 2001-11-26  Neil Booth  <neil@daikokuya.demon.co.uk>
9752         * decl2.c (c_language): Move to c-common.c.
9753         * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
9754         functions.
9755         (cxx_init): Update.
9757 2001-11-26  Jason Merrill  <jason@redhat.com>
9759         * call.c (joust): Remove COND_EXPR hack.
9761 2001-11-25  Aldy Hernandez  <aldyh@redhat.com>
9763         * search.c (lookup_base_r): Declare bk in variable declaration
9764         space.
9766 2001-11-25  Nathan Sidwell  <nathan@codesourcery.com>
9768         PR g++/3145
9769         * class.c (build_vbase_pointer): Remove.
9770         (build_vbase_path): Remove.
9771         (build_base_path): New function.
9772         * cp-tree.h (base_access, base_kind): New enumerations.
9773         (build_base_path): Declare.
9774         (convert_pointer_to_real): Remove.
9775         (convert_pointer_to): Remove.
9776         (lookup_base): Declare.
9777         (convert_pointer_to_vbase): Remove.
9778         * call.c (build_scoped_method_call): Use lookup_base &
9779         build_base_path instead of convert_pointer_to_real,
9780         get_base_distance & get_binfo.
9781         (build_over_call): Likewise.
9782         * cvt.c (cp_convert_to_pointer): Likewise.
9783         (convert_to_pointer_force): Likewise.
9784         (build_up_reference): Likewise.
9785         (convert_pointer_to_real): Remove.
9786         (convert_pointer_to): Remove.
9787         * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
9788         instead of convert_pointer_to_vbase & build_vbase_path.
9789         (emit_base_init): Use build_base_path instead of
9790         convert_pointer_to_real.
9791         (expand_virtual_init): Lose unrequired conversions.
9792         (resolve_offset_ref): Use lookup_base and build_base_path
9793         instead of convert_pointer_to.
9794         * rtti.c (build_dynamic_cast_1): Use lookup_base &
9795         build_base_path instead of get_base_distance & build_vbase_path.
9796         * search.c (get_vbase_1): Remove.
9797         (get_vbase): Remove.
9798         (convert_pointer_to_vbase): Remove.
9799         (lookup_base_r): New function.
9800         (lookup_base): New function.
9801         * typeck.c (require_complete_type): Use lookup_base &
9802         build_base_path instead of convert_pointer_to.
9803         (build_component_ref): Likewise.
9804         (build_x_function_call): Likewise.
9805         (get_member_function_from_ptrfunc): Likewise.
9806         (build_component_addr): Likewise.
9807         * typeck2.c (build_scoped_ref): Likewise.
9809 2001-11-22  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9811         * cp-tree.h (CP_TYPE_QUALS): Removed.
9812         * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
9813         * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
9814         LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
9815         * dump.c (cp_dump_tree): Use void* dump_info argument to match
9816         lang-hooks prototype.
9817         * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
9818         rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
9819         CP_TYPE_QUALS changed to cp_type_quals.
9820         * Make-lang.in: References to c-dump.h changed to tree-dump.h.
9821         (CXX_C_OBJS): Remove c-dump.o.
9823 2001-11-21  Mark Mitchell  <mark@codesourcery.com>
9825         PR c++/3637
9826         * pt.c (lookup_template_class): Ensure that all specializations
9827         are registered on the list corresponding to the most general
9828         template.
9830 2001-11-20  Mark Mitchell  <mark@codesourcery.com>
9832         * call.c (non_reference): Add documentation.
9833         (convert_class_to_reference): Do not strip reference types
9834         from conversion operators.
9835         (maybe_handle_ref_bind): Simplify.
9836         (compare_ics): Correct handling of references.
9838 2001-11-19  John Wilkinson <johnw@research.att.com>
9840         * dump.c (dump_op): New function.
9841         (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION.  Use
9842         dump_op.  Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
9843         DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
9845 2001-11-19  Mark Mitchell  <mark@codesourcery.com>
9847         PR4629
9848         * semantics.c (finish_sizeof): Make sure that expression created
9849         while processing a template do not have a type.
9850         (finish_alignof): Likewise.
9851         * typeck.c (c_sizeof): Likewise.
9852         (expr_sizeof): Likewise.
9854 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
9856         * lex.c (cxx_finish): Call c_common_finish.
9857         (finish_parse): Remove.
9859 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9861         * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
9862         when displaying error message about missing array bounds.
9864 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9866         * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
9867         CONST_CAST_EXPR.
9868         * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
9870 2001-11-16  Neil Booth  <neil@daikokuya.demon.co.uk>
9872         * cp-tree.h (print_class_statistics): Restore.
9874 2001-11-15  Jason Merrill  <jason@redhat.com>
9876         * method.c (use_thunk): Don't emit debugging information for thunks.
9878         * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
9879         * decl.c (make_typename_type): Handle getting a class template.
9880         * search.c (lookup_field_r): A class template is good enough for
9881         want_type.
9883         * call.c (convert_like_real): Only use cp_convert for the bad part.
9884         (standard_conversion): Also allow bad int->enum.
9885         * typeck.c (ptr_reasonably_similar): Also allow functions to
9886         interconvert.  Pointers to same-size integers are reasonably
9887         similar.
9889         * cvt.c (convert_to_void): If we build a new COND_EXPR, always
9890         give it void type.
9892 2001-11-15  Nathan Sidwell  <nathan@codesourcery.com>
9894         PR g++/3154
9895         * init.c (sort_base_init): Remove unreachable code.
9896         (expand_member_init): Adjust comment to reflect reality. Simplify
9897         and remove unreachable code.
9899 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
9901         * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
9902         (cxx_init): Update prototype.
9903         * decl.c (init_decl_processing): Rename.  Move null node init
9904         to its creation time.
9905         * lex.c (cxx_init_options): Update.
9906         (cxx_init): Combine with old init_parse; also call
9907         cxx_init_decl_processing.
9909 2001-11-14  Richard Sandiford  <rsandifo@redhat.com>
9911         * decl.c (check_initializer): Try to complete the type of an
9912         array element before checking whether it's complete.  Don't
9913         complain about arrays with complete element types but an
9914         unknown size.
9915         (cp_finish_decl): Build the hierarchical constructor before
9916         calling maybe_deduce_size_from_array_init.
9918 2001-11-14  Joseph S. Myers  <jsm28@cam.ac.uk>
9920         * Make-lang.in: Change all uses of $(manext) to $(man1ext).
9922 2001-11-13  Nathan Sidwell  <nathan@codesourcery.com>
9924         PR g++/4206
9925         * parse.y (already_scoped_stmt): Remove.
9926         (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
9928 2001-11-12  H.J. Lu <hjl@gnu.org>
9930         * cvt.c (ocp_convert): Don't warn the address of a weak
9931         function is always `true'.
9933 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
9935         * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
9936         LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
9937         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
9938         * cp-tree.h (print_class_statistics): Remove.
9939         (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
9940         cxx_print_identifier, cxx_set_yydebug): New.
9941         * lex.c (set_yydebug): Rename c_set_yydebug.
9942         * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
9943         lang_print_xnode): Rename.
9944         * tree.c (print_lang_statistics): Rename.
9946 2001-11-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9948         * class.c (dump_array): Fix format specifier warning.
9950 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
9952         * cp-lang.c (LANG_HOOKS_NAME): Override.
9953         (struct lang_hooks): Constify.
9954         * lex.c (cxx_init_options): Update.
9955         (lang_identify): Remove.
9956         * parse.y (language_string): Remove.
9958 2001-11-08  Andreas Franck  <afranck@gmx.de>
9960         * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
9961         DEMANGLER_CROSS_NAME): Handle program_transform_name the way
9962         suggested by autoconf.
9963         (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
9964         (c++.install-common): Use the transformed target alias names.
9966 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
9968         * Make-lang.in: Update.
9969         * cp-lang.c: Include langhooks-def.h.
9971 2001-11-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9973         * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
9975 2001-11-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9977         * lex.c (copy_lang_type): Add static prototype.
9979 2001-11-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9981         * pt.c (unify): Handle SCOPE_REF.
9983 2001-11-01  Jakub Jelinek  <jakub@redhat.com>
9985         * tree.c (cp_copy_res_decl_for_inlining): Adjust
9986         DECL_ABSTRACT_ORIGIN for the return variable.
9988 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
9990         *  Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
9992 2001-10-28  Joseph S. Myers  <jsm28@cam.ac.uk>
9994         * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
9995         semantics.c, spew.c: Fix spelling errors.
9997 2001-10-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9999         * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
10001 2001-10-25  Zack Weinberg  <zack@codesourcery.com>
10003         * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
10004         pop_everything.
10006 2001-10-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10008         * cp-lang.c (cxx_get_alias_set): New function.
10009         Point LANG_HOOKS_GET_ALIAS_SET to it.
10011 2001-10-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10013         * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
10014         * cp-tree.h (make_unbound_class_template): Prototype new function.
10015         * decl.c (make_unbound_class_template): New function.
10016         * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
10017         * error.c (dump_type): Likewise.
10018         * mangle.c (write_type): Likewise.
10019         * parse.y (template_parm): Likewise.
10020         (template_argument): Use make_unbound_class_template.
10021         * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
10022         (tsubst): Likewise.
10023         (tsubst_copy): Likewise.
10024         (unify): Likewise.
10025         * tree.c (walk_tree): Likewise.
10026         * typeck.c (comptypes): Likewise.
10028 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10030         * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
10031         extra calls into fewer ones.
10033 2001-10-18  Alexandre Oliva  <aoliva@redhat.com>
10035         * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
10036         Warn when merging inline with attribute noinline.
10037         (start_decl, start_function): Warn if inline and attribute
10038         noinline appear in the same declaration.
10040 2001-10-16  H.J. Lu <hjl@gnu.org>
10042         * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
10043         for tree checking disabled.
10045 2001-10-16  Hans-Peter Nilsson  <hp@axis.com>
10047         * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
10048         NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
10050 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
10052         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
10053         (unify): Only handle MINUS_EXPR specially if the above flag is set
10054         and the subtracted constant is 1.  Clear the flag on recursive calls.
10055         Set it when unifying the maximum value in an INTEGER_TYPE's range.
10057 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
10059         * decl.c (bad_specifiers): Don't allow exception specifications
10060         on any typedefs.
10062 2001-10-14  Neil Booth  <neil@daikokuya.demon.co.uk>
10064         * cp/lex.c (init_cp_pragma): Similarly.
10066 2001-10-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10068         * pt.c (lookup_template_class): Build complete template arguments
10069         for BOUND_TEMPLATE_TEMPLATE_PARM.
10071 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10073         * cp-tree.h (TYPE_BINFO): Update comment.
10074         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
10075         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
10076         (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
10077         (copy_type): Prototype new function.
10078         * lex.c (copy_lang_decl): Gather tree node statistics.
10079         (copy_lang_type): New function.
10080         (copy_type): Likewise.
10081         (cp_make_lang_type): Create lang_type for
10082         BOUND_TEMPLATE_TEMPLATE_PARM.  Set TYPE_BINFO for TYPENAME_TYPE
10083         and BOUND_TEMPLATE_TEMPLATE_PARM.
10084         * pt.c (tsubst): Use copy_type instead of copy_node.
10085         * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
10087 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10089         * pt.c (determine_specialization): Ignore functions without
10090         DECL_TEMPLATE_INFO.
10092 2001-10-12  Nathan Sidwell  <nathan@codesourcery.com>
10094         PR g++/4476
10095         * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
10097 2001-10-11  Jason Merrill  <jason_merrill@redhat.com>
10099         * typeck2.c (store_init_value): Don't re-digest a bracketed
10100         initializer.
10102         * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
10103         ANON_AGGR_TYPE_P.
10105 2001-10-11  Richard Henderson  <rth@redhat.com>
10107         * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
10108         of an asm statement.
10109         (build_vtbl_ref_1): Split out from build_vtbl_ref.
10110         (build_vfn_ref): Use it to handle vtable descriptors before
10111         calling build_vtable_entry_ref.
10112         * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
10114 2001-10-10  Richard Henderson  <rth@redhat.com>
10116         * parse.y (asm_operand): Allow named operands.
10117         * semantics.c (finish_asm_stmt): Tweek for changed location
10118         of the operand constraint.
10120 2001-10-09  Jason Merrill  <jason_merrill@redhat.com>
10122         * call.c (standard_conversion): Add bad conversion between
10123         integers and pointers.
10124         (convert_like_real): Don't use convert_for_initialization for bad
10125         conversions; complain here and use cp_convert.
10126         (build_over_call): Don't handle bad conversions specially.
10127         (perform_implicit_conversion): Allow bad conversions.
10128         (can_convert_arg_bad): New fn.
10129         * cp-tree.h: Declare it.
10130         * typeck.c (convert_for_assignment): Use it.
10131         (ptr_reasonably_similar): Any target type is similar to void.
10133 2001-10-08  Alexandre Oliva  <aoliva@redhat.com>
10135         * Make-lang.in (CXX_OBJS): Added cp-lang.o.
10136         (cp/cp-lang.o): New rule.
10137         * cp-tree.h: Declare hooks.
10138         * tree.c: Make hooks non-static.
10139         (init_tree): Don't initialize hooks here.
10140         * lex.c: Likewise.  Move definition of lang_hooks to...
10141         * cp-lang.c: ... new file.
10143 2001-10-08  Richard Henderson  <rth@redhat.com>
10145         * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
10146         (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
10148 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10150         * class.c (build_vtable_entry_ref): Const-ify.
10151         * decl.c (predefined_identifier,
10152         initialize_predefined_identifiers): Likewise.
10153         * init.c (build_new_1): Likewise.
10154         * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
10155         Likewise.
10157 2001-10-05  Alexandre Oliva  <aoliva@redhat.com>
10159         * optimize.c (struct inline_data): Moved to ../tree-inline.c.
10160         (INSNS_PER_STMT): Likewise.
10161         (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
10162         (copy_body, initialize_inlined_parameters): Likewise.
10163         (declare_return_variable, inlinable_function_p): Likewise.
10164         (expand_call_inline, expand_calls_inline): Likewise.
10165         (optimize_inline_calls, clone_body): Likewise.
10166         * tree.c (walk_tree): Moved to ../tree-inline.c.
10167         (walk_tree_without_duplicates): Likewise.
10168         (copy_tree_r, remap_save_expr): Likewise.
10170 2001-10-04  Alexandre Oliva  <aoliva@redhat.com>
10172         * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
10173         (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
10174         * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
10175         (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
10176         (flag_inline_trees): Moved declaration to ../tree-inline.h.
10177         (walk_tree): Moved declaration to ../tree-inline.h.
10178         (walk_tree_without_duplicates, copy_tree_r): Likewise.
10179         (remap_save_expr): Likewise.
10180         * decl.c: Include tree-inline.h.
10181         (lang_mark_tree): Don't mark inlined_fns.
10182         * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
10183         * optimize.c: Include tree-inline.h.
10184         (optimize_inline_calls): Move declaration to ../tree.h, as
10185         non-static.
10186         (remap_decl): Use language-independent constructs and hooks.
10187         (remap_block, copy_body_r, declare_return_variable): Likewise.
10188         (inlinable_function_p): Likewise.  Don't test for
10189         DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
10190         no longer language-specific.
10191         (optimize_inline_calls): Likewise.  Make it non-static.  Moved
10192         call of dump_function to...
10193         (optimize_function): Here...
10194         (clone_body): New function, extracted from...
10195         (maybe_clone_body): ... here.  Build decl_map locally and pass
10196         it on to clone_body.
10197         * pt.c, semantics.c: Include tree-inline.h.
10198         * tree.c: Likewise.
10199         (cp_walk_subtrees): New language-specific hook for tree inlining.
10200         (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
10201         cp_is_overload_p, cp_auto_var_in_fn_p,
10202         cp_copy_res_decl_for_inlining): Likewise.
10203         (walk_tree): Move language-specific constructs into...
10204         (cp_walk_subtrees): this new function.
10205         (copy_tree_r): Use language-independent constructs and hooks.
10206         (init_tree): Initialize tree inlining hooks.
10207         (remap_save_expr): Adjust prototype so that the declaration
10208         does not require the definition of splay_tree.
10210 2001-10-03  John David Anglin  <dave@hiauly1.hia.nrc.ca>
10212         * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
10213         to build the declaration instead of the declaration itself.
10215 2001-10-02  Jason Merrill  <jason_merrill@redhat.com>
10217         * decl2.c (cxx_decode_option): Add 'else'.
10219         * spew.c (end_input): No longer static.
10220         * cp-tree.h: Declare it.
10221         * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
10223 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
10225         * call.c (build_over_call), typeck.c (build_function_call_real):
10226         Pass type attributes to check_function_format rather than name or
10227         assembler name.  Don't require there to be a name or assembler
10228         name to check formats.
10230 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
10232         * decl.c (init_decl_processing): Don't call
10233         init_function_format_info.  Initialize lang_attribute_table
10234         earlier.
10235         (builtin_function): Call decl_attributes.
10236         (insert_default_attributes): New.
10238 2001-10-01  Jason Merrill  <jason_merrill@redhat.com>
10240         * decl.c (grokdeclarator): Copy array typedef handling from C
10241         frontend.
10243         * decl.c (grokdeclarator): Copy too-large array handling from C
10244         frontend.
10246 2001-09-29  Alexandre Oliva  <aoliva@redhat.com>
10248         * config-lang.in (target_libs): Added target-gperf, so that we
10249         don't try to build it if C++ is disabled.
10251 2001-09-23  Zack Weinberg  <zack@codesourcery.com>
10253         * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
10254         (cp/errfn.o): Delete rule.
10255         (cp/error.o): Depend on flags.h.
10256         * errfn.c: Delete file.
10257         * cp-tree.h: Declare warn_deprecated.  Remove definitions of
10258         TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
10259         and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
10260         cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
10261         internal_error respectively.  Make cp_deprecated into a macro.
10262         Don't define cp_printer typedef or declare cp_printers.
10263         * error.c: Include flags.h.
10264         Delete: struct tree_formatting_info, print_function_argument_list,
10265         print_declaration, print_expression, print_function_declaration,
10266         print_function_parameter, print_type_id, print_cv_qualifier_seq,
10267         print_type_specifier_seq, print_simple_type_specifier,
10268         print_elaborated_type_specifier, print_rest_of_abstract_declarator,
10269         print_parameter_declaration_clause, print_exception_specification,
10270         print_nested_name_specifier, and definition of cp_printers.
10271         (locate_error): New function.
10272         (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
10273         rewritten in terms of locate_error and diagnostic.c.
10274         (cp_tree_printer): Rename cp_printer; wire up to *_to_string
10275         instead of deleted print_* routines.  Handle %C, %L, %O, %Q also.
10276         (init_error): Adjust to match.
10278 2001-09-22  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10280         * Make-lang.in (CXX_C_OBJS): Add attribs.o.
10282 2001-09-21  Richard Henderson  <rth@redhat.com>
10284         * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
10285         (build_vtbl_initializer): Likewise.
10286         (build_vfn_ref): New.
10287         * cp-tree.h: Declare it.
10288         * call.c (build_over_call): Use it.
10289         * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
10290         * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
10292 2001-09-21  J"orn Rennecke <amylaar@redhat.com>
10294         * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
10296 2001-09-21  Joseph S. Myers  <jsm28@cam.ac.uk>
10298         Table-driven attributes.
10299         * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
10300         * decl2.c (cplus_decl_attributes): Only take one attributes
10301         parameter.
10302         * cp-tree.c (cplus_decl_attributes): Update prototype.
10303         * class.c (finish_struct), decl.c (start_decl, start_function),
10304         decl2.c (grokfield), friend.c (do_friend), parse.y
10305         (parse_bitfield): Update calls to cplus_decl_attributes.
10306         * decl.c (grokdeclarator): Take a pointer to a single ordinary
10307         attribute list.
10308         * decl.h (grokdeclarator): Update prototype.
10309         * decl2.c (grokfield): Take a single ordinary attribute list.
10310         * friend.c (do_friend): Likewise.
10311         * decl.c (shadow_tag, groktypename, start_decl,
10312         start_handler_parms, grokdeclarator, grokparms, start_function,
10313         start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
10314         parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
10315         (process_template_parm, do_decl_instantiation): Pass single
10316         ordinary attribute lists around.
10317         * decl.c (grokdeclarator): Correct handling of nested attributes.
10318         Revert the patch
10319         1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
10320                 * decl.c (grokdeclarator): Embedded attrs bind to the right,
10321                 not the left.
10322         .
10323         * cp-tree.h (cp_valid_lang_attribute): Remove declaration
10324         (cp_attribute_table): Declare.
10325         * decl.c (valid_lang_attribute): Don't define.
10326         (lang_attribute_table): Define.
10327         (init_decl_processing): Initialize lang_attribute_table instead of
10328         valid_lang_attribute.
10329         * tree.c (cp_valid_lang_attribute): Remove.
10330         (handle_java_interface_attribute, handle_com_interface_attribute,
10331         handle_init_priority_attribute): New functions.
10332         (cp_attribute_table): New array.
10333         * decl2.c (import_export_class): Don't use
10334         targetm.valid_type_attribute.
10336 2001-09-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
10338         * Make-lang.in (cp/error.o): Depend on real.h
10339         * error.c: #include "real.h"
10341 2001-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10343         * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
10344         xmalloc/strcpy/strcat.
10346 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10348         * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
10349         Const-ification.
10350         * pt.c (tsubst_decl): Likewise.
10352 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10354         * decl2.c (lang_f_options): Const-ification.
10355         * lex.c (cplus_tree_code_name): Likewise.
10356         * spew.c (yyerror): Likewise.
10358 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
10360         PR c++/3986
10361         * class.c (force_canonical_binfo_r): Check & move an indirect
10362         primary base first.
10363         (force_canonical_binfo): Check that it's not already
10364         canonical.
10365         (mark_primary_virtual_base): Remove BINFO parameter.
10366         (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
10368 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
10370         Remove TYPE_NONCOPIED_PARTS.
10371         * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
10372         CLASSTYPE_PURE_VIRTUALS.
10373         (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
10374         * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
10375         (layout_class_type): Don't call fixup_inline_methods here ...
10376         (finish_struct_1): ... call it here.
10378 2001-09-04  Mark Mitchell  <mark@codesourcery.com>
10380         * decl.c (duplicate_decls): Remove code deadling with
10381         DECL_SAVED_INSNS.
10382         * decl2.c (finish_file): Likewise.
10383         * pt.c (instantiate_decl): Likewise.
10384         * semantics.c (expand_body): Don't defer local functions if
10385         they wouldn't be deferred for some other reason.  Don't
10386         generate RTL for functions that will not be emitted.
10387         (genrtl_start_function): Remove code deadling with
10388         DECL_SAVED_INSNS.
10389         (genrtl_finish_function): Likewise.
10391 2001-09-04  Nathan Sidwell  <nathan@codesourcery.com>
10393         PR c++/4203
10394         * call.c (build_over_call): Do not optimize any empty base
10395         construction.
10397 2001-08-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10399         * error.c (dump_template_decl): Output template parameters
10400         together with their specifiers.
10401         Output `class' prefix for template template parameter.
10402         (dump_decl): Fix formatting.
10404 2001-08-30  Kurt Garloff  <garloff@suse.de>
10406         * optimize.c (inlinable_function_p): Allow only smaller single
10407         functions. Halve inline limit after reaching recursive limit.
10409 2001-08-30  Joern Rennecke <amylaar@redhat.com>
10410             Jason Merrill  <jason_merrill@redhat.com>
10412         * class.c (build_vtable_entry_ref): Subtract in char*, not
10413         ptrdiff_t.
10415 2001-08-23  Jason Merrill  <jason_merrill@redhat.com>
10417         * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
10418         (build_cplus_array_type): Use cp_build_qualified_type, not
10419         TYPE_MAIN_VARIANT, to get an unqualified version.
10421         * decl2.c (grok_alignof): Lose.
10422         (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
10423         * typeck.c (c_alignof): Lose.
10424         * semantics.c (finish_sizeof, finish_alignof): New.
10425         * parse.y: Use them.
10426         * cp-tree.h: Declare them.
10428 2001-08-22  Jason Merrill  <jason_merrill@redhat.com>
10430         * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
10431         Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
10432         * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
10434 2001-08-19  Jakub Jelinek  <jakub@redhat.com>
10436         * typeck2.c (add_exception_specifier): Only require complete type if
10437         not in processing template declaration.
10439 2001-08-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10441         * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
10442         GNU_xref_start_scope and GNU_xref_end_scope.
10444         * tree.c (TYPE_HASH): Moved to ../tree.h.
10446 2001-08-16  Mark Mitchell  <mark@codesourcery.com>
10448         * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
10449         on COMPOUND_EXPRs.
10451 2001-08-14  Richard Henderson  <rth@redhat.com>
10453         * class.c, cp-tree.h (build_vfn_ref): Remove.
10454         * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
10456 2001-08-13  Mark Mitchell  <mark@codesourcery.com>
10458         * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
10459         empty class assignment as having side-effects to avoid
10460         spurious warnings.
10462 2001-08-13  Zack Weinberg  <zackw@panix.com>
10464         * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
10465         * except.c: Include libfuncs.h.
10467 2001-08-11  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
10469         * decl.c (grokdeclarator): Clarify diagnostic message.
10471 2001-08-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10473         * decl2.c (do_nonmember_using_decl): Replace using directive
10474         with using declaration in the error message.
10476 2001-08-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10478         * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
10479         criterion to avoid rebuilding expression tree instead of
10480         processing_template_decl.
10482 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
10484         Support named return value optimization for inlines, too.
10485         * decl.c (finish_function): Nullify returns here.
10486         * semantics.c (genrtl_start_function): Not here.
10487         (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
10488         (nullify_returns_r): No longer static.  Just clear RETURN_EXPR.
10489         Also nullify the CLEANUP_STMT for the nrv.
10490         * cp-tree.h: Declare it.
10491         * optimize.c (declare_return_variable): Replace the nrv with the
10492         return variable.
10493         * typeck.c (check_return_expr): Be more flexible on alignment check.
10494         Ignore cv-quals when checking for a matching type.
10496 2001-08-09  Richard Henderson  <rth@redhat.com>
10498         * decl2.c (finish_objects): Use target hooks instead of
10499         assemble_constructor and assemble_destructor.
10501 2001-08-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
10503         * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
10505 2001-08-07  Nathan Sidwell  <nathan@codesourcery.com>
10507         PR c++/3820
10508         Stop using TYPE_NONCOPIED_PARTS.
10509         * call.c (build_over_call): Be careful when copy constructing
10510         or assigning to an empty class.
10511         * class.c (check_bases_and_members): It has a
10512         COMPLEX_ASSIGN_REF if it has a vptr.
10513         (layout_class_type): Don't add empty class padding to
10514         TYPE_NONCOPIED_PARTS.
10515         (finish_struct_1): Don't add the VFIELD either.
10516         * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
10517         initialization.
10519 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
10521         * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
10523 2001-08-06  Richard Henderson  <rth@redhat.com>
10525         * decl2.c (finish_objects): Pass a symbol_ref and priority to
10526         assemble_{constructor,destructor}.  Remove priority handling.
10528 2001-08-05  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
10530         Don't allow template-id in using-declaration.
10531         * decl2.c (validate_nonmember_using_decl): Handle template-ids.
10532         (do_class_using_decl): Likewise.
10534 2001-08-04  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
10536         * cp/spew.c (read_token): No need to pop buffers.
10538 2001-08-02  Stan Shebs  <shebs@apple.com>
10540         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
10541         (fnaddr_from_vtable_entry): Remove decl.
10542         * method.c (use_thunk): Update comment.
10544 2001-08-01  Andrew Cagney  <ac131313@redhat.com>
10546         * repo.c (get_base_filename): Change return value to const char
10547         pointer.
10549 2001-08-02  Nathan Sidwell  <nathan@codesourcery.com>
10551         Kill -fhonor-std.
10552         * NEWS: Document.
10553         * cp-tree.h (flag_honor_std): Remove.
10554         (CPTI_FAKE_STD): Remove.
10555         (std_node): Remove comment about it being NULL.
10556         (fake_std_node): Remove.
10557         * decl.c (in_fake_std): Remove.
10558         (walk_namespaces_r): Remove fake_std_node check.
10559         (push_namespace): Remove in_fake_std code.
10560         (pop_namespace): Likewise.
10561         (lookup_name_real): Remove fake_std_node check.
10562         (init_decl_processing): Always create std_node. Always add
10563         std:: things there.
10564         (builtin_function): Always put non '_' fns in std.
10565         * decl2.c (flag_honor_std): Remove.
10566         (lang_f_options): Remove honor-std.
10567         (unsupported_options): Add honor-std.
10568         (set_decl_namespace): Remove fake_std_node check.
10569         (validate_nonmember_using_decl): Likewise.
10570         (do_using_directive): Likewise.
10571         (handle_class_head): Likewise.
10572         * dump.c (cp_dump_tree): Likewise.
10573         * except.c (init_exception_processing): Adjust.
10574         * init.c (build_member_call): Remove fake_std_node check.
10575         (build_offset_ref): Likewise.
10576         * lang-options.h: Remove -fhonor-std, -fno-honor-std.
10577         * rtti.c (init_rtti_processing): Adjust.
10579 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
10581         * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
10582         operand while calling cp_tree_equal.
10584 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
10586         The 3.0 ABI no longer has vbase pointer fields.
10587         * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
10588         FORMAT_VBASE_NAME): Remove.
10589         * method.c (do_build_copy_constructor): Adjust.
10590         (do_build_assign_ref): Adjust.
10591         * search.c (lookup_field_r): Adjust.
10592         * typeck.c (build_component_ref): Adjust.
10594         The 3.0 ABI always has a vtable pointer at the start of every
10595         polymorphic class.
10596         * rtti.c (build_headof_sub): Remove.
10597         (build_headof): Adjust.
10598         (get_tinfo_decl_dynamic): No need to check flag_rtti
10599         here. Adjust.
10600         (create_real_tinfo_var): Explain why we need a hidden name.
10602 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
10604         PR c++/3631
10605         * class.c (update_vtable_entry_for_fn): The fixed adjustment
10606         of a virtual thunk should be from declaring base.
10608 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
10610         * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
10611         the shared virtual base, so preserving inheritance graph order.
10613 2001-07-30  Andreas Jaeger  <aj@suse.de>
10615         * decl2.c: Remove unused var global_temp_name_counter.
10617 2001-07-28  Richard Henderson  <rth@redhat.com>
10619         * method.c (pending_inlines): Remove.
10621 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
10623         * class.c (mark_primary_virtual_base): Don't adjust base
10624         offsets here.
10625         (dfs_unshared_virtual_bases): Adjust them here.
10626         (mark_primary_bases): Explain why we adjust at the end.
10628 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
10630         * class.c (finish_struct_1): When copying the primary base's
10631         VFIELD, make sure we find it is at offset zero.
10633 2001-07-26  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10635         * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
10636         tsubst_expr for default template arguments.
10638 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
10640         PR c++/3621
10641         * spew.c (yylex): Only copy the token's lineno, if it is
10642         nonzero.
10644 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
10646         PR c++/3624
10647         * call.c (resolve_args): Simplify, call
10648         convert_from_reference.
10649         (build_new_op): Resolve and convert from reference ARG1
10650         earlier. Adjust ARG2 & ARG3 resolve and conversion.
10652 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
10654         * decl.c (last_function_parm_tags): Remove.
10655         (current_function_parm_tags): Remove.
10656         (init_decl_processing): Adjust.
10657         (start_function): Adjust.
10658         (store_parm_decls): Adjust.
10660         PR c++/3152
10661         * decl.c (grokdeclarator): Detect when a function typedef is
10662         declaring a function, and create last_function_parms correctly.
10664 2001-07-25  Jason Merrill  <jason_merrill@redhat.com>
10666         * call.c (joust): Only prefer a non-builtin candidate to a builtin
10667         one if they have the same signature.
10669         * cvt.c (build_up_reference): Take DECL parm.  Check TREE_STATIC on
10670         it rather than toplevel_bindings_p.  Give it a mangled name if static.
10671         (convert_to_reference): Adjust.
10672         * decl2.c (get_temp_name): Lose.
10673         * mangle.c (mangle_ref_init_variable): New fn.
10674         (mangle_guard_variable): Strip the ref-init header.
10675         * cp-tree.h: Adjust.
10676         * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
10677         initializer.
10678         (grok_reference_init): Always use DECL_INITIAL.
10680 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
10682         PR c++/3416
10683         * call.c (build_conditional_expr): Recheck args after
10684         conversions.
10685         * cp-tree.h (build_conditional_expr): Move to correct file.
10686         * typeck.c (decay_conversion): Diagnose any unknown types
10687         reaching here.
10688         (build_binary_op): Don't do initial decay or default
10689         conversions on overloaded functions.
10690         (build_static_cast): Don't do a decay conversion here.
10692 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
10694         PR c++/3543
10695         * typeck.c (condition_conversion): Resolve an OFFSET_REF.
10696         * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
10698 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
10700         * class.c (build_vtbl_or_vbase_field): Remove, move into ...
10701         (create_vtbl_ptr): ... here.
10703 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
10705         * class.c (build_vbase_offset_vbtl_entries): Look for
10706         non-primary base of which we are a sub vtable.
10708 2001-07-24  Phil Edwards  <pme@sources.redhat.com>
10710         * semantics.c (finish_this_expr):  Remove unused code.
10712 2001-07-24  Nathan Sidwell  <nathan@codesourcery.com>
10714         Simplify rtti, now we've only one ABI.
10715         * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
10716         CPTI_TINFO_VAR_ID.
10717         (tinfo_decl_id, tinfo_var_id): Remove.
10718         (get_typeid_1): Remove.
10719         * rtti.c
10720         (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
10721         (typeid_ok_p): New function.
10722         (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
10723         (get_tinfo_decl): Remove old abi documentation.
10724         (tinfo_from_decl): Remove.
10725         (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
10726         (get_typeid_1): Remove.
10727         (get_base_offset): Remove.
10728         (synthesize_tinfo_var): Absorb get_base_offset.
10729         (create_real_tinfo_var): Don't use tinfo_decl_id.
10731 2001-07-23  Graham Stott  <grahams@redhat.com>
10733         * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
10734         variable has_two_argument_delete_p.
10736 2001-07-21  Nathan Sidwell  <nathan@codesourcery.com>
10738         Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
10739         * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
10740         (CPTI_INDEX_IDENTIFIER): Remove.
10741         (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
10742         (delta2_identifier): Remove.
10743         (index_identifier): Remove.
10744         (pfn_or_delta2_identifier): Remove.
10745         (flag_vtable_thunks): Remove.
10746         (VTABLE_DELTA2_NAME): Remove.
10747         (VTABLE_INDEX_NAME): Remove.
10748         (FNADDR_FROM_VTABLE_ENTRY): Adjust.
10749         (vfunc_ptr_type_node): Adjust.
10750         (VTABLE_NAME_PREFIX): Adjust.
10751         (build_vfn_ref): Lose first parameter.
10752         (fixup_all_virtual_upcast_offsets): Remove.
10753         * decl.c (initialize_predefined_identifiers): Remove
10754         delta2_identifier, index_identifier, pfn_or_delta2_identifier.
10755         (init_decl_processing): Remove no-vtable-thunk code.
10756         * decl2.c (flag_vtable_thunks): Remove.
10757         (mark_vtable_entries): Remove no-vtable-thunk code.
10758         * error.c (dump_decl): Remove no-vtable-thunk code.
10759         (dump_expr): Adjust ptr to member function code.
10760         * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
10761         code.
10762         * rtti.c (build_headof): Remove no-vtable-thunk code.
10763         (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
10764         * search.c (get_base_distance): Remove expand_upcast_fixups case.
10765         (virtual_context) Remove.
10766         (expand_upcast_fixups): Remove.
10767         (fixup_virtual_upcast_offsets): Remove.
10768         (fixup_all_virtual_upcast_offsets): Remove.
10769         * typeck.c (get_member_function_from_ptrfunc): Remove
10770         no-vtable-thunk code.
10771         * call.c (build_over_call): Adjust call to build_vfn_ref.
10772         * class.c (build_vfn_ref): Lose first parameter. Remove
10773         no-vtable-thunk code.
10774         (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
10775         (build_vtable_entry): Remove no-vtable-thunk code.
10777 2001-07-20  Nathan Sidwell  <nathan@codesourcery.com>
10779         Remove old-abi remnants. Remove comments about old abi
10780         behavior. Remove references to 'new-abi' in comments.
10781         * cp-tree.h: Adjust comments.
10782         (vbase_offsets_in_vtable_p): Delete.
10783         (vcall_offsets_in_vtable_p): Delete.
10784         (vptrs_present_everywhere_p): Delete.
10785         (all_overridden_vfuns_in_vtables_p): Delete.
10786         (merge_primary_and_secondary_vtables_p): Delete.
10787         (TYPE_CONTAINS_VPTR_P): Adjust.
10788         (VTT_NAME_PREFIX): Remove.
10789         (CTOR_VTBL_NAME_PREFIX): Remove.
10790         (init_vbase_pointers): Remove.
10791         * class.c: Adjust coments.
10792         (build_vbase_pointer_fields): Delete.
10793         (build_vbase_pointer): Remove old-abi code.
10794         (build_secondary_vtable): Likewise.
10795         (modify_all_vtables): Likewise.
10796         (create_vtable_ptr): Likewise.
10797         (layout_class_type): Likewise.
10798         (finish_struct_1): Likewise.
10799         (finish_vtbls): Likewise.
10800         (dfs_finish_vtbls): Delete.
10801         (build_vbase_offset_vtbl_entries): Remove old-abi code.
10802         * cvt.c: Adjust comments.
10803         * decl.c: Adjust comments.
10804         * decl2.c: Adjust comments.
10805         * init.c: Adjust comments.
10806         (construct_virtual_bases): Remove old-abi code.
10807         * lang-specs.h: Remove -fno-new-abi.
10808         * mangle.c: Adjust comments.
10809         * rtti.c: Adjust comments.
10810         (get_base_offset): Remove old-abi-code.
10811         * search.c: Adjust comments.
10812         (dfs_init_vbase_pointers): Remove.
10813         (dfs_vtable_path_unmark): Remove.
10814         (init_vbase_pointers): Remove.
10815         * semantics.c: Adjust comments.
10816         (emit_associated_thunks): Remove old-abi code.
10817         * typeck.c: Adjust comments.
10819 2001-07-20  Daniel Berlin  <dan@cgsoftware.com>
10821         * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
10822         params.h.
10824 2001-07-19  Mark Mitchell  <mark@codesourcery.com>
10826         * class.c (finish_struct_anon): Forbid nested classes.
10828 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
10830         * decl2.c: Don't include dwarfout.h and dwarf2out.h.
10831         * optimize.c: Include debug.h.
10832         (maybe_clone_body): Use debug hook.
10833         * semantics.c: Include debug.h.
10834         (expand_body): Use debug hook.
10836 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
10838         * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
10840 2001-07-18  Mark Mitchell  <mark@codesourcery.com>
10842         * class.c (type_requires_array_cookie): New function.
10843         (check_methods): Don't try to figure out whether the type needs a
10844         cookie here.
10845         (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
10846         * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
10847         (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
10848         * pt.c (instantiate_class_template): Don't set
10849         TYPE_VEC_DELETE_TAKES_SIZE.
10850         * NEWS: Document ABI changes from GCC 3.0.
10852 2001-07-18  Xavier Delacour <xavier@fmaudio.net>,
10853             Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
10855         * NEWS (Changes in GCC 3.0): Fix typo.
10857 2001-07-13  Joseph S. Myers  <jsm28@cam.ac.uk>
10859         * decl2.c (cplus_decl_attributes): Take a pointer to the node to
10860         which attributes are to be attached, and a flags argument.  Update
10861         call to decl_attributes.
10862         (grokfield): Update call to decl_attributes.
10863         * class.c (finish_struct): Update call to cplus_decl_attributes.
10864         * cp-tree.h (cplus_decl_attributes): Update prototype.
10865         * decl.c (start_decl, grokdeclarator, start_function): Update
10866         calls to decl_attributes and cplus_decl_attributes.
10867         * friend.c (do_friend): Update call to cplus_decl_attributes.
10868         * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
10870 2001-07-12  Mark Mitchell  <mark@codesourcery.com>
10872         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
10873         for `register' variables with an asm-specification.
10875 2001-07-11  Mark Mitchell  <mark@codesourcery.com>
10877         * semantics.c (finish_asm_stmt): Mark the output operands
10878         to an asm addressable, if necessary.
10880 2001-07-11  Ben Elliston  <bje@redhat.com>
10882         * Revert this change -- there is a subtle bug.
10884         PR c++/80
10885         * decl.c (finish_enum): New "attributes" argument; pass it to
10886         cplus_decl_attributes.  Use a narrower type if the enum is packed.
10887         * cp-tree.h (finish_enum): Adjust prototype.
10888         * parse.y (enum_head): New non-terminal.
10889         (structsp): Use it. Enums now may be preceded or followed by
10890         optional attributes -- pass their chained tree to finish_enum().
10891         * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
10893 2001-07-10  Mark Mitchell  <mark@codesourcery.com>
10895         * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
10896         variables.
10898 2001-07-10  Jason Merrill  <jason_merrill@redhat.com>
10900         * semantics.c (cp_expand_stmt): Fix for null
10901         current_function_return_value.
10903 2001-07-10  Jan van Male  <jan.vanmale@fenk.wau.nl>
10905         * call.c (build_op_delete_call): Initialize fn.
10906         (convert_like_real): Delete conditional.
10907         (joust): Initialize *w and *l.
10908         * class.c: Add prototype for binfo_ctor_vtable.
10909         (get_primary_binfo): Initialize result.
10910         * init.c (build_java_class_ref): Initialize name.
10912 2001-07-09  Erik Rozendaal  <dlr@acm.org>
10914         * typeck.c (unary_complex_lvalue): Do not duplicate the
10915         argument to modify, pre-, or post-increment when used as an
10916         lvalue and when the argument has side-effects.
10918 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
10920         * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
10921         (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES.  Call
10922         cplus_decl_attributes even if attrs is NULL.
10923         * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
10925 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
10927         * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
10928         calls to decl_attributes.
10930 2001-07-06  Ira Ruben   <ira@apple.com>
10932         * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
10933         be DECL_TEMPLATE_RESULT.
10935 2001-07-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10937         * cp-tree.h (copy_template_template_parm): Rename to ...
10938         (bind_template_template_parm): ... here.
10939         * tree.c (copy_template_template_parm): Rename to ...
10940         (bind_template_template_parm): ... here.  Remove the case when
10941         NEWARGS is NULL_TREE.
10942         (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
10943         BOUND_TEMPLATE_TEMPLATE_PARM.
10944         * pt.c (lookup_template_class): Adjust.
10946 2001-07-05  Jason Merrill  <jason_merrill@redhat.com>
10948         * cvt.c (convert_lvalue): New fn.
10949         * cp-tree.h: Declare it.
10950         * method.c (do_build_assign_ref): Use it.
10951         (do_build_copy_constructor): Convert parm to base types
10952         before calling base constructors.
10954         * typeck.c (check_return_expr): Check DECL_ALIGN instead of
10955         DECL_USER_ALIGN.  Check flag_elide_constructors instead of
10956         optimize.
10957         * semantics.c (cp_expand_stmt): Don't destroy the named return value.
10959 2001-07-02  Nathan Sidwell  <nathan@codesourcery.com>
10961         * optimize.c (optimize_inline_calls): New function, broken out
10962         of ...
10963         (optimize_function): ... here. Call it. Don't inline if it is
10964         a thunk.
10965         (dump_function): Print name of dump flag causing this dump.
10966         * semantics.c (expand_body): Move thunk inline check to
10967         optimize_function.
10969 2001-06-29  Joseph S. Myers  <jsm28@cam.ac.uk>
10971         * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
10972         (comptypes): Use target.comp_type_attributes.
10974 2001-06-29  Nathan Sidwell  <nathan@codesourcery.com>
10976         * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
10978 2001-06-28  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
10980         * error.c (lang_print_error_function): Add a `diagnostic_context *'
10981         parameter. Tweak.
10983 2001-06-27  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
10985         * decl2.c (import_export_class): Update.
10987 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
10989         * error.c (init_error): Adjust settings.
10991 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
10993         * error.c (init_error): Adjust settings.
10995 2001-06-19  Richard Sandiford  <rsandifo@redhat.com>
10997         * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
10998         return pointers to data members by reference rather than by value.
11000 2001-06-18  Jason Merrill  <jason_merrill@redhat.com>
11002         Implement the Named Return Value optimization.
11003         * cp-tree.h (struct cp_language_function): Add x_return_value.
11004         (current_function_return_value): Now a macro.
11005         * decl.c: Don't define it.
11006         (define_label, finish_case_label): Don't clear it.
11007         (init_decl_processing): Don't register it with GC.
11008         * semantics.c (genrtl_finish_function): Don't check it for
11009         no_return_label.  Copy the RTL from the return value to
11010         current_function_return_value and walk, calling...
11011         (nullify_returns_r): ...this new fn.
11012         * typeck.c (check_return_expr): Set current_function_return_value.
11014 2001-06-15  Jason Merrill  <jason_merrill@redhat.com>
11016         * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
11017         sharing a ctor vtable with.  Merge code for cases 1 and 2.
11018         (binfo_ctor_vtable): New fn.
11019         (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
11021 2001-06-14  Jason Merrill  <jason_merrill@redhat.com>
11023         * class.c (dfs_find_final_overrider): Fix logic.
11025         * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
11026         virtual thunk instead of non-virtual.
11027         (get_matching_virtual): Uncomment.
11029         * pt.c (unify): Don't recurse between the POINTER_TYPE and the
11030         OFFSET_TYPE.  If we're adding cv-quals, the extra ones would be on
11031         PARM, not ARG.
11033 2001-06-14  Nathan Sidwell  <nathan@codesourcery.com>
11035         * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
11036         we've not emerged from the hierarchy of RTTI_BINFO on reaching
11037         a non-virtual base.
11039 2001-06-13  Mark Mitchell  <mark@codesourcery.com>
11041         * NEWS: Update release number.
11043 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
11045         PR c++/3130, c++/3131, c++/3132
11046         * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
11047         * class.c (force_canonical_binfo_r): Move
11048         BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
11049         virtual bases unless they're primary and what they're primary
11050         too has been moved.
11051         (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
11052         with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
11053         BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
11054         derived binfo.
11055         (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
11056         (layout_nonempty_base_or_field): Add most derived type
11057         parameter. Adjust.
11058         (layout_empty_base): Likewise.
11059         (build_base_field): Likewise.
11060         (build_base_fields): Likewise.
11061         (propagate_binfo_offsets): Add most derived type
11062         parameter. Skip non canonical virtual bases too.
11063         (dfs_set_offset_for_unshared_vbases): Don't skip primary
11064         bases. Do skip canonical bases.
11065         (layout_virtual_bases): Adjust.
11066         (layout_class_type): Adjust.
11067         (dfs_get_primary_binfo): Build list of virtual primary base
11068         candidates.
11069         (get_primary_binfo): Check that the shared virtual primary
11070         base candidate was found first.
11071         (accumulate_vtbl_inits): Don't do anything for non-vptr
11072         containing binfos. For case 1 primary virtual bases, keep
11073         checking that we've not emerged from the hierarchy of RTTI_BINFO.
11075 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
11077         PR c++/3089
11078         * class.c (dfs_accumulate_vtbl_inits): Always walk down the
11079         hierarchy looking for primary bases for a ctor
11080         vtable. Recursively call oneself, if we meet our primary via
11081         this route and haven't met it yet via inheritance graph order.
11083 2001-06-11  Mark Mitchell  <mark@codesourcery.com>
11085         * lang-options.h: Emit documentation for -fno-honor-std, not
11086         -fhonor-std.
11088 2001-06-10  Alexandre Oliva  <aoliva@redhat.com>
11090         * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
11091         Don't clobber delta.
11092         (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
11094 2001-06-10  Mark Mitchell <mark@codesourcery.com>
11095             Gabriel Dos Reis  <gdr@codesourcery.com>
11097         * Make-lang.in (cp/call.o): Depend on diagnostic.h
11098         (cp/typeck.o): Depend on diagnostic.h
11099         (cp/typeck2.o): Depend on diagnostic.h
11100         (cp/repo.o): Depend on dignostic.h
11101         * typeck.c: #include diagnostic.h
11102         (convert_for_initialization): Remove extern declaration for
11103         warningcount and errorcount.
11105         * call.c: #include diagnostic.h
11106         (convert_like_real): Remove extern declaration for warnincount and
11107         errorcount.
11109         * repo.c: #include diagnostic.h
11110         * typeck2.c: #include diagnostic.h
11112 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
11114         * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
11115         in previous change.
11117 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
11119         PR c++/2929
11120         * friend.c (do_friend): Use push_decl_namespace for classes at
11121         namespace scope.
11123 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
11124             Jason Merrill <jason_merrill@redhat.com>
11126         PR c++/3061
11127         * class.c (build_secondary_vtable): Use assert, rather than an error
11128         message.
11129         (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
11130         (dfs_accumulate_vtbl_inits): A lost primary virtual base may
11131         be between ORIG_BINFO and RTTI_BINFO, but neither of them.
11132         Don't set BINFO_VTABLE for a primary virtual base.
11134 2001-06-07  Mark Mitchell  <mark@codesourcery.com>
11136         * decl.c (duplicate_decls): Update source position information
11137         when a template function is defined.
11139 2001-06-07  Phil Edwards  <pme@sources.redhat.com>
11141         * lang-specs.h:  Move -D_GNU_SOURCE to config/linux.h.
11143 2001-06-07  Nathan Sidwell  <nathan@codesourcery.com>
11145         PR c++/2914
11146         * decl.c (pushtag): Don't push into a complete type's scope.
11148 2001-06-06  Jason Merrill  <jason_merrill@redhat.com>
11150         * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
11151         (struct lang_decl_flags): Lose generate_with_vtable_p.
11152         (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
11153         * class.c (copy_virtuals): Adjust.
11154         * decl2.c (mark_vtable_entries): Adjust.
11155         * method.c (make_thunk, build_vtable_entry): Adjust.
11156         * class.c (update_vtable_entry_for_fn): Only look as far as the
11157         first defining class.
11158         (build_vtbl_initializer): Put nothing in the slot for a function only
11159         defined in a lost primary virtual base.
11160         (add_vcall_offset_vtbl_entries_1): Use the same code for
11161         the lost primary case and the normal case.
11162         (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
11163         (get_vfield_offset, get_derived_offset): Lose.
11164         (dfs_find_final_overrider): Use look_for_overrides_here.
11165         (get_matching_virtual): New fn.
11166         * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
11167         not BV_VCALL_INDEX.
11168         * search.c (look_for_overrides_here): Split out from...
11169         (look_for_overrides_r): Here.
11171         * class.c (find_final_overrider): Return error_mark_node on error.
11173         * decl2.c (key_method): #if 0 accidental change.
11175 2001-06-06  John David Anglin  <dave@hiauly1.hia.nrc.ca>
11177         * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
11178         (build_over_call): Likewise.
11179         * decl.c (grokparms): Likewise.
11180         * pt.c (tsubst_decl): Likewise.
11181         * typeck.c (convert_arguments): Likewise.
11183 2001-06-05  Mark Mitchell  <mark@codesourcery.com>
11185         * semantics.c (begin_class_definition): Robustify.
11187         * pt.c (instantiate_decl): Tell the repository code about the
11188         clones, not the cloned functions.
11189         * repo.c (repo_template_used): Explicitly instantiate the cloned
11190         function, not the clones.
11192 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
11194         * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
11195         ICS_BAD_FLAG on created conversion.
11196         (compare_ics): Break out rank.
11198 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
11200         * decl.c (xref_tag): Remove extraneous %s on dependent name
11201         lookup warning.
11203 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
11205         * class.c (layout_vtable_decl): Fix off by one error on
11206         build_index_type.
11207         (build_vtt): Likewise.
11208         (build_ctor_vtbl_group): Likewise.
11210 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
11212         * class.c (maybe_indent_hierarchy): New function.
11213         (dump_class_hierarchy_r): Add flags. Dump extra binfo
11214         information, if enabled. Use maybe_indent_hierarchy. Adjust
11215         output format.
11216         (dump_class_hierarchy): Adjust prototype. Adjust output format.
11217         (dump_array, dump_vtable, dump_vtt): New functions.
11218         (finish_struct_1): Adjust hierarchy dumping.
11219         (initialize_vtable): Call dump_vtable.
11220         (build_vtt): Call dump_vtt.
11221         (build_ctor_vtbl_group): Call dump_vtable.
11222         * decl2.c (flag_dump_class_layout): Remove.
11223         (cxx_decode_option): Remove dump translation unit
11224         and dump class hierarchy check. Call dump_switch_p.
11225         (finish_file): Adjust dumping.
11226         (dump.c): Only dump base classes if not TDF_SLIM.
11227         Only dump namespace members if not TDF_SLIM.
11228         * optimize.c (dump_function): New function.
11229         (optimize_function): Call dump_function.
11230         * semantics.c (expand_body): Use dump_enabled_p.
11232 2001-06-01  Nathan Sidwell  <nathan@codesourcery.com>
11234         PR g++/2936
11235         Part missed from first commit
11236         * decl2.c (finish_anon_union): Copy context.
11238 2001-05-30  Nathan Sidwell  <nathan@codesourcery.com>
11240         PR g++/2936
11241         * optimize.c (remap_decl): Remap anonymous aggregate members too.
11243 2001-05-26  Nathan Sidwell  <nathan@codesourcery.com>
11245         PR g++/2823
11246         * semantics.c (expand_body): Don't optimize thunks.
11248 2001-05-25  Sam TH  <sam@uchicago.edu>
11250         * cp-tree.h lex.h: Fix header include guards.
11252 2001-05-25  Mark Mitchell <mark@codesourcery.com>
11254         * decl.c (init_decl_processing): Tweak.
11256 2001-05-24  Mark Mitchell  <mark@codesourcery.com>
11258         * decl.c (duplicate_decls): Tidy.
11259         (init_decl_processing): Always set flag_no_builtin.
11261 2001-05-24  Nathan Sidwell  <nathan@codesourcery.com>
11263         PR c++/2184
11264         * decl2.c (do_local_using_decl): Push the decls, even in a
11265         template.
11267 2001-05-22  Mark Mitchell  <mark@codesourcery.com>
11269         * optimize.c (initialize_inlined_parameters): Don't set
11270         TREE_READONLY for a VAR_DECL taking the place of an inlined
11271         PARM_DECL.
11273 2001-05-22  Jason Merrill  <jason_merrill@redhat.com>
11275         * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
11276         * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
11277         attribute.
11279 2001-05-22  Joseph S. Myers  <jsm28@cam.ac.uk>
11281         * parse.y: Refer to compound literals as such, not as
11282         constructor-expressions.
11284 2001-05-21  Mark Mitchell  <mark@codesourcery.com>
11286         * call.c (build_op_delete_call): Ignore exception-specifications
11287         when looking for matching delete operators.
11288         * init.c (build_new_1): Compute whether or not the allocation
11289         function used is a placement allocation function or not, and
11290         communicate this information to build_op_delete_call.
11292 2001-05-21  Jason Merrill  <jason_merrill@redhat.com>
11294         * class.c (build_vtable_entry_ref): Lose vtbl parm.  Fix for new abi.
11295         (build_vtbl_ref): Adjust.
11296         (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
11297         * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
11298         Re-add vtable-gc.
11299         (unsupported_options): Correspondingly.
11301         * decl2.c (maybe_make_one_only): Check flag_weak, not
11302         supports_one_only().
11304         * cp-tree.def (START_CATCH_STMT): Lose.
11305         * dump.c (cp_dump_tree): Don't dump it.  Do dump HANDLER_PARMS.
11306         * tree.c (cp_statement_code_p): Don't case it.
11307         * semantics.c (cp_expand_stmt): Likewise.
11308         * cp-tree.h (START_CATCH_TYPE): Lose.
11309         (HANDLER_TYPE): New.
11310         * except.c (expand_start_catch_block): Don't start any blocks.
11311         Return the type.
11312         (expand_end_catch_block): Don't end any blocks.
11313         * parse.y (handler): Don't pass anything from finish_handler_parms
11314         to finish_handler.
11315         * pt.c (tsubst_expr): Likewise.
11316         * semantics.c (begin_handler): Call note_level_for_catch here.
11317         (finish_handler_parms): Don't return anything.
11318         (genrtl_catch_block, begin_catch_block): Lose.
11319         (genrtl_handler): Call expand_start_catch here.
11321 2001-05-18  Jason Merrill  <jason_merrill@redhat.com>
11323         * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
11324         (get_vtable_decl, build_vtt): Not here.
11326 2001-05-20  Nathan Sidwell  <nathan@codesourcery.com>
11328         PR c++/2781
11329         * optimize.c (update_cloned_parm): Copy addressability and other
11330         flags.
11332 2001-05-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11334         * pt.c (determine_specialization): Ignore artificial functions.
11336 2001-05-20  Neil Booth  <neil@daikokuya.demon.co.uk>
11338         * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
11339         (C_RID_CODE): Remove.
11340         * lex.c (cxx_init_options): Call set_identifier_size.  Update.
11341         (init_parse): Don't do it here.
11343 2001-05-18  Diego Novillo  <dnovillo@redhat.com>
11345         * decl2.c (finish_objects): Use the original SYMBOL_REF from the
11346         function declaration to avoid stripping the symbol's attributes.
11348 2001-05-18  Nathan Sidwell  <nathan@codesourcery.com>
11350         * decl.c (pushdecl): Adjust error string.
11351         (xref_tag): Adjust friend class injection warning. Remove the
11352         inherited name from the class shadowed scope.
11354 2001-05-17  Mark Mitchell  <mark@codesourcery.com>
11356         * except.c (cp_protect_cleanup_actions): New function.
11357         (init_exception_processing): Don't set protect_cleanup_actions
11358         here.  Do set lang_protect_cleanup_actions.
11360 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
11362         * spew.c (read_token): Call yyerror on all unexpected tokens.
11364 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
11366         * init.c (member_init_ok_or_else): Take a tree rather than
11367         string for name.
11368         (expand_member_init): Adjust.
11370 2001-05-14  Nick Clifton  <nickc@cambridge.redhat.com>
11372         * decl.c (duplicate_decls): Suppress warning about duplicate
11373         decls if the first decl is a friend.
11375 2001-05-12  Zack Weinberg  <zackw@stanford.edu>
11377         * except.c (choose_personality_routine): Export.  Add
11378         explanatory comment.  Take an enum languages, not a boolean.
11379         (initialize_handler_parm): Adjust to match.
11380         * cp-tree.h: Prototype choose_personality_routine.
11381         * lex.c (handle_pragma_java_exceptions): New function.
11382         (init_cp_pragma): Register #pragma GCC java_exceptions.
11384 2001-05-12  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
11386         * method.c (build_mangled_C99_name): Remove unused prototype.
11388 2001-05-12  Alexandre Oliva  <aoliva@redhat.com>
11390         * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
11391         * typeck.c (get_member_function_from_ptrfunc,
11392         build_ptrmemfunc, expand_ptrmemfunc_cst): Take
11393         TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
11395         Reverted Geoff Keating's 2001-05-03's patch.
11397 2001-05-11  Ira Ruben   <ira@apple.com>
11399         * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
11401 2001-05-11  Neil Booth  <neil@daikokuya.demon.co.uk>
11403         * cp-tree.h (finish_label_expr, lookup_label): Delete.
11404         * parse.y: Update for '&&'; don't issue warning here.
11405         * semantics.c (finish_label_expr): Delete.
11407 2001-05-07  Mark Mitchell  <mark@codesourcery.com>
11409         * splay-tree.h (splay_tree_max): New function.
11410         (splay_tree_min): Likewise.
11412 2001-05-03  Geoffrey Keating  <geoffk@redhat.com>
11414         * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
11415         (pfn_vflag_identifier): Define.
11416         Update comment about layout of pointer functions.
11417         (build_ptrmemfunc1): Update prototype.
11418         (expand_ptrmemfunc_cst): Update prototype.
11419         * decl.c (initialize_predefined_identifiers): Initialize
11420         pfn_vflag_identifier.
11421         (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
11422         an extra field to the type.
11423         * expr.c (cplus_expand_constant): Pass 'flag' between
11424         expand_ptrmemfunc_cst and build_ptrmemfunc1.
11425         * typeck.c (get_member_function_from_ptrfunc): When
11426         FUNCTION_BOUNDARY < 16, look at additional field to determine
11427         if a pointer-to-member is a real pointer or a vtable offset.
11428         (build_ptrmemfunc1): Add new parameter to contain extra field.
11429         (build_ptrmemfunc): Pass the extra field around.
11430         (expand_ptrmemfunc_cst): Add new parameter to return extra field.
11431         (pfn_from_ptrmemfunc): Ignore the extra field.
11433 2001-05-03  Mark Mitchell  <mark@codesourcery.com>
11435         * cp-tree.h (flag_inline_trees): Update documentation.
11436         * decl.c (init_decl_processing): Adjust handling of
11437         flag_inline_functions and flag_inline_trees to support -O3.
11438         (grokfndecl): Set DECL_INLINE on all functions if that's what
11439         the user requested.
11440         (save_function_data): Clear DECL_INLINE in
11441         current_function_cannot_inline is non-NULL.
11442         * decl2.c (flag_inline_trees): Update documentation.
11444 2001-05-03  Nathan Sidwell  <nathan@codesourcery.com>
11446         * dump.c (cp_dump_tree, USING_STMT case): New case.
11447         * tree.c (cp_statement_code_p): Add USING_STMT.
11448         * decl2.c (do_using_directive): Add the using directive statement.
11450         * tree.c (walk_tree): Reformat an if block.
11452 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
11454         * decl.c (compute_array_index_type): Don't try to do anything with
11455         the indices when processing a template.
11457 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11459         * call.c: NULL_PTR -> NULL.
11460         * class.c: Likewise.
11461         * cvt.c: Likewise.
11462         * decl.c: Likewise.
11463         * decl2.c: Likewise.
11464         * except.c: Likewise.
11465         * init.c: Likewise.
11466         * rtti.c: Likewise.
11467         * search.c: Likewise.
11468         * tree.c: Likewise.
11469         * typeck.c: Likewise.
11470         * typeck2.c: Likewise.
11472 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
11474         * decl2.c (do_using_directive): Revert previous patch.
11476 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
11478         * cp-tree.def (USING_STMT): New statement node.
11479         * cp-tree.h (USING_STMT_NAMESPACE): New macro.
11480         * decl2.c (do_using_directive): Add USING_STMT to statement
11481         tree. Don't emit errors when processing template decl.
11482         * pt.c (tsubst_expr, USING_STMT case): New case.
11483         * semantics.c (cp_expand_stmt, USING_STMT case): New case.
11485 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
11487         * call.c (build_new_op): Convert args from reference here.
11488         (build_conditional_expr): Don't convert here.
11490 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
11492         * spew.c (last_token_id): New static variable.
11493         (read_token): Set it here.
11494         (yyerror): Use it here.
11496 2001-04-30  Richard Henderson  <rth@redhat.com>
11498         * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
11499         * decl.c: Likewise.
11501 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
11503         * gxxint.texi: Remove.
11504         * Make-lang.in: Remove all traces of gxxint.texi.
11506 2001-04-30  Mark P Mitchell  <mark@codesourcery.com>
11508         * decl2.c (start_static_initialization_or_destruction): Correct
11509         logic to handle the -fno-use-cxa-atexit case.
11511 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
11513         * optimize.c (update_cloned_parm): New function.
11514         (maybe_clone_body): Use it.  Update the `this' parameter too.
11516 2001-04-29  Joseph S. Myers  <jsm28@cam.ac.uk>
11518         * decl2.c (unsupported_options): Add new-abi.
11519         * lang-options.h: Remove no longer supported options.
11521 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
11523         * except.c (can_convert_eh): Don't check template parms,
11524         typename types etc.
11526 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
11528         * optimize.c (maybe_clone_body): Copy parameter names and locations.
11530 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
11532         * cp-tree.h (adjust_clone_args): Prototype new function.
11533         * class.c (adjust_clone_args): New function.
11534         * decl.c (start_function): Call it for in charge ctors.
11536 2001-04-26  Mark Mitchell  <mark@codesourcery.com>
11538         * method.c (use_thunk): Make sure that thunks really are emitted
11539         when requested.
11541 2001-04-26  Nathan Sidwell <nathan@codesourcery.com>
11543         * mangle.c (write_chars): New macro.
11544         (hwint_to_ascii): New function
11545         (write_number): Use it.
11546         (write_integer_cst): Deal with really big numbers.
11548 2001-04-25  Mark Mitchell  <mark@codesourcery.com>
11550         * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
11551         the clone.
11553 2001-04-25  Nathan Sidwell  <nathan@codesourcery.com>
11555         * decl.c (grokdeclarator): Set context of namespace scope
11556         TYPE_DECLS.
11558 2001-04-24  Zack Weinberg  <zackw@stanford.edu>
11560         * cp/optimize.c: Include hashtab.h.
11561         (struct inline_data): Add tree_pruner.
11562         (expand_call_inline, expand_calls_inline): Use it when calling
11563         walk_tree.
11564         (optimize_function): Initialize and free tree_pruner.
11566 2001-04-24  Nathan Sidwell <nathan@codesourcery.com>
11568         Lazy __FUNCTION__ generation.
11569         * cp-tree.def (FUNCTION_NAME): Remove.
11570         * cp-tree.h (function_name_declared_p): Remove.
11571         (cp_fname_init): Prototype.
11572         * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
11573         don't call declare_function_name. Call start_fname_decls.
11574         (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
11575         clobber the line number.
11576         (cp_fname_init): New function.
11577         (start_function): Call start_fname_decls.
11578         (finish_function): Call finish_fname_decls.
11579         * lex.c (reswords): Add slots for __FUNCTION__ et al.
11580         (rid_to_yy): Add mappings for __FUNCTION__ et al.
11581         * optimize.c (maybe_clone_body): Remove function_name_declared_p.
11582         * parse.y (VAR_FUNC_NAME): New token.
11583         (primary): Add VAR_FUNC_NAME.
11584         * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
11585         generation.
11586         (tsubst, FUNCTION_NAME case): Remove.
11587         (tsubst_copy, FUNCTION_NAME case): Remove.
11588         (tsubst_expr, DECL_STMT case): Be careful with a
11589         DECL_PRETTY_FUNCTION_P.
11590         (instantiate_decl): Remove function_name_declared_p.
11591         * semantics.c (begin_compound_statement): Don't call
11592         declare_function_name here.
11593         (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
11594         (finish_translation_unit): Call finish_fname_decls.
11595         (expand_body): Remove function_name_declared_p.
11596         * typeck2.c (digest_init): Allow any ERROR_MARK.
11598 2001-04-24  Nathan Sidwell  <nathan@codesourcery.com>
11600         * pt.c (tsubst_decl): Use VOID_TYPE_P.
11601         * semantics.c: Fix some typos.
11603 2001-04-23  Phil Edwards  <pme@sources.redhat.com>
11605         * cp/decl2.c (flag_honor_std):  Always initialize to 1.
11607 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11609         * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
11611 2001-04-23  Jason Merrill  <jason_merrill@redhat.com>
11613         * except.c (build_throw): Wrap the initialization of the exception
11614         object in a MUST_NOT_THROW_EXPR.
11615         (do_free_exception): #if 0.
11617 2001-04-20  Mark Mitchell  <mark@codesourcery.com>
11619         * cp-tree.h (finish_enum): Change prototype.
11620         * decl.c (finish_enum): Reorganize.
11621         * parse.y (structsp): Adjust calls to finish_enum.
11623 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
11625         * tree.c (cp_tree_equal): Adjust final switch formatting. Add
11626         't' case.
11628 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
11630         * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
11631         (layout_empty_base): Return at end flag.
11632         (build_base_field): Likewise.
11633         (build_base_fields): Likewise.
11634         (layout_virtual_bases): Don't add 1 to eoc value.
11635         (end_of_class): Use full size for empty bases.
11636         (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
11637         empty bases. Don't add 1 to eoc value. Only add trailing padding
11638         if we're an empty class with no empty bases.
11639         (dump_class_hierarchy): Dump size and alignment.
11641 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
11643         * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
11644         ICS_BAD_FLAG.
11646 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
11648         * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
11649         is found, look first if name does not match the structure name.
11651 2001-04-19  Mark Mitchell  <mark@codesourcery.com>
11653         * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
11654         set.
11655         (SET_DECL_LANGUAGE): New macro.
11656         * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
11657         (pushdecl): Likewise.
11658         (build_library_fn_1): Likewise.
11659         (build_cp_library_fn): Likewise.
11660         (grokfndecl): Likewise.
11661         (grokvardecl): Mark `extern "C"' variables as having C linkage.
11662         * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
11663         * lex.c (retrofit_lang_decl): Likewise.
11664         * mangle.c (mangle_decl_string): Don't mangle the names of
11665         variables declared with C language linkage.
11666         * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
11668 2001-04-18  John David Anglin  <dave@hiauly1.hia.nrc.ca>
11670         * semantics.c (simplify_aggr_init_exprs_r): Don't restore
11671         flag_access_control from uninitialized storage.
11673 2001-04-15  Mark Mitchell  <mark@codesourcery.com>
11675         * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
11676         * mangle.c (write_pointer_to_member_type): Fix mangling of
11677         pointers to cv-qualified member function types.
11679         * init.c (build_delete): Create a SAVE_EXPR for the address if
11680         we're going to use it more than once.
11682 2001-04-13  Mark Mitchell  <mark@codesourcery.com>
11684         * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
11685         (expand_ptremfunc_cst): Change prototype.
11686         (delta2_from_ptrmemfunc): Remove.
11687         * expr.c (cplus_expand_constant): Adjust call to
11688         expand_ptrmemfunc_cst.
11689         * typeck.c (build_ptrmemfunc1): Simplify.
11690         (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
11691         results in a constant.
11692         (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
11693         (delta2_from_ptrmemfunc): Remove.
11694         (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
11696 2001-04-12  Jason Merrill  <jason_merrill@redhat.com>
11698         * cp-tree.h (decl_namespace_list): New macro.
11699         (struct saved_scope): Add decl_ns_list.
11700         * decl.c (mark_saved_scope): Mark it.
11701         * decl2.c: Lose static decl_namespace_list.
11702         (init_decl2): Don't save it.
11704 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11706         * cp-tree.h (warn_return_type, yylex): Delete redundant
11707         declarations.
11709         * decl.c (current_class_depth, global_namespace): Likewise.
11711         * decl2.c (current_class_depth, flag_gnu_xref): Likewise
11713         * repo.c (flag_use_repository): Likewise.
11715 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11717         * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
11718         set_block, pushdecl, getdecls, gettags, init_decl_processing,
11719         maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
11720         lvalue_or_else, print_lang_statistics, comp_target_types,
11721         unsigned_type, signed_type, signed_or_unsigned_type,
11722         build_function_call, mark_addressable, incomplete_type_error):
11723         Delete redundant declarations.
11725 2001-04-11  Jason Merrill  <jason_merrill@redhat.com>
11727         * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
11728         (TYPE_ANONYMOUS_P): New macro.
11729         (TAGGED_TYPE_P): New macro.
11730         * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
11731         (grokfndecl, grokvardecl, grokdeclarator): Likewise.
11732         * tree.c (no_linkage_helper): Likewise.
11733         * semantics.c (begin_class_definition): Likewise.
11734         * pt.c (convert_template_argument): Likewise.
11735         * lex.c (check_for_missing_semicolon): Likewise.
11737 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
11739         * class.c (dfs_unshared_virtual_bases): New function.
11740         (mark_primary_bases): Call it.
11741         (check_bases): Ignore virtual bases when determining
11742         nearly-emptiness.
11744 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
11746         * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
11748 2001-04-11  Mark Mitchell  <mark@codesourcery.com>
11750         * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
11751         cloned function to the clone.
11753 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11755         * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
11757         * semantics.c: Include expr.h.
11759 2001-04-11  Nathan Sidwell  <nathan@codesourcery.com>
11761         * method.c (implicitly_declare_fn): Commonize code for copy ctor
11762         and assignment op. Set TREE_USED for parameter.
11764 2001-04-10  Mark Mitchell  <mark@codesourcery.com>
11766         * class.c (find_final_overrider_data): Add `candidates'.
11767         (dfs_find_final_overrider): Don't issue error messages
11768         prematurely.
11769         (find_final_overrider): Issue error messages here.
11770         (build_base_field): Don't warn about amgibuous direct bases here.
11771         (warn_about_ambiguous_direct_bases): New function.
11772         (layout_class_type): Use it.
11774 2001-04-10  Richard Henderson  <rth@redhat.com>
11776         * typeck.c (build_array_ref): Push the array reference inside
11777         COMPOUND_EXPR and COND_EXPR.
11779 2001-04-05  Mark Mitchell  <mark@codesourcery.com>
11781         * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
11782         * decl.c (duplicate_decls): Adjust accordingly.
11783         (maybe_commonize_var): Likewise.
11784         (grokfndecl): Likewise.
11785         (start_function): Likewise.
11786         (start_method): Likewise.
11787         * decl2.c (key_method): Likewise.
11788         (import_export_decl): Likewise.
11789         * method.c (implicitly_declare_fn): Likewise.
11790         * optimize.c (maybe_clone_body): Likewise.
11792 2001-04-05  Benjamin Kosnik  <bkoz@redhat.com>
11794         * lang-specs.h: Add __DEPRECATED.
11796 2001-04-05  J"orn Rennecke <amylaar@redhat.com>
11798         * search.c (get_dynamic_cast_base_type): When building a new
11799         constant, set its type to ssizetype.
11801 2001-04-04  Jakub Jelinek  <jakub@redhat.com>
11803         * optimize.c (expand_call_inline): Only add newly inlined statements
11804         into inlined_stmts.
11806 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
11808         * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
11809         (OPERATOR_FORMAT): Likewise.
11810         (OPERATOR_TYPENAME_FORMAT): Likewise.
11811         * operators.def: Remove old name-mangling information.
11812         * decl.c (grok_op_properties): Adjust accordingly.
11813         * lex.c (init_operators): Likewise.
11814         * rtti.c (get_tinfo_decl): Issue error messages about types that
11815         have variable size.
11817 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
11819         * decl2.c (import_export_decl): Don't call import_export_class
11820         when processing an inline member function.
11821         * semantics.c (expand_body): Call import_export_decl before
11822         emitting inline functions.
11824 2001-03-28  Richard Henderson  <rth@redhat.com>
11826         IA-64 ABI Exception Handling:
11827         * cp-tree.def (EH_SPEC_BLOCK): New.
11828         (MUST_NOT_THROW_EXPR): New.
11829         * cp-tree.h: Update changed function declarations.
11830         (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
11831         (CPTI_CALL_UNEXPECTED): New.
11832         (struct cp_language_function): Rename x_eh_spec_try_block
11833         to x_eh_spec_block.
11834         (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
11835         * decl.c (current_binding_level): If no current function
11836         bindings, revert to scope_chain.
11837         (initialize_predefined_identifiers): Remove __cp_push_exception.
11838         (store_parm_decls): Use begin_eh_spec_block.
11839         (finish_function): Use finish_eh_spec_block.
11840         (mark_lang_function): Update for name changes.
11841         * decl2.c (finish_file): No mark_all_runtime_matches.
11842         * dump.c (cp_dump_tree): Handle new tree codes.
11843         * error.c (dump_expr) [BIND_EXPR]: Fix typo.
11844         * except.c (catch_language_init, catch_language): Remove.
11845         (init_exception_processing): Don't set language code.
11846         Initialize call_unexpected_node, protect_cleanup_actions,
11847         eh_personality_libfunc, lang_eh_runtime_type.
11848         (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
11849         (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
11850         (prepare_eh_type): Split out type canonicalizations ...
11851         (build_eh_type_type): ... from here.
11852         (build_eh_type_type_ref): Remove.
11853         (mark_all_runtime_matches): Remove.
11854         (build_exc_ptr): New.
11855         (do_begin_catch, do_end_catch): New.
11856         (do_pop_exception): Remove.
11857         (build_terminate_handler): Remove.
11858         (choose_personality_routine): Split out language choice from ...
11859         (initialize_handler_parm): ... here.
11860         Use MUST_NOT_THROW_EXPR.
11861         (expand_start_catch_block): Use do_begin_catch.  Simplify Java
11862         exception object handling.
11863         (expand_start_eh_spec, expand_end_eh_spec): Remove.
11864         (expand_exception_blocks, alloc_eh_object): Remove.
11865         (begin_eh_spec_block, finish_eh_spec_block): New.
11866         (do_allocate_exception, do_free_exception): New.
11867         (expand_throw): Merge into ...
11868         (build_throw): ... here.  Update for abi.
11869         * expr.c (cplus_expand_expr): No expand_internal_throw.
11870         Handle MUST_NOT_THROW_EXPR.
11871         * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
11872         * semantics.c (*) Update for except.h name changes.
11873         (genrtl_try_block): No protect_with_terminate.
11874         (genrtl_eh_spec_block): New.
11875         (genrtl_handler): Don't emit the goto here.
11876         (cp_expand_stmt): Handle EH_SPEC_BLOCK.
11877         (genrtl_finish_function): Don't expand_exception_blocks.
11878         * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
11880 2001-03-28  Richard Henderson  <rth@redhat.com>
11882         * decl.c (struct named_label_list): Rename eh_region to
11883         in_try_scope, add in_catch_scope.
11884         (struct binding_level): Rename eh_region to is_try_scope,
11885         add is_catch_scope.
11886         (note_level_for_try): Rename from note_level_for_eh.
11887         (note_level_for_catch): New.
11888         (poplevel): Copy both is_try_scope and is_catch_scope to
11889         the named_label_list struct.
11890         (check_previous_goto_1): Don't check for catch block via
11891         DECL_ARTIFICIAL; use in_try_scope instead.
11892         (check_goto): Likewise.
11893         * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
11894         * except.c (expand_start_catch_block): Call note_level_for_catch.
11895         * semantics.c (begin_compound_stmt): Update for note_level_for_try.
11897 2001-03-27  Richard Henderson  <rth@redhat.com>
11899         * except.c: Use USING_SJLJ_EXCEPTIONS instead of
11900         exceptions_via_longjmp.
11902 2001-03-27  Phil Edwards  <pme@sources.redhat.com>
11904         * pt.c (check_default_tmpl_args):  Make error messages clearer.
11906 2001-03-26  Phil Edwards  <pme@sources.redhat.com>
11908         * error.c:  Also undefine 'A' macro used for cp_printers definition.
11910 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11912         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
11914 2001-03-26  Mike Yang <yang@research.att.com>
11915             Mark Mitchell  <mark@codesourcery.com>
11917         * dump.c (dump_access): New function.
11918         (cp_dump_tree): Use it.  Dump basetype information for class
11919         types.
11921 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
11923         * Makefile.in (optimize.o): Depend on params.h.
11924         (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
11925         (init_decl_processing): Set flag_no_inline when doing
11926         inlining-on-trees.
11927         * optimize.c: Include params.h.
11928         (struct inline_data): Improve documentation of FNS.  Add
11929         FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
11930         (INSNS_PER_STMT): New macro.
11931         (remap_block): Use CLONING_P.
11932         (inlinable_function_p): Don't inline big functions.
11933         (expand_call_inline): Keep track of how much inlining we've done.
11934         (optimize_function): Set FIRST_INLINED_FN.
11935         (maybe_clone_body): Set CLONING_P.
11936         * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
11937         tree nodes.
11938         (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
11939         rest_of_compilation.  Clear DECL_RTL for local variables
11940         afterwards.
11941         (clear_decl_rtl): New function.
11943 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>
11945         Implement DR 209
11946         * cp-tree.h (skip_type_access_control,
11947         reset_type_access_control): Prototype.
11948         * decl.c (grokdeclarator): Access of friends is not checked.
11949         * parse.y (component_decl_list): Reset type access control.
11950         * semantics.c (decl_type_access_control): Clear
11951         current_type_lookups.
11952         (save_type_access_control): Don't save if not deferring.
11953         (skip_type_access_control, reset_type_access_control): New
11954         functions.
11955         (begin_class_definition): Do type access control for basetypes.
11956         Start deferred access control.
11957         (finish_class_definition): Resume immediate access control if
11958         this is a local class.
11960 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11962         * class.c (add_method): Use memcpy/memmove, not bcopy.
11964         * decl.c (duplicate_decls): Likewise.
11966 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
11968         * mangle.c (write_discriminator): Use `_0' for discriminator 1,
11969         not `_'.
11971 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
11973         * decl.c (local_names): Define.
11974         (push_local_name): New.
11975         (grok_reference_init): Return init if initializing static reference
11976         variable with non-constant instead of emitting it.
11977         Move expand_static_init call to cp_finish_decl.
11978         (layout_var_decl): Call push_local_name.
11979         (maybe_commonize_var): Allow inlining functions even if they have
11980         static local variables, use comdat_linkage for them if flag_weak.
11981         (check_initializer): Call obscure_complex_init if
11982         grok_reference_init returned nonzero.
11983         (save_function_data): Clear x_local_names.
11984         (pop_cp_function_context): Free x_local_names.
11985         (mark_inlined_fns): Remove.
11986         (mark_lang_function): Mark x_local_names.
11987         (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
11988         Mark inlined_fns as tree, remove call to mark_inlined_fns.
11989         * class.c (alter_access): Ensure DECL_ACCESS is never set if
11990         DECL_DISCRIMINATOR_P.
11991         * cp-tree.h (cp_language_function): Add x_local_names.
11992         (lang_decl_flags): Add discriminator into u2.
11993         (lang_decl_inlined_fns): Remove.
11994         (lang_decl): inlined_fns is now a TREE_VEC.
11995         (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
11996         * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
11997         TREE_VEC, not a custom structure.
11998         (optimize_function): Likewise.
11999         * mangle.c (discriminator_for_local_entity): Discriminate among
12000         VAR_DECL local entities.
12001         * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
12002         is not valid.
12004 2001-03-22  Bryce McKinlay  <bryce@albatross.co.nz>
12006         Add support for Java interface method calls.
12007         * cp-tree.h (struct lang_type): Add java_interface flag.
12008         (TYPE_JAVA_INTERFACE): New macro.
12009         * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
12010         by setting TYPE_JAVA_INTERFACE.
12011         * call.c (java_iface_lookup_fn): New static.
12012         (build_over_call): If calling a method declared in a
12013         TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
12014         expression which resolves the function address.
12015         (build_java_interface_fn_ref): New function.
12017 2001-03-22  Richard Henderson  <rth@redhat.com>
12019         * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
12020         * except.c: Don't include it.
12022 2001-03-22  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
12023             based on an idea from Joe Buck <jbuck@synopsys.com>
12025         * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
12026         New nonterminals.
12027         (data_def, component_decl): Add reductions to bad_decl.
12029 2001-03-22  Jakub Jelinek  <jakub@redhat.com>
12031         * method.c (do_build_assign_ref): Don't use build_modify_expr for
12032         anonymous aggregates, since they don't have assignment operator
12033         method.
12034         * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
12035         assignment operators for anonymous structure fields.
12037 2001-03-21  Jason Merrill  <jason@redhat.com>
12039         * pt.c (instantiate_decl): Abort if we see a member constant
12040         instantiation that doesn't already have its initializer.
12041         Downgrade explicit instantiation without definition to pedwarn.
12043         * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
12044         * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
12045         (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
12047         * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
12048         (pending_vtables): Remove.
12049         * decl2.c (pending_vtables): Remove.
12050         (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
12051         CLASSTYPE_VTABLE_NEEDS_WRITING.
12052         (import_export_class): Likewise.
12053         (init_decl2): Don't mark pending_vtables.
12054         * lex.c (handle_pragma_vtable): Just sorry.
12055         * pt.c (instantiate_class_template): Don't mess with
12056         CLASSTYPE_VTABLE_NEEDS_WRITING.
12057         (mark_class_instantiated): Likewise.
12058         * ptree.c (print_lang_type): Don't print it.
12059         * semantics.c (begin_class_definition): Don't set it.
12061         * pt.c (template_tail): Replace with last_pending_template.
12062         (maybe_templates, maybe_template_tail): Remove.
12063         (add_pending_template): Adjust.
12064         (instantiate_pending_templates): Adjust.
12066         * cp-tree.h (struct saved_scope): Remove lang_stack field.
12067         (current_lang_stack): Remove.
12068         * decl.c (maybe_push_to_top_level): Don't initialize it.
12069         (duplicate_decls): Use current_lang_depth.
12070         (xref_basetypes): Likewise.
12071         * class.c (current_lang_depth): New fn.
12072         (push_lang_context): Use more varray functionality.
12073         (pop_lang_context): Likewise.
12075         * error.c (GLOBAL_THING): Always use '__'.
12077 2001-03-21  Mark Mitchell  <mark@codesourcery.com>
12079         * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
12081         * mangle.c (mangle_decl_string): Mangle the names of overloaded
12082         operators, even when they have `extern "C"' linkage.
12084 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
12086         * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
12087         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
12088         where it's not necessary.
12089         (add_method): Remove optimization involving comparison of
12090         DECL_ASSEMBLER_NAME.
12091         (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
12092         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
12093         where it's not necessary.
12094         (check_methods): Likewise.
12095         (build_clone): Likewise.
12096         (built_vtt): Likewise.
12097         * cp-tree.h (DECL_NEEDED_P): Likewise.
12098         * decl.c (pushtag): Likewise.
12099         (duplicate_decls): Likewise.
12100         (pushdecl): Likewise.
12101         (builtin_function): Likewise.
12102         (build_library_fn_1): Set DECL_LANGUAGE for library functions.
12103         (build_cp_library_fn): Likewise.
12104         (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
12105         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
12106         where it's not necessary.
12107         (make_rtl_for_nonlocal_decl): Likewise.
12108         (cp_finish_decl): Likewise.
12109         (grokfndecl): Likewise.
12110         (grokvardecl): Likewise.
12111         (grokdeclarator): Likewise.
12112         (start_function): Likewise.
12113         (cp_missing_return_ok_p): Likewise.
12114         * decl2.c (grokclassfn): Likewise.
12115         (check_classfn): Likewise.
12116         (finish_static_data_member_decl): Likewise.
12117         (grokfield): Likewise.
12118         * error.c (GLOBAL_IORD_P): Remove.
12119         (dump_global_iord): Improve output.
12120         (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
12121         * except.c (nothrow_libfn_p): Summarily reject any function not in
12122         namespace-scope.
12123         * init.c (build_java_class_ref): Don't explicitly set
12124         DECL_ASSEMBLER_NAME after calling mangle_decl.
12125         * mangle.c (mangle_decl_string): Handle extern "C" functions.
12126         (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
12127         * method.c (set_mangled_name_for_decl): Don't explicitly set
12128         DECL_ASSEMBLER_NAME after calling mangle_decl.
12129         (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
12130         IDENTIFIER_GLOBAL_VALUE for the thunk.
12131         * pt.c (set_mangled_name_for_template_decl): Remove.
12132         (check_explicit_specialization): Don't use it.
12133         (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
12134         (tsubst_friend_function): Likewise.
12135         (tsubst_decl): Likewise.
12136         (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
12137         * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
12138         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
12139         where it's not necessary.
12140         (tinfo_base_init): Likewise.
12141         (create_real_tinfo_var): Likewise.
12142         * search.c (looup_field_1): Likewise.
12143         * semantics.c (finish_named_return_value): Likewise.
12144         * tree.c (init_tree): Set lang_set_decl_assembler_name.
12146 2001-03-15  Gabriel Dos Reis  <gdr@codesourcery.com>
12148         Correct semantics restrictions checking in throw-expression.
12149         * except.c (is_admissible_throw_operand): New function.
12150         (build_throw): Use it.
12152 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
12154         * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
12155         and its ilk.
12157 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
12159         * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
12160         * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
12161         * decl.c (duplicate_decls): Likewise.
12162         (builtin_function): Likewise.
12163         (build_library_fn): Likewise.
12164         (build_cp_library_fn): Likewise.
12165         (check_initializer): Likewise.
12166         (cp_finish_decl): Likewise.
12167         * decl2.c (grokfield): Likewise.
12168         (grok_function_init): Remove #if 0'd code.
12169         (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
12170         * friend.c (do_friend): Likewise.
12171         * init.c (get_temp_regvar): Likewise.
12172         * method.c (make_thunk): Likewise.
12173         * pt.c (tsubst_friend_function): Likewise.
12174         (tsubst_decl): Likewise.
12175         (regenerate_decl_from_template): Likewise.
12176         * semantics.c (genrtl_named_return_value): Likewise.
12177         (expand_body): Likewise.
12178         (genrtl_finish_function): Likewise.
12179         * tree.c (cp_tree_equal): Likewise.
12181 2001-03-12  Nathan Sidwell  <nathan@codesourcery.com>
12183         * call.c (convert_like_real): Add extra semantics to INNER
12184         parameter. Don't convert to temporary if a user conversion
12185         gives us an lvalue that we're about to bind to a reference.
12186         Set INNER to indicate pending reference binding on recursive
12187         calls.
12189 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
12191         * cp/lex.c: Delete duplicate pending_lang_change.
12193 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
12195         * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
12196         Similarly.
12197         * cp/repo.c (get_base_filename, open_repo_file): Similarly.
12198         * cp/cp-tree.h: Remove file_name_nondirectory prototype.
12200 2001-03-09  Zack Weinberg  <zackw@stanford.edu>
12202         * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
12204 2001-03-08  Stan Shebs  <shebs@apple.com>
12206         * cp-tree.h (set_identifier_local_value): Remove unused decl.
12208 2001-03-06  Zack Weinberg  <zackw@stanford.edu>
12210         * spew.c: Remove references to CPP_OSTRING.
12212 2001-03-06  Andrew Haley  <aph@redhat.com>
12214         * typeck.c (convert_arguments): Check that we have an fndecl.
12216 2001-03-05  Andrew Haley  <aph@redhat.com>
12218         * typeck.c (convert_arguments): Don't do ellipsis conversion for
12219         __built_in_constant_p.
12221 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
12223         * typeck.c (build_static_cast): Allow enum to enum conversions
12224         as per DR 128.
12226 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
12228         * class.c (check_field_decls): Pointers to member do not a
12229         non-pod struct make, as per DR 148.
12231 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
12233         * call.c (joust): cp_pedwarn when using gnu extension concerning
12234         worst conversion sequences.
12236 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
12238         * decl.c: Replace all uses of 'boolean' with 'bool'.
12240 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
12242         * lang-specs.h: Add zero initializer for cpp_spec field to
12243         all array elements that need one.  Don't put an #ifdef inside
12244         the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
12245         use it.
12247 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
12249         Implement using decls inside template functions.
12250         * decl2.c (validate_nonmember_using_decl): Don't special case
12251         fake_std_node in the global namespace. Don't reject early when
12252         processing a template.
12253         (do_local_using_decl): Add to statement tree. Don't do further
12254         processing when building a template.
12255         * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
12257 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
12259         * decl2.c (do_nonmember_using_decl): Don't complain if we find
12260         same function. Do complain about ambiguating extern "C"
12261         declarations.
12263 2001-02-28  Nathan Sidwell  <nathan@codesourcery.com>
12265         Remove floating point and complex type template constant parms.
12266         * pt.c (convert_nontype_argument): Remove REAL_TYPE and
12267         COMPLEX_TYPE extensions.
12268         (invalid_nontype_parm_type_p): Likewise.
12270 2001-02-27  Jeffrey Oldham  <oldham@codesourcery.com>
12272         * except.c (call_eh_info): Revert "match_function"'s type.
12274 2001-02-27  Nathan Sidwell  <nathan@codesourcery.com>
12276         Fix ctor vtable vcall offsets.
12277         * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
12278         (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
12279         (get_matching_base): Remove.
12280         (get_original_base): New function.
12281         (build_vtbl_initializer): Initialize vid.rtti_binfo.
12282         Use a virtual thunk for a ctor vtable with an index
12283         (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
12284         primary base within a constructor vtable. Only set
12285         BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
12286         when primary base has been lost.
12287         * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
12289 2001-02-26  Jeffrey Oldham  <oldham@codesourcery.com>
12291         * call.c (joust): Ensure more_specialized()'s argument length
12292         parameter has correct value for constructors.
12294 2001-02-26  Nathan Sidwell  <nathan@codesourcery.com>
12296         * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
12298         * decl.c (mark_inlined_fns): Prototype.
12300 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
12302         * spew.c (yylex): Correct handling of friends.
12304 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
12306         * mangle.c (write_encoding): Pass write_function_type the
12307         FUNCTION_DECL for the function being encoded.
12308         (write_function_type): Pass it along to write_bare_function_type.
12309         (write_bare_function_type): Pass it along to write_method_parms.
12310         (write_method_parms): Don't mangle the compiler-generated
12311         parameters to a constructor or destructor.
12313 2001-02-22  Andreas Jaeger  <aj@suse.de>
12315         * optimize.c: Include toplev.h for
12316         note_deferral_of_defined_inline_function prototype.
12318 2001-02-22  Jakub Jelinek  <jakub@redhat.com>
12320         * cp-tree.h (struct lang_decl_inlined_fns): New.
12321         (struct lang_decls): Add inlined_fns.
12322         (DECL_INLINED_FNS): New macro.
12323         * optimize.c (struct inline_data): Add inlined_fns.
12324         (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
12325         (inlinable_function_p): Likewise, fix typo in comment,
12326         function is not inlinable if it already inlined function currently
12327         being optimized.
12328         (expand_call_inline): Add fn to inlined_fns if necessary.
12329         (optimize_function): Initialize inlined_fns.
12330         Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
12331         * decl.c (mark_inlined_fns): New function.
12332         (lang_mark_tree): Call it.
12334 2001-02-21  Jason Merrill  <jason@redhat.com>
12336         * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
12337         (DECL_UNINLINABLE): Move to middle-end.
12339         * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
12340         * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
12341         * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
12342         * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
12343         parms and outer BLOCK.  note_deferral_of_defined_inline_function.
12345         * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
12346         second parm of op=.
12348 2001-02-19  Mark Mitchell  <mark@codesourcery.com>
12350         * decl2.c (set_decl_namespace): Allow explicit instantiations in
12351         any namespace.
12353 2001-02-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12355         * optimize.c (expand_call_inline): Don't walk subtrees of type
12356         nodes.
12358 2001-02-18  Mark Mitchell  <mark@codesourcery.com>
12360         * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
12361         for a destructor.
12363 2001-02-18  Jason Merrill  <jason@redhat.com>
12365         Do put the VTT parameter in DECL_ARGUMENTS.
12366         * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
12367         (current_vtt_parm): New macro.
12368         (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
12369         (DECL_HAS_VTT_PARM_P): New macro.
12370         (DECL_VTT_PARM): Remove.
12371         (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
12372         * decl.c (duplicate_decls): Only copy the operator code if
12373         appropriate.
12374         (start_function): Set current_vtt_parm.
12375         (lang_mark_tree): Don't mark vtt_parm.
12376         * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
12377         DECL_ARGUMENTS.  Set DECL_HAS_VTT_PARM_P.
12378         * class.c (build_clone): Maybe remove the VTT parm.
12379         * optimize.c (maybe_clone_body): Set up the VTT parm.
12380         * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
12381         * call.c (build_over_call): Just allow the VTT arg.
12382         * method.c (make_thunk): Don't set DECL_VTT_PARM.
12383         (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
12384         (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
12385         * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
12386         * error.c (dump_function_decl): Likewise.
12387         * call.c (build_user_type_conversion_1, convert_like_real): Abort
12388         if we try to call a constructor with in-charge or VTT parms.
12389         * method.c (skip_artificial_parms_for): New fn.
12390         * call.c (add_function_candidate, build_over_call): Call it.
12391         * call.c (build_new_method_call): Use current_vtt_parm.
12392         * init.c (expand_virtual_init): Likewise.
12393         * class.c (same_signature_p): No longer static.
12394         * cp-tree.h: Declare it.
12395         * search.c (look_for_overrides_r): Use it.
12397 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
12399         * cp-tree.h (new_abi_rtti_p): Remove.
12400         (name_mangling_version): Likewise.
12401         (flag_do_squangling): Likewise.
12402         * class.c (build_rtti_vtbl_entries): Remove old ABI support.
12403         * decl.c (grokfndecl): Likewise.
12404         * decl2.c (name_mangling_version): Remove.
12405         (flag_do_squangling): Likewise.
12406         (lang_f_options): Remove `squangle'.
12407         (unsupported_options): Add `squangle'.
12408         (cxx_decode_option): Issue a warning about uses of
12409         -fname-mangling-version.
12410         (finish_file): Remove old ABI support.
12411         * pt.c (check_explicit_specialization): Likewise.
12412         (tsubst_decl): Likewise.
12413         * rtti.c (init_rtti_processing): Likewise.
12414         (build_headof): Likewise.
12415         (get_tinfo_decl_dynamic): Likewise.
12416         (tinfo_from_decl): Likewise.
12417         (build_dynamic_cast_1): Likewise.
12418         (synthesize_tinfo_var): Likewise.
12419         * init.c (build_new): Allow enumeration types for the array-bounds
12420         in a direct-new-declarator.
12422         * semantics.c (finish_typeof): Resolve OFFSET_REFs.
12424         * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
12425         TREE_PROTECTED from the template being specialized.
12427 2001-02-17  Jason Merrill  <jason@redhat.com>
12429         * decl2.c (build_artificial_parm): Set TREE_READONLY.
12431         * decl.c (bad_specifiers): Allow throw specs on things with
12432         pointer-to-function or -member-function type.
12433         * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
12434         a pmf.
12436 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
12438         * call.c (check_dtor_name): Handle template names correctly.
12440 2001-02-16  Jason Merrill  <jason@redhat.com>
12442         * cp-tree.h (DECL_USE_VTT_PARM): Remove.
12443         * decl2.c (maybe_retrofit_in_chrg): Don't create it.
12444         * optimize.c (maybe_clone_body): Don't substitute it.
12445         * call.c (build_new_method_call): Check in_chrg instead.
12446         * init.c (expand_virtual_init): Likewise.
12448 2001-02-16  Gabriel Dos Reis  <gdr@codesourcery.com>
12450         * decl.c (check_tag_decl): Make sure a typedef for an anonymous
12451         class-type introduces at least a type-name.
12453 2001-02-16  Jakub Jelinek  <jakub@redhat.com>
12455         * call.c (convert_like_real): Create a temporary for non-lvalue.
12457 2001-02-16  Jeffrey Oldham  <oldham@codesourcery.com>
12459         * cp-tree.h: Fix typos in comments.
12461 2001-02-16  Jason Merrill  <jason@redhat.com>
12463         * optimize.c (remap_block): If we're compiling a clone, pass the
12464         new block to insert_block.
12466 2001-02-16  Mark Mitchell  <mark@codesourcery.com>
12468         * semantics.c (finish_asm_stmt): Robustify.
12470 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
12472         * pt.c (push_template_decl_real): Don't remangle the name of a
12473         class template.
12475 2001-02-15  Jim Meyering  <meyering@lucent.com>
12477         * Make-lang.in (c++.install-common): Depend on installdirs.
12478         (c++.install-info): Likewise.
12479         (c++.install-man): Likewise.
12481 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
12483         * typeck2.c (build_m_component_ref): Robustify.
12485 2001-02-15  Alexandre Oliva  <aoliva@redhat.com>
12487         * friend.c (do_friend): Don't take the nested [template] class
12488         into account when deciding whether to warn about the friend
12489         function not referring to a template function.
12491 2001-02-14  Jakub Jelinek  <jakub@redhat.com>
12493         * typeck.c (build_unary_op): Clarify error message.
12495 2001-02-08  Aldy Hernandez  <aldyh@redhat.com>
12497         * parse.y (component_constructor_declarator): allow optional
12498         parentheses around constructor class name.
12500 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
12502         * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
12503         section.
12504         * init.c (emit_base_init): Remove incorrect comment about
12505         virtual bases.
12506         * method.c (make_thunk): Fix comment alignment.
12508 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
12510         Kill remnants of this is variable.
12511         * cp-tree.h (flag_this_is_variable): Remove.
12512         * decl2.c (flag_this_is_variable): Remove.
12513         * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
12514         (build_vbase_path): The path is non-static, even in a cdtor.
12515         (resolves_to_fixed_type_p): Add additional return value.
12516         * search.c (init_vbase_pointers): Adjust.
12517         * tree.c (lvalue_p_1): Adjust.
12518         * typeck.c (mark_addressable): Adjust.
12520 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
12522         * pt.c (unify): Don't check cv quals of array types.
12524 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
12526         * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
12527         check whether we already have the type.
12529 2001-02-13  Mark Mitchell  <mark@codesourcery.com>
12531         * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
12532         * call.c (build_op_delete_call): Simplify to remove duplicate
12533         code.
12534         * class.c (clone_function_decl): Don't build the deleting variant
12535         of a non-virtual destructor.
12536         * decl.c (finish_destructor_body): Don't call delete if this is a
12537         non-virtual destructor.
12538         * init.c (build_delete): Explicitly call `operator delete' when
12539         deleting an object with a non-virtual destructor.
12541 2001-02-13  Jason Merrill  <jason@redhat.com>
12543         * lang-specs.h: Add more __EXCEPTIONS.
12545 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
12547         * typeck2.c (process_init_constructor): Check
12548         TREE_HAS_CONSTRUCTOR before issuing missing init warning.
12550 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
12552         * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
12553         Remove spurious information in comment. Allow further
12554         adjustments of REFERENCE_TYPE args.
12556 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
12558         * errfn.c (cp_deprecated): Tweak diagnostic text.
12559         * parse.y (new_initializer): Deprecate initializer lists
12560         extension.
12562 2001-02-12  Mark Mitchell  <mark@codesourcery.com>
12564         Remove old ABI support.
12566 2001-02-11  Mark Mitchell  <mark@codesourcery.com>
12568         * decl2.c (flag_vtable_thunks): Always set it to 1.
12569         (flag_new_abi): Likewise.
12570         * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
12572         * Makefile.in (g++spec.o): Fix typo.
12574 2001-02-09  Jason Merrill  <jason@redhat.com>
12576         * lang-specs.h: Restore definition of __EXCEPTIONS.
12578 2001-02-08  Jason Merrill  <jason@redhat.com>
12580         * search.c (shared_member_p): New function.
12581         (lookup_field_r): Use it.
12582         * cp-tree.h (SHARED_MEMBER_P): Remove.
12584         * method.c (process_overload_item): Handle template-dependent array
12585         bounds.
12586         * pt.c (type_unification_real): If we end up with undeduced nontype
12587         parms, try again.
12589         * decl.c (lookup_name_real): Tweak warning to refer to decls, not
12590         types.
12592         * typeck2.c (friendly_abort): Don't say anything if we have
12593         earlier errors or sorries.
12595         * decl.c (check_tag_decl): Notice attempts to redefine bool and
12596         wchar_t.  Ignore if in_system_header.
12598         * decl.c (maybe_push_cleanup_level): New fn...
12599         (start_decl_1): ...split out from here.
12600         * cvt.c (build_up_reference): Use it.
12601         * cp-tree.h: Declare it.
12603 2001-02-07  Mark Mitchell  <mark@codesourcery.com>
12605         * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
12606         spec.
12608 2001-02-06  Nathan Sidwell  <nathan@codesourcery.com>
12610         * pt.c (lookup_template_class): Make sure it's a primary
12611         template or template_template_parm when called from the parser.
12612         (instantiate_template_class): Add assertion.
12614 2001-02-05  Alexandre Oliva  <aoliva@redhat.com>
12616         * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
12617         from error_mark_node.
12619 2001-02-05  Nathan Sidwell  <nathan@codesourcery.com>
12621         Fix specification and implementation bugs in V3 ABI
12622         construction vtables.
12623         * cp-tree.h (flag_dump_class_layout): New flag.
12624         (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
12625         (BINFO_LOST_PRIMARY_P): New flag.
12626         (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
12627         (BINFO_PRIMARY_MARKED_P): Rename to ...
12628         (BINFO_PRIMARY_P): ... here.
12629         (binfo_via_virtual): New prototype.
12630         * decl2.c (flag_dump_class_layout): New flag.
12631         (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
12632         use `=' as a file name separator.
12633         * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
12634         bases.
12635         (build_vtbl_address): If this is a virtual primary base, then
12636         get the vtbl of what it is ultimately primary for.
12637         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
12638         for BINFO_PRIMARY_P.
12639         (dfs_skip_nonprimary_vbases_markedp): Likewise.
12640         (get_shared_vbase_if_not_primary): Likewise.
12641         (dfs_get_pure_virtuals): Likewise.
12642         (expand_upcast_fixups): Likewise.
12643         (fixup_virtual_upcast_offsets): Likewise.
12644         (dfs_find_vbase_instance): Likewise.
12645         (find_vbase_instance): Likewise.
12646         (binfo_from_vbase): Adjust comment to reflect reality.
12647         (binfo_via_virtual): New function.
12648         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
12649         for binfo walking during VTT construction.
12650         (dfs_mark_primary_bases): Remove.
12651         (force_canonical_binfo_r): New function.
12652         (force_canonical_binfo): New function.
12653         (mark_primary_virtual_base): New function.
12654         (mark_primary_bases): Walk in inheritance graph order, use
12655         mark_primary_virtual_base.
12656         (determine_primary_base): Use some more intermediate variables.
12657         (dfs_find_final_overrider): Don't check for overriding along a
12658         virtual path.
12659         (dfs_modify_vtables): Walk into primary virtual bases too.
12660         (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
12661         (build_base_fields): Likewise.
12662         (dfs_set_offset_for_unshared_vbases): Likewise.
12663         (layout_virtual_bases): Likewise.
12664         (end_of_class): Likewise.
12665         (finish_struct_1): Call dump_class_hierarchy, if requested.
12666         (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
12667         (dump_class_hierarchy_r): Add stream parameter. Emit more information.
12668         (dump_class_hierarchy): Add file parameter. Append to file, if
12669         required.
12670         (finish_vtbls): Adjust accumulate_vtbl_inits call.
12671         Use canonical base for virtual bases.
12672         (build_vtt): Add more comments. Adjust build_vtt_inits call.
12673         (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
12674         Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
12675         VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
12676         virtual VTTs.
12677         (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
12678         from DATA.  We want virtual primary bases and all bases via virtual.
12679         Only set BINFO_VPTR_INDEX for top level. Look up from a primary
12680         virtual base when not a construction vtable.
12681         (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
12682         (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
12683         Use canonical bases when processing virtual bases.
12684         (accumulate_vtbl_inits): We're interested in any base via a
12685         virtual path.
12686         (dfs_accumulate_vtbl_inits): If this is a primary virtual base
12687         within a construction vtable, determine what is being overridden.
12688         (build_vtbl_initializer): Add more comments
12689         (add_vcall_offset_vtbl_entries_1): Adjust comment.
12690         (build_rtti_vtbl_entries): Check if the base has lost its
12691         primary.
12693 2001-02-05  Mark Mitchell  <mark@codesourcery.com>
12695         * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
12697 2001-02-04  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12699         * decl.c (pushdecl): Call abort instead of fatal.
12700         * except.c (decl_is_java_type): Call fatal_error instead of fatal.
12701         * init.c (build_new_1): Likewise.
12702         (build_java_class_ref): Call internal_error and fatal_error, not fatal.
12703         * decl.c (build_typename_type): hash_table_init now returns void.
12704         decl.c (init_decl_processing): Make an error non-fatal.
12706 2001-02-04  Mark Mitchell  <mark@codesourcery.com>
12708         * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
12709         Document.
12710         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
12711         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
12712         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
12713         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
12714         * decl.c (maybe_commonize_var): Use the new name-mangling where
12715         appropriate.
12716         * decl2.c (comdat_linkage): Enhance comments.  Make all
12717         compiler-generated things static, if COMDAT is not available.
12718         (get_tinfo_decl): Do not make typeinfo objects that belong in the
12719         library COMDAT.
12720         (tinfo_base_init): Use the correct mangled name for typeinfo
12721         strings, and push them into the global scope.
12722         (typeinfo_in_lib_p): New function.
12723         (synthesize_tinfo_var): Use it.
12724         (create_real_tinfo_var): Likewise.
12726 2001-02-03  Jakub Jelinek  <jakub@redhat.com>
12728         * decl.c (push_class_binding): Use context_for_name_lookup instead
12729         of CP_DECL_CONTEXT.
12730         * search.c (context_for_name_lookup): Remove static.  Check for NULL
12731         context in the loop.
12732         * cp-tree.h (context_for_name_lookup): Add prototype.
12734 2001-02-02  Jakub Jelinek  <jakub@redhat.com>
12736         * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
12737         * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
12738         Remove.
12739         * call.c (convert_class_to_reference, build_user_type_conversion_1,
12740         add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
12742 2001-02-02  Mark Mitchell  <mark@codesourcery.com>
12744         * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
12745         of macros used when compiling g++spec.c.
12746         * g++spec.c (lang_specific_driver): Link with the shared
12747         libgcc by default.
12749 2001-01-29  Joseph S. Myers  <jsm28@cam.ac.uk>
12751         * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
12752         make_reference_declarator, make_call_declarator), method.c
12753         (implicitly_declare_fn), parse.y (namespace_using_decl,
12754         notype_unqualified_id, expr_or_declarator, new_type_id,
12755         after_type_declarator, direct_after_type_declarator,
12756         notype_declarator, complex_notype_declarator,
12757         complex_direct_notype_declarator, qualified_id,
12758         notype_qualified_id, overqualified_id, direct_new_declarator,
12759         absdcl, direct_abstract_declarator, conversion_declarator), pt.c
12760         (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
12761         instead of build_parse_node.
12763 2001-01-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12765         * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
12766         (minus_one_node): Moved to top level gcc directory.  Renamed
12767         to integer_minus_one_node.
12769         * init.c (init_init_processing): Don't set minus_one_node.
12770         (build_vec_init): Use integer_minus_one_node.
12772         * rtti.c (get_tinfo_decl_dynamic): Likewise.
12774 2001-01-28  Jakub Jelinek  <jakub@redhat.com>
12776         * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
12777         identical and they would be replaced with constant, remove
12778         MODIFY_EXPR from the tree.
12780 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12782         * Make-lang.in: Remove all dependencies on defaults.h.
12783         * call.c: Don't include defaults.h.
12784         * decl.c: Likewise.
12785         * decl2.c: Likewise.
12786         * except.c: Likewise.
12787         * pt.c: Likewise.
12788         * rtti.c: Likewise.
12789         * tree.c: Likewise.
12790         * typeck.c: Likewise.
12792 2001-01-25  Jakub Jelinek  <jakub@redhat.com>
12794         * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
12795         operators even in "C" linkage.
12796         * method.c (set_mangled_name_for_decl): Likewise.
12797         * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
12798         overloaded operators in "C" linkage.
12800 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
12802         * pt.c (tsubst_decl): Remove IN_DECL parameter.
12803         (tsubst_arg_types): Check parameter is not void.
12804         (tsubst): Adjust tsubst_decl call.
12806 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
12808         * call.c (add_builtin_candidate): Quote std properly, from
12809         previous change.
12811 2001-01-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12813         * pt.c (check_explicit_specialization): Clone constructors and
12814         destructors.
12816 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
12818         * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
12819         indicates anything special about template depth. Make sure we
12820         only count the user visible template classes.
12822 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
12824         * call.c (build_conv): Typo in comment.
12825         (add_builtin_candidate): Add more explanation.
12826         Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
12827         Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
12828         when we have enumeral types.
12829         (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
12830         candidates for relops and eqops.
12831         (joust): Simplify control flow. Allow a non-template user
12832         function to hide a builtin.
12834 2001-01-22  Nathan Sidwell  <nathan@codesourcery.com>
12836         * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
12837         (more_specialized): Add deduction parameter.
12838         * call.c (joust): Adjust more_specialized call.
12839         * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
12840         UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
12841         (get_bindings_order): Remove.
12842         (get_bindings_real): Add DEDUCE parameter.
12843         (maybe_adjust_types_for_deduction): Return extra unify flags. Do
12844         REFERENCE_TYPE jig for DEDUCE_ORDER.
12845         (type_unification_real): Deal with DEDUCE_ORDER. Use result of
12846         maybe_adjust_types_for_deduction.
12847         (more_specialized): Add DEDUCE parameter. Call get_bindings_real
12848         directly.
12849         (try_one_overload): Use result of maybe_adjust_types_for_deduction.
12850         (check_cv_quals_for_unify): Use new unify qualifier flags.
12851         (unify): Clear new unify qualifier flags.
12852         (get_bindings_real): Add DEDUCE parameter.
12853         (get_bindings): Adjust call to get_bindings_real.
12854         (get_bindings_overload): Likewise.
12855         (most_specialized_instantiation): Adjust call to
12856         more_specialized.
12858 2001-01-19  Jason Merrill  <jason@redhat.com>
12860         * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
12862         * decl.c (init_decl_processing): Just force -fvtable-thunks on if
12863         -fnew-abi.
12865 2001-01-19  Ute Pelkmann  <scope.muc@t-online.de>
12867         * decl2.c (arg_assoc_class): Fix double iteration logic.
12869 2001-01-19  Jason Merrill  <jason@redhat.com>
12871         * init.c (build_delete): Always call convert_force to strip cv-quals.
12873         * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
12874         * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
12875         * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
12877 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
12879         * search.c (get_vbase_1): Count only virtual bases.
12881 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
12883         * class.c (duplicate_tag_error): Robustify flag clearing.
12885 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
12887         * cp-tree.h (lookup_template_class): Add complain parm.
12888         * decl.c (lookup_namespace_name): Adjust call to
12889         lookup_template_class.
12890         (make_typename_type): Likewise.
12891         * semantics.c (finish_template_type): Likewise.
12892         * pt.c (lookup_template_class): Add complain parm. Adjust.
12893         (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
12894         (tsubst): Likewise.
12896 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
12898         * pt.c (copy_default_args_to_explicit_spec): Preserve
12899         object's CV quals. Reorganize.
12901 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
12903         * typeck.c (build_modify_expr): Say `initialization' for
12904         INIT_EXPRs.
12905         * init.c (build_default_init): Convert to enumeral type, if
12906         needed.
12908 2001-01-18  Jakub Jelinek  <jakub@redhat.com>
12910         * parse.y (nomods_initdcl0): Properly set things up for
12911         initdcl0_innards.
12913 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
12915         * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
12916         (type_unification_real): Set it.
12917         (unify): Use it.
12919 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
12921         * decl.c (finish_destructor_body): Convert to vbase pointer here.
12923 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
12925         * semantics.c (begin_class_definition): Check we're not inside a
12926         template parm list.
12928 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
12930         * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
12931         BASELINK_P.
12933 2001-01-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12935         * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
12936         * call.c (build_over_call): Add comment.
12938 2001-01-16 Daniel Berlin <dberlin@redhat.com>
12940         * cvt.c (ocp_convert): Handle vector type conversion
12941         * typeck2.c (digest_init): Handle vector type initializations
12943 2001-01-16  Phil Edwards  <pme@sources.redhat.com>
12945         * g++spec.c:  Don't add libraries needlessly if -fsyntax-only
12946           was given.
12948 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
12950         * pt.c (check_nontype_parm): Rename to ...
12951         (invalid_nontype_parm_type_p): ... here.
12952         (process_template_parm): Adjust.
12953         (convert_template_argument): Adjust.
12955 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
12957         * pt.c (check_nontype_parm): New function.
12958         (process_template_parm): Use it.
12959         (convert_template_argument): Use it.
12960         (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
12961         member.
12963 2001-01-14  Jeffrey Oldham  <oldham@codesourcery.com>
12965         * tree.c: Add defaults.h
12966         (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
12967         * Make-lang.in (cp/tree.o): Add defaults.h.
12969 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
12971         * Make-lang.in (CXX_C_OBJS): Add c-format.o.
12973 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
12975         * g++.1: Change to be ".so man1/gcc.1".
12977 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
12979         * Make-lang.in (c++.info, c++.install-info): Build and install g++
12980         internals info.
12981         (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
12982         ($(srcdir)/cp/g++int.info): New target.
12983         * gxxint.texi: Add info directory entry.  Use @@ in email address.
12984         * .cvsignore: Update.
12986 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
12988         * typeck.c (build_c_cast): Do template processing earlier.
12989         Always pedwarn on array casts.
12991 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
12993         * friend.c (make_friend_class): Make sure a templated class is
12994         actually a template.
12996 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
12998         * decl2.c (get_guard): Set linkage from guarded decl.
13000 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
13002         * call.c (convert_default_arg): Check for unprocessed
13003         DEFAULT_ARG.
13004         * cp-tree.h (replace_defarg): Move to spew.c.
13005         (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
13006         spew.c, which is where they really are.
13007         (done_pending_defargs): Declare.
13008         (unprocessed_defarg_fn): Declare.
13009         * decl.c (replace_defarg): Move to spew.c
13010         * parse.y (structsp): Call done_pending_defargs.
13011         * spew.c (defarg_fns): Rearrange list structure.
13012         (defarg_fnsdone): New static variable.
13013         (defarg_depfns): New static variable.
13014         (init_spew): Adjust.
13015         (add_defarg_fn): Store the type in TREE_TYPE.
13016         (do_pending_defargs): Detect and deal with ordering constraints
13017         and circularity.
13018         (done_pending_defargs): New function.
13019         (unprocessed_defarg_fn): New function.
13020         (replace_defarg): Moved from decl.c. Robustify. Don't save
13021         if circularity detected.
13023 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
13025         * pt.c (unify): Check array has a domain, before checking
13026         whether it is variable sized.
13028 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
13030         * decl.c (grokparms): Unobfuscate and get correct diagnostic for
13031         parameters with pointers to arrays of unknown bound.
13033 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
13035         * parse.y (template_parm_header, template_spec_header): New
13036         reductions. Split out from ...
13037         (template_header): ... here. Use them.
13038         (template_template_parm): Use template_parm_header.
13039         * semantics.c (finish_template_template_parm): Add assert.
13041 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
13043         * mangle.c (write_builtin_type): Fix thinko.
13045         * pt.c (copy_default_args_to_explicit_spec_1): New function.
13046         (copy_default_args_to_explicit_spec): Likewise.
13047         (check_explicit_specialization): Use it.
13049         * class.c (finish_struct_1):  Remove last argument in call to
13050         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
13051         * decl.c (builtin_function): Likewise.
13052         (build_cp_library_fn): Likewise.
13053         (check_initializer): Likewise.
13054         (make_rtl_for_nonlocal_decl): Likewise.
13055         (cp_finish_decl): Likewise.
13056         (start_function): Likewise.
13057         * decl2.c (finish_anon_union): Likewise.
13058         * friend.c (do_friend): Likewise.
13059         * init.c (build_java_class_ref): Likewise.
13060         * method.c (make_thunk): Likewise.
13061         * pt.c (tsubst_friend_function): Likewise.
13062         * semantics.c (expand_body): Likewise.
13064 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
13066         * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
13067         looking at DECL_CLONED_FUNCTION for non-functions.
13069 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
13071         * error.c (dump_template_parameter): Use parm to determine how
13072         to print default value.
13074 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
13076         * class.c (duplicate_tag_error): Clear more flags.
13078 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
13080         * call.c (build_new_method_call): Use binfo_for_vbase.
13082 2001-01-10  Joseph S. Myers  <jsm28@cam.ac.uk>
13084         * cp-tree.h (flag_cond_mismatch): Don't declare.
13085         * decl2.c (flag_cond_mismatch): Don't define.
13086         (lang_f_options): Remove cond-mismatch.
13087         (unsupported_options): Add cond-mismatch.
13089 2001-01-09  Nathan Sidwell  <nathan@codesourcery.com>
13091         * class.c (handle_using_decl): Reject using of constructor name
13092         of sourcing class. Allow injecting of a method with same name as
13093         nested class. Fixup error messages.
13095 2001-01-09  Joseph S. Myers  <jsm28@cam.ac.uk>
13097         * decl2.c (lang_decode_option): Handle -Wformat=2.
13099 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
13101         * cp-tree.h (lang_decl_flags): Rename defined_in_class to
13102         initialized_in_class.
13103         (DECL_DEFINED_IN_CLASS_P): Rename to ...
13104         (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
13105         * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
13106         (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
13107         * pt.c (check_default_tmpl_args): Adjust for
13108         DECL_INITIALIZED_IN_CLASS_P.
13109         (instantiate_class_template): Likewise.
13110         (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
13112         * class.c (finish_struct): Constify saved_filename.
13114 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
13116         * class.c (duplicate_tag_error): Adjust diagnostic.
13117         (finish_struct): Locally set location to start of struct.
13118         * decl.c (fixup_anonymous_aggr): Use cp_error_at.
13120 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
13122         * decl.c (struct binding_level): Adjust class_shadowed comments
13123         to reflect reality.
13124         (push_class_level_binding): Adjust comments to reflect reality.
13125         Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
13126         Don't set TREE_VALUE on the class_shadowed list.
13128 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13130         * decl2.c (acceptable_java_type): Allow references too.
13131         * init.c (build_java_class_ref): When using the new ABI, search
13132         `class$' and have it mangled with `mangle_decl.'
13133         * mangle.c (write_java_integer_type_codes): New function.
13134         (write_builtin_type): Detect and mangle Java integer and real
13135         types.
13137 2001-01-07  Mark Mitchell  <mark@codesourcery.com>
13139         * decl2.c (grokfield): Don't accept `asm' specifiers for
13140         non-static data members.
13142 2001-01-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13144         * expr.c (cplus_expand_expr): Don't reset `target'.
13146 2001-01-07  Neil Booth  <neil@daikokuya.demon.co.uk>
13148         * cp/decl2.c (cxx_post_options): Call cpp_post_options.
13150 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
13152         * parse.y (template_datadef): Check for error_mark_node.
13154 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
13156         * cp-tree.def (DEFAULT_ARG): Make `x' class.
13158 2001-01-04  Joseph S. Myers  <jsm28@cam.ac.uk>
13160         * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
13161         (record_builtin_type): Make non-static.
13162         (flag_short_double): Don't declare.
13163         (init_decl_processing): Remove the creation of many tree nodes now
13164         in c_common_nodes_and_builtins.
13165         (build_void_list_node): New function.
13166         * decl2.c (flag_short_double, flag_short_wchar): Don't define.
13167         * cp-tree.h (flag_short_wchar): Don't declare.
13169 2001-01-04  Mark Mitchell  <mark@codesourcery.com>
13171         * call.c (build_conv): Don't use build1 for USER_CONV.
13172         * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
13174 2001-01-03  Joseph S. Myers  <jsm28@cam.ac.uk>
13176         * lex.c (lang_init): Call c_common_lang_init.
13178 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
13180         * search.c (lookup_fnfields_here): Remove.
13181         (look_for_overrides_r): Use lookup_fnfields_1.
13182         Ignore functions from using declarations.
13184 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
13186         Implement exceptions specifiers for implicit member functions.
13187         * cp-tree.h (merge_exceptions_specifiers): Declare new function.
13188         * method.c (synthesize_exception_spec): New function.
13189         (locate_dtor, locate_ctor, locate_copy): New functions.
13190         (implicitly_declare_fn): Generate the exception spec too.
13191         * search.c (check_final_overrider): Check artificial functions
13192         too.
13193         * typeck2.c (merge_exception_specifiers): New function.
13195 2001-01-03  Jason Merrill  <jason@redhat.com>
13197         * init.c (build_default_init): New fn.
13198         (perform_member_init): Split out from here.
13199         (build_new_1): Use it.  Simplify initialization logic.
13200         (build_vec_init): Take an array, rather than a pointer and maxindex.
13201         Speed up simple initializations.  Don't clean up if we're assigning.
13202         * cp-tree.h: Adjust.
13203         * decl2.c (do_static_initialization): Remove TREE_VEC case.
13204         * parse.y (new_initializer): Return void_zero_node for ().
13205         * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
13206         * typeck2.c (digest_init): Only complain about user-written
13207         CONSTRUCTORs.
13209 2000-12-22  Mike Stump  <mrs@wrs.com>
13211         * decl2.c: (max_tinst_depth): Increase to 50.
13213 2001-01-02  Mark Mitchell  <mark@codesourcery.com>
13215         * class.c (invalidate_class_lookup_cache): Zero the
13216         previous_class_values.
13217         * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
13218         TREE_INT_CST_HIGH.
13219         (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
13220         * decl.c (free_bindings): New variable.
13221         (push_binding): Don't create a new binding if we have one on the
13222         free list.
13223         (pop_binding): Put old bindings on the free list.
13224         (init_decl_processing): Use size_int, not build_int_2.
13225         Register free_bindings as a GC root.
13226         (cp_make_fname_decl): Use size_int, not build_int_2.
13227         (push_inline_template_parms_recursive): Likewise.
13228         (end_template_parm_list): Likewise.
13229         (for_each_template_parm): Do not use walk_tree_without_duplicates.
13230         (tsubst_template_parms): Use size_int, not build_int_2.
13231         (tsubst): Likewise.
13232         * rtti.c (get_vmi_pseudo_type_info): Likewise.
13234 2001-01-02  Richard Henderson  <rth@redhat.com>
13236         * parse.y (asm): Set ASM_INPUT_P.
13238 2001-01-02  Jason Merrill  <jason@redhat.com>
13240         * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
13241         for v3 ABI.
13243         * typeck.c (cp_truthvalue_conversion): New fn.
13244         * cvt.c (ocp_convert): Use it.
13246         * cp-tree.h: Lose c-common.c decls.
13248         * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
13249         * cvt.c (convert_to_void): Use type_unknown_p.
13251         * typeck.c (strip_all_pointer_quals): Also strip quals from
13252         pointer-to-member types.
13254         * Make-lang.in (cp/TAGS): Use --no-globals.  Ignore parse.c, and treat
13255         parse.y as C.
13257         * call.c (build_new_method_call): Do evaluate the object parameter
13258         when accessing a static member.
13259         * typeck.c (build_component_ref): Likewise.
13261 2001-01-02  Andreas Jaeger  <aj@suse.de>
13263         * decl.c (cp_missing_noreturn_ok_p): New.
13264         (init_decl_processing): Set lang_missing_noreturn_ok_p.
13266 2000-12-29  Jakub Jelinek  <jakub@redhat.com>
13268         * decl.c (init_decl_processing): Fix sign of wchar_type_node.
13270 2000-12-29  Mark Mitchell  <mark@codesourcery.com>
13272         * class.c (pushclass): Remove #if 0'd code.
13273         * cp-tree.h (overload_template_name): Remove.
13274         * decl.c (store_bindings): Simplify.
13275         (pop_from_top_level): Likewise.
13276         * pt.c (overload_template_name): Remove.
13277         (instantiate_decl): Don't call push_to_top_level if it's not
13278         needed.
13280 2000-12-28  Mark Mitchell  <mark@codesourcery.com>
13282         * pt.c (register_local_specialization): Don't return a value.
13283         (lookup_template_class): Use move-to-front heuristic when looking
13284         up template instantiations.
13285         (instantiate_decl): Only push_to_top_level when we're actually
13286         going to instantiate the template.
13288 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
13290         * search.c (binfo_for_vtable): Return least derived class, not
13291         most.  Handle secondary vtables.
13293 2000-12-22  Jason Merrill  <jason@redhat.com>
13295         * pt.c (more_specialized): Don't optimize len==0.
13296         (fn_type_unification): If we're adding the return type, increase len.
13298         * typeck.c (build_binary_op): Fix pmf comparison logic.
13300         * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
13301         DECL_STATIC_FUNCTION_P.
13303         * semantics.c (genrtl_finish_function): Don't try to jump to
13304         return_label unless it exists.
13306         In partial ordering for a call, ignore parms for which we don't have
13307         a real argument.
13308         * call.c (joust): Pass len to more_specialized.
13309         (add_template_candidate_real): Strip 'this', pass len.
13310         * pt.c (more_specialized): Pass len down.  Lose explicit_args parm.
13311         (get_bindings_order): New fn.  Pass len down.
13312         (get_bindings_real): Strip 'this', pass len.
13313         (fn_type_unification): Likewise.
13314         (type_unification_real): Succeed after checking 'len' args.
13315         (most_specialized_instantiation): Lose explicit_args parm.
13316         * class.c (resolve_address_of_overloaded_function): Strip 'this',
13317         pass len.
13319 2000-12-21  Jason Merrill  <jason@redhat.com>
13321         * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
13322         DECL_TEMPLATE_RESULT.
13324         * search.c (lookup_field_r): Call lookup_fnfields_1, not
13325         lookup_fnfields_here.
13327         * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
13329         * call.c (build_object_call): Also allow conversions that return
13330         reference to pointer to function.
13331         (add_conv_candidate): Handle totype being ref to ptr to fn.
13332         (build_field_call): Also allow members of type reference to function.
13333         Lose support for calling pointer to METHOD_TYPE fields.
13335         * error.c (dump_expr): Handle *_CAST_EXPR.
13337         * typeck2.c (build_scoped_ref): Always convert to the naming class.
13339         * tree.c (break_out_cleanups): Lose.
13340         * cp-tree.h: Remove prototype.
13341         * typeck.c (build_component_ref): Don't break_out_cleanups.
13342         (build_compound_expr): Likewise.
13343         * semantics.c (finish_expr_stmt): Likewise.
13345 2000-12-20  Richard Henderson  <rth@redhat.com>
13347         * cp-tree.h: Update declarations.
13348         * decl.c (finish_case_label): Return the new stmt node.
13349         * semantics.c (finish_goto_stmt): Likewise.
13350         (finish_expr_stmt, finish_return_stmt): Likewise.
13351         (finish_break_stmt, finish_continue_stmt): Likewise.
13352         (finish_asm_stmt): Likewise.
13353         * parse.y (already_scoped_stmt): Set STMT_LINENO.
13354         (compstmt, implicitly_scoped_stmt, stmt): Likewise.
13355         (simple_if, simple_stmt): Return the new stmt node.
13356         (save_lineno): New.
13358 2000-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
13360         * cp-tree.h: Don't declare warn_long_long.
13362 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
13364         * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
13365         IS_AGGR_TYPE.
13367 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
13369         * pt.c (unify): Handle when both ARG and PARM are
13370         BOUND_TEMPLATE_TEMPLATE_PARM.
13372 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
13374         * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
13375         DECL_TEMPLATE_PARM_P.
13377 2000-12-15  Jason Merrill  <jason@redhat.com>
13379         * init.c (build_new_1): Reorganize.  Now with 100% fewer SAVE_EXPRs!
13381         * init.c (build_new_1): Don't strip quals from type.
13383         * decl.c (pushdecl): Don't check for linkage on a non-decl.
13385         * call.c (build_op_delete_call): See through ARRAY_TYPEs.
13387         * call.c (build_new_function_call): Lose space before paren in
13388         error message.
13389         (build_new_method_call): Likewise.
13391         * typeck2.c (build_m_component_ref): Propagate quals from datum.
13393 2000-12-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
13395         * pt.c (check_explicit_specialization): Propagate default
13396         function arguments to explicit specializations.
13398 2000-12-13  DJ Delorie  <dj@redhat.com>
13400         * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
13401         and <? operators.
13403 2000-12-08  Jason Merrill  <jason@redhat.com>
13405         * error.c (dump_function_name): Don't let the user see __comp_ctor.
13407         Clean up copy-initialization in overloading code.
13408         * call.c (build_user_type_conversion_1): Die if we are asked to
13409         convert to the same or a base type.
13410         (implicit_conversion): Avoid doing so.  Lose reference binding code.
13411         (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
13412         direct-initialization.  Also do direct-init part of copy-init.
13413         (build_user_type_conversion): Don't provide context to convert_like.
13414         * cvt.c (ocp_convert): build_user_type_conversion will now provide
13415         the constructor call for copy-init.
13417         * pt.c (tsubst_decl): Call clone_function_decl here if this is an
13418         instantiation of a member template.
13419         (do_decl_instantiation): Not here.
13421 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
13423         * class.c (check_field_decls): Don't special case anonymous
13424         fields in error messages.
13425         (note_name_declared_in_class): Use %D on diagnostic.
13427         * tree.c (pod_type_p): Use strip_array_types.
13428         (cp_valid_lang_attribute): Likewise.
13429         * typeck.c (cp_type_quals): Strip arrays separately, to avoid
13430         multiple evaluations.
13431         (cp_has_mutable_p): Use strip_array_types.
13433 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
13435         * cp-tree.h (sufficient_parms_p): Declare new function.
13436         * call.c (sufficient_parms_p): New function, broken out of ...
13437         (add_function_candidate): ... here. Use it.
13438         (add_conv_candidate): Use it.
13439         * decl.c (grok_ctor_properties): Use it.
13441 2000-12-07  Jakub Jelinek  <jakub@redhat.com>
13443         * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
13445 2000-12-07  Joseph S. Myers  <jsm28@cam.ac.uk>
13447         * decl2.c (lang_decode_option): Handle -Wformat-security.
13449 2000-12-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
13451         * pt.c (verify_class_unification): New function.
13452         (get_class_bindings): Use it.
13453         (try_class_unification): Tidy.
13454         (unify): Handle when argument of a template-id is not
13455         template parameter dependent.
13456         (template_args_equal): Handle when TREE_CODE's do not match.
13458 2000-12-06  Alexandre Oliva  <aoliva@redhat.com>
13460         * lang-specs.h (c++): When invoking the stand-alone preprocessor
13461         for -save-temps, pass all relevant -Defines to it, and then don't
13462         pass them to cc1plus.
13464 2000-12-05  Will Cohen  <wcohen@redhat.com>
13466         * decl.c (finish_case_label): Cleared
13467         more_cleanups_ok in surrounding function scopes.
13468         (define_label): Likewise.
13470 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
13472         * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
13473         (get_matching_virtual): Remove.
13474         (look_for_overrides): Declare new function.
13475         * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
13476         DECL_VINDEX here.
13477         * class.c (check_for_override): Move base class iteration code
13478         to look_for_overrides.
13479         * search.c (next_baselink): Remove.
13480         (get_virtuals_named_this): Remove.
13481         (get_virtual_destructor): Remove.
13482         (tree_has_any_destructors_p): Remove.
13483         (struct gvnt_info): Remove.
13484         (check_final_overrider): Remove `virtual' from error messages.
13485         (get_matching_virtuals): Remove. Move functionality to ...
13486         (look_for_overrides): ... here, and ...
13487         (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
13488         to be overriding.
13490 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
13492         * typeck.c (get_delta_difference): If via a virtual base,
13493         return zero.
13494         * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
13495         adjustment.
13497 2000-12-04  Richard Henderson  <rth@redhat.com>
13499         * error.c (dump_tree): Use output_add_string not OB_PUTS.
13501 2000-12-04  Jason Merrill  <jason@redhat.com>
13503         * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
13504         (write_builtin_type): Pass intSI_type_node and the like through
13505         type_for_mode.
13506         * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
13507         Pass intSI_type_node and the like through type_for_mode.
13508         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
13509         * pt.c (tsubst, unify): Likewise.
13510         * tree.c (walk_tree): Likewise.
13511         * error.c (dump_type): Likewise.
13512         (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
13514         * Make-lang.in: Tweak top comment for emacs.
13515         (cp/TAGS): Restore.
13517         * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
13519         * class.c (clone_function_decl): Robustify.
13521 2000-12-04  Michael Matz  <matzmich@cs.tu-berlin.de>
13523         * decl.c (store_bindings): Only search in the non modified
13524         old_bindings for duplicates.
13526 2000-12-04  Nathan Sidwell  <nathan@codesourcery.com>
13528         * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
13529         TYPE_POLYMORPHIC_P.
13531         * typeck.c (build_static_cast): Remove unused variable.
13533 2000-12-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
13535         * pt.c: Fix typo in comment.
13537 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
13539         * decl2.c (warn_format): Remove definition.
13540         (lang_decode_option): Handle -Wformat-nonliteral,
13541         -Wno-format-extra-args and -Wno-format-y2k.  Use set_Wformat.
13543 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
13545         * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
13546         (init_decl_processing): Don't create string_type_node,
13547         const_string_type_node, wint_type_node, intmax_type_node,
13548         uintmax_type_node, default_function_type, ptrdiff_type_node and
13549         unsigned_ptrdiff_type_node.  Adjust position of call to
13550         c_common_nodes_and_builtins.
13551         (identifier_global_value): New function.
13553 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>
13555         * call.c (standard_conversion): Reject pointer to member
13556         conversions from ambiguous, inaccessible or virtual bases.
13557         * typeck.c (build_static_cast): Don't check pointers to members
13558         specially.
13560 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
13562         * method.c (do_build_copy_constructor): Preserve cv
13563         qualifications when accessing source object members.
13564         (do_build_assign_ref): Likewise. Remove separate diagnostics for
13565         unnamed fields.
13567 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
13569         * method.c (do_build_assign_ref): Construct appropriately
13570         CV-qualified base reference. Don't allow const casts in base
13571         conversion.
13573 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
13575         * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
13576         incomplete return type.
13578 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
13580         * parse.y (base_class.1): Produce a _TYPE not a _DECL.
13581         * semantics.c (finish_base_specifier): Accept a _TYPE not a
13582         _DECL.
13584 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
13586         * spew.c (yyerror): Cope if yylval.ttype is NULL.
13588 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
13590         * decl.c (grokdeclarator): Diagnose undefined template contexts.
13592 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
13594         * decl.c (grokdeclarator): Do type access control on friend
13595         class.
13597 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
13599         * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
13600         bison parser ickiness.
13601         * pt.c (tsubst_friend_function): Enter namespace scope when
13602         tsubsting the function name.
13603         * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
13605 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
13607         * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
13608         * cvt.c (cp_convert_to_pointer): Add force parameter.
13609         Allow conversions via virtual base if forced.
13610         (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
13611         (ocp_convert): Likewise.
13612         * search.c (binfo_from_vbase): Return the virtual base's binfo.
13613         * typeck.c (get_delta_difference): Adjust handling of virtual
13614         bases.
13616 2000-11-26  Mark Mitchell  <mark@codesourcery.com>
13618         * tree.c (struct list_hash): Remove.
13619         (list_hash_table): Make it be an htab.
13620         (struct list_proxy): New type.
13621         (list_hash_eq): New function.
13622         (list_hash_pieces): Renamed from ...
13623         (list_hash): ... this.
13624         (list_hash_lookup): Remove.
13625         (list_hash_add): Remove.
13626         (hash_tree_cons): Use the generic hashtable.
13627         (mark_list_hash): Remove.
13628         (init_tree): Create the hashtable.
13630 2000-11-25  Joseph S. Myers  <jsm28@cam.ac.uk>
13632         * method.c (build_mangled_C9x_name): Rename to
13633         build_mangled_C99_name.  Change C9X references in comments to
13634         refer to C99.
13636 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
13638         * parse.y (unary_expr): Move VA_ARG from here ...
13639         (primary): ... to here.
13641 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
13643         * semantics.c (finish_id_expr): If type is error_mark, return
13644         error_mark.
13646 2000-11-23  Nathan Sidwell  <nathan@codesourcery.com>
13648         * pt.c (lookup_template_class): Simplify loop exit constructs.
13649         Cope when there is no partial instantiation of a template
13650         template member.
13652 2000-11-23  J"orn Rennecke <amylaar@redhat.com>
13654         * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
13656 2000-11-22  Mark Mitchell  <mark@codesourcery.com>
13658         * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
13659         prefix.
13661         * pt.c (do_decl_instantiate): Explicitly clone constructors and
13662         destructors that haven't already been cloned.
13664 2000-11-20  Richard Henderson  <rth@redhat.com>
13666         * parse.y (yyparse_1): Rename the parser entry point.
13668 2000-11-20  Alex Samuel  <samuel@codesourcery.com>
13670         * mangle.c (write_name): Use <unscoped-name> for names directly in
13671         function scope.
13672         (write_unscoped_name): Accept names directly in function scope.
13674 2000-11-20  Nathan Sidwell  <nathan@codesourcery.com>
13676         * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
13677         * parse.y (extdef): Add EXPORT reduction.
13678         * spew.c (yylex): Don't skip export here.
13680 2000-11-19  Mark Mitchell  <mark@codesourcery.com>
13682         * decl.c (init_decl_processing): Correct name of pure virtual
13683         function under the new ABI.
13684         * rtti.c (throw_bad_cast): Likewise, for bad cast function.
13685         (throw_bad_typeid): Likewise for bad typeid function.
13687 2000-11-18  Mark Mitchell  <mark@codesourcery.com>
13689         * decl.c (grokparms): Don't even function types of `void' type,
13690         either.
13691         * mangle.c (write_type): Don't crash when confronted with the
13692         error_mark_node.
13694         * decl.c (grokparms): Don't create parameters of `void' type.
13696 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
13698         * lex.c (mark_impl_file_chain): Delete.
13699         (init_parse): Remove call to ggc_add_string_root.  No need to
13700         ggc_strdup a string constant.  Do not add impl_file_chain to GC
13701         roots.
13702         (handle_pragma_implementation): No need to ggc_strdup main_filename.
13704 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
13706         * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
13708 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
13710         * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
13711         * decl.c (grokdeclarator): Don't reject void parms here.
13712         (require_complete_types_for_parms): Simplify, use
13713         complete_type_or_else.
13714         (grokparms): Remove bitrot. Remove funcdef parm.
13715         Deal with ellipsis parm lists here.
13716         * semantics.c (finish_parmlist): Don't append void_list_node
13717         here. Set PARMLIST_ELLIPSIS_P.
13719 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
13721         * typeck2.c (incomplete_type_error): Reorganize to avoid
13722         excessive diagnostics.
13724 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
13726         * lex.c (struct impl_files, internal_filename): Constify a char *.
13728 2000-11-16  Mark Mitchell  <mark@codesourcery.com>
13730         * mangle.c (write_special_name_constructor): Don't generate
13731         assembler junk when confronted with an old-style constructor.
13732         (write_special_name_destructor): Likewise.
13733         (mangle_decl_string): Do it here instead.
13735 2000-11-16  Nathan Sidwell  <nathan@codesourcery.com>
13737         * call.c (op_error): Make error messages clearer.
13739 2000-11-15  Mark Mitchell  <mark@codesourcery.com>
13741         * decl.c (wrapup_globals_for_namespace): Don't mark things
13742         TREE_ASM_WRITTEN when they're not.
13744 2000-11-15  Jason Merrill  <jason@redhat.com>
13746         * typeck2.c (friendly_abort): Uncount the error before handing
13747         off to fancy_abort.
13749 2000-11-15  Nathan Sidwell  <nathan@codesourcery.com>
13751         * typeck.c (lookup_anon_field): Cope with qv qualifiers.
13753 2000-11-14  Mark Mitchell  <mark@codesourcery.com>
13755         * class.c (build_vtbl_initializer): Fix typo in comment.
13756         * typeck.c (expr_sizeof): Don't crash on errors.
13758 2000-11-14  Jim Wilson  <wilson@redhat.com>
13760         * lang-specs.h: Add %2 after %(cc1_options).
13762 2000-11-14  Richard Henderson  <rth@redhat.com>
13764         * typeck.c (c_sizeof): Be strict about casting result value
13765         back to c_size_type_node.
13766         (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
13768 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
13770         * typeck.c (build_unary_op): Use boolean_increment from
13771         c-common.c, moving the relevant code there.
13773 2000-11-11  Jason Merrill  <jason@redhat.com>
13775         * typeck.c (mark_addressable): Don't call put_var_into_stack.
13777         * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
13778         in inlines.
13780 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13782         * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
13783         * lex.c (copy_lang_decl): Likewise.
13785 2000-11-09  Mark Mitchell  <mark@codesourcery.com>
13787         * dump.c (cp_dump_tree): Don't dump function bodies here.
13789         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
13790         (dump.o): Update dependency list.
13791         * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
13792         (flag_dump_translation_unit): Likewise.
13793         (CP_TYPE_QUALS): Adjust definition.
13794         (DECL_C_BIT_FIELD): Remove.
13795         (SET_DECL_C_BIT_FIELD): Likewise.
13796         (CLEAR_DECL_C_BIT_FIELD): Likewise.
13797         (add_maybe_template): Likewise.
13798         (strip_array_types): Likewise.
13799         (dump_node_to_file): Likewise.
13800         (cp_dump_tree): New function.
13801         * decl.c (init_decl_processing): Set lang_dump_tree.
13802         * decl2.c (flag_dump_translation_unit): Remove.
13803         * dump.c: Move most of it to ../c-dump.c.
13804         (cp_dump_tree): New function.
13805         * pt.c (add_maybe_template): Remove.
13806         * typeck.c (strip_array_types): Likewise.
13808 2000-11-07  Eric Christopher  <echristo@redhat.com>
13810         * decl.c (init_decl_processing): Change definition of
13811         __wchar_t to wchar_t.  Remove artificial declaration of
13812         wchar_t.
13813         * lex.c: Change instances of __wchar_t to wchar_t.
13815 2000-11-09  Nathan Sidwell  <nathan@codesourcery.com>
13817         * lex.c (do_identifier): Don't lookup_name for operators.
13818         * parse.y (operator): Save looking_for_typename.
13819         (unoperator): Restore it.
13820         * spew.c (frob_opname): Use nth_token for lookahead.
13822 2000-11-08  Nathan Sidwell  <nathan@codesourcery.com>
13824         * decl.c (grok_op_properties): Always use coerce_new_type and
13825         coerce_delete_type.
13826         * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
13827         exception specification. Tidy up.
13828         (coerce_delete_type): Preserve exception specification. Tidy up.
13830 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
13832         * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
13833         (push_binding_level), error.c (cp_tree_printer), pt.c
13834         (process_partial_specialization, tsubst_template_arg_vector),
13835         search.c (lookup_member): Use memset () instead of bzero ().
13837 2000-11-07  Nathan Sidwell  <nathan@codesourcery.com>
13839         * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
13841 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
13843         * Make-lang.in (c++.distdir): Remove.
13845 2000-11-04  Mark Mitchell  <mark@codesourcery.com>
13847         * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
13848         declarations from different namespaces to be combined.
13850 2000-11-03  Zack Weinberg  <zack@wolery.stanford.edu>
13852         * decl.c: Include tm_p.h.
13854 2000-11-03  Joseph S. Myers  <jsm28@cam.ac.uk>
13856         * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
13858 2000-11-02  Joseph S. Myers  <jsm28@cam.ac.uk>
13860         * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
13861         (build_overload_value), repo.c (open_repo_file), xref.c
13862         (open_xref_file): Use strchr () and strrchr () instead of index ()
13863         and rindex ().
13865 2000-11-01  Bernd Schmidt  <bernds@redhat.co.uk>
13867         * call.c (build_over_call): Call fold on the CALL_EXPR.
13869 2000-11-01  Gabriel Dos Reis  <gdr@codesourcery.com>
13871         * error.c (dump_template_decl): Separate template hearders with
13872         space not comma.
13874 2000-10-31  Gabriel Dos Reis  <gdr@codesourcery.com>
13876         * error.c: Move TFF_ macros into cp-tree.h.  Throughout, replace
13877         TS_* flags with corresponding TFF_*.  Adjust prototypes of
13878         functions (which used to take a tree_string_flags) to take an int.
13880         * cp-tree.h (enum tree_string_flags): Remove
13881         (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
13882         TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
13883         TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
13884         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
13885         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
13886         TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
13887         (type_as_string, decl_as_string, expr_as_string,
13888         context_as_string): Adjust prototype.
13890         * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
13891         instead of TS_PLAIN.
13893         * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
13894         instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
13895         plain `0'.
13897 2000-10-30  Mark Mitchell  <mark@codesourcery.com>
13899         * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
13900         (linkage_kind): New enumeration.
13901         (decl_linkage): New function.
13902         * decl2.c (comdat_linkage): Extend comment.
13903         * error.c (dump_function_decl): Print the arguments used to
13904         instantiate a template, even when not printing the type of the
13905         function.
13906         * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
13907         not TREE_PUBLIC, to test for external linkage.
13908         * tree.c (decl_linkage): New function.
13910 2000-10-28  Mark Mitchell  <mark@codesourcery.com>
13912         * pt.c (instantiate_decl): Always instantiate static data members
13913         initialized in-class.
13915 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
13917         * Make-lang.in: Move all build rules here from Makefile.in,
13918         adapt to new context.  Wrap all rules that change the current
13919         directory in parentheses.  Expunge all references to $(P).
13920         When one command depends on another and they're run all at
13921         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
13922         all object-file generation rules.  Delete obsolete variables.
13924         * Makefile.in: Delete.
13925         * config-lang.in: Delete outputs= line.
13927 2000-10-26  Gabriel Dos Reis  <gdr@codesourcery.com>
13929         * error.c (dump_function_decl): Print no space between
13930         `ptr-operator' the `type-specifier' of the return type.
13931         (dump_type_prefix): Make sure we put space at the appropriate
13932         place.
13934 2000-10-23  Jason Merrill  <jason@redhat.com>
13936         * call.c (equal_functions): Also call decls_match for extern "C" fns.
13938 2000-10-22  Jason Merrill  <jason@redhat.com>
13940         * call.c (build_conditional_expr): Use ocp_convert to force
13941         rvalue conversion.
13943 2000-10-22  Mark Mitchell  <mark@codesourcery.com>
13945         * call.c (standard_conversion): Use RVALUE_CONVs for all
13946         expressions that satisfy lvalue_p, not just those that satisfy
13947         real_lvalue_p.
13949         * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
13951         * typeck.c (c_sizeof): Return an expression of `size_t' type,
13952         not one with TYPE_IS_SIZETYPE set.
13953         (dubious_conversion_warnings): Remove special-case code.
13955 2000-10-21  Geoffrey Keating  <geoffk@cygnus.com>
13957         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
13958         * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
13959         (dump_type_prefix): Print vector-of-int as 'int vector'.
13960         (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
13961         * tree.c (walk_tree): Handle VECTOR_TYPE.
13963         * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
13965 2000-10-21  Jason Merrill  <jason@redhat.com>
13967         * parse.y (operator): Set got_object from got_scope.
13968         Set looking_for_typename.
13969         * decl.c (lookup_name_real): Clear val after setting from_obj.
13970         Reorganize diagnostic.
13972 2000-10-20  Jason Merrill  <jason@redhat.com>
13974         * tree.c (walk_tree): Don't walk into default args.
13976         * error.c (dump_expr): Use host_integerp.
13978 2000-10-20  David Edelsohn  <edelsohn@gnu.org>
13980         * typeck2.c (abstract_virtuals_error): Use "because" instead of
13981         "since" in error message.
13983 2000-10-20  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13985         * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
13987 2000-10-20  Jeffrey Oldham  <oldham@codesourcery.com>
13989         * decl.c (revert_static_member_fn): Fixed typo.
13991 2000-10-19  Mark Mitchell  <mark@codesourcery.com>
13993         * class.c (subobject_offset_fn): New type.
13994         (dfs_record_base_offsets): Remove.
13995         (record_base_offsets): Likewise.
13996         (dfs_search_base_offsets): Likewise.
13997         (record_subobject_offset): New function.
13998         (check_subobject_offset): Likewise.
13999         (walk_subobject_offsets): Likewise.
14000         (record_subobject_offsets): Likewise.
14001         (layout_conflict_p): Reimplement.
14002         (layout_nonempty_base_or_field): Correct handling of type
14003         conflicts during layout.
14004         (layout_empty_base): Likewise.
14005         (build_base_field): Adjust to handle new representation of empty
14006         base offset table.
14007         (build_base_fields): Likewise.
14008         (layout_virtual_bases): Likewise.
14009         (splay_tree_compare_integer_csts): New function.
14010         (layout_class_type): Use a splay_tree, rather than a varray, to
14011         represent the offsets of empty bases.
14013         * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
14014         * decl.c (select_decl): Don't return declarations that are
14015         DECL_ANTICIPATED.
14017 2000-10-18  Mark Mitchell  <mark@codesourcery.com>
14019         * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
14020         (fake_std_node): New macro.
14021         * decl.c (in_std): Rename to ...
14022         (in_fake_std): ... this.
14023         (flag_no_builtin): Remove.
14024         (flag_no_nonansi_builtin): Likewise.
14025         (walk_namespaces_r): Use fake_std_node.
14026         (push_namespace): Use std_identifier.
14027         (pop_namespace): Use in_fake_std.
14028         (lookup_name_real): Use fake_std_node.
14029         (init_decl_processing): When -fhonor-std, create the `std'
14030         namespace.  Don't create a dummy fake_std_node in that case.
14031         Adjust call to c_common_nodes_and_builtins.  Use std_identifier.
14032         (builtin_function): Put builtins whose names don't begin
14033         with `_' in the std namespace.
14034         * decl2.c (flag_no_builtin): Remove.
14035         (flag_no_nonansi_builtin): Likewise.
14036         (set_decl_namespace): Use fake_std_node.
14037         (validate_nonmember_using_decl): Likewise.
14038         (do_using_directive): Likewise.
14039         (handle_class_head): Likewise.
14040         * dump.c (dequeue_and_dump): Likewise.
14041         * except.c (init_exception_processing): Use std_identifier.
14042         * init.c (build_member_call): Use fake_std_node.
14043         * rtti.c (init_rtti_processing): Use std_identifier.
14045 2000-10-17  Mark Mitchell  <mark@codesourcery.com>
14047         * cp-tree.h (back_end_hook): Remove declaration.
14048         * decl2.c (back_end_hook): Remove definition.
14050         * dump.c (dequeue_and_dump): Dump TREE_USED.
14052 2000-10-17  Brad Lucier <lucier@math.purdue.edu>
14054         * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
14056 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
14058         * decl.c (WINT_TYPE): Define.
14059         (init_decl_processing): Create types unsigned_ptrdiff_type_node,
14060         c_size_type_node, signed_size_type_node and wint_type_node.
14062 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
14064         * decl2.c (warn_missing_format_attribute): New variable.
14065         (lang_decode_option): Decode -Wmissing-format-attribute.
14067 2000-10-16  Mark Mitchell  <mark@codesourcery.com>
14069         * typeck.c (qualify_type): Remove.
14070         (composite_pointer_type): Fix handling of conversions to `cv void*'.
14072 2000-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14074         * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
14076 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14078         * Makefile.in (parse.c, parse.h): Create atomically.
14080 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
14082         * class.c (current_obstack): Remove.
14083         * decl.c (ggc_p): Remove.
14084         (start_decl): Don't use decl_tree_cons.
14085         (grokdeclarator): Don't use build_decl_list.
14086         (start_function): Don't use decl_tree_cons.
14087         (finish_function): Don't mess with obstacks.
14088         * decl2.c (grok_x_components): Don't use build_decl_list.
14089         * lex.c (make_call_declarator): Don't call decl_tree_cons.
14090         (implicitly_declare_fn): Don't call build_decl_list.
14091         * parse.y (frob_specs): Don't call build_decl_list or
14092         decl_tree_cons.
14093         (expr_or_declarator_intern): Don't call decl_tree_cons.
14094         (primary): Don't call build_decl_list.
14095         (fcast_or_absdcl): Likewise.
14096         (typed_declspecs): Don't call decl_tree_cons.
14097         (reserved_declspecs): Don't call build_decl_list.
14098         (declmods): Likewise.
14099         (reserved_typespecquals): Likewise.
14100         (aggr): Likewise.
14101         (new_type_id): Likewise.
14102         (cv_qualifiers): Likewise.
14103         (after_type_declarator_intern): Likewise.
14104         (notype_declarator_intern): Likewise.
14105         (absdcl_intern): Likewise.
14106         (named_parm): Likewise.
14107         * pt.c (most_specialized_class): Likewise.
14108         * repo.c (temporary_obstack): Make it a structure, not a pointer.
14109         (init_repo): Initialize it.
14110         * search.c (current_obstack): Remove.
14111         * typeck2.c (add_exception_specifier): Don't call build_decl_list.
14113 2000-10-09  Richard Henderson  <rth@cygnus.com>
14115         * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
14116         (c++ language support bits for libgcc): Remove.
14117         (c++.clean): Remove cplib2.txt cleanup.
14118         * config-lang.in (headers, lib2funcs): Remove.
14120         * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
14121         * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
14122         * inc/cxxabi.h, inc/exception, inc/new: Remove files.
14123         * inc/new.h, inc/typeinfo: Remove files.
14125 2000-10-08  Joseph S. Myers  <jsm28@cam.ac.uk>
14127         * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
14128         defined.
14129         (init_decl_processing): Initialize intmax_type_node and
14130         uintmax_type_node.
14132 2000-10-06  Richard Henderson  <rth@cygnus.com>
14134         * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
14135         (original_result_rtx): Remove.
14136         * decl.c (save_function_data): Don't clear x_result_rtx.
14137         (mark_lang_function): Don't mark it either.
14138         * expr.c (fixup_result_decl): Remove.
14139         * semantics.c (genrtl_named_return_value): Frob the return decl
14140         before calling emit_local_var.
14141         (genrtl_finish_function): Don't call fixup_result_decl.
14142         Always emit the jump to return_label.
14144 2000-10-06  Nathan Sidwell  <nathan@codesourcery.com>
14146         * pt.c (lookup_template_class): Set current access for enum.
14147         (tsubst_enum): Set file & line for enum decl.
14149         * spew.c (yylex): Remove unused variable.
14151 2000-10-05  Richard Henderson  <rth@cygnus.com>
14153         * semantics.c (genrtl_finish_function): Don't init or check
14154         can_reach_end; remove noreturn and return value checks.
14156 2000-10-05  Tom Tromey  <tromey@cygnus.com>
14158         * init.c (build_java_class_ref): Use `build_static_name' with a
14159         suffix, not a prefix, to build the class object's name.
14161 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
14163         * cp-tree.h (access_kind): Fix comment typo.
14164         * decl2.c (grokfield): Fix diagnostic typo.
14165         * semantics.c (finish_template_type): Fix comment typo.
14166         (finish_qualified_object_call_expr): Likewise.
14168 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
14170         * pt.c (tsubst_expr, DECL_STMT case): Don't process if
14171         tsubsting fails.
14173 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
14175         * spew.c (frob_id): New static function.
14176         (frob_opname): Use it.
14177         (yylex): Use it.
14179 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
14181         * decl.c (lang_mark_false_label_stack): Remove.
14182         * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
14184 2000-09-30  Joseph S. Myers  <jsm28@cam.ac.uk>
14186         * gxxint.texi: Use @email for formatting email addresses.
14188 2000-09-29  Gabriel Dos Reis  <gdr@codesourcery.com>
14190         * error.c: Remove direct obstack manipulation.  Replace with
14191         output_buffer-based formatting.  Adjust calls to removed macros.
14192         (obstack_chunk_alloc, obstack_chunk_free): Remove.
14193         (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
14194         OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
14196 2000-09-24  Mark Mitchell  <mark@codesourcery.com>
14198         * ir.texi: Move to ../c-tree.texi.
14200 2000-09-20  Jason Merrill  <jason@redhat.com>
14202         * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
14204 2000-09-21  Andreas Jaeger  <aj@suse.de>
14206         * errfn.c: Move declaration of cp_printer and cp_printers to ...
14207         * cp-tree.h: ... here.
14209         * error.c: Remove declaration of cp_printer.
14211 2000-09-20  Mark Mitchell  <mark@codesourcery.com>
14213         * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
14215 2000-09-20  Hans-Peter Nilsson  <hp@axis.com>
14217         * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
14218         users.
14220 2000-09-18  Mark Mitchell  <mark@codesourcery.com>
14222         * decl.c (start_function): Robustify.
14224 2000-09-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14226         * cp-tree.h (check_function_format): Accept a `status' parameter.
14228         * call.c, typeck.c: Updates calls to `check_function_format'.
14230 2000-09-17  Geoffrey Keating  <geoffk@cygnus.com>
14232         * decl2.c (handle_class_head): Always push some scope even
14233         in the error case.
14235 2000-09-16  Mark Mitchell  <mark@codesourcery.com>
14237         * cp-tree.h (struct cp_language_function): Remove
14238         x_scope_stmt_stack and name_declared.
14239         (current_scope_stmt_stack): Remove.
14240         (function_name_declared_p): New macro.
14241         (struct lang_decl_flags): Use c_lang_decl as a base class.
14242         (context): Remove.
14243         (struct lang_decl): Replace saved_tree with context.
14244         (DECL_FRIEND_CONTEXT): Adjust accordingly.
14245         (SET_DECL_FRIEND_CONTEXT): Likewise.
14246         (DECL_VIRTUAL_CONTEXT): Likewise.
14247         (DECL_SAVED_TREE): Remove.
14248         (C_DECLARED_LABEL_FLAG): Likewise.
14249         (cplus_expand_expr_stmt): Don't declare.
14250         (add_decl_stmt): Likewise.
14251         (add_scope_stmt): Likewise.
14252         * decl.c (mark_stmt_tree): Remove.
14253         (case_compare): Likewise.
14254         (finish_case_label): Use c_add_case_label.
14255         (init_decl_processing): Set more language-specific hooks.
14256         (build_enumerator): Fix typo in comment.
14257         (cplus_expand_expr_stmt): Remove.
14258         (mark_lang_function): Use mark_c_language_function.
14259         (lang_mark_tree): Use c_mark_lang_decl.
14260         * decl2.c: Change order of inclusion.
14261         * except.c: Likewise.
14262         * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR.  Fall
14263         back on c_expand_expr.
14264         * friend.c: Include expr.h.
14265         * init.c: Change order of inclusion.
14266         * Makefile.in: Update dependencies.
14267         * lex.h (free_lang_decl_chain): Remove.
14268         * optimize.c (maybe_clone_body): Use function_name_declared_p.
14269         * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
14270         it doesn't exist.
14271         (instantiate_decl): Use function_name_declared_p.
14272         * semantics.c (lang_expand_expr_stmt): Remove.
14273         (set_current_function_name_declared): Likewise.
14274         (current_function_name_declared): Likewise.
14275         (begin_compound_stmt): Use function_name_declared_p.
14276         (add_decl_stmt): Remove.
14277         (setup_vtbl_ptr): Use function_name_declared_p.
14278         (add_scope_stmt): Remove.
14279         (current_scope_stmt_stack): New function.
14280         (cp_expand_stmt): Don't handle SCOPE_STMTs.
14281         (expand_body): Use function_name_declared_p.
14282         * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
14283         * typeck.c: Change order of includes.
14284         (convert_sequence): Remove.
14286 2000-09-14  Joseph S. Myers  <jsm28@cam.ac.uk>
14288         * lex.c (reswords): Add _Complex.
14290 2000-09-14  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14292         * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
14294 2000-09-13  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
14296         * init.c (begin_init_stmts): Don't use // comments.
14298 2000-09-12  Jason Merrill  <jason@redhat.com>
14300         * decl.c (maybe_deduce_size_from_array_init): Set do_default for
14301         all non-extern arrays.
14303         * decl.c (grokdeclarator): Complain about 'friend T' for implicit
14304         typenames, too.  Downgrade complaint to pedwarn.
14305         (xref_tag): Warn about surprising behavior of 'friend struct T'.
14306         * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
14307         'class This::Inherited'.
14309 2000-09-12  Mark Mitchell  <mark@codesourcery.com>
14311         * decl.c (finish_case_label): Given the LABEL_DECL a
14312         DECL_CONTEXT.
14314 2000-09-12  Gabriel Dos Reis  <gdr@codesourcery.com>
14316         * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
14317         TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
14318         TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
14319         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
14320         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
14321         New macros.
14322         (sorry_for_unsupported_tree, print_scope_operator,
14323         print_left_paren, print_right_paren, print_left_bracket,
14324         print_right_bracket, print_whitespace): Likewise.
14325         (aggr_variety): Rename to class_key_or_enum.
14326         (print_type): Rename to print_type_id.
14327         (print_type_specifier_seq, print_simple_type_specifier,
14328         print_elaborated_type_specifier,
14329         print_rest_of_abstract_declarator,
14330         print_parameter_declaration_clause, print_exception_specification,
14331         print_nested_name_specifier, print_template_id,
14332         typedef_original_name,  print_template_argument_list_start,
14333         print_template_argument_list_end): New functions.
14335 2000-09-11  Gabriel Dos Reis  <gdr@codesourcery.com>
14337         * ir.texi: Add more documentation.
14339 2000-09-11  Mark Mitchell  <mark@codesourcery.com>
14341         * cp-tree.h (struct saved_scope): Remove x_function_parms.
14342         (current_function_parms): Don't define.
14343         (struct cp_language_function): Remove parms_stored.
14344         (current_function_just_assigned_this): Don't define.
14345         (current_function_parms_stored): Likewise.
14346         (static_ctors): Declare.
14347         (static_dtors): Likewise.
14348         (SF_EXPAND): Don't define.
14349         (expand_start_early_try_stmts): Remove declaration.
14350         (store_parm_decls): Likewise.
14351         * decl.c (static_ctors): Don't declare.
14352         (static_dtors): Likewise.
14353         (struct binding_level): Remove this_block.
14354         (poplevel): Remove dead code.
14355         (set_block): Likewise.
14356         (mark_binding_level): Don't mark this_block.
14357         (mark_saved_scope): Don't mark x_function_parms.
14358         (init_decl_processing): Don't add current_function_parms as a GC
14359         root.
14360         (check_function_type): Change prototype.
14361         (start_function): Remove RTL-generation code.
14362         (expand_start_early_try_stmts): Remove.
14363         (store_parm_decls): Give it internal linkage.  Remove
14364         RTL-generation code.
14365         (finish_function): Remove RTL-generation code.
14366         * decl2.c (static_ctors): Fix formatting.
14367         (static_dtors): Likewise.
14368         * method.c (use_thunk): Don't call store_parm_decls.
14369         (synthesize_method): Likewise.
14370         * optimize.c (maybe_clone_body): Likewise.
14371         * parse.y (fn.def2): Likewise.
14372         (.set_base_init): Likewise.
14373         (nodecls): Likewise.
14374         * pt.c (instantiate_decl): Likewise.
14375         * rtti.c (synthesize_tinfo_fn): Likewise.
14376         * semantics.c (genrtl_try_block): Simplify.
14377         (expand_body): Use genrtl_start_function and
14378         genrtl_finish_function.
14379         (genrtl_start_function): New function.
14380         (genrtl_finish_function): Likewise.
14382 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
14384         * error.c (cp_tree_printer, case 'P'): Append break.
14386 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
14388         * cp-tree.h (frob_opname): Declare.
14389         * parse.y (saved_scopes): New static variable.
14390         (cp_parse_init): Adjust.
14391         (do_id): If lastiddecl is NULL, do do_identifier.
14392         (operator): Save scope information.
14393         (unoperator): New reduction. Restore scope information.
14394         (operator_name): Append unoperator. Call frob_opname.
14395         * spew.c (frob_opname): Define.
14397 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
14399         * decl.c, rtti.c: Include defaults.h if not already included.
14400         Don't define the *_TYPE_SIZE macros.
14402 2000-09-09  Mark Mitchell  <mark@codesourcery.com>
14404         * cp-tree.h (push_switch): Change prototype.
14405         (check_cp_case_value): Remove declaration.
14406         (decl_constant_value): Likewise.
14407         * decl.c (struct cp_switch): Add switch_stmt and cases.
14408         (case_compare): New function.
14409         (push_switch): Set switch_stmt.  Initialize cases.
14410         (pop_switch): Clean up cases.
14411         (define_case_label): Rename to ...
14412         (finish_case_label): ... this.  Do semantic analysis for case
14413         labels here.
14414         (start_function): Correct comment.
14415         * decl2.c (check_cp_case_value): Remove.
14416         * expr.c (do_case): Remove.
14417         * pt.c (tsubst_expr): Adjust call to finish_case_label.
14418         * semantics.c (genrtl_do_poplevel): Remove declaration.
14419         (RECHAIN_STMTS): Remove.
14420         (finish_break_stmt): Use build_break_stmt.
14421         (finish_continue_stmt): Use build_continue_stmt.
14422         (finish_switch_cond): Adjust condition here, rater than in
14423         c_expand_start_case.
14424         (finish_case_label): Remove.
14425         * typeck.c (c_expand_return): Remove.
14426         (c_expand_start_case): Likewise.
14428 2000-09-07  Gabriel Dos Reis  <gdr@codesourcery.com>
14430         * ir.texi: Document type nodes.
14432 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
14434         * cp-tree.h (init_cp_semantics): Declare.
14435         (genrtl_try_block): Don't declare.
14436         (genrtl_handler): Likewise.
14437         (genrtl_catch_block): Likewise.
14438         (genrtl_ctor_stmt): Likewise.
14439         (genrtl_subobject): Likewise.
14440         (genrtl_do_poplevel): Likewise.
14441         (genrtl_named_return_value): Likewise.
14442         * lex.c (init_parse): Call init_cp_semantics.
14443         * semantics.c (genrtl_try_block): Give it internal linkage.
14444         (genrtl_handler): Likewise.
14445         (genrtl_catch_block): Likewise.
14446         (genrtl_ctor_stmt): Likewise.
14447         (genrtl_subobject): Likewise.
14448         (genrtl_do_poplevel): Likewise.
14449         (genrtl_named_return_value): Likewise.
14450         (lang_expand_stmt): Rename to ...
14451         (cp_expand_stmt): ... this.  Only handle C++-specific nodes.
14452         (init_cp_semantics): Define.
14454         * decl.c (initialize_local_var): Remove RTL-generating code.
14455         * semantics.c (genrtl_try_block): Fix formatting.
14457         Move statement-tree facilities from C++ to C front-end.
14458         * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
14459         (void_zero_node): Remove.
14460         (stmt_tree): Likewise.
14461         (scope_chain): Adjust.
14462         (language_function): Rename to cp_language_function.
14463         (cp_function_chain): Adjust.
14464         (current_stmt_tree): Remove.
14465         (last_tree): Likewise.
14466         (last_expr_type): Likewise.
14467         (struct lang_decl): Adjust.
14468         (STMT_IS_FULL_EXPR_P): Remove.
14469         (add_tree): Remove.
14470         (begin_stmt_tree): Likewise.
14471         (finish_stmt_tree): Likewise.
14472         (walk_tree_fn): Likewise.
14473         (walk_stmt_tree): Likewise.
14474         * class.c (finish_struct): Replace use of add_tree with add_stmt.
14475         * decl.c (mark_stmt_tree): Adjust type.
14476         (init_decl_processing): Don't build void_zero_node.
14477         (initialize_local_var): Adjust usage of current_stmt_tree.
14478         (finish_enum): Use add_stmt, not add_tree.
14479         (save_function_data): Adjust use of language_function.
14480         (finish_constructor_body): Use add_stmt, not add_tree.
14481         (finish_destructor_body): Likewise.
14482         (push_cp_function_context): Adjust use of language_function.
14483         (pop_cp_function_context): Likewise.
14484         (mark_lang_function): Likewise.
14485         (mark_cp_function_context): Likewise.
14486         * init.c (build_aggr_init): Adjust use of current_stmt_tree.
14487         (build_vec_init): Likewise.
14488         * semantics.c (SET_LAST_STMT): Remove.
14489         (RECHAIN_STMTS): Don't use it.
14490         (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
14491         (current_stmt_tree): Define.
14492         (add_tree): Remove.
14493         (finish_goto_stmt): Use add_stmt, not add_tree.
14494         (finish_expr_stmt): Likewise.
14495         (begin_if_stmt): Likewise.
14496         (finish_then_clause): Likewise.
14497         (begin_while_stmt): Likewise.
14498         (begin_do_stmt): Likewise.
14499         (finish_return_stmt): Likewise.
14500         (begin_for_stmt): Likewise.
14501         (finish_break_stmt): Likewise.
14502         (finish_continue_stmt): Likewise.
14503         (begin_switch_stmt): Likewise.
14504         (finish_case_label): Likewise.
14505         (begin_try_block): Likewise.
14506         (begin_function_try_block): Likewise.
14507         (begin_handler): Likewise.
14508         (begin_catch_block): Likewise.
14509         (begin_compound_stmt): Likewise.
14510         (begin_asm_stmt): Likewise.
14511         (finish_asm_stmt): Likewise.
14512         (finish_label_stmt): Likewise.
14513         (add_decl_stmt): Likewise.
14514         (finish_subobject): Likewise.
14515         (finish_decl_cleanup): Likewise.
14516         (finish_named_return_value): Likewise.
14517         (setup_vtbl_ptr): Likewise.
14518         (add_scope_stmt): Likewise.
14519         (finish_stmt_expr): Likewise.
14520         (prune_unused_decls): Remove.
14521         (begin_stmt_tree): Likewise.
14522         (finish_stmt_tree): Likewise.
14523         (prep_stmt): Adjust use of current_stmt_tree.
14524         (lang_expand_stmt): Likewise.
14525         * tree.c (statement_code_p): Remove.
14526         (cp_statement_code_p): New function.
14527         (walk_stmt_tree): Remove.
14528         (init_tree): Set lang_statement_code_p.
14530 2000-09-06  Zack Weinberg  <zack@wolery.cumb.org>
14532         Integrated preprocessor.
14534         * Make-lang.in, Makefile.in: Remove all references to input.c,
14535         gxx.gperf, and hash.h.  Add ../c-lex.o to C_OBJS.
14536         * gxx.gperf, hash.h, input.c: Delete.
14537         * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
14538         initialized properly.
14540         * class.c (fixup_pending_inline): Take a tree, not a
14541         struct pending_inline *.  All callers changed.
14542         (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
14543         RID_PROTECTED entries in ridpointers[] array here.
14544         * decl.c (duplicate_decls): Do not refer to struct
14545         pending_inline.
14546         (record_builtin_type, init_decl_processing): Use RID_MAX not
14547         CP_RID_MAX.
14548         (grokdeclarator): Use C_IS_RESERVED_WORD.
14549         * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
14550         cpplib.
14551         (grok_x_components): Do not inspect pending_inlines chain.
14553         * cp-tree.h (struct lang_identifier): Add rid_code entry.
14554         (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
14555         (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
14556         (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
14557         TIME_IDENTIFIER_FILEINFO): Kill.
14558         Update prototypes.
14559         * lex.h: Expunge cp_rid.  Rewrite RIDBIT macros to use just a
14560         single 32-bit word.
14561         * parse.y: Call do_pending_inlines unconditionally.
14562         reinit_parse_for_method is now snarf_method.  fn.defpen is no
14563         longer necessary.  Remove unnecessary <itype> annotation on
14564         SCOPE.  Do not refer to end_of_file or struct pending_inline.
14565         * semantics.c (begin_inline_definitions): Call
14566         do_pending_inlines unconditionally.
14568         * lex.c: Remove all code now shared with C front end.
14569         Initialize cpplib properly if USE_CPPLIB.  Put reserved words
14570         into the get_identifier table.  Rewrite pragma handling to
14571         work with the registry.  Move code to save tokens for later
14572         processing to spew.c.
14574         * spew.c: Rewrite everything in terms of token streams instead
14575         of text.  Move routines here from lex.c / input.c as
14576         appropriate.  GC-mark trees hanging off the pending inlines
14577         chain.
14579 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
14581         * NEWS: Mention that the named return value extension has been
14582         deprecated.
14583         * cp-tree.h (original_result_rtx): Define.
14584         (TREE_REFERENCE_EXPR): Remove.
14585         (DECL_VPARENT): Likewise.
14586         (pushdecl_nonclass_level): Likewise.
14587         (store_return_init): Likewise.
14588         (reinit_lang_specific): Likewise.
14589         (genrtl_named_return_value): Change prototype.
14590         * decl.c (original_result_rtx): Remove.
14591         (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
14592         Do not generate RTL for local variables here.
14593         (store_return_init): Remove.
14594         * semantics.c (genrtl_named_return_value): Simplify.  Fold in
14595         store_return_init.
14596         (finish_named_return_value): Adjust accordingly.  Warn that this
14597         extension is deprecated.
14598         (lang_expand_stmt): Adjust call to genrtl_named_return_value.
14600 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
14602         * pt.c (type_unification_real): Replace switch with if.
14603         (unify): Tsubst non-type parms before comparing.
14605 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
14607         * error.c (dump_typename): New function, broken out of ...
14608         (dump_type): ... here. Use it.
14609         * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
14611 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
14613         * init.c (build_offset_ref): Deal with namespace scoped
14614         TEMPLATE_ID_EXPRs.
14616 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
14618         * class.c (resolve_address_of_overloaded_function): Add
14619         explanation message.
14620         * decl.c (define_case_label): Reformat explanation.
14621         * decl2.c (finish_static_data_member_decl): Likewise.
14622         (grokfield): Likewise.
14623         * friend.c (do_friend): Likewise.
14625 2000-09-05  Zack Weinberg  <zack@wolery.cumb.org>
14627         * tree.c (walk_tree): Expose tail recursion.
14628         (walk_stmt_tree): New function.
14629         * cp-tree.h: Prototype walk_stmt_tree.
14630         * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
14631         the BLOCKs directly.  If a BLOCK has no variables after
14632         pruning, discard it.
14633         (finish_stmt_tree): Use walk_stmt_tree.  No need to save and
14634         restore the line number.
14636 2000-09-05  Mark Mitchell  <mark@codesourcery.com>
14638         * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
14639         (pt.o): Remove dependency on HTAB_H.
14640         * cp-tree.h: Include hashtab.h.
14641         (walk_tree): Change prototype.
14642         (walk_tree_without_duplicates): New function.
14643         * decl.c (check_default_argument): Use it.
14644         * optimize.c (remap_decl): Adjust calls to walk_tree.
14645         (copy_body): Likewise.
14646         (expand_calls_inline): Likewise.
14647         (calls_setjmp_p): Use walk_tree_without_duplicates.
14648         * pt.c: Don't include hashtab.h.
14649         (for_each_template_parm): Use walk_tree_without_duplicates.
14650         * semantics.c (finish-stmt_tree): Likewise.
14651         (expand_body): Likewise.
14652         * tree.c (walk_tree): Add additional parameter.
14653         (walk_tree_without_duplicates): New function.
14654         (count_trees): Use it.
14655         (verify_stmt_tree): Adjust call to walk_tree.
14656         (find_tree): Use walk_tree_without_duplicates.
14657         (no_linkage_check): Likewise.
14658         (break_out_target_exprs): Adjust call to walk_tree.
14659         (cp_unsave): Likewise.
14661 2000-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14663         * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
14664         (TEMPLATE_TEMPLATE_PARM): Adjust comment.
14665         * cp-tree.h (TYPE_BINFO): Adjust comment.
14666         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
14667         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
14668         (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
14669         (TYPE_TEMPLATE_INFO): Likewise.
14670         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
14671         * class.c (push_nested_class): Likewise.
14672         * decl.c (lookup_name_real): Likewise.
14673         (grokdeclarator): Likewise.
14674         (grok_op_properties): Likewise.
14675         (xref_tag): Likewise.
14676         (xref_basetypes): Likewise.
14677         * decl2.c (constructor_name_full): Likewise.
14678         (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
14679         (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
14680         * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
14681         (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
14682         (dump_type_suffix): Likewise.
14683         * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
14684         instead.
14685         (get_aggr_from_typedef): Likewise.
14686         * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
14687         (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
14688         (write_template_parm): Likewise.
14689         (write_template_template_parm): Check tree code instead of
14690         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
14691         * method.c (build_overload_nested_name): Add
14692         BOUND_TEMPLATE_TEMPLATE_PARM.
14693         (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
14694         * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
14695         * pt.c (convert_template_argument): Check tree code instead of
14696         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
14697         (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
14698         (for_each_template_parm): Adjust comment.
14699         (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.
14700         (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
14701         (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.  Use
14702         template_args_equal to compare template template parameter cases.
14703         * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
14704         * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
14705         instead.
14706         * tree.c (copy_template_template_parm): Decide whether to create
14707         a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
14708         (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
14709         (copy_tree_r): Likewise.
14710         * typeck.c (comptypes): Likewise.  Check tree code instead of
14711         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
14713 2000-09-04  Mark Elbrecht  <snowball3@bigfoot.com>
14715         * decl.c (finish_function): Move the code for handling functions
14716         marked with the constructor and destructor attributes inside the
14717         expand_p block.
14719 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
14721         * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
14723 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
14725         * pt.c (lookup_template_class): Remove abort.
14726         * tree.c (get_type_decl): Allow error_mark_node.
14728 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
14730         * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
14731         TEMPLATE_ID_EXPRs.
14733 2000-09-03  Mark Mitchell  <mark@codesourcery.com>
14735         * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
14736         new ABI mangling.
14738 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
14740         * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
14741         union tag mismatch error reporting.
14743 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
14745         * call.c (build_scoped_method_call): Check it is not a namespace.
14747 2000-08-30  Jason Merrill  <jason@redhat.com>
14749         * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
14751         * tree.c (bot_manip): Check TREE_CONSTANT rather than
14752         !TREE_SIDE_EFFECTS.  Call break_out_target_exprs and
14753         build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
14755         * decl.c (start_function): Always call make_function_rtl.
14757 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
14759         * semantics.c (prune_unused_decls): New function.
14760         (finish_stmt_tree): Call it via walk_tree.
14762 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
14764         * class.c (build_secondary_vtable): Constify a char *.
14765         * decl.c (init_decl_processing): Initialize function_id_node,
14766         pretty_function_id_node, and func_id_node.
14767         * input.c (struct input_source): Constify 'str'.
14768         (feed_input): Constify first argument.
14769         * mangle.c (write_identifier): Constify argument.
14770         * pt.c (mangle_class_name_for_template): Constify argument.
14772 2000-08-29  Mark Mitchell  <mark@codesourcery.com>
14774         * typeck.c (mark_addressable): Remove code that pokes around in
14775         RTL.
14777 2000-08-28  Jason Merrill  <jason@redhat.com>
14779         * lex.c (file_name_nondirectory): Move to toplev.c.
14781         * cp-tree.h (LOCAL_CLASS_P): New macro.
14782         * class.c (finish_struct_1): Use it.
14784 2000-08-27  Alex Samuel  <samuel@codesourcery.com>
14786         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
14787         (write_encoding): Pass another argument to write_name.
14788         (write_name): Add ignore_local_scope parameter.  Fix handling of
14789         local names.
14790         (write_nested_name): Use write_unqualified_name.
14791         (write_prefix): Likewise.  Skip out on FUNCTION_DECLs.
14792         (write_template_prefix): Use write_unqualified_name.
14793         (write_component): Remove.
14794         (write_local_name): Add parameter.  Use direct local entity to
14795         discriminator calculation.
14796         (write_class_enum_type): Pass another argument to write_name.
14797         (write_template_template_arg): Likewise.
14798         (make_guard_variable): Likewise.
14800 2000-08-27  Jason Merrill  <jason@redhat.com>
14802         * decl.c (pushdecl): Matching decls for local externs are found in
14803         the current level.  Propagate linkage information from previous
14804         declarations.
14806 2000-08-26  Gabriel Dos Reis  <gdr@codesourcery.com>
14808         * ir.texi (Expressions): Fix typo.
14810 2000-08-25  Greg McGary  <greg@mcgary.org>
14812         * tree.c (init_tree): Use ARRAY_SIZE.
14814 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
14816         * error.c (cp_tree_printer): Rework.
14818 2000-08-25  Mark Mitchell  <mark@codesourcery.com>
14820         * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
14821         dyn-string.o.
14822         (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
14823         (cp-demangle.o): Remove target.
14824         (dyn-string.o): Likewise.
14826         * decl.c (grokfndecl): Require that `main' return an `int'.
14827         * mangle.c (write_encoding): Don't mangle return types for
14828         conversion functions.
14830 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
14832         * error.c (tree_formatting_info): New data type.
14833         (tree_being_formatted): New macro.
14834         (tree_formatting_flags): Likewise.
14835         (put_whitespace): Likewise.
14836         (print_tree_identifier): Likewise.
14837         (print_identifier): Likewise.
14838         (cp_tree_printer, print_function_argument_list, print_declaration,
14839         print_expression, print_function_declaration,
14840         print_function_parameter, print_type, print_cv_qualifier): New
14841         functions.
14842         (init_error): Initialize lang_printer.
14844 2000-08-24  Jason Merrill  <jason@redhat.com>
14846         * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
14847         adjustment necessary.
14849 2000-08-24  Greg McGary  <greg@mcgary.org>
14851         * cp-tree.h (MAIN_NAME_P): Remove macro.
14853 2000-08-24  Gabriel Dos Reis  <gdr@codesourcery.com>
14855         * error.c (print_instantiation_context): Don't forget to flush the
14856         buffer.
14858 2000-08-23  Jason Merrill  <jason@redhat.com>
14860         * typeck.c (build_ptrmemfunc): Save the input pmf.
14862         * method.c (process_modifiers): Use same_type_p.
14864 2000-08-23  Mark Mitchell  <mark@codesourcery.com>
14866         * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
14867         * mangle.c (write_function_type): Change prototype.
14868         (write_encoding): Don't mangle return types for
14869         constructors or destructors.
14870         (write_type): Adjust call to write_function_type.
14871         * pt.c (instantiate_template): Instantiate alternate entry points
14872         when instantiating the main function.
14874 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
14876         * error.c (cp_print_error_function): Don't use embedded '\n' in
14877         output_printf.
14879 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
14881         * decl.c (init_decl_processing): Remove bogus initialization.
14882         * error.c (lang_print_error_function): Restore here.
14883         (init_error): Initialize print_error_function.
14885 2000-08-22  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
14887         * decl2.c (arg_assoc): Revert my 2000-08-11 change.
14889 2000-08-22  Gabriel Dos Reis  <gdr@codesourcery.com>
14891         * Makefile.in (error.o): Depends on diagnostic.h
14893         * cp-tree.h (problematic_instantiation_changed,
14894         record_last_problematic_instantiation, current_instantiation,
14895         print_instantiation_context): Declare.
14896         (maybe_print_template_context): Remove.
14898         * decl.c (init_decl_processing): Set print_error_function to NULL.
14899         (lang_print_error_function): Remove, since we're using a new
14900         machinery.
14902         * error.c: #include diagnostic.h
14903         (function_category): New function.
14904         (cp_diagnostic_starter): Likewise.
14905         (cp_diagnostic_finalizer): Likewise.
14906         (cp_print_error_function): Likewise.
14907         (maybe_print_instantiation_context): Likewise.
14908         (print_instantiation_full_context): Likewise.
14909         (print_instantiation_partial_context): Likewise.
14910         (print_instantiation_context): Define.
14911         (init_error): Initialize diagnostic pager and finalizer.
14913         * pt.c (problematic_instantiation_changed): Define.
14914         (record_last_problematic_instantiation): Likewise.
14915         (current_instantiation): Likewise.
14916         (maybe_print_template_context): Remove.
14917         (print_template_context): Likewise.
14918         (current_tinst_level): Make static to reflect Brendan Kehoe's
14919         change of 1995-04-13.
14920         (push_tinst_level): Call print_instantiation_context.
14922 2000-08-21  Nix  <nix@esperi.demon.co.uk>
14924         * lang-specs.h: Do not process -o or run the assembler if
14925         -fsyntax-only.
14927 2000-08-21  Joseph S. Myers  <jsm28@cam.ac.uk>
14929         * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
14930         variables.
14931         * decl2.c (lang_decode_option): Disable gettext attributes for
14932         -ansi.
14934 2000-08-21  Gabriel Dos Reis  <gdr@codesourcery.com>
14936         * lex.c (lang_init_options): Default diagnostic message maximum
14937         length to 80, when line-wrapping.
14939 2000-08-20  Mark Mitchell  <mark@codesourcery.com>
14941         * class.c (build_vtbl_initializer): Clear the entire
14942         vtbl_init_data.  Start keeping track of the functions for which we
14943         have created vcall offsets here.
14944         (dfs_build_vcall_offset_vtbl_entries): Remove.
14945         (build_vcall_offset_vtbl_entries): Reimplement.
14946         (add_vcall_offset_vtbl_entries_r): New function.
14947         (add_vcall_offset_vtbl_entries_1): Likewise.  Tweak logic for
14948         computing when vcall offsets are necessary.
14950 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
14952         * decl.c (member_function_or_else): Use cp_error ... %T.
14953         (grokdeclarator): Likewise.
14954         (start_method): Likewise.
14955         * friend.c (make_friend_class): Use cp_pedwarn ... %T.
14957 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
14959         * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
14960         TYPE_DECLs.
14962 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
14964         * cp-tree.h (PTRMEM_OK_P): New macro.
14965         (itf_ptrmem_ok): New enumeration value.
14966         * class.c (resolve_address_of_overloaded_function): Add PTRMEM
14967         argument. Diagnose implicit pointer to member.
14968         (instantiate_type): Don't diagnose implicit pointer to member
14969         here. Pass itf_ptrmem_ok if ok. Adjust calls to
14970         resolve_address_of_overloaded_function.
14971         * init.c (build_offset_ref): Set PTRMEM_OK_P.
14972         (resolve_offset_ref): Don't diagnose implicit pointer to member here.
14973         * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
14974         * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
14975         (build_unary_op): Deal with single non-static member in
14976         microsoft-land.
14978 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
14980         * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
14982 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
14984         * cp-tree.h (enum_name_string): Remove prototype.
14985         (report_case_error): Remove prototype.
14986         * cp/typeck2.c (enum_name_string): Remove.
14987         (report_case_error): Remove.
14988         * error.c (dump_expr): Deal with enum values directly.
14989         Correctly negate integer constant.
14991 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
14993         * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
14994         (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
14995         * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
14996         (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
14997         (__cxa_vec_new): Use __cxa_vec_new2.
14998         (__cxa_vec_delete): Use __cxa_vec_delete2.
15000 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
15002         * vec.cc (__cxa_vec_new): Set "C" linkage.
15003         (__cxa_vec_ctor): Likewise.
15004         (__cxa_vec_cctor): Likewise.
15005         (__cxa_vec_dtor): Likewise.
15006         (__cxa_vec_delete): Likewise.
15007         * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
15008         (__cxa_vec_ctor): Likewise.
15009         (__cxa_vec_cctor): Likewise.
15010         (__cxa_vec_dtor): Likewise.
15011         (__cxa_vec_delete): Likewise.
15013 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
15015         * class.c (instantiate_type): Reinstate local variable
15016         deleted in previous change.
15018         * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
15019         itf_no_attributes.
15021 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
15023         * cp-tree.h (instantiate_type_flags): New enumeration.
15024         (instantiate_type): Change parameter.
15025         * class.c (instantiate_type): Adjust prototype. Adjust.
15026         * call.c (standard_conversion): Adjust instantiate_type call.
15027         (reference_binding): Likewise.
15028         (build_op_delete_call): Likewise.
15029         (convert_like_real): Likewise.
15030         * cvt.c (cp_convert_to_pointer): Likewise.
15031         (convert_to_reference): Likewise.
15032         * pt.c (convert_nontype_argument): Likewise.
15033         * typeck.c (build_binary_op): Likewise.
15034         (build_ptrmemfunc): Likewise.
15035         (convert_for_assignment): Likewise.
15037 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
15039         * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
15040         (current_aggr): Define.
15041         * decl.c (grokdeclarator): Make sure a friend class is an
15042         elaborated type specifier.
15043         * parse.y (current_aggr): Remove static definition.
15044         (cp_parse_init): Adjust.
15045         (structsp): Clear and restore current_aggr.
15046         (component_decl_list): Clear current_aggr.
15048         * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
15049         aggregate tag on the typename's context.
15051         * pt.c (tsubst_friend_class): Return error_mark_node, if
15052         parms becomes NULL.
15053         (instantiate_class_template): Ignore error_mark_node friend types.
15055 2000-08-14  Nathan Sidwell  <nathan@codesourcery.com>
15057         * cvt.c (warn_ref_binding): New static function, broken out of ...
15058         (convert_to_reference): ... here. Use it.
15060 2000-08-11  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
15062         * parse.y (template_arg): Add rule for template qualified with
15063         global scope.
15065 2000-08-11  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
15067         * decl2.c (add_function): Reorganize.
15068         (arg_assoc): Do not consider function template decls.
15070 2000-08-11  Jason Merrill  <jason@redhat.com>
15072         * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
15073         looking inside.
15075 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
15077         * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
15078         (lookup_nested_tag): Likewise.
15080         * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
15081         can be produced.
15083 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
15085         * parse.y (named_complex_class_head_sans_basetype): Remove
15086         always true if.
15088 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
15090         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
15091         explicit TEMPLATE_ID_EXPR args.
15092         (build_expr_from_tree, case CALL_EXPR): Likewise.
15094 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
15096         * decl.c (check_tag_decl): Diagnose typename's which don't
15097         declare anything.
15099 2000-08-10  Nathan Sidwell  <nathan@codesourcery.com>
15101         * init.c (build_aggr_init): Reject bogus array initializers
15102         early.
15104 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
15106         * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
15107         runtime.
15108         * cp/tinfo.cc (__dynamic_cast): Likewise.
15109         * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
15111 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
15113         * cvt.c (convert_to_pointer_force): Fix error message when
15114         attempting to cast from ambiguous base.
15116 2000-08-08  Jason Merrill  <jason@redhat.com>
15118         * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
15119         (tsubst_template_arg_vector): Likewise.
15121         * decl2.c (build_anon_union_vars): Choose the largest field; don't
15122         assume that one will be as large as the union.
15124 2000-08-07  Kazu Hirata  <kazu@hxi.com>
15126         * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
15127         * decl.c (pop_labels): Likewise.
15129 2000-08-04  Jeffrey Oldham  <oldham@codesourcery.com>
15131         * inc/cxxabi.h (__pbase_type_info): Changed member names to match
15132         specifications.
15133         (__pointer_to_member_type_info): Likewise.
15134         (__base_class_info): Likewise.
15135         (__class_type_info): Likewise.
15136         (__si_class_type_info): Likewise.
15137         (__vmi_class_type_info): Likewise.
15138         * tinfo.cc (__si_class_type_info::__do_find_public_src):
15139         Changed member names to match specifications.
15140         (__vmi_class_type_info::__do_find_public_src): Likewise.
15141         (__si_class_type_info::__do_dyncast): Likewise.
15142         (__vmi_class_type_info::__do_dyncast): Likewise.
15143         (__si_class_type_info::__do_upcast): Likewise.
15144         (__vmi_class_type_info::__do_upcast): Likewise.
15145         * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
15146         (__pbase_type_info::__pointer_catch): Likewise.
15147         (__pointer_type_info::__pointer_catch): Likewise.
15148         (__pointer_to_member_type_info::__pointer_catch): Likewise.
15150 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
15152         * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
15153         * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
15154         (cc1plus): Link with $(BACKEND) and $(C_OBJS).
15156 2000-08-04  Mark Mitchell  <mark@codesourcery.com>
15158         * cp-tree.h (add_method): Change prototype.
15159         * class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
15160         Don't double the size of the method vector in the error case.
15161         (handle_using_decl): Adjust call to add_method.
15162         (add_implicitly_declared_members): Likewise.
15163         (clone_function_decl): Likewise.
15164         * decl2.c (check_classfn): Likewise.
15165         * semantics.c (finish_member_declaration): Likewise.
15167 2000-08-04  Joseph S. Myers  <jsm28@cam.ac.uk>
15169         * decl.c (flag_isoc94): New variable.
15171 2000-08-02  Jason Merrill  <jason@redhat.com>
15173         * pt.c (do_type_instantiation): Add complain parm; don't complain
15174         if called recursively.
15175         * cp-tree.h, parse.y: Adjust.
15177 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
15179         * decl2.c: Silently ignore -Wstrict-prototypes; warn about
15180         -Wno-strict-prototypes.
15182         * g++spec.c: Adjust type of second argument to
15183         lang_specific_driver, and update code as necessary.
15185         * cp-tree.h: Don't prototype min_precision here.
15186         (my_friendly_assert): Cast expression to void.
15187         * semantics.c (do_poplevel): Initialize scope_stmts.
15189 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
15191         * cp-tree.h (DECL_NEEDED_P): Tweak.
15193 2000-07-28  Jason Merrill  <jason@redhat.com>
15195         * lang-specs.h: Use %i in rule for .ii files.
15197 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
15199         * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
15201 2000-07-30  Mark Mitchell  <mark@codesourcery.com>
15203         Allow indirect primary bases.
15204         * cp-tree.h (struct lang_type): Remove vfield_parent.  Add
15205         primary_base.
15206         (CLASSTYPE_VFIELD_PARENT): Remove.
15207         (CLASSTYPE_PRIMARY_BINFO): Reimplement.
15208         (BINFO_PRIMARY_BINFO): Remove.
15209         (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
15210         (BINFO_VBASE_PRIMARY_P): Likewise.
15211         (BINFO_PRIMARY_BASE_OF): New macro.
15212         (BINFO_INDIRECT_PRIMARY_P): Likewise.
15213         (get_primary_binfo): New function.
15214         * decl.c (lang_mark_tree): Make lang_type::primary_base.
15215         * class.c (vcall_offset_data_s): Rename to ...
15216         (vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
15217         and add ctor_vtbl_p.
15218         (get_derived_offset): Use get_primary_binfo.
15219         (dfs_mark_primary_bases): Adjust handling of virtual primary
15220         bases.
15221         (mark_primary_bases): Likewise.
15222         (set_primary_base): Take a binfo, not an integer, as a
15223         representation of the primary base.
15224         (indirect_primary_base_p): Remove.
15225         (determine_primary_base): Adjust for indirect primary bases.
15226         (dfs_find_final_overrider): Fix typo in coment.
15227         (update_vtable_entry_for_fn): Use get_primary_binfo.
15228         (layout_nonempty_base_or_field): Tweak.
15229         (build_base_fields): Adjust for new primary base semantics.
15230         (dfs_propagate_binfo_offsets): Remove.
15231         (propagate_binfo_offsets): Rewrite.
15232         (dfs_set_offset_for_shared_vbases): Remove.
15233         (layout_virtual_bases): Don't use it.
15234         (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
15235         ABI.
15236         (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
15237         CLASSTYPE_VFIELD_PARENT.
15238         (dfs_get_primary_binfo): New function.
15239         (get_primary_binfo): Likewise.
15240         (dump_class_hierarchy_r): Tweak printing of primary bases.
15241         (build_vtbl_initializer): Fix typo in comments.  Use
15242         vtbl_init_data.
15243         (build_vcall_and_vbase_vtbl_entries): Likewise.
15244         (build_vbaes_offset_vtbl_entries): Likewise.
15245         (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
15246         BV_VCALL_INDEX to handle indirect primary bases.
15247         (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
15248         (build_rtti_vtbl_entries): Likewise.
15249         * search.c (get_shared_vbase_if_not_primary): Tweak.
15250         (find_vbase_instance): Likewise.
15251         (binfo_for_vtable): Simplify.
15252         * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
15253         (make_binfo): Make it have 11 entries.
15255 2000-07-30  Alex Samuel  <samuel@codesourcery.com>
15257         * mangle.c (DECL_TEMPLATE_ID_P): Remove.
15258         (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
15259         ascertaining primaryness.
15260         (G): Remove template_args.
15261         (decl_is_template_id): New function.
15262         (write_encoding): Use decl_is_template_id.
15263         (write_name): Likewise.  Handle type_decls.  Get main variant of
15264         type decls.
15265         (write_nested_name): Likewise.
15266         (write_prefix): Likewise.
15267         (write_template_prefix): Likewise.
15268         (write_special_name_constructor): Remove defunct production from
15269         comment.
15270         (write_bare_function_type): Remove comment about absent parameter.
15271         (write_template_template_arg): Add missing grammar production to
15272         comment.
15274 2000-07-27  Jason Merrill  <jason@redhat.com>
15276         * decl.c (duplicate_decls): If common_type produces a non-typedef
15277         type for a typedef, just use the old type.
15279 2000-07-27  Mark Mitchell  <mark@codesourcery.com>
15281         * cp-tree.h (function_depth): Declare.
15282         (verify_stmt_tree): Likewise.
15283         (find_tree): Likewise.
15284         * decl.c (function_depth): Give it external linkage.
15285         * optimize.c (optimize_function): Increment and decrement it.
15286         * tree.c (verify_stmt_tree_r): New function.
15287         (verify_stmt_tree): Likewise.
15288         (find_tree_r): Likewise.
15289         (find_tree): Likewise.
15291 2000-07-27  Jason Merrill  <jason@redhat.com>
15293         * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
15294         TYPE_PTRMEMFUNC_P.
15295         * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
15297 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
15299         * decl.c (start_cleanup_fn): Mark the function as `inline'.
15300         * decl2.c (get_guard): Call cp_finish_decl, not
15301         rest_of_decl_compilation, for local guards.
15302         * lex.c (do_identifier): Remove unused variable.
15304 2000-07-26      Marc Espie <espie@cvs.openbsd.org>
15306         * parse.y:  Add missing ';'.
15308 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
15310         * parse.y (empty_parms): Use `()', not `(...)', when in the scope
15311         of `extern "C++"'.
15313 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
15315         Kill strict_prototype. Backwards compatibility only for
15316         non NO_IMPLICIT_EXTERN_C systems.
15317         * cp-tree.h (flag_strict_prototype): Remove.
15318         (strict_prototype): Remove.
15319         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
15320         * decl.c (maybe_push_to_top_level): Adjust.
15321         (pop_from_top_level): Adjust.
15322         (decls_match): Only allow sloppy parm matching for ancient
15323         system headers.
15324         (init_decl_processing): Adjust.
15325         (grokdeclarator): Adjust.
15326         * decl2.c (flag_strict_prototype): Remove.
15327         (strict_prototype): Remove.
15328         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
15329         (lang_f_options): Remove "strict-prototype".
15330         (unsupported-options): Add "strict-prototype".
15331         * lex.c (do_identifier): Adjust.
15332         (do_scoped_id): Adjust.
15333         * parse.y (empty_parms): Adjust.
15334         * class.c (push_lang_context): Adjust.
15335         (pop_lang_context): Adjust.
15336         * typeck.c (comp_target_parms): Adjust.
15338 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
15340         * decl.c (poplevel): Deal with anonymous variables at for scope.
15341         (maybe_inject_for_scope_var): Likewise.
15343 2000-07-25  Zack Weinberg  <zack@wolery.cumb.org>
15345         * decl.c: Remove all signal handling code, now done in toplev.c.
15347 2000-07-23  Mark Mitchell  <mark@codesourcery.com>
15349         * decl.c (make_rtl_for_nonlocal_decl): Rework.
15351         * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
15352         correctly.
15354 2000-07-20  Zack Weinberg  <zack@wolery.cumb.org>
15356         * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
15357         Define my_friendly_assert and my_friendly_abort as macros
15358         which may call friendly_abort.  Prototype friendly abort, not
15359         my_friendly_abort or my_friendly_assert.
15360         * decl.c (signal_catch): Report the signal caught in the error
15361         message.  Call fatal directly.
15362         * typeck2.c (ack, my_friendly_assert): Delete.
15363         (my_friendly_abort): Rename to friendly_abort.  Expect file,
15364         line, and function parameters.  Report the abort code, then
15365         call fancy_abort.  Do not mask an abort if errors have
15366         already occurred.
15368 2000-07-18  Nathan Sidwell  <nathan@codesourcery.com>
15370         * typeck.c (comp_target_parms): Remove obsolete parameter.
15371         (comp_target_types): Adjust.
15373 2000-07-17  Jason Merrill  <jason@redhat.com>
15375         * typeck.c (mark_addressable): Never set TREE_USED.
15376         * call.c (build_call): Don't abort on calls to library functions
15377         that have been declared normally.
15379         * typeck.c (build_binary_op): Fix grammar in warning.
15381         * exception.cc (__eh_free): Fix prototype.
15383         * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
15385         * decl.c (pushdecl): Handle seeing an OVERLOAD in
15386         IDENTIFIER_NAMESPACE_VALUE.
15388 2000-07-16  Mark Mitchell  <mark@codesourcery.com>
15390         * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
15391         * method.c (use_thunk): Correct handling of vcall offsets.
15393 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
15395         * .cvsignore: parse.h and parse.c have no cp- prefix.
15397 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
15399         * .cvsignore: New file.
15401 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
15403         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
15405 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
15407         * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
15408         * parse.c: Remove.
15409         * parse.h: Likewise.
15411 2000-07-11  Mark Mitchell  <mark@codesourcery.com>
15413         * class.c (layout_class_type): Add pointers to virtual bases after
15414         base classes under the old ABI.
15416 2000-07-10  Benjamin Chelf  <chelf@codesourcery.com>
15418         * semantics.c (finish_for_stmt): Remove call to emit_line_note.
15419         (finish_continue_stmt): Likewise.
15420         (begin_for_stmt): Remove call to note_level_for_for.
15421         (finish_goto_stmt): Change call from build_min_nt
15422         to build_stmt.
15423         (finish_expr_stmt): Likewise.
15424         (begin_if_stmt): Likewise.
15425         (begin_while_stmt): Likewise.
15426         (finish_while_stmt): Likewise.
15427         (finish_return_stmt): Likewise.
15428         (begin_for_stmt): Likewise.
15429         (finish_for_stmt): Likewise.
15430         (finish_break_stmt): Likewise.
15431         (begin_switch_stmt): Likewise.
15432         (finish_case_label): Likewise.
15433         (genrtl_try_block): Likewise.
15434         (begin_try_block): Likewise.
15435         (begin_handler): Likewise.
15436         (begin_compound_stmt): Likewise.
15437         (finish_asm_stmt): Likewise.
15438         (finish_label_stmt): Likewise.
15439         (add_decl_stmt): Likewise.
15440         (finish_subobject): Likewise.
15441         (finish_decl_cleanup): Likewise.
15442         (finish_named_return_value): Likewise.
15443         (setup_vtbl_ptr): Likewise.
15444         (add_scope_stmt): Likewise.
15445         * decl.c (finish_constructor_body): Likewise.
15446         (finish_destructor_body): Likewise.
15447         * optimize.c (copy_body_r): Likewise.
15448         (initialize_inlined_parameters): Likewise.
15449         (declare_return_variable): Likewise.
15450         (expand_call_inline): Likewise.
15452 2000-07-10  Jakub Jelinek  <jakub@redhat.com>
15454         * semantics.c (expand_body): Sync interface information
15455         at the end of function body expansion.
15457 2000-07-09  Jason Merrill  <jason@redhat.com>
15459         * init.c (build_new_1): Bail early if the call to new fails.
15461         * decl.c (compute_array_index_type): Check specifically for
15462         an INTEGER_CST, not just TREE_CONSTANT.
15464         * decl.c (duplicate_decls): Don't call duplicate_decls on
15465         the DECL_TEMPLATE_RESULT.
15466         (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
15467         codes.
15469         * error.c (dump_template_bindings): Don't crash if we had an
15470         invalid argument list.
15472         * typeck.c (c_expand_start_case): Do narrowing here.
15473         * semantics.c (finish_switch_cond): Not here.
15475 2000-07-09  Hidvegi Zoli  <hzoli@austin.ibm.com>
15477         * parse.y (asm_clobbers): Do string concatenation.
15479 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
15481         * decl.c (pushtag): Don't put local classes in template functions
15482         on the local_classes list.
15484 2000-07-04  Scott Snyder  <snyder@fnal.gov>
15486         * decl2.c (get_guard): Add missing return for old ABI local
15487         variable case.
15489 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
15491         * cp-tree.h (char_type_p): New function.
15492         * decl.c (init_decl_processing): Don't initialize
15493         signed_wchar_type_node or unsigned_wchar_type_node.
15494         (complete_array_type): Handle brace-enclosed string-constants.
15495         * rtti.c (emit_support_tinfos): Remove #if 0'd code.
15496         * tree.c (char_type_p): New function.
15497         * typeck2.c (digest_init): Use char_type_p.
15499 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
15501         * pt.c (tsubst): Don't layout type, if it's error_mark.
15503 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
15505         * pt.c (instantiate_pending_templates): Reset template level.
15507 2000-07-05  Jason Merrill  <jason@redhat.com>
15509         * call.c (joust): Don't complain about `operator char *()' beating
15510         `operator const char *() const'.
15512 2000-07-04  scott snyder  <snyder@fnal.gov>
15513             Jason Merrill  <jason@redhat.com>
15515         * repo.c (repo_get_id): Handle the case where a class with virtual
15516         bases has a null TYPE_BINFO_VTABLE.
15518 2000-07-04  Kevin Buhr  <buhr@stat.wisc.edu>
15519             Jason Merrill  <jason@redhat.com>
15521         * parse.y (member_init): Just pass in the type.
15522         * init.c (expand_member_init): Handle getting a type.
15524 2000-07-04  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
15525             Jason Merrill  <jason@redhat.com>
15527         * decl.c (finish_function): Warn if a function has no return
15528         statement.
15529         Suggested by Andrew Koenig.
15530         * typeck.c (check_return_expr): Do set current_function_returns_value
15531         if we got an error_mark_node.
15533 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
15535         * decl2.c (push_decl_namespace): Push the original namespace.
15537 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
15539         * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
15540         * semantics.c (begin_class_definition): Clear it.
15542 2000-07-02  Benjamin Chelf  <chelf@codesourcery.com>
15544         * cp-tree.h (genrtl_goto_stmt): Remove declaration.
15545         (genrtl_expr_stmt): Likewise.
15546         (genrtl_decl_stmt): Likewise.
15547         (genrtl_if_stmt): Likewise.
15548         (genrtl_while_stmt): Likewise.
15549         (genrtl_do_stmt): Likewise.
15550         (genrtl_return_stmt): Likewise.
15551         (genrtl_for_stmt): Likewise.
15552         (genrtl_break_stmt): Likewise.
15553         (genrtl_continue_stmt): Likewise.
15554         (genrtl_scope_stmt): Likewise.
15555         (genrtl_switch_stmt): Likewise.
15556         (genrtl_case_label): Likewise.
15557         (genrtl_begin_compound_stmt): Likewise.
15558         (genrtl_finish_compound_stmt): Likewise.
15559         (genrtl_compound_stmt): Likewise.
15560         (genrtl_asm_stmt): Likewise.
15562         * init.c (begin_init_stmts): Remove call to
15563         genrtl_begin_compound_stmt.
15564         (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
15566         * semantics.c (lang_expand_stmt): Changed call to
15567         genrtl_compound_stmt to ignore return value.
15569 2000-07-02  Mark Mitchell  <mark@codesourcery.com>
15571         * mangle.c (canonicalize_for_substitution): Return the canonical
15572         variant of a type.
15574         * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
15575         TYPE_DECL.
15576         * typeck.c (commonparms): Remove obstack manipulations.
15578 2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>
15580         * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
15582         * Makefile.in (OBJS): Added ../c-semantics.o.
15583         (OBJDEPS): Likewise.
15585         * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
15586         ../c-common.h.
15587         (struct stmt_tree): Added comment.
15588         (current_function_name_declared): Removed.
15589         (stmts_are_full_exprs_p): Likewise.
15590         (genrtl_do_pushlevel): Likewise.
15591         (genrtl_clear_out_block): Likewise.
15592         (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
15593         (DECL_ANON_UNION_ELEMS): Likewise.
15594         (emit_local_var): Likewise.
15595         (make_rtl_for_local_static): Likewise.
15596         (do_case): Likewise.
15597         (expand_stmt): Likewise.
15598         (genrtl_decl_cleanup): Likewise.
15599         (c_expand_asm_operands): Likewise.
15600         (c_expand_return): Likewise.
15601         (c_expand_start_case): Likewise.
15603         * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
15604         (emit_local_var): Likewise.
15605         (initialize_local_var): Change reference to
15606         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
15607         Change reference to stmts_are_full_exprs_p to
15608         current_stmt_tree->stmts_are_full_exprs_p.
15609         (push_cp_function_context): Likewise.
15611         * expect.c (expand_throw): Change reference to
15612         stmts_are_full_exprs_p.
15614         * init.c (build_aggr_init): Change reference to
15615         stmts_are_full_exprs_p.
15616         (build_vec_init): Likewise.
15618         * optimize.c (maybe_clone_body): Change reference to
15619         current_function_name_declared to
15620         cp_function_chain->name_declared.
15622         * pt.c (instantiate_decl): Change reference to
15623         current_function_name_declared to
15624         cp_function_chain->name_declared.
15626         * semantics.c (expand_cond): Moved declaration to c-common.h.
15627         (genrtl_do_pushlevel): Moved to c-semantics.c.
15628         (genrtl_clear_out_block): Likewise.
15629         (genrtl_goto_stmt): Likewise.
15630         (genrtl_expr_stmt): Likewise.
15631         (genrtl_decl_stmt): Likewise.
15632         (gerntl_if_stmt): Likewise.
15633         (genrtl_while_stmt): Likewise.
15634         (genrtl_do_stmt): Likewise.
15635         (genrtl_return_stmt): Likewise.
15636         (genrtl_for_stmt): Likewise.
15637         (genrtl_break_stmt): Likewise.
15638         (genrtl_continue_stmt): Likewise.
15639         (genrtl_scope_stmt): Likewise.
15640         (genrtl_switch_stmt): Likewise.
15641         (genrtl_case_label): Likewise.
15642         (genrtl_begin_compound_stmt): Likewise.
15643         (genrtl_finish_compound_stmt): Likewise.
15644         (genrtl_compound_stmt): Likewise.
15645         (genrtl_asm_stmt): Likewise.
15646         (genrtl_decl_cleanup): Likewise.
15647         (expand_cond): Likewise.
15648         (expand_stmt): Renamed to ...
15649         (lang_expand_stmt): ... this.
15650         (lang_expand_expr_stmt): Initialize.
15651         (set_current_function_name_declared): Likewise.
15652         (stmts_are_full_exprs_p): Likewise.
15653         (current_function_name_declared): Likewise.
15654         (anon_aggr_type_p): Likewise.
15655         (do_poplevel): Change reference to
15656         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
15657         Change reference to stmts_are_full_exprs_p to
15658         current_stmt_tree->stmts_are_full_exprs_p.
15659         (add_tree): Likewise.
15660         (finish_expr_stmt): Likewise.
15661         (prep_stmt): Likewise.
15662         (lang_expand_stmt): Likewise.
15663         (begin_compound_stmt): Change reference to
15664         current_function_name_declared to
15665         cp_function_chain->name_declared and call to
15666         current_function_name_declared().
15667         (setup_vtbl_ptr): Likewise.
15668         (genrtl_do_poplevel): Removed.
15670 2000-06-30  Jason Merrill  <jason@redhat.com>
15672         * init.c (init_init_processing): Go back to aligning like
15673         double_type_node for old ABI.
15674         (get_cookie_size): Make cookie larger if we get a type that needs
15675         more alignment.
15676         (build_vec_delete): Call it.
15678         * typeck.c (qualify_type_recursive): New fn.
15679         (composite_pointer_type): Use it.
15680         (build_binary_op): Use composite_pointer_type.
15682 2000-06-24  Carlos O'Ryan  <coryan@cs.wustl.edu>
15683             Jason Merrill  <jason@redhat.com>
15685         * typeck.c (check_return_expr): Don't complain about returning
15686         NULL from operator new if -fcheck-new.
15687         * cp-tree.h: Declare flag_check_new here.
15688         * init.c: Not here.
15690 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
15692         * mangle.c (find_substitution): Use same_type_p.
15693         (write_encoding): Don't check for substitutions.
15695 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
15697         * parse.y (expr_no_comma_rangle): New non-terminal.
15698         (template_parm): Use it for default parameter case.
15699         (template_arg): Use it.
15700         (expr_no_commas): Remove commented out undefined extensions.
15701         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
15702         * parse.h, parse.c: Rebuilt.
15704 2000-06-30  Mark Mitchell  <mark@codesourcery.com>
15706         * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
15707         (finish_asm_stmt): Do it here, instead.
15709         * cp-tree.h (ridpointers): Don't declare.
15710         * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
15711         (record_builtin_java_type): Likewise.
15712         (init_decl_processing): Likewise.
15713         * lex.c: Move inclusion of lex.h.
15714         (ridpointers): Don't define.
15715         (init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
15716         RID_MAX.
15717         * lex.h (enum rid): Rename to ...
15718         (enum cp_rid): ... this.
15719         (ridpointers): Don't declare.
15720         * parse.y: Move inclusion of lex.h.
15721         * parse.c: Regenerated.
15722         * spew.c: Move inclusion of lex.h.
15724         * cp-tree.h (struct language_function): Remove temp_name_counter.
15725         (temp_name_counter): Remove.
15726         (get_temp_name): Change prototype.
15727         (get_guard): New function.
15728         (get_guard_cond): Likewise.
15729         (set_guard): Likewise.
15730         * cvt.c (build_up_reference): Adjust call to get_temp_name.
15731         * decl.c (expand_static_init): Use get_guard and friends to
15732         implement guard variables.
15733         * decl2.c (get_temp_name): Assume that the variables created are
15734         always static.
15735         (get_sentry): Rename to ...
15736         (get_guard): ... this.  Implement new ABI guard variables.
15737         (get_guard_bits): New function.
15738         (get_guard_cond): Likewise.
15739         (set_guard): Likewise.
15740         (start_static_initialization_or_destruction): Use them.
15741         (do_static_initialization): Replace sentry with guard throughout.
15742         (do_static_destruction): Likewise.
15743         * init.c (create_temporary_var): Add comment.
15745 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
15747         * mangle.c (find_substitution): Use same_type_p.
15748         (write_encoding): Don't check for substitutions.
15750 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
15752         * parse.y (expr_no_comma_rangle): New non-terminal.
15753         (template_parm): Use it for default parameter case.
15754         (template_arg): Use it.
15755         (expr_no_commas): Remove commented out undefined extensions.
15756         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
15757         * parse.h, parse.c: Rebuilt.
15759 2000-06-29  Mark Mitchell  <mark@codesourcery.com>
15761         * cp-tree.h (flag_const_strings): Remove.
15762         (warn_parentheses): Likewise.
15763         (warn_format): Likewise.
15764         (common_type): Likewise.
15765         (default_conversion): Likewise.
15766         (build_binary_op): Likewise.
15767         (cp_build_binary_op): New macro.
15768         * call.c (build_new_op): Use cp_build_binary_op instead of
15769         build_binary_op.
15770         * class.c (build_vtable_entry_ref): Likewise.
15771         * decl.c (expand_static_init): Likewise.
15772         (compute_array_index_type): Likewise.
15773         (build_enumerator): Likewise.
15774         * decl2.c (delete_sanity): Likewise.
15775         (start_static_initialization_or_destruction): Likewise.
15776         * error.c (dump_type_suffix): Likewise.
15777         * init.c (resolve_offset_ref): Likewise.
15778         (build_new): Likewise.
15779         (build_new_1): Likewise.
15780         (build_vec_delete_1): Likewise.
15781         (build_vec_init): Likewise.
15782         (build_delete): Likewise.
15783         * rtti.c (synthesize_tinfo_fn): Likewise.
15784         (synthesize_tinfo_var): Likewise.
15785         * search.c (expand_upcast_fixups): Likewise.
15786         (fixup_all_virtual_upcast_offsets): Likewise.
15787         * typeck.c (build_array_ref): Likewise.
15788         (get_member_function_from_ptrfunc): Likewise.
15789         (build_binary_op): Add parameter.
15790         (pointer_int_sum): Use cp_build_binary_op.
15791         (pointer_diff): Likewise.
15792         (build_modify_expr): Likewise.
15793         (get_delta_difference): Likewise.
15794         (build_ptrmemfunc): Likewise.
15796 2000-06-29  Nathan Sidwell  <nathan@codesourcery.com>
15798         * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
15799         * decl.c (create_implicit_typedef): Adjust.
15800         * decl2.c (build_artificial_parm): Adjust.
15801         * method.c (implicitly_declare_fn): Adjust.
15802         * pt.c (push_inline_template_parms_recursive): Adjust.
15803         (process_template_parm): Adjust.
15804         (overloaded_template_name): Adjust.
15805         * semantics.c (finish_template_template_parm): Adjust.
15807 2000-06-28  Mark Mitchell  <mark@codesourcery.com>
15809         * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
15810         * class.c (update_vtable_entry_for_fn): Correct logic for deciding
15811         where to emit thunks.
15812         (build_vtt): Adjust call to build_vtt_inits.
15813         (build_vtt_inits): Add parameter to indicate whether or not
15814         sub-VTTs for virtual bases should be included.  Adjust handling of
15815         construction vtables.
15816         (get_matching_base): New function.
15817         (dfs_build_vtt_inits): Rename to ...
15818         (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
15819         construction vtables.
15820         (dfs_fixup_binfo_vtbls): Likewise.
15821         (build_ctor_vtbl_groups): Build construction vtables for virtual
15822         bases, too.
15823         (accumulate_vtbl_inits): Tweak logic for deciding whether or not
15824         to build construction vtbls.
15825         (dfs_accumulate_vtbl_inits): Adjust handling of
15826         construction vtables.
15828         * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
15829         types correctly.
15831 2000-06-27  Mark Mitchell  <mark@codesourcery.com>
15833         * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
15835 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
15837         * search.c (hides): Remove.
15838         (is_subobject_of_p): Add most_derived parameter. Use
15839         CANONICAL_BINFO.
15840         (lookup_field_queue_p): Adjust.
15841         (lookup_field_r): Adjust.
15843 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
15845         * decl2.c (handle_class_head): Bash typedefs to the type's main
15846         decl.
15848 2000-06-25  Mark Mitchell  <mark@codesourcery.com>
15850         * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
15851         (begin_global_stmt_expr): ... this.
15852         (genrtl_finish_stmt_expr): Rename to ...
15853         (finish_global_stmt_expr): ... this.
15854         * init.c (begin_init_stmts): Adjust calls.
15855         (finish_init_stmts): Likewise.
15856         * semantics.c (genrtl_begin_stmt_expr): Rename to ...
15857         (begin_global_stmt_expr): ... this.
15858         (genrtl_finish_stmt_expr): Rename to ...
15859         (finish_global_stmt_expr): ... this.
15861 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
15863         * search.c (lookup_member): Fix typo in comment.
15865 2000-06-24  Jason Merrill  <jason@redhat.com>
15867         * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
15868         (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
15870 2000-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
15872         * parse.y (complex_direct_notype_declarator): Support global_scope.
15873         * Makefile.in: Adjust conflict count.
15875 2000-06-23  Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
15877         * parse.y (template_arg): Convert TEMPLATE_DECL
15878         that is a template template parameter to
15879         TEMPLATE_TEMPLATE_PARM here.
15881         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
15882         * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
15883         (copy_template_template_parm): Adjust prototype.
15884         * decl.c (grokdeclarator): Remove dead code.
15885         * pt.c (process_template_parm): Tidy.
15886         (lookup_template_class): Construct nodes in
15887         copy_template_template_parm.
15888         (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
15889         lookup_template_class.  Use TYPE_TI_TEMPLATE.
15890         * tree.c (copy_template_template_parm): Add NEWARGS
15891         parameter.
15892         (mapcar): Adjust call to copy_template_template_parm.
15893         * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
15894         * method.c (build_template_template_parm_names): Change error
15895         code to avoid compilation warning.
15897         * gxxint.texi: Document template template parameter
15898         name mangling.
15900 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
15902         * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
15903         (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
15904         (cp-demangle.o): New rule.
15905         (dyn-string.o): Likewise.
15906         * inc/cxxabi.h (__cxa_demangle): New declaration.
15908 2000-06-22  Mark Mitchell  <mark@codesourcery.com>
15910         * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
15911         (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
15912         (lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
15913         a tree, not an int.
15914         (THUNK_GENERATE_WITH_VTABLE_P): New macro.
15915         (make_thunk): Change prototype.
15916         (emit_thunk): Rename to use_thunk.
15917         (mangle_thunk): Change prototype.
15918         * class.c (get_derived_offset): Simplify.
15919         (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
15920         BV_GENERATE_THUNK_WITH_VTABLE_P.
15921         (build_primary_vtable): Simplify.
15922         (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
15923         (dfs_find_base): Remove.
15924         (update_vtable_entry_for_fn): Correct bug in finding the base
15925         where a virtual function was first declared.  Figure out whether
15926         or not to emit a vcall-thunk with the vtables in which it appears.
15927         Correct logic for deciding whether to use an ordinary thunk, or a
15928         vcall thunk.
15929         (finish_struct_1): Remove unnecssary code.
15930         (build_vtbl_initializer): Use ssize_int for the running counter of
15931         negative indices.
15932         (build_vtbl_initializer): Only use vcall thunks where necessary.
15933         Mark thunks as needing to be emitted with their vtables, or not.
15934         (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
15935         indices.  Use size_binop.
15936         (dfs_build_vcall_offset_vtbl_entries): Don't rely on
15937         BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
15938         size_binop.
15939         (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
15940         (build_vtable_entry): Mark thunks as needing to be emitted with
15941         their vtables, or not.
15942         * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
15943         * decl2.c (mark_vtable_entries): Use use_thunk instead of
15944         emit_thunk.
15945         * dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
15946         information.
15947         * error.c (dump_expr): Use BV_FN.
15948         * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
15949         not an int.
15950         * method.c (make_thunk): Likewise.
15951         (emit_thunk): Rename to use_thunk.  Allow callers to decide
15952         whether or not to actually emit the thunk.  Adjust for changes in
15953         representation of vcall offsets.
15954         * search.c (dfs_get_pure_virtuals): Use BV_FN.
15955         * semantics.c (emit_associated_thunks): New function.
15956         (expand_body): Use it.
15957         * ir.texi: Adjust decriptions of thunks.
15959 2000-06-22  Jason Merrill  <jason@redhat.com>
15961         * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
15962         (tsubst_friend_function): Copy it here.
15964         * decl.c (grok_op_properties): Fix typo.
15966         * decl2.c (delete_sanity): Clarify warning, avoid failure on
15967         deleting void*.
15969         * pt.c (check_explicit_specialization): Clarify error.
15971         * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
15972         an old OVERLOAD when we're declaring a non-function.
15973         (pushdecl, destroy_local_var): Check for error_mark_node.
15974         (warn_extern_redeclared_static): Also bail early if
15975         we're a CONST_DECL.
15976         (push_overloaded_decl): Ignore an old error_mark_node.
15978 2000-06-22  Nathan Sidwell  <nathan@codesourcery.com>
15980         * call.c (build_x_va_arg): Check if in a template decl.
15981         * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
15983 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15985         * class.c (push_lang_context): TYPE_NAME gets you to the Java
15986         types DECLs.
15987         * decl.c (check_goto): Computed gotos assumed OK.
15989 2000-06-20  Jason Merrill  <jason@redhat.com>
15991         * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
15992         for which we don't need to look for instantiations.
15994 2000-06-21  Nathan Sidwell  <nathan@codesourcery.com>
15996         * parse.y (program): Always call finish_translation_unit.
15997         * parse.c, parse.h: Rebuilt.
15999 2000-06-20  Zack Weinberg  <zack@wolery.cumb.org>
16001         * method.c: Don't include hard-reg-set.h.
16003 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
16005         * rtti.c (get_base_offset): Cope when vbase field is in a base.
16007 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
16009         * call.c (build_conditional_expr): Use VOID_TYPE_P.
16010         * cvt.c (cp_convert_to_pointer): Likewise.
16011         (convert_to_void): Likewise.
16012         * error.c (dump_expr): Likewise.
16013         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
16014         * init.c (build_delete): Likewise.
16015         * method.c (emit_thunk): Likewise.
16016         * optmize.c (declare_return_variable): Likewise.
16017         * rtti.c (get_tinfo_decl_dynamic): Likewise.
16018         (get_typeid): Likewise.
16019         (build_dynamic_cast_1): Likewise.
16020         * typeck.c (composite_pointer_type): Likewise.
16021         (common_type): Likewise.
16022         (build_indirect_ref): Likewise.
16023         (build_binary_op): Likewise.
16024         (build_x_compound_expr): Likewise.
16025         (check_return_expr): Likewise.
16026         * typeck2.c (add_exception_specifier): Likewise.
16028         * mangle.c (write_method_parms): Use direct comparison for end
16029         of parmlist.
16031 2000-06-19  Benjamin Chelf  <chelf@codesourcery.com>
16033         * cp-tree.h (genrtl_try_block): Declare function.
16034         (genrtl_handler): Likewise.
16035         (genrtl_catch_block): Likewise.
16036         (genrtl_ctor_stmt): Likewise.
16037         (genrtl_subobject): Likewise.
16038         (genrtl_decl_cleanup): Likewise.
16039         (genrtl_do_poplevel): Likewise.
16040         (genrtl_do_pushlevel): Likewise.
16041         (genrtl_clear_out_block): Likewise.
16042         (genrtl_goto_stmt): Likewise.
16043         (genrtl_expr_stmt): Likewise.
16044         (genrtl_decl_stmt): Likewise.
16045         (genrtl_if_stmt): Likewise.
16046         (genrtl_while_stmt): Likewise.
16047         (genrtl_do_stmt): Likewise.
16048         (genrtl_return_stmt): Likewise.
16049         (genrtl_for_stmt): Likewise.
16050         (genrtl_break_stmt): Likewise.
16051         (genrtl_continue_stmt): Likewise.
16052         (genrtl_scope_stmt): Likewise.
16053         (genrtl_switch_stmt): Likewise.
16054         (genrtl_case_label): Likewise.
16055         (genrtl_begin_compound_stmt): Likewise.
16056         (genrtl_finish_compound_stmt): Likewise.
16057         (genrtl_compound_stmt): Likewise.
16058         (genrtl_asm_stmt): Likewise.
16059         (genrtl_named_return_value): Likewise.
16060         (genrtl_begin_stmt_expr): Likewise.
16061         (genrtl_finish_stmt_expr): Likewise.
16062         (finish_for_stmt): Removed first argument.
16063         (finish_switch_stmt): Likewise.
16065         * semantics.c (genrtl_try_block): Define function.
16066         (genrtl_handler): Likewise.
16067         (genrtl_catch_block): Likewise.
16068         (genrtl_ctor_stmt): Likewise.
16069         (genrtl_subobject): Likewise.
16070         (genrtl_decl_cleanup): Likewise.
16071         (genrtl_do_poplevel): Likewise.
16072         (genrtl_do_pushlevel): Likewise.
16073         (genrtl_clear_out_block): Likewise.
16074         (genrtl_goto_stmt): Likewise.
16075         (genrtl_expr_stmt): Likewise.
16076         (genrtl_decl_stmt): Likewise.
16077         (genrtl_if_stmt): Likewise.
16078         (genrtl_while_stmt): Likewise.
16079         (genrtl_do_stmt): Likewise.
16080         (genrtl_return_stmt): Likewise.
16081         (genrtl_for_stmt): Likewise.
16082         (genrtl_break_stmt): Likewise.
16083         (genrtl_continue_stmt): Likewise.
16084         (genrtl_scope_stmt): Likewise.
16085         (genrtl_switch_stmt): Likewise.
16086         (genrtl_case_label): Likewise.
16087         (genrtl_begin_compound_stmt): Likewise.
16088         (genrtl_finish_compound_stmt): Likewise.
16089         (genrtl_compound_stmt): Likewise.
16090         (genrtl_asm_stmt): Likewise.
16091         (genrtl_named_return_value): Likewise.
16092         (genrtl_begin_stmt_expr): Likewise.
16093         (genrtl_finish_stmt_expr): Likewise.
16094         (finish_for_stmt): Removed first argument and generate rtl
16095         specific code.
16096         (finish_switch_stmt): Likewise.
16097         (do_poplevel): Removed generate rtl specific code.
16098         (do_pushlevel): Likewise.
16099         (add_tree): Likewise.
16100         (finish_goto_stmt): Likewise.
16101         (finish_expr_stmt): Likewise.
16102         (begin_if_stmt): Likewise.
16103         (finish_if_stmt_cond): Likewise.
16104         (finish_then_clause): Likewise.
16105         (begin_else_clause): Likewise.
16106         (finish_else_clause): Likewise.
16107         (finish_if_stmt): Likewise.
16108         (clear_out_block): Likewise.
16109         (begin_while_stmt): Likewise.
16110         (finish_while_stmt_cond): Likewise.
16111         (finish_while_stmt): Likewise.
16112         (begin_do_stmt): Likewise.
16113         (finish_do_body): Likewise.
16114         (finish_do_stmt): Likewise.
16115         (finish_return_stmt): Likewise.
16116         (begin_for_stmt): Likewise.
16117         (finish_for_init_stmt): Likewise.
16118         (finish_for_cond): Likewise.
16119         (finish_for_expr): Likewise.
16120         (finish_break_stmt): Likewise.
16121         (finish_continue_stmt): Likewise.
16122         (begin_switch_stmt): Likewise.
16123         (finish_switch_cond): Likewise.
16124         (finish_case_label): Likewise.
16125         (begin_try_block): Likewise.
16126         (begin_function_try_block): Likewise.
16127         (finish_try_block): Likewise.
16128         (finish_cleanup_try_block): Likewise.
16129         (finish_cleanup): Likewise.
16130         (finish_function_try_block): Likewise.
16131         (finish_handler_sequence): Likewise.
16132         (finish_function_handler_sequence): Likewise.
16133         (begin_handler): Likewise.
16134         (finish_handler_parms): Likewise.
16135         (begin_catch_block): Likewise.
16136         (finish_handler): Likewise.
16137         (begin_compound_stmt): Likewise.
16138         (finish_compound_stmt): Likewise.
16139         (finish_asm_stmt): Likewise.
16140         (finish_label_stmt): Likewise.
16141         (finish_label_decl): Likewise.
16142         (finish_subobject): Likewise.
16143         (finish_decl_cleanup): Likewise.
16144         (finish_named_return_value): Likewise.
16145         (begin_stmt_expr): Likewise.
16146         (finish_stmt_expr): Likewise.
16148         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
16149         to call genrtl_expr_stmt when appropriate.
16151         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
16152         begin_compound_expr to call genrtl_begin_stmt_expr and
16153         genrtl_begin_compound_expr when appropriate.
16154         (finish_init_stmts): Changed calls to finish_compound_expr and
16155         finish_stmt_expr to call genrtl_finish_compound_expr and
16156         genrtl_finish_stmt_expr when appropriate.
16157         (expand_default_init): Changed call to finish_expr_stmt to call
16158         genrtl_expr_stmt when appropriate.
16159         (build_vec_init): Likewise.
16161         * parse.y (simple_stmt): Removed first argument from call to
16162         finish_for_stmt. Removed first argument from call to
16163         finish_switch_stmt.
16165         * parse.c: Regenerated.
16167         * pt.c (tsubst_expr): Removed first argument from call to
16168         finish_for_stmt. Removed first argument from call to
16169         finish_switch_stmt.
16171 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
16173         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
16174         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
16176         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
16177         (cplus_tree_code_length[]): Likewise.
16178         (cplus_tree_code_name[]): Likewise.
16179         (init_parse): Added call to add_c_tree_codes. Changed
16180         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
16182 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
16184         * cp-tree.h (finish_mem_initializers): Declare.
16185         (count_trees): Likewise.
16186         * parse.y (base_init): Use finish_mem_initializers.
16187         * semantics.c (finish_mem_initializers): New function.
16189         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
16190         the number of trees.
16191         (n_trees): Remove.
16192         (count_trees): Don't use it.
16194 2000-06-15  Jason Merrill  <jason@redhat.com>
16196         * tree.c (count_trees): New debugging function.
16198         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
16199         * init.c (build_member_call): Pull out the name of a DECL.
16201         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
16202         * semantics.c (expand_body): Push to TV_INTEGRATION here.
16203         * optimize.c (optimize_function): Not here.
16204         * pt.c (instantiate_decl): Push to TV_PARSE.
16206 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
16208         * cp-tree.h (struct language_function): Remove x_base_init_list
16209         and x_member_init_list.
16210         (current_base_init_list): Remove.
16211         (current_member_init_list): Likewise.
16212         (setup_vtbl_ptr): Change prototype.
16213         (emit_base_init): Likewise.
16214         (expand_member_init): Likewise.
16215         (reinit_parse_for_function): Remove.
16216         * decl.c (save_function_data): Don't clear x_base_init_list and
16217         x_member_init_list.
16218         (mark_language_function): Don't mark them.
16219         * init.c (perform_member_init): Tweak comment.
16220         (sort_member_init): Take the list of initializers as an argument.
16221         (sort_base_init): Likewise.
16222         (emit_base_init): Likewise.
16223         (expand_member_init): Return the initializer.  Don't use global
16224         variables.
16225         * lex.c (reinit_parse_for_function): Remove.
16226         * method.c (build_template_parm_names): Correct substitution.
16227         (do_build_copy_constructor): Don't use current_member_init_list
16228         and current_base_init_list.
16229         (synthesize_method): Likewise.
16230         * parse.y (base_init): Split mem-initializers into
16231         base-initializers and field-initializers.
16232         (member_init_list): Build up the list here.
16233         (member_init): Return the initializer.
16234         (fn.depfn): Don't use reinit_parse_for_function.
16235         * parse.c: Regenerated.
16236         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
16237         ERROR_MARK.
16238         (tsubst_expr): Don't use current_member_init_list
16239         and current_base_init_list.
16240         (tsubst_expr_values): Rename to ...
16241         (tsubst_initializer_list): ... this.  Use convert_from_reference.
16242         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
16243         and current_base_init_list.
16244         (begin_function_definition): Don't call reinit_parse_for_function.
16246         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
16248         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
16249         correctly.
16251         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
16253 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
16255         * cp-tree.h (IF_COND): Move to c-common.h.
16256         (THEN_CLAUSE): Likewise.
16257         (ELSE_CLAUSE): Likewise.
16258         (WHILE_COND): Likewise.
16259         (WHILE_BODY): Likewise.
16260         (DO_COND): Likewise.
16261         (DO_BODY): Likewise.
16262         (RETURN_EXPR): Likewise.
16263         (EXPR_STMT_EXPR): Likewise.
16264         (FOR_INIT_STMT): Likewise.
16265         (FOR_COND): Likewise.
16266         (FOR_EXPR): Likewise.
16267         (FOR_BODY): Likewise.
16268         (SWITCH_COND): Likewise.
16269         (SWITCH_BODY): Likewise.
16270         (CASE_LOW): Likewise.
16271         (CASE_HIGH): Likewise.
16272         (GOTO_DESTINATION): Likewise.
16273         (COMPOUND_BODY): Likewise.
16274         (ASM_CV_QUAL): Likewise.
16275         (ASM_STRING): Likewise.
16276         (ASM_OUTPUTS): Likewise.
16277         (ASM_INPUTS): Likewise.
16278         (ASM_CLOBBERS): Likewise.
16279         (DECL_STMT_DECL): Likewise.
16280         (STMT_EXPR_STMT): Likewise.
16281         (LABEL_STMT_LABEL): Likewise.
16282         (SCOPE_BEGIN_P): Likewise.
16283         (SCOPE_END_P): Likewise.
16284         (SCOPE_STMT_BLOCK): Likewise.
16285         (SCOPE_NULLIFIED_P): Likewise.
16286         (SCOPE_NO_CLEANUPS_P): Likewise.
16287         (SCOPE_PARTIAL_P): Likewise.
16288         (ASM_VOLATILE_P): Likewise.
16289         (STMT_LINENO): Likewise.
16290         (STMT_LINENO_FOR_FN_P): Likewise.
16292         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
16293         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
16294         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
16295         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
16296         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
16298         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
16300         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
16301         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
16303         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
16304         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
16305         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
16307 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
16309         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
16310         * class.c (dfs_find_final_overrider): Set it appropriately.
16311         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
16312         avoid unneeded secondary vptrs.
16314 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
16316         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
16317         (check_bitfield_decl, check_field_decl): Likewise.
16318         (build_vtbl_or_vbase_field, build_base_field): Likewise.
16319         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
16320         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
16321         (xfer_tag, finish_enum): Likewise.
16322         * decl2.c (finish_builtin_type): Likewise.
16323         * init.c (init_init_processing): Likewise.
16324         * pt.c (instantiate_class_template): Likewise.
16325         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
16326         * cp-tree.h (struct lang_type): Add user_align member.
16327         (CLASSTYPE_USER_ALIGN): Define.
16329 2000-06-13  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
16331         * Make-lang.in (c++.install-common): Install g++-cross in
16332         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
16333         $(target_alias)-g++ and $(target_alias)-c++.
16335 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
16337         * class.c (vcall_offset_data_s): Add last_init and fns.
16338         (overrides): Rename to same_signature_p.
16339         (dfs_find_final_overrider): Adjust accordingly.
16340         (mark_overriders): Likewise.
16341         (warn_hidden): Likewise.
16342         (build_vtbl_initializer): Reorganize machinery for building things
16343         at negative offsets.
16344         (build_vcall_and_vbase_vtbl_entries): Likewise.
16345         (build_vbase_offset_vtbl_entries): Likewise.
16346         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
16347         offset entries.  Do not create two entries for functions with the
16348         same signature.
16349         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
16350         (build_rtti_vtbl_entries): Reorganize machinery for building things
16351         at negative offsets.
16353         * optimize.c (expand_call_inline): Don't recurse into the code
16354         used to initialize the parameters more than once.
16356 2000-06-11  Mark Mitchell <mark@codesourcery.com>
16358         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
16359         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
16360         (find_substitution): Only use the `Sa' substitution for
16361         std::allocator, not instantiations of it.
16362         (write_template_prefix): Move comment.  Only use a TREE_LIST to
16363         represent substitutions for a member template.
16364         (write_array_type): Mangle array dimensions correctly.
16365         * optimize.c (maybe_clone_body): Copy more information from the
16366         cloned function.
16367         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
16368         on the regenerated declaration.
16370 2000-06-11  Chip Salzenberg  <chip@valinux.com>
16371             Mark Mitchell <mark@codesourcery.com>
16373         * class.c (build_vtable): Clarify comment.
16374         (build_ctor_vtbl_group): Pass the most derived type to
16375         build_vtable.
16377 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16379         * decl2.c (compare_options): Don't needlessly cast away const-ness.
16381 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
16383         * decl.c (add_binding): Handle duplicate declarations of external
16384         variables.
16386 2000-06-09  Chip Salzenberg  <chip@valinux.com>
16387             Mark Mitchell <mark@codesourcery.com>
16389         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
16390         argument.
16391         (write_signed_number): New macro.
16392         (write_unsigned_number): Likewise.
16393         (write_source_name): Use them.
16394         (write_number): Handle signed and unsigned values.
16395         (write_integer_cst): Use tree_int_cst_sgn, and use
16396         write_unsigned_number or write_signed_number as appropriate.
16397         (write_discriminator): Use write_unsigned_number or
16398         write_signed_number as appropriate.
16399         (write_template_arg_literal): Likewise.
16400         (write_array_type): Use tree_low_cst.
16401         (write_template_parm):  Use write_unsigned_number or
16402         write_signed_number as appropriate.
16403         (write_substitution): Adjust call to write_number.
16404         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
16405         (write_expression): Handle non-type template arguments of
16406         reference type correctly.
16407         (mangle_thunk): Use write_signed_number.
16409 2000-06-09  Chip Salzenberg  <chip@valinux.com>
16411         * mangle.c (find_substition): Don't mangle objects with typename
16412         substitutions (e.g. "cin" as "Si").
16414 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
16416         * call.c (add_candidate): Use ggc_alloc_cleared.
16417         * decl.c (lookup_label): Likewise.
16418         * lex.c (retrofit_lang_decl): Likewise.
16420 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
16422         * semantics.c (expand_body): Push to TV_EXPAND.
16423         * optimize.c (optimize_function): Push to TV_INTEGRATION.
16424         * decl.c (start_function): Always call announce_function.
16426         * tinfo2.cc: Just declare abort.
16428 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
16430         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
16431         whenever @ is a symbolic name.
16433 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
16435         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
16437 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
16439         * decl.c (pushdecl): Look up functions by DECL_NAME, not
16440         DECL_ASSEMBLER_NAME.
16442 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
16444         * decl2.c (c_language): Define.
16446 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
16448         * lex.c (lang_init_options): Tweak.
16450         * decl2.c: Remove #inclusion of diagnostic.h
16451         (lang_decode_option): Move diagnostic formatting options to
16452         toplevel.
16454         * lang-options.h: Remove documentation for diagnostic options.
16456         * Makefile.in (lex.o): Depends upon diagnostic.h
16458 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
16460         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
16461         the same DECL_RESULT, it's not a redefinition.
16462         * pt.c (tsubst_decl): Remove code to handle illegal
16463         specializations.
16465 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
16467         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
16469 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
16471         * search.c (maybe_suppress_debug_info): Don't check
16472         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
16474         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
16475         here if extern_p.
16477         Remember instantiation context in deferred instantiations.
16478         * cp-tree.h (struct tinst_level): Remove.
16479         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
16480         * pt.c (current_tinst_level): Now a tree.
16481         (print_template_context, push_tinst_level, pop_tinst_level,
16482         tinst_for_decl): Adjust.
16483         (reopen_tinst_level): New fn.
16484         (init_pt): Register current_tinst_level as a root.
16485         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
16486         of the pending templates list.
16487         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
16488         * lex.c (extract_interface_info): Adjust.
16489         * decl2.c (warn_if_unknown_interface): Adjust.
16491 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
16493         * class.c (indirect_primary_base_p): New function.
16494         (determine_primary_base): Use it.
16496 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
16498         Update new-abi dynamic cast algorithm.
16499         * tinfo.cc (__class_type_info::__dyncast_result): Add
16500         whole_details. Adjust constructor.
16501         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
16502         Avoid unnecessary searching.
16503         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
16505 2000-06-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16507         * decl.c (init_decl_processing): Don't call record_component_aliases.
16508         * tree.c (build_cplus_array_type_1): Likewise.
16510 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
16512         * ir.texi: Correct typo.
16513         * mangle.c (write_expression): Handle non-type template arguments
16514         with reference type.
16515         * method.c (build_overload_value): Likewise.
16516         * pt.c (convert_nontype_argument): Explicitly represent conversion
16517         to a reference with an ADDR_EXPR.
16518         (unify): Always unify arguments in left-to-right order.
16520 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
16521             Mark Mitchell  <mark@codesourcery.com>
16523         * Make-lang.in (CXX_SRCS): Add mangle.c.
16524         * Makefile.in (CXX_OBJS): Add mangle.o.
16525         (mangle.o): New rule.
16527         * class.c (local_classes): New variable.
16528         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
16529         (get_vtt_name): Use mangle_vtt_name for new ABI.
16530         (init_class_processing): Initialize local_classes.
16531         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
16532         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
16533         (std_identifier): New macro.
16534         (DECL_VOLATILE_MEMFUNC_P): New macro.
16535         (DECL_NAMESPACE_STD_P): Likewise.
16536         (local_classes): Declare.
16537         (get_mostly_instantiated_function_type): Declare.
16538         (init_mangle): Declare.
16539         (mangle_decl): Likewise.
16540         (mangle_type_string): Likewise.
16541         (mangle_type): Likewise.
16542         (mangle_typeinfo_for_type): Likewise.
16543         (mangle_typeinfo_string_for_type): Likewise.
16544         (mangle_vtbl_for_type): Likewise.
16545         (mangle_vtt_for_type): Likewise.
16546         (mangle_ctor_vtbl_for_type): Likewise.
16547         (mangle_thunk): Likewise.
16548         (mangle_conv_op_name_for_type): Likewise.
16549         (mangle_guard_variable): Likewise.
16550         * decl.c (pushtag): Keep track of local classes.
16551         (initialize_predefined_identifiers): Initialize std_identifier.
16552         (init_decl_processing): Use std_identifier.
16553         (start_decl): Don't treat instantiations as specializations.
16554         (grokdeclarator): Likewise.
16555         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
16556         name for fully-instantiated templates.
16557         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
16558         destructors with the new ABI.
16559         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
16560         (grokfield): Use mangle_type for new ABI.
16561         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
16562         (get_sentry): Use mangle_guard_variable for new ABI.
16563         (start_static_initialization_or_destruction): Likewise.
16564         * expr.c (extract_aggr_init): Remove.
16565         (extract_scalar_init): Likewise.
16566         (extract_init): Remove #if 0'd code.
16567         * mangle.c: New function.
16568         * method.c (build_mangled_name): Assert not flag_new_abi.
16569         (build_static_name): Likewise.
16570         (build_decl_overload_real): Likewise.
16571         (build_typename_overload): Likewise.
16572         (build_overload_with_type): Likewise.
16573         (build_overload_name): Likewise.
16574         (get_ctor_vtbl_name): Likewise.
16575         (start_squangling): Likewise.
16576         (get_id_2): Likewise.
16577         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
16578         (init_method): Call init_mangle for new ABI.
16579         (make_thunk): Call mangle_thunk for new ABI.
16580         * operators.def: Correct new ABI manglings for the `%' operator.
16581         Add `::' operator.
16582         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
16583         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
16584         (lookup_template_class): Call mangle_decl for new ABI.
16585         (get_mostly_instantiated_function_type): New function.
16586         (set_mangled_name_for_template_decl): Use it.
16587         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
16588         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
16589         conversion op names.
16590         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
16591         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
16592         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
16593         mangle_typeinfo_string_for_type.
16595 2000-06-03  Mark Mitchell  <mark@codesourcery.com>
16597         * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
16598         (INNERMOST_TEMPLATE_ARGS): New macro.
16599         (innermost_args): Remove.
16600         (get_innermost_template_args): New function.
16601         * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
16602         * error.c (dump_function_decl): Be caution when using
16603         most_general_template.
16604         * method.c (build_template_parm_names):  Use
16605         INNERMOST_TEMPLATE_ARGS.
16606         * pt.c (add_to_template_args): Tidy comment
16607         (get_innermost_template_args): New function.
16608         (check_explicit_specialization): Clear DECL_INITIAL for a new
16609         specialization.
16610         (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
16611         Tidy.
16612         (push_template_decl): Always register specializations of the most
16613         general template.
16614         (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
16615         (coerce_template_parms): Likewise.
16616         (lookup_template_class): Likewise.
16617         (innermost_args): Remove.
16618         (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
16619         (tsubst_decl): Handle tricky specializations.  Use
16620         get_innermost_template_args.
16621         (instantiate_template): Simplify handling of partial
16622         instantiations.
16623         (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
16624         (most_general_template): Reimplement, in a more straightforward
16625         manner.
16626         (regenerate_decl_from_template): Tweak formatting.  Use
16627         TMPL_ARGS_DEPTH for clarity.
16628         (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
16630         * dump.c (dequeue_and_dump): Dump information about thunks.
16632 2000-06-01  Richard Henderson  <rth@cygnus.com>
16634         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
16636 2000-06-01  Richard Henderson  <rth@cygnus.com>
16638         * decl2.c (unsupported_options): Fix typo, make const.
16639         (lang_decode_option): Fix bsearch argument order.
16641 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
16643         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
16644         on FIELD_DECLs.
16646 2000-05-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16648         * cp-tree.h (c_get_alias_set): Deleted.
16649         * Makefile.in (decl.o): Include ../expr.h.
16650         * decl.c (expr.h): Include.
16651         (init_decl_processing): Call record_component_aliases for arrays.
16652         (grokdeclarator): Likewise.
16653         Set TREE_ADDRESSABLE for fields that aren't bitfields.
16654         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
16656 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
16658         Remove guiding declaration support.
16659         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
16660         (flag_guiding_decls): Remove.
16661         * call.c (build_user_type_conversion_1): Remove support for
16662         guiding decls.
16663         (build_new_function_call): Likewise.
16664         (build_new_op): Likewise.
16665         (build_new_method_call): Likewise.
16666         * decl.c (start_function): Likewise.
16667         * friend.c (is_friend): Likewise.
16668         (do_friend): Likewise.
16669         * decl2.c ((flag_dump_translation_unit): Make it const.
16670         (flag_guiding_decls): Remove.
16671         (unsupported_options): New variable
16672         (compare_options): New function.
16673         (lang_decode_option): Use them.
16675         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
16677         * method.c (mangle_expression): Adjust test for legal expression
16678         operators.
16680         * pt.c (instantiate_decl): Save and restore the local
16681         specializations list.
16683 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
16685         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
16687 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
16689         * call.c (add_template_candidate_real): Handle member template
16690         constructors for classes with virtual bases.
16691         (build_user_type_conversion_1): Use in_charge_arg_for_name.
16692         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
16694         * ir.texi: Update thunk documentation.
16696         * call.c (joust): Fix handling of overloaded builtin operators.
16698 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
16700         * cp-tree.h (DECL_ANTICIPATED): New macro.
16701         Document new use of DECL_LANG_FLAG_7.
16702         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
16703         in the user namespace.
16704         * lex.c (do_identifier): If the identifier's declaration has
16705         DECL_ANTICIPATED on, it has not yet been declared.  But do not
16706         replace it with an ordinary implicit declaration.
16708         * tinfo2.cc: Include stdlib.h.
16710 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
16712         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
16713         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
16714         CLASSTYPE_ALIGN.
16716 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
16718         * decl2.c (lang_decode_option): Use skip_leading_substring instead
16719         of plain strncmp.
16721 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
16723         * operators.def (<?): Duplicated, should have been...
16724         (>?): this.  Fixed.
16726 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
16727             Mark Mitchell  <mark@codesourcery.com>
16729         * cp-tree.h (ansi_opname): Make it a macro.
16730         (ansi_assopname): Likewise.
16731         (struct lang_decl_flags): Add assignment_operator_p.
16732         (struct lang_decl): Add operator_code.
16733         (DECL_VTT_PARM): Adjust.
16734         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
16735         overloaded operator.
16736         (SET_OVERLOADED_OPERATOR_CODE): New macro.
16737         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
16738         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
16739         (opname_tab): Remove.
16740         (assignop_tab): Likewise.
16741         (operator_name_info_t): New type.
16742         (operator_name_info): New variable.
16743         (assignment_operator_name_info): Likewise.
16744         (build_cp_library_fn): Remove declaration.
16745         (push_cp_library_fn): Likewise.
16746         (operator_name_string): Likewise.
16747         (build_decl_overload): Likewise.
16748         * call.c (print_z_candidates): Simplify.
16749         (build_object_call): Adjust usage of ansi_opname.  Use
16750         DECL_OVERLOADED_OPERATOR_P.
16751         (op_error): Adjust operator name lookup.
16752         (build_conditional_expr): Adjust usage of ansi_opname.
16753         (build_new_op): Likewise.
16754         (build_op_delete_call): Likewise.
16755         (build_over_call): Likewise.
16756         (joust): Use DECL_OVERLOADED_OPERATOR_P.
16757         * decl.c (duplicate_decls): Copy operator_code.
16758         (init_decl_processing): Adjust parameters to push_cp_library_fn.
16759         (builtin_function): Adjust parameters to build_library_fn_1.
16760         (build_library_fn_1): Accept an overloaded operator code.
16761         (build_library_fn): Pass ERROR_MARK.
16762         (build_cp_library_fn): Accept an overloaded operator code.
16763         (push_cp_library_fn): Likewise.
16764         (grokfndecl): Tweak.
16765         (grokdeclarator): Simplify code to compute names of overloaded
16766         operators.  Adjust use of ansi_opname.
16767         (ambi_op_p): Work on tree_codes, not identifiers.
16768         (unary_op_p): Likewise.
16769         (grok_op_properties): Likewise.
16770         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
16771         (lang_mark_tree): Don't try to mark the operator_code.
16772         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
16773         * error.c (dump_decl): Remove special handling for operator
16774         names.
16775         (dump_function_name): Likewise.
16776         (dump_expr): Adjust name lookup of operators.
16777         (op_to_string): Simplify.
16778         (assop_to_string): Likewise.
16779         * init.c (build_new_1): Adjust use of ansi_opname.
16780         * lex.c (opname_tab): Remove.
16781         (assignop_tab): Likewise.
16782         (ansi_opname): Likewise.
16783         (ansi_assopname): Likewise.
16784         (operator_name_string): Likewise.
16785         (reinit_lang_specific): Likewise.
16786         (operator_name_info): New variable.
16787         (assignment_operator_name_info): Likewise.
16788         (init_operators): New function.
16789         (init_parse): Use it.
16790         (do_identifier): Adjust use of ansi_opname.
16791         * method.c (mangle_expression): Don't use ansi_opname for
16792         mangling.
16793         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
16794         (build_decl_overload): Remove.
16795         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
16796         (do_build_assign_ref): Adjust use of ansi_opname.
16797         (synthesize_method): Likewise.
16798         (implicitly_declare_fn): Likewise.
16799         * operators.def: New file.
16800         * parse.y (operator): Adjust use of ansi_opname.
16801         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
16802         (set_mangled_name_for_template_decl): Don't play games with
16803         current_namespace.
16804         (special_function_p): Adjust use of ansi_opname.
16805         * typeck.c (check_return_expr): Likewise.
16806         * Make-lang.in (cc1plus): Depend on operators.def.
16807         * Makefile.in (lex.o): Likewise.
16808         (decl.o): Likewise.
16810 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
16812         * Make-lang.in (cplib2.ready): Eradicate.
16814 2000-05-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16816         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
16817         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
16818         (built_min, cp_tree_equal): Likewise.
16820 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
16822         * class.c (layout_nonempty_base_or_field): Replace
16823         `record_layout_info' with `record_layout_info_s'.
16825 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
16827         Fix goto checking.
16828         * cp-tree.h (struct language_function): x_named_labels is now
16829         a struct named_label_list*.
16830         * decl.c (struct named_label_use_list): Renamed from...
16831         (struct named_label_list): ...this.  New struct.
16832         (push_binding_level): Don't set eh_region.
16833         (note_level_for_eh): New fn.
16834         (pop_label): Take label and old value directly.
16835         (pop_labels): Adjust for new named_labels format.
16836         (lookup_label): Likewise.
16837         (poplevel): Note characteristics of a binding level containing a
16838         named label.  Mess with named label lists earlier.
16839         (mark_named_label_lists): New fn.
16840         (mark_lang_function): Call it.
16841         (use_label): New fn, split out from...
16842         (make_label_decl): ...here.  Don't call it.
16843         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
16844         check_previous_gotos): New fns, split out from...
16845         (define_label): ...here.
16846         (check_switch_goto): New fn.
16847         (define_case_label): Call it.
16848         (check_goto): New fn.
16849         * semantics.c (finish_goto_stmt): Call it and use_label.
16850         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
16851         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
16853 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
16855         * class.c (build_vtable_entry_ref): Correct usage of
16856         get_vtbl_decl_for_binfo.
16858         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
16859         * method.c (implicitly_declare_fn): Not here.
16861 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
16863         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
16864         (CPTI_PTMD_DESC_TYPE): ... here.
16865         (ptmd_desc_type_node): Rename to ...
16866         (ptm_desc_type_node): ... here.
16867         * decl.c: Likewise.
16868         * rtti.c (ptmd_initializer): Rename to ...
16869         (ptm_initializer): ... here.
16870         (sythesize_tinfo_var): Adjust. Deal with pointer to member
16871         function.
16872         (create_tinfo_types): Adjust.
16874 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
16876         Finish implementation of VTTs.
16877         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
16878         CPTI_VTT_PARM_IDENTIFIER.
16879         (vtt_parm_identifier): New macro.
16880         (vtt_parm_type): Likewise.
16881         (BINFO_SUBVTT_INDEX): Likewise.
16882         (BINFO_VPTR_INDEX): Likewise.
16883         (struct lang_decl): Add vtt_parm.
16884         (DECL_VTT_PARM): New macro.
16885         (DECL_USE_VTT_PARM): Likewise.
16886         (DECL_NEEDS_VTT_PARM_P): Likewise.
16887         (get_vtt_name): Declare.
16888         (build_artificial_parm): Likewise.
16889         (fixup_all_virtual_upcast_offsets): Likewise.
16890         (expand_indirect_vtbls_init): Remove.
16891         * call.c (build_new_method_call): Pass the vtt to subobject
16892         constructors and destructors.
16893         * class.c (get_vtt_name): Give it external linkage.
16894         (build_clone): Handle the magic VTT parameters for clones.
16895         (clone_function_decl): Fix typo in comment.
16896         (build_vtt): Keep track of the indices in the VTTs where various
16897         entities are stored.
16898         (build_vtt_inits): Likewise.
16899         (dfs_build_vtt_inits): Likewise.
16900         (build_ctor_vtbl_group): Tweak type of construction vtables.
16901         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
16902         primary bases, when building construction vtables.
16903         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
16904         (initialize_predefined_identifiers): Add vtt_parm_identifier.
16905         (init_decl_processing): Initialize vtt_parm_type.
16906         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
16907         (lang_mark_tree): Make vtt_parm.
16908         * decl2.c (build_artificial_parm): New function.
16909         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
16910         (grokclassfn): Use build_artificial_parm.
16911         * init.c (initialize_vtbl_ptrs): Call
16912         fixup_all_virtual_upcast_offsets directly.
16913         (perform_member_init): Use the complete subobject destructor for
16914         member cleanups.
16915         (build_vtbl_address): New function.
16916         (expand_virtual_init): Handle VTTs.
16917         * optimize (maybe_clone_body): Likewise.
16918         * search.c (fixup_all_virtual_upcast_offsets): Give it external
16919         linkage.
16920         (expand_indirect_vtbls_init): Remove.
16921         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
16922         * tree.c (make_binfo): Make them bigger.
16924 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
16926         * inc/cxxabi.h (__pbase_type_info): Define, based on
16927         __pointer_type_info.
16928         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
16929         (__pointer_to_member_type_info): Likewise.
16930         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
16931         (__pointer_to_member_type_info::__is_pointer_p): Remove.
16932         (__pointer_type_info::__do_catch): Rename to ...
16933         (__pbase_type_info::__do_catch): ... here. Adjust.
16934         (__pbase_type_info::__pointer_catch): Implement.
16935         (__pointer_type_info::__pointer_catch): Adjust.
16936         (__pointer_to_member_type_info::__pointer_catch): Adjust.
16938 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
16940         * tinfo.h (__user_type_info::contained_virtual_p): New
16941         predicate.
16942         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
16943         shaped hierarchy.
16944         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
16945         diamond shaped hierarchy. Add early out for mixed diamond and
16946         duplicate shaped hierarchy.
16948 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
16950         * cp-tree.h (build_delete): Change prototype.
16951         (build_vec_delete): Likewise.
16952         * call.c (build_scoped_method_call): Use special_function_kind
16953         values to indicate the kind of destruction to be done.
16954         (build_method_call): Likewise.
16955         * decl.c (finish_destructor_body): Likewise.
16956         (maybe_build_cleanup_1): Likewise.  Rename to ...
16957         (maybe_build_cleanup): ... this.
16958         * decl2.c (delete_sanity): Use special_function_kind
16959         values to indicate the kind of destruction to be done.
16960         (build_cleanup): Likewise.
16961         * init.c (perform_member_init): Likewise.
16962         (build_vec_delete_1): Likewise.
16963         (build_dtor_call): Simplify.
16964         (build_delete): Use special_function_kind
16965         values to indicate the kind of destruction to be done.
16966         (build_vbase_delete): Likewise.
16967         (build_vec_delete): Likewise.
16969         * init.c (sort_member_init): Fix typo in error message generation
16970         code.
16972 2000-05-15  Donald Lindsay  <dlindsay@cygnus.com>
16974         * semantics.c (begin_class_definition): make the packed
16975         attribute be sensitive to the "-fpack-struct" command line flag
16977 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
16979         Update new-abi upcast algorithm.
16980         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
16981         prototype and meaning of return value.
16982         (__si_class_type_info::__do_upcast): Likewise.
16983         (__vmi_class_type_info::__do_upcast): Likewise.
16984         * tinfo.cc (__class_type_info::__upcast_result): Replace
16985         whole2dst with part2dst. Adjust ctor.
16986         (__class_type_info::__do_upcast): Adjust call of worker function.
16987         (__class_type_info::__do_upcast): Adjust.
16988         (__si_class_type_info::__do_upcast): Adjust. Use parent's
16989         __do_upcast.
16990         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
16991         virtual base in diamond hierarchy bug.
16993 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
16995         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
16996         and bitfield to tinfo_fn_p.
16997         (DECL_TINFO_FN_P): Adjust.
16998         (SET_DECL_TINFO_FN_P): Likewise.
16999         (DECL_MUTABLE_P): Likewise.
17000         (DECL_C_BIT_FIELD): Likewise.
17001         (SET_DECL_C_BIT_FIELD): Likewise.
17002         (CLEAR_DECL_C_BIT_FIELD): Likewise.
17003         (DECL_UNINLINABLE): Likewise.
17004         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
17005         (handle_using_decl): Remove assertion.
17006         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
17007         to build FIELD_DECLs.
17008         (build_base_field): Likewise.
17009         (layout_class_type): Likewise.
17010         * decl.c (init_decl_processing): Likewise.
17011         (build_ptrmemfunc_type): Likewise.
17012         (grokdeclarator): Likewise.
17013         * decl2.c (grok_x_components): Likewise.
17014         * except.c (call_eh_info): Likewise.
17015         * init.c (init_init_processing): Likewise.
17016         * rtti.c (expand_class_desc): Likewise.
17017         (create_pseudo_type_info): Likewise.
17018         (get_vmi_pseudo_type_info): Likewise.
17019         (create_tinfo_types): Likewise.
17020         * ptree.c (print_lang_decl): Adjust.
17021         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
17022         before checking DECL_MUTABLE_P.
17024         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
17025         parameters for template functions.
17026         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
17027         destructors as well as constructors.
17029 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
17031         * class.c (build_ctor_vtbl_group): Set inits.
17032         * optimize.c (maybe_clone_body): Set DECL_INLINE and
17033         DECL_THIS_INLINE appropriately for clones.
17035         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
17036         (DECL_CONV_FN_P): Simplify.
17037         (DECL_OPERATOR): Remove.
17038         (language_to_string): Declare.
17039         * decl.c (duplicate_decls): Fix typo in comment.
17040         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
17041         (grok_op_properties): Use DECL_CONV_FN_P instead of
17042         IDENTIFIER_TYPENAME_P.
17043         * dump.c (dequeue_and_dump): Dump the language linkage of
17044         declarations.
17045         * error.c (language_to_string): Give it external linkage.
17046         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
17047         (implicitly_declare_fn): Set DECL_LANGUAGE.
17048         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
17049         IDENTIFIER_TYPENAME_P.
17050         (tsubst_decl): Likewise.
17051         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
17052         * semantics.c (finish_member_declaration): Don't mark members of
17053         classes declared in an extern "C" region as extern "C".
17055 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
17057         * decl2.c (qualified_lookup_using_namespace): Look through
17058         namespace aliases.
17060         * decl.c (push_using_decl): Return the old decl on namespace level.
17062 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
17064         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
17065         (VTT_NAME_PREFIX): New macro.
17066         (CTOR_VTBL_NAME_PREFIX): Likewise.
17067         (get_ctor_vtbl_name): New function.
17068         * class.c (get_vtable_name): Simplify.
17069         (get_vtt_name): New function.
17070         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
17071         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
17072         when a virtual base becomes primary.
17073         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
17074         VTTs.
17075         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
17076         additional parameters.
17077         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
17078         (initialize_array): New function.
17079         (build_vtt): Likewise.
17080         (build_vtt_inits): Likewise.
17081         (dfs_build_vtt_inits): Likewise.
17082         (dfs_fixup_binfo_vtbls): Likewise.
17083         (build_ctor_vtbl_group): Likewise.
17084         (initialize_vtable): Use initialize_array.
17085         (accumulate_vtbl_inits): Reimplement to handle construction
17086         vtables.
17087         (dfs_accumulate_vtbl_inits): Likewise.
17088         (bulid_vtbl_initializer): Adjust parameter name.
17089         * method.c (build_typename_overload): Remove #if 0'd code.
17090         (get_ctor_vtbl_name): New function.
17091         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
17092         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
17094         * cp-tree.h (struct lang_type): Remove search_slot.
17095         (CLASSTYPE_SEARCH_SLOT): Remove.
17096         (emit_base_init): Change prototype.
17097         (initialize_vtbl_ptrs): Likewise.
17098         (expand_indirect_vtbls_init): Likewise.
17099         (clear_search_slots): Remove.
17100         * decl.c (lang_mark_tree): Don't mark search_slot.
17101         * init.c (initialize_vtbl_ptrs): Simplify.
17102         (emit_base_init): Likewise.
17103         * search.c (struct vbase_info): Document decl_ptr.
17104         (convert_pointer_to_single_level): Remove.
17105         (dfs_find_vbases): Remove.
17106         (dfs_init_base_pointers): Simplify.
17107         (dfs_clear_vbase_slots): Remove.
17108         (dfs_vtable_path_unmark): New function.
17109         (init_vbase_pointers): Simplify.
17110         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
17111         (expand_indirect_vtbls_init): Simplify.  Don't call
17112         mark_all_temps_used.
17113         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
17114         initialize_vtbl_ptrs.
17116 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
17118         * except.c: Add static prototypes.
17120 2000-05-20  H.J. Lu  <hjl@gnu.org>
17122         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
17124 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
17126         Don't create a separate copy of virtual bases for the
17127         CLASSTYPE_VBASECLASSES list.
17128         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
17129         (BINFO_FOR_VBASE): Remove.
17130         (CANONICAL_BINFO): Adjust.
17131         (binfo_for_vbase): New function.
17132         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
17133         instead of BINFO_FOR_VBASE.
17134         (build_vbase_pointer): Likewise.
17135         (build_secondary_vtable): Likewise.
17136         (dfs_mark_primary_bases): Likewise.
17137         (mark_primary_bases): Likewise.
17138         (layout_nonempty_base_or_field): Likewise.
17139         (dfs_set_offset_for_shared_vbases): Likewise.
17140         (dfs_set_offset_for_unshared_vbases): Likewise.
17141         (layout_virtual_bases): Likewise.  Adjust for changes to the
17142         CLASSTYPE_VBASECLASSES list.
17143         (dump_class_hierarchy_r): Use binfo_for_vbase
17144         instead of BINFO_FOR_VBASE.
17145         (dump_class_hierarchy): Likewise.
17146         (finish_vtbls): Likewise.
17147         (build_vtbl_initializer): Adjust for changes to the
17148         CLASSTYPE_VBASECLASSES list.
17149         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
17150         * decl.c (finish_destructor_body): Adjust for changes to the
17151         CLASSTYPE_VBASECLASSES list.
17152         * init.c (sort_base_init): Use binfo_for_vbase.
17153         (construct_virtual_bases): Adjust for changes to the
17154         CLASSTYPE_VBASECLASSES list.
17155         (expand_member_init): Use binfo_for_vbase.
17156         (build_vbase_delete):  Adjust for changes to the
17157         CLASSTYPE_VBASECLASSES list.
17158         * method.c (do_build_copy_constructor): Likewise.
17159         * rtti.c (get_base_offset): Use binfo_for_vbase.
17160         (expand_class_desc): Remove #if 0'd code.
17161         * search.c (struct vbase_info): Remove vbase_types.
17162         (get_base_distance):  Use binfo_for_vbase.
17163         (lookup_field_queue_p): Use CANONICAL_BINFO.
17164         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
17165         (get_pure_virtuals): Adjust for changes to the
17166         CLASSTYPE_VBASECLASSES list.
17167         (dfs_find_vbases): Use binfo_for_vbase.
17168         (dfs_init_vbase_pointers): Likewise.
17169         (init_vbase_pointers): Don't initialize vi.vbase_types.
17170         (virtual_context): Use binfo_for_vbase.
17171         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
17172         CLASSTYPE_VBASECLASSES list.
17173         (expand_indirect_vtbls_init): Simplify.
17174         (dfs_get_vbase_types): Don't replicate virtual bases.
17175         (find_vbase_instance): Use binfo_for_vbase.
17176         (binfo_for_vbase): New function.
17177         * typeck.c (get_delta_difference): Use binfo_for_vbase.
17179 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
17181         * decl2.c (finish_anon_union): Generalize error messages to handle
17182         anonymous structures.
17183         * init.c (perform_member_init): Remove `name' parameter.
17184         (build_field_list): New function.
17185         (sort_member_init): Handle anonymous union initialization order
17186         correctly.  Check for multiple initializations of the same union.
17187         (emit_base_init): Don't look up fields by name here.
17188         (expand_member_init): Record the result of name lookup for future
17189         reference.
17190         * typeck.c (build_component_ref): Fix formatting.
17192 2000-05-17  Andrew Cagney  <cagney@b1.cygnus.com>
17194         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
17195         * typeck.c (build_x_compound_expr): Replace warn_unused with
17196         warn_unused_value.
17198         * decl2.c (lang_decode_option): Update -Wall unused flags by
17199         calling set_Wunused.
17201 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
17203         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
17204         * init.c (dfs_vtable_path_unmark): Remove.
17205         * search.c (marked_new_vtable_p): Likewise.
17206         (unmarked_new_vtable_p): Likewise.
17207         (dfs_search_slot_nonempty_p): Likewise.
17208         (dfs_mark): Likewise.
17209         (dfs_vtable_path_unmark): Likewise.
17210         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
17211         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
17212         (dfs_init_vbase_pointers): Remove special-case new ABI code.
17213         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
17214         (init_vbase_pointers): Simplify.
17215         (expand_indirect_vtbls_init): Likewise.
17217         * class.c (copy_virtuals): New function.
17218         (build_primary_table): Use it.
17219         (build_secondary_vtable): Likewise.
17220         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
17221         indicate that no vcall offset is required.
17222         (add_virtual_function): Likewise.
17223         (modify_all_vtables): Likewise.
17224         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
17225         (dfs_accumulate_vtbl_inits): Likewise.
17226         (build_vtbl_initializer): Make changes to handle construction
17227         vtables.
17228         (dfs_build_vcall_offset_vtbl_entries): Likewise.
17229         (build_rtti_vtbl_entries): Likewise.
17230         (build_vtable_entries): Handle a NULL vcall_index.
17232 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
17234         * decl2.c (lang_decode_option): Fix thinko.
17236 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
17238         * except.c (check_handlers): New fn.
17239         * cp-tree.h: Declare it.
17240         * semantics.c (finish_handler_sequence): Call it.
17241         (finish_function_handler_sequence): Likewise.
17242         (finish_handler_parms): Set TREE_TYPE on the handler.
17243         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
17244         * search.c (get_base_distance_recursive): If protect>1, ignore
17245         special access.
17246         (get_base_distance): Don't reduce watch_access.
17248 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
17250         * lex.c: #include diagnostic.h.
17251         (lang_init_options): Set default prefixing rules.
17253         * lang-options.h: Add -fdiagnostics-show-location=.
17255         * decl2.c: #include diagnostic.h.
17256         (lang_decode_option): Handle -fdiagnostics-show-location=.
17258 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
17260         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
17261         * vec.cc: Revert my 2000-05-07 change.
17263 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
17265         * class.c (check_field_decls): Complain about non-static data
17266         members with same name as class in class with constructor.
17268 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
17270         * decl.c (grokdeclarator): Allow non-static data members with
17271         same name as class.
17273 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
17275         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
17276         and pending_inline.filename.  Update prototypes.
17277         * decl.c (define_label): Constify filename parameter.
17278         * decl2.c (warn_if_unknown_interface): Constify local char *.
17279         * input.c Constify input_source.filename. Don't declare
17280         input_filename or lineno.  Constify filename parameter to feed_input.
17281         * lex.c (init_parse): Constify parameter and return value.
17282         (cp_pragma_interface, cp_pragma_implementation): Constify
17283         filename argument.
17284         (reinit_parse_for_method, reinit_parse_for_block,
17285         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
17286         Constify local char *.
17287         * pt.c: Don't declare lineno or input_filename.
17288         (print_template_context, tsubst_friend_function, tsubst_decl,
17289         tsubst, instantiate_decl): Constify local char *.
17290         * semantics.c (expand_body): Constify local char *.
17291         * tree.c (build_srcloc): Constify filename parameter.
17292         * typeck.c (c_expand_asm_operands): Constify filename
17293         parameter.
17295 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
17297         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
17298         offsetof expansion.
17300 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
17302         * inc/cxxabi.h:  Fix typos in comment.
17303         (__base_class_info::__offset): Use a static_cast.
17305 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
17307         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
17308         of std::size_t and std::ptrdiff_t respectively.
17309         * tinfo.cc: Likewise.
17310         * vec.cc: Likewise.
17312 2000-05-06  Richard Henderson  <rth@cygnus.com>
17314         * typeck.c (build_c_cast): Don't warn integer->pointer size
17315         mismatch for constants.
17317 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
17319         * rtti.c (ptmd_initializer): Set non-public, if class is
17320         incomplete.
17322         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
17323         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
17324         __cxa_vec_delete): Likewise.
17325         * tinfo.cc (__dynamic_cast): Likewise.
17326         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
17327         __cxa_vec_delete): Likewise.
17329 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
17331         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
17332         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
17333         (lang_decl_flags): Add vcall_offset.
17334         (THUNK_VCALL_OFFSET): Use it.
17335         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
17336         * method.c (make_thunk): Create the lang_decl here, not in
17337         emit_thunk.
17338         (emit_thunk): Make generic thunks into ordinary functions once
17339         they have been fed to expand_body.
17340         * semantics.c (expand_body): Set current_function_is_thunk here.
17342 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17344         * class.c (update_vtable_entry_for_fn): Prototype.
17346         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
17347         and `tmpl'.
17349         * search.c (dfs_build_inheritance_graph_order): Prototype.
17351 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
17353         * cp-tree.h (special_function_kind): Add various kinds of
17354         destructors.
17355         (special_function_p): New function.
17356         * class.c (overrides): Don't let one kind of destructor override
17357         another.
17358         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
17359         whether or not to instantiate a template.
17360         * tree.c (special_function_p): Define.
17362 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
17364         * cp-tree.def (THUNK_DECL): Remove.
17365         * cp-tree.h (DECL_THUNK_P): New macro.
17366         (DECL_NON_THUNK_FUNCTION_P): Likewise.
17367         (DECL_EXTERN_C_FUNCTION_P): Likewise.
17368         (SET_DECL_THUNK_P): Likewise.
17369         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
17370         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
17371         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
17372         * decl.c (decls_match): Use DECL_EXTERN_C_P.
17373         (duplicate_decls): Likewise.
17374         (pushdecl): Likewise.  Adjust thunk handling.
17375         (grokfndecl): Use DECL_EXTERN_C_P.
17376         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
17377         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
17378         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
17379         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
17380         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
17381         DECL_NO_STATIC_CHAIN.
17382         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
17383         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
17384         * search.c (covariant_return_p): Remove THUNK_DECL handling.
17385         * ir.texi: Update.
17387 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
17389         * tree.c (walk_tree): Set lineno.
17391 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
17393         * exception.cc: Update license notice.
17394         * new.cc: Likewise.
17395         * new1.cc: Likewise.
17396         * new2.cc: Likewise.
17397         * tinfo.cc: Likewise.
17398         * tinfo2.cc: Likewise.
17399         * vec.cc: Likewise.
17400         * inc/cxxabi.h: Likewise.
17401         * inc/exception: Likewise.
17402         * inc/new: Likewise.
17403         * inc/new.h: Likewise.
17404         * inc/typeinfo: Likewise.
17406 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
17408         * tree.c (build_target_expr_with_type): If we already have a
17409         TARGET_EXPR, just return it.
17411         * optimize.c (initialize_inlined_parameters): Don't generate an
17412         EXPR_STMT if we can just use DECL_INITIAL.
17413         * decl.c (emit_local_var): Only make the initialization a
17414         full-expression if stmts_are_full_exprs_p.
17416 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
17418         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
17419         macro.
17420         * call.c (standard_conversion): Use it.
17421         (direct_reference_binding): Likewise.
17422         (build_over_call): Likewise.
17423         (is_properly_derived_from): Likewise.
17424         (compare_ics): Likewise.
17425         * class.c (resolves_to_fixed_type_p): Likewise.
17426         * optimize.c (declare_return_variable): Likewise.
17427         * pt.c (is_specialization_of): Likewise.
17428         (unify): Likewise.
17429         * typeck.c (comp_target_parms): Likeiwse.
17430         (build_static_cast): Likewise.
17431         (build_reinterpret_cast): Likewise.
17432         (build_const_cast): Likewise.
17433         (comp_ptr_ttypes_real): Likewise.
17434         (comp_ptr_ttypes_const): Likewise.
17435         * typeck2.c (process_init_constructor): Likewise.
17437 2000-04-30  Scott Snyder <snyder@fnal.gov>
17439         * decl.c (finish_destructor_body): Use the base destructor when
17440         destroying virtual bases.
17442 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
17444         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
17445         STMT_EXPRs.
17446         * optimize.c (struct inline_data): Add target_exprs field.
17447         (declare_return_variable): When a function returns an aggregate,
17448         use the variable declared in the TARGET_EXPR as the remapped
17449         DECL_RESULT.
17450         (expand_call_inline): Update the pending target_exprs stack.
17451         (optimize_function): Initialize the stack.
17453         * decl2.c (finish_file): Fix typo in comment.
17455         * method.c (emit_thunk): Don't try to return a `void' value.
17457         * optimize.c (initialize_inlined_parameters): If the parameter is
17458         addressable, we need to make a new VAR_DECL, even if the
17459         initializer is constant.
17461 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
17463         * decl.c (grok_op_properties): Add an extra check of argtypes.
17465 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
17467         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
17468         variables.
17469         (initialize_inlined_parameters): Try to avoid creating new
17470         VAR_DECLs.
17472 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
17474         * lex.c (my_get_run_time): Remove.
17475         (init_filename_times): Use get_run_time instead of my_get_run_time.
17476         (check_newline): Likewise.
17477         (dump_time_statistics): Likewise.
17478         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
17479         of computing elapsed time explicitly.
17481 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
17483         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
17484         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
17485         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
17486         before calling decl_constant_value.
17487         * class.c (check_bitfield_decl): Likewise.
17488         * cvt.c (ocp_convert): Likewise.
17489         (convert): Likewise.
17490         * decl.c (compute_array_index_type): Likewise.
17491         (build_enumerator): Likewise.
17492         * decl2.c (check_cp_case_value): Likewise.
17493         * pt.c (convert_nontype_argument): Likewise.
17494         (tsubst): Likewise.
17495         * typeck.c (decay_conversion): Likewise.
17496         (build_compound_expr): Likewise.
17497         (build_reinterpret_cast): Likewise.
17498         (build_c_cast): Likewise.
17499         (convert_for_assignment): Likewise.
17501 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
17503         * decl.c (finish_function): Don't play games with DECL_INLINE.
17505 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
17507         * ir.texi: Correct typo.
17509 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
17511         * decl.c (grokdeclarator): Reject VLAs as members.
17513 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
17515         * call.c (standard_conversion): Accept conversion between
17516         COMPLEX_TYPEs.
17518         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
17520 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
17522         * decl2.c (finish_file): Remove double setup for accounting
17523         compile time.
17525 2000-04-24  Robert Lipe <robertlipe@usa.net>
17527         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
17529 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
17531         * new.cc (set_new_handler): Needs to be in std::.
17533 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
17535         * cp-tree.h (lang_decl): Remove pretty_function_p.
17536         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
17537         language-specific node.
17538         * decl.c (cp_make_fname_decl): Use build_decl, not
17539         build_lang_decl, to build the variables.
17540         (grokvardecl): Don't call build_lang_decl for local variables in
17541         templates.
17542         (grokdeclarator): Don't call build_lang_decl for local type
17543         declarations in templates.
17544         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
17545         zero'd memory, rather than calling memset.
17546         * pt.c: Include hashtab.h.
17547         (local_specializations): New variable.
17548         (retrieve_local_specialization): Use it.
17549         (register_local_specialization): Likewise.
17550         (tsubst_decl): Don't assume local variables have
17551         DECL_LANG_SPECIFIC.
17552         (instantiate_decl): Set up local_specializations.
17553         * Makefile.in (HTAB_H): New variable.
17555 2000-04-23  Richard Henderson  <rth@cygnus.com>
17557         * typeck.c (c_expand_asm_operands): Restore the original
17558         contents of the output list.
17560 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
17562         * ir.texi:  Document complex number representation.
17564 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
17566         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
17567         (target_incomplete_p): New function.
17568         (tinfo_base_init): Create comdat NTBS name variable.
17569         (ptr_initializer): Add non_public parameter. Calculate it.
17570         (ptmd_initializer): Likewise.
17571         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
17572         (create_real_tinfo_var): Add non_public parameter. Use it.
17573         Push proxy into global namespace.
17574         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
17575         New enumeration.
17576         * inc/typeinfo (type_info::before, type_info::operator==):
17577         Compare __name addresses.
17579         * tinfo2.cc: Remove new-abi builtins comment.
17581 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
17583         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
17585         * call.c (joust): Exit early if we get the same function, too.
17587         * decl2.c (key_method): Return NULL_TREE for template classes.
17588         (import_export_class): Don't need to check for template classes.
17590 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
17592         * lex.c: Remove references to cccp.c.
17594 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
17596         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
17597         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
17598         (DECL_DESTRUCTOR_P): Use destructor_attr.
17599         (DECL_CONST_MEMFUNC_P): Reimplement.
17600         (DECL_VOLATILE_MEMFUNC_P): Remove.
17601         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
17602         (overrides): Use DECL_DESTRUCTOR_P.
17603         (check_for_override): Likewise.
17604         * decl.c (start_function): Likewise.
17605         * decl2.c (grokfclassfn): Likewise.
17606         (check_classfn): Likewise.
17607         (grok_function_init): Likewise.
17609 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
17611         * decl2.c (grokfield): Issue error on illegal data member
17612         declaration.
17614 2000-04-17  Mark P Mitchell  <mark@codesourcery.com>
17616         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
17618 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
17620         * class.c (build_vtable_entry): Don't build thunks for type-info
17621         functions.
17623 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
17625         * decl.c (decls_match): Allow a redeclaration of a builtin to
17626         specify args while the builtin did not.
17628 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
17630         * cp-tree.def (THUNK_DECL): Add to documentation.
17631         * cp-tree.h (flag_huge_objects): Declare.
17632         * class.c (modify_vtable_entry): Tidy.
17633         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
17634         Calculate delta appropriately for the new ABI.
17635         (dfs_modify_vtables): Use it.
17636         (modify_all_vtables): Fix thinko in code to add overriding copies
17637         of functions to primary vtables.
17638         (build_clone): Fix typo in comment.
17639         (clone_function_decl): Correct order of destructors in vtable.
17640         (build_vbase_offset_vtbl_entries): Adjust comment.
17641         (dfs_vcall_offset_queue_p): Remove.
17642         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
17643         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
17644         (build_vtable_entry): Correct check for pure virtual functions.
17645         Don't declare flag_huge_objects.
17646         * decl.c (flag_huge_objects): Remove declaration.
17647         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
17648         Use int_size_in_bytes.
17649         (emit_thunk): Handle vcall offset thunks.
17651 2000-04-15  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
17653         * decl2.c (parse_time, varconst_time): Delete declarations.
17654         (finish_file): Delete LINENO declaration.
17655         START_TIME and THIS_TIME now long.
17657 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
17659         * class.c (build_base_field): Reformat comment.
17661         * inc/cxxabi.h (stddef.h): Comment inclusion.
17662         (__base_class_info::__offset): Comment shift.
17664 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
17666         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
17667         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
17668         (cp_push_exception_identifier): New macro.
17669         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
17670         (DECL_BASE_DESTRUCTOR_P): Likewise.
17671         (DECL_DELETING_DESTRUCTOR_P): Likewise.
17672         (get_vtbl_decl_for_binfo): Fix formatting.
17673         (in_charge_arg_for_name): New macro.
17674         (maybe_build_cleanup_and_delete): Remove declaration.
17675         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
17676         (in_charge_arg_for_name): New function.
17677         (build_new_method_call): Use it.  Handle cloned destructors.
17678         (build_clone): Don't make the base constructor virtual.
17679         Automatically defer generated functions.
17680         (clone_function_decl): Handle destructors, too.
17681         (clone_constructors_and_destructors): Likewise.
17682         (create_vtable_ptr): Don't create a vtable entry for a cloned
17683         function.
17684         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
17685         (initialize_predefined_identifiers): Update appropriately.
17686         (finish_destructor_body): Simplify.
17687         (maybe_build_cleanup_and_delete): Remove.
17688         * except.c (expand_throw): Handle new-ABI destructors.
17689         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
17690         (build_dtor_call): New function.
17691         (build_delete): Use it.  Simplify.
17692         * optimize.c (maybe_clone_body): Handle destructors.
17693         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
17695         * exception.cc (cleanup_fn): New typedef.
17696         (CALL_CLEANUP): New macro.
17697         (cp_eh_info): Use them.
17698         (__cp_push_exception): Likewise.
17699         (__cp_pop_exception): Likewise.
17701 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
17703         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
17704         (complete_dtor_identifier): New macro.
17705         (CLASSTYPE_FIRST_CONVERSION): Remove.
17706         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
17707         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
17708         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
17709         (CLASSTYPE_CONSTRUCTORS): Likewise.
17710         (CLASSTYPE_DESTRUCTORS): Likewise.
17711         (lang_decl): Add cloned_function.
17712         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
17713         (DECL_BASE_CONSTRUCTOR_P): Likewise.
17714         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
17715         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
17716         (DECL_CLONED_FUNCTION_P): Likewise.
17717         (DECL_CLONED_FUNCTION): Likewise.
17718         (clone_function_decl): Declare.
17719         (maybe_clone_body): Likewise.
17720         * call.c (build_user_type_conversion_1): Call complete object
17721         constructors in the new ABI.
17722         (build_new_method_call): Don't add in-charge parameters under the
17723         new ABI.
17724         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
17725         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
17726         CLASSTYPE_DESTRUCTOR_SLOT.
17727         (build_clone): New function.
17728         (clone_function_decl): Likewise.
17729         (clone_constructors_and_destructors): Likewise.
17730         (check_bases_and_members): Use it.
17731         * decl.c (iniitialize_predefined_identifiers): Initialize
17732         complete_dtor_identifier.
17733         (finish_function): Don't add extra code to a clone.
17734         (lang_mark_tree): Mark cloned_function.
17735         * decl2.c (mark_used): Don't bother trying to instantiate things
17736         we synthesized.
17737         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
17738         * method.c (set_mangled_name_for_decl): Don't treat clones as
17739         constructors.
17740         (synthesize_method): Sythesize cloned functions, not the clones.
17741         * optimize.c (inline_data): Update comment on ret_label.
17742         (remap_block): Don't assume DECL_INITIAL exists.
17743         (copy_body_r): Allow ret_label to be NULL.
17744         (maybe_clone_body): Define.
17745         * pt.c (tsubst_decl): Handle clones.
17746         (instantiate_clone): New function.
17747         (instantiate_template): Use it.
17748         (set_mangled_name_for_template_decl): Don't treat clones as
17749         constructors.
17750         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
17751         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
17752         * semantics.c (expand_body): Clone function bodies as necessary.
17754         * optimize.c (remap_decl): Avoid sharing structure for arrays
17755         whose size is only known at run-time.
17756         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
17758         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
17759         to has_in_charge_parm_p.
17760         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
17761         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
17762         (DECL_COPY_CONSTRUCTOR_P): New macro.
17763         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
17764         (build_user_type_conversion_1): Likewise.
17765         (convert_like_real): Likewise.
17766         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
17767         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
17768         (copy_args_p): Likewise.
17769         (grok_ctor_properties): Likewise.
17770         (start_function): Likewise.
17771         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
17772         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
17773         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
17774         * method.c (do_build_copy_constructor): Use
17775         DECL_HAS_IN_CHARGE_PARM_P.
17776         (synthesize_method): Likewise.
17777         * pt.c (instantiate_template): Remove goto.
17778         * tree.c (build_cplus_method_type): Remove mention of obstacks in
17779         comment.
17781         * cp-tre.h (finish_function): Change prototype.
17782         * decl.c (end_cleanup_fn): Adjust caller.
17783         (finish_function): Take only one parameter.
17784         * decl2.c (finish_objects): Adjust caller.
17785         (finish_static_storage_duration_function): Likewise.
17786         * method.c (emit_thunk): Likewise.
17787         * parse.y: Likewise.
17788         * parse.c: Regenerated.
17789         * pt.c (instantiate_decl): Likewise.
17790         * rtti.c (synthesize_tinfo_fn): Likewise.
17791         * semantics.c (expand_body): Likewise.
17793         * cp-tree.h (copy_decl): New function.
17794         * class.c (finish_struct_1): Use it.
17795         * lex.c (copy_decl): Define it.
17796         * pt.c (tsubst_decl): Likewise.
17797         * tree.c (copy_template_template_parm): Likewise.
17799         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
17800         has_nonpublic_assign_ref.
17801         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
17802         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
17803         * class.c (finish_struct_methods): Don't set
17804         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
17805         (interface_only): Don't declare.
17806         (interface_unknown): Likewise.
17808 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
17810         * tree.h (HAVE_TEMPLATES): Remove definition.
17811         * lang-options.h (-fthis-is-variable): Remove documentation.
17813 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
17815         * class.c (instantiate_type): Handle object-relative template-id.
17817         * semantics.c (finish_expr_stmt): Call convert_to_void here.
17818         * decl.c (cplus_expand_expr_stmt): Not here.
17820         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
17821         Initialize exprtype earlier.
17823         * parse.y (fn.def1): Check for defining types in return types.
17825         * decl.c (check_tag_decl): Notice extra fundamental types.
17826         Diagnose empty decls in classes, too.
17828         * decl.c (grokdeclarator): Don't override an anonymous name if no
17829         declarator was given.
17831         * cvt.c (convert_to_void): Call resolve_offset_ref.
17833         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
17835         * decl2.c (decl_namespace): Handle getting a type.
17837         * typeck.c (build_c_cast): Re-enable warning for cast between
17838         pointer and integer of different size.
17840 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
17842         * inc/cxxabi.h (__pointer_type_info): Add restrict and
17843         incomplete flags.
17844         (__pointer_type_info::__pointer_catch): New virtual function.
17845         (__pointer_to_member_type_info): Derive from
17846         __pointer_type_info. Adjust.
17847         (__pointer_to_member_type_info::__do_catch): Remove.
17848         (__pointer_to_member_type_info::__is_pointer_p): Declare.
17849         (__pointer_to_member_type_info::__pointer_catch): Declare.
17850         * rtti.c (qualifier_flags): Add restrict flag.
17851         (ptmd_initializer): Reorder members.
17852         (create_tinfo_types): Expand comments. Reorder
17853         ptmd_desc_type_node members.
17854         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
17855         Implement.
17856         (__pointer_type_info::__do_catch): Move specific code into
17857         __pointer_catch. Call it.
17858         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
17859         specific catch checking. Fix void conversion check.
17860         (__pointer_to_member_type_info::__do_catch): Remove.
17861         (__pointer_to_member_type_info::__pointer_catch): Implement.
17863 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
17865         * lex.c (init_parse): Remove traces of classof and headof.
17866         * decl2.c (flag_operator_names): Default to 1.
17867         (lang_decode_option): Do not set it for -ansi.
17869 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
17871         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
17872         (DECL_MAIN_VARIANT): Remove.
17873         * decl.c (duplicate_decls): Don't set it.
17874         (start_function): Likewise.
17875         (lang_mark_tree): Don't mark it.
17876         * decl2.c (defer_fn): Don't use it.
17877         * lex.c (retrofit_lang_decl): Don't set it.
17878         * pt.c (tsubst_decl): Likewise.
17879         * ptree.c (print_lang_decl): Don't print it.
17880         * typeck.c (mark_addressable): Don't use it.
17882 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
17884         * vec.cc: Include <new> and <exception>.
17885         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
17886         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
17887         terminate.
17888         (__cxa_vec_delete): Catch dtor exceptions.
17890 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
17892         Prepend __ to implementation defined names.
17893         * inc/typeinfo (type_info): Rename _name to __name.
17894         (type_info::type_info): Rename parameter.
17895         (type_info::operator==, type_info::operator!=,
17896         type_info::before): Likewise.
17897         (type_info::is_pointer_p, type_info::is_function_p,
17898         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
17899         parameters.
17900         * inc/cxxabi.h
17901         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
17902         (__pointer_type_info::__pointer_type_info): Likewise.
17903         (__pointer_type_info::is_pointer_p,
17904         __pointer_type_info::do_catch): Prepend __. Rename parameters.
17905         (__array_type_info::__array_type_info): Rename parameters.
17906         (__function_type_info::__function_type_info): Likewise.
17907         (__function_type_info::is_function_p): Prepend __.
17908         (__enum_type_info::__enum_type_info): Rename parameters.
17909         (__pointer_to_member_type_info::__pointer_to_member_type_info):
17910         Likewise.
17911         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
17912         parameters.
17913         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
17914         (__class_type_info::__class_type_info): Rename parameters.
17915         (__class_type_info::sub_kind): Prepend __. Adjust member names.
17916         (__class_type_info::upcast_result,
17917         __class_type_info::dyncast_result): Prepend __. Move definition
17918         into tinfo.cc.
17919         (__class_type_info::do_upcast, __class_type_info::do_catch,
17920         __class_type_info::find_public_src,
17921         __class_type_info::do_dyncast,
17922         __class_type_info::do_find_public_src): Prepend __. Rename
17923         parameters.
17924         (__si_class_type_info::__si_class_type_info): Rename parameters.
17925         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
17926         __si_class_type_info::do_find_public_src): Prepent __. Rename
17927         parameters.
17928         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
17929         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
17930         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
17931         parameters.
17932         (__dynamic_cast): Rename parameters.
17933         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
17934         type_info::do_catch, type_info::do_upcast): Prepend __.
17935         (contained_p, public_p, virtual_p, contained_public_p,
17936         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
17937         (__class_type_info::do_catch,
17938         __class_type_info::do_upcast): Prepend __. Adjust.
17939         (__class_type_info::__upcast_result,
17940         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
17941         Adjust.
17942         (__class_type_info::find_public_src): Prepend __. Adjust.
17943         (__class_type_info::do_find_public_src,
17944         __si_class_type_info::do_find_public_src,
17945         __vmi_class_type_info::do_find_public_src): Likewise.
17946         (__class_type_info::do_dyncast,
17947         __si_class_type_info::do_dyncast,
17948         __vmi_class_type_info::do_dyncast): Likewise.
17949         (__class_type_info::do_upcast,
17950         __si_class_type_info::do_upcast,
17951         __vmi_class_type_info::do_upcast): Likewise.
17952         (__dynamic_cast): Adjust.
17953         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
17954         (__function_type_info::is_function_p): Likewise.
17955         (__pointer_type_info::do_catch): Likewise. Adjust.
17956         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
17957         (__throw_type_match_rtti_2): Adjust.
17958         (__is_pointer): Adjust.
17960 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
17962         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
17963         (complete_ctor_identifier): New macro.
17964         (special_function_kind): Add sfk_copy_constructor and
17965         sfk_assignment_operator.
17966         (LOOKUP_HAS_IN_CHARGE): Remove.
17967         (cons_up_default_function): Rename to ...
17968         (implicitly_declare_fn): ... this.
17969         * call.c (build_new_method_call): Add in-charge parameters for
17970         constructors here.
17971         * class.c (add_implicitly_declared_members): Change parameter name
17972         from cant_have_assignment to cant_have_const_assignment.
17973         Replace calls to cons_up_default_function to implicitly_declare_fn.
17974         * cvt.c (ocp_convert): Use complete_ctor_identifier.
17975         * decl.c (initialize_predefined_identifiers): Initialize it.
17976         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
17977         complex expression.
17978         * init.c (expand_default_init): Don't calculate the in-charge
17979         parameter here.
17980         (build_new_1): Likewise.
17981         * lex.c (cons_up_default_function): Move to method.c.
17982         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
17983         (implicitly_declare_fn): New function.
17984         * typeck.c (build_static_cast): Use complete_ctor_identifier.
17985         (build_modify_expr): Likewise.
17986         * typeck2.c (build_functional_cast): Likewise.
17988         Under the new ABI, constructors don't return `this'.
17989         * cp-tree.h (warn_reorder): Declare.
17990         (special_function_kind): New enum.
17991         (global_base_init_list): Remove declaration.
17992         (emit_base_init): Don't return a value.
17993         (check_base_init): Don't declare.
17994         (is_aggr_typedef): Likewise.
17995         * decl.c (check_special_function_return_type): New function.
17996         (return_types): Remove.
17997         (grokdeclarator): Use check_special_function_return_type.
17998         (start_function): Don't initialize ctor_label under the new ABI.
17999         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
18000         * init.c (begin_init_stmts): Move to top of file.
18001         (finish_init_stmts): Likewise.
18002         (warn_reorder): Don't declare.
18003         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
18004         value.
18005         (check_base_init): Remove.
18006         (is_aggr_typedef): Likewise.
18007         (build_new_1): Don't use the return value of a constructor.
18008         * semantics.c (setup_vtbl_ptr): Don't use the return value
18009         of emit_base_init.
18010         * typeck.c (check_return_expr): Don't magically convert return
18011         statements into `return this' in constructors under the new ABI.
18013         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
18014         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
18015         (base_ctor_identifier): New macro.
18016         (base_dtor_identifier): Likewise.
18017         (deleting_dtor_identifier): Likewise.
18018         * decl.c: Don't include obstack.h.
18019         (obstack_chunk_alloc): Don't define.
18020         (obstack_chunk_free): Likewise.
18021         (struct predefined_identifier): New type.
18022         (initialize_predefined_identifiers): New function.
18023         (init_decl_processing): Use it.
18024         (debug_temp_inits): Remove.
18025         (start_method): Don't call preserve_data.
18026         (hack_incomplete_structures): Update comment.
18027         * init.c (init_init_processing): Don't initialize
18028         nelts_identifier.
18029         (build_offset_rf): Remove dead code.
18030         (build_delete): Use CLASSTYPE_N_BASECLASSES.
18031         * search.c (init_search_processing): Don't initialize
18032         vptr_identifier.
18034 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18036         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
18037         some sign_compare warnings.
18039 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
18041         Rename abi::__vmi_class_type_info members.
18042         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
18043         base_list, detail_masks members to vmi_flags, vmi_base_count,
18044         vmi_bases and vmi_flags_masks respectively.
18045         (__vmi_class_type_info::vmi_flags_masks): Rename
18046         details_unknown_mask to flags_unknown_mask.
18047         * tinfo.cc (__class_type_info::do_upcast): Adjust.
18048         (__vmi_class_type_info::do_find_public_src): Adjust.
18049         (__vmi_class_type_info::do_dyncast): Adjust.
18050         (__vmi_class_type_info::do_upcast): Adjust.
18052 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
18054         * tinfo.cc (convert_to_base): New function.
18055         (get_vbase_offset): Remove. Move into convert_to_base.
18056         (__vmi_class_type_info::do_find_public_src): Adjust.
18057         (__vmi_class_type_info::do_dyncast): Adjust.
18058         (__vmi_class_type_info::do_upcast): Adjust.
18060 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
18062         * tinfo.cc (operator=): Use __builtin_strcmp.
18063         * tinfo2.cc (before): Likewise.
18065 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
18067         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
18068         (DECL_SAVED_INLINE): Rename to ...
18069         (DECL_DEFERRED_FN): ... this.
18070         (in_function_p): Remove declaration.
18071         (mark_inline_for_output): Rename to ...
18072         (defer_fn): ... this.
18073         * decl.c (finish_function): Adjust call to mark_inline_for_output.
18074         (in_function_p): Remove definition.
18075         * decl2.c (saved_inlines): Rename to ...
18076         (deferred_fns): ... this.
18077         (saved_inlines_used): Rename to ...
18078         (deferred_fns_used): ... this.
18079         (mark_inline_for_output): Rename to ...
18080         (defer_fn): ... this.
18081         (finish_file): Adjust accordingly.
18082         (init_decl2): Likewise.
18083         * lex.c (cons_up_default_function): Likewise.
18084         * pt.c (mark_decl_instantiated): Likewise.
18085         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
18086         circumstances.
18087         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
18088         * semantics.c (expand_body): Defer more functions.
18090 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
18092         * vec.cc: New file.
18093         * Make-lang.in (CXX_LIB2FUNCS): Add it.
18094         (vec.o): Build it.
18095         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
18096         __cxa_vec_delete): Declare.
18098 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
18100         * rtti.c (dfs_class_hint_mark): New static function.
18101         (dfs_class_hint_unmark): New static function.
18102         (class_hint_flags): Use them.
18104 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
18106         * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
18108 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
18110         * cp-tree.h (instantiate_decl): Change prototype.
18111         * decl2.c (mark_used): Adjust call.
18112         * optimize.c (inlinable_function_p): Adjust handling of templates.
18113         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
18114         (do_type_instantiation): Likewise.
18115         (instantiate_decl): Defer more templates.
18116         (instantiate_pending_templates): Adjust logic to handle inline
18117         friend functions.
18119         * Makefile.in (GGC_H): New variable.  Use it throughout in place
18120         of ggc.h.
18122         * call.c: Don't include obstack.h.  Include ggc.h.
18123         (obstack_chunk_alloc): Don't define.
18124         (obstack_chunk_free): Likewise.
18125         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
18126         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
18127         (pop_switch): Free it.
18129         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
18131         * dump.c (dequeue_and_dump): Don't try to print the bit_position
18132         if we don't have a DECL_FIELD_OFFSET.
18134 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
18136         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
18137         special_function_p.
18139 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18141         * cfns.gperf (hash, libc_name_p): Prototype.
18143         * rtti.c (build_dynamic_cast_1): Constification.
18145         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
18147         * semantics.c (deferred_type_access_control): Prototype.
18149 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
18151         Correct many new ABI issues regarding vbase and vcall offset
18152         layout.
18153         * cp-tree.h (BINFO_VTABLE): Document.
18154         (struct lang_type): Tweak formatting.
18155         (BINFO_PRIMARY_BINFO): Add to documentation.
18156         (CLASSTYPE_VSIZE): Fix typo in comment.
18157         (CLASSTYPE_VBASECLASSES): Update documentation.
18158         (BINFO_VBASE_MARKED): Remove.
18159         (SET_BINFO_VBASE_MARKED): Likewise.
18160         (CLEAR_BINFO_VBASE_MARKED): Likewise.
18161         (BINFO_FIELDS_MARKED): Remove.
18162         (SET_BINFO_FIELDS_MARKED): Likewise.
18163         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
18164         (enum access_kind): New enumeration.
18165         (num_extra_vtbl_entries): Remove declaration.
18166         (size_extra_vtbl_entries): Likewise.
18167         (get_vtbl_decl_for_binfo): New function.
18168         (dfs_vbase_unmark): Remove declaration.
18169         (mark_primary_bases): Likewise.
18170         * class.c (SAME_FN): Remove.
18171         (struct vcall_offset_data_s): Move definition.
18172         (build_vbase_pointer): Use `build', not `build_binary_op', to
18173         access the vbase pointer under the new ABI.
18174         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
18175         (build_primary_vtable): Likewise.
18176         (dfs_mark_primary_bases): Move here from search.c.
18177         (mark_primary_bases): Likewise.
18178         (determine_primary_bases): Under the new ABI, don't make a base
18179         class a primary base just because we don't yet have any virtual
18180         functions.
18181         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
18182         (num_vfun_entries): Remove.
18183         (dfs_count_virtuals): Likewise.
18184         (num_extra_vtbl_entries): Likewise.
18185         (size_extra_vtbl_entries): Likewise.
18186         (layout_virtual_bases): Iterate in inheritance graph order under
18187         the new ABI.
18188         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
18189         indicate that a vfield is present.
18190         (init_class_processing): Initialize access_public_node, etc., from
18191         ak_public, etc.
18192         (get_vtbl_decl_for_binfo): New function.
18193         (dump_class_hierarchy_r): Likewise.
18194         (dump_class_hierarchy): Use it.
18195         (finish_vtbls): Build the vtbls in inheritance graph order.
18196         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
18197         (initialize_vtable): Use get_vtbl_decl_for_binfo.
18198         (accumulate_vtbl_inits): Add comments explaining why a pre-order
18199         walk is required.
18200         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
18201         where the vptr points, even for primary vtables.
18202         (build_vtbl_initializer): Adjust handling of vbase and vcall
18203         offsets.
18204         (build_vcall_and_vbase_vtable_entries): New function.
18205         (dfs_build_vbase_offset_vtbl_entries): Remove.
18206         (build_vbase_offset_vtbl_entries): Reimplement.
18207         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
18208         were already handled in a primary base class vtable.
18209         (build_vcall_offset_vtbl_entries): Adjust.
18210         (build_rtti_vtbl_entries): Adjust.
18211         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
18212         * init.c (expand_virtual_init): Simplify.
18213         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
18214         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
18215         * search.c (BINFO_ACCESS): New macro.
18216         (SET_BINFO_ACCESS): Likewise.
18217         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
18218         (access_in_type): Likewise.
18219         (dfs_accessible_p): Likewise.
18220         (protected_accessible_p): Likewise.
18221         (lookup_fnfields_1): Adjust documentation.
18222         (dfs_mark_primary_bases): Move to class.c
18223         (mark_primary_bases): Likewise.
18224         (dfs_vbase_unmark): Remove.
18225         (virtual_context): Use BINFO_FOR_VBASE.
18226         (dfs_get_vbase_types): Simplify.
18227         (dfs_build_inheritance_graph_order): New function.
18228         (get_vbase_types): Use it.
18229         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
18231         * tinfo.cc (get_vbase_offset): New function.
18232         (__vmi_class_type_info::do_find_public_src): Use it.
18233         (__vmi_class_type_info::do_dyncast): Likewise.
18234         (__vmi_class_type_info::do_upcast): Likewise.
18236 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
18238         * lang-specs.h: Pass -fno-show-column to the preprocessor.
18240 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
18242         * rtti.c (class_hint_flags): Rename flags.
18243         (class_initializer): Remove flags.
18244         (synthesize_tinfo_var): Combine offset and flags. Add flags
18245         for __vmi_class_type_info.
18246         (create_tinfo_types): Remove flags from __class_type_info and
18247         __si_class_type_info. Merge flags and offset from
18248         base_class_type_info.
18249         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
18250         (__base_class_info::is_virtual_p): Adjust.
18251         (__base_class_info::is_public_p): Adjust.
18252         (__base_class_info::offset): New accessor.
18253         (__class_type_info::details): Remove member.
18254         (__class_type_info::__class_type_info): Lose details.
18255         (__class_type_info::detail_masks): Remove.
18256         (__si_class_type_info::__si_class_type_info): Lose details.
18257         (__vmi_class_type_info::details): New member.
18258         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
18259         (__vmi_class_type_info::detail_masks): New member.
18260         * tinfo.cc (__class_type_info::do_upcast): Initialize result
18261         with unknown_details_mask.
18262         (__vmi_class_type_info::do_find_public_src): Adjust
18263         (__vmi_class_type_info::do_dyncast): Adjust.
18264         (__vmi_class_type_info::do_upcast): Set result details, if
18265         needed. Adjust.
18266         (__dynamic_cast): Temporarily #if out optimization.
18268 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
18270         * rtti.c (get_tinfo_decl): Mark used.
18271         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
18272         mark as dealt with, if we output it.
18274 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
18276         * class.c: Reorganize to put virtual function table initialization
18277         machinery at the end of the file.
18279 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
18281         * class.c (finish_struct): Use bitsize_zero_node.
18282         * pt.c (instantiate_class_template): Likewise.
18284 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
18286         Put RTTI entries at negative offsets in new ABI.
18287         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
18288         vbase offset at index -3, not -1.
18289         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
18290         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
18291         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
18292         (build_rtti_vtbl_entries): New function.
18293         (set_rtti_entry): Remove.
18294         (build_primary_vtable): Don't use it.
18295         (build_secondary_vtable): Likewise.
18296         (start_vtable): Remove.
18297         (first_vfun_index): New function.
18298         (set_vindex): Likewise.
18299         (add_virtual_function): Don't call start_vtable.  Do call
18300         set_vindex.
18301         (set_primary_base): Rename parameter.
18302         (determine_primary_base): Likewise.
18303         (num_vfun_entries): Don't use skip_rtti_stuff.
18304         (num_extra_vtbl_entries): Include RTTI information.
18305         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
18306         (skip_rtti_stuff): Remove.
18307         (dfs_modify_vtables): Don't use it.
18308         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
18309         (layout_nonempty_base_or_field): Update size handling.
18310         (create_vtable_ptr): Tweak.
18311         (layout_class_type): Adjust parameter names.
18312         (finish_struct_1): Simplify.
18313         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
18314         (skip_rtti_stuff): Remove.
18315         (first_vfun_index): New function.
18316         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
18317         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
18318         (marked_vtable_pathp): Declare.
18319         (unmarked_vtable_pathp): Likewise.
18320         * error.c (dump_expr): Use first_vfun_index to calculate vtable
18321         offsets.
18322         * rtti.c (build_headof): Look for RTTI at negative offsets.
18323         (get_tinfo_decl_dynamic): Likewise.
18324         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
18325         here.
18326         (create_pseudo_type_info): Do it here instead.  Adjust so that
18327         vptr points at first virtual function.
18328         * search.c (marked_vtable_pathp): Make it global.
18329         (unmarked_vtable_pathp): Likewise.
18330         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
18331         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
18332         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
18333         (get_pure_virtuals): Likewise.
18334         (expand_upcast_fixups): Likewise.
18335         * tree.c (debug_binfo): Likewise.
18336         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
18337         negative offset.
18339 2000-03-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
18341         * class.c (check_field_decl): Fix typo.
18342         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
18343         (check_methods): Likewise.
18344         (check_field_decls): Likewise.
18345         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
18346         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
18347         Use DECL_RESULT_FLD, not DECL_RESULT.
18348         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
18349         * lex.c (identifier_type): Likewise.
18350         * pt.c (determine_specialization, lookup_template_class): Likewise.
18351         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
18352         (resolve_overloaded_unification, more_specialized): Likewise.
18353         * semantics.c (finish_member_declaration): Likewise.
18354         * typeck.c (build_x_function_call): Likewise.
18356 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
18358         * class.c (layout_empty_base): Handle empty bases with non-byte
18359         alignment.
18360         (build_base_field): Likewise.
18361         (layout_virtual_bases): Likewise.
18363         * class.c (finish_struct_1): Fix typo in this change:
18365         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
18367 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
18369         * decl.c (grokdeclarator): Count partial specializations when
18370         keeping track of how many template classes have been seen.
18372         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
18374 2000-03-25  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
18376         * class.c (build_vbase_pointer_fields): layout_field now place_field.
18377         (get_vfield_offset): Use byte_position.
18378         (set_rtti_entry): Set OFFSET to ssizetype zero.
18379         (get_binfo_offset_as_int): Deleted.
18380         (dfs_record_base_offsets): Use tree_low_cst.
18381         (dfs_search_base_offsets): Likewise.
18382         (layout_nonempty_base_or_field): Reflect changes in RLI format
18383         and call byte_position.
18384         (layout_empty_base): Convert offset to ssizetype.
18385         (build_base_field): use rli_size_unit_so_far.
18386         (dfs_propagate_binfo_offsets): Do computation in proper type.
18387         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
18388         (layout_class_type): Reflect changes in RLI names and fields.
18389         (finish_struct_1): Set DECL_FIELD_OFFSET.
18390         * dump.c (dequeue_and_dump): Call bit_position.
18391         * expr.c (cplus_expand_constant): Use byte_position.
18392         * rtti.c (expand_class_desc): Use bitsize_one_node.
18393         * typeck.c (build_component_addr): Use byte_position and don't
18394         special case for zero offset.
18396 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
18398         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
18400         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
18401         tinfo object.
18402         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
18403         vtable.
18405 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
18407         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
18408         DECL_P macros.
18409         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
18410         make_typename_type, check_initializer, cp_finish_decl,
18411         xref_tag): Likewise.
18412         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
18413         decl_namespace, arg_assoc_template_arg, arg_assoc,
18414         validate_nonmember_using_decl, do_class_using_decl): Likewise.
18415         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
18416         args_to_string): Likewise.
18417         * friend.c (is_friend): Likewise.
18418         * lex.c (note_got_semicolon, note_list_got_semicolon,
18419         is_global): Likewise.
18420         * method.c (build_overload_nested_name, build_overload_value,
18421         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
18422         * parse.y (typename_sub, typename_sub1): Likewise.
18423         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
18424         process_partial_specialization, convert_template_argument,
18425         template_args_equal, add_pending_template, lookup_template_class,
18426         for_each_template_parm_r, maybe_fold_nontype_arg,
18427         tsubst, instantiate_template, type_unification_real, unify,
18428         instantiate_pending_templates, set_mangled_name_for_template_decl):
18429         Likewise.
18430         * repo.c (repo_get_id, repo_template_used): Likewise.
18431         * search.c (lookup_field_1): Likewise.
18432         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
18433         * xref.c (classname): Likewise.
18435 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
18437         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
18438         (CANONICAL_BINFO): New macro.
18439         (BINFO_NEW_VTABLE_MARKED): Use it.
18440         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
18441         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
18442         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
18443         not TREE_TYPE.
18444         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
18445         (build_secondary_vtable): Likewise.
18446         (dfs_finish_vtbls): Likewise.
18447         (dfs_accumulate_vtbl_inits): Likewise.
18448         (accumulate_vtbl_inits): New function.
18449         (finish_vtbls): Make sure that virtual bases come after
18450         non-virtual bases in the vtable group.
18451         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
18452         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
18453         * search.c (struct vbase_info): Move definition.
18454         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
18455         (unmarked_new_vtable_p): Likewise.
18456         (dfs_mark_vtable_path): Remove.
18457         (dfs_mark_new_vtable): Remove.
18458         (dfs_unmark_new_vtable): Likewise.
18459         (dfs_clear_search_slot): Likewise.
18460         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
18461         (dfs_clear_vbase_slots): Likewise.
18462         (init_vbase_pointers): LIkewise.
18464 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
18466         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
18467         SIZETYPE to a non-SIZETYPE.
18469 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
18471         * class.c (layout_virtual_bases): Adjust names in conditionally
18472         compiled code.
18474         * class.c (record_base_offsets): New function.
18475         (layout_conflict_p): Likewise.
18476         (layout_nonempty_base_or_field): Use it.
18477         (layout_empty_base): New function.
18478         (build_base_field): Use it.
18479         (build_base_fields): Update comment.
18480         (layout_virtual_bases): Fold in a little code form
18481         layout_basetypes.  Use layout_empty_base.
18482         (layout_basetypes): Remove.
18483         (end_of_class): New function.
18484         (layout_class_type): Use it.  Adjust.
18486         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
18487         (fntype_p): Remove.
18488         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
18489         comment.
18490         (dfs_skip_nonprimary_vbases_markedp): Likewise.
18491         * typeck.c (fntype_p): Remove.
18493         * cp-tree.h (TI_SPEC_INFO): Remove.
18494         (CLASSTYPE_TI_SPEC_INFO): Likewise.
18495         * pt.c (process_partial_specialization): Likewise.
18497         * class.c (build_base_field): Fix thinko in computation of binfo
18498         offsets.
18500         * tree.c (mark_local_for_remap_p): Mark variables declared in
18501         TARGET_EXPRs as well.
18503 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
18505         * typeck.c (require_complete_type, complete_type,
18506         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
18507         build_array_ref, convert_arguments, pointer_diff,
18508         build_x_unary_op, build_unary_op, build_c_cast,
18509         build_modify_expr): Use COMPLETE_TYPE_P etc.
18510         * call.c (is_complete, convert_like_real,
18511         build_new_method_call): Likewise.
18512         * class.c (build_vbase_pointer_fields, check_bases,
18513         build_base_field, finish_struct_1, pushclass): Likewise.
18514         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
18515         * decl.c (maybe_process_template_type_declaration, pushtag,
18516         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
18517         layout_var_decl, check_initializer, cp_finish_decl,
18518         grokdeclarator, require_complete_types_for_parms,
18519         grok_op_properties, xref_tag, xref_basetypes,
18520         check_function_type): Likewise.
18521         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
18522         * friend.c (do_friend): Likewise.
18523         * init.c (build_offset_ref): Likewise.
18524         * parse.y (structsp): Likewise.
18525         * pt.c (maybe_process_partial_specialization,
18526         tsubst_friend_function, instantiate_class_template, tsubst,
18527         do_type_instantiation, instantiate_pending_templates): Likewise.
18528         * repo.c (repo_get_id): Likewise.
18529         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
18530         synthesize_tinfo_var, emit_support_tinfos): Likewise.
18531         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
18532         * semantics.c (begin_class_definition): Likewise.
18533         * tree.c (build_cplus_method_type): Likewise.
18534         * typeck2.c (digest_init, build_functional_cast,
18535         add_exception_specifier): Likewise.
18536         * parse.h, parse.c: Regenerated.
18538 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
18540         * inc/cxxabi.h: New header file. Define new-abi entry points.
18541         (__pointer_type_info::target): Rename member to ...
18542         (__pointer_type_info::type): ... here.
18543         (__base_class_info::type): Rename member to ...
18544         (__base_class_info::base): ... here.
18545         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
18546         * cp-tree.h (CPTI_ABI): New global tree enumeration.
18547         (abi_node): New global tree node.
18548         * decl.c (abi_node): Document.
18549         (init_decl_processing): Initialize abi_node.
18550         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
18551         (get_vmi_pseudo_type_info): Likewise.
18552         (create_tinfo_types): Likewise.
18553         (emit_support_tinfos): Likewise.
18554         * tinfo.h (cxxabi.h): Include for new-abi.
18555         Move rtti class definitions to new header file.
18556         * tinfo.cc (abi): Use the namespace.
18557         (std): Move new abi rtti classes from here ...
18558         (__cxxabiv1): ... to here.
18559         * tinfo2.cc (cxxabi.h): Include for new-abi.
18560         Move rtti class definitions to new header file.
18561         (std): Move new abi rtti classes from here ...
18562         (__cxxabiv1): ... to here.
18563         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
18564         namespace.
18566 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
18567             Jason Merrill  <jason@casey.cygnus.com>
18569         * method.c (build_overload_int): Use host_integerp.
18571 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
18573         * init.c (build_offset_ref): Handle the case of a templated member
18574         function.
18576 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
18578         * except.c (expand_exception_blocks): Clear catch_clauses_last.
18580 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
18582         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
18583         * class.c (check_bitfield_decl): Turn illegal bitfields into
18584         non-bitfields.
18585         (dfs_propagate_binfo_offsets): Adjust for new size_binop
18586         semantics.
18587         (dfs_offset_for_unshared_vbases): Likewise.
18588         * cvt.c (cp_convert_to_pointer): Convert NULL to a
18589         pointer-to-member correctly under the new ABI.
18590         * expr.c (cplus_expand_constant): Don't use cp_convert when
18591         turning an offset into a pointer-to-member.
18592         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
18593         when dereferencing them under the new ABI.
18594         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
18595         of pointers-to-members under the new ABI.
18597         * class.c (check_bitfield_decl): Remove restriction on really long
18598         bitfields.
18599         (layout_class_type): Implement new ABI handling of bitfields
18600         longer than their types.
18602 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
18604         * parse.y (extdefs): Call ggc_collect.
18605         * parse.c: Regenerated.
18607 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
18609         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
18610         (note_name_declared_in_class): Use OVL_CURRENT to get at a
18611         potential overload.
18613 2000-03-17  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
18615         * class.c (build_vbase_path): Use integer_zerop.
18616         (build_vtable_entry): Use tree_low_cst.
18617         (get_vfield_offset): Use bit_position.
18618         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
18619         Use tree_low_cst.
18620         (check_bitfield_decl): Set DECL_SIZE using convert.
18621         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
18622         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
18623         Use tree_low_cst.
18624         (finish_struct_1): Use bit_position.
18625         (dump_class_hierarchy): Use tree_low_cst.
18626         * cp-tree.h (min_precision): Add declaration.
18627         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
18628         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
18629         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
18630         * expr.c (cplus_expand_constant): Use bit_position.
18631         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
18632         * rtti.c (get_base_offset): Use bit_position.
18633         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
18634         host_integerp, and tree_low_cst.
18635         (pointer_int_sum): Use integer_zerop.
18636         (build_component_addr): Use bit_position.
18638 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
18640         * typeck.c (require_complete_type): Don't assume size_zero_node.
18641         (complete_type_or_else): Likewise.
18643 2000-03-16  Steven Grady <grady@digitaldeck.com>
18644             Jason Merrill  <jason@casey.cygnus.com>
18646         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
18648 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
18650         * decl2.c (grokfield): Bail out if type is error_mark_node.
18652 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
18654         * tinfo2.cc (__ptr_to_member_data): Rename to ...
18655         (__pointer_to_member_data): ... here. Adjust.
18656         * rtti.c (create_tinfo_types): Adjust.
18658 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
18660         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
18661         * decl.c (ref_desc_type_node): Undocument.
18662         * rtti.c (ptr_ref_initializer): Rename to ...
18663         (ptr_initializer): ... here. Adjust comments.
18664         (ptmd_initializer): Fix comment thinko.
18665         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
18666         (create_tinfo_types): Remove ref_desc_type_node init.
18667         * tinfo2.cc (__reference_type_info): Remove.
18669 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
18671         * decl.c (cp_finish_decl): Remove obsolete comment.
18673         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
18675 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
18677         * cp-tree.h: Tweak documentation.
18678         * class.c (build_vbase_pointer_fields): Layout the fields, too.
18679         (avoid_overlap): Remove.
18680         (get_binfo_offset_as_int): New function.
18681         (dfs_serach_base_offsets): Likewise.
18682         (layout_nonempty_base_or_field): Likewise.
18683         (build_base_field): Layout fields here.  Avoid placing two objects
18684         of the same type at the same address, under the new ABI.
18685         (build_base_fields): Adjust accordingly.
18686         (create_vtable_ptr): Return the new field, but don't attach it to
18687         TYPE_FIELDS.
18688         (remove_base_field): Remove.
18689         (remove_base_fields): Remove.
18690         (layout_basetypes): Adjust accordingly.
18691         (layout_class_type): Call layout_field for each field, rather than
18692         just making a wholesale call to layout_type.
18694 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
18696         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
18698 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
18700         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
18702         * except.c (dtor_nothrow): New fn.
18703         (do_pop_exception): Use it.  Take type parm.
18704         (push_eh_cleanup): Take type parm.
18705         (expand_start_catch_block): Pass it.
18706         (build_eh_type_type_ref): Accept null type.
18708 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
18710         * cp-tree.h (revert_static_member_fn): Change prototype.
18711         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
18712         (grok_op_properties): Likewise.
18713         (start_function): Likewise.
18714         (revert_static_member_fn): Simplify.
18715         * pt.c (check_explicit_specialization): Adjust call to
18716         revert_static_member_fn.
18718 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
18720         * cp-tree.h (scope_kind): New type.
18721         (tmpl_spec_kind): Likewise.
18722         (declare_pseudo_global_level): Remove.
18723         (pseudo_global_level_p): Rename to template_parm_scope_p.
18724         (pushlevel): Remove declaration.
18725         (begin_scope): New function.
18726         (finish_scope): Likewise.
18727         (current_tmpl_spec_kind): Likewise.
18728         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
18729         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
18730         Add template_spec_p.
18731         (toplevel_bindings_p): Adjust.
18732         (declare_pseudo_global_level): Remove.
18733         (pseudo_global_level_p): Rename to template_parm_scope_p.
18734         (current_tmpl_spec_kind): New function.
18735         (begin_scope): Likewise.
18736         (finish_scope): Likewise.
18737         (maybe_push_to_top_level): Adjust.
18738         (maybe_process_template_type_declaration): Likewise.
18739         (pushtag): Likewise.
18740         (pushdecl_nonclass_level): Likewise.
18741         (lookup_tag): Likewise.
18742         (grokfndecl): Handle member template specializations.  Share
18743         constructor and non-constructor code.
18744         * decl2.c (check_classfn): Handle member template specializations.
18745         * pt.c (begin_template_parm_list): Use begin_scope.
18746         (begin_specialization): Likewise.
18747         (end_specialization): Likewise.
18748         (check_explicit_specialization): Use current_tmpl_spec_kind.
18749         Handle member template specializations.
18750         (end_template_decl): Use finish_scope.  Remove call to
18751         get_pending_sizes.
18752         (push_template_decl_real): Remove bogus error message.
18753         (tsubst_decl): Fix typo in code contained in comment.
18754         (instantiate_template): Handle member template specializations.
18755         (most_general_template): Likewise.
18757 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
18759         * lex.c (whitespace_cr): Compress consecutive calls to warning().
18760         (do_identifier): Ditto for error().
18762         * pt.c (convert_nontype_argument): Ditto for cp_error().
18763         (convert_template_argument): Ditto for cp_pedwarn().
18765 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
18767         * exception.cc (__check_null_eh_spec): New fn.
18768         * except.c (expand_end_eh_spec): Call it if the spec is throw().
18770 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
18772         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
18773         * except.c (expand_end_eh_spec): Add the return type.
18774         * rtti.c (throw_bad_cast): Add the parmtypes.
18775         (throw_bad_typeid): Likewise.
18777         * semantics.c (expand_stmt): Only leave out rtl for unused
18778         artificials, and set DECL_IGNORED_P on them as well.
18779         * decl.c (wrapup_globals_for_namespace): Likewise.
18781 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
18783         * decl.c (maybe_commonize_var): Skip all artificial decls.
18784         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
18786 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
18788         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
18789         * cp-tree.h: Declare flag_enforce_eh_specs.
18790         * decl.c (store_parm_decls, finish_function): Check it.
18792         C library functions don't throw.
18793         * Makefile.in (cfns.h): New target.
18794         (except.o): Depend on it.
18795         * Make-lang.in (cc1plus): Depend on cfns.gperf.
18796         * cfns.gperf: New file.
18797         * cfns.h: Generated.
18798         * except.c: Include it.
18799         (nothrow_libfn_p): New fn.
18800         * decl.c (grokfndecl): Use it.
18801         * cp-tree.h: Declare it.
18803         * decl.c (push_overloaded_decl_1, auto_function,
18804         define_function): Lose.
18805         (build_library_fn_1): New static fn.
18806         (builtin_function): Use it.
18807         (get_atexit_node): Use build_library_fn_ptr.
18808         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
18809         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
18810         push_void_library_fn, push_throw_library_fn): New fns.
18811         * cp-tree.h: Declare them.
18812         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
18813         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
18814         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
18815         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
18816         * rtti.c (build_runtime_decl): Lose.
18817         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
18818         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
18819         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
18821         * call.c (build_call): Remove result_type parm.
18822         Call mark_used on unused artificial fns.
18823         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
18825 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
18827         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
18828         appropriate.
18829         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
18830         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
18831         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
18832         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
18833         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
18834         expand_generic_desc): Likewise.
18836 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
18838         * exception.cc (__cp_pop_exception): Cleanup the original object.
18840 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
18842         * decl.c (grok_op_properties): Merge conversion to void warning
18843         with other silly op warnings.
18845 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
18847         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
18848         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
18850 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
18852         * decl.c (cp_make_fname_decl): New function.
18853         (wrapup_globals_for_namespace): Don't emit unused static vars.
18854         (init_decl_processing): Remove comment about use of
18855         array_domain_type. Set make_fname_decl.
18856         (cp_finish_decl): Remove __FUNCTION__ nadgering.
18857         * semantics.c (begin_compound_stmt): Remove
18858         current_function_name_declared flagging.
18859         (expand_stmt): Don't emit unused local statics.
18860         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
18861         specially.
18863 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
18865         * typeck.c (convert_for_assignment): Don't look at array
18866         initializer.
18867         * call.c (convert_like_real): Likewise.
18869 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
18871         Add initial support for '\uNNNN' specifier.
18872         * lex.c (read_ucs): New fn.
18873         (readescape, skip_white_space): Call it.
18874         (is_extended_char, is_extended_char_1): New fns.
18875         (utf8_extend_token): New fn, #if 0'd out.
18876         (real_yylex): Treat extended chars like letters.
18878         * search.c (note_debug_info_needed): Walk the bases even if we
18879         weren't deferring the type itself.
18881 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18883         * decl2.c (finish_objects): Constify a char*.
18885         * method.c (emit_thunk): Likewise.
18887 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
18889         * typeck.c (dubious_conversion_warnings): Look through
18890         REFERENCE_TYPE.
18892 2000-03-06  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
18894         * class.c (dfs_modify_vtables): I is now unsigned.
18895         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
18896         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
18897         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
18898         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
18899         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
18900         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
18901         Call integer_all_onesp.
18902         * typeck2.c (process_init_constructor): Use compare_tree_int.
18904         * lang-specs.h (as): Don't call if -syntax-only.
18906 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
18908         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
18909         RTL_EXPR_HAS_NO_SCOPE after all.
18911 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
18913         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
18914         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
18915         RTL_EXPR_HAS_NO_SCOPE.
18917         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
18918         later.
18920         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
18922 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
18924         * call.c (convert_like): Macrofy.
18925         (convert_like_with_context): New macro.
18926         (convert_like_real): Renamed from convert_like.  Add calling
18927         context parameters, for diagnostics. Add recursive flag.  Call
18928         dubious_conversion_warnings for outer conversion.
18929         (build_user_type_conversion): Use convert_like_with_context.
18930         (build_over_call): Likewise. Don't warn about dubious
18931         conversions here. Adjust convert_default_arg calls.
18932         (convert_default_arg): Add context parameters for diagnostics.
18933         Pass through to convert_like_with_context.
18934         * cp-tree.h (convert_default_arg): Add context parameters.
18935         (dubious_conversion_warnings): Prototype new function.
18936         * typeck.c (convert_arguments): Adjust convert_default_arg call.
18937         (dubious_conversion_warnings): New function, broken
18938         out of convert_for_assignment.
18939         (convert_for_assignment): Adjust.
18941 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
18943         * decl2.c (key_method): Break out from...
18944         (import_export_vtable, import_export_class): ...here.
18946         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
18947         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
18949         * search.c (note_debug_info_needed, dfs_debug_mark,
18950         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
18951         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
18953 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
18955         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
18956         typos.
18958 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
18960         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
18961         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
18962         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
18963         (lang_type): Split gets_new into has_new and has_array_new.
18964         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
18965         (TYPE_GETS_NEW): Split into ...
18966         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
18967         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
18968         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
18969         (build_op_new_call): Don't declare.
18970         (build_new_1): Likewise.
18971         * call.c (build_op_new_call): Remove.
18972         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
18973         instead of TYPE_NEEDS_DESTRUCTOR.
18974         (finish_struct_bits): Likewise.
18975         (add_implicitly_declared_members): Likewise.
18976         (check_field_decl): Likewise.
18977         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
18978         correctly under the new ABI.
18979         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
18980         instead of TYPE_NEEDS_DESTRUCTOR.
18981         (initialize_local_var): Likewise.
18982         (destroy_local_var): Likewise.
18983         (cp_finish_decl): Likewise.
18984         (register_dtor_fn): Likewise.
18985         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
18986         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
18987         TYPE_VEC_DELETE_TAKES_SIZE here.
18988         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
18989         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
18990         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
18991         (finish_destructor_body): Likewise.
18992         (maybe_build_cleanup_1): Likewise.
18993         * decl2.c (do_static_destruction): Likewise.
18994         * init.c (build_new_1): Make it static.
18995         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
18996         (expand_cleanup_for_base): Likewise.
18997         (get_cookie_size): New function.
18998         (build_new_1): Handle array-new cookies correctly under the new
18999         ABI.
19000         (build_vec_delete_1): Likewise.
19001         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
19002         (build_delete): Likewise.
19003         (build_vec_delete): Handle array-new cookies correctly under the new
19004         ABI.
19005         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
19006         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
19007         TYPE_HAS_ARRAY_NEW_OPERATOR.
19008         * ptree.c (print_lang_type): Check them.
19009         * search.c (context_for_name_lookup): Fix typo in comment.
19010         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
19011         * tree.c (break_out_cleanups): Likewise.
19012         (build_cplus_array_test_1): Likewise.
19013         (cp_build_qualified_type_real): Likewise.
19014         * typeck.c (complete_type): Likewise.
19016         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
19017         the command-line, not the end.
19019 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
19021         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
19023 2000-03-02  Tom Tromey  <tromey@cygnus.com>
19025         * cp-tree.h (build_java_class_ref): Declare.
19026         * init.c (build_java_class_ref): No longer static.
19027         * except.c (expand_throw): Generate a Java-style `throw' if the
19028         thrown object is a "Java" object.
19029         (initialize_handler_parm): Generate a Java-style lookup of
19030         exception info if the caught object is a "Java" object.
19031         (catch_language, catch_language_init): New globals.
19032         (decl_is_java_type): New function.
19033         (expand_start_catch_block): Don't call push_eh_info() or
19034         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
19035         class reference to build_catch_block.
19037 2000-03-02  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19039         * typeck.c (comptypes): Treat sizetype like its language equivalent.
19041 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
19043         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
19044         to merge reference/pointer code and fix incorrect warnings.
19046 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
19048         * search.c (protected_accessible_p): Use context_for_name_lookup.
19050         * init.c (construct_virtual_bases): Fix thinko.
19051         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
19053 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
19055         * decl.c (current_function_decl): Move to toplev.c.
19057 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
19059         * pt.c (fn_type_unification): Unify return type, whenever
19060         provided.
19061         (get_bindings_real): Only pass return type when necessary.
19062         Remove explicit return type check.
19063         * class.c (resolve_address_of_overloaded_function): Pass desired
19064         return type to fn_type_unification.
19066 2000-02-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19068         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
19069         DECL_FIELD_SIZE.
19070         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
19071         DECL_FIELD_SIZE.
19072         * rtti.c (expand_class_desc): Likewise.
19073         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
19074         (THUNK_VCALL_OFFSET): Likewise.
19075         (THUNK_DELTA): Reflect changes in ../tree.h.
19077 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
19079         * search.c (protected_accessible_p): Also allow the access if
19080         the member is public in DERIVED.  Lose TYPE parm.
19081         (friend_accessible_p): Lose TYPE parm.
19082         (accessible_p): Adjust.
19084 2000-02-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19086         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
19087         on things that are not sizes; ssize_binop deleted.
19088         Call size_diffop when appropriate.
19089         (dfs_build_vcall_offset_vtbl_entries): Likewise.
19090         (build_primary_vtable, build_secondary_vtable): Likewise.
19091         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
19092         Variable I is HOST_WIDE_INT.
19093         (get_vfield_offset): Pass proper types to size_binop.
19094         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
19095         (finish_struct_1): Likewise.
19096         (skip_rtti_stuff): Arg N is now pointer to signed.
19097         (layout_class_type): Use size_zero_node.
19098         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
19099         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
19100         * decl.c (complete_arry_type): Pass proper types to size_binop.
19101         (xref_basetypes): BINFO_OFFSET is sizetype.
19102         * error.c (dump_expr): Don't use size_binop non-sizes.
19103         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
19104         * init.c (construct_virtual_bases): Fix type error.
19105         (build_vec_delete_1): Pass proper type to size_binop and don't
19106         fold result.
19107         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
19108         * rtti.c (get_base_offset): Pass proper type to size_binop.
19109         * search.c (dfs_find_vbases): Fix type error.
19110         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
19111         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
19112         * tree.c (debug_binfo): Variable N is signed.
19113         Use HOST_WIDE_INT_PRINT_DEC.
19114         * typeck.c (comptypes): sizetype is same as equivalent integer type.
19115         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
19116         size_one_node and size_zero_node.
19117         (c_alignof): Use size_one_node.
19118         (build_component_addr): Pass proper types to size_binop.
19119         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
19121 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
19123         Implement class scope using-declarations for functions.
19124         * class.c (handle_using_decl): Call add_method for used functions.
19125         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
19126         (add_method): Used functions are hidden by local functions.
19127         (check_bases_and_members): Handle using-decls before finalizing
19128         CLASSTYPE_METHOD_VEC.
19129         * call.c (add_function_candidate): Add ctype parm; if nonzero,
19130         override the type of 'this' accordingly.
19131         (add_template_candidate, add_template_candidate_real): Add ctype parm.
19132         (convert_class_to_reference, build_user_type_conversion_1,
19133         build_new_function_call, build_object_call, build_new_op,
19134         build_new_method_call): Pass ctype parm.
19136         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
19137         the baselink.
19138         * call.c (convert_class_to_reference, build_user_type_conversion_1,
19139         build_new_function_call, build_object_call, build_new_op,
19140         build_new_method_call, build_op_delete_call): Don't get basetype_path
19141         from a baselink.
19142         * typeck.c (build_component_ref): Likewise.
19143         * init.c (build_offset_ref): Likewise.
19144         (resolve_offset_ref): Don't call enforce_access.
19145         Call build_scoped_ref.
19146         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
19147         would cause an error or if -pedantic.
19148         * class.c (alter_access): Lose binfo parm.
19150 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
19152         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
19153         types.
19155 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
19157         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
19158         pseudo_type_info creation into the std namespace
19160 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
19162         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
19163         (import_export_class): Remove declaration.
19164         * decl2.c (import_export_class): Make it static.
19165         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
19166         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
19167         EXPR_WITH_FILE_LOCATION.
19168         * lex.c (check_newline): Tweak filename/lineno setting.
19169         * semantics.c (begin_while_stmt): Fix typo in comment.
19171 2000-02-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19173         * lang-options.h (-fmessage-length=): Add missing option.
19175         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
19177 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
19179         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
19181 2000-02-25  Jim Wilson  <wilson@cygnus.com>
19183         * optimize.c (expand_call_inline): Emit the return label before
19184         evaluating the return value.
19186 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
19188         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
19189         than duplicating functionality here.
19190         * optimize.c: Include input.h.
19191         (expand_call_inline): Use push_srcloc and pop_srcloc.
19192         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
19193         * parse.c: Regenerated.
19194         * Makefile.in (lex.o): Depend on input.h.
19195         (optimize.o): Likewise.
19197 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
19199         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
19200         function type, rather than ICE.
19202 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
19204         * decl.c (grokdeclarator): Call decl_type_access_control.
19205         * parse.y (parse_end_decl): Don't call decl_type_access_control if
19206         decl is null.
19208 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
19210         * decl.c (decls_match): Remove obsolete static member nadgering.
19212 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
19214         * decl.c (grokdeclarator): Change ANSI to ISO.
19215         * lex.c (consume_string, readescape, do_identifier): Likewise.
19216         (parse_float, real_yylex): Likewise.
19217         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
19218         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
19219         new_type_id, maybe_label_decls, simple_stmt,
19220         for.init.statement): Likewise.
19221         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
19222         * semantics.c (finish_named_return_value): Likewise.
19223         * parse.c: Regenerate.
19225 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
19227         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
19228         (CPTI_CLASS_STAR_TYPE): Remove.
19229         (vtable_index_type): Likewise.
19230         (class_star_type_node): Remove.
19231         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
19232         (build_binary_op_nodefault): Remove.
19233         * call.c (build_new_op): Use build_binary_op instead of
19234         build_binary_op_nodefault.
19235         * decl.c (init_decl_processing): Remove class_star_type_node
19236         initialization.  Make delta_type_node ptrdiff_type_node under the
19237         new ABI.  Initialize vtable_index_type.
19238         (build_ptrmemfunc_type): Build different structures for the new
19239         ABI.
19240         (build_enumerator): Use build_binary_op instead of
19241         build_binary_op_nodefault.
19242         * method.c (build_overload_value): Mangle pointers-to-members
19243         appropriately under the new ABI.
19244         * typeck.c (build_array_ref): Use build_binary_op instead of
19245         build_binary_op_nodefault.
19246         (get_member_function_from_ptrfunc): Adjust for the new ABI.
19247         (build_binary_op_nodefault): Rename to ...
19248         (build_binary_op): ... this.  Remove old version.  Adjust for
19249         pointer-to-member comparisons under the new ABI.
19250         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
19251         (build_ptrmemfunc): Adjust for the new ABI.
19252         (expand_ptrmemfunc_cst): Likewise.
19253         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
19254         (pfn_from_ptrmemfunc): Adjust for the new ABI.
19256 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
19258         * call.c (build_object_call): Compress consecutive calls to
19259         cp_error.
19260         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
19261         (build_op_delete_call): Adjust message formatting.
19263         * class.c (check_bases): Compress consecutive calls to
19264         cp_pedwarn.
19265         (finish_struct_anon): Say 'ISO C++'.
19267         * decl.c (start_decl): Same here.
19268         (grok_reference_init): Likewise.
19269         (grokfndecl): Correct message formatting.
19270         (grokfndecl): Improve diagnostic.
19271         (check_static_variable_definition): Likewise. Say 'ISO C++'
19272         (compute_array_index_type): Say 'ISO C++'
19273         (create_array_type_for_decl): Compress consecutive calls to
19274         cp_error.
19275         (grokdeclarator): Say 'ISO C++'
19276         (grok_op_properties): Likewise.
19278         * decl2.c (delete_sanity): Clairify diagnostic.
19279         (check_member_template): Same here.
19280         (grok_function_init): Use consistent terminology.
19282         * expr.c (do_case): Say 'ISO C++'
19284         * friend.c (do_friend): Compress consecutive calls to warning.
19286 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
19288         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
19289         * class.c (build_secondary_vtable): Reorganize.  Don't create a
19290         new vtable under the new ABI.
19291         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
19292         computing the size.
19293         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
19294         the initializing elements.
19295         (initialize_vtable): New function.
19296         (dfs_finish_vtbls): Use it.
19297         (dfs_accumulate_vtbl_inits): New function.
19298         (finish_vtbls): Merge primary and secondary vtables under the new
19299         ABI.
19300         (finish_struct_1): Remove redundant call to layout_vtable_decl.
19301         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
19302         aren't VAR_DECLs.
19304         * class.c (build_vtable): New function, split out from ...
19305         (get_vtable_decl): ... here, and ...
19306         (build_secondary_vtable): ... here.
19308         * pt.c (tsubst_decl): Fix formatting.
19310 2000-02-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19312         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
19313         (avoid_overlap, build_base_field): Likewise.
19314         (build_base_field, build_base_fields, is_empty_class):
19315         Test DECL_SIZE with integer_zero.
19316         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
19317         * cp-tree.h (struct lang_type): New field size_unit.
19318         (CLASSTYPE_SIZE_UNIT): New macro.
19319         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
19320         (cp_finish_decl): Delete -Wlarger-than processing.
19321         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
19322         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
19323         * tree.c (make_binfo): binfo vector is one entry longer.
19324         (walk_tree): Walk DECL_SIZE_UNIT.
19326 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
19328         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
19329         comment.
19330         (build_vtable_entry): Don't assume all vtable entries are
19331         functions.
19332         (build_vtbl_initializer): Adjust accordingly.
19333         (get_vtable_decl): Fix formatting.
19335 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
19337         * semantics.c (deferred_type_access_control): Walk the entire
19338         type_lookups list.
19339         (save_type_access_control): Rename from
19340         initial_deferred_type_access_control.  Just remember the value.
19341         (decl_type_access_control): New fn.
19342         (begin_function_definition): Use deferred_type_access_control, after
19343         we've started the function.  Set type_lookups to error_mark_node.
19344         * parse.y (frob_specs, fn.def1): Adjust.
19345         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
19346         (parse_end_decl, parse_bitfield0, parse_method): New fns.
19347         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
19348         (after_type_component_declarator0): Likewise.
19349         (after_type_component_declarator): Likewise.
19350         (notype_component_declarator): Likewise.
19351         * cp-tree.h: Adjust.
19353         * decl.c (redeclaration_error_message): Allow redeclaration of
19354         namespace-scope decls.
19356 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
19358         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
19360 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
19362         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
19363         * decl2.c (grokclassfn): Likewise.
19365         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
19367         * decl2.c (lang_decode_option): Don't set default message length
19368         here.
19369         * lex.c (lang_init_options): Set it here.
19371 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
19373         Make DECL_CONTEXT mean the class in which a member function was
19374         declared, even for a virtual function.
19375         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
19376         (DECL_FRIEND_CONTEXT): New macro.
19377         (DECL_REAL_CONTEXT): Remove.
19378         (SET_DECL_FRIEND_CONTEXT): Likewise.
19379         (DECL_VIRTUAL_CONTEXT): Adjust.
19380         (DECL_CLASS_SCOPE_P): Use TYPE_P.
19381         (add_friends): Remove.
19382         (hack_decl_function_context): Likewise.
19383         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
19384         CP_DECL_CONTEXT.
19385         (build_over_call): Fix indentation.  Use DECL_CONTEXT
19386         instead of DECL_CLASS_CONTEXT.
19387         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
19388         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
19389         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
19390         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
19391         (build_base_field): Likewise.
19392         (finish_struct_1): Likewise.
19393         (build_self_reference): Likewise.
19394         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
19395         DECL_REAL_CONTEXT.
19396         (pushtag): Use decl_function_context, not
19397         hack_decl_function_context.
19398         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
19399         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
19400         (pushdecl): Remove bogus code.
19401         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
19402         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
19403         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
19404         Use decl_function_context, nothack_decl_function_context.
19405         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
19406         (grokdeclarator): Likewise.  Use decl_function_context, not
19407         hack_decl_function_context.
19408         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
19409         (start_function): Use DECL_FRIEND_CONTEXT, not
19410         DECL_CLASS_CONTEXT.  Use decl_function_context, not
19411         hack_decl_function_context.
19412         (finish_function): Use decl_function_context, not
19413         hack_decl_function_context.
19414         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
19415         DECL_CLASS_CONTEXT.
19416         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
19417         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
19418         (grokfield): Likewise.
19419         (finish_builtin_type): Likewise.
19420         (finish_vtable_vardec): Use decl_function_context, not
19421         hack_decl_function_context.
19422         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
19423         (start_static_initialization_or_destruction): Likewise.
19424         (finish_static_initialization_or_destruction): Likewise.
19425         (mark_used): Adjust logic for deciding when to synthesize methods.
19426         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
19427         DECL_REAL_CONTEXT.
19428         * error.c (dump_function_decl): Use DECL_CONTEXT, not
19429         DECL_CLASS_CONTEXT.
19430         * friend.c (is_friend): Likewise.
19431         (add_friends): Remove.
19432         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
19433         * lex.c (begin_definition_of_inclass_inline): Use
19434         decl_function_context, not hack_decl_function_context.
19435         (process_next_inline): Likewise.
19436         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
19437         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
19438         DECL_CLASSS_CONTEXT.
19439         (hack_identifier): Likewise.
19440         (synthesize_method):  Use decl_function_context, not
19441         hack_decl_function_context.
19442         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
19443         DECL_REAL_CONTEXT.
19444         (is_member_template): Use decl_function_context, not
19445         hack_decl_function_context.  Use DECL_CONTEXT, not
19446         DECL_CLASS_CONTEXT.
19447         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
19448         DECL_CLASS_CONTEXT.
19449         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
19450         DECL_REAL_CONTEXT.
19451         (push_template_decl_real): Likewise.
19452         (instantiate_class_template): Don't call add_friends.
19453         (tsubst_default_argument): Use DECL_CONTEXT, not
19454         DECL_REAL_CONTEXT.
19455         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
19456         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
19457         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
19458         DECL_CLASS_CONTEXT.
19459         * repo.c (repo_inline_used): Likewise.
19460         * search.c (current_scope): Adjust for new _CONTEXT macros.
19461         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
19462         DECL_REAL_CONTEXT.
19463         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
19464         (lookup_fnfields_here):Likewise.
19465         (check_final_overrider): Likewise.
19466         (init_vbase_pointers): Likewise.
19467         (virtual_context): Likewise.
19468         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
19469         (expand_body): Use decl_function_context, not
19470         hack_decl_function_context.
19471         * tree.c (hack_decl_function_context): Remove.
19472         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
19473         DECL_CLASS_CONTEXT.
19474         * typeck2.c (error_not_base_type): Likewise.
19476 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
19478         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
19480 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
19482         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
19484 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
19486         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
19488 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
19490         * decl2.c (lang_decode_option): Enable automatic line wrapping.
19492 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
19494         * parse.y (frob_specs): Split out...
19495         (parse_decl): From here.
19496         (fn.def2): Call initial_deferred_type_access_control.
19497         (after_type_component_declarator0): Call frob_specs.
19498         (notype_component_declarator0): Likewise.
19499         * search.c (friend_accessible_p): Nested classes are friends of their
19500         enclosing classes.
19502 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
19504         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
19505         used to create an implicit temporary.
19507         * class.c (dfs_modify_vtables): Tweak calculation of functions to
19508         override.
19510 2000-02-08  Nathan Sidwell  <nathan@acm.org>
19512         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
19513         strip array element qualifiers too.
19515 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
19517         * decl.c (store_parm_decls): Don't build cleanups for parameters
19518         while processing_template_decl.
19520 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
19522         * cp-tree.h (struct saved_scope): Add incomplete field.
19523         (namespace_scope_incomplete): New macro.
19524         * decl.c (pushdecl): Use it.
19525         (hack_incomplete_structures): Use it.  See through artificial
19526         binding levels.
19527         (mark_saved_scope): Mark it.
19529         Implement access control for nested types.
19530         * search.c (type_access_control): New fn.
19531         (accessible_p): Now we do perform access control for types.
19532         * semantics.c (deferred_type_access_control): New fn.
19533         (initial_deferred_type_access_control): New fn.
19534         (begin_function_definition): Call it.  Add lookups parm.
19535         * decl.c (struct binding_level): Add this_class field.
19536         (pushlevel_class): Set it.
19537         (mark_binding_level): Mark it.
19538         (lookup_name_real): Use it.  Call type_access_control.
19539         (mark_saved_scope): Mark lookups field.
19540         * cp-tree.h (flagged_type_tree): Add lookups field.
19541         (struct saved_scope): Add lookups field.
19542         (type_lookups): New macro.
19543         * parse.y (declmods): Now <ftype>.
19544         (parse_decl): Add lookups parm.  Call
19545         initial_deferred_type_access_control.
19546         (lang_extdef): Clear type_lookups.
19547         (typed_declspecs, declmods, typespec): Set lookups field.
19548         (initdcl): Call deferred_type_access_control.
19549         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
19550         component_decl_1, named_parm): Adjust.
19551         * friend.c (is_friend): Nested classes are friends of their
19552         enclosing classes.
19554         * class.c (currently_open_derived_class): New fn.
19555         * method.c (hack_identifier): Use it.
19557         * lex.c (do_identifier): Remove obsolete code.
19559         * parse.y (typed_typespecs): Propagate new_type_flag properly.
19561 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
19563         * tinfo.h: Remove apostrophes from C++ comment (xgettext
19564         thinks this file is plain C).
19566 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
19568         * Makefile.in (call.o): Depend on $(EXPR_H).
19570         * call.c: Include "expr.h".
19572         * class.c (dump_class_hierarchy): Add prototype.
19574         * search.c (dfs_get_pure_virtuals): Likewise.
19576 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
19578         * parse.y (simple_stmt): Allow :: token in asm parameter list.
19579         * parse.c: Rebuilt.
19581 2000-01-31  Jim Wilson  <wilson@cygnus.com>
19583         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
19584         Store it in DECL_FCONTEXT.
19585         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
19587 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
19589         * tinfo.h (old abi): #include "tconfig.h".
19590         * tinfo.cc (convert_to_base): Move into old abi section.
19592 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
19594         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
19595         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
19596         (BINFO_PRIMARY_BINFO): New macro.
19597         (BF_DELTA): Rename to ...
19598         (BV_DELTA): ... this.
19599         (BF_VCALL_INDEX): Rename to ...
19600         (BV_VCALL_INDEX): ... this.
19601         (BF_FN): Rename to ...
19602         (BV_FN): ... this.
19603         * class.c (build_vbase_path): Adjust for changes to reverse_path.
19604         (set_rtti_entry): Rename BF_ macros to BV_ variants.
19605         (modify_vtable_entry): Simplify.
19606         (add_virtual_function): Rename BF_ macros to BV_ variants.
19607         (build_vtable_initializer): Likewise.
19608         (get_class_offset_1): Remove.
19609         (dfs_get_class_offset): Likewise.
19610         (get_class_offset): Likewise.
19611         (dfs_find_final_overrider): New function.
19612         (find_final_overrider): Likewise.
19613         (modify_one_vtable): Remove.
19614         (dfs_find_base): New function.
19615         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
19616         find_final_overrider.
19617         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
19618         virtuals.
19619         (dfs_fixup_vtable_deltas): Remove.
19620         (override_one_vtable): Remove.
19621         (merge_overrides): Likewise.
19622         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
19623         unreal chilren of virtual bases.
19624         (finish_struct_1): Don't use merge_overrides.  Don't use
19625         dfs_fixup_vtable_deltas.
19626         * tree.c (reverse_path): Return a TREE_LIST, not a chain of
19627         BINFOs.
19629 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
19630             Jason Merrill  <jason@yorick.cygnus.com>
19632         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
19634 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
19636         * exception.cc (__throw_bad_typeid): Add missing std::.
19638 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
19640         * cp-tree.h (make_thunk): PROTO -> PARAMS.
19642 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
19644         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
19646         Runtime support for new-abi rtti.
19647         * inc/typeinfo (type_info::operator!=): Define in class.
19648         (type_info::before, type_info::name, type_info::operator==,
19649         type_info::operator!=): Define new ABI implementations.
19650         (type_info::is_pointer_p, type_info::is_function_p): Declare
19651         new virtual functions.
19652         (type_info::do_catch, type_info::do_upcast): Likewise.
19654         * tinfo.h (__base_class_info): Define new class.
19655         (__class_type_info): Likewise.
19656         (__si_class_type_info): Likewise.
19657         (__vmi_class_type_info): Likewise.
19658         (__dynamic_cast): Prototype.
19660         * tinfo.cc: Conditionalize old and new rtti mechanisms.
19661         (type_info::is_pointer_p): Define new function.
19662         (type_info::is_function_p): Likewise.
19663         (type_info::do_catch): Likewise.
19664         (type_info::do_upcast): Likewise.
19665         (vtable_prefix): New structure for vtable access.
19666         (adjust_pointer): Define new template function.
19667         (contained_p, public_p, virtual_p, contained_public_p,
19668         contained_nonpublic_p, contained_nonvirtual_p): Define new
19669         functions.
19670         (nonvirtual_base_type): New local variable.
19671         (__class_type_info::~__class_type_info): Define.
19672         (__si_class_type_info::~__si_class_type_info): Likewise.
19673         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
19674         (__class_type_info::do_catch): Define new function.
19675         (__class_type_info::do_upcast): Likewise.
19676         (__class_type_info::find_public_src): Likewise.
19677         (__class_type_info::do_find_public_src): Likewise.
19678         (__si_class_type_info::do_find_public_src): Likewise.
19679         (__vmi_class_type_info::do_find_public_src): Likewise.
19680         (__class_type_info::do_dyncast): Likewise.
19681         (__si_class_type_info::do_dyncast): Likewise.
19682         (__vmi_class_type_info::do_dyncast): Likewise.
19683         (__class_type_info::do_upcast): Likewise.
19684         (__si_class_type_info::do_upcast): Likewise.
19685         (__vmi_class_type_info::do_upcast): Likewise.
19686         (__dynamic_cast): Likewise.
19688         * tinfo2.cc (__fundamental_type_info): Define new class.
19689         (__pointer_type_info): Likewise.
19690         (__reference_type_info): Likewise.
19691         (__array_type_info): Likewise.
19692         (__function_type_info): Likewise.
19693         (__enum_type_info): Likewise.
19694         (__ptr_to_member_type_info): Likewise.
19695         (__fundamental_type_info::~__fundamental_type_info): Define.
19696         (__pointer_type_info::~__pointer_type_info): Likewise.
19697         (__reference_type_info::~__reference_type_info): Likewise.
19698         (__array_type_info::~__array_type_info): Likewise.
19699         (__function_type_info::~__function_type_info): Likewise.
19700         (__enum_type_info::~__enum_type_info): Likewise.
19701         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
19702         (__pointer_type_info::do_catch): Define new function.
19703         (__ptr_to_member_type_info::do_catch): Define new function.
19705         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
19706         (__is_pointer): Likewise.
19708         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
19710 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
19712         * cp/class.c (build_vtable): Rename to build_primary_vtable.
19713         (prepare_fresh_vtable): Rename to build_secondary_vtable.
19714         (make_new_vtable): New function.
19715         (modify_vtable_entry): Handle generation of new vtables correctly.
19716         (modify_one_vtable): Remove unused parameter.
19717         (dfs_fixup_vtable_deltas): Likewise.
19718         (override_one_vtable): Use build_secondary_vtable.
19719         (finish_struct_1): Use build_primary_vtable and
19720         build_secondary_vtable.
19722 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
19724         * cp/decl.c: Adjust variable names, comments, help strings.
19726 2000-01-29  Nathan Sidwell  <nathan@acm.org>
19728         * new2.cc (operator delete[]): Use operator delete, don't assume
19729         implementation.
19731 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
19733         * class.c (build_vtbl_initializer): Add argument to
19734         build_vtable_entry call.
19736 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
19738         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
19739         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
19740         (BF_DELTA): New macro.
19741         (BF_VCALL_INDEX): Likewise.
19742         (BF_FN): Likewise.
19743         (THUNK_VCALL_OFFSET): Likewise.
19744         (make_thunk): Change prototype.
19745         * class.c (build_vtable_entry): Integrate
19746         build_vtable_entry_for_fn.  Handle vcall indices.
19747         (build_vtable_entry_for_fn): Remove.
19748         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
19749         BF_VCALL_INDEX, BF_FN.
19750         (modify_vtable_entry): Integrate common code from
19751         modify_one_vtable and dfs_fixup_vtable_deltas.
19752         (add_virtual_function): Set BF_VCALL_INDEX.
19753         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
19754         and BF_FN.
19755         (modify_one_vtable): Simplify.
19756         (dfs_fixup_vtable_deltas): Likewise.
19757         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
19758         * method.c (make_thunk): Handle vcall indices.
19760 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
19762         Compiler side new abi rtti (not enabled).
19763         * cp-tree.h (new_abi_rtti_p): New macro.
19764         (emit_support_tinfos): Prototype new function.
19765         (tinfo_decl_p): Likewise.
19766         (emit_tinfo_decl): Likwise.
19767         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
19768         macros.
19769         (doing_runtime): New local static.
19770         (init_rtti_processing): Add new-abi initializer.
19771         (get_tinfo_decl): Add new-abi logic.
19772         (tinfo_from_decl): Likewise.
19773         (build_dynamic_cast_1): Likewise.
19774         (qualifier_flags): New static function.
19775         (tinfo_base_init): Likewise.
19776         (generic_initializer): Likewise.
19777         (ptr_ref_initializer): Likewise.
19778         (ptmd_initializer): Likewise.
19779         (class_hint_flags): Likewise.
19780         (class_initializer): Likewise.
19781         (synthesize_tinfo_var): Likewise.
19782         (create_real_tinfo_var): Likewise.
19783         (create_pseudo_type_info): Likewise.
19784         (get_vmi_pseudo_type_info): Likewise.
19785         (create_tinfo_types): Likewise.
19786         (emit_support_tinfos): New global function.
19787         (tinfo_decl_p): New global predicate.
19788         (emit_tinfo_decl): New global function.
19789         * class.c (set_rtti_entry): Generalize for old and new rtti.
19790         (build_vtbl_initializer): Likewise.
19791         * decl2.c (finish_file): Likewise.
19793 2000-01-27  Jim Wilson  <wilson@cygnus.com>
19795         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
19796         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
19798 2000-01-27  Mike Stump  <mrs@wrs.com>
19800         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
19801         for scopes.
19803 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
19805         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
19807 2000-01-26  J"orn Rennecke <amylaar@cygnus.co.uk>
19809         * optimize.c (calls_setjmp_r): Supply new argument
19810         to special_function_p.
19812 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
19814         * call.c: PROTO -> PARAMS.
19815         * class.c: Likewise.
19816         * cp-tree.h: Likewise.
19817         * cvt.c: Likewise.
19818         * decl.c: Likewise.
19819         * decl.h: Likewise.
19820         * decl2.c: Likewise.
19821         * dump.c: Likewise.
19822         * errfn.c: Likewise.
19823         * error.c: Likewise.
19824         * except.c: Likewise.
19825         * expr.c: Likewise.
19826         * init.c: Likewise.
19827         * input.c: Likewise.
19828         * lex.c: Likewise.
19829         * lex.h: Likewise.
19830         * method.c: Likewise.
19831         * optimize.c: Likewise.
19832         * parse.y: Likewise.
19833         * pt.c: Likewise.
19834         * repo.c: Likewise.
19835         * rtti.c: Likewise.
19836         * search.c: Likewise.
19837         * semantics.c: Likewise.
19838         * spew.c: Likewise.
19839         * tree.c: Likewise.
19840         * typeck.c: Likewise.
19841         * typeck2.c: Likewise.
19842         * xref.c: Likewise.
19844 2000-01-25  Richard Henderson  <rth@cygnus.com>
19846         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
19848 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
19850         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
19851         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
19852         (struct vcall_offset_data_s): New type.
19853         (dfs_vcall_offset_queue_p): New function.
19854         (dfs_build_vcall_offset_vtbl_entries): Likewise.
19855         (build_vcall_offset_vtbl_entries): Likewise.
19856         (layout_vtable_decl): Likewise.
19857         (num_vfun_entries): Likewise.
19858         (num_extra_vtbl_entries): Add the entries for vcall offsets.
19859         (build_vtbl_initializer): Likewise.
19860         (dfs_finish_vtabls): Use layout_vtable_decl.
19861         (modify_one_vtables): Always duplicate vtables under the new ABI.
19862         (finish_struct_1): Use layout_vtable_decl.
19864 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
19866         * decl.c (member_function_or_else): Change third arg from a format
19867         specifier to an `enum overload_flags'.  Callers changed.
19869 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
19871         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
19872         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
19873         build_const_cast, get_delta_difference, check_return_expr): Avoid
19874         ANSI string concatenation usage.
19876 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
19878         * class.c (layout_class_type): Put the fields required to make a
19879         class non-empty at the end, not the beginning, of the TYPE_FIELDs
19880         list.
19882 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
19884         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
19885         template.
19887         * decl2.c (mark_used): Do instantiate inlines that have been
19888         explicitly instantiated.
19890 2000-01-24  Richard Henderson  <rth@cygnus.com>
19892         * call.c (build_over_call): Use expand_tree_builtin.
19893         * typeck.c (build_function_call_real): Likewise.
19894         (build_binary_op_nodefault): Handle unordered compares.
19896 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
19898         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
19899         cp_tree_index values.
19900         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
19901         New global node #defines for them.
19902         * rtti.c (call_void_fn): Replace with ...
19903         (build_runtime_decl): ... new static function.
19904         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
19905         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
19906         (build_dynamic_cast_1): Always produce correctly typed result.
19907         Explicitly produce type_info addresses. Use dynamic_cast_node.
19908         * exception.cc (__throw_bad_cast): Return `void *'.
19909         (__throw_bad_typeid): Return `const type_info &'.
19911 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
19913         * cp-tree.h (get_vtable_decl): Prototype new function.
19914         * class.c (get_vtable_decl): New function. Broken out from ...
19915         (build_vtable): ... here. Use it.
19916         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
19917         by get_vtable_decl.
19919 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
19921         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
19922         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
19923         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
19924         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
19925         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
19926         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
19927         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
19928         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
19929         (CPTI_TINFO_VAR_ID): New enumeration.
19930         (__tp_desc_type_node, __access_mode_type_node,
19931         __bltn_desc_type_node, __user_desc_type_node,
19932         __class_desc_type_node, __ptr_desc_type_node,
19933         __attr_desc_type_node, __func_desc_type_node,
19934         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
19935         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
19936         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
19937         enum_desc_type_node, class_desc_type_node,
19938         si_class_desc_type_node, vmi_class_desc_type_node,
19939         ptmd_desc_type_node, base_desc_type_node): New #defines.
19940         (tinfo_fn_id, tinfo_fn_type): Rename to ...
19941         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
19942         (tinfo_var_id): New enumeration.
19943         (DECL_TINFO_FN_P): Augment comment.
19944         * decl.c (cp_global_trees): Adjust documentation.
19945         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
19946         tinfo_decl_type and tinfo_var_id.
19947         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
19948         (build_typeid): Remove unused variable.
19949         (get_tinfo_var): Use tinfo_var_id.
19950         (tinfo_name): New static function.
19951         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
19952         (tinfo_from_decl): Likewise.
19953         (get_base_offset): New static function, broken out of
19954         expand_class_desc.
19955         (expand_si_desc): Use tinfo_name.
19956         (expand_class_desc): Likewise. Lose local static variable.
19957         Use base_desc_type_node. Use get_base_offset.
19958         (expand_ptr_desc): Use tinfo_name.
19959         (expand_attr_desc): Likewise.
19960         (expand_generic_desc): Likewise.
19962         * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
19963         * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
19965 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
19967         * cp-tree.h (__eprintf): Remove declaration.
19968         * tree.c (__eprintf): Remove definition.
19970 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
19971             Mark Mitchell  <mark@codesourcery.com>
19973         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
19974         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
19976 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
19978         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
19980 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
19982         * cp-tree.h (register_dtor_fn): New function.
19983         * decl.c (destroy_local_static): Rename to ...
19984         (register_dtor_fn): ... this.  Give it external linkage.
19985         (expand_static_init): Use it.
19986         * decl2.c (do_static_initialization): Likewise, if using
19987         __cxa_atexit.
19988         (do_static_destruction): Check that __cxa_atexit is not in use.
19989         (finish_file): Don't call do_static_destruction if using
19990         __cxa_atexit.
19992         * typeck.c (convert_arguments): Restore two-message error
19993         reporting.
19995 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
19997         Remap dynamic cast hint values to be consistent across ABIs.
19998         * search.c (dynamic_cast_base_recurse): Remap generated value.
19999         (get_dynamic_cast_base_type): Adjust documentation.
20000         * tinfo.h (__user_type_info::dyncast): Likewise.
20001         (__user_type_info::find_public_subobj): Remap BOFF meaning.
20002         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
20003         (__class_type_info::do_dyncast): Likewise.
20004         (__class_type_info::do_find_public_subobj): Likewise.
20005         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
20007 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
20009         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
20011         * typeck2.c (incomplete_type_error): Restore previous
20012         cp_error and cp_error_at call sequence.
20014 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
20016         * class.c (dump_class_hierarchy): Make format agree with argument;
20017         cast pointer to unsigned long and print with %lx.
20019 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
20021         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
20023         * typeck.c (composite_pointer_type, common_type,
20024         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
20025         build_function_call_real, convert_arguments,
20026         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
20027         build_unary_op, mark_addressable, build_compound_expr,
20028         build_static_cast, build_reinterpret_cast, build_const_cast,
20029         build_c_cast, build_modify_expr, get_delta_difference,
20030         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
20031         'ISO C++'.  Fusion consecutive calls to diagnostic message routines
20032         into a single one.
20033         * typeck2.c (readonly_error, abstract_virtuals_error,
20034         process_init_constructor, check_for_new_type): Likewise.
20036 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
20038         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
20039         VAR_DECLs.
20041 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
20043         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
20044         (build_x_typeid): Likewise.
20045         (get_tinfo_fn): Likewise.
20046         (get_tinfo_fn_unused): Rename to ...
20047         (get_tinfo_decl): ... here.
20048         * rtti.c (build_headof): Replace logic error with assertion.
20049         (get_tinfo_fn_dynamic): Rename to ...
20050         (get_tinfo_decl_dynamic): ... here. Make static. Use
20051         complete_type_or_else.
20052         (build_x_typeid): Move into ...
20053         (build_typeid): ... here. Adjust call to
20054         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
20055         throw_bad_typeid expression.
20056         (get_tinfo_fn_unused): Rename to ...
20057         (get_tinfo_decl): ... here. Adjust comment.
20058         (get_tinfo_fn): Delete.
20059         (tinfo_from_decl): New static function.
20060         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
20061         (get_typeid): Use complete_type_or_else.
20062         (build_dynamic_cast_1): Adjust calls to
20063         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
20064         * parse.y (primary): Adjust call to build_typeid.
20065         * except.c (build_eh_type_type_ref): Adjust call to
20066         get_tinfo_decl. Mark as used.
20067         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
20068         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
20069         * parse.c: Regenerated.
20071 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
20073         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
20074         calling convention.
20075         (resolves_to_fixed_type_p): Document calling convention.
20076         * rtti.c (build_x_typeid): Initialize NONNULL.
20078         * cp-tree.h (build_shared_int_cst): New function.
20079         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
20080         * class.c (modify_vtable_entry): Likewise.
20081         (add_virtual_function): Split out code to generated shared
20082         INTEGER_CSTs to build_share_int_cst.
20083         (modify_all_vtables): Handle all the overridden functions here.
20084         Add overridden functions from non-primary virtual bases to the
20085         primary vtable.
20086         (finish_struct_1): Adjust call to modify_all_vtables.  Add
20087         overridden functions from non-primary bases to the vtable.
20088         * tree.c (build_shared_int_cst): New function.
20090         * cp-tree.h (scratchalloc): Remove.
20091         (build_scratch_list): Likewise.
20092         * call.c (convert_class_to_reference): Replace build_scratch_list
20093         and build_expr_list with build_tree_list.
20094         (add_candidate): Replace scratchalloc with expralloc.  Note memory
20095         leak.
20096         (build_user_type_conversion_1):  Replace build_scratch_list
20097         and build_expr_list with build_tree_list.
20098         (build_new_op): Likewise.
20099         (build_op_delete_call): Likewise.
20100         (convert_like): Likewise.
20101         * cvt.c (ocp_convert): Likewise.
20102         * decl.c (start_decl): Likewise.
20103         (start_function): Likewise.
20104         (finish_destructor_body): Likewise.
20105         (maybe_build_cleanup_1): Likewise.
20106         * decl2.c (reparse_decl_as_expr): Likewise.
20107         * init.c (perform_member_init): Likewise.
20108         (expand_cleanup_for_base): Likewise.
20109         (build_builtin_delete_call): Likewise.
20110         (build_new_1): Likewise.
20111         (build_delete): Likewise.
20112         * method.c (do_build_assign_ref): Likewise.
20113         * parse.y (already_scoped_stmt): Likewise.
20114         (nontrivial_exprlist): Likewise.
20115         (net_initializer): Likewise.
20116         (initlist): Likewise.
20117         * parse.c: Regenerated.
20118         * rtti.c (build_x_typeid): Likewise.
20119         (build_dynamic_cast_1): Likewise.
20120         * typeck.c (build_x_compound_expr): Likewise.
20121         (build_static_cast): Likewise.
20122         (build_modify_expr): Likewise.
20124         * cp-tree.h (DECL_VINDEX): Add documentation.
20125         * class.c (build_vtable_entry): Likewise.
20126         (start_vtable): Add comment.
20127         (add_virtual_function): Replace pending_hard_virtuals with
20128         overridden_virtuals and pending_virtuals with new_virtuals.
20129         Replace redundant assignments with assertions.
20130         (check_for_override): Add comment.
20131         (check_bases_and_members): Replace pending_hard_virtuals with
20132         overridden_virtuals and pending_virtuals with new_virtuals.
20133         (create_vtbl_ptr): Likewise.
20134         (layout_class_type): Likewise.
20135         (finish_struct_1): Likewise.  Add comments.
20137 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
20139         * class.c (finish_struct_1): Replace redundant code with
20140         assertions.
20142         * cp-tree.h (flag_new_abi): Move.
20143         (flag_use_cxa_atexit): Likewise.
20144         (flag_honor_std): Likewise.
20145         (flag_rtti): Likewise.
20146         (vbase_offsets_in_vtable_p): Define.
20147         (vptrs_present_everywhere_p): Likewise.
20148         (TYPE_CONTAINS_VPTR_P): Likewise.
20149         (dfs_walk_real): Declare.
20150         * class.c (build_vbase_pointer_fields): Check
20151         vbase_offsets_in_vtable_p.
20152         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
20153         BINFO_VPTR_FIELD.
20154         (build_vbase_offset_vtbl_entries): Simplify.
20155         (build_vbase_offset_vtbl_entries): Adjust.
20156         (build_vbase_pointer): Add ability to look up vbase offsets in
20157         vtable.
20158         (start_vtable): New function.
20159         (add_virtual_function): Use it.
20160         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
20161         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
20162         (build_vtbl_initializer): Take the type of the complete object as
20163         input.  Use it to correctly calculate vbase offsets.
20164         (dfs_finish_vtbls): Pass the complete type to
20165         build_vtbl_initializer.
20166         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
20167         (create_vtable_ptr): Create a vtable even if there are no
20168         new virtual functions, under the new ABI.
20169         (finish_struct_1): Likewise.
20170         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
20171         * decl.c (exapnd_static_init): Remove call to
20172         preserve_initializer.
20173         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
20174         vtables.
20175         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
20176         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
20177         (construct_virtual_bases): Don't initialize virtual base pointers
20178         under the new ABI.
20179         (build_aggr_init): Clean up comment.
20180         (expand_aggr_init_1): Likewise.
20181         * rtti.c (expand_class_desc): Store the virtual function table
20182         index where the vbase offset lives in the offset field.
20183         * search.c (dfs_walk_real): Make it global.
20184         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
20185         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
20187         * tinfo.h (USItype): Make it signed under the new ABI.
20188         * tinfo.cc (convert_to_base): New function.  Encapsulate base
20189         conversion logic here.
20190         (__class_type_info::do_upcast): Use it.
20191         (__class_type_info::do_dyncast): Likewise.
20192         (__class_type_info::do_find_public_subobj): Likewise.
20194         * init.c (construct_virtual_bases): Don't look up the addresses of
20195         virtual bases at run-time.
20197         * class.c (build_vbase_pointer): Relocate.
20198         (build_vbase_pointer_fields): Likewise.
20199         (dfs_build_vbase_offset_vtbl_entries): Likewise.
20200         (build_vbase_offset_vtbl_entries): Likewise.
20202         * decl.c (init_decl_processing): Complain if -fnew-abi
20203         -fno-vtable-thunks is used.
20205         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
20206         flag_new_abi.
20208 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
20210         * cp-tree.h (num_extra_vtbl_entries): New function.
20211         (size_extra_vtbl_entries): Likewise.
20212         (dfs_vtable_path_unmark): Likewise.
20213         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
20214         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
20215         * class.c (num_extra_vtbl_entries): New function.
20216         (size_extra_vtbl_entries): Likewise.
20217         (dfs_build_vbase_offset_vtbl_entries): New function.
20218         (build_vbase_offset_vtbl_entries): Likewise.
20219         (build_vtbl_initializer): Use it.
20220         (finish_struct_1): Adjust vtable sizes (using
20221         num_extra_vtbl_entries).
20222         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
20223         THUNK_DECL is non-NULL before expanding it.
20224         * init.c (expand_virtual_init): Adjust the vtable pointer by
20225         size_extra_vtbl_entries before storing it.
20226         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
20227         Handle TREE_LIST parameters here, not in the dfs_* functions.
20228         (dfs_unmarked_real_bases_queue_p): Adjust.
20229         (dfs_marked_real_bases_queue_p): Likewise.
20230         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
20231         (dfs_vtable_path_marked_real_bases_queue_p): New function.
20232         (dfs_vtable_path_unmark): Likewise.
20234 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
20236         * optimize.c (copy_body_r): Clear the operand three of a
20237         TARGET_EXPR when copying it.
20239 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
20241         * method.c (build_decl_overload_real): Check whether we are in ::
20242         before returning __builtin_new/delete.
20244 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
20246         * pt.c (tsubst_friend_function): Improve comment.
20247         (instantiate_decl): Avoid crashing when a "nested" function is
20248         instantiated from the top level.
20250         * dump.c (dqeueue_and_dump): Dump
20251         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
20253 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
20255         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
20257 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
20259         * g++spec.c (lang_specific_driver): Add -fnew-abi if
20260         ENABLE_NEW_GXX_ABI defined.
20261         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
20262         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
20263         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
20265 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
20267         * decl.c (start_cleanup_fn): Call pushdecl.
20269         * call.c (convert_class_to_reference): Fix typos.
20270         (build_conditional_expr): Handle errors gracefully.
20271         * class.c (push_nested_class): Likewise.
20272         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
20273         (DECL_THIS_EXTERN): Use it.
20274         (DECL_THIS_STATIC): Likewise.
20275         * cvt.c (convert_to_void): Handle errors gracefully.
20276         (build_expr_type_conversion): Likewise.
20277         * decl.c (maybe_push_decl): Likewise.
20278         (start_decl_1): Likewise.
20279         (require_complete_types_for_parms): Likewise.
20280         * parse.y (structsp): Likewise.
20281         (base_class): Likewise.
20282         * parse.c: Regenerated.
20283         * pt.c (finish_member_template_decl): Likewise.
20284         * typeck.c (decay_conversion): Likewise.
20286         * cp-tree.h (dfs_skip_vbases): New function.
20287         (find_vbase_instance): Likewise.
20288         * class.c (determine_primary_base): Allow a nearly empty base to
20289         serve as a primary base class under the new ABI.
20290         (get_class_offset_1): Rename to ...
20291         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
20292         messages here.
20293         (get_class_offset): Use it.  Issue error messages here.
20294         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
20295         find the right copies of virtual bases.
20296         (fixup_vtable_deltas1): Rename to ...
20297         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
20298         bases as primary bases.
20299         (fixup_vtable_deltas): Remove.
20300         (override_one_vtable): Handle virtual bases as primary bases.
20301         (merge_overrides): Likewise.
20302         (finish_struct_1): Likewise.
20303         (dump_class_hierarchy): Dump primary-ness of bases as well.
20304         * search.c (mark_primary_bases): Use a pre-order traversal to
20305         handle primary virtual bases.
20306         (dfs_skip_vbases): New fiunction.
20307         (expand_upcast_fixups): Adjust to handle primary virtual bases.
20308         (fixup_virtual_upcast_offsets): Likewise.
20309         (fixup_all_virtual_upcast_offsets): Likewise.
20310         (dfs_find_vbase_instances): New function.
20311         (find_vbase_instance): Likewise.
20313 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
20315         * lex.c (DIR_SEPARATOR): Delete macro.
20317 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
20319        * decl2.c (lang_decode_option): Handle automatic line wrapping
20320        option.
20322 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
20324         * friend.c (do_friend): Don't resolve scopes when processing
20325         template declarations, even if the qualifying scope doesn't
20326         involve template parameters.
20328 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
20330         * class.c (dfs_modify_vtables_queue_p): Remove.
20331         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
20332         and dfs_marked_real_bases_queue_p instead of
20333         dfs_modify_vtables_queue_p.
20335         * class.c (build_vbase_path): Simplify.
20336         (dfs_propagate_binfo_offsets): New function.
20337         (propagate_binfo_offsets): Use it.
20338         (remove_base_field): Simplify.
20339         (dfs_set_offset_for_vbases): Remove.
20340         (dfs_set_offset_for_shared_vbases): New function.
20341         (dfs_set_offset_for_unshared_vbases): Likewise.
20342         (layout_virtual_bases): Use them.
20343         (layout_basetypes): Don't call propagate_binfo_offsets.
20344         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
20345         for the vbases.
20347         * class.c (build_base_field): New function, split out from ...
20348         (build_base_fields): ... here.  Use it.  Allocate primary bases
20349         first, under the new ABI.
20350         (get_vtable_entry): Remove.
20351         (remove_base_field): New function, split out from ...
20352         (remove_base_fields): ... here.  Adjust since primary bases come
20353         first under the new ABI.
20355         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
20356         (initialize_vtbl_ptrs): New function.
20357         (expand_indirect_vtbls_init): Change prototype.
20358         (convert_pointer_to_vbase): Declare.
20359         * init.c (expand_direct_vtbls_init): Remove.
20360         (dfs_initialize_vtbl_ptrs): New function.
20361         (initialize_vtbl_ptrs): Likewise.
20362         (emit_base_init): Use initialize_vtbl_ptrs.
20363         * search.c (convert_pointer_to_vbase): Make it global.
20364         (expand_indirect_vtbls_init): Remove vtable initialization code.
20365         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
20367         * class.c (dfs_finish_vtbls): New function.
20368         (finish_vtbls): Use it.
20369         (dump_class_hierarchy): New function.
20371         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
20372         (BINFO_VBASE_PRIMARY_P): New macro.
20373         (BINFO_VIRTUALS): Add to documentation.
20374         (SET_BINFO_PRIMARY_MARKED_P): Remove.
20375         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
20376         (dfs_mark_primary_bases_queue_p): Likewise.
20377         (dfs_unmarked_real_bases_queue_p): New function.
20378         (dfs_marked_real_bases_queue_p): Likewise.
20379         * search.c (dfs_mark_primary_bases): Adjust.
20380         (mark_primary_bases): Likewise.
20381         (get_shared_vbase_if_not_primary): New function.
20382         (dfs_unmarked_real_bases_queue_p): Likewise.
20383         (dfs_marked_real_bases_queue_p): Likewise.
20384         (dfs_get_pure_virtuals): Simplify.
20385         (get_pure_virtuals): Likewise.
20387 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
20389         * lex.c: Include tm_p.h.
20391 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
20393         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
20395 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
20397         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
20398         * pt.c (instantiate_decl): Defer comdat templates that might not be
20399         needed.
20401         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
20402         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
20403         (finish_file): Likewise.
20405         * decl2.c (import_export_class): Undo 12/14 change.
20407         * error.c (dump_decl): operator new, not operatornew.
20409         * class.c (field_decl_cmp): A nontype is "greater" than a type.
20410         * search.c (lookup_field_1): Look for the last field with the
20411         desired name.
20413 2000-01-05  Nathan Sidwell  <nathan@acm.org>
20415         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
20416         FUNCTION_DECL.
20418 2000-01-05  Nathan Sidwell  <nathan@acm.org>
20420         * typeck.c (build_static_cast): Don't strip target qualifiers
20421         when casting from a class.
20423 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
20425         * class.c (warn_hidden): Initialize variable `fndecl'.
20427 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
20429         * decl.c (flag_isoc9x): New variable to be able to use code in
20430         c-common.c.  For now always zero.
20432 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
20434         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
20435         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
20436         or unshare_base_binfos for virtual bases here.
20437         * search.c (dfs_get_vbase_types): Do it here.
20438         (get_vbase_types): Adjust.
20440 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
20442         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
20443         (BINFO_PRIMARY_MARKED_P): Use flag 5.
20444         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
20445         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
20446         (unmark_primary_bases): Remove declaration.
20447         (unmarkedp): Declare.
20448         (dfs_vbase_unmark): Likewise.
20449         * class.c (determine_primary_base): Return immediately if there
20450         are no base classes.  Call mark_primary_bases here.
20451         (modify_all_direct_vtables): Remove.
20452         (modify_all_indirect_vtables): Remove.
20453         (dfs_modify_vtables_queue_p): New function.
20454         (dfs_modify_vtables): New function.
20455         (modify_all_vtables): Use them.
20456         (build_base_fields): Build FIELD_DECLs for primary virtual base
20457         classes.
20458         (create_vtable_ptr): Don't call determine_primary_base here.
20459         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
20460         (dfs_set_offset_for_vbases): ... this.
20461         (layout_virtual_bases): Use it.
20462         (layout_class_type): Call determine_primary_base here.
20463         * search.c (unmarkedp): Make it global.
20464         (shared_marked_p): Simplify.
20465         (shared_unmarked_p): Likewise.
20466         (dfs_primary_bases_queue_p): Remove.
20467         (dfs_unmark_primary_bases): Likewise.
20468         (unmark_primary_bases): Likewise.
20469         (mark_primary_bases): Simplify.
20470         (get_pure_virtuals): Don't call mark_primary_bases here.
20471         (dfs_vbase_unmark): New function.
20472         (get_vbase_types): Simplify.
20474         * class.c (struct base_info): Remove.
20475         (determine_primary_base): Take has_virtual_p rather than a
20476         base_info as input.  Don't calculate max_has_virtual.
20477         (finish_struct_bits): Remove max_has_virtual argument.
20478         (create_vtable_ptr): Remove max_has_virtual_p argument.
20479         (layout_virtual_bases): Remove max argument.
20480         (layout_basetypes): Likewise.
20481         (layout_class_type): Remove max_has_virtual_p argument.
20482         (finish_struct_1): Remove max_has_virtual.
20484         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
20485         (layout_basetypes): Remove.
20486         * class.c (propagate_binfo_offsets): Moved here from tree.c.
20487         Update to handle primary virtual bases.
20488         (remove_base_fields): New function, split out from
20489         layout_basetypes.
20490         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
20491         (layout_virtual_bases): New function, split out from
20492         layout_basetypes.  Update to handle primary virtual bases.
20493         (layout_basetypes): Moved here from tree.c.  Use
20494         remove_base_fields and layout_virtual_bases.
20495         * search.c (dfs_mark_primary_bases_queue_p): New function.
20496         (mark_primary_bases): Use it.
20497         * tree.c (CEIL): Remove.
20498         (propagate_binfo_offsets): Remove.
20499         (layout_basetypes): Remove.
20501 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
20503         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
20504         (BINFO_PRIMARY_MARKED_P): New macro.
20505         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
20506         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
20507         (mark_primary_bases): New function.
20508         (unmark_primary_bases): Likewise.
20509         * search.c (get_abstract_virtuals_1): Remove.
20510         (dfs_mark_primary_bases): New function.
20511         (mark_primary_bases): Likewise.
20512         (dfs_unmark_primary_bases): Likewise.
20513         (unmark_primary_bases): Likewise.
20514         (dfs_get_pure_virtuals): Likewise.
20516 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
20518         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
20519         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
20520         (modify_one_vtable): Adjust.
20521         (fixup_vtable_deltas1): Likewise.
20522         (override_one_vtable): Likewise.
20523         * search.c (get_abstract_virtuals_1): Likewise.
20524         (get_pure_virtuals): Likewise.
20525         (expand_upcast_fixups): Likewise.
20526         * tree.c (debug_binfo): Likewise.
20528         * class.c (build_vtable): Don't return a value.  Don't rebuild
20529         vtables for bases that have already been handled.
20530         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
20531         already been handled.
20532         (modify_one_vtable): Adjust accordingly.
20533         (fixup_vtable_deltas1): Likewise.
20534         (finish_struct_1): Likewise.
20536 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
20538         * call.c (build_new_method_call): Also check destructors.