PR c++/10147
[official-gcc.git] / gcc / cp / ChangeLog
blob3cbb85c7dbd633c70bc74e2e82a1c8028b00bb57
1 2003-10-06  Mark Mitchell  <mark@codesourcery.com>
3         PR c++/10147
4         * call.c (initialize_reference): Tweak error message.
5         * cxx-pretty-print.h (cxx_pretty_printer_flags): Remove
6         pp_cxx_flag_qualified_id and pp_cxx_flag_global_scope.
7         * cxx-pretty-print.c (pp_cxx_id_expression): Always display
8         qualified entities using qualified names.
9         
10         PR c++/12337
11         * init.c (build_new_1): Make sure that the expression returned is
12         not an lvalue.
14         PR c++/12344, c++/12236, c++/8656
15         * decl.c (start_function): Do not ignore attributes embedded in a
16         function declarator.
18 2003-10-06  Mark Mitchell  <mark@codesourcery.com>
20         * Make-lang.in (c++.info): Remove.
21         (c++.dvi): Remove.
22         (c++.generated-manpages): Replace with ...
23         (generated-manpages): ... this.
25 2003-10-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
27         * decl.c (struct cp_binding_level): Move to name-lookup.h
28         (current_binding_level): Likewise.
29         (class_binding_level): Likewise.
30         * cp-tree.h (enum scope_kind): Likewise.
32 2003-10-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
34         * name-lookup.c (binding_entry_free): Nullify name and type
35         fields. 
37 2003-10-02  Mark Mitchell  <mark@codesourcery.com>
39         PR c++/12486
40         * typeck.c (finish_class_member_access_expr): Issue diagnostic
41         on erroneous use of qualified name.
43 2003-09-30  Richard Henderson  <rth@redhat.com>
45         * decl.c (duplicate_decls): Copy DECL_SAVED_INSNS too.
47 2003-09-30  Kelley Cook  <kelleycoook@wideopenwest.com>
49         * g++spec.c: Convert to ISO C90 prototypes.
50         * parser.c: Likewise.
52 2003-09-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
54         * decl.c (pop_binding): Don't mess with nullifying binding->scope
55         here. 
56         * name-lookup.c: Re-format.
57         (cxx_binding_free): Nullify binding->scope.
59 2003-09-29  Jan Hubicka  <jh@suse.cz>
61         PR C++/12047
62         * except.c (build_eh_type_type): Call mark_used on the type.
64 2003-09-28  Richard Henderson  <rth@redhat.com>
66         * typeck.c (c_expand_asm_operands): Take location_t, instead of
67         individual file and line.
69 2003-09-28  Andreas Jaeger  <aj@suse.de>
71         * decl.c (cxx_builtin_type_decls): Convert to ISO C90 function
72         definition.
73         * init.c (push_base_cleanups): Likewise.
74         * decl2.c (finish_file): Likewise.
75         * mangle.c (init_mangle): Likewise.
76         (dump_substitution_candidates): Likewise.
77         * search.c: Likewise.
79 2003-09-27  Gabriel Dos Reis  <gdr@integrable-solutions.net>
81         * name-lookup.h (get_global_value_if_present): New function.
82         (is_typename_at_global_scope): Likewise.
83         * except.c (do_begin_catch): Use get_global_value_if_present.
84         (do_end_catch): Likewise.
85         (do_allocate_exception): Likewise.
86         (do_free_exception): Likewise.
87         (build_throw): Likewise.
88         * parser.c (cp_parser_member_declaration): Likewise.
89         * rtti.c (throw_bad_cast): Likewise.
90         (throw_bad_typeid): Likewise.
91         * decl.c (check_tag_decl): Use is_typename_at_global_scope.
92         (grokdeclarator): Likewise.
93         * cp-tree.h (global_namespace): Move to name-lookup.h
94         * call.c (call_builtin_trap): Tidy.
96 2003-09-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
98         PR c++/11415
99         * parser.c (cp_parser_nested_name_specifier_opt): Issue correct
100         error message when parser->scope is global_namespace.
102 2003-09-27  Gabriel Dos Reis  <gdr@integrable-solutions.net>
104         * cp-tree.h, name-lookup.h, decl.c, decl2.c: Remove reference to
105         macros  BINDING_SCOPE, BINDING_VALUE and BINDING_TYPE.
107 2003-09-26  Gabriel Dos Reis  <gdr@integrable-solutions.net>
109         * decl.c (pop_binding_level, suspend_binding_level,
110         find_class_binding_level): Merge into leave_scope.  Remove.
111         (leave_scope):  New function.
112         (poplevel): Update.
113         (poplevel_class): Likewise.
114         (pop_namespace): Likewise.
116 2003-09-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
118         PR c++/5655
119         * parser.c (cp_parser_check_access_in_redeclaration): New function.
120         (cp_parser_member_declaration): Use it.
121         (cp_parser_template_declaration_after_export): Likewise.
123 2003-09-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
125         * cp-tree.h (scope_kind): Add new enumerator.
126         (keep_next_level): Change parameter type to bool.
127         (begin_scope):  Change prototype.
128         (pushlevel): Remove declaration.
129         * decl.c (push_binding_level): Fold in begin_scope.  Remove.
130         (struct cp_binding_level): Remove tag_tranparent field.  Make keep
131         of bitsize one.
132         (keep_next_level_flag): Make a bool.
133         (cxx_scope_descriptor): Update scope names table
134         (make_cxx_scope): Fold in begin_scope.  Remove..
135         (namespace_scope_ht_size): New function.
136         (begin_scope): Change prototype.  Return a scope.  Tidy.
137         (kept_level_p): Update.
138         (pushlevel): Remove.
139         (maybe_push_cleanup_level): Simplify.
140         (poplevel): Update for sk_cleanup and keep change.
141         (print_binding_level): Likewise.
142         (initial_push_namespace_scope): Fold in begin_scope.  Remove.
143         (push_namespace): Update.
144         (pushtag): Likewise.
145         (lookup_tag): Likewise.
146         (lookup_name_current_level): Likewise.
147         (lookup_type_current_level): Likewise.
148         (cxx_init_decl_processing): Likewise.
149         (start_function): Likewise.
150         (begin_function_body): Likewise.
151         (start_method): Likewise.
152         * pt.c (push_inline_template_parms_recursive): Likewise.
153         (begin_template_parm_list): Likewise.
154         (begin_specialization): Likewise.
155         * semantics.c (do_pushlevel): Likewise.
156         (begin_compound_stmt): Likewise.
157         (begin_stmt_expr): Likewise.
159 2003-09-21  Richard Henderson  <rth@redhat.com>
161         * class.c, cp-tree.h, decl.c, decl2.c, error.c, init.c,
162         method.c, optimize.c, pt.c, semantics.c, tree.c: Revert.
164 2003-09-21  Richard Henderson  <rth@redhat.com>
166         * class.c, cp-tree.h, decl.c, decl2.c, error.c, init.c,
167         method.c, optimize.c, pt.c, semantics.c, tree.c: Update for
168         DECL_SOURCE_LOCATION rename and change to const.
170 2003-09-20  Richard Henderson  <rth@redhat.com>
172         * decl.c, decl2.c, pt.c: Use %J in diagnostics.
174 2003-09-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
176         PR c++/157
177         * parser.c (cp_parser_direct_declarator): Clear
178         parser->num_template_parameter_lists when parsing function
179         parameters.
180         (cp_parser_constructor_declarator_p): Likewise.
182 2003-09-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
184         PR c++/495
185         * pt.c (tsubst_friend_class): Only use innermost template
186         arguments for the injected friend class template.
188 2003-09-19  Nathan Sidwell  <nathan@codesourcery.com>
190         PR c++/12332
191         * pt.c (instantiate_class_template): Increment
192         processing_template_decl around the tsubst of a template member
193         function.
195 2003-09-19  Gabriel Dos Reis  <gdr@integrable-solutions.net>
197         * decl.c (cxx_scope_descriptor): Fix thinko.
198         (struct cp_binding_level): Adjust type of binding_depth field. 
200 2003-09-18  Danny Smith  <dannysmith@users.sourceforge.net>
202         PR c++/12320
203         * call.c (type_passed_as): Check for incomplete type.
204         (convert_for_arg_passing): Likewise.
206 2003-09-18  Nathan Sidwell  <nathan@codesourcery.com>
208         PR c++/9848
209         * optimize.c (maybe_clone_body): Don't set MARK_USED on parameters
210         here.
211         * semantics.c (expand_body): Set it here on the remaining clones.
213 2003-09-18  Roger Sayle  <roger@eyesopen.com>
215         * lex.c (init_operators): Remove operator_name_info for FFS_EXPR.
216         * class.c (instantiate_type): Remove FFS_EXPR case.
218 2003-09-18  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
220         * ChangeLog: Fix recent commit.
222 2003-09-18  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
224         * ChangeLog: Add PR number to patch for PR c++/12316.
226 2003-09-18  Gabriel Dos Reis <gdr@integrable-solutions.net>
228         * error.c (dump_type): Simplify.  Use pp_type_specifier_seq for
229         "C" types. 
230         * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Fix thinko.
232 2003-09-17  Richard Henderson  <rth@redhat.com>
234         * semantics.c (expand_body): Don't save/restore input_location.
236 2003-09-17  Mark Mitchell  <mark@codesourcery.com>
238         PR c++/12266
239         * cp-tree.h (tsubst_flags_t): Add tf_conv.
240         * class.c (standard_conversion): Pass tf_conv to
241         instantiate_type.
242         (resolve_address_of_overloaded_function): Do not call mark_used
243         when just checking conversions.
245         PR debug/12066
246         * cp-lang.c (LANG_HOOKS_BUILTIN_TYPE_DECLS): Define.
247         * cp-tree.h (cxx_builtin_type_decls): Declare.
248         * decl.c (builtin_type_decls): New variables.
249         (cxx_builtin_type_decls): New function.
250         (record_builtin_type): Add to builtin_type_decls.
252 2003-09-17  Richard Henderson  <rth@redhat.com>
254         PR c++/12316
255         * semantics.c (expand_or_defer_fn): Inc/dec function_depth.
257 2003-09-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
259         PR c++/7939
260         * typeck.c (comptypes): Don't ICE when its first argument is
261         error_mark_node.
262         (compparms): Reverse the arguments of same_type_p.
264 2003-09-15  Nathan Sidwell  <nathan@codesourcery.com>
266         PR c++/12184
267         * typeck.c (convert_arguments): Return error_mark_node for an
268         incomplete parameter. Make error message more informative.
270 2003-09-12  Mark Mitchell  <mark@codesourcery.com>
272         PR c++/3907
273         * class.c (maybe_note_name_used_in_class): Refine test for whether
274         or not we are in a class scope.
276         * cp-tree.h (language_function): Remove x_expanding_p.
277         (expanding_p): Remove.
278         (doing_semantic_analysis_p): Remove.
279         (scope_kind): Add sk_function_parms, sk_class,
280         sk_namespace.
281         (innermost_scope_kind): New method.
282         * call.c (cxx_type_promotes_to): Use type_decays_to.
283         * cp-lang.c (LANG_HOOKS_PUSHLEVEL): Redefine.
284         (LANG_HOOKS_POPLEVEL): Likewise.
285         * decl.c (cp_binding_level): Remove parm_flag, template_parms_p,
286         template_spec_p, namespace_p, is_for_scope, is_try_scope, and
287         is_catch_scope.  Add kind and explicit_spec_p.
288         (cxx_scope_descriptor): Use a lookup table.
289         (find_class_binding_level): Use "kind" field in binding_level, not
290         the various flags.
291         (pop_binding_level): Likewise.
292         (innermost_nonclass_level): Likewise.
293         (toplevel_bindings_p): Likewise.
294         (namespace_bindings_p): Likewise.
295         (template_parm_scope_p): Likewise.
296         (innermost_scope_kind): New method.
297         (current_tmpl_spec_kind): Use "kind" field in binding_level, not
298         the various flags.
299         (pushlevel): Remove check for doing_semantic_analysis_p.
300         (begin_scope): Simplify.
301         (add_decl_to_level): Use "kind" field in binding_level, not
302         the various flags.
303         (push_local_binding): Likewise.
304         (pop_label): Remove check for doing_semantic_analysis_p.
305         (poplevel): Use "kind" field in binding_level, not
306         the various flags.
307         (set_block): Remove check for doing_semantic_analysis_p.
308         (pushlevel_class): Use "kind" field in binding_level, not
309         the various flags. 
310         (poplevel_class): Likewise.
311         (initial_push_namespace_scope): Likewise.
312         (maybe_push_to_top_level): Likewise.
313         (set_identifier_type_value_with_scope): Likewise.
314         (pop_everything): Likewise.
315         (maybe_process_template_type_declaration): Likewise.
316         (pushtag): Likewise.
317         (pushdecl): Likewise.
318         (pushdecl_with_scope): Likewise.
319         (check_previous_goto_1): Likewise.
320         (define_label): Likewise.
321         (finish_case_label): Likewise.
322         (lookup_tag): Likewise.
323         (unqualified_namespace_lookup): Likewise.
324         (lookup_name_real): Likewise.
325         (lookup_name_current_level): Likewise.
326         (lookup_type_current_level): Likewise.
327         (record_builtin_type): Likewise.
328         (cp_make_fname_decl): Likewise.
329         (maybe_inject_for_scope_var): Likewise.
330         (cp_finish_decl): Remove check for doing_semantic_analysis_p.
331         (start_function): Use begin_scope, not pushlevel.
332         (finish_function): Use "kind" field in binding_level, not
333         the various flags.
334         (start_method): Use begin_scope, not pushlevel.
335         (make_label_decl): Do not check expanding_p.
336         (save_function-data): Do not set expanding_p.
337         (cxx_push_function_context): Do not clear expanding_p.
338         * semantics.c (cxx_expand_function_start): Do not set expanding_p.
339         
340 2003-09-14  Mark Mitchell  <mark@codesourcery.com>
342         * class.c (layout_class_type): Make DECL_MODE match TYPE_MODE for
343         an bit-field whose width exceeds that of its type.
345 2003-09-14  Geoffrey Keating  <geoffk@apple.com>
347         * rtti.c (get_tinfo_decl): Set TREE_PUBLIC for typeinfo decls.
349 2003-09-14  Kazu Hirata  <kazu@cs.umass.edu>
351         * ChangeLog: Follow spelling conventions.
352         * parser.c: Likewise.
354 2003-09-13  Richard Henderson  <rth@redhat.com>
356         * decl2.c (finish_file): Check cgraph_assemble_pending_functions
357         during relaxation loop.
359 2003-09-11  David Edelsohn  <edelsohn@gnu.org>
361         * decl2.c (var_finalized_p): Swap arms of conditional.
363 2003-09-10  Nathan Sidwell  <nathan@codesourcery.com>
365         PR c++/11788
366         * typeck.c (build_address): If it is a function, mark it used.
367         (build_unary_op): Do not lose object's side-effects when taking
368         address of static member function.
369         * class.c (resolve_address_of_overloaded_function): Use
370         tsubst_flags_t parameter. Only expect overload sets. Adjust.
371         (instantiate_type): Adjust flags passing. Do not lose object's
372         side-effects when taking address of static member function.
374 2003-09-11  Richard Henderson  <rth@redhat.com>
376         * semantics.c (expand_or_defer_fn): Update for new
377         cgraph_finalize_function argument.
379 2003-09-10  Richard Henderson  <rth@redhat.com>
381         * decl2.c (cxx_callgraph_analyze_expr): Mark argument unused.
383 2003-09-10  Jan Hubicka  <jh@suse.cz>
385         * decl2.c (var_finalized_p): New.
386         (maybe_emit_vtables, write_out_vars, finish_file): Use it.
388 2003-09-10  Richard Henderson  <rth@redhat.com>
390         * decl2.c (cxx_callgraph_analyze_expr): New, from corpse of
391         mark_member_pointers.
392         (lower_function): Remove.
393         * cp-tree.h: Update to match.
394         * cp-lang.c (LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR): New.
395         (LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Remove.
397 2003-09-09  Richard Henderson  <rth@redhat.com>
399         * semantics.c (expand_or_defer_fn): Update call to 
400         cgraph_finalize_function.
402         * semantics.c (expand_or_defer_fn): Use cgraph_finalize_function
403         always.
405         * decl2.c (finish_file): Avoid out-of-bounds array reference
406         during memmove.
408 2003-09-09  Richard Henderson  <rth@redhat.com>
410         * decl2.c (mark_member_pointers): Rename from
411         mark_member_pointers_and_eh_handlers and don't check eh handlers.
413 2003-09-09  Christian Ehrhardt  <ehrhardt@mathematik.uni-ulm.de>
415         PR bootstrap/12168
416         * method.c (use_thunk): Clear DECL_RTL of copied nodes.
418 2003-09-08  Mark Mitchell  <mark@codesourcery.com>
420         * cp-lang.c (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define to
421         c_register_builtin_type.
423         PR c++/11786
424         * decl2.c (add_function): Do not complain about seeing the same
425         non-function twice.
426         * semantics.c (perform_koenig_lookup): Improve documentation.
428         PR c++/5296
429         * pt.c (try_one_overload): Add addr_p parameter.
430         (resolve_overloaded_unification): Pass it.
432 2003-09-08  Richard Henderson  <rth@redhat.com>
434         * optimize.c (maybe_clone_body): Inc/dec function_depth.
436 2003-09-08  Richard Henderson  <rth@redhat.com>
438         * decl.c (finish_function): Clear current_function_decl.
439         * decl2.c (mark_used): Don't push/pop gc context.
440         * optimize.c (optimize_function): Likewise.
441         * tree.c (cp_cannot_inline_tree_fn): Likewise.
442         * pt.c (instantiate_decl): Inc/dec function_depth instead.
443         * semantics.c (expand_body): Update for tree_rest_of_compilation
444         nested argument.
446 2003-09-07  Gabriel Dos Reis  <gcc@integrable-solutions.net>
448         PR c++/11762
449         * error.c (dump_decl): Handle namespace-alias-definition.
450         * decl.c (warn_extern_redeclared_static): There is no point in
451         checking changes in storage class specifier for a namespace
452         declaration. 
453         (duplicate_decls): Tidy diagnostic message.
454         * cxx-pretty-print.c (pp_cxx_left_brace): New macro.
455         (pp_cxx_right_brace): Likewise.
456         (pp_cxx_original_namespace_definition): New function.
457         (pp_cxx_namespace_alias_definition): Likewise.
458         (pp_cxx_declaration): Use them.  Handle NAMESPACE_DECLs.
460 2003-09-07  Jan Hubicka  <jh@suse.cz>
462         * decl2.c (maybe_emit_vtables, write_out_vars, finish_file):
463         Avoid re-emitting variables in unit-at-a-time mode.
465 2003-09-06  Mark Mitchell  <mark@codesourcery.com>
467         PR c++/11867
468         * call.c (standard_conversion): Improve comments.
469         (perform_direct_initialization): Make sure we return an expression
470         of the correct type.
471         * typeck.c (build_static_cast): Check for ambiguity and
472         accessibility when performing conversions.
474 2003-09-06  Gabriel Dos Reis  <gdr@integrable-solutions.net>
476         * cp-tree.h (add_binding): Remove declaration.
477         * name-lookup.h (supplement_binding): Declare.
478         * decl.c (add_binding): Move to name-lookup.c.
479         (push_local_binding): Adjust.
480         (push_class_binding): Likewise.
481         (set_identifier_type_value_with_scope): Likewise.
482         * name-lookup.c (supplement_binding): Rename from add_binding.
483         Return a bool.  Improve documentation. 
484         (set_namespace_binding): Adjust.
485         * Make-lang.in (cp/name-lookup.o): Depend on toplev.h
487 2003-09-06  Nathan Sidwell  <nathan@codesourcery.com>
489         PR c++/11794
490         * class.c (pushclass): Push dependent using decls for nested
491         classes of templates too.
493 2003-09-06  Roger Sayle  <roger@eyesopen.com>
495         PR c++/11409
496         * class.c (resolve_address_of_overloaded_function): When building
497         list of matching non-template function decls, ignore anticipated
498         declarations of undeclared or shadowed GCC builtins.
500 2003-09-06  Steven Bosscher  <steven@gcc.gnu.org>
502         PR c++/11595
503         * decl.c (define_label): Remove unreachable timevar pop.
504         Always return the decl, even if the definition is invalid.
506 2003-09-06  Nathan Sidwell  <nathan@codesourcery.com>
508         PR c++/12167
509         * parser.c (cp_parser_late_parsing_default_args): Push & pop the
510         unparsed functions queue.
512 2003-09-05  Mark Mitchell  <mark@codesourcery.com>
514         PR c++/12163
515         * call.c (perform_direct_initialization): Correct logic for
516         direct-initialization of a class type.
518         PR c++/12146
519         * pt.c (lookup_template_function): Robustify.
521 2003-09-05  Nathan Sidwell  <nathan@codesourcery.com>
523         PR c++/11922
524         * pt.c (tsubst_qualified_id): Make sure we get a non-type.
525         (tsubst_expr, tsubst_copy_and_build): Pass false, not zero, as
526         is_type_p to lookup_qualified_name.
528         * semantics.c (finish_call_expr): Refactor some code.
530         PR c++/12037
531         * cp-tree.h (COMPOUND_EXPR_OVERLOADED): New.
532         (build_min_non_dep): Declare.
533         * tree.c (build_min): Propagate TREE_SIDE_EFFECTS.
534         (build_min_non_dep): New.
535         * cvt.c (convert_to_void): Don't explicitly copy
536         TREE_SIDE_EFFECTS, TREE_NO_UNUSED_WARNING.
537         * call.c (build_new_method_call): Use build_min_non_dep.
538         * decl2.c (grok_array_decl): Likewise.
539         (build_offset_ref_call_from_tree): Likewise.
540         * typeck.c (finish_class_member_access_expr,
541         build_x_indirect_ref, build_x_binary_op, build_x_unary_op,
542         build_x_conditional_expr, build_x_compound_expr): Likewise.
543         (build_static_cast, build_reinterpret_cast,
544         build_const_cast): Propagate TREE_SIDE_EFFECTS inside a template.
545         * typeck2.c (build_x_arrow): Use build_min_non_dep.
546         (build_functional_cast): Propagate TREE_SIDE_EFFECTS inside a
547         template.
548         * rtti.c (build_dynamic_cast_1): Set DECL_IS_PURE.
549         (build_dynamic_cast): Set TREE_SIDE_EFFECTS.
550         * pt.c (build_non_dependent_expr): Check COMPOUND_EXPR_OVERLOADED.
552 2003-09-04  Richard Henderson  <rth@redhat.com>
554         * decl2.c (mark_member_pointers_and_eh_handlers): Update for
555         change in cgraph_mark_needed_node arguments.
557 2003-09-02  Geoffrey Keating  <geoffk@apple.com>
559         PR 12161
560         * decl2.c (mark_used): Use ggc_push_context/ggc_pop_context.
561         * tree.c (cp_cannot_inline_tree_fn): Likewise.
563 2003-09-04  Nathan Sidwell  <nathan@codesourcery.com>
565         * cp-tree.h (finish_sizeof, finish_alignof): Remove.
566         (expr_sizeof): Replace with ...
567         (cxx_sizeof_or_alignof_expr): ... here.
568         (cxx_sizeof_or_alignof_type): Make complain parameter a bool.
569         * parser.c (cp_parser_unary_expression): Commonize alignof and
570         sizeof handling.
571         * pt.c (tsubst_copy_and_build): Adjust alignof and sizeof
572         substitution.
573         * semantics.c (finish_sizeof, finish_alignof): Remove.
574         * typeck.c (cxx_sizeof_or_alignof_type): Complain parameter
575         becomes bool. Set TREE_READONLY.
576         (expr_sizeof): Replace with ...
577         (cxx_sizeof_or_alignof_expr): ... here. Clear TREE_SIDE_EFFECTS.
579 2003-09-04  Mark Mitchell  <mark@codesourcery.com>
581         Remove cast-as-lvalue extension.
582         * call.c (build_conditional_expr): Correct formatting.
583         (convert_like_real): Use lvalue_p, not non_cast_lvalue_p.
584         (initialize_real): Use real_lvalue_p, not real_non_cast_lvalue_p.
585         * cp-tree.h (non_cast_lvalue_p): Remove.
586         (real_non_cast_lvalue_p): Remove.
587         (non_cast_lvalue_or_else): Remove.
588         * tree.c (lvalue_p_1): Remove allow_cast_as_lvalue parameter.
589         (real_lvalue_p): Adjust call to lvalue_p_1.
590         (non_cast_lvalue_p): Remove.
591         (non_cast_lvalue_or_else): Remove.
592         (lvalue_p): Adjust call to lvalue_p_1.
593         (lvalue_or_else): Simplify.
594         * typeck.c (build_unary_op): Use lvalue_or_else, not
595         non_cast_lvalue_or_else.
596         (build_static_cast): Use real_lvalue_p, not real_non_cast_lvalue_p.
598 2003-09-03  DJ Delorie  <dj@redhat.com>
600         * decl.c (finish_function): Pass fndecl to aggregate_value_p.
602 2003-09-03  Mark Mitchell  <mark@codesourcery.com>
604         PR c++/12053
605         * class.c (include_empty_classes): Correct logic for ABI version 1.
607 2003-09-03  Richard Henderson  <rth@redhat.com>
609         * optimize.c (optimize_function): Push/pop ggc context around
610         the call to optimize_inline_calls.
612 2003-09-02  Scott Brumbaugh  <scottb.lists@verizon.net>
614         PR c++/11553
615         * parser.c (cp_parser_decl_specifier_seq): Add check for a
616         duplicate friend decl-specifier.
618 2003-09-02  Mark Mitchell  <mark@codesourcery.com>
620         PR c++/11847
621         * pt.c (convert_nontype_argument): Correct representation of
622         REFERENCE_TYPE expressions.
624         PR c++/11808
625         * cp-tree.h (KOENIG_LOOKUP_P): New macro.
626         (finish_call_expr): Change prototype.
627         * parser.c (cp_parser_postfix_expression): Adjust call to
628         finish_call_expr.
629         * pt.c (tsubst_copy_and_build): Use KOENIG_LOOKUP_P.
630         * semantics.c (finish_call_expr): Add koenig_p parameter.
632 2003-09-01  Mark Mitchell  <mark@codesourcery.com>
634         PR c++/12114
635         * cp-tree.h (initialize_reference): Change prototype.
636         * call.c (initialize_reference): Add cleanup parameter.
637         * decl.c (grok_reference_init): Likewise.
638         (check_initializer): Likewise.
639         (cp_finish_decl): Insert a CLEANUP_STMT if necessary.
640         (duplicate_decls): When replacing an anticipated builtin, do not
641         honor TREE_NOTHROW.
642         * typeck.c (convert_for_initialization): Correct call to
643         initialize_reference.
645         PR c++/11972
646         * pt.c (dependent_type_p_r): Pass only the innermost template
647         arguments to any_dependent_template_arguments_p.
649 2003-09-01  Josef Zlomek  <zlomekj@suse.cz>
651         * error.c (dump_expr): Kill BIT_ANDTC_EXPR.
652         * lex.c (init_operators): Kill BIT_ANDTC_EXPR.
653         * pt.c (tsubst_copy): Kill BIT_ANDTC_EXPR.
654         * typeck.c (build_binary_op): Kill BIT_ANDTC_EXPR.
655         (tsubst_copy_and_build): Kill BIT_ANDTC_EXPR.
657 2003-08-29  Mark Mitchell  <mark@codesourcery.com>
659         PR c++/12093
660         * pt.c (build_non_dependent_expr): Do not build a
661         NON_DEPENDENT_EXPR for a STRING_CST.
663         PR c++/11928
664         * search.c (add_conversions): Avoid adding two conversion
665         operators for the same type.
667 2003-08-29  Mark Mitchell  <mark@codesourcery.com>
669         PR c++/6196
670         * pt.c (tsubst_copy_and_build): Correct handling of
671         address-of-label extension.
672         * semantics.c (finish_goto_stmt): The address of a label must go
673         through the lvalue-to-rvalue conversion.
675 2003-08-29  Richard Henderson  <rth@redhat.com>
676             Jason Merrill <jason@redhat.com>
678         * cp-lang.c (LANG_HOOKS_RTL_EXPAND_START): New.
679         (LANG_HOOKS_RTL_EXPAND_STMT): New.
680         * cp-tree.h (cxx_expand_function_start): Declare.
681         * decl.c (start_function): Use allocate_struct_function.
682         Move stmts_are_full_exprs_p assertion from expand_body.
683         Do not free_after_parsing or free_after_compilation.
684         (cxx_push_function_context): Move code to set struct function
685         data from genrtl_start_function.
686         * optimize.c (optimize_function): Don't inc/dec function_depth.
687         * semantics.c (expand_body): Use tree_rest_of_compilation.
688         (cxx_expand_function_start): Rename from genrtl_start_function,
689         omit bits done by tree_rest_of_compilation.
690         (genrtl_finish_function): Remove.
691         (clear_decl_rtl): Move to ../tree-optimize.c.
693 2003-08-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
695         PR c++/11811
696         * cxx-pretty-print.c (pp_cxx_canonical_template_parameter): New
697         function. 
698         * cxx-pretty-print.h: Declare.
699         * error.c (dump_template_parameter): Use it.
700         (dump_type): Likewise.
702 2003-08-28  Mark Mitchell  <mark@codesourcery.com>
704         * init.c (decl_constant_value): Deal with COND_EXPR specially.
705         * call.c (build_conditional_expr): Revert previous patch.
707         PR optimization/5079
708         * call.c (build_conditional_expr): Use decl_constant_value to
709         simplify the arguments.
711 2003-08-26  Dan Nicolaescu  <dann@ics.uci.edu>
713         * parser.c (struct cp_token): Use enum bitfields.
714         (CP_TOKEN_BLOCK_NUM_TOKENS): Make sure cp_token_block fits in a
715         512B allocation unit.
716         (cp_parser_token_tree_map_node): Use enum bitfields.
718 2003-08-26  Nathan Sidwell  <nathan@codesourcery.com>
720         PR c++/11871
721         * decl.c (push_class_level_binding): Correct old_decl value from
722         my 2003-07-29 reorganization.
724         * call.c (build_call): Don't set TREE_SIDE_EFFECTS here.
725         (build_new_method_call): Add goto finish.
726         * semantics.c (simplify_aggr_init_exprs_r): Don't set
727         TREE_SIDE_EFFECTS on a call.
729 2003-08-25  Richard Henderson  <rth@redhat.com>
731         * cxx-pretty-print.c (pp_cxx_class_name): Remove unused function.
733 2003-08-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
735         * cxx-pretty-print.h (pp_cxx_flag_default_argument): New flag.
736         (cxx_pretty_printer): Adjust base type.
737         (pp_cxx_function_specifier): Declare.
738         * cxx-pretty-print.c (pp_cxx_whitespace): New macro.
739         (pp_cxx_left_paren): Likewise.
740         (pp_cxx_right_paren): Likewise.
741         (pp_cxx_dot): Likewise.
742         (pp_cxx_arrow): Likewise.
743         (pp_cxx_semicolon): Likewise.
744         (pp_cxx_identifier): Likewise.
745         (pp_cxx_cv_qualifier_seq): Likewise.
746         (pp_cxx_storage_class_specifier): Likewise.
747         (pp_cxx_expression_list): Likewise.
748         (pp_cxx_space_for_pointer_operator): Likewise.
749         (pp_cxx_init_declarator): Likewise.
750         (pp_cxx_call_argument_list): Likewise.
751         (pp_cxx_nonconsecutive_character): Tidy.
752         (pp_cxx_conversion_function_id): New function.
753         (pp_cxx_template_id): Likewise.
754         (pp_cxx_template_keyword_if_needed): Likewise.
755         (pp_cxx_nested_name_specifier): Likewise.
756         (pp_cxx_unqualified_id): Tidy
757         (pp_cxx_qualified_id): Handle more nodes.
758         (pp_cxx_primary_expression): Tidy.
759         (pp_cxx_postfix_expression): Likewise.
760         (pp_cxx_new_expression): Tidy.
761         (pp_cxx_delete_expression): Likewise.
762         (pp_cxx_cast_expression): New function.
763         (pp_cxx_pm_expression): Tidy.
764         (pp_cxx_conditional_expression): Likewise.
765         (pp_cxx_assignment_operator): New function.
766         (pp_cxx_assignment_expression): Tidy.
767         (pp_cxx_expression): New function.
768         (pp_cxx_function_specifier): Likewise.
769         (pp_cxx_decl_specifier_seq): Likewise.
770         (pp_cxx_simple_type_specifier): Tidy.
771         (pp_cxx_type_specifier_seq): Likewise.
772         (pp_cxx_ptr_operator): New function.
773         (pp_cxx_implicit_parameter_type): Likewise.
774         (pp_cxx_parameter_declaration): Tidy.
775         (pp_cxx_parameter_declaration_clause): New function.
776         (pp_cxx_exception_specification): Likewise.
777         (pp_cxx_direct_declarator): Tidy.
778         (pp_cxx_declarator): Likewise.
779         (pp_cxx_ctor_initializer): New function.
780         (pp_cxx_function_definition): Likewise.
781         (pp_cxx_abstract_declarator): Tidy.
782         (pp_cxx_direct_abstract_declarator): Likewise.
783         (pp_cxx_type_id): Likewise.
784         (pp_cxx_exception_declaration): New function.
785         (pp_cxx_statement): Likewise.
786         (pp_cxx_simple_declaration): Likewise.
787         (pp_cxx_template_parameter_list): Likewise.
788         (pp_cxx_template_parameter): Likewise.
789         (pp_cxx_template_declaration): Likewise.
790         (pp_cxx_explicit_specialization): Likewise.
791         (pp_cxx_explicit_instantiation): Likewise.
792         (pp_cxx_declaration): Tidy.
793         (pp_cxx_pretty_printer_init): Initialize more fields.
795 2003-08-25  Mark Mitchell  <mark@codesourcery.com>
797         PR c++/8795
798         * cp-tree.h (build_cplus_method_type): Remove.
799         * call.c (standard_conversion): Use build_method_type_directly
800         instead of build_cplus_method_type.
801         * class.c (build_clone): Likewise.
802         (adjust_clone_args): Likewise.
803         * decl.c (build_ptrmem_type): Likewise.
804         (grokdeclarator): Likewise.
805         (check_function_type): Likewise.
806         * decl2.c (grok_method_quals): Likewise.
807         (maybe_retrofit_in_chrg): Likewise.
808         * pt.c (copy_default_args_to_explicit_spec): Likewise.
809         (tsubst_function_type): Likewise.
810         (tsubst): Likewise.
811         * tree.c (build_cplus_method_type): Remove.
812         * typeck.c (merge_types): Use build_method_type_directly.
814 2003-08-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
816         PR c++/3765
817         * search.c (dfs_access_in_type): Fix typo in comment.
818         (dfs_accessible_queue_p): Likewise.
819         (dfs_accessible_p): Only terminate when a friend is found.
820         (accessible_p): Return immediately if access_in_type allows
821         access.
823 2003-08-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
825         PR c++/641, c++/11876
826         * friend.c (add_friend): Add complain parameter.
827         (make_friend_class): Likewise.
828         (do_friend): Adjust add_friend call.
829         * decl.c (grokdeclarator): Adjust make_friend_class call.
830         * parser.c (cp_parser_member_declaration): Likewise.
831         (cp_parser_template_declaration_after_export): Likewise.
832         * pt.c (instantiate_class_template): Adjust make_friend_class
833         and add_friend call.
834         * cp-tree.h (make_friend_class): Adjust declaration.
835         (add_friend): Likewise.
837 2003-08-21  Jason Merrill  <jason@redhat.com>
839         PR c++/11283
840         * call.c (build_conditional_expr): Ignore cv-qual differences for
841         non-class types.
843 2003-08-21  Mark Mitchell  <mark@codesourcery.com>
845         PR c++/11551
846         * parser.c (cp_parser_id_expression): Add declarator_p parameter.
847         (cp_parser_primary_expression): Adjust call to
848         cp_parser_id_expression.
849         (cp_parser_unqualified_id): Complain about the use of
850         typedef-names in a destructor declarator.
851         (cp_parser_postfix_expression): Adjust call to
852         cp_parser_id_expression.
853         (cp_parser_type_parameter): Likewise.
854         (cp_parser_template_argument): Likewise.
855         (cp_parser_declarator_id): Likewise.
857         PR c++/11919
858         * call.c (standard_conversion): Use same_type_p, not pointer
859         equality, to compare types.
861         PR c++/10762
862         * parser.c (cp_parser_using_declaration): Check for invalid uses
863         of template-ids here...
864         * decl2.c (do_class_using_decl): ... rather than here.
866 2003-08-20  Mark Mitchell  <mark@codesourcery.com>
868         PR c++/11834
869         * pt.c (more_specialized): Bump processing_template_decl.
871 2003-08-21  Jason Merrill  <jason@redhat.com>
873         PR c++/11614
874         * decl.c (grokdeclarator): Recognize a flexible array based on the
875         type, not the form of the declarator.
877 2003-08-20  Jason Merrill  <jason@redhat.com>
879         * semantics.c (simplify_aggr_init_expr): Split out from
880         simplify_aggr_init_exprs_r.  Convert slot address to match
881         the return type.
882         * cp-tree.h: Declare it.
883         * tree.c (cp_copy_res_decl_for_inlining): Don't clobber the
884         DECL_NAME of a user variable.
886 2003-08-20  Nathan Sidwell  <nathan@codesourcery.com>
888         PR c++/11945
889         * pt.c (build_non_dependent_expr): Look inside COND_EXPR and
890         COMPOUND_EXPR.
891         * semantics.c (finish_expr_stmt): Always convert to void.
892         * typeck.c (build_x_compound_exp): Always convert to void.
894 2003-08-19  Mark Mitchell  <mark@codesourcery.com>
896         PR c++/11684
897         * cp-tree.h (grok_op_properties): Change prototype.
898         * decl.c (grok_op_properties): Add complain parameter.
899         (grokfndecl): Pass it.
900         * pt.c (tsubst_decl): Adjust accordingly.
902         PR c++/10926
903         * decl.c (start_method): Return immediately if push_template_decl
904         does not like the declaration.
905         * pt.c (push_template_decl_real): Disallow member template
906         destructors.
908         PR c++/11036
909         * cp-tree.h (add_binding): Add prototype.
910         * class.c (add_method): Set TYPE_HAS_DESTRUCTOR if appropriate.
911         (maybe_warn_about_overly_private_class): Use
912         CLASSTYPE_DESTRUCTORS.
913         (pushclass): Adjust call to set_identifier_type_value.
914         * decl.c (add_binding): Give it external linkage.
915         (push_local_binding): Adjust call to add_binding.
916         (push_class_binding): Likewise.
917         (set_identifier_type_value_with_scope): Change prototype.  Use
918         add_binding for global bindings.
919         (set_identifier_type_value): Adjust accordingly.
920         (pushtag): Likewise.
921         (pushdecl): Use set_identifier_type_value, not
922         set_identifier_type_value_with_scope.
923         (pushdecl_namespace_level): Adjust calls to
924         SET_IDENTIFIER_TYPE_VALUE to pass a DECL.
925         (pushdecl_class_level): Likewise.
926         (lookup_tag): Use select_decl.
927         (select_decl): Improve comment.
928         (record_builtin_type): Do not call pushdecl.
929         (cxx_init_decl_processing): Do not call xref_tag for bad_alloc.
930         (cp_finish_decl): Adjust call to set_identifier_type_value.
931         (check_elaborated_type_specifier): Improve checks for invalid uses
932         of typedefs.
933         (xref_tag): Adjust call to check_elaborated_type_specifier.
934         * decl2.c (grokclassfn): Do not set TYPE_HAS_DESTRUCTOR.
935         * name-lookup.c (set_namespace_binding): Use add_binding.
936         * parser.c (cp_parser_simple_type_specifier): Return a TYPE_DECL,
937         rather than an IDENTIFIER_NODE, to represent built-in types, if
938         requested by the caller.
939         (cp_parser_postfix_expression): Adjust call.
940         (cp_parser_type_specifier): Likewise.
941         (cp_parser_elaborated_type_specifier): Adjust call to
942         check_elaborated_type_specifier.
943         * typeck2.c (build_functional_cast): Do not perform name lookups.
945         PR c++/10717
946         * decl.c (expand_static_init): Remove unncessary code.
948 2003-08-19  Andrew Pinski  <pinskia@physics.uc.edu>
950         PR c++/10538, PR c/5582
951         * cp/cp-lang.c (LANG_HOOKS_DECL_UNINIT): Define.
953 2003-08-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
955         PR c++/11174
956         * init.c (build_offset_ref): Perform access checking for
957         pointer to member correctly.
959 2003-08-19  Gabriel Dos Reis  <gdr@integrable-solutions.net>
961         * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTICS): Fix spelling.
963 2003-08-18  Nathan Sidwell  <nathan@codesourcery.com>
965         PR c++/11957
966         * cp-tree.h (finish_stmt_expr): Add bool parameter.
967         * init.c (finish_init_stmts): Pass true to finish_stmt_expr. Don't
968         adjust the stmt_expr here.
969         (build_vec_init): Use finish_stmt_expr_expr, convert result to
970         array type.
971         * parser.c (cp_parser_primar_expression): Adjust finish_stmt_expr
972         call.
973         * pt.c (tsubst_copy): Likewise.
974         * semantics.c (finish_stmt_expr): Add parameter.
976         * pt.c (instantiate_class_template): Push to class's scope before
977         tsubsting base.
979 2003-08-17  Jan Hubicka  <jh@suse.cz>
981         PR C++/11702
982         * semantics.c (finish_id_expression): Mark all functions as used.
984 2003-08-16  Nathan Sidwell  <nathan@codesourcery.com>
986         PR c++/11512
987         * cvt.c (convert_to_void): Indicate which side of conditional has
988         no effects, and rhs of comma operator. Test for no sideeffect
989         expressions here and always build a convert expr.
990         * init.c (expand_default_init): Convert the init to void.
991         * typeck.c (build_x_compound_expr): Do not check for side effects
992         here.
993         (build_compound_expr): Do not convert lhs when building a
994         template.
996 2003-08-15  Nathan Sidwell  <nathan@codesourcery.com>
998         * cp-tree.def (NON_DEPENDENT_EXPR): Add operand.
999         * decl2.c (build_offset_ref_call_from_tree): Use
1000         build_non_dependent_expr.
1001         * error.c (dump_expr) <NON_DEPENDENT_EXPR case>: Dump the operand.
1002         * pt.c (build_non_dependent_expr): Set operand.
1004 2003-08-14  Jan Hubicka  <jh@suse.cz>
1006         * decl2.c (mark_member_pointers): Rename to...
1007         (mark_member_pointers_and_eh_tinfos): ... this one; deal with eh tinfos
1008         (lower_function): Update call.
1009         * except.c (eh_type_info): Break out from ...
1010         (build_eh_type): ... here; tinfo is already used.
1011         (finish_eh_spec_block): Mark tinfos as used.
1012         * semantics.c (finish_handler_params): Mark tinfo as used.
1013         * cp-tree.h (eh_type_info): Declare.
1015 2003-08-15  Nathan Sidwell  <nathan@codesourcery.com>
1017         * pt.c (instantiate_class_template): Set location before
1018         substuting bases.
1020         * decl.c (make_typename_type): Use my_friendly_assert.
1021         * pt.c (tsubst_aggr_type): Rearrange context substitution.
1023 2003-08-14  Jan Hubicka  <jh@suse.cz>
1025         * method.c (use_thunk): Expand body directly.
1027 2003-08-12  Mark Mitchell  <mark@codesourcery.com>
1029         PR c++/11703
1030         * call.c (type_passed_as): Use TYPE_SIZE, not TYPE_PRECISION to
1031         determine whether or not to promote types.
1032         (convert_for_arg_passing): Likewise.
1033         * decl2.c (cp_build_parm_decl): Do not set DECL_ARG_TYPE in
1034         templates.
1035         * pt.c (tsubst_decl): Do not expect it to be set.
1037         PR c++/9512
1038         PR c++/10923
1039         * cp-tree.h (check_elaborated_type_specifier): Declare.
1040         (handle_class_head): Remove.
1041         (note_got_semicolon): Likewise.
1042         (note_list_got_semicolon): Likewise.
1043         (finish_class_definition): Likewise.
1044         * decl.c (check_elaborated_type_specifier): Make it public.
1045         Robustify.
1046         (handle_class_head): Remove.
1047         * parser.c (cp_parser_elaborated_type_specifier): Use
1048         check_elaborated_type_specifier.
1049         (cp_parser_class_specifier): Do not call finish_class_definition.
1050         (cp_parser_class_head): Or handle_class_head.  Check for
1051         over-qualified names.
1052         * semantics.c (finish_class_definition): Remove.
1054         * parser.c (cp_parser_check_for_definition_in_return_type): New
1055         function.
1056         (cp_parser_simple_declaration): Adjust call to
1057         cp_parser_init_declarator.
1058         (cp_parser_decl_specifier_seq): Change type of
1059         declares_class_or_enum parameter.
1060         (cp_parser_explicit_instantiation): Adjust accordingly.
1061         (cp_parser_type_specifier): Change type of
1062         declares_class_or_enum parameter.
1063         (cp_parser_init_declarator): Add declares_class_or_enum
1064         parameter.
1065         (cp_parser_parameter_declaration): Adjust call to
1066         cp_parser_decl_specifier_seq.
1067         (cp_parser_function_definition): Likewise.
1068         (cp_parser_member_declaration): Likewise.
1069         (cp_parser_single_declaration): Likewise.
1071         * cp-tree.h (lang_type_class): Remove has_call_overloaded,
1072         has_array_ref_overloaded, has_arrow_overloaded, and got_semicolon.
1073         (TYPE_OVERLOADS_CALL_EXPR): Remove.
1074         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
1075         (TYPE_OVERLOADS_ARROW): Likewise.
1076         (CLASSTYPE_GOT_SEMICOLON): Likewise.
1077         * class.c (check_bases): Do not set them.
1078         (finish_struct_1): Likewise.
1079         * decl.c (cp_finish_decl): Do not set CLASSTYPE_GOT_SEMICOLON.
1080         (build_ptrmemfunc_type): Likewise.
1081         (grok_op_properties): Do not set TYPE_OVERLOADS_*.
1082         (start_function): Do not check CLASSTYPE_GOT_SEMICOLON.
1083         * decl2.c (grokfield): Do not set CLASSTYPE_GOT_SEMICOLON.
1084         * lex.c (note_got_semicolon): Remove.
1085         (note_list_got_semicolon): Likewise.
1086         * parser.c (cp_parser_simple_declaration): Do not call
1087         note_list_got_semicolon.
1088         * pt.c (list_eq): Remove.
1089         (lookup_template_class): Do not set CLASSTYPE_GOT_SEMICOLON.
1090         (instantiate_class_template): Do not set TYPE_OVERLOADS*.
1091         (instantiate_class_template): Do not set CLASSTYPE_GOT_SEMICOLON.
1092         * ptree.c (cxx_print_type): Do not print them.
1093         * semantics.c (finish_member_class_template): Do not call
1094         note_list_got_semicolon.
1096 2003-08-11  Aldy Hernandez  <aldyh@redhat.com>
1098         * call.c (standard_conversion): Opaque pointers interconvert.
1100         * testsuite/g++.dg/other/opaque-3.C: New.
1102 2003-08-11  Mark Mitchell  <mark@codesourcery.com>
1104         * typeck.c (merge_types): Handle cv-qualified pointer-to-member
1105         types correctly.
1107 2003-08-10  Mark Mitchell  <mark@codesourcery.com>
1109         PR c++/11789
1110         * cp-tree.h (get_vbase): Remove.
1111         (get_vbase_types): Remove.
1112         * init.c (expand_member_init): Correct logic for looking up base
1113         classes.
1115 2003-08-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1117         * error.c (dump_expr): Tidy.
1118         * cxx-pretty-print.c (pp_cxx_nonconsecutive_character): New.
1119         (pp_cxx_begin_template_argument_list): Likewise.
1120         (pp_cxx_end_template_argument_list): Likewise.
1121         (is_destructor_name): Likewise.
1122         (pp_cxx_unqualified_id): Likewise.
1123         (pp_cxx_qualified_id): Likewise.
1124         (pp_cxx_id_expression): Likewise.
1125         (pp_cxx_new_expression): Likewise.
1126         (pp_cxx_delete_expression): Likewise.
1127         (pp_cxx_pm_expression): Likewise.
1128         (pp_cxx_type_specifier): Rework.
1129         (pp_cxx_type_id): Likewise.
1130         (pp_cxx_primary_expression): Likewise.
1131         (pp_cxx_postfix_expression): Likewise.
1132         (pp_cxx_unary_expression): Likewise.
1133         (pp_cxx_multiplicative_expression): Likewise.
1134         (pp_cxx_conditional_expression): Likewise.
1135         (pp_cxx_assignment_expression): Likewise.
1136         (pp_cxx_pretty_printer_init): Tidy.
1138 2003-08-10  Nathan Sidwell  <nathan@codesourcery.com>
1140         * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): non-NULL
1141         NODE is always a TREE_VEC of nonzero size.
1142         (NUM_TMPL_ARGS): NODE is always a TREE_VEC.
1143         * decl2.c (arg_assoc): Template args will be a vec.
1144         * error.c (dump_decl) <TEMPLATE_ID_EXPR case>: Call
1145         dump_template_argument_list.
1146         (dump_template_parms): Args will be a vec.
1147         * parser.c (cp_parser_template_argument_list): Produce a
1148         vector, not a list.
1149         * pt.c (coerce_template_parms): Args are always vectors.
1150         (mangle_class_name_for_template): Likewise.
1151         (lookup_template_function): Likewise.
1152         (lookup_template_class): Likewise.
1153         (tsubst_template_args): Likewise.
1154         (tsubst_baselink): Use tsubst_template_args.
1155         (tsubst_qualified_id): Likewise.
1156         (tsubst_copy) <TEMPLATE_ID_EXPR case>: Likewise.
1157         (tsubst_copy_and_build) <TEMPLATE_ID_EXPR case>: Likewise.
1158         (any_dependent_template_args_p):  Args are always vectors.
1159         * tree.c (cp_tree_equal): Add TEMPLATE_ID_EXPR case.
1161         PR c++/11670
1162         * call.c (convert_like_real): Add rvalue binding error message.
1163         * error.c (dump_expr) <NOP_EXPR case>: Detect when the no expr is
1164         really a cast.
1166         PR c++/10530
1167         * pt.c (dependent_type_p_r): A dependent template-id is a class
1168         type with dependent template arguments, or a bound template
1169         template parameter.
1170         (type_dependent_expression_p): A template function decl cannot
1171         have a dependent context.
1173 2003-08-07  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1175         PR c++/5767
1176         * parser.c (cp_parser_class_name): Return immediately when scope
1177         is error_mark_node.
1179 2003-08-07  Aldy Hernandez  <aldyh@redhat.com>
1181         * cp/Make-lang.in (cp/call.o): Add dependency for target.h.
1183         * cp/call.c (standard_conversion): Support opaque types.
1184         Include target.h.
1185         (strip_top_quals): Use cp_build_qualified_type instead of
1186         TYPE_MAIN_VARIANT.
1188         * cp/typeck.c (convert_for_assignment): Support opaque types.
1190         * testsuite/g++.dg/other/opaque-1.C: New.
1192         * testsuite/g++.dg/other/opaque-2.C: New.
1194 2003-08-06  Aldy Hernandez  <aldyh@redhat.com>
1196         * decl.c (grokparms): Use cp_build_qualified_type instead
1197         TYPE_MAIN_VARIANT.
1199 2003-08-05  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1201         * cxx-pretty-print.h: New file.
1202         * cxx-pretty-print.c: Likewise.
1203         * error.c (scratch_pretty_printer): Change type.
1204         (init_error): Tidy.
1205         (dump_aggr_type): Likewise.
1206         (dump_global_iord): Likewise.
1207         (dump_expr): Likewise.
1208         (dump_char): Remove.
1209         * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTITCS): Define.
1210         (cxx_initialize_diagnostics): New function.
1211         * Make-lang.in (CXX_OBJS): Add cp/cxx-pretty-print.o
1212         (CXX_PRETTY_PRINT_H): New variable.
1213         (cp/cxx-pretty-print.o): New rule.
1214         (cp/cp-lang.o): Update dependence.
1215         (cp/error.o): Likewise.
1217 2003-08-05  Steven Bosscher  <steven@gcc.gnu.org>
1219         * cp-tree.h (struct lang_decl): Don't include c_lang_decl.
1220         (DECL_DECLARED_INLINE_P): Remove.
1221         * decl2.c (import_export_decl): Only look at DECL_DECLARED_INLINE_P
1222         if decl is a FUNCTION_DECL.  This never made sense, but now it is
1223         required to avoid a tree check failure.
1224         * decl.c (grokfndecl): Don't touch DID_INLINE_FUNC.
1225         * optimize.c (maybe_clone_body): Likewise.
1227 2003-08-04  Roger Sayle  <roger@eyesopen.com>
1229         * decl.c (cxx_insert_default_attributes): Delete.
1230         * cp-tree.h (cxx_insert_default_attributes): Don't prototype.
1231         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Don't define.
1233 2003-08-03  Nathan Sidwell  <nathan@codesourcery.com>
1235         PR c++/11704
1236         * pt.c (type_dependent_expression_p): Cope with COMPONENT_REF with
1237         unknown type.
1239         PR c++/11766
1240         * typeck.c (comp_ptr_ttypes_real): Don't loop on pointers to
1241         member functions.
1243 2003-08-02  Nathan Sidwell  <nathan@codesourcery.com>
1245         PR c++/9447
1246         * cp-tree.def (USING_DECL): Document its type.
1247         * class.c (pushclass): If we're entering a template, push any
1248         dependent using decls it has.
1249         * decl2.c (do_class_using_decl): Refactor. Type is NULL iff it is
1250         a dependent scope.
1251         * pt.c (tsubst_decl) <USING_DECL case>: Set type.
1252         (tsubst): Remove USING_DECL checks.
1253         (type_dependent_expression_p): Remove USING_DECL case.
1254         * semantics.c (finish_member_declaration): A USING_DECL's type
1255         indicates whether it is dependent.
1257 2003-08-02  Nathan Sidwell  <nathan@codesourcery.com>
1259         * cp-tree.h (pushclass): Remove unneeded parameter.
1260         * class.c (pushclass): Remove unneeded MODIFY parm. Adjust.
1261         (push_nested_class): Adjust pushclass call.
1262         * pt.c (instantiate_class_template): Likewise.
1263         * semantics.c (begin_class_definition): Likewise.
1265 2003-08-01  Nathanael Nerode  <neroden@gcc.gnu.org>
1267         * typeck2.c (add_exception_specifier): Use 'bool' where appropriate.
1269 2003-08-01  Mark Mitchell  <mark@codesourcery.com>
1271         PR c++/11697
1272         * decl.c (decls_match): Don't ignore the types of template
1273         classes.
1275         PR c++/11744
1276         * pt.c (tsubst_copy_and_build): Refine Koenig lookup logic.
1278 2003-08-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1280         PR c++/8442, c++/8806
1281         * decl.c (qualify_lookup): Accept TEMPLATE_DECL if types are
1282         preferred.
1283         (check_elaborated_type_specifier): Add allow_template_p
1284         parameter.  Check tag mismatch and class template.
1285         (xref_tag): Add template_header_p parameter.  Add assertion
1286         that name is an IDENTIFIER_NODE.  Remove implicit typename
1287         warning.  Simplify lookup process if globalize is true.
1288         (cxx_init_decl_processing): Adjust call to xref_tag.
1289         (xref_tag_from_type): Likewise.
1290         * decl2.c (handle_class_head): Likewise.
1291         * parser.c (cp_parser_elaborated_type_specifier,
1292         cp_parser_class_head): Likewise.
1293         * rtti.c (init_rtti_processing, build_dynamic_cast1,
1294         tinfo_base_init, emit_support_tinfos): Likewise.
1295         * class.c (is_base_of_enclosing_class): Remove.
1296         * pt.c (convert_template_argument): Don't accept RECORD_TYPE as
1297         template template argument.
1298         * cp-tree.h (xref_tag): Adjust declaration.
1299         (is_base_of_enclosing_class): Remove.
1300         * NEWS: Document template template argument change.
1302 2003-08-01  Nathan Sidwell  <nathan@codesourcery.com>
1304         * parser.c (cp_parser_init_declarator,
1305         cp_paser_member_declaration): Reformat.
1306         * pt.c (lookup_template_class, type_unification_real, unify,
1307         type_dependent_expression_p): Reformat.
1309         PR c++/11295
1310         * cp-tree.h (tubst_flags_t): Add tf_stmt_expr_cmpd,
1311         tf_stmt_expr_body.
1312         (finish_stmt_expr_expr): Declare.
1313         * parser.c (cp_parser_primary_expression): Tell
1314         cp_parser_compount_statement that it is a statement expression.
1315         (cp_parser_statement, cp_parser_labeled_statement,
1316         cp_parser_compound_statement, cp_parser_statement_seq_opt): Add
1317         in_statement_expr_p parameter.
1318         (cp_parser_expression_statement): Likewise. Call
1319         finish_stmt_expr_expr for final expression of a statement
1320         expression.
1321         (cp_parser_for_init_statement,
1322         cp_parser_implicitly_scoped_statement,
1323         cp_parser_already_scoped_statement, cp_parser_function_definition,
1324         cp_parser_try_block, cp_parser_handled): Adjust.
1325         * pt.c (tsubst_copy) <STMT_EXPR case>: Pass tf_stmt_expr.
1326         (tsubst_expr): Process tf_stmt_expr and tf_stmt_exprs flags.
1327         (tsubst_expr) <EXPR_STMT case>: Check tf_stmt_exprs flag.
1328         * semantics.c (finish_expr_stmt): Do not deal with statement
1329         expressions.
1330         (begin_stmt_expr): Clear last_expr_type.
1331         (finish_stmt_expr_expr): New.
1332         (finish_stmt_expr): Process the value expression.
1334         * typeck.c (build_compound_expr): If RHS is a TARGET_EXPR, put the
1335         compound expr inside the target's initializer.
1337         PR c++/11525
1338         * parser.c (cp_parser_primary_expression): Do not set
1339         non-constant-p merely because it is a dependent scope.
1341         PR c++/9447
1342         * decl2.c (do_class_using_decl): Set type to NULL_TREE.
1343         * semantics.c (finish_expr_stmt): Do not convert to void in a
1344         template.
1346 2003-07-31  Nathan Sidwell  <nathan@codesourcery.com>
1348         * pt.c (coerce_template_parms): Refactor.
1349         (fn_type_unification): Increment processing_template_decl when
1350         tsubsting an incomplete set of explicit args.
1352         PR c++/11347
1353         * pt.c (instantiate_class_template): Increment
1354         processing_template_decl around the tsubst of a template member
1355         class.
1356         (tsubst_qualified_id): Assert we do not have a dependent scope.
1358         * pt.c (coerce_template_template_parms, lookup_template_class,
1359         can_complete_type_without_circularity, instantiate_class_template,
1360         tsubst_decl, unify): Reformat.
1362 2003-07-31  Jan Hubicka  <jh@suse.cz>
1364         * decl2.c (maybe_make_one_only): Use mark_referenced.
1365         * method.c (use_thunk): Likewsie.
1367 2003-07-30  Jan Hubicka  <jh@suse.cz>
1369         * class.c (build_vtable_entry_ref): Kill.
1370         (build_vtbl_ref_1): Do not call build_vtable_entry_ref.
1371         (build_vfn_ref): Do not call build_vtable_entry_ref.
1372         * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Kill.
1373         * cp-tree.h (prepare_assemble_variable): Kill.
1374         * cp-decl.c (prepare_assemble_variable): Kill.
1376 2003-07-29  Geoffrey Keating  <geoffk@apple.com>
1378         * parser.c (cp_lexer_new_main): Use c_common_no_more_pch instead
1379         of setting valid_pch by hand.
1381 2003-07-29  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
1383         * decl.c (finish_enum): Initialize underlying_type.
1385 2003-07-29  Nathan Sidwell  <nathan@codesourcery.com>
1387         PR c++/9447
1388         * decl.c (add_binding): Add bval local variable.
1389         (push_class_level_binding): Likewise. Allow a USING_DECL to be
1390         pushed.
1391         * decl2.c (do_class_using_decl):  The type of a using decl is
1392         unknown.
1393         * parser.c (cp_parser_postfix_expression): Refactor unqualified-id
1394         function call lookup code.
1395         * pt.c (tsubst): A USING_DECL will have unknown type.
1396         (tsubst_copy_and_build): Allow a using decl.
1397         (type_dependent_expression_p): A USING_DECL will make it
1398         dependent.
1399         * semantics.c (finish_member_declaration): Push a dependent using
1400         declaration.
1402 2003-07-28  Mark Mitchell  <mark@codesourcery.com>
1404         PR c++/11530
1405         * parser.c (cp_parser_postfix_expression): Do not call mark_used.
1406         * semantics.c (finish_id_expression): Call mark_used for all
1407         declarations.
1409 2003-07-28  Mark Mitchell  <mark@codesourcery.com>
1411         PR c++/11667
1412         * call.c (standard_conversion): Allow all integral->enumeral
1413         conversions, after marking them as bad.
1414         * decl.c (finish_enum): Make sure that all enumerators are
1415         properly converted to the underlying type.
1416         (build_enumerator): Set DECL_CONTEXT for namespace-scope
1417         enumeration types.
1418         * pt.c (tsubst_copy): Adjust handling of CONST_DECLs accordingly.
1419         (tsubst_enum): Tidy.
1421         * Make-lang.in (typeck.o): Depend on convert.h.
1422         (class.o): Likewise.
1423         (rtti.o): Likewise.
1424         * call.c: Include convert.h.
1425         (convert_arg_to_ellipsis): Use convert_to_real.
1426         * class.c: Include convert.h.
1427         (build_base_path): Use convert_to_integer.
1428         * rtti.c: Include convert.h.
1429         (build_headof): Use convert_to_integer.
1430         * typeck.c: Include convert.h.
1431         (decay_conversion): Use convert_to_integer.
1432         (build_unary_op): Use build_nop.
1433         (get_delta_difference): Use convert_to_integer.
1434         (build_ptrmemfunc): Avoid unncessary conversions.
1436 2003-07-28  Jan Hubicka  <jh@suse.cz>
1438         * decl2.c (mark_member_pointers): Verify that member pointer points to
1439         the function.
1441 2003-07-28  Nathan Sidwell  <nathan@codesourcery.com>
1443         * cp-tree.h (begin_compound_stmt): No scope arg is a bool.
1444         (finish_compound_stmt): Remove no scope arg.
1445         * decl.c (register_dtor_fn): Adjust begin_compound_stmt and
1446         end_compound_stmt calls.
1447         (expand_static_init, begin_destructor_body, begin_function_body,
1448         finish_function_body): Likewise.
1449         * decl2.c (start_objects, finish_objects,
1450         start_static_storage_duration_function,
1451         finish_static_storage_duration_function): Likewise.
1452         * init.c (begin_init_stmts, finish_init_stmts,
1453         construct_virtual_base, build_vec_init): Likewise.
1454         * method.c (do_build_assign_ref, synthesize_method): Likewise.
1455         * parser.c (cp_parser_compound_statement,
1456         cp_parser_implicitly_scoped_statement,
1457         cp_parser_already_scoped_statement): Likewise.
1458         * pt.c (tsubst_expr): Likewise.
1459         * semantics.c (begin_compound_stmt): No scope arg is a bool.
1460         (finish_compound_stmt): Remove no scope arg.
1462         * error.c (dump_expr) <COMPOUND_EXPR case>: A compound expr is
1463         always dyadic.
1465 2003-07-27  Mark Mitchell  <mark@codesourcery.com>
1467         * call.c (standard_conversion): Tweak handling of
1468         pointer-to-member types.
1469         * pt.c (tsubst): Correctly qualify pointers-to-data member types.
1470         * typeck.c (comp_ptr_ttypes_real): Check qualifiers on
1471         pointer-to-data member types.
1473 2003-07-27  Nathan Sidwell  <nathan@codesourcery.com>
1475         * parser.c (cp_parser_type_parameter): Reformat.
1476         (cp_parser_parameter_declaration): Deprecate default args where
1477         not allowed.
1479 2003-07-26  Nathan Sidwell  <nathan@codesourcery.com>
1481         * cfns.h: Rebuilt.
1483         * cp-tree.h (begin_init_stmts, finish_init_stmts): Remove.
1484         (begin_global_stmt_expr, finish_global_stmt_expr): Remove.
1485         * init.c (begin_init_stmts): Make static. Return is_global
1486         value. Always call begin_stmt_expr.
1487         (finish_init_stmts): Make static. Add is_global parm. Always
1488         building a stmt tree.
1489         (build_aggr_init): Adjust begin_init_stmts, finish_init_stmts calls.
1490         (build_vec_init): Likewise. Always building a stmt tree.
1491         (expand_default_init): Always building a stmt tree.
1492         (get_temp_regvar): Likewise.
1493         * semantics.c (begin_global_stmt_expr,
1494         finish_global_stmt_expr): Remove.
1496 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
1498         * cp-tree.h (build_compound_expr): Take LHS & RHS args.
1499         (build_x_compound_expr_from_list): Declare.
1500         * typeck.c (build_x_compound_expr_from_list): New.
1501         (build_x_compound_expr): Adjust.
1502         (build_compound_expr): Remove unreachable code. Take two
1503         parameters, adjust.
1504         * decl.c (grok_reference_init): Use
1505         build_x_compound_expr_from_list.
1506         (expand_static_init): Adjust build_compound_expr call.
1507         (cxx_maybe_build_cleanup): Likewise.
1508         * init.c (perform_member_init): Use
1509         build_x_compound_expr_from_list.
1510         (build_new_1): Likewise.
1511         (build_vec_delete): Adjust build_compound_expr calls.
1512         (build_vbase_delete): Likewise.
1513         * typeck2.c (store_init_value): Use
1514         build_x_compound_expr_from_list.
1515         (build_functional_cast): Likewise.
1517 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
1519         * cp-tree.h (enum tsubst_flags_t): Add tf_user.
1520         * decl.c (make_typename_type): Pass it.
1521         * pt.c (lookup_template_class): Use it.
1522         (resolve_typename_type): Pass it.
1523         * semantics.c (finish_template_type): Pass it.
1525 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
1527         PR c++/11617
1528         * cp-tree.h (qualified_name_lookup_error): Declare.
1529         * pt.c (tsubst_qualified_id): Use qualified_name_lookup_error for
1530         errors.
1531         (tsubst_expr) <DECL_STMT case>: Likewise.
1532         (tsubst_copy_and_build) <COMPONENT_REF case>: Likewise.
1533         * semantics.c (qualified_name_lookup_error): New, broken out of ...
1534         (finish_id_expression): ... here. Use it.
1536 2003-07-25  Falk Hueffner  <falk.hueffner@student.uni-tuebingen.de>
1538         * cfns.gperf: Add '%%' delimiter to placate gperf 3.0.
1540 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
1542         PR c++/11596
1543         * pt.c (maybe_fold_nontype_arg, maybe_fold_nontype_args): Remove.
1544         (tsubst_template_arg): New.
1545         (tsubst_template_arg_vector): Rename to ...
1546         (tsubst_template_args): ... this. Accept a TREE_LIST form. Use
1547         tsubst_template_arg.
1548         (coerce_template_parms): Use tsubst_template_arg for default
1549         value.
1550         (tsubst_template_parms): Likewise.
1551         (tsubst_aggr_type): Adjust.
1552         (tsubst_decl): Likewise.
1553         (tsubst): Use tsubst_template_arg for a DOMAIN. Adjust.
1554         (tsubst_copy) <TEMPLATE_ID_EXPR case>: Use tsubst_template_args.
1556 2003-07-25 Gabriel Dos Reis  <gdr@integrable-solutions.net>
1558         * Make-lang.in (cp/error.o): Depend on DIAGNOSTIC_H.
1559         * error.c: Use the new pretty-printer framework.
1561 2003-07-24  Per Bothner  <pbothner@apple.com>
1563         * decl.c (pushdecl_class_level): Don't use push_srcloc/pop_srcloc
1564         which causes errors messages to incorrectly mention included files.
1566 2003-07-24  Mark Mitchell  <mark@codesourcery.com>
1568         * cp-tree.h (convert_to_base_statically): Declare.
1569         * call.c (build_special_member_call): Convert INSTANCE to the base
1570         type.
1571         * class.c (convert_to_base_statically): New method.
1572         * init.c (construct_virtual_base): Use it.
1573         * method.c (do_build_assign_ref): Fix typo in comment.
1575 2003-07-24  Jason Merrill  <jason@redhat.com>
1577         * decl.c: Just set truthvalue_* to boolean_*.
1579 2003-07-24  Nathan Sidwell  <nathan@codesourcery.com>
1581         * decl.c (reshape_init): Remove unreachable code.
1583 2003-07-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1585         PR c++/11513
1586         * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): Use current_scope.
1588 2003-07-23  Mark Mitchell  <mark@codesourcery.com>
1590         PR c++/11645
1591         * cp-tree.h (accessible_base_p): Declare.
1592         * call.c (build_over_call): Use it.
1593         * search.c (accessible_base_p): New function, split out from ...
1594         (lookup_base): ... here.
1596         PR c++/11517
1597         * call.c (build_conditional_expr): Use perform_implicit_conversion
1598         and error_operand_p.  Robustify.
1599         * typeck.c (build_unary_op): Use perform_implicit_conversion.
1601 2003-07-23  Nathan Sidwell  <nathan@codesourcery.com>
1603         PR c++/10953
1604         * parser.c (cp_parser_nested_name_specifier): Reset scope on
1605         failure.
1606         (cp_parser_elaborated_type_specifier): Likewise.
1608 2003-07-22  Mark Mitchell  <mark@codesourcery.com>
1610         Eliminate use of POINTER_TYPE for pointers-to-members.
1611         * call.c (standard_conversion): Rework pointer-to-member handling.
1612         Add comments.
1613         (add_builtin_candidate): Likewise.
1614         (resolve_scoped_fn_name): Remove.
1615         (build_conditional_expr): Rework pointer-to-member handling.
1616         (compare_ics): Likewise.
1617         * class.c (check_field_decls): Use TYPE_PTR_P.
1618         * cp-lang.c (cp_var_mod_type_p): Rework pointer-to-member
1619         handling.
1620         * cp-tree.h (SCALAR_TYPE_P): Use TYPE_PTR_TO_MEMBER_P.
1621         (TYPE_PTRMEM_P): Add comment.
1622         (TYPE_PTR_P): Simplify.
1623         (TYPE_PTROB_P): Correct definition.
1624         (TYPE_PTR_TO_MEMBER_P): New macro.
1625         (TYPE_PTRMEM_CLASS_TYPE): Adjust.
1626         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
1627         (resolved_scoped_fn_name): Remove declaration.
1628         (build_offset_ref): Change prototype.
1629         (resolve_offset_ref): Remove.
1630         (comp_target_types): Remove.
1631         * cvt.c (cp_convert_to_pointer): Rework pointer-to-member
1632         handling.
1633         (convert_to_reference): Use can_convert.
1634         (ocp_convert): Improve error handling.  Rework pointer-to-member
1635         handling.
1636         (perform_qualification_conversions): Rework pointer-to-member
1637         handling.
1638         * decl.c (build_ptrmem_type): Handle functions too.
1639         (create_array_type_for_decl): Remove OFFSET_TYPE error message.
1640         (grokdeclarator): Use OFFSET_TYPE for pointers to data members.
1641         (grokparms): Remove OFFSET_TYPE error message.
1642         * dump.c (cp_dump_tree): Rework pointer-to-member handling.
1643         * error.c (dump_type_prefix): Likewise.
1644         * expr.c (cplus_expand_constant): Use build_nop.
1645         * init.c (build_offset_ref): Add address_p parameter.  Fold in
1646         necessary bits from resolve_offset_ref.
1647         (resolve_offset_ref): Remove.
1648         * parser.c (cp_parser_postfix_expression): Remove special case
1649         code for OFFSET_TYPE.
1650         * pt.c (convert_nontype_argument): Rework pointer-to-member
1651         handling.
1652         (convert_template_argument): Likewise.
1653         (unify): Likewise.
1654         (invalid_nontype_parm_type_p): Likewise.
1655         (dependent_type_p_r): Likewise.
1656         * rtti.c (get_tinfo_decl): Remove OFFSET_TYPE special case.
1657         (target_incomplete_p_): Rework pointer-to-member
1658         handling.
1659         (get_pseudo_ti_init): Likewise.
1660         (get_pseudo_ti_desc): Likewise.
1661         * semantics.c (finish_qualified_id_expr): Adjust call to
1662         build_offset_ref.  Remove use of resolve_offset_ref.
1663         * tree.c (pod_type_p): Use TYPE_PTR_TO_MEMBER_P.
1664         * typeck.c (target_type): Use TYPE_PTRMEM_P.
1665         (type_unknown_p): Remove obsolete code about the time before
1666         non-dependent expressions were handled correctly.
1667         (qualify_type_recursive): Remove.
1668         (composite_pointer_type_r): New function.
1669         (composite_pointer_type): Use it.
1670         (merge_types): Remove dead comments.
1671         (comp_cv_target_types): Remove.
1672         (comp_target_types): Likewise.
1673         (comp_target_parms): Likewise.
1674         (cxx_sizeof_or_alignof_type): Remove OFFSET_TYPE error.
1675         (build_indirect_ref): Use TYPE_PTR_TO_MEMBER_P.
1676         (build_binary_op): Do not use of comp_target_types.
1677         (pointer_diff): Remove OFFSET_TYPE case.
1678         (build_unary_op): Adjust pointer-to-member handling.
1679         (unary_complex_lvalue): Likewise.
1680         (check_for_casting_away_constness): Add description parameter.
1681         (build_static_cast): Pass it.
1682         (build_reinterpret_cast): Use check_for_casting_away_constness.
1683         (build_const_cast): Adjust pointer-to-member handling.
1684         (build_c_cast): Likewise.
1685         (convert_for_assignment): Remove OFFSET_TYPE error message.
1686         (comp_ptr_ttypes_real): Adjust pointer-to-member handling.
1687         (comp_ptr_ttypes_reinterpret): Remove.
1688         (casts_away_constness_r): Adjust pointer-to-member handling.
1689         (casts_away_constness): Liekwise.
1690         (strip_all_pointer_quals): Remove.
1691         * typeck2.c (digest_init): Adjust pointer-to-member handling.
1692         (build_m_component_ref): Likewise.
1694 2003-07-22  Wolfgang Bangerth  <bangerth@dealii.org>
1696         * lex.c (unqualified_fn_lookup_error): Mention that the error
1697         message needs to be kept in synch with the manual.
1699 2003-07-22  Nathan Sidwell  <nathan@codesourcery.com>
1701         PR c++/11614
1702         * decl.c (grokdeclarator): An array member is only a flexible
1703         array member if the field itself is the array.
1705 2003-07-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1707         PR c++/10793
1708         * decl.c (xref_basetypes): Handle error_mark_node.
1710 2003-07-22  Nathan Sidwell  <nathan@codesourcery.com>
1712         * cp-tree.h (enum cp_lvalue_kind): Add clk_packed.
1713         * tree.c (lvalue_p_1): Set it.
1714         * class.c (check_field): Don't allow non-packed non-POD fields to
1715         be packed.
1716         * call.c (reference_binding): Need a temporary for all bitfield
1717         and packed fields.
1718         (convert_like_real): Check it is ok to make a temporary here.
1720 2003-07-21  Nathan Sidwell  <nathan@codesourcery.com>
1722         * cp-tree.h (hack_identifier): Remove.
1723         * method.c (hack_identifier): Remove.
1724         * semantics.c (finish_id_expression): Expand hack_identifier
1725         here. Simplify.
1727 2003-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1729         * call.c class.c decl.c decl2.c g++spec.c lex.c parser.c pt.c rtti.c
1730         semantics.c typeck.c: Remove unnecessary casts.
1732 2003-07-18  Nathan Sidwell  <nathan@codesourcery.com>
1734         * cp-tree.h (hack_identifier): Remove.
1735         * method.c (hack_identifier): Remove.
1736         * semantics.c (finish_id_expression): Expand hack_identifier
1737         here. Simplify.
1739 2003-07-18  Nathan Sidwell  <nathan@codesourcery.com>
1741         * cp-tree.h (finish_non_static_data_member): Add object param.
1742         * method.c (hack_identifier): Adjust.
1743         * pt.c (tsubst_copy_and_build) <COMPONENT_REF case>: Don't search
1744         again for a FIELD_DECL.
1745         * semantics.c (finish_non_static_data_member): Add object
1746         parameter. Always save the DECL in the COMPONENT_REF.
1747         * call.c (resolve_scoped_fn_name): Adjust.
1749 2003-07-17  Zack Weinberg  <zack@codesourcery.com>
1751         * pt.c (get_bindings): Make definition consistent with
1752         forward declaration.
1754 2003-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1756         PR c++/7809
1757         * friend.c (add_friend): Check access for member functions
1758         and templates.
1760 2003-07-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1762         PR c++/10668
1763         * typeck.c (build_class_member_access_expr): Improve diagnostic.
1765 2003-07-16  Mark Mitchell  <mark@codesourcery.com>
1767         PR c++/11547
1768         * cp-tree.h (DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P): New
1769         macro.
1770         (DECL_PRETTY_FUNCTION_P): Use VAR_DECL_CHECK.
1771         * decl.c (duplicate_decls): Merge
1772         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1773         * parser.c (cp_parser_postfix_expression): Adjust call to
1774         cp_parser_initializer_list and
1775         cp_parser_parenthesized_expression_list.
1776         (cp_parser_parenthesized_expression_list): Add non_constant_p.
1777         (cp_parser_new_placement): Adjust call to
1778         cp_parser_parenthesized_expression_list.
1779         (cp_parser_direct_new_declarator): Likewise.
1780         (cp_parser_conditional_expression): Remove.
1781         (cp_parser_constant_expression): Parse an assignment-expression,
1782         not a conditional-expression.
1783         (cp_parser_simple_declaration): Resolve expression/declaration
1784         ambiguity more quickly.
1785         (cp_parser_mem_initializer): Adjust call to
1786         cp_parser_parenthesized_expression_list.
1787         (cp_parser_init_declarator): Keep track of whether or not the
1788         initializer is a constant-expression.
1789         (cp_parser_initializer): Add non_constant_p parameter.
1790         (cp_parser_initializer_clause): Likewise.
1791         (cp_parser_initializer_list): Likewise.
1792         (cp_parser_attribute_list): Adjust call to
1793         cp_parser_parenthesized_expression_list.
1794         (cp_parser_functional_cast): Likewise.
1795         * pt.c (tsubst_decl): Copy
1796         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1797         (tsubst_expr): Tweak use of DECL_PRETTY_FUNCTION_P.
1798         * semantics.c (finish_id_expression): Use
1799         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1801 2003-07-16  Neil Booth  <neil@daikokuya.co.uk>
1803         * lang-options.h: Remove.
1805 2003-07-16  Andrew Pinski  <pinskia@physics.uc.edu>
1807         PR c/10962
1808         * class.c (field_decl_cmp): Remove.
1809         (resort_field_decl_cmp): Remove.
1810         (resort_sorted_fields): Remove.
1811         (add_fields_to_vec): Rename to ...
1812         (add_fields_to_record_type): this.
1813         (finish_struct_1): Change to be using
1814         sorted_fields_type's fields.
1815         * cp-tree.h (lang_decl): In lang_decl_u3
1816         change sorted_fields to be a pointer to
1817         sorted_fields_type.
1818         (resort_sorted_fields): Remove prototype.
1819         * search.c (lookup_field_1): Change to be using
1820         sorted_fields_type's fields.
1822 2003-07-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1824         PR c++/5421
1825         * decl.c (grokdeclarator): Handle TEMPLATE_ID_EXPR if friend
1826         is a member of other class.
1827         * friend.c (do_friend): Don't build TEMPLATE_DECL if friend
1828         is a specialization of function template.
1830 2003-07-16  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1832         PR c++/10903
1833         * pt.c (convert_nontype_argument): Fix thinko in diagnostic.
1834         Improve.
1836 2003-07-15  Mark Mitchell  <mark@codesourcery.com>
1838         * cp-tree.def (LOOKUP_EXPR): Remove.
1839         * cp-tree.h (cp_id_kind): Add CP_ID_KIND_UNQUALIFIED_DEPENDENT.
1840         (LOOKUP_EXPR_GLOBAL): Remove.
1841         (get_bindings): Remove.
1842         (is_aggr_type_2): Remove.
1843         * call.c (resolved_scoped_fn_name): Remove support for
1844         LOOKUP_EXPR.
1845         * decl.c (grokfndecl): Likewise.
1846         (grokdeclarator): Likewise.
1847         * error.c (dump_decl): Likewise.
1848         (dump_expr): Likewise.
1849         * friend.c (do_friend): Likewise.
1850         * init.c (build_offset_ref): Likewise.
1851         * lex.c (unqualified_fn_lookup_error): Use pedwarn.  Do not create
1852         LOOKUP_EXPRs
1853         * mangle.c (write_expression): Remove support for LOOKUP_EXPR.
1854         * parser.c (cp_parser_postfix_expression): Modify Koenig lookup
1855         test.
1856         * pt.c (get_bindings): Give it internal linkage.
1857         (check_explicit_specialization): Remove support for LOOKUP_EXPR.
1858         (lookup_template_function): Likewise.
1859         (for_each_tempalte_parm_r): Likewise.
1860         (tsubst_decl): Likewise.
1861         (tsubst_qualified_id): Handle template template parameters.
1862         (tsubst_copy): Remove support for LOOKUP_EXPR.
1863         (tsubst_copy_and_build): Likewise.
1864         (most_general_template): Likewise.
1865         (value_dependent_expression_p): Likewise.
1866         (type_dependent_expression_p): Note that IDENTIFIER_NODEs are
1867         always dependent.
1868         * semantics.c (perform_koenig_lookup): Do not create
1869         IDENTIFIER_NODEs.
1870         (finish_fname): Likewise.
1871         (finish_id_expression): Likewise.
1872         * tree.c (is_aggr_type_2): Remove.
1874 2003-07-16  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1876         PR c++/11531
1877         * typeck.c (check_return_expr): Fix thinko in diagnostic.
1879 2003-07-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1881         PR c++/10108
1882         * pt.c (tsubst_decl) <TEMPLATE_DECL>: Add a check for
1883         error_mark_node.
1885 2003-07-14  Mark Mitchell  <mark@codesourcery.com>
1887         PR c++/11509
1888         * pt.c (dependent_scope_ref_p): New function.
1889         (value_dependent_expression_p): Use it.
1890         (type_dependent_expression_p): Likewise.
1892         * pt.c (tsubst_friend_function): Use reregister_specialization.
1894         PR c++/7019
1895         * cp-tree.h (lookup_qualified_name): Adjust prototype.
1896         * decl.c (lookup_qualified_name): Add complain parameter.  Adjust
1897         call to is_aggr_type.
1898         * parser.c (cp_parser_lookup_name): Adjust call to
1899         lookup_qualified_name.
1900         * pt.c (tsubst_qualified_id): Likewise.
1901         (tsubst_copy_and_build): Likewise.
1902         * semantics.c (finish_qualified_id_expr): Deal with erroneous
1903         expressions.
1905 2003-07-14  Gabriel Dos Reis <gdr@integrable-solutions.net>
1907         PR c++/11510
1908         * call.c (op_error): Properly format  REALPART_EXPR and
1909         IMAGPART_EXPR.
1910         * error.c (dump_expr): Likewise.
1912 2003-07-14  Gabriel Dos Reis <gdr@integrable-solutions.net>
1914         * error.c (dump_expr): Handle EMPTY_CLASS_EXPR.
1916 2003-07-14  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1918         PR c++/5293
1919         * call.c (initialize_reference): Improve diagnostic.
1921 2003-07-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1923         PR c++/11154
1924         * pt.c (more_specialized_class): Add full_args parameter.
1925         (most_specialized_class): Adjust calls to more_specialized_class.
1926         * cp-tree.h (more_specialized_class): Adjust declaration.
1928 2003-07-14  Dan Nicolaescu  <dann@ics.uci.edu>
1930         * lex.c (enum tree_node_kind): Delete.
1932 2003-07-13  Mark Mitchell  <mark@codesourcery.com>
1934         PR c++/11503
1935         * cp-tree.h (DECL_SELF_REFERENCE_P): New macro.
1936         (SET_DECL_SELF_REFERENCE_P): Likewise.
1937         * class.c (build_self_reference): Use SET_DECL_SELF_REFERENCE_P.
1938         * pt.c (tsubst_decl): Copy it.
1939         * search.c (lookup_base): Use DECL_SELF_REFERENCE_P.
1941         * pt.c (reregister_specialization): Fix thinko in previous change.
1943         * cp-tree.h (cp_id_kind): New type.
1944         (unqualified_name_lookup_error): Change prototype.
1945         (unqualified_fn_lookup_error): New function.
1946         (do_identifier): Remove.
1947         (do_scoped_id): Likewise.
1948         (tsubst_copy_and_build): Change prototype.
1949         (reregister_specialization): New function.
1950         (perform_koenig_lookup): Likewise.
1951         (finish_id_expression): Likewise.
1952         * call.c (build_method_call): Adjust call to
1953         unqualified_name_lookup_error.
1954         * decl.c (duplicate_decls): Use reregister_specialization.
1955         * lex.c (is_global): Remove.
1956         (unqualified_name_lookup_error): Return a value.
1957         (do_identifier): Remove.
1958         (do_scoped_id): Likewise.
1959         (identifier_typedecl_value): Remove.
1960         (unqualified_fn_lookup_error): New function.
1961         * parser.c (cp_parser_id_kind): Remove.
1962         (cp_parser_non_constant_id_expression): Remove.
1963         (cp_parser_primary_expression): Use finish_id_expression.
1964         (cp_parser_class_or_namespace_name): Use cp_id_kind, not
1965         cp_parser_id_kind.
1966         (cp_parser_postfix_expression): Use perform_koenig_lookup.
1967         (cp_parser_template_argument): Use cp_id_kind.
1968         (cp_parser_fold_non_dependent_expr): Adjust call to
1969         tsubst_copy_and_build.
1970         * pt.c (unregister_specialization): Rename to ...
1971         (reregister_specialization): This.
1972         (tsubst_friend_function): Use it.
1973         (maybe_fold_nontype_arg): Adjust call to tsubst_copy_and_build.
1974         (tsubst_qualified_id): Likewise.
1975         (tsubst_expr): Likewise.
1976         (tsubst_copy_and_build): Add function_p parameter.  Use
1977         finish_id_expression.  Introduce RECUR macro.
1978         (tsubst_non_call_postfix_expression): New function.
1979         (regenerate_decl_from_template): Use reregister_specialization.
1980         * semantics.c (perform_koenig_lookup): New function.
1981         (finish_id_expression): Likewise.
1983 2003-07-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1985         * pt.c (push_access_scope_real): Remove.
1986         (push_access_scope): Move code from push_access_scope_real.
1987         (pop_access_scope): Don't check for TEMPLATE_DECL.
1988         (instantiate_template): Defer access checking during template
1989         substitution.
1990         (regenerate_decl_from_template): Tidy.
1992 2003-07-11  Nathanael Nerode  <neroden@gcc.gnu.org>
1994         PR c++/11437
1995         * operators.def: Add definitions for __imag__, __real__.
1997 2003-07-11  Nathan Sidwell  <nathan@codesourcery.com>
1999         PR c++/11050
2000         * parser.c (cp_parser_expression_list): Rename to ...
2001         (cp_parser_parenthesized_expression_list): ... here. Add attribute
2002         parameter, parse the surounding parentheses.
2003         (cp_parser_skip_to_closing_parenthesis): Add recover and or_comma
2004         parameters. Return int.
2005         (cp_parser_skip_to_closing_parenthesis or comma): Remove.
2006         (cp_parser_postfix_expression): Adjust function call parsing.
2007         (cp_parser_new_placement): Adjust.
2008         (cp_parser_new_initializer): Likewise.
2009         (cp_parser_cast_expression): Likewise.
2010         (cp_parser_selection_statement): Likewise.
2011         (cp_parser_mem_initializer): Likewise.
2012         (cp_parser_asm_definition): Likewise.
2013         (cp_parser_init_declarator): Likewise.
2014         (cp_parser_declarator): Make
2015         cdtor_or_conv_p an int ptr.
2016         (cp_parser_direct_declarator): Likewise. Check for a parameter
2017         list on cdtors & conv functions.
2018         (cp_parser_initializer): Adjust.
2019         (cp_parser_member_declaration): Adjust.
2020         (cp_parser_attribute_list): Move code into
2021         cp_parser_parens_expression_list.
2022         (cp_parser_functional_cast): Adjust.
2023         * pt.c (type_dependent_expression_p): Erroneous expressions are
2024         non-dependent.
2026 2003-07-11  Geoffrey Keating  <geoffk@apple.com>
2028         * decl.c (cp_finish_decl): Handle 'used' attribute.
2030         * cp-lang.c (c_reset_state): New dummy routine.
2031         * cp-tree.h (finish_file): Move prototype to c-common.h.
2032         * parser.c (c_parse_file): Rename from yyparse; don't call finish_file.
2034 2003-07-11  Mark Mitchell  <mark@codesourcery.com>
2036         PR c++/8327
2037         * pt.c (tsubst_qualified_id): Implement suggested resolution for
2038         Core Issue 2.
2039         (type_dependent_expression_p): Likewise.
2041 2003-07-10  Mark Mitchell  <mark@codesourcery.com>
2043         * typeck.c (build_binary_op): Do not warn about signed
2044         vs. unsigned comparisons in the bodies of templates.
2046         PR c++/9411
2047         * parser.c (cp_parser_postfix_expression): Check dependency of
2048         functions.
2050 2003-07-09  Mark Mitchell  <mark@codesourcery.com>
2052         PR c++/10032
2053         * decl.c (cxx_init_decl_processing): With -pedantic, pedwarns are
2054         still errors.
2056         PR c++/10527
2057         * error.c (decl_to_string): Do not print default argument
2058         expressions.
2060         * cp-tree.h (break_out_calls): Remove declaration.
2061         * tree.c (break_out_calls): Remove.
2062         * typeck.c (build_modify_expr): Avoid invalid sharing of trees.
2064 2003-07-09  Nathan Sidwell  <nathan@codesourcery.com>
2066         PR c++ 9483
2067         * class.c (check_field_decls): Pass DECL_NAME to constructor_name_p.
2068         * decl2.c (constructor_name_p): Avoid repeated constructor_name
2069         calls.
2070         * decl.c (grokdeclarator): Refactor ctor/dtor detection.
2072 2003-07-09  Mark Mitchell  <mark@codesourcery.com>
2074         * typeck.c (build_x_unary_op): Take note of the fact that
2075         PREINCREMENT_EXPR and POSTINCREMENT_EXPR are binary operations on
2076         trees.
2078         * parser.c (cp_parser_primary_expression): Preserve the form of
2079         qualified expressions in templates, even if they are not
2080         dependent.
2081         * pt.c (convert_nontype_argument): Handle non-dependent SCOPE_REFs.
2082         (tsubst_qualified_id): Likewise.
2083         * search.c (accessible_p): Treat everything in the body of a
2084         template as accessible.
2086 2003-07-08  Mark Mitchell  <mark@codesourcery.com>
2088         * cp-tree.def (NON_DEPENDENT_EXPR): New node.
2089         * cp-tree.h (build_call_from_tree): Remove.
2090         (build_member_call): Likewise.
2091         (dependent_template_arg_p): Remove.
2092         (any_dependent_template_arguments_p): New function.
2093         (dependent_template_id_p): Likewise.
2094         (any_type_dependent_arguments_p): Likewise.
2095         (build_non_dependent_expr): Likewise.
2096         (build_non_dependent_args): Likewise.
2097         (build_x_compound_expr): Adjust prototype.
2098         * call.c (build_new_method_call): Handle non-dependent expressions
2099         correctly.
2100         * decl2.c (grok_array_decl): Likewise.
2101         (build_offset_ref_call_from_tree): Likewise.
2102         (build_call_from_tree): Remove.
2103         * error.c (dump_decl): Handle NON_DEPENDENT_EXPR.
2104         (dump_expr): Likewise.
2105         * init.c (build_member_call): Remove.
2106         * mangle.c (write_expression): Update handling for template-ids.
2107         * parser.c (cp_parser_primary_expression): Use
2108         any_dependent_template_arguments_p.  Update constant-expression
2109         handling.
2110         (cp_parser_postfix_expression): Use
2111         any_type_dependent_arguments_p.  Simplify call processing.
2112         (cp_parser_unary_expression): Simplify.
2113         (cp_parser_expression): Adjust for changes to
2114         build_x_compound_expr.
2115         (cp_parser_template_argument): Implement standard-conforming
2116         parsing of non-type template arguments.
2117         (cp_parser_direct_declarator): Use
2118         cp_parser_fold_non_dependent_expr.
2119         (cp_parser_fold_non_dependent_expr): New function.
2120         (cp_parser_next_token_ends_template_argument_p): Likewise.
2121         * pt.c (convert_template_argument): Do not call
2122         maybe_fold_nontype_arg.
2123         (tsubst_baselink): Likewise.
2124         (tsubst_copy_and_build): Share common code.  Make sizeof/alignof
2125         processing work correctly for non-dependent expressions.  Adjust
2126         handling of COMPOUND_EXPR.  Simplify call processing.
2127         (value_dependent_expression_p): Deal with functional casts and
2128         sizeof/alignof correctly.
2129         (type_dependent_expression_p): Handle overloaded functions.
2130         (any_type_dependent_arguments_p): New function.
2131         (any_dependent_template_arguments_p): Likewise.
2132         (dependent_template_p): Treat SCOPE_REFs as dependent.
2133         (dependent_template_id_p): Simplify.
2134         (build_non_dependent_expr): New function.
2135         (build_non_dependent_args): Likewise.
2136         * semantics.c (finish_stmt_expr): Don't make dependent
2137         statement-expresions have void type.
2138         (finish_call_expr): Handle non-dependent expressions
2139         correctly.
2140         * tree.c (lvalue_p_1): Treat NON_DEPENDENT_EXPRs as lvalues.
2141         * typeck.c (cxx_sizeof_or_alignof_type): Give the expression
2142         type size_t, even in templates.
2143         (expr_sizeof): Likewise.
2144         (finish_class_member_access_expr): Handle non-dependent expressions
2145         correctly.
2146         (build_x_indirect_ref): Likewise.
2147         (build_x_binary_op): Likewise.
2148         (build_x_unary_op): Likewise.
2149         (build_x_conditional_expr): Likewise.
2150         (build_x_compound_expr): Likewise.
2151         * typeck2.c (build_x_arrow): Likewise.
2153 2003-07-09  Jan Hubicka  <jh@suse.cz>
2155         * cp-lang.c (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): New.
2156         * decl.c (duplicate_decls): Use DECL_ESTIMATED_INSNS.
2157         (start_function): Use DECL_ESTIMATED_INSNS.
2158         * optimize.c (maybe_clone_body): Use DECL_ESTIMATED_INSNS.
2160         * decl2.c (maybe_emit_vtables): Fix marking vtables as needed in
2161         unit-at-a-time
2163 2003-07-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2165         PR c++/11030
2166         * pt.c (instantiate_class_template): Don't call xref_tag to
2167         inject name when the friend class is a specialization.
2169 2003-07-07  Mark Mitchell  <mark@codesourcery.com>
2171         * cp-tree.h (build_scoped_method_call): Remove.
2172         (lookup_qualified_name): Remove parameter.
2173         (tsubst_copy_and_build): Declare.
2174         (finish_qualified_object_call_expr): Remove.
2175         (check_accessibility_of_qualified_id): New function.
2176         (finish_qualified_id_expr): Likewise.
2177         (non_reference): Likewise.
2178         (build_expr_from-tree): Remove.
2179         * call.c (non_reference): Remove.
2180         (build_scoped_method_call): Likewise.
2181         (build_method_call): Use error_operand_p.  Assert that we are not
2182         processing a template.
2183         (standard_conversion): Use non_reference.
2184         * class.c (build_vtbl_entry_ref): Likewise.
2185         (build_vtbl_ref_1): Likewise.
2186         * cvt.c (build_expr_type_conversion): Use non_reference.
2187         * decl.c (lookup_qualified_name): Remove flags parameter.
2188         (grok_op_properties): Use non_reference.
2189         * decl2.c (grok_array_decl): Likewise.
2190         (build_expr_from_tree): Remove.
2191         (build_offset_ref_call_from_tree): Update comment.
2192         * error.c (parm_to_string): Call reinit_global_formatting_buffer.
2193         * except.c (prepare_eh_types): Use non_reference.
2194         (can_convert_eh): Likewise.
2195         * init.c (build_dtor_call): Avoid using build_method_call.
2196         * mangle.c (write_template_param): Remove misleading comment.
2197         * method.c (locate_copy): Use non_reference.
2198         * parser.c (cp_parser_scope_through_which_access_occurs): Remove.
2199         (cp_parser_primary_expression): Do not create SCOPE_REFs is
2200         non-dependent contexts.
2201         (cp_parser_postfix_expression): Use finish_qualified_id_expr.
2202         (cp_parser_direct_declarator): Use tsubst_copy_and_build, not
2203         build_expr_from_tree.
2204         (cp_parser_lookup_name): Adjust call to lookup_qualified_name.
2205         Use check_accessibility_of_qualified_id.
2206         * pt.c (maybe_fold_nontype_arg): Use tsubst_copy_and_build, not
2207         build_expr_from_tree.
2208         (tsubst_baselink): New function.
2209         (tsubst_qualified_id): Likewise.
2210         (tsubst_copy): Use them.  Remove support for METHOD_CALL_EXPR.
2211         (tsubst_expr): Adjust call to lookup_qualified_name.
2212         (tsubst_copy_and_build): Handle SCOPE_REFs specially.  Adjust
2213         handling of CALL_EXPRs.
2214         (value_dependent_expression_p): Use INTEGRAL_OR_ENUMERATION_TYPE_P.
2215         * rtti.c (get_tinfo_decl_dynamic): Use non_reference.
2216         * search.c (check_final_overrider): Likewise.
2217         * semantics.c (check_accessibility_of_qualified_id): New function.
2218         (finish_qualified_object_call_expr): Remove.
2219         * typeck.c (target_type): Use non_reference.
2220         (cxx_sizeof_or_alignof_type): Likewise.
2221         (dubious_conversion_warnings): Likewise.
2222         (convert_for_initialization): Likewise.
2223         (non_reference): New function.
2225 2003-07-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2227         * decl.c (print_binding_level, print_other_binding_stack,
2228         print_binding_stack): Merge uses of HOST_PTR_PRINTF with adjacent
2229         stdio calls.
2230         * ptree.c (cxx_print_decl, cxx_print_binding): Likewise.
2232 2003-07-07  Andreas Jaeger  <aj@suse.de>
2234         * friend.c: Convert to ISO C90 prototypes.
2236         * Make-lang.in ($(srcdir)/cp/cfns.h): Use ANSI-C as output
2237         language.
2238         * cfns.h: Regenerate.
2240         * typeck.c: Convert remaining prototypes to ISO C90.
2241         * search.c: Likewise.
2243         * decl2.c (build_expr_from_tree): Convert prototype to ISO C90.
2244         * semantics.c (expand_or_defer_fn): Likewise
2245         * mangle.c (discriminator_for_string_literal): Likewise.
2246         * g++spec.c (lang_specific_driver): Likewise.
2248         * search.c (lookup_base_r): Remove unused variable.
2250 2003-07-07  Nathan Sidwell  <nathan@codesourcery.com>
2252         * semantics.c: (genrtl_try_block) Adjust emit_line_note
2253         calls.
2255 2003-07-07  Andreas Jaeger  <aj@suse.de>
2257         * search.c (lookup_base_r): Remove unused variable.
2259 2003-07-06  Michael Chastain  <mec@shout.net>
2261         PR debug/10055
2262         * lex.c (cxx_init): Call push_srcloc and pop_srcloc rather than
2263         assigning to input_filename directly.
2265 2003-07-06  Kazu Hirata  <kazu@cs.umass.edu>
2267         * call.c: Fix comment formatting.
2268         * class.c: Likewise.
2269         * cp-tree.h: Likewise.
2270         * decl.c: Likewise.
2271         * decl2.c: Likewise.
2272         * error.c: Likewise.
2273         * method.c: Likewise.
2274         * name-lookup.c: Likewise.
2275         * parser.c: Likewise.
2276         * pt.c: Likewise.
2277         * rtti.c: Likewise.
2278         * search.c: Likewise.
2279         * typeck.c: Likewise.
2281 2003-07-06  Mark Mitchell  <mark@codesourcery.com>
2283         PR c++/11345
2284         * search.c (lookup_base_r): Remove is_non_public and
2285         within_current_scope parameters.  Remove other dead code.
2286         (lookup_base): Adjust call to lookup_base_r.
2287         (adjust_result_of_qualified_name_lookup): Improve comment.
2288         * semantics.c (finish_call_expr): Use maybe_dummy_object.
2290 2003-07-06  Neil Booth  <neil@daikokuya.co.uk>
2292         * cp-lang.c (LANG_HOOKS_HANDLE_FILENAME,
2293         LANG_HOOKS_MISSING_ARGUMENT): Override.
2295 2003-07-05  Mark Mitchell  <mark@codesourcery.com>
2297         PR c++/11431
2298         * typeck.c (build_static_cast): Check for reference conversions
2299         earlier.
2301 2003-07-04  Mark Mitchell  <mark@codesourcery.com>
2303         * cp-tree.h (perform_integral_promotions): Declare.
2304         * call.c (build_addr_func): Use decay_conversion.
2305         (convert_arg_to_ellipsis): Likewise.  Remove misleading comment.
2306         (convert_for_arg_passing): Use perform_integral_promotions.
2307         * cvt.c (build_expr_type_conversion): Use decay_conversion.
2308         (type_promotes_to): Do not return a cv-qualified type.
2309         * decl.c (grok_reference_init): Fix formatting.
2310         (get_atexit_node): Use decay_conversion.
2311         (build_enumerator): Use perform_integral_promotions.
2312         * init.c (build_vec_init): Use decay_conversion.
2313         * semantics.c (finish_expr_stmt): Likewise.
2314         (finish_switch_cond): Use perform_integral_promotions.
2315         * typeck.c (default_conversion): Likewise.
2316         (perform_integral_promotions): New function.
2317         (build_indirect_ref): Use decay_conversion.
2318         (build_array_ref): Use perform_integral_promotions.
2319         (convert_arguments): Use decay_conversion.
2320         (build_unary_op): Use perform_integral_promotions.
2321         (build_c_cast): Use decay_conversion.
2322         (build_modify_expr): Likewise.
2323         (convert_for_initialization): Likewise.
2324         * typeck2.c (build_x_arrow): Likewise.
2326 2003-07-04  Kazu Hirata  <kazu@cs.umass.edu>
2328         * call.c: Fix comment typos.
2329         * class.c: Likewise.
2330         * cp-tree.h: Likewise.
2331         * cvt.c: Likewise.
2332         * decl2.c: Likewise.
2333         * decl.c: Likewise.
2334         * init.c: Likewise.
2335         * mangle.c: Likewise.
2336         * parser.c: Likewise.
2337         * pt.c: Likewise.
2338         * search.c: Likewise.
2339         * semantics.c: Likewise.
2340         * tree.c: Likewise.
2341         * typeck.c: Likewise.
2343 2003-07-04  Zack Weinberg  <zack@codesourcery.com>
2345         * parser.c (cp_lexer_read_token): No need to handle string
2346         constant concatenation.
2348 2003-07-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2350         * cp-tree.h (GCC_DIAG_STYLE, ATTRIBUTE_GCC_CXXDIAG): Define.
2351         (cp_error_at, cp_warning_at, cp_pedwarn_at): Mark with
2352         ATTRIBUTE_GCC_CXXDIAG.
2354 2003-07-03  Mark Mitchell  <mark@codesourcery.com>
2356         * call.c (build_addr_func): Handle bound pointers-to-members.
2357         (build_method_call): Do not call resolve_offset_ref.
2358         (implicit_conversion): Likewise.
2359         (resolve_scoped_fn_name): Use finish_non_static_data_member, not
2360         resolve_offset_ref.
2361         (resolve_args): Do not call resolve_offset_ref.
2362         (build_conditional_expr): Likewise.
2363         (build_new_method_call): Likewise.
2364         * cp-tree.def (OFFSET_REF): Update documentation.
2365         * cvt.c (cp_convert_to_pointer): Update handling of conversions from
2366         pointers to members to pointers.
2367         (ocp_convert): Do not call resolve_offset_ref.
2368         (convert_to_void): Likewise.
2369         (build_expr_type_conversion): Likewise.
2370         * decl2.c (delete_sanity): Likewise.
2371         * init.c (resolve_offset_ref): Simplify greatly.
2372         (build_vec_delete): Do not call resolve_offset_ref.
2373         * parser.c (cp_parser_postfix_expression): Call resolve_offset_ref
2374         if appropriate.
2375         (cp_parser_unary_expression): Use
2376         cp_parser_simple_cast_expression.
2377         (cp_parser_delete_expression): Likewise.
2378         (cp_parser_cast_expression): Likewise.
2379         (cp_parser_pm_expression): Use cp_parser_binary_op.
2380         (cp_parser_simple_cast_expression): New function.
2381         * rtti.c (build_dynamic_cast_1): Do not call resolve_offset_ref.
2382         * semantics.c (finish_increment_expr): Likewise.
2383         (finish_typeof): Likewise.
2384         * tree.c (lvalue_p_1): Do not handle OFFSET_REF.
2385         * typeck.c (require_complete_type): Do not handle OFFSET_REFs.
2386         (decay_conversion): Do not call resolve_offset_ref.
2387         (finish_class_member_access_expr): Likewise.
2388         (convert_arguments): Likewise.
2389         (build_x_binary_op): Handle DOTSTAR_EXPR.
2390         (condition_conversion): Do not call resolve_offset_ref.
2391         (unary_complex_lvalue): Likewise.
2392         (build_static_cast): Likewise.
2393         (build_reinterpret_cast): Likewise.
2394         (build_const_cast): Likewise.
2395         (build_c_cast): Likewise.
2396         (build_modify_expr): Likewise.
2397         (convert_for_assignment): Likewise.
2398         (convert_for_initialization): Likewise.
2399         * typeck2.c (build_x_arrow): Likewise.
2400         (build_m_component_ref): Simplify.
2402         * call.c (build_scoped_method_call): Use convert_to_void.
2403         (build_method_call): Likewise.
2404         * class.c (check_field_decls): Remove dead code.
2405         * cvt.c (convert_from_reference): Remove OFFSET_TYPE handling.
2406         * decl2.c (grok_array_decl): Remove dead code.
2407         (arg_assoc_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
2408         as pointer-to-member representation.
2409         * init.c (build_offset_ref): Tidy.
2410         (build_vec_delete_1): Use convert_to_void.
2411         * mangle.c (write_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
2412         as pointer-to-member representation.
2414 2003-07-03  Nathan Sidwell  <nathan@codesourcery.com>
2416         PR c++/9162
2417         * decl.c (grokdeclarator): Return friend decls, not
2418         void_type_node.
2419         * decl2.c (grokfield): Alter friend decl check.
2420         * parser.c (struct cp_parser): Document default_arg chain on
2421         unparsed_functions_queue.
2422         (cp_parser_save_default_args): New.
2423         (cp_parser_init_declarator, cp_parser_function_definition,
2424         cp_parser_member_declaration): Call it.
2425         (cp_parser_class_specifier): Remove unused variable. Alter
2426         processing of unparsed_functions_queue.
2428 2003-07-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2430         * class.c (add_method, check_field_decl): Fix format specifier.
2431         * decl.c (duplicate_decls, pushdecl, check_goto,
2432         fixup_anonymous_aggr, maybe_commonize_var, grokdeclarator,
2433         start_enum): Likewise.
2434         * decl2.c (ambiguous_decl): Likewise.
2435         * pt.c (redeclare_class_template): Likewise.
2437 2003-07-02  Nathan Sidwell  <nathan@codesourcery.com>
2439         PR c++/10219
2440         * pt.c (type_unification_real): Don't unify exprs of error type.
2441         * tree.c (error_type): Don't die on error_type.
2443         PR c++/9779
2444         * decl2.c (arg_assoc_class): Don't die on NULL type.
2445         * typeck.c (type_unknown_p): Don't die on untyped expressions.
2447 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
2449         PR c++/6949
2450         * decl2.c (grokfield): Create TEMPLATE_DECLs for methods in local
2451         classes.
2453 2003-07-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2455         * error.c (locate_error): %P takes an `int', not a `tree'.
2457 2003-07-02  Jan Hubicka  <jh@suse.cz>
2459         * decl2.c (defer_fn): Set DECL_DEFER_OUTPUT.
2460         (finish-file): Do not process function with DECL_DEFER_OUTPUT clear;
2461         clear DECL_DEFER_OUTPUT once function is processed; avoid flags
2462         massaging.
2464         * cp-tree.h (DECL_NEEDED_P): Support unit-at-a-time
2465         (expand_or_defer_fn): Declare.
2466         (lower_function): Declare.
2467         * decl.c (start_cleanup_fn): Use expand_or_defer_fn.
2468         * decl2.c: Include cgraph.h and varpool.h
2469         (maybe_emit_vtables):  Make explicit instantations as needed.
2470         (mark_member_pointers, lower_function): New functions.
2471         (finish_file): Do unit-at-a-time.
2472         * method.c (synthesize_method): Use expand_or_defer_fn.
2473         * optimize.c (maybe_clone_body): Use expand_or_defer_fn.
2474         * parser.c (cp_parser_function_definition_after_decl): Use
2475         expand_or_defer_fn.
2476         * pt.c (instantiate_decl): Likewise.
2477         * semantics.c: Include cgraph.h
2478         (expand_or_defer_fn): Break out from ...
2479         (expand_body): ... here; deal with unit-at-a-time.
2480         * cp-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION,
2481         LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Define.
2483 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
2485         * call.c (resolve_scoped_fn_name): Return error_mark_node for
2486         erroneous cases.
2488 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
2490         PR c++/11149
2491         * call.c (resolve_scoped_fn_name): Check that the qualifying scope
2492         is a class type.
2494 2003-07-01  Giovanni Bajo  <giovannibajo@libero.it>
2496         PR c++/8046
2497         * error.c (dump_decl): Handle BIT_NOT_EXPR as
2498         pseudo destructor calls.
2500 2003-07-01  Nathan Sidwell  <nathan@codesourcery.com>
2502         * cp-tree.h (define_label): Replace filename and lineno
2503         arguments with a location_t.
2504         * decl.c (pop_label): Adjust define_label call.
2505         (define_label): Replace filename and lineno arguments with a
2506         location_t.
2507         * semantics.c (finish_label): Adjust define_label call.
2509 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
2511         PR c++/9559
2512         * decl2.c (grokfield): Do not build NOP_EXPRs around the
2513         error_mark_node.
2515 2003-06-30  Neil Booth  <neil@daikokuya.co.uk>
2517         * Make-lang.in: Update.
2518         * cp-lang.c (c_language): Define.
2519         (LANG_HOOKS_INIT_OPTIONS): Use common hook.
2520         * cp-tree.h (cxx_init_options): Remove.
2521         * lex.c: Don't include diagnostic.h.
2522         (cxx_init_options): Remove.
2524 2003-06-30  Giovanni Bajo  <giovannibajo@libero.it>
2526         PR c++/4933
2527         * error.c (dump_expr): Support correctly the COMPOUND_EXPR
2528         tree generated within a template. Use dump_expr to dump an
2529         expression sizeof.
2531 2003-06-30  Giovanni Bajo  <giovannibajo@libero.it>
2533         * mangle.c (write_expression): Exit gracefully when trying to
2534         mangle a CALL_EXPR.
2536 2003-06-30  Giovanni Bajo  <giovannibajo@libero.it>
2538         PR c++/10750
2539         * parser.c (cp_parser_primary_expression): A VAR_DECL with a
2540         (value- or type-) dependent expression as DECL_INITIAL is a
2541         valid constant-expression (at parser time).
2543 2003-06-30  Giovanni Bajo <giovannibajo@libero.it>
2545         PR c++/11106
2546         * error.c (dump_decl): Call dump_decl to dump the DECL_NAME for a
2547         USING_DECL, instead of print_tree_identifier.
2549 2003-06-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2551         * cp-tree.h (language_to_string): Adjust declaration.
2552         * dump.c (cp_dump_tree): Adjust usage.
2553         * error.c (dump_char): Use output_formatted_scalar. Tidy.
2554         (parm_to_string): Lose unused parameter.  Tidy.
2555         (expr_to_string): Likewise.
2556         (code_to_string): Likewise.
2557         (language_to_string): Likewise.
2558         (op_to_string): Likewise.
2559         (assop_to_string): Likewise.
2560         (digit_buffer): Remove.
2561         (dump_type): Format builtin vector type as __vector__.
2563 2003-06-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2565         * error.c (print_integer): Remove.
2566         (dump_type_suffix): Adjust.
2567         (dump_expr): Likewise.
2569 2003-06-28  Nathan Sidwell  <nathan@codesourcery.com>
2571         * error.c (print_instantiation_partial_context): Take a
2572         location_t.
2573         (print_instantiation_full_context): Adjust.
2574         (print_instantiation_context): Adjust.
2576         * cp-tree.h (cp_line_of, cp_file_of): Remove.
2577         * error.c (cp_line_of, cp_file_of): Merge into ...
2578         (location_of): ... here. Make static, return a location_t.
2579         (cp_error_at, cp_warning_at, cp_pedwarn_at): Adjust.
2581 2003-06-28  Nathan Sidwell  <nathan@codesourcery.com>
2583         PR c++/10784
2584         * call.c (joust): Move warn_conversion check outwards.
2586 2003-06-27  Zack Weinberg  <zack@codesourcery.com>
2588         * decl.c (build_typename_type)
2589         * mangle.c (write_template_template_arg)
2590         * parser.c (cp_parser_scope_through_which_access_occurs)
2591         * pt.c (push_access_scope_real, push_access_scope, pop_access_scope)
2592         * repo.c (get_base_filename)
2593         * semantics.c (maybe_convert_cond):
2594         Mark the definition static, matching the forward declaration.
2596 2003-06-27  Mark Mitchell  <mark@codesourcery.com>
2598         PR c++/10468
2599         * pt.c (tsubst): Handle qualified TYPEOF_TYPEs correctly.
2601 2003-06-27  Mark Mitchell  <mark@codesourcery.com>
2603         PR c++/10796
2604         * decl.c (finish_enum): Implement DR377.
2606         * decl.c (cp_finish_decl): Don't make variables with reference
2607         type readonly while they are being initialized.
2609 2003-06-26  Mark Mitchell  <mark@codesourcery.com>
2611         PR c++/11332
2612         * typeck.c (build_static_cast): Avoid returning expressions with
2613         reference type.
2615 2003-06-26  Nathan Sidwell  <nathan@codesourcery.com>
2617         * call.c (build_op_delete_call): Use strip_array_call. Correct
2618         error message to say 'delete' or 'delete[]'.
2620 2003-06-26  Giovanni Bajo  <giovannibajo@libero.it>
2622         PR c++/8266
2623         * pt.c (check_explicit_specialization): When looking up a
2624         template function from an identifier outside class-scope, bind
2625         it to CP_DECL_CONTEXT.
2627 2003-06-25  Mark Mitchell  <mark@codesourcery.com>
2629         PR c++/10990
2630         * search.c (lookup_base_r): Rely on accessible_p, rather than
2631         trying to emulate that logic here.
2633         PR c++/10931
2634         * call.c (convert_like): Pass issue_conversion_warnings.
2635         (convert_like_with_context): Likewise.
2636         (convert_like_real): Add issue_conversion_warnings parameter.
2637         (perform_direct_initialization_if_possible): New function.
2638         * cp-tree.h (perform_direct_initialization_if_possible): Declare it.
2639         * typeck.c (check_for_casting_away_constness): New function.
2640         (build_static_cast): Rewrite.
2642 2003-06-24  Nathan Sidwell  <nathan@codesourcery.com>
2644         * call.c (enforce_access): Assert we get a binfo.
2645         (build_op_delete_call): Pass a binfo to
2646         perform_or_defer_access_check.
2647         * class.c (alter_access): Likewise.
2648         * decl.c (make_typename_type): Likewise.
2649         (make_unbound_class_template): Likewise.
2650         * lex.c (do_identifier): Likewise.
2651         * method.c (hack_identifier): Likewise.
2652         * parser.c (cp_parser_lookup_name): Likewise.
2653         * search.c (lookup_member): Likewise. Move IDENTIFIER_CLASS_VALUE
2654         test.
2655         * semantics.c (finish_non_static_data_member): Likewise.
2656         (perform_or_defer_access_check): Expect a binfo.
2657         * typeck.c (comptypes): Expect types.
2659         * mangle.c (find_substitution): Don't pass a non-type to same_type_p
2660         * friend.c (make_friend_class): Likewise.
2661         * pt.c (check_default_tmpl_args): Likewise.
2662         (lookup_template_class): Likewise.
2664 2003-06-24  Jan Hubicka  <jh@suse.cz>
2666         * method.c (thunk_labelno): Move outside ifdef block to make garbage
2667         collector happy.
2669 2003-06-24  Jan Hubicka  <jh@suse.cz>
2671         * class.c (build_vtable): Make vtables.
2672         * cp-tree.h (DECL_VTABLE_OR_VTT_P): New macro.
2673         * decl2.c (output_vtable_inherit): Rename to ...
2674         (prepare_assemble_variable): ... this one; change interface.
2675         (maybe_emit_vtables): Do not call output_vtable_inherit.
2676         * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Define.
2677         * cp-tree.h (prepare_assemble_variable): New.
2679 2003-06-23  Andrew Pinski <pinskia@physics.uc.edu>
2681         * method.c: add prototype for make_alias_for_thunk.
2682         (thunk_labelno, make_alias_for_thunk): only define
2683         if ASM_OUTPUT_DEF is defined.
2685 2003-06-23  Jakub Jelinek  <jakub@redhat.com>
2687         * method.c (thunk_labelno): New variable.
2688         (make_alias_for_thunk): New function.
2689         (use_thunk): Use it if defined ASM_OUTPUT_DEF.  Put the thunk
2690         into the same section as the function it is calling.
2691         Include gt-cp-method.h.
2692         * Make-lang.in (gt-cp-method.h): Depend on s-gtype.
2693         (cp/method.o): Depend on gt-cp-method.h.
2694         * config-lang.in (gtfiles): Add $(srcdir)/cp/method.c.
2696 2003-06-23  Jan Hubicka  <jh@suse.cz>
2698         * decl.c (register_dtor_fn): Mark cleanup as used.
2699         * decl2.c (mark_vtable_entries): Skip nops.
2700         * rtti.c (get_tinfo_ptr): Mark tinfo as used.
2701         (build_dynamic_cast_1): Likewise.
2702         (tinfo_base_init): Likewise.
2703         (emit_tinfo_decl): Likewise.
2705 2003-06-23  Jakub Jelinek  <jakub@redhat.com>
2707         * mangle.c (hash_type): Val is the TREE_LIST itself, not a pointer
2708         to it.
2710 2003-06-21  Gabriel Dos Reis <gdr@integrable-solutions.net>
2712         PR c++/10784
2713         * call.c (joust): Warn about choosing conversion sequence only if
2714         -Wconversion.
2716 2003-06-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2718         PR c++/10864
2719         * call.c (op_error): Tidy.
2720         * error.c (dump_expr): Properly format 'T()' when T is an
2721         aggregate type.
2723 2003-06-21  Gabriel Dos Reis <gdr@integrable-solutions.net>
2725         PR c++/10915
2726         * decl.c (grok_op_properties): Warn possible confusing conversion
2727         only if -Wconversion.
2729 2003-06-20  Mark Mitchell  <mark@codesourcery.com>
2731         PR c++/10749
2732         * parser.c (cp_parser_class_head): See through dependent names
2733         when parsing a class-head.
2735         PR c++/10845
2736         * pt.c (try_class_unification): Correct handling of member class
2737         templates.
2739 2003-06-20  Nathan Sidwell  <nathan@codesourcery.com>
2741         * semantics.c (genrtl_finish_function): Adjust
2742         expand_function_end call.
2744 2003-06-19  Mark Mitchell  <mark@codesourcery.com>
2746         PR c++/10939
2747         * pt.c (tsubst_decl): Do not try to substitute into non-dependent
2748         functions.
2749         (value_dependent_expression_p): Correct logic for FUNCTION_DECLs.
2751         PR c++/9649
2752         * cp-tree.h (pushdecl_class_level): Change prototype.
2753         (push_class_level_binding): Likewise.
2754         * decl.c (add_binding): Reject duplicate static data members.
2755         (pushdecl_class_level): Return a value indicating whether or not
2756         the binding was valid.
2757         (push_class_level_binding): Likewise.
2758         * semantics.c (finish_member_declaration): Don't keep invalid
2759         declarations.
2761         PR c++/11041
2762         * call.c (initialize_reference): Do not use cp_finish_decl to emit
2763         temporary variables.
2764         * cp-tree.h (static_aggregates): Declare.
2765         (pushdecl_top_level_and_finish): Likewise.
2766         * decl.c (pushdecl_top_level_1): New function.
2767         (pushdecl_top_level): Use it.
2768         (pushdecl_top_level_and_finish): New function.
2769         (initialize_local_var): Remove redundant code.
2770         (cp_finish_decl): Remove support for RESULT_DECLs.  Don't check
2771         building_stmt_tree.
2772         * decl.h (static_aggregates): Remove.
2773         * decl2.c (get_guard): Use pushdecl_top_level_and_finish.
2774         * rtti.c (get_tinfo_decl): Use pushdecl_top_level_and_finish.
2775         (tinfo_base_init): Likewise.
2777 2003-06-19  Matt Austern  <austern@apple.com>
2779         PR c++/11228
2780         * init.c (build_zero_init): Assert that number of array elements
2781         is an integer constant.
2782         (build_default_init) Don't use build_zero_init for arrays with
2783         variable number of elements.
2785 2003-06-19  Andreas Jaeger  <aj@suse.de>
2787         * cp-tree.h: Remove duplicated declarations.
2789 2003-06-18  Nathanael Nerode  <neroden@gcc.gnu.org>
2791         * pt.c: Convert to ISO C.
2792         * semantics.c: Convert to ISO C.
2794 2003-06-18  Nathan Sidwell  <nathan@codesourcery.com>
2796         * cp-tree.h (comp_except_specs, compparms, cp_has_mutable_p,
2797         at_least_as_qualified_p, more_qualified_p): Return bool.
2798         * typeck.c: ANSIFY function definitions.
2799         (comp_array_types): Take redeclaration bool parameter.
2800         (comptypes): Rearrange STRICT handling.
2801         (at_least_as_qualified_p, more_qualified_p,
2802         comp_cv_qualification): Cache cv quals.
2803         (compparms): Rearrange loop.
2805 2003-06-18  Nathan Sidwell  <nathan@codesourcery.com>
2807         * cp-tree.h (COMPARE_RELAXED): Rename to ...
2808         (COMPARE_DERIVED): ... here. Adjust comment.
2809         (resolve_typename_type_in_current_instantiation): Remove.
2810         (cp_tree_equal, comptypes): Return a bool.
2811         * cvt.c (convert_to_reference): Adjust comptypes call.
2812         * pt.c (template_args_equal, unify,): Adjust cp_tree_equal call.
2813         (resolve_typename_type_in_current_instantiation): Remove.
2814         * tree.c (cp_tree_equal): Return bool. Cope with TEMPLATE_DECLs and
2815         IDENTIFIER_NODEs. Abort if undeciderable. Adjust recursive
2816         calls. Refactor code.
2817         * typeck.c (comp_array_types): Return bool. Lose callback.
2818         parameter. Adjust cp_tree_equal calls.
2819         (comptypes): Return bool. Adjust strict handling. Remove relaxed
2820         enumeration and java type handling. Deal with typename types here.
2821         Adjust recursive and cp_tree_equals calls. Adjust base and derived
2822         checking.
2823         (comp_target_types): Remove unreachable code. Adjust
2824         same_or_base_type_p calls.
2825         (ptr_reasonably_similar): Adjust base and derived check.
2827         * typeck.c (maybe_warn_about_returning_address_of_local): Remove
2828         unused calculation.
2829         (check_return_expr): Adjust error messages.
2830         * cp-tree.def (SCOPE_REF): Correct comment.
2832 2003-06-17  Mark Mitchell  <mark@codesourcery.com>
2834         * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
2835         string again.
2837 2003-06-17  Robert Abeles  <rabeles@archaelogic.com>
2839         * optimize.c (dump_function): Form complete flag name by
2840         prefixing 'fdump-' to string returned by dump_flag_name().
2842 2003-06-17  Mark Mitchell  <mark@codesourcery.com>
2844         * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
2845         string.
2847 2003-06-17  Jason Merrill  <jason@redhat.com>
2849         PR c++/10929
2850         * decl.c (grokfndecl): Don't mark a function inline for
2851         -finline-functions if it isn't defined.
2853 2003-06-17  Mark Mitchell  <mark@codesourcery.com>
2855         PR c++/10712
2856         * class.c (handle_using_decl): Robustify.
2858         PR c++/11105
2859         * cp-tree.h (DECL_CONV_FN_TYPE): New method.
2860         * mangle.c (struct globals): Remove internal_mangling_p.
2861         (write_unqualified_name): Use DECL_CONV_FN_TYPE.
2862         (write_template_parm): Don't write out the level number.
2863         (conv_type_names): New variable.
2864         (hash_type): New function.
2865         (compare_type): Likewise.
2866         (mangle_conv_op_name_for_type): Don't try to mangle conversion
2867         operator names.
2868         * search.c (lookup_conversion_operator): New function.
2869         (lookup_fnfields_1): Use it.
2871 2003-06-17  Andreas Jaeger  <aj@suse.de>
2873         * except.c: Remove duplicate declaration of push_eh_cleanup.
2875         * call.c: Remove extra declaration of inhibit_warnings.
2877 2003-06-16  Nathanael Nerode  <neroden@gcc.gnu.org>
2879         2003-06-16  Jens-Michael Hoffmann  <jensmh@gmx.de>
2880         * mangle.c: Convert to ISO C.
2882 2003-06-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2884         * cp/decl.c, cp/pt.c, cp/search.c, cp/tree.c: Don't use the PTR
2885         macro.
2887 2003-06-16  Nathanael Nerode  <neroden@gcc.gnu.org>
2889         * tree.c: Convert to ISO C.
2891 2003-06-16  Kazu Hirata  <kazu@cs.umass.edu>
2893         * cp-tree.h: Follow spelling conventions.
2894         * mangle.c: Likewise.
2895         * method.c: Likewise.
2896         * parser.c: Likewise.
2898 2003-06-14  Nathan Sidwell  <nathan@codesourcery.com>
2900         * decl.c (start_function): Adjust init_function_start call.
2901         * method.c (use_thunk): Likewise.
2902         * semantics.c (genrtl_start_function): Likewise.
2904 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
2906         * Make-lang.in: Remove c-options.o.
2908 2003-06-13  Nathanael Nerode  <neroden@gcc.gnu.org>
2910         * lex.c: Convert to ISO C.
2912         2003-05-19  Jens-Michael Hoffmann  <jensmh@gmx.de>
2913         * init.c: removes use of PARAMS macro.  Use ISO style function
2914         declarations.  (Not copyright-significant change.)
2916         * rtti.c: Remove PARAMS.
2918         * typeck2.c: Convert to ISO C.
2920 2003-06-12  Mark Mitchell  <mark@codesourcery.com>
2922         PR c++/10635
2923         * typeck.c (build_c_cast): Check that the destination type is
2924         complete.
2926 2003-06-11  Mark Mitchell  <mark@codesourcery.com>
2928         PR c++/10432
2929         * cp-tree.h (finish_declarator): Remove.
2930         * decl.c (cp_finish_decl): Make sure to pop_nested_class even for
2931         erroneous declarations.
2932         * semantics.c (finish_declarator): Remove.
2934 2003-06-11  Roger Sayle  <roger@eyesopen.com>
2936         * decl2.c (generate_ctor_or_dtor_function): Avoid expanding a
2937         global static constructor/destructor if it will be empty, i.e.
2938         either doesn't call any ctors/dtors or only calls pure or const
2939         ctors/dtors.
2941 2003-06-11  Mark Mitchell  <mark@codesourcery.com>
2943         * mangle.c (tm_p.h): Include it.
2944         * Make-lang.in (cp/mangle.o): Depend on $(TM_P_H).
2946         PR c++/11131
2947         * tree.c (cp_cannot_inline_fn): Check for "inline" before
2948         instantiation.
2950 2003-06-10  Jason Merrill  <jason@redhat.com>
2952         PR c++/10968
2953         * pt.c (mark_decl_instantiated): Clear DECL_COMDAT.
2955 2003-06-10  Andrew Pinski  <pinskia@physics.uc.edu>
2957         * decl.c (start_cleanup_fn): Move static 'counter' out, mark with GTY.
2958         (start_cleanup_cnt): New.
2960 2003-06-10  Mark Mitchell  <mark@codesourcery.com>
2962         PR c++/11131
2963         * cp-tree.h (template_for_substitution): Declare.
2964         * decl2.c (mark_used): Use it when figuring out whether or not a
2965         function is inline.
2966         * pt.c (template_for_substitution): Give it external linkage.
2967         * tree.c (cp_cannot_inline_tree_fn): Instantiate as early as
2968         possible.
2970 2003-06-09  Zack Weinberg  <zack@codesourcery.com>
2972         PR 8861
2973         * mangle.c (write_real_cst): New function.  Implement
2974         ABI-compliant mangling of floating-point literals when
2975         -fabi-version>=2; provide backward compatibility with 3.3 when
2976         -fabi-version=1 (with warning).  Clarify commentary.
2977         (write_template_arg_literal): Use write_real_cst.
2979 2003-06-07  Andreas Jaeger  <aj@suse.de>
2981         * cp/decl.c (xref_tag): Remove undefined macro NONNESTED_CLASSES.
2983 2003-06-07  Neil Booth  <neil@daikokuya.co.uk>
2985         * cp-lang.c (LANG_HOOKS_DECODE_OPTON): Drop.
2986         (LANG_HOOKS_HANDLE_OPTION): Override.
2987         * cp-tree.h (cxx_init_options): Update.
2988         * lex.c (cxx_init_options): Update.
2990 2003-06-05  Jan Hubicka  <jh@suse.cz>
2992         * Make-lang.in:  Add support for stageprofile and stagefeedback
2994 2003-06-04  J"orn Rennecke <joern.rennecke@superh.com>
2996         * decl.c (grokdeclarator): Error_mark_node in, error_mark_node out.
2998 2003-06-04  Andreas Jaeger  <aj@suse.de>
3000         * g++spec.c (lang_specific_driver): Remove ALT_LIBM usage.
3002 2003-06-03  Jason Merrill  <jason@redhat.com>
3004         * cp/cp-tree.h (CP_AGGREGATE_TYPE_P): Accept vectors.
3006         * cp/decl.c (reshape_init): Handle vectors.
3008         * testsuite/g++.dg/init/array10.C: New.
3010 2003-06-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3012         PR c++/10940
3013         * pt.c (check_explicit_specialization): Check for 'static'
3014         earlier.
3016 2003-05-31  Diego Novillo  <dnovillo@redhat.com>
3018         * class.c (dump_array): Call CONSTRUCTOR_ELTS to access
3019         the operand of a CONSTRUCTOR node.
3021 2003-05-31  Gabriel Dos Reis <gdr@integrable-solutions.net>
3023         * decl.c (cp_binding_level::this_entity): Rename from this_class.
3024         (cxx_scope_descriptor): New function.
3025         (cxx_scope_debug): Likewise.
3026         (push_binding_level): Use it.
3027         (pop_binding_level): Likewise.
3028         (suspend_binding_level): Likewise.
3029         (resume_binding_level): Likewise.
3030         (pushlevel_class): Adjust use of this_class.
3031         (pushtag): Likewise.
3032         (lookup_name_real): Likewise.
3033         (global_scope_name): New variable.
3034         (initialize_predefined_identifiers): Initialize it.
3035         (push_namespace): Use it.
3036         (make_cxx_scope): New function.
3037         (pushlevel): Use it.
3038         (pushlevel_class): Likewise.
3039         (push_binding_level): Simplify.  Loose the last two arguments.
3040         (make_binding_level): Remove.
3041         (initial_push__namespace_scope): New function.
3042         (push_namespace): Use it.  Simplify.
3043         (cxx_init_decl_processing): Likewise.
3044         (declare_namespace_level): Remove.
3046 2003-05-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3048         PR c++/10956
3049         * pt.c (instantiate_decl): Don't use full template arguments if
3050         we are dealing with specializations.
3052 2003-05-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3054         * decl.c (ENABLE_SCOPE_CHECKING): Rename from DEBUG_BINDING_LEVELS.
3055         (binding_depth): Unconditionally define.
3056         (is_class_level): Likewise.
3057         (indent): Likewise.  Take an indenting parameter.
3058         (push_binding_level): Remove conditional definittion.
3059         (pop_binding_level): Likewise.
3060         (suspend_binding_level): Likewise.
3061         (resume_binding_level): Likewise.
3062         (pushlevel): Likewise.
3063         (pushlevel_class): Likewise.
3064         (poplevel_class): Likewise.
3065         (pop_everything): Likewise.
3067 2003-05-27  Gabriel Dos Reis <gdr@integrable-solutions.net>
3069         * name-lookup.h (global_scope_p): New macro.
3070         * decl.c (pop_binding_level): Use it.  Don't refer directly to
3071         global_binding_level.
3072         (suspend_binding_level): Likewise.
3073         (global_bindings_p): Likewise.
3074         (print_other_binding_stack): Likewise.
3075         (print_binding_stack): Likewise.
3076         (maybe_push_to_top_level): Likewise.
3077         (pushdecl_namespace_level): Likewise.
3078         (cxx_init_decl_processing): Likewise.
3079         (start_decl): Likewise.
3080         (cp_finish_decl): Likewise.
3081         (start_function): Likewise.
3082         (global_binding_level): Remove.
3084 2003-05-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3086         * parser.c (cp_parser_explicit_instantiation): Restore old
3087         access before template instantiation.
3089 2003-05-23  Geoffrey Keating  <geoffk@apple.com>
3091         * lang-specs.h: Use -o to specify preprocessor's output file.
3092         Make -no-integrated-cpp work when building PCH files.
3094 2003-05-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3096         PR c++/10682
3097         * pt.c (instantiate_class_template): Use DECL_ARTIFICIAL to
3098         check for implicitly created typedef to an enum.
3100 2003-05-21  Jason Merrill  <jason@redhat.com>
3102         * init.c (build_vec_delete): Copy the address into a temporary
3103         variable before calling build_vec_delete_1.
3104         * decl2.c (delete_sanity): Don't call stabilize_reference.
3106 2003-05-21  Nathan Sidwell  <nathan@codesourcery.com>
3108         * pt.c (register_specialization): Update the decl's location,
3109         if necessary.
3110         (check_explicit_specialization): Likewise.
3112 2003-05-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3114         * error.c (dump_expr): Use HOST_WIDE_INT_PRINT_DOUBLE_HEX.
3116 2003-05-21  Danny Smith  <dannysmith@users.sourceforge.net>
3118         PR c++/9738
3119         * decl.c (duplicate_decls): Re-invoke make_decl_rtl
3120         if the old decl had instantiated DECL_RTL.
3121         (Base on Richard Henderson 2003-05-13 patch to c-decl.c).
3123 2003-05-19  Matt Austern  <austern@apple.com>
3125         * lang-options.h: Document -Wno-invalid-offsetof
3126         * typeck.c (build_class_member_access_expr): Don't complain about
3127         (Foo *)p->x for non-POD Foo if warn_invalid_offset is zero.
3129 2003-05-18 Andrew Pinski <pinskia@physics.uc.edu>
3131         * name-lookup.c (free_binding_entry): fix where the GTY markers are.
3132         (binding_entry_make): Make entry->chain NULL after getting an entry.
3133         fix the spelling of chain in a comment.
3134         (binding_table_free): speed up by having temporary variable.
3135         (binding_table_new): set table->chain to be NULL after allocating
3136         a table.
3137         (cxx_binding_make): use gcc_alloc instead of ggc_alloc_cleared and set
3138         binding->previous to NULL after getting an binding for speed.
3140 2003-05-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3142         * cp-tree.h (struct lang_type_class): Replace data member tags
3143         with hash-table nested_udts.
3144         (CLASSTYPE_NESTED_UTDS): Rename from CLASSTYPE_TAGS.
3145         * class.c (unreverse_member_declarations): Don't touch
3146         CLASSTYPE_TAGS.
3147         (pushclass): Use cxx_remember_type_decls.
3148         * decl.c (struct cp_binding_level): Replace data member tags with
3149         hash-table type_decls.
3150         (pop_binding_level): Handle level->type_decls.
3151         (kept_level_p): Adjust.
3152         (poplevel): Remove unused local variable.
3153         (bt_print_entry): New function.
3154         (print_binding_level): Use it.
3155         (push_namespace): Build current_binding_level->type_decls.
3156         (maybe_process_template_type_declaration): Adjust.
3157         (pushtag): Likewise.
3158         (clear_anon_tags): Use binding_table_remove_anonymous_types.
3159         (gettags): Remove.
3160         (cxx_remember_type_decls):  Rename from storetags.  Adjust.
3161         (lookup_tag): Use binding_table_find_anon_type.  Tidy.
3162         (lookup_tag_reverse): Use binding_table_reverse_maybe_remap.
3163         (cxx_init_decl_processing): Build global_binding_level->type_decls.
3164         (store_parm_decls): Remove pointless code.
3165         * name-lookup.c (free_binding_entry): New variable.
3166         (ENTRY_INDEX): New macro.
3167         (struct binding_table_s): New datatype.
3168         (binding_entry_make): New function.
3169         (binding_entry_free): Likewise.
3170         (binding_table_construct): Likewise.
3171         (binding_table_free): Likewise.
3172         (binding_table_new): Likewise.
3173         (binding_table_expand): Likewise.
3174         (binding_table_insert): Likewise.
3175         (binding_table_find): Likewise.
3176         (binding_table_find_anon_type): Likewise.
3177         (binding_table_reverse_maybe_remap): Likewise.
3178         (binding_table_remove_anonymous_types): Likewise.
3179         (binding_table_foreach): Likewise.
3180         * name-lookup.h (binding_table): New type.
3181         (binding_entry): Likewise.
3182         (bt_foreach_proc): Likewise.
3183         (struct binding_entry_s): New datatype.
3184         (SCOPE_DEFAULT_HT_SIZE): New macro.
3185         (CLASS_SCOPE_HT_SIZE): Likewise.
3186         (NAMESPACE_ORDINARY_HT_SIZE): Likewise.
3187         (NAMESPACE_STD_HT_SIZE): Likewise.
3188         (GLOBAL_SCOPE_HT_SIZE): Likewise.
3189         (binding_table_new): Declare.
3190         (binding_table_free): Likewise.
3191         (binding_table_insert): Likewise.
3192         (binding_table_find_anon_type): Likewise.
3193         (binding_table_reverse_maybe_remap): Likewise.
3194         (binding_table_remove_anonymous_types): Likewise.
3195         (binding_table_foreach): Likewise.
3196         (binding_table_find): Likewise.
3197         (cxx_remember_type_decls): Likewise.
3198         * pt.c (bt_instantiate_type_proc): New function.
3199         (do_type_instantiation): Use it.
3200         * search.c (lookup_field_r): Use binding_table_find.
3202 2003-05-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3204         * semantics.c (perform_deferred_access_checks): Don't discard
3205         checked access.
3207 2003-05-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3209         * error.c (cp_error_at, cp_warning_at, cp_pedwarn_at): Eliminate
3210         libiberty VA_ macros, always use stdarg.
3211         * rtti.c (create_pseudo_type_info): Likewise.
3212         * tree.c (build_min_nt, build_min): Likewise.
3214 2003-05-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3216         * ptree.c (cxx_print_type, cxx_print_xnode): Use string
3217         concatentation on HOST_WIDE_INT_PRINT_* format specifier to
3218         collapse multiple function calls into one.
3219         * tree.c (debug_binfo): Likewise.
3221 2003-05-15  Jason Merrill  <jason@redhat.com>
3223         PR c++/5388
3224         * call.c (conditional_conversion): Don't consider implicit
3225         conversions if T2 is a base of T1.
3226         * cp-tree.h (DERIVED_FROM_P, UNIQUELY_DERIVED_FROM_P): Make boolean.
3227         (ACCESSIBLY_UNIQUELY_DERIVED_P, PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
3229         * parser.c (cp_parser_primary_expression): Convert a static data
3230         member from reference.
3232 2003-05-15  Mark Mitchell  <mark@codesourcery.com>
3234         * call.c (build_op_delete_call): Avoid creating unnecessary types.
3235         * class.c (instantiate_type): Remove tests for tf_no_attributes.
3236         * cp-tree.h (tsubst_flags_t): Remove tf_no_attributes.
3237         (COMPARE_NO_ATTRIBUTES): Remove.
3238         * typeck.c (comptypes): Do not check COMPARE_NO_ATTRIBUTES.
3240         PR c++/8385
3241         * semantics.c (finish_typeof): Refine type-dependency check.
3243 2003-05-13  Jason Merrill  <jason@redhat.com>
3245         * typeck.c (build_modify_expr): Don't always stabilize the lhs and
3246         rhs.  Do stabilize the lhs of a MODIFY_EXPR used on the lhs.
3248 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3250         * method.c (synthesize_method): Call push/pop_deferring_access_checks.
3252 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3254         PR c++/10230, c++/10481
3255         * semantics.c (finish_non_static_data_member): Handle when the
3256         non-static member is not from a base of the current class type.
3258 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3260         PR c++/10552
3261         * pt.c (tsubst_copy): Handle TEMPLATE_DECL that is a member class
3262         template and has dependent context.
3264 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3266         * pt.c (instantiate_decl): Call push/pop_deferring_access_checks.
3268 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3270         PR c++/9252
3271         * cp-tree.h (saved_scope): Remove check_access field.
3272         (tsubst_flags_t): Remove tf_parsing.
3273         * decl.c (maybe_push_to_top_level): Don't initialize
3274         scope_chain->check_access.
3275         (make_typename_type, make_unbound_class_template): Don't use
3276         tf_parsing.
3277         (register_dtor_fn): Use push/pop_deferring_access_checks
3278         instead of scope_chain->check_access.
3279         * method.c (use_thunk): Likewise.
3280         * parser.c (cp_parser_explicit_instantiation
3281         (cp_parser_constructor_declarator_p): Don't call
3282         push/pop_deferring_access_checks here.
3283         (cp_parser_template_argument, cp_parser_class_name): Don't use
3284         tf_parsing.
3285         (yyparse): Check flag_access_control.
3286         * pt.c (instantiate_class_template): Call
3287         push/pop_deferring_access_checks.
3288         * semantics.c (push_deferring_access_checks): Propagate
3289         dk_no_check.
3290         (perform_or_defer_access_check): Make sure basetype_path is
3291         a type before comparison.
3292         * call.c (build_op_delete_call, build_over_call): Use
3293         perform_or_defer_access_check.
3294         * class.c (alter_access): Likewise.
3295         * init.c (build_offset_ref): Likewise.
3296         * lex.c (do_identifier): Likewise.
3297         * method.c (hack_identifier): Likewise.
3298         * search.c (lookup_member): Likewise.
3299         * semantics.c (finish_non_static_data_member): Likewise.
3300         (simplify_aggr_init_exprs_r): Use push/pop_deferring_access_checks
3301         instead of flag_access_control.
3303 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3305         PR c++/9554
3306         * parser.c (cp_parser_class_name): Remove check_access parameter.
3307         All caller adjusted.  Update declaration.
3308         (cp_parser_lookup_name): Likewise.
3309         * semantics.c (push_deferring_access_checks): Change parameter type
3310         to enum deferring_kind.  All caller adjusted.
3311         (resume_deferring_access_checks): Adjust to use new enum.
3312         (stop_deferring_access_checks): Likewise.
3313         (perform_or_defer_access_check): Likewise.
3314         * cp-tree.h (deferring_kind): New enum.
3315         (deferred_access): Adjust field type.
3316         (push_deferring_access_checks): Update declaration.
3318 2003-05-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3320         PR c++/10555, c++/10576
3321         * pt.c (lookup_template_class): Handle class template with
3322         multiple levels of parameters when one of the levels contain
3323         errors.
3325 2003-05-08  Jason Merrill  <jason@redhat.com>
3327         * init.c (build_new_1): Don't reuse a TARGET_EXPR in an
3328         expression.  Undo some of the recent reorg.
3330 2003-05-07  Richard Henderson  <rth@redhat.com>
3332         PR c++/10570
3333         * cfns.gperf: Comment out POSIX thread cancellation points,
3334         plus abort and raise.
3335         * cfns.h: Regenerate.
3337 2003-05-07  Jason Merrill  <jason@redhat.com>
3339         * call.c (build_conditional_expr): Don't assume that the folded
3340         expression has result_type.
3342 2003-05-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3344         * typeck.c (build_unary_op): Deal with const qualifier in
3345         invalid pointer-to-member earlier.
3347 2003-05-05  Jason Merrill  <jason@redhat.com>
3349         PR c++/9537
3350         * call.c (conditional_conversion): Build an RVALUE_CONV if
3351         we're just changing the cv-quals.
3352         (build_conditional_expr): Don't call convert to change
3353         cv-quals.
3355 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3357         PR c++/10496
3358         * typeck.c (build_unary_op): Don't output const qualifier when
3359         output invalid pointer-to-member diagnostics.
3361 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3363         * decl.c: Fix typos.
3365 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3367         PR c++/4494
3368         * decl.c (start_function): Use same_type_p to check return type
3369         of main.
3371 2003-05-03  Zack Weinberg  <zack@codesourcery.com>
3373         PR c/10604
3374         * cp/typeck.c (build_x_compound_expr): No need to check
3375         extra_warnings as well as warn_unused_value.
3377 2003-05-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3379         PR c++/9364, c++/10553, c++/10586
3380         * decl.c (make_typename_type): Don't crash on illegal code.
3382 2003-05-03  Nathan Sidwell  <nathan@codesourcery.com>
3384         * class.c (finish_struct): Use location_t and input_location
3385         directly.
3386         * decl.c (make_label_decl): Likewise.
3387         (use_label): Likewise.
3388         * decl2.c (warn_if_unknown_interface): Likewise.
3389         (start_static_initialization_or_destruction): Likewise.
3390         (generate_ctor_or_dtor_function): Likewise.
3391         (finish_file): Likewise.
3392         * error.c (print_instantiation_full_context): Likewise.
3393         * init.c (create_temporary_var): Likewise.
3394         * method.c (synthesize_method): Likewise.
3395         * parser.c (cp_token): Likewise.
3396         (cp_lexer_set_source_position_from_token): Likewise.
3397         (cp_lexer_get_preprocessor_token): Likewise.
3398         (cp_parser_statement): Likewise.
3399         * pt.c (tsubst_friend_function): Likewise.
3400         (instantiate_class_template): Likewise.
3401         (tsubst_decl): Likewise.
3402         (tsubst): Likewise.
3403         (instantiate_decl): Likewise.
3404         * semantics.c (begin_class_definition): Likewise.
3405         (expand_body): Likewise.
3407 2003-05-01  Nathan Sidwell  <nathan@codesourcery.com>
3409         * class.c (finish_struct): Rename lineno to input_line.
3410         * decl.c (push_binding_level, pop_binding_level,
3411         suspend_binding_level, resume_binding_level, make_label_decl,
3412         use_label, start_function): Likewise.
3413         * decl2.c (warn_if_unknown_interface,
3414         start_static_initialization_or_destruction,
3415         generate_ctor_or_dtor_function, finish_file): Likewise.
3416         * error.c (cp_line_of, print_instantiation_full_context,
3417         print_instantiation_context): Likewise.
3418         * except.c (check_handlers_1, check_handlers): Likewise.
3419         * init.c (create_temporary_var): Likewise.
3420         * method.c (use_thunk, synthesize_method): Likewise.
3421         * parser.c (cp_lexer_set_source_position_from_token,
3422         cp_lexer_get_preprocessor_token): Likewise.
3423         * pt.c (push_tinst_level, pop_tinst_level,
3424         tsubst_friend_function, instantiate_class_template, tsubst_decl,
3425         tsubst, tsubst_expr, instantiate_decl): Likewise.
3426         * semantics.c (genrtl_try_block, finish_label_stmt,
3427         begin_class_definition, expand_body,
3428         genrtl_finish_function): Likewise.
3429         * tree.c (build_min_nt, build_min): Likewise.
3431 2003-05-01  Mark Mitchell  <mark@codesourcery.com>
3433         * decl2.c (comdat_linkage): Don't externalize explicit
3434         instantiations.
3436 2003-05-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3438         PR c++/10554
3439         * decl2.c (do_class_using_decl): Check if operand 0 of SCOPE_REF
3440         is not NULL.
3442 2003-05-01  Steven Bosscher  <steven@gcc.gnu.org>
3444         * cp-tree.h (struct lang_id2): Remove.  Move fields from here...
3445         (struct lang_identifier): ... to here.
3446         (LANG_ID_FIELD): Remove.
3447         (SET_LANG_ID): Remove.
3448         (IDENTIFIER_LABEL_VALUE): Adjust for new lang_identifier.
3449         (SET_IDENTIFIER_LABEL_VALUE): Likewise.
3450         (IDENTIFIER_IMPLICIT_DECL): Likewise.
3451         (SET_IDENTIFIERL_IMPLICIT_DECL): Likewise.
3452         (IDENTIFIER_ERROR_LOCUS): Likewise.
3453         (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
3455 2003-05-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3457         PR c++/8772
3458         * pt.c (convert_template_argument): Correct diagnostic.
3460 2003-04-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3462         PR c++/9432, c++/9528
3463         * decl2.c (validate_nonmember_using_decl): Handle SCOPE_REF.
3465 2003-04-30  Garbiel Dos Reis  <gcc@integrable-solutions.net>
3467         * decl.c (check_previous_goto_1): Adjust prototype.
3468         (check_previous_goto): Adjust use.
3469         (check_switch_goto): Likewise.
3470         (use_label): Adjust.
3471         (check_previous_goto_1): Don't use pedwarn_with_file_and_line.
3472         (struct named_label_use_list): Use location_t datatype.
3474 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
3476         PR c++/10551
3477         * pt.c (mark_decl_instantiated): Defer all explicit instantiations
3478         that have not yet been written out.
3480 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
3482         PR c++/10549
3483         * class.c (layout_class_type): Mark overlong bitfields as having
3484         the maximum size permitted by their type, after layout.
3486         PR c++/10527
3487         * error.c (dump_expr): Correctly handling of NEW_EXPR.4
3489 2003-04-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3491         * call.c (build_operator_new_call): Fix typo.
3492         * lang-options.h: Likewise.
3494 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
3496         PR c++/10515
3497         * cp-tree.h (lookup_field_1): Declare it.
3498         * search.c (lookup_field_1): Make it public.
3499         * decl.c (reshape_init): Handle designated initializers.
3501         * decl.c (maybe_commonize_var): Further tweak support for systems
3502         without weak symbols.
3504 2003-04-27  Mark Mitchell  <mark@codesourcery.com>
3506         * decl.c (maybe_commonize_var): Fix thinko in last patch.
3508 2003-04-27  Mark Mitchell  <mark@codesourcery.com>
3510         PR c++/10506
3511         * method.c (use_thunk): Decrement immediate_size_expand.
3513         PR c++/10503
3514         * cp-tree.h (DECL_VAR_MARKED_P): New macro.
3515         (DECL_MAYBE_TEMPLATE): Remove.
3516         * class.c (fixed_type_or_null): Avoid infinite recursion.
3518         * decl.c (maybe_commonize_var): Make the code match the comments.
3519         * pt.c (instantiate_decl): Move call to import_export_decl.
3521 2003-04-26  Mark Mitchell  <mark@codesourcery.com>
3523         * decl2.c (finish_file): Fix merge botch.
3525 2003-04-25  Mark Mitchell  <mark@codesourcery.com>
3527         * decl2.c (finish_file): Don't call import_export_decl for
3528         functions that are not defined.
3529         (handle_class_head): Robustify.
3530         * pt.c (instantiate_decl): Do not call cp_finish_decl for
3531         variables that are not defined.
3533 2003-04-24  Sylvain Pion  <Sylvain.Pion@mpi-sb.mpg.de>
3535         * call.c (print_z_candidates): Fix off by one error.
3537 2003-04-24  Nathan Sidwell  <nathan@codesourcery.com>
3539         PR c++/10337
3540         * call.c (joust): Don't warn about conversion ops that are exact
3541         or cv-conversions. Rearrange to avoid multiple type comparisons.
3543 2003-04-23  Mark Mitchell  <mark@codesourcery.com>
3545         PR c++/10471
3546         * call.c (build_cxx_call): Robustify.
3548 2003-04-23  Neil Booth  <neil@daikokuya.co.uk>
3550         * Make-lang.in (lex.o): Remove mbchar.h.
3551         * lex.c (MULTIBYTE_CHARS): Lose.
3552         * parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled
3553         in c-lex.c.
3555 2003-04-23  Mark Mitchell  <mark@codesourcery.com>
3557         PR c++/9847
3558         * cp-tree.h (duplicate_tag_error): Remove.
3559         * class.c (duplicate_tag_error): Remove.
3560         * semantics.c (begin_class_definition): Return immediately for a
3561         duplicate class definition.
3563         PR c++/10451
3564         * decl.c (grokdeclarator): Correct logic for "mutable" errors.
3566 2003-04-22  Mark Mitchell  <mark@codesourcery.com>
3568         PR c++/10446
3569         * search.c (lookup_fnfields_1): Handle empty slots in the method
3570         vector.
3572         PR c++/10428
3573         * decl.c (check_elaborated_type_specifier): New function, split
3574         out from ...
3575         (xref_tag): ... here.  Use the new function in more places.
3577         * rtti.c (throw_bad_typeid): Use build_cxx_call.
3579 2003-04-21  Mark Mitchell  <mark@codesourcery.com>
3581         * call.c (build_over_call): Use build_cxx_call.
3582         (build_cxx_call): New method, split out of build_over_call.
3583         * cp-tree.h (language_function): Add can_throw.
3584         (build_cxx_call): Declare it.
3585         * decl.c (finish_function): If a function does not contain any
3586         calls to functions that can throw an exception, indicate that
3587         fact.
3588         * decl2.c (mark_used): Do not defer the instantiation of
3589         functions, if the current function does not throw.
3590         * optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones.
3591         * pt.c (instantiate_decl): Make sure import_export_decl is called
3592         before emitting things.
3593         * rtti.c (throw_bad_cast): Use build_cxx_call.
3594         (build_dynamic_cast_1): Likewise.
3595         * typeck.c (build_function_call): Likewise.
3597 2003-04-21  Nathan Sidwell  <nathan@codesourcery.com>
3599         PR c++/9881
3600         * typeck.c (build_unary_op): Fold all COMPONENT_REF addr
3601         expressions. Reverts my 2002-08-08 patch.
3603         * typeck.c (comp_ptr_ttypes_real): Swap final && operands for
3604         cheaper early exit.
3606 2003-04-20  Nathan Sidwell  <nathan@codesourcery.com>
3608         * cp/decl2.c (start_static_storage_duration_function): Take count
3609         arg, don't check if it wraps round.
3610         (generate_ctor_or_dtor_function): Add locus arg, use it.
3611         (generate_ctor_and_dtor_functions_for_priority): Data arg is a
3612         locus.
3613         (finish_file): Set line numbers to past EOF for synthesized
3614         functions.
3616 2003-04-20  Nathan Sidwell  <nathan@codesourcery.com>
3618         PR c++/10405
3619         * search.c (lookup_field_1): Final scan goes backwards for
3620         types, forwards for non-types.
3622 2003-04-17  Roger Sayle  <roger@eyesopen.com>
3624         PR c/10375
3625         * decl.c (duplicate_decls): Preserve "const", "noreturn" and
3626         "nothrow" function attributes.
3628 2003-04-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3630         PR c++/10347
3631         * pt.c (type_dependent_expression_p): Handle array new.
3633 2003-04-15  Mark Mitchell  <mark@codesourcery.com>
3635         PR c++/10381
3636         * parser.c (cp_parser_primary_expression): Reorganize logic for
3637         dealing with name lookup failures.
3639 2003-04-15  Jason Merrill  <jason@redhat.com>
3641         * decl2.c (mark_used): Don't instantiate anything if
3642         skip_evaluation.
3644 2003-04-14  Ziemowit Laski  <zlaski@apple.com>
3646         * tree.c (build_cplus_array_type_1): Do not call
3647         uses_template_parms() on a NULL index_type.
3649 2003-04-13  Roger Sayle  <roger@eyesopen.com>
3651         * decl.c (duplicate_decls): Preserve pure and malloc attributes.
3653 2003-04-12  Mark Mitchell  <mark@codesourcery.com>
3655         PR c++/10300
3656         * init.c (build_new_1): Reorganize.
3658 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
3660         * class.c (initialize_array)
3661         * decl.c (reshape_init)
3662         * decl2.c (build_expr_from_tree)
3663         * init.c (build_zero_init)
3664         * pt.c (tsubst_copy, tsubst_copy_and_build)
3665         * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer)
3666         (ptm_initializer, class_initializer, get_pseudo_ti_init)
3667         * semantics.c (finish_compound_literal)
3668         * typeck.c (build_ptrmemfunc1)
3669         * typeck2.c (store_init_value, process_init_constructor)
3670         (build_functional_cast): Use build_constructor.
3672 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
3674         * call.c (print_z_candidates): Use gcc_gettext_width, not
3675         strlen, to determine how much padding to use.
3677 2003-04-10  Zack Weinberg  <zack@codesourcery.com>
3679         * decl.c: Update all calls to shadow_warning.
3681 2003-04-10  Mark Mitchell  <mark@codesourcery.com>
3683         * class.c (layout_class_type): Correct handling for overlong
3684         bit-fields whose width is the same as an integer type.
3686 2003-04-06  Zack Weinberg   <zack@codesourcery.com>
3688         * cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero.
3689         * cp-lang.c (cp_tree_size): New function.
3690         (LANG_HOOKS_TREE_SIZE): Override.
3692         * cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct
3693         tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill.
3694         (union lang_tree_node): Remove common and srcloc members.
3695         (build_srcloc_here): Don't prototype.
3696         * decl.c (cp_tree_node_structure): Kill SRCLOC case.
3697         * pt.c (pending_templates): Correct comment.
3698         * tree.c (build_srcloc, build_srcloc_here): Kill.
3700 2003-04-06  Zack Weinberg   <zack@codesourcery.com>
3702         * call.c: Include intl.h.
3703         (print_z_candidate): Always use inform; get rid of errfn
3704         argument. Reorganize so that all the strings get picked up
3705         by xgettext.  Note obligation of caller to pass first argument
3706         through gettext.
3707         (print_z_candidates): Update to match.  Indent second and
3708         successive candidates by strlen() of translated message.
3709         (joust): Restructure ambiguous-conversion pedwarn so that
3710         translators see a complete sentence.  Update calls to
3711         print_z_candidate.
3713         * Make-lang.in (cp/call.o): Update dependencies.
3715 2003-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3717         * decl.c (set_current_binding_level): Delete, revert last change.
3718         (current_binding_level): Modify to allow it as as lvalue.
3720 2003-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3722         * name-lookup.c (find_binding): Pass appropriate pointer type to
3723         POP_TIMEVAR_AND_RETURN.
3725 2003-04-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3727         * Make-lang.in (cp-warn): Add $(STRICT_WARN).
3728         * cp-tree.h: Don't insist on having GNUC.
3730 2003-04-03  Jason Merrill  <jason@redhat.com>
3732         * cvt.c (ocp_convert): Only abort if we try to convert an object
3733         of TREE_ADDRESSABLE type.
3735         * class.c (build_vtable): Set DECL_ALIGN here.
3736         (get_vtable_decl): Not here.
3737         (layout_vtable_decl): Or here.
3738         (create_vtable_ptr): Or here.
3739         (layout_class_type): Or here.
3740         (check_bitfield_decl): Don't mess with field alignment.
3742 2003-04-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3744         * operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR,
3745         DEF_ASSN_OPERATOR): Delete spurious semi-colon.
3746         * rtti.c (dfs_class_hint_mark): Likewise.
3748         * decl.c (push_local_name, push_class_level_binding,
3749         maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in
3750         functions returning void.
3751         * decl2.c (add_using_namespace): Likewise.
3753         * decl.c (print_binding_level, print_other_binding_stack,
3754         print_binding_stack): Cast argument of %p specifier to void*.
3755         * ptree.c (cxx_print_decl): Likewise.
3757         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
3758         VAR_FUNCTION_OR_PARM_DECL_CHECK,
3759         VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
3760         BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK,
3761         LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__.
3763         * decl.c (set_current_binding_level): New macro.  Use throughout
3764         when setting the current binding level.
3766         * cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma
3767         in enum.
3768         * method.c (mangling_flags): Likewise.
3770         * cp-tree.h (lang_type_header): Add __extension__ and use
3771         CHAR_BITFIELD for members.
3773 2003-04-02  Geoffrey Keating  <geoffk@apple.com>
3775         PR other/9274
3776         * mangle.c: Include gt-cp-mangle.h.
3777         (subst_identifiers): Mark with GTY.
3778         * config-lang.in (gtfiles): Add cp/mangle.c.
3779         * Make-lang.in: (gt-cp-mangle.h): New rule.
3780         (cp/mangle.o): Depends on gt-cp-mangle.h.
3782 2003-04-01  Andrew Pinski  <pinskia@physics.uc.edu>
3784         * config-lang.in (gtfiles): Add \$(srcdir)/cp/name-lookup.c
3785         after \$(srcdir)/cp/name-lookup.h.
3786         * name-lookup.c: (cxx_binding_make): Use ggc_alloc_clearedinstead
3787         of ggc_alloc.  Include gt-cp-name-lookup.h at the end of the file.
3788         * Make-lang.in: (gt-cp-name-lookup.h): Is generated by gengtype.
3789         (cp/name-lookup.o): Depends on gt-cp-name-lookup.h.
3791 2003-03-31  Jason Merrill  <jason@redhat.com>
3793         PR java/10145
3794         * class.c (check_field_decl): Don't set DECL_ALIGN.
3796 2003-03-30  Mark Mitchell  <mark@codesourcery.com>
3798         PR c++/7647
3799         * decl.c (grokdeclarator): Tidy, slightly.
3800         * search.c (lookup_field_1): Add want_type parameter.
3801         (lookup_field_r): Adjust call to lookup_field_1.
3803 2003-03-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3805         * Make-lang.in (cp/name-lookup.o): Add more dependencies.
3807 2003-03-30  Gabriel Dos Reis <gdr@integrable-solutions.net>
3809         * cp-tree.h (binding_for_name: Move to name-lookup.h  Adjust
3810         prototype.
3811         (cxx_scope_find_binding_for_name): Likewise.
3812         * decl.c (find_binding: Move to name-lookup.c.
3813         (binding_for_name): Likewise.
3814         (cxx_scope_find_binding_for_name): Likewise.
3815         (BINDING_LEVEL):  Remove.
3816         (push_binding): Tidy.
3817         (push_class_binding): Likewise.
3818         (pop_binding): Likewise.
3819         (poplevel): Likewise.
3820         (poplevel_class): Likewise.
3821         (set_identifier_type_value_with_scope): Likewise.
3822         (push_overloaded_decl): Likewise.
3823         (lookup_tag): Likewise.
3824         (unqualified_namespace_lookup): Likewise.
3825         (lookup_name_current_level): Likewise.
3826         (maybe_inject_for_scope_var): Likewise.
3827         (namespace_binding): Move to name-lookup.c.
3828         (set_namespace_binding): Likewise.
3829         * decl2.c (lookup_using_namespace): Tidy.
3830         (qualified_lookup_using_namespace): Likewise.
3831         (do_toplevel_using_decl): Likewise.
3832         * name-lookup.c: Include "timevar.h"
3833         * name-lookup.h (cxx_scope):  Declare.
3834         (struct cxx_binding): Lose member "has_level".  Adjust "scope"
3835         member declaration.
3836         (BINDING_SCOPE): Adjust definition.
3837         (BINDING_HAS_LEVEL_P): Remove.
3839 2003-03-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3841         * name-lookup.c: New file.
3842         * name-lookup.h: Likewise..
3843         * decl.c (push_binding): Adjust use cxx_binding_make.
3844         (free_bindings): Move to name-lookup.c
3845         (pop_binding): Use cxx_binding_free.
3846         (binding_for_name): Tidy.
3847         * cp-tree.h: Include "name-lookup.h"
3848         (cxx_binding_make): Move to name-lookup.h
3849         (cxx_binding_clear): Likewise.
3850         (struct cxx_binding): Likewise.
3851         (LOCAL_BINDING_P): Likewise.
3852         (INHERITED_VALUE_BINDING_P): Likewise.
3853         (BINDING_SCOPE): Likewise.
3854         (BINDING_HAS_LEVEL_P): Likewise.
3855         (BINDING_VALUE): Likewise.
3856         (BINDING_TYPE): Likewise.
3857         * config-lang.in (gtfiles): Add cp/name-lookup.h
3858         * Make-lang.in (cp/name-lookup.o): New rule.
3859         (CXX_OBJS): Add cp/name-lookup.o
3860         (CXX_TREE_H): Add cp/name-lookup.h
3862 2003-03-28  Jason Merrill  <jason@redhat.com>
3864         PR c++/10245
3865         * cvt.c (force_rvalue): New fn.
3866         * call.c (build_conditional_expr): Use it.
3867         * cp-tree.h: Declare it.
3869 2003-03-28  Mike Stump  <mrs@apple.com>
3871         * error.c (dump_expr): Add 0x to printed hex numbers to make
3872         output match source code better.
3874 2003-03-28  Mark Mitchell  <mark@codesourcery.com>
3876         PR c++/10218
3877         * decl.c (grokfndecl): Return NULL_TREE for bogus out-of-class
3878         definitions.
3880         * decl2.c (generate_ctor_or_dtor_function): Tolerate a
3881         non-existant ssdf_decls array.
3882         (finish_file): Call generator_ctor_or_dtor_function when there are
3883         static constructors or destructors and no other static
3884         initializations.
3886 2003-03-28  Nathan Sidwell  <nathan@codesourcery.com>
3888         PR c++/10047
3889         * decl2.c (finish_file): Don't warn about explicitly instantiated
3890         inline decls.
3892 2003-03-27  Nathan Sidwell  <nathan@codesourcery.com>
3894         PR c++/10224
3895         * pt.c (lookup_template_class): Only check instantiated args if
3896         they do not contain template parameters.
3898 2003-03-27  Nathan Sidwell  <nathan@codesourcery.com>
3900         PR c++/10158
3901         * parser.c (cp_parser_function_definition): Set
3902         DECL_INITIALIZED_IN_CLASS for members.
3903         * pt.c (instantiate_decl): Only reduce the template args for
3904         friends that are not defined in class.
3906 2003-03-25  Jason Merrill  <jason@redhat.com>
3908         * call.c (print_z_candidate): Change name of first arg to msgid.
3909         (joust): Add comment for translators.
3911 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
3913         PR c++/9898, PR c++/383, DR 322
3914         * pt.c (maybe_adjust_types_for_deduction) <DEDUCE_CONV>: Look
3915         through reference types on both PARM and ARG.
3917 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
3919         PR c++/10119
3920         * error.c (dump_expr) <BASELINK>: Use dump_expr.
3921         * pt.c (maybe_fold_nontype_args): New function.
3922         (tsubst_copy) <SCOPE_REF>: Subst any template_id args.
3923         <TEMPLATE_ID_EXPR>: Break out folding code, call it.
3924         (tsubst_copy_and_build) <TEMPLATE_ID_EXPR>: Call
3925         maybe_fold_nontype_args.
3927 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
3929         PR c++/10026
3930         * decl2.c (arg_assoc_type) <ERROR_MARK>: Don't die.
3932 2003-03-23  Mark Mitchell  <mark@codesourcery.com>
3934         PR c++/7086
3935         * typeck.c (cxx_mark_addressable):  Adjust call to
3936         gen_mem_addressof or put_var_into_stack.
3938 2003-03-22  Nathan Sidwell  <nathan@codesourcery.com>
3940         PR c++/9978, c++/9708
3941         * cp-tree.h (instantiate_template): Add tsubst_flags parameter.
3942         * call.c (add_template_candidate_real): Adjust
3943         instantiate_template call.
3944         * class.c (resolve_address_of_overloaded_function): Likewise.
3945         * decl.c (build_enumerator): Set TREE_CONSTANT.
3946         * pt.c (check_instantiated_args): New.
3947         (push_inline_template_parms_recursive): Set TREE_CONSTANT,
3948         TREE_READONLY.
3949         (build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY.
3950         (reduce_template_parm_level): Likewise.
3951         (process_template_parm): Likewise.
3952         (check_explicit_specialization): Adjust instantiate_template call.
3953         (convert_template_argument): Don't check non-type argument here.
3954         (lookup_template_class): Check them here.
3955         (tsubst_friend_function): Adjust instantiate_template call.
3956         (instantiate_template): Add tsubst_flags parameter, use it. Check
3957         instantiated args.
3959 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
3961         * decl.c: Update calls to shadow_warning.
3963 2003-03-21  Nathan Sidwell  <nathan@codesourcery.com>
3965         PR c++/9898
3966         * error.c (dump_decl) [CONST_DECL]: Print '<enumerator>'.
3967         (dump_expr) [CONSTRUCTOR]: Print default ctor as a function call.
3969 2003-03-20  Mark Mitchell  <mark@codesourcery.com>
3971         * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope
3972         friends.
3973         * cp/pt.c (instantiate_class_template): Fix formatting.
3975 2003-03-14  Matt Austern  <austern@apple.com>
3977         * cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray.
3978         (unemitted_tinfo_decl_p): Remove.
3979         (emit_tinfo_decl): Change declaration to remove unused parameter.
3980         * decl2.c (finish_file): Change tinfo emission to loop through
3981         unemitted_tinfo_decls array instead of looping through all decls.
3982         * rtti.c (unemitted_tinfo_decl_p): Declare as static, remove
3983         unused second parameter.
3984         (init_rtti_processing): initialize unemitted_tinfo_decls varray.
3985         (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls.
3986         (emit_tinfo_decl): remove unused second parameter, add assertion
3987         that decl hasn't already been emitted.
3989 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
3991         * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
3992         type from 'int' to 'bool'. Replace 0 and 1 with true and false in
3993         return statements.
3995 2003-03-19  Jason Merrill  <jason@redhat.com>
3997         PR c++/8316, c++/9315, c++/10136
3998         * call.c (print_z_candidate): Split out from...
3999         (print_z_candidiates): ...here.
4000         (joust): Use it.
4002 2003-03-17  Roger Sayle  <roger@eyesopen.com>
4004         PR c++/10031
4005         * decl.c (duplicate_decls): Use the new type when prototyping
4006         anticipated decls, even when the types match.  This defines the
4007         exception list for the built-in function.
4009 2003-03-17  Jason Merrill  <jason@redhat.com>
4011         PR c++/10091
4012         * typeck.c (build_class_member_access_expr): Compare
4013         TYPE_MAIN_VARIANTs.
4015 2003-03-17  Mark Mitchell  <mark@codesourcery.com>
4017         PR c++/9639
4018         * parser.c (cp_parser_declarator_id): Clear parser->scope.
4020 2003-03-16  Jason Merrill  <jason@redhat.com>
4022         PR c++/9993
4023         * decl.c (finish_function): Only allow the NRVO to use variables
4024         declared at function scope.
4026 2003-03-17  Andreas Jaeger  <aj@suse.de>
4028         * Make-lang.in (cp/TAGS): Remove.
4030 2003-03-16  Nathan Sidwell  <nathan@codesourcery.com>
4032         PR c++/9629
4033         * cp-tree.h (struct language_function): Add in_base_initializer.
4034         (in_base_initializer): define it.
4035         (expand_member_init): Remove INIT param.
4036         * init.c (expand_member_init): Remove INIT param, return the member.
4037         (emit_mem_initializers): Set in_base_initializer.
4038         * class.c (build_base_path): Check in_base_initializer.
4039         * parser.c (cp_parser_mem_initializer): Set in_base_initializer.
4040         * pt.c (tsubst_initializer_list): Likewise.
4042 2003-03-16   Gabriel Dos Reis <gdr@integrable-solutions.net>
4044         * decl.c (binding_for_name): Fix initialization thinko.
4046 2003-03-15  Gabriel Dos Reis <gdr@integrable-solutions.net>
4048         Compile-time improvement: 2/n.
4049         * cp-tree.h (struct cxx_binding): New datatype;
4050         (struct lang_identifier): Use it.
4051         (LOCAL_BINDING_P): Adjust definition.
4052         (INHERITED_VALUE_BINDING_P): Likewise.
4053         (BINDING_SCOPE): Likewise.
4054         (BINDING_HAS_LEVEL_P): Likewise.
4055         (BINDING_VALUE): Likewise.
4056         (BINDING_TYPE): Likewise.
4057         (IDENTIFIER_VALUE): Likewise.
4058         (struct tree_binding): Remove.
4059         (TS_CP_BINDING): Likewise.
4060         ((union lang_tree_node): Remove field "binding".
4061         (cxx_binding_clear): New macro.
4062         (binding_for_name): Adjust return type.
4063         (qualified_lookup_using_namespace): Adjust prototype.
4064         (lookup_using_namespace): Adjust prototype.
4065         (cxx_scope_find_binding_for_name): Declare.
4066         * cp-tree.def: Remove CPLUS_BINDING definition.
4067         * decl.c (push_binding): Adjust local variable type.
4068         (add_binding): Likewise.
4069         (push_class_binding): Likewise.
4070         (pop_binding): Likewise.
4071         (poplevel): Likewise.
4072         (poplevel_class): Likewise.
4073         (free_bindings):  Adjust type.
4074         (find_binding): Adjust return type, add a third parameter. Remove
4075         non-useful assertion now that we use static typing.
4076         (cxx_scope_find_binding_for_name): New function.
4077         (binding_for_name): Use it.  Adjust local variable type. Simplify.
4078         (namespace_binding):  Simplify.
4079         (set_namespace_binding): Likewise.
4080         (set_identifier_type_value_with_scope): Adjust local variable type.
4081         (lookup_tag): Don't type-abuse of local variable 'old'.
4082         (lookup_namespace_name): Likewise.  Allocate binding on stack.
4083         (select_decl): Adjust prototype.
4084         (unqualified_namespace_lookup):  Allocate binding on stack.
4085         Don't type-abuse of local variable 'val'.
4086         (lookup_name_real): Likewise.
4087         (maybe_inject_for_scope_var): Adjust local variable type.
4088         (cp_tree_node_structure): Remove CPLUS_BINDING case label.
4089         (namespace_binding): Adjust logic, simplify.
4090         (BINDING_LEVEL): Adjust definition.
4091         (push_class_level_binding): Adjust local variable type.
4092         (struct cxx_saved_binding): Adjust field 'binding' type.
4093         * decl2.c (ambiguous_decl): Adjust prototype.
4094         (lookup_using_namespace): Adjust local variable type.
4095         (qualified_lookup_using_namespace): Catch type error and correct
4096         ensueing logic error.
4097         (do_nonmember_using_decl): Adjust local variable type.  Allocate
4098         temporary cxx_binding on stack.
4099         (do_toplevel_using_decl): Adjust local variable type.
4100         * ptree.c (cxx_print_cxx_binding): New function.
4101         (cxx_print_identifier): Use it.
4102         (cxx_print_xnode): Delete CPLUS_BINDING case label.
4104 2003-03-15  Roger Sayle  <roger@eyesopen.com>
4106         * tree.c (count_functions): Fix whitespace.
4108 2003-03-15  Neil Booth  <neil@daikokuya.co.uk>
4110         * Make-lang.in: Update.
4112 2003-03-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4114         PR c++/6440
4115         * pt.c (maybe_process_partial_specialization): Handle
4116         member class template when enclosing class template is
4117         explicit specialized.
4118         (most_general_template): Stop looking when DECL is already
4119         specialized.
4121 2003-03-13  Jason Merrill  <jason@redhat.com>
4123         PR c++/9420
4124         * search.c (lookup_conversions): Call complete_type here.
4125         * call.c (implicit_conversion): Not here.
4127 2003-03-13  Mark Mitchell  <mark@codesourcery.com>
4129         * decl2.c (do_nonmember_using_decl): Correct handling of
4130         simultaneous type/non-type bindings.
4132         * call.c (initialize_reference): Remove bogus assertion.
4133         * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
4135 2003-03-12  Andrew Lewycky  <andrew@mxc.ca>
4137         PR c++/7050
4138         * expr.c (cxx_expand_expr): Return const0_rtx for throw
4139         expressions.
4141 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
4143         PR c++/9474
4144         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
4145         to merge old and new declarations.
4147 2003-03-12  Alexandre Oliva  <aoliva@redhat.com>
4149         * g++.1: Remove.
4150         * Make-lang.in (c++.generated-manpages): Build cp/g++.1.
4151         (cp/g++.1): Build it from scratch in the build tree.
4152         (c++.install-man): Depend on it.  Install it from the build tree.
4153         (c++.mostlyclean): Clean it.
4155 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
4157         PR c++/9474
4158         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
4159         to merge old and new declarations.
4161         PR c++/9924
4162         * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
4164 2003-03-11  Jason Merrill  <jason@redhat.com>
4166         PR c++/9820
4167         * search.c (lookup_member): Fix handling of functions in a class
4168         being defined.
4170 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
4172         PR c++/8700
4173         * call.c (convert_class_to_reference): Adjust usage of
4174         splice_viable.
4175         (any_viable): Remove.
4176         (splice_viable): Combine with any_viable.
4177         (print_z_candidates): Avoid printing duplicates.
4178         (build_user_type_conversion_1): Adjust usage of splice_viable.
4179         (build_new_function_call): Likewise.
4180         (build_operator_new_call): Likewise.
4181         (build_object_call): Likewise.
4182         (build_conditional_expr): Likewise.
4183         (build_new_op): Likewise.
4184         (build_new_method_call): Likewise.
4185         (joust): Remove spurious comment.
4186         * cp-tree.h (DECL_FRIENDLIST): Correct documentation.
4187         * decl2.c (arg_assoc_class): Simplify.
4188         * friend.c (add_friend): Likewise.
4190 2003-03-11  Jason Merrill  <jason@redhat.com>
4192         PR c++/8660
4193         * decl2.c (check_classfn): A member template only matches a
4194         member template.
4196 2003-03-11  Neil Booth  <neil@daikokuya.co.uk>
4198         * Make-lang.in (CXX_C_OBJS): Update.
4199         * lang-specs.h: Don't define __GNUG__ here.
4201 2003-03-10  Mark Mitchell  <mark@codesourcery.com>
4203         * call.c (perform_overload_resolution): New function.
4204         (build_new_function_call): Use it.
4205         (build_operator_new_call): Likewise.
4206         (add_candidates): Add explicit_targs and template_only parameters.
4207         (build_new_op): Adjust accordingly.
4208         * cp-tree.h (build_operator_new_call): New function.
4209         (build_function_call_real): Remove.
4210         (build_function_call_maybe): Likewise.
4211         * init.c (build_new_1): Use build_operator_new_call.
4212         * typeck.c (build_function_call_real): Rename to ...
4213         (build_function_call): ... this.
4215 2003-03-10  Devang Patel  <dpatel@apple.com>
4217         PR c++/9394
4218         * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
4220 2003-03-10  Jason Merrill  <jason@redhat.com>
4222         PR c++/9798
4223         * decl.c (push_using_directive): Push before recursing.
4225         PR c++/9868, c++/9524
4226         * call.c (resolve_scoped_fn_name): Handle the case of a function
4227         pointer member.
4229         * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
4230         argument in the pointer-to-member case.
4232 2003-03-09  Mark Mitchell  <mark@codesourcery.com>
4234         PR c++/9373
4235         * cp-lang.c (cxx_get_alias_set): Use alias set zero for
4236         pointers to member functions.
4238         PR c++/8534
4239         * decl.c (build_ptrmemfunc_type): Do not allow default arugments
4240         in pointer-to-member-function types.
4242 2003-03-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4244         * expr.c (cplus_expand_constant): Use C90 prototype style.
4245         (cxx_expand_expr): Likewise.
4247 2003-03-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4249         PR c++/9970
4250         * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
4251         functions.
4253 2003-03-08  Geoffrey Keating  <geoffk@apple.com>
4255         * lang-specs.h (c++-header): Change .pch to .gch.
4257 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
4259         * cp-tree.h (cxx_init): Update prototype.
4260         * lex.c (cxx_init): Similarly.
4262 2003-03-08  Mark Mitchell  <mark@codesourcery.com>
4264         PR c++/9823
4265         * cp-tree.h (begin_mem_initializers): Remove.
4266         * parser.c (cp_parser_mem_initializer_list): Inline it here.
4267         Do not call finish_mem_initializers if not in a constructor.
4268         (cp_parser_class_head): Fix typo in error message.
4269         * semantics.c (begin_mem_initializers): Remove.
4270         * testsuite/g++.dg/parser/constructor1.C: New test.
4272         PR c++/9809
4273         * call.c (add_function_candidate): Skip builtin fuctions that have
4274         not yet been declared.
4276         PR c++/9982
4277         * init.c (build_new_1): Correct logic for determining whether or
4278         not to use an array cookie.
4280         PR c++/9524
4281         * parser.c (cp_parser_postfix_expression): Call
4282         finish_non_static_data_member, even when processing_template_decl.
4284         PR c++/9912
4285         * cp-tree.h (is_ancestor): New function.
4286         (handle_class_head): Change prototype.
4287         * decl2.c (is_namespace_ancestor): Rename to ...
4288         (namespace_anecestor): ... this.
4289         (set_decl_namespace): Adjust accordingly.
4290         (handle_class_head): Remove unncessary parameters.
4291         * parser.c (cp_parser_class_head): Check that
4292         nested-name-specifiers are used appropriately.
4294 2003-03-07  Mark Mitchell  <mark@codesourcery.com>
4296         * call.c (reference_binding): Remove REF_IS_VAR parameter.
4297         (implicit_conversion): Adjust call to reference_binding.
4298         (make_temporary_var_for_ref_to_type): Add TYPE parameter.
4299         (initialize_reference): Adjust handling for references bound to
4300         rvalues.
4301         * cp-tree.h (make_temporary_var_for_ref_to_temp): Change
4302         prototype.
4303         (real_non_cast_lvalue_p): New method.
4304         * cvt.c (build_up_reference): Adjust use of
4305         make_temporary_var_for_ref_to_temp.
4306         * tree.c (real_non_cast_lvalue_p): New method.
4308 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4310         * except.c (init_exception_processing): Use C90 prototype style.
4311         (cp_protect_cleanup_actions): Likewise.
4312         (prepare_eh_type): Likewise.
4313         (build_eh_type_type): Likewise.
4314         (build_exc_ptr): Likewise.
4315         (do_begin_catch): Likewise.
4316         (dtor_nothrow): Likewise.
4317         (do_end_catch): Likewise.
4318         (push_eh_cleanup): Likewise.
4319         (decl_is_java_type): Likewise.
4320         (choose_personality_routine): Likewise.
4321         (initialize_handler_parm): Likewise.
4322         (expand_start_catch_block): Likewise.
4323         (expand_end_catch_block): Likewise.
4324         (begin_eh_spec_block): Likewise.
4325         (finish_eh_spec_block): Likewise.
4326         (do_allocate_exception): Likewise.
4327         (do_free_exception): Likewise.
4328         (wrap_cleanups_r): Likewise.
4329         (stabilize_throw_expr): Likewise.
4330         (build_throw): Likewise.
4331         (complete_ptr_ref_or_void_ptr_p): Likewise.
4332         (is_admissible_throw_operand): Likewise.
4333         (nothrow_libfn_p): Likewise.
4334         (can_convert_eh): Likewise.
4335         (check_handlers_1): Likewise.
4336         (check_handlers): Likewise.
4338 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
4340         * call.c (merge_conversion_sequences): New function.
4341         (build_conv): Set ICS_USER_FLAG for USER_CONVs.
4342         (convert_class_to_reference): Correct handling of second
4343         standard conversion sequence in a user-defined conversion
4344         sequence.
4345         (build_user_type_conversion_1): Use merge_conversion_sequences.
4346         * cp-tree.def: Add comments for CONV nodes.
4347         * rtti.c (get_tinfo_decl): Use build_address/build_nop.
4349 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4351         * error.c (init_error): Use C90 prototype style.
4352         (dump_scope): Likewise.
4353         (dump_qualifiers): Likewise.
4354         (dump_template_argument): Likewise.
4355         (dump_template_argument_list): Likewise.
4356         (dump_template_parameter): Likewise.
4357         (dump_template_bindings): Likewise.
4358         (dump_type): Likewise.
4359         (dump_typename): Likewise.
4360         (class_key_or_enum): Likewise.
4361         (dump_aggr_type): Likewise.
4362         (dump_type_prefix): Likewise.
4363         (dump_type_suffix): Likewise.
4364         (dump_global_iord): Likewise.
4365         (dump_simple_decl): Likewise.
4366         (dump_decl): Likewise.
4367         (dump_template_decl): Likewise.
4368         (dump_function_decl): Likewise.
4369         (dump_parameters): Likewise.
4370         (dump_exception_spec): Likewise.
4371         (dump_function_name): Likewise.
4372         (dump_template_parms): Likewise.
4373         (dump_char): Likewise.
4374         (dump_expr_list): Likewise.
4375         (dump_expr): Likewise.
4376         (dump_binary_op): Likewise.
4377         (dump_unary_op): Likewise.
4378         (type_as_string): Likewise.
4379         (expr_as_string): Likewise.
4380         (decl_as_string): Likewise.
4381         (context_as_string): Likewise.
4382         (lang_decl_name): Likewise.
4383         (cp_file_of): Likewise.
4384         (cp_line_of): Likewise.
4385         (decl_to_string): Likewise.
4386         (expr_to_string): Likewise.
4387         (fndecl_to_string): Likewise.
4388         (code_to_string): Likewise.
4389         (language_to_string): Likewise.
4390         (parm_to_string): Likewise.
4391         (op_to_string): Likewise.
4392         (type_to_string): Likewise.
4393         (assop_to_string): Likewise.
4394         (args_to_string): Likewise.
4395         (cv_to_string): Likewise.
4396         (cxx_print_error_function): Likewise.
4397         (cp_diagnostic_starter): Likewise.
4398         (cp_diagnostic_finalizer): Likewise.
4399         (cp_print_error_function): Likewise.
4400         (function_category): Likewise.
4401         (print_instantiation_full_context): Likewise.
4402         (print_instantiation_partial_context): Likewise.
4403         (maybe_print_instantiation_context): Likewise.
4404         (print_instantiation_context): Likewise.
4405         (cp_printer): Likewise.
4406         (print_integer): Likewise.
4407         (print_non_consecutive_character): Likewise.
4408         (locate_error): Likewise.
4410 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
4412         PR c++/9965
4413         * call.c (reference_binding): Add ref_is_var parameter.
4414         (implicit_conversion): Adjust call to reference_binding.
4415         (initialize_reference): Likewise.
4417         PR c++/9400
4418         * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
4419         PARM_DECLs.
4421         PR c++/9791
4422         * class.c (get_basefndecls): Use lookup_fnfields_1.
4424 2003-03-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4426         PR c++/9188
4427         * parser.c (cp_parser_type_parameter): Remove redundant `expect'
4428         in error message.
4429         (cp_parser_single_declaration): Likewise.
4431 2003-03-05  Jason Merrill  <jason@redhat.com>
4433         PR c++/9440
4434         * call.c (build_conditional_expr): Use convert rather than an
4435         explicit NOP_EXPR.
4437 2003-03-02  Matt Austern  <austern@apple.com>
4439         * decl.c (cp_binding_level): Add static_decls varray member.
4440         (add_decl_to_level): Add static/inline namespace scope
4441         declarations to static_decls array.
4442         (wrapup_global_for_namespace): Pass static_decls only, instead of
4443         all decls, to wrapup_global_declarations/check_global_declarations.
4444         (push_namespace): Initialize static_decls for ordinary namespaces.
4445         (cxx_init_decl_processing): Initialize static_decls for global
4446         namespace.
4448 2003-03-05  Mark Mitchell  <mark@codesourcery.com>
4450         * class.c (end_of_class): Correct thinko.
4452 2003-03-04  Nathanael Nerode  <neroden@gcc.gnu.org>
4454         * config-lang.in: Replace ${libstdcxx_version} by its value.
4456 2003-03-04  Gabriel Dos Reis <gdr@integrable-solutions.net>
4458         * cp-tree.h (cxx_saved_binding): Declare.
4459         (struct saved_scope): Adjust type of field 'old_binding'.
4460         * decl.c (cxx_saved_binding_make): New macro.
4461         (struct cxx_saved_binding): Define.
4462         (store_bindings): Adjust prototype.  Use cxx_saved_binding to save
4463         C++ bindings.
4464         (maybe_push_to_top_level): Adjust local variable type.
4465         (pop_from_top_level): Likewise.
4467 2003-03-04  Tom Tromey  <tromey@redhat.com>
4469         * Make-lang.in (c++.tags): New target.
4471 2003-03-04  Neil Booth  <neil@daikokuya.co.uk>
4473         * Make-lang.in: Update.
4475 2003-03-03  Jason Merrill  <jason@redhat.com>
4477         * decl.c (finish_enum): Do set the type in a template. Simplify.
4478         * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
4480 2003-03-03  Mark Mitchell  <mark@codesourcery.com>
4482         PR c++/9878
4483         * call.c (convert_class_to_reference): Correct conversion
4484         sequences.
4485         (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
4486         (implicit_conversion): Adjust call to reference_binding.
4487         (add_candidate): Change type of candidates parameter.
4488         (add_function_candidate): Likewise.
4489         (add_conv_candidate): Likewise.
4490         (build_builtin_candidate): Likewise.
4491         (add_builtin_candidate): Likewise.
4492         (add_builtin_candidates): Likewise.
4493         (add_template_candidate_real): Likewise.
4494         (add_template_candidate): Likewise.
4495         (add_template_conv_candidate): Likewise.
4496         (build_user_type_conversion_1): Adjust accordingly.
4497         (build_object_call): Likewise.
4498         (build_conditional_expr): Likewise.
4499         (add_candidates): Likewise.
4500         (build_new_op): Likewise.
4501         (convert_like_real): Use USER_CONV_CAND.  Use build_nop.
4502         (build_new_method_call): Adjust calls to add_function_candidate.
4503         (make_temporary_var_for_ref_to_temp): New function.
4504         (initialize_reference): Add decl parameter.
4505         * class.c (build_rtti_vtbl_entries): Use build_address and
4506         build_nop.
4507         * cp-tree.h (initialize_reference): Change prototype.
4508         (make_temporary_var_for_ref_to_temp): New function.
4509         (build_type_conversion): Change prototype.
4510         (build_address): New function.
4511         (build_nop): Likewise.
4512         * cvt.c (cp_convert_to_pointer): Adjust call to
4513         build_type_conversion.  Avoid indicating redundant NOP_EXPRs.
4514         Use build_nop.
4515         (convert_to_pointer_force): Use build_nop.
4516         (build_up_reference): Use make_temporary_var_for_ref_to_temp.
4517         (convert_to_reference): Adjust call to build_type_conversion.
4518         (ocp_convert): Likewise.
4519         (build_type_conversion): Remove for_sure parameter.
4520         * decl.c (grok_reference_init): Use initialize_reference.
4521         * typeck.c (build_address): New function.
4522         (build_nop): Likewise.
4523         (build_unary_op): Use them.
4524         (build_ptrmemfunc): Tidy slightly.
4525         (convert_for_initialization): Adjust call to
4526         initialize_reference.
4527         * typeck2.c (store_init_value): Remove #if 0'd code.
4529 2003-03-03  Jason Merrill  <jason@redhat.com>
4531         * decl.c (start_function): Clear DECL_NUM_STMTS.
4533         * class.c (get_vtable_decl): Use vtbl_type_node.
4534         (build_primary_vtable): Check for it.
4536 2003-03-02  Aldy Hernandez  <aldyh@redhat.com>
4538         * decl.c (check_initializer): Check for vector_opaque_p.
4540 2003-03-02  Ashif Harji  <asharji@uwaterloo.ca>
4542         * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
4543           invoke an external cpp during compilation.
4545 2003-03-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4547         * decl.c (duplicate_decls): Convert use of warning_with_decl() to
4548         that of warning().
4549         (start_decl): Likewise.
4550         (start_function): Likewise.
4552 2003-03-01  Neil Booth  <neil@daikokuya.co.uk>
4554         * Make-lang.in (CXX_C_OBJS): Update.
4556 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
4558         PR c++/9892
4559         * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
4560         instantiating it.
4562 2003-02-28  Aldy Hernandez  <aldyh@redhat.com>
4564         * parser.c (cp_parser_init_declarator): Revert opaque
4565         vector_opaque_p change.
4566         Do not include target.h.
4568 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
4570         PR c++/9879
4571         * cp-tree.h (build_zero_init): Add parameter.
4572         * decl.c (cp_finish_decl): Adjust call.
4573         * init.c (build_zero_init): Add nelts parameter.  Adjust recursive
4574         calls.
4575         (build_default_init): Add nelts parameter.  Adjust calls to
4576         build_zero_init.
4577         (build_new_1): Adjust call to build_default_init.
4578         * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
4580 2003-02-26  Devang Patel  <dpatel@apple.com>
4582         * decl.c (finish_enum): Merge two 'for' loops. Copy value node if
4583         required.  Postpone enum setting for template decls.
4584         (build_enumerator): Delay copying value node until finish_enum
4585         (). Remove #if 0'ed code.
4586         * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
4587         (tsubst_copy): Add check for enum type.
4589 2003-02-25  Mark Mitchell  <mark@codesourcery.com>
4591         PR c++/9683
4592         * decl2.c (prune_vars_needing_no_initialization): Do not throw
4593         away initializations for DECL_EXTERNAL VAR_DECLs.
4594         (finish_file): Adjust accordingly.
4595         * pt.c (instantiate_decl): Do not defer VAR_DECLs.
4597 2003-02-24 Gabriel Dos Reis  <gdr@integrable-solutions.net>
4599         * decl.c (add_binding): Time TV_NAME_LOOKUP.
4600         (push_class_binding): Likewise.
4601         (set_namespace_binding): Likewise.
4603 2003-02-24  Mark Mitchell  <mark@codesourcery.com>
4605         PR c++/9836
4606         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
4607         specializations back to the main template.
4608         * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
4609         * pt.c (resolve_typename_type): Likewise.
4611 2003-02-24  Jeffrey D. Oldham  <oldham@codesourcery.com>
4613         PR c++/9778
4614         * pt.c (tsubst_copy_and_build): For a templated function inside a
4615         scope, process template arguments.
4617 2003-02-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4619         PR c++/9602
4620         * typeck2.c (abstract_virtuals_error): Don't check when
4621         TYPE is still template parameter dependent.
4623 2003-02-23  Mark Mitchell  <mark@codesourcery.com>
4625         PR c++/5333
4626         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
4627         * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
4628         * pt.c (instantiate_class_template): Don't try to instantiate
4629         dependent types.
4630         (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
4632 2003-02-21  Mark Mitchell  <mark@codesourcery.com>
4634         PR c++/9749
4635         * decl.c (grokdeclarator): Do not allow parameters with variably
4636         modified types.
4638 2003-02-21  Nathan Sidwell  <nathan@codesourcery.com>
4640         * search.c (grow_bfs_bases): Remove. Fold into ...
4641         (bfs_walk): ... here, fix fencepost error. Fix merge lossage
4642         in previous patch.
4644 2003-02-20  Mark Mitchell  <mark@codesourcery.com>
4646         PR c++/9729
4647         * mangle.c (mangle_conv_op_name_for_type): Issue an error message
4648         when the G++ 3.2 ABI prevents correct compilation.
4650 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
4652         Change base class access representation. Share virtual base
4653         binfos.
4654         * cp/call.c (build_special_member_call): Remove binfo_for_vbase
4655         call.
4656         * cp/class.c (build_base_path): Likewise.
4657         (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
4658         (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
4659         (make_new_vtable): Adjust.
4660         (force_canonical_binfo_r): Delete.
4661         (force_canonical_binfo): Delete.
4662         (mark_primary_virtual_base): Delete.
4663         (dfs_unshared_virtual_bases): Delete.
4664         (mark_primary_bases): Adjust.
4665         (maybe_warn_about_overly_private_class): Adjust.
4666         (dfs_base_derived_from): Delete.
4667         (base_derived_from): Follow the inheritance chain.
4668         (struct find_final_overrider_data): Add vpath member.
4669         (dfs_find_final_overrider): Adjust.
4670         (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
4671         (find_final_overrider): Adjust.
4672         (update_vtable_entry_for_fn): Adjust.
4673         (modify_all_vtables): Adjust.
4674         (walk_subobject_offsets): Adjust.
4675         (layout_nonempty_base_or_field): Adjust.
4676         (layout_empty_base): Remove last parameter. Adjust.
4677         (build_base_field): Adjust.
4678         (build_base_fields): Adjust.
4679         (propagate_binfo_offsets): Remove last parameter. Adjust.
4680         (dfs_set_offset_for_unshared_vbases): Delete.
4681         (layout_virtual_bases): Adjust.
4682         (finish_struct_1): Adjust.
4683         (init_class_processing): Don't init access nodes.
4684         (dfs_get_primary_binfo): Delete.
4685         (get_primary_binfo): Adjust.
4686         (dump_class_hierarchy_r): Remove most derived arg, add IGO
4687         parameter. Adjust.
4688         (dump_class_hierarchy): Adjust.
4689         (finish_vtbls): Adjust.
4690         (get_original_base): Delete.
4691         (build_vtt_inits): Adjust.
4692         (dfs_build_secondary_vptr_vtt_inits): Adjust.
4693         (dfs_ctor_vtable_bases_queue_p): Adjust.
4694         (build_ctor_vtbl_group): Adjust.
4695         (dfs_accumulate_vtbl_inits): Adjust.
4696         (build_vtbl_initializer): Adjust.
4697         (build_vbase_offset_vtbl_entries): Adjust.
4698         (add_vcall_offset_vtbl_entries_1): Adjust.
4699         * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
4700         (access_*_node): Remove.
4701         (CANONICAL_BINFO): Delete.
4702         (BINFO_UNSHARED_MARKED): Remove.
4703         (BINFO_MARKED): Set LANG_FLAG_0 directly.
4704         (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
4705         (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
4706         (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
4707         Delete.
4708         (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
4709         (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
4710         (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
4711         Delete.
4712         (BINFO_DEPENDENT_BASE_P): New.
4713         (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
4714         index.
4715         (markedp, unmarkedp): Adjust.
4716         (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
4717         dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
4718         find_vbase_instance, binfo_for_vbase): Delete.
4719         (copied_binfo, original_binfo): Declare.
4720         (finish_base_specifier): Add virtual_p arg.
4721         (unshare_base_binfos): Delete.
4722         (copy_base_binfos): Declare.
4723         (reverse_path): Delete.
4724         * cp/decl.c (xref_basetypes): Access and virtuality passed
4725         differently. Don't copy direct base binfos here. Call
4726         copy_base_binfos.
4727         * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
4728         (initialize_vtbl_ptrs): Adjust.
4729         (expand_member_init): Adjust.
4730         * cp/parser.c (cp_parser_base_specifier): Adjust.
4731         * cp/pt.c (instantiate_class_template): Adjust.
4732         (get_template_base_recursive): Adjust.
4733         * cp/rtti.c (get_pseudo_ti_init): Adjust.
4734         (get_pseudo_ti_desc): Adjust.
4735         * cp/tree.c (unshare_base_binfos): Rename to ...
4736         (copy_base_binfos): ... here, reimplement.
4737         (make_binfo): Set BINFO_DEPENDENT_BASE_P.
4738         (reverse_path): Remove.
4739         * cp/typeck.c (get_delta_difference): Adjust error messages.
4740         * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
4741         * cp/search.c (lookup_base_r): Adjust.
4742         (dynamic_cast_base_recurse): Adjust.
4743         (canonical_binfo): Remove.
4744         (dfs_canonical_queue): Remove.
4745         (dfs_assert_unmarked_p): Remove.
4746         (assert_canonical_unmarked): Remove.
4747         (shared_marked_p, shared_unmarked_p): Remove.
4748         (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
4749         (dfs_access_in_type): Adjust.
4750         (access_in_type): Adjust.
4751         (dfs_accessible_queue_p): Adjust.
4752         (dfs_accessible_p): Adjust.
4753         (is_subobject_of_p_1, is_subobject_of_p): Remove.
4754         (struct lookup_field_info): Remove from_dep_base_p field.
4755         (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
4756         (lookup_field_r): Remove dependent base code.
4757         (lookup_member): Likewise.
4758         (dfs_walk, dfs_walk_real): Add access arg to queue fn.
4759         (dfs_unmarked_real_bases_queue_p): Remove.
4760         (dfs_marked_real_bases_queue_p): Remove.
4761         (dfs_skip_vbases): Remove.
4762         (dfs_get_pure_virtuals): Adjust.
4763         (markedp, unmarkedp): Adjust.
4764         (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
4765         (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
4766         (dfs_unmark): Adjust.
4767         (dfs_get_vbase_types):Remove.
4768         (dfs_build_inheritance_graph_order): Remove.
4769         (get_vbase_types): Remove
4770         (dfs_find_vbase_instance): Remove.
4771         (find_vbase_instance): Remove.
4772         (dfs_debug_unmarkedp): Adjust.
4773         (dependent_base_p): Remove.
4774         (dfs_push_type_decls): Adjust.
4775         (dfs_push_decls): Adjust.
4776         (dfs_no_overlap_yet): Adjust.
4777         (copied_binfo): New function.
4778         (original_binfo): New function.
4779         (binfo_for_vbase): Remove.
4781 2003-02-18  Zack Weinberg  <zack@codesourcery.com>
4783         * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
4784         (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
4785         vectors, for speed.
4787 2003-02-18  Mark Mitchell  <mark@codesourcery.com>
4789         PR c++/9704
4790         * class.c (layout_class_type): In the 3.2 ABI, take into account
4791         trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
4793 2003-02-18  Matt Austern <austern@apple.com>
4795         * cp/cp-lang.c: Change lang hooks so that final_write_globals does
4796         nothing for C++.
4797         * cp/decl.c (wrapup_globals_for_namespace): Remove special
4798         handling of global namespace.
4800 2003-02-18  Geoffrey Keating  <geoffk@apple.com>
4802         * cp-tree.h (rid_to_yy): Delete.
4803         (C_RID_YYCODE): Delete.
4804         (finish_file): Delete redundant declaration.
4806 2003-02-18  Jason Merrill  <jason@redhat.com>
4808         PR c++/9623
4809         * decl.c (reshape_init): Don't mess with initializer labels.
4811         PR c++/9485
4812         * parser.c (cp_parser_postfix_expression): Set idk properly for
4813         object->scope::member.
4815 2003-02-18  Ben Elliston  <bje@redhat.com>
4817         PR other/7350
4818         * decl.c (duplicate_decls): Fix typo in comment.
4820 2003-02-17  Michael Elizabeth Chastain <mec@shout.net>
4822         PR debug/9717
4823         * class.c (build_base_field): Mark fields for base classes with
4824         DECL_IGNORED_P.
4826 2003-02-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4828         PR c++/9457
4829         * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
4830         CONSTRUCTOR_ELTS only once.
4832 2003-02-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4834         PR c++/9459
4835         * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
4836         (dump_type_suffix): Likewise.
4838 2003-02-14  Nathan Sidwell  <nathan@codesourcery.com>
4840         * search.c: ANSIfy function declarations and definitions.
4841         * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
4842         * call.c (build_method_call, resolve_scoped_fn_name,
4843         build_java_interface_fn_ref): Adjust lookup_field, lookup_member
4844         calls.
4845         * class.c (handle_using_decl): Likewise.
4846         * decl.c (make_typename_type, make_unmound_class_template,
4847         start_decl, compute_array_index_type): Likewise.
4848         * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
4849         * init.c (expand_member_init, build_member_call): Likewise.
4850         * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
4851         resolve_typename_type): Likewise.
4852         * typeck.c (lookup_destructor, finish_class_member_access_exprm
4853         build_prememfunc_access_expr): Likewise.
4855 2003-02-13  Gabriel Dos Reis <gdr@integrable-solutions.net>
4857         * decl2.c: Include "timevar.h".
4858         (namespace_ancestor): Time name lookup.
4859         (add_using_namespace): Likewise.
4860         (lookup_using_namespace): Likewise.
4861         (qualified_lookup_using_namespace): Likewise.
4862         (decl_namespace): Likewise.
4863         (lookup_arg_dependent): Likewise.
4864         * lex.c (do_identifier): Likewise.
4865         (do_scoped_id): Likewise.
4866         * pt.c (lookup_template_class): Likewise.
4868 2003-02-14   Andrew Pinski <pinskia@physics.uc.edu>
4870         * decl.c: (define_label): Fix warning for return 0 instead of NULL.
4872 2003-02-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4874         * decl.c: Include "timevar.h".
4875         (poplevel): Time name lookup.
4876         (find_binding): Likewise.
4877         (push_namespace): Likewise.
4878         (pop_nested_namespace): Likewise.
4879         (store_bindings): Likewise.
4880         (maybe_push_to_top_level): Likewise.
4881         (pop_from_top_level): Likewise.
4882         (push_local_name): Likewise.
4883         (pushtag): Likewise.
4884         (pushdecl): Likewise.
4885         (pushdecl_with_scope): Likewise.
4886         (pushdecl_namespace_level): Likewise.
4887         (pushdecl_top_level): Likewise.
4888         (pushdecl_class_level): Likewise.
4889         (push_class_level_binding): Likewise.
4890         (push_using_decl): Likewise.
4891         (push_using_directive): Likewise.
4892         (push_overloaded_decl): Likewise.
4893         (lookup_label): Likewise.
4894         (define_label): Likewise.
4895         (lookup_tag): Likewise.
4896         (lookup_tag_reverse): Likewise.
4897         (lookup_namespace_name): Likewise.
4898         (select_decl): Likewise.
4899         (unqualified_namespace_lookup): Likewise.
4900         (lookup_name_real): Likewise.
4901         (lookup_name_current_level): Likewise.
4902         (lookup_type_current_level): Likewise.
4903         (maybe_inject_for_scope_var): Likewise.
4904         (xref_tag): Likewise.
4906         * Make-lang.in (cp/decl.o): Add dependency on timevar.h
4908 2003-02-12  Phil Edwards  <pme@gcc.gnu.org>
4910         * decl.c (build_enumerator):  Remove unneeded test.
4912 2003-02-09  Dan Nicolaescu  <dann@ics.uci.edu>
4914         * cp-tree.h (struct lang_type_header): Make all fields unsigned
4915         char.
4917 2003-02-03  Mark Mitchell  <mark@codesourcery.com>
4919         PR c++/7129
4920         * call.c (z_candidate): Add args.
4921         (convert_class_to_reference): Set it.
4922         (implicit_conversion): Tidy.
4923         (add_candidate): Add args parameter.
4924         (add_function_candidate): Adjust call to add_candidate.
4925         (add_conv_candidate): Likewise.
4926         (build_builtin_candidate): Likewise.
4927         (build_user_type_conversion_1): Eliminate wasteful tree_cons
4928         usage.
4929         (build_new_function_call): Likewise.
4930         (build_object_call): Likewise.
4931         (add_candidates): New function.
4932         (build_new_op): Use it.
4933         (covert_like_real): Adjust call to build_over_call.
4934         (build_over_call): Remove args parameter.
4935         * operators.def: Add <?= and >?=.
4937 2003-02-01  Richard Sandiford  <rsandifo@redhat.com>
4939         * typeck.c (build_indirect_ref): Don't check flag_volatile.
4941 2003-01-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4943         PR c++/8849
4944         * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
4946 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
4948         * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
4949         BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
4950         (BINFO_LANG_ELTS): New #define.
4951         * tree.c (make_binfo): Use BINFO_LANG_ELTS.
4953 2003-01-30  Geoffrey Keating  <geoffk@apple.com>
4955         * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
4957 2003-01-30  Mark Mitchell  <mark@codesourcery.com>
4959         * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
4960         for class types.
4961         * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
4962         rather than TYPE_LANG_FLAG_0.
4963         (TYPE_BUILT_IN): Remove.
4964         (TYPE_DEPENDENT_P): New macro.
4965         (TYPE_DEPENDENT_P_VALID): Likewise.
4966         (lang_type_class): Add fields_readonly.
4967         * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
4968         * pt.c (dependent_type_p_r): New function, split out from ...
4969         (dependent_type_p): ... here.  Memoize results.
4970         * search.c (dependent_base_p): Use dependent_type_p, not
4971         uses_template_parms.
4972         * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
4973         for class types.
4975 2003-01-29  Mark Mitchell  <mark@codesourcery.com>
4977         * call.c (build_field_call): Use build_new_op, not build_opfncall.
4978         (prep_operand): New function.
4979         (build_new_op): Use it.  Remove dead code.
4980         * class.c (pushclass): Change "modify" parameter type from int to
4981         bool.
4982         (currently_open_class): Use same_type_p, not pointer equality.
4983         (push_nested_class): Adjust calls to pushclass, remove modify
4984         parameter.
4985         * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
4986         (pushclass): Change prototype.
4987         (push_nested_class): Likewise.
4988         (grokoptypename): Remove.
4989         (build_opfncall): Remove.
4990         (value_dependent_expression_p): Declare.
4991         (resolve_typename_type): Likewise.
4992         (resolve_typename_type_in_current_instantiation): Likewise.
4993         (enter_scope_of): Remove.
4994         (tsubst): Remove.
4995         (tsubst_expr): Likewise.
4996         (tsubst_copy): Likewise.
4997         (tsubst_copy_and_build): Likewise.
4998         * decl.c (warn_about_implicit_typename_lookup): Remove.
4999         (finish_case_label): Return error_mark_node for erroneous labels.
5000         (start_decl): Adjust calls to push_nested_class.
5001         (grokfndecl): Call push_scope/pop_scope around call to
5002         duplicate_decls.
5003         (grokdeclarator): Do not call tsubst.
5004         (start_function): Adjust calls to push_nested_class.
5005         * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
5006         (check_classfn): Use push_scope/pop_scope around type comparisions.
5007         (grokoptypename): Remove.
5008         (push_sscope): Adjust call to push_nested_class.
5009         * error.c (dump_type): Show cv-qualification of typename types.
5010         * init.c (build_member_call): Use build_new_op, not
5011         build_opfncall.
5012         * method.c (build_opfncall): Remove.
5013         * parser.c (cp_parser): Add allow_non_constant_expression_p and
5014         non_constant_expression_p.
5015         (cp_parser_constant_expression): Adjust prototype.
5016         (cp_parser_resolve_typename_type): Remove.
5017         (cp_parser_non_constant_expression): New function.
5018         (cp_parser_non_constant_id_expression): Likewise.
5019         (cp_parser_new): Set allow_non_constant_expression_p and
5020         non_constant_expression_p.
5021         (cp_parser_primary_expression): Reject `this' and `va_arg' in
5022         constant-expressions.  Note that dependent names aren't really
5023         constant.
5024         (cp_parser_postfix_expression): Reject conversions to non-integral
5025         types in constant-expressions.  Neither are increments or
5026         decrements.
5027         (cp_parser_unary_expression): Reject increments and decrements in
5028         constant-expressions.
5029         (cp_parser_direct_new_declarator): Adjust call to
5030         cp_parser_constant_expression.
5031         (cp_parser_cast_expression): Reject conversions to non-integral
5032         types in constant-expressions.
5033         (cp_parser_assignment_expression): Rejects assignments in
5034         constant-expressions.
5035         (cp_parser_expression): Reject commas in constant-expressions.
5036         (cp_parser_labeled_statement): Adjust call to
5037         cp_parser_constant_expression.
5038         (cp_parser_direct_declarator): Simplify array bounds, even in
5039         templates, when they are non-dependent.  Use
5040         resolve_typename_type, not cp_parser_resolve_typename_type.
5041         (cp_parser_class_head): Use resolve_typename_type, not
5042         cp_parser_resolve_typename_type.
5043         (cp_parser_member_declaration): Adjust call to
5044         cp_parser_constant_expression.
5045         (cp_parser_constant_initializer): Likewise.
5046         (cp_parser_constructor_declarator): Use resolve_typename_type, not
5047         cp_parser_resolve_typename_type.
5048         (cp_parser_late_parsing_default_args): Adjust call to
5049         push_nested_class.
5050         * pt.c (tsubst): Give it internal linkage.
5051         (tsubst_expr): Likewise.
5052         (tsubst_copy): Likewise.
5053         (tsubst_copy_and_build): Likewise.
5054         (push_access_scope_real): Likewise.
5055         (tsubst_friend_class): Likewise.
5056         (instantiate_class_template): Adjust call to pushclass.
5057         (value_dependent_expression_p): Give it external linkage.
5058         Robustify.
5059         (resolve_typename_type): New function.
5060         * semantics.c (finish_call_expr): Use build_new_op, not
5061         build_opfncall.
5062         (begin_constructor_declarator): Remove.
5063         (begin_class_definition): Adjust call to pushclass.
5064         (enter_scope_of): Remove.
5065         * typeck.c (comptypes): Resolve typename types as appropriate.
5066         (build_x_indirect_ref): Use build_new_op, not build_opfncall.
5067         (build_x_compound_expr): Likewise.
5068         (build_modify_expr): Likewise.
5069         (build_x_modify_expr): Likewise.
5070         * typeck2.c (build_x_arrow): Likewise.
5072 2003-01-29  Fariborz Jahanian  <fjahanian@apple.com>
5074         * pt.c (last_pending_template) Declare GTY().
5076 2003-01-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5078         PR c++/8591
5079         * parser.c (cp_parser_elaborated_type_specifier): Convert
5080         TEMPLATE_DECL to TYPE_DECL only when processing template friends.
5081         (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
5083 2003-01-28  Nathan Sidwell  <nathan@codesourcery.com>
5085         PR c++/9437
5086         * pt.c (unify): Don't unify '*T' with 'U C::*'.
5088         PR c++/3902
5089         * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
5090         inside a declarator.
5092 2003-01-27  Nathan Sidwell  <nathan@codesourcery.com>
5094         * class.c (update_vtable_entry_for_fn): Add index parameter.
5095         Generate vcall thunk for covariant overriding from a virtual
5096         primary base.
5097         (dfs_modify_vtables): Adjust.
5099 2003-01-25  Nathan Sidwell  <nathan@codesourcery.com>
5101         PR c++/9403
5102         * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
5103         template keyword.
5104         (cp_parser_base_specifier): Look for and consume a
5105         TEMPLATE keyword. Replace switch with array index.
5107         PR c++/795
5108         * semantics.c (finish_non_static_data_member): Remember the
5109         field's type even in a template.
5111         PR c++/9415
5112         * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
5113         already scoped.
5115         PR c++/8545
5116         * parser.c (cp_parser_cast_expression): Be more tentative.
5118 2003-01-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5120         * cp-tree.h (flagged_type_tree_s): Remove.
5121         (check_for_new_type): Likewise.
5122         * typeck2.c (check_for_new_type): Likewise.
5124 2003-01-23  Nathanael Nerode  <neroden@gcc.gnu.org>
5126         * dump.c: ANSIfy function declarations and definitions.
5128         * cp-tree.h, decl.h: Get rid of PARAMS.  Again.
5130 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
5132         PR c++/9354
5133         * init.c (build_new): Set the type of the new-expression, even
5134         when processing_templte_decl.
5136         PR c++/9216
5137         * parser.c (cp_parser_primary_expression): Improve error message
5138         for templates used in an expression context.
5140         PR c++/8696
5141         * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
5142         parse when encountering "typedef".
5144 2003-01-22  Nathanael Nerode  <neroden@gcc.gnu.org>
5146         * class.c, parser.c: ANSIfy function definitions and declarations.
5148 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
5150         PR c++/9328
5151         * error.c (dump_decl): For an OVERLOAD, just print the name of the
5152         function; it doesn't make sense to try to print its type.
5153         * semantics.c (finish_typeof): Issue errors about invalid uses.
5155         PR c++/9298
5156         * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
5157         function.
5158         (cp_parser_expression_statement): Use it.
5159         (cp_parser_explicit_instantiation): Likewise.
5160         * pt.c (do_decl_instantiation): Improve error handling logic.
5162 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
5164         PR c++/9384
5165         * parser.c (cp_parser_using_declaration): Issue error messages
5166         about name resolution failures here.
5168         PR c++/9388
5169         * class.c (currently_open_derived_class): Use dependent_type_p.
5170         * cp-tree.h (dependent_type_p): New function.
5171         (dependent_template_arg_p): Likewise.
5172         (dependent_template_p): Likewise.
5173         (type_dependent_expression_p): Likewise.
5174         * parser.c (cp_parser_dependent_type_p): Remove.
5175         (cp_parser_value_dependent_type_p): Likewise.
5176         (cp_parser_type_dependent_expression_p): Likewise.
5177         (cp_parser_dependent_template_arg_p): Likewise.
5178         (cp_parser_dependent_template_id_p): Likewise.
5179         (cp_parser_dependent_template_p): Likewise.
5180         (cp_parser_diagnose_invalid_type_name): Replace
5181         cp_parser_dependent_type_p with dependent_type_p, etc.
5182         (cp_parser_primary_expresion): Likewise.
5183         (cp_parser_nested_name_specifier_opt): Likewise.
5184         (cp_parser_postfix_expression): Likewise.
5185         (cp_parser_unary_expression): Likewise.
5186         (cp_parser_template_name): Likewise.
5187         (cp_parser_class_name): Likewise.
5188         (cp_parser_lookup_name): Likewise.
5189         * pt.c (dependent_type_p): New function.
5190         (value_dependent_expression_p): Likewise.
5191         (type_dependent_expression_p): Likewise.
5192         (dependent_template_arg_p): Likewise.
5193         (dependent_template_id_p): Likewise.
5194         (dependent_template_p): Likewise.
5196         PR c++/9285
5197         PR c++/9294
5198         * parser.c (cp_parser_simple_declaration): Return quickly when
5199         encountering errors.
5201 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5203         Make-lang.in (cp/decl.o-warn): Add -Wno-error.
5205 2003-01-17  Jason Merrill  <jason@redhat.com>
5207         PR c++/9167, c++/9358
5208         * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
5210 2003-01-17  Jason Merrill  <jason@redhat.com>
5212         PR c++/9342
5213         * call.c (build_conditional_expr): Always do lvalue-rvalue
5214         conversion.
5216 2003-01-17  Mark Mitchell  <mark@codesourcery.com>
5218         PR c++/9294
5219         * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
5220         * cp-tree.h (BASELINK_BINFO): Adjust.
5221         (BASELINK_FUNCTIONS): Likewise.
5222         (BASELINK_ACCESS_BINFO): Likewise.
5223         (tree_baselink): New structure.
5224         (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
5225         (lang_tree_node): Add baselink.
5226         * decl.c (cp_tree_node_structure): Add BASELINK case.
5227         * search.c (build_baselink): Adjust.
5228         * tree.c (cp_walk_subtrees): Add BASELINK case.  Remove BASELINK_P
5229         test from TREE_LIST case.
5231         PR c++/9272
5232         * parser.c (cp_parser_constructor_declarator_p): Do not assume
5233         that a constructor cannot be declared outside of its own class.
5235         * parser.c (cp_parser_resolve_typename_type): If the scope cannot
5236         be resolved, neither can the qualified name.
5238         * rtti.c (get_pseudo_ti_desc): Fix thinko.
5240 2003-01-16  Jason Merrill  <jason@redhat.com>
5242         PR c++/8564
5243         * init.c (build_vec_init): Re-add maxindex parm.
5244         (perform_member_init, build_aggr_init): Pass it.
5245         (build_new_1): Pass it. Use an incomplete array type for full_type.
5246         * typeck.c (build_modify_expr): Pass it.
5247         * cp-tree.h: Adjust.
5249 2003-01-16  Jeffrey D. Oldham  <oldham@codesourcery.com>
5251         * cp-tree.h (tsubst_copy_and_build): New declaration.
5252         * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
5253         (tsubst_expr): Use 'tsubst_copy_and_build'.  Update initial comment.
5254         (tsubst_copy_and_build): New function.
5256 2003-01-16  Mark Mitchell  <mark@codesourcery.com>
5258         * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
5259         (PARTIAL_INSTANTIATION_P): Remove.
5260         (IMPLICIT_TYPENAME_P): Likewise.
5261         (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
5262         (build_typename_type): Remove declaration.
5263         (parmlist_is_exprlist): Likewise.
5264         * decl.c (build_typename_type): Make it static, remove third
5265         parameter.
5266         (push_class_binding): Don't do implicit typename stuff.
5267         (make_typename_type): Likewise.
5268         (lookup_name_real): Likewise.
5269         (grokdeclarator): Don't try to convert declarations into
5270         initializations.  Don't do implicit typename stuff.
5271         (parmlist_is_exprlist): Remove.
5272         (xref_basetypes): Simplify.
5273         * decl2.c (grokfield): Don't try to convert declarations into
5274         initializations.
5275         (build_anon_union_vars): Do this while processing templates, too.
5276         (finish_anon_union): Likewise.
5277         * error.c (dump_type): Remove implicit typename handling.
5278         * parser.c (cp_parser_diagnose_invalid_type_name): New method.
5279         (cp_parser_primary_expression): Correct handling of names not
5280         found by unqualified name lookup in templates.
5281         (cp_parser_nested_name_specifier_opt): Avoid checking dependency
5282         of types when possible.
5283         (cp_parser_simple_declaration): Complain intelligently about some
5284         invalid declarations.
5285         (cp_parser_member_declaration): Likewise.
5286         (cp_parser_constructor_declarator_p): Don't check when we're in a
5287         function scope.
5288         * pt.c (instantiate_class_template): Remove
5289         PARTIAL_INSTANTIATION_P gunk.
5290         * search.c (lookup_field_r): Don't build implicit typenames.
5291         (marked_pushdecls_p): Don't enter dependent base types.
5292         (unmarked_pushdecls_p): Likewise.
5293         * semantics.c (begin_class_definition): Remove implicit typename
5294         stuff.
5296 2003-01-16  Nathan Sidwell  <nathan@codesourcery.com>
5298         PR c++/9212
5299         * parser.c (cp_parser_direct_declarator): If accepting either
5300         abstract or named, the name must be an unqualified-id.
5302 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5304         * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
5306 2003-01-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5308         * decl2.c (check_classfn): Fix uninitialized warning.
5309         (build_anon_union_vars): Likewise.
5310         * pt.c (tsubst_copy): Likewise.
5312 2003-01-14  Jeffrey D. Oldham  <oldham@codesourcery.com>
5314         Further conform g++'s __vmi_class_type_info to the C++ ABI
5315         specification.
5316         * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
5317         the specification.
5318         (class_hint_flags): Likewise.
5320 2003-01-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5322         * config-lang.in: Add semantics.c to gtfiles.
5323         * cp-tree.h (flagged_type_tree_s): Remove lookups field.
5324         (saved_scope): Likewise.
5325         (type_lookups): Remove.
5326         (deferred_access): New structure.
5327         (type_access_control): Remove.
5328         (save_type_access_control): Likewise.
5329         (reset_type_access_control): Likewise.
5330         (decl_type_access_control): Likewise.
5331         (push_deferring_access_checks): Declare.
5332         (resume_deferring_access_checks): Likewise.
5333         (stop_deferring_access_checks): Likewise.
5334         (pop_deferring_access_checks): Likewise.
5335         (get_deferred_access_checks): Likewise.
5336         (pop_to_parent_deferring_access_checks): Likewise.
5337         (perform_deferred_access_checks): Likewise.
5338         (perform_or_defer_access_check): Likewise.
5339         * decl.c (make_typename_type): Use perform_or_defer_access_check.
5340         (make_unbound_class_template): Likewise.
5341         (grokdeclarator): Don't call decl_type_access_control.
5342         * parser.c (cp_parser_context): Remove deferred_access_checks
5343         and deferring_access_checks_p fields.
5344         (cp_parser_context_new): Adjust.
5345         (cp_parser): Remove access_checks_lists.
5346         (cp_parser_defer_access_check): Remove.
5347         (cp_parser_start_deferring_access_checks): Remove.
5348         (cp_parser_stop_deferring_access_checks): Remove.
5349         (cp_parser_perform_deferred_access_checks): Remove.
5350         (cp_parser_nested_name_specifier_opt): Use new deferred access
5351         functions.
5352         (cp_parser_simple_declaration): Likewise.
5353         (cp_parser_template_id): Likewise.
5354         (cp_parser_function_definition): Likewise.
5355         (cp_parser_class_specifier): Likewise.
5356         (cp_parser_lookup_name): Likewise.
5357         (cp_parser_single_declaration): Likewise.
5358         (cp_parser_pre_parsed_nested_name_specifier): Likewise.
5359         (cp_parser_parse_tentatively): Likewise.
5360         (cp_parser_parse_definitely): Likewise.
5361         (yyparse): Likewise.
5362         (cp_parser_init_declarator): Remove access_checks parameter.
5363         Use new deferred access functions.
5364         (cp_parser_function_definition_from_specifiers_and_declarator):
5365         Likewise.
5366         (cp_parser_class_head): Remove deferring_access_checks_p and
5367         saved_access_checks parameters.  Use new deferred access functions.
5368         (cp_parser_member_specification_opt): Don't call
5369         reset_type_access_control.
5370         * search.c (type_access_control): Remove.
5371         * semantics.c: Include "gt-cp-semantics.h".
5372         (deferred_type_access_control): Remove.
5373         (deferred_access_stack): New variable.
5374         (deferred_access_free_list): Likewise.
5375         (push_deferring_access_checks): New function.
5376         (resume_deferring_access_checks): Likewise.
5377         (stop_deferring_access_checks): Likewise.
5378         (pop_deferring_access_checks): Likewise.
5379         (get_deferred_access_checks): Likewise.
5380         (pop_to_parent_deferring_access_checks): Likewise.
5381         (perform_deferred_access_checks): New function, adapted from
5382         cp_parser_perform_deferred_access_checks.
5383         (perform_or_defer_access_check): New function, adapted from
5384         cp_parser_defer_access_check.
5385         (current_type_lookups): Remove.
5386         (deferred_type_access_control): Likewise.
5387         (decl_type_access_control): Likewise.
5388         (save_type_access_control): Likewise.
5389         (reset_type_access_control): Likewise.
5390         (begin_function_definition): Adjust.
5391         (begin_class_definiton): Likewise.
5393 2003-01-13  Jason Merrill  <jason@redhat.com>
5395         PR c++/8748
5396         * class.c (build_base_path): Take the address before calling save_expr.
5398         * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
5399         all the ambiguous conversions are bad.
5401         * class.c (maybe_warn_about_overly_private_class): Don't stop
5402         searching when we find a nonprivate method.
5404         * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
5406 2003-01-12  Mark Mitchell  <mark@codesourcery.com>
5408         * cp-tree.h (get_arglist_len_in_bytes): Remove.
5410         PR c++/9264
5411         * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
5412         typeame types more robustly.
5414 2003-01-11  Phil Edwards  <pme@gcc.gnu.org>
5416         * parser.c:  Fix comment typos.
5418 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
5420         PR c++/9099
5421         * parser.c (cp_parser_scope_through_which_access_occurs): Handle
5422         an object_type which is not a class type.
5424 2003-01-10  Geoffrey Keating  <geoffk@apple.com>
5426         * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
5427         (cp_parser_late_parsing_default_args): Likewise.
5429 2003-01-10  Nathanael Nerode  <neroden@gcc.gnu.org>
5431         * cfns.gperf: ANSIfy function declarations.
5432         * cfns.h: Regenerate.
5433         * cp-tree.h: ANSIfy function declarations.
5435 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
5437         * cp-tree.h (reparse_absdcl_as_expr): Remove.
5438         (reparse_absdcl_as_casts): Likewise.
5439         (reparse_decl_as_expr): Likewise.
5440         (finish_decl_parsing): Likewise.
5441         * decl2.c (reparse_absdcl_as_expr): Remove.
5442         (reparse_absdcl_as_casts): Likewise.
5443         (repase_decl_as_expr): Likewise.
5444         (finish_decl_parsing): Likewise.
5446         PR c++/9128
5447         PR c++/9153
5448         PR c++/9171
5449         * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
5450         function.
5451         (cp_parser_nested_name_specifier_opt): Correct the
5452         check_dependency_p false.
5453         (cp_parser_postfix_expression): Fix formatting.
5454         (cp_parser_decl_specifier_seq): Avoid looking for constructor
5455         declarators when possible.
5456         (cp_parser_template_id): Avoid performing name-lookup when
5457         possible.
5458         (cp_parser_class_head): Do not count specializations when counting
5459         levels of templates.
5460         (cp_parser_constructor_declarator_p): Return immediately if
5461         there's no chance that the tokens form a constructor declarator.
5462         * rtti.c (throw_bad_typeid): Add comment.  Do not return an
5463         expression with reference type.
5464         (get_tinfo_decl_dynamic): Do not return an expression with
5465         reference type.
5466         (build_typeid): Add comment.  Do not return an expression with
5467         reference type.
5468         * typeck.c (build_class_member_access_expr): Improve handling of
5469         conditionals and comma-expressions as objects.
5471 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
5473         * cfns.gperf: ANSIfy function declarations.
5474         * cfns.h: Regenerate.
5475         * cp-tree.h: ANSIfy function declarations.
5476         * parser.c: ANSIfy function declarations & definitions.
5478         * decl.c (bad_specifiers): Fix parameter order error I introduced.
5480 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
5482         Merge from pch-branch:
5484         2003-01-09  Geoffrey Keating  <geoffk@apple.com>
5486         Merge to tag pch-merge-20030102:
5488         * semantics.c (finish_translation_unit): Don't call finish_file.
5489         * parser.c: Don't include ggc.h.
5490         (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
5491         read first token here.  Don't allow PCH files after the first
5492         token is read.
5493         (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
5494         (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
5495         (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
5496         (cp_parser_late_parsing_for_member): Don't duplicate call to
5497         cp_lexer_set_source_position_from_token.
5498         (cp_parser_late_parsing_default_args): Likewise.
5499         (yyparse): Call finish_file after clearing the_parser.
5501         2002-12-11  Geoffrey Keating  <geoffk@apple.com>
5503         * Make-lang.in: Remove $(GGC_H) from all dependencies.
5504         (CXX_TREE_H): Add $(GGC_H).
5505         * class.c: Don't include ggc.h.
5506         (field_decl_cmp): Make parameters be 'const void *' to match qsort.
5507         (method_name_cmp): Likewise.
5508         (resort_data): New variable.
5509         (resort_field_decl_cmp): New.
5510         (resort_method_name_cmp): New.
5511         (resort_sorted_fields): New.
5512         (resort_type_method_vec): New.
5513         (finish_struct_methods): Delete cast.
5514         (finish_struct_1): Delete cast.
5515         * cp-tree.h: Include ggc.h.
5516         (struct lang_type_class): Add reorder attribute to field `methods'.
5517         (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
5518         (resort_sorted_fields): New prototype.
5519         (resort_type_method_vec): New prototype.
5520         * call.c: Don't include ggc.h.
5521         * decl.c: Likewise.
5522         * decl2.c: Likewise.
5523         * init.c: Likewise.
5524         * lex.c: Likewise.
5525         * method.c: Likewise.
5526         * optimize.c: Likewise.
5527         * parse.y: Likewise.
5528         * pt.c: Likewise.
5529         * repo.c: Likewise.
5530         * search.c: Likewise.
5531         * semantics.c: Likewise.
5532         * spew.c: Likewise.
5533         * tree.c: Likewise.
5535         * lang-specs.h: Remove comment.
5537         2002-12-03  Geoffrey Keating  <geoffk@apple.com>
5539         * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
5540         (operator_name_info): Mark to be saved for PCH, specify size.
5541         (assignment_operator_name_info): Likewise.
5543         2002-11-19  Geoffrey Keating  <geoffk@apple.com>
5545         * decl.c (anon_cnt): Mark to be saved for PCH.
5547         2002-10-25  Geoffrey Keating  <geoffk@apple.com>
5549         * lex.c  (init_reswords): Delete now-untrue comment.
5550         Allocate ridpointers using GGC.
5552         2002-10-04  Geoffrey Keating  <geoffk@apple.com>
5554         * cp-tree.h (union lang_decl_u2): Add tags to all fields.
5556         * g++spec.c (lang_specific_driver): Don't include standard
5557         libraries in `added'.
5559         2002-08-27  Geoffrey Keating  <geoffk@redhat.com>
5561         * decl2.c (finish_file): Call c_common_write_pch.
5562         * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
5564         2002-08-17  Geoffrey Keating  <geoffk@redhat.com>
5566         * g++spec.c (lang_specific_driver): Treat .h files as C++ header
5567         files when using g++.
5568         * lang-specs.h: Handle compiling C++ header files.
5570 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
5572         * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
5574 2003-01-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5576         * pt.c (push_access_scope_real): Call push_to_top_level for
5577         function in namespace scope.
5578         (pop_access_scope): Call pop_from_top_level for function in
5579         namespace scope.
5581 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
5583         * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
5585 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
5587         * Make-lang.in (c++.install-common, c++.install-man,
5588         c++.uninstall): Prepend $(DESTDIR) to destination paths in
5589         all (un)installation commands.
5590         (c++.install-common): Rewrite $(LN) commands to support
5591         DESTDIR with "ln" as well as with "ln -s".
5593 2003-01-08  Jason Merrill  <jason@redhat.com>
5595         * parser.c (cp_parser_primary_expression): See through explicitly
5596         scoped ALIAS_DECLs, too.
5598 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
5600         * decl.c: Remove some #if 0 code.
5602         * decl.c: ANSIfy function declarations.
5604 2003-01-07  Mark Mitchell  <mark@codesourcery.com>
5606         * parser.c (cp_parser_asm_definition): Correct handling of omitted
5607         operands.
5609 2003-01-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5611         PR c++/9030
5612         * decl.c (make_typename_type): Check access only when tf_error.
5613         (make_unbound_class_template): Likewise.
5614         * pt.c (saved_access_scope): New variable.
5615         (push_access_scope_real): New function.
5616         (push_access_scope): Likewise.
5617         (pop_access_scope): Likewise.
5618         (tsubst_default_argument): Use them.
5619         (instantiate_template): Likewise.
5620         (regenerate_decl_from_template): Likewise.
5621         (instantiate_decl): Likewise.
5622         (get_mostly_instantiated_function_type): Likewise.
5624 2003-01-07  Nathanael Nerode <neroden@gcc.gnu.org>
5626         * tree.c: Delete bogus #if 0 code.
5628 2003-01-07  Andreas Schwab  <schwab@suse.de>
5630         * class.c (layout_class_type): Don't use
5631         PCC_BITFIELD_TYPE_MATTERS if not defined.
5633 2003-01-06  Mark Mitchell  <mark@codesourcery.com>
5635         PR c++/9165
5636         * decl2.c (build_cleanup): Mark the object as used.
5638         * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
5639         (hash_local_specialization): New function.
5640         (register_local_specialization): Revert 2003-01-05 change.
5641         (instantiate_decl): Use hash_local_specialization when creating
5642         the local_specializations table.
5644         * decl2.c (mark_used): Do not synthesize thunks.
5646         * class.c (layout_class_type): Correct handling of unnamed
5647         bitfields wider than their types.
5649         PR c++/9189
5650         * parser.c (cp_parser): Remove default_arg_types.  Update
5651         documentation for unparsed_functions_queues.
5652         (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
5653         parameter.
5654         (cp_parser_new): Don't set parser->default_arg_types.
5655         (cp_parser_function_definition): Adjust usage of
5656         unparsed_funtions_queues.
5657         (cp_parser_class_specifier): Don't mess with
5658         parser->default_arg_types.  Handle default argument processing in
5659         a separate phase from function body processing.
5660         (cp_parser_template_declaration_after_export): Adjust usage of
5661         unparsed_functions_queues.
5662         (cp_parser_late_parsing_for_member): Do not handle default
5663         arguments.
5665 2003-01-06  Nathan Sidwell  <nathan@codesourcery.com>
5667         PR c++/9109
5668         * parser.c (cp_parser_declarator_kind): New enum.
5669         (cp_parser_declarator): Adjust.
5670         (cp_parser_direct_declarator): Adjust. Allow for either named or
5671         abstract declarator. Prefer abstract, if possible. Allow
5672         parenthesized function name.
5673         (cp_parser_condition): Adjust cp_parser_declarator call.
5674         (cp_parser_explicit_instantiation): Likewise.
5675         (cp_parser_init_declarator): Likewise.
5676         (cp_parser_type_id): Likewise.
5677         (cp_parser_function_definition): Likewise.
5678         (cp_parser_member_declaration): Likewise.
5679         (cp_parser_parameter_declaration): Use cp_parser_declarator to do
5680         the tentative parsing.
5681         (cp_parser_exception_declaration): Likewise.
5683 2003-01-05  Mark Mitchell  <mark@codesourcery.com>
5685         * parser.c (cp_parser_template_parameter): Adjust call to
5686         cp_parser_parameter_declaration.
5687         (cp_parser_parameter_declaration_list): Likewise.
5688         (cp_parser_parameter_declaration): Replace
5689         greater_than_is_operator_p with template_parm_p parameter.  Do not
5690         cache tokens for template default arguments.
5692         * pt.c (retrieve_local_specialization): Use htab_find, not
5693         htab_find_with_hash.
5694         (register_local_specialization): Use htab_find_slot, not
5695         htab_find_slot_with_hash.
5696         (instantiate_decl): Pass a hash function to htab_create.
5698 2003-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5700         * parser.c (cp_parser_binary_expression,
5701         cp_parser_multiplicative_expression,
5702         cp_parser_additive_expression, cp_parser_shift_expression,
5703         cp_parser_relational_expression, cp_parser_equality_expression,
5704         cp_parser_and_expression, cp_parser_exclusive_or_expression,
5705         cp_parser_inclusive_or_expression,
5706         cp_parser_logical_and_expression, cp_parser_logical_or_expression,
5707         cp_parser_binary_expression): Const-ify.
5709 2003-01-04  Mark Mitchell  <mark@codesourcery.com>
5711         * method.c (use_thunk): Disable access control while building the
5712         body of the thunk.
5714 2003-01-03  Nathanael Nerode  <neroden@gcc.gnu.org>
5716         * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
5717         front end.
5719 2003-01-03  Matt Austern  <austern@apple.com>
5721         * cp-tree.h (struct lang_type_class): add field for key method
5722         (cp_global_trees): rename dynamic_classes to keyed_classes
5723         (key_method): add definition
5724         * class.c (finish_struct_1): compute class's key method, and add
5725         the class to keyed_classes list if there is no key method.
5726         * decl.c (finish_function): add class to keyed_classes list if we
5727         see a definition of the class's key method.
5728         * pt.c (instantiate_class_template): add template specialization
5729         of a dynamic class to keyed_classes list.
5730         * decl2.c (key_method): remove
5731         (finish_file): iterate only through keyed_classes list when
5732         deciding whether to emit vtables, remove class from its list after
5733         we do the emission.
5735 2003-01-02  Jason Merrill  <jason@redhat.com>
5737         * call.c (build_conditional_expr): Stabilize lvalues properly.
5738         * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
5739         * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
5740         Don't allow CALL_EXPR or VA_ARG_EXPR, either.
5742         * call.c (convert_like_real): Call decl_constant_value for an
5743         IDENTITY_CONV even if there are no more conversions.
5745         * cvt.c (build_up_reference): Don't push unnamed temps.
5747         * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
5749         * dump.c (cp_dump_tree): Don't try to dump class-specific fields
5750         for a backend struct.
5752         * except.c (wrap_cleanups_r, build_throw): Make
5753         MUST_NOT_THROW_EXPRs void.
5754         * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
5756         * init.c (build_vec_delete_1): Pre-evaluate the base address.
5758         * init.c (get_temp_regvar): Simplify logic.
5760         * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
5761         our replacement is a decl.
5763         * decl.c (cp_make_fname_decl): Push the decls inside the
5764         outermost scope.
5766 2003-01-03  Nathan Sidwell  <nathan@codesourcery.com>
5768         PR c++/45, c++/3784
5769         * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
5770         the same too.
5772 2003-01-03  Graham Stott  <graham.stott@btinternet.com>
5774         * parser.c (struct cp_parser): Add access_checks_lists field
5775         (cp_parser_simple_declaration): Use.
5776         (cp_parser_init_declarator): Likewise.
5778 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
5780         * parser.c (cp_parser_declaration): Accept the __extension__
5781         keyword before the declaration.
5783         PR c++/2843
5784         * parser.c (cp_parser_parameter_declaration): Allow attributes to
5785         appear after the declarator.
5787         * call.c (build_new_method_call): Fix typo in message format
5788         string.
5790 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
5792         * parser.c (cp_lexer_next_token_is): Declare it inline.
5793         (cp_lexer_set_source_position_from_token): Likewise.
5794         (cp_lexer_debugging_p): Likewise.
5795         (cp_parser_parsing_tentatively): Likewise.
5796         (cp_parser_nested_name_specifier_opt): Reduce the number of calls
5797         to the cp_lexer_peek_token.
5799         * parser.c (cp_parser_sizeof_operand): Do not evaluate the
5800         expression.
5802 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
5804         * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
5805         cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
5806         cp/repo.c: Fix copyright years.
5808 2003-01-01  Neil Booth  <neil@daikokuya.co.uk>
5810         * lex.c: Remove superfluous include of cpplib.h.
5811         (CONSTRAINT): Define without conditions.
5812         (init_cp_pragma): Use c_register_pragma.
5814 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
5816         * .cvsignore: Remove.
5818 2002-12-31  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5820         * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
5821           except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
5822           lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
5823           pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
5824           typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
5825           copyright header.
5826         * lex.h: parse.y is dead, so don't mention it.  Also replace the
5827           copyright header with the default GNU copyright header.
5829 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
5831         * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
5832         (lookup_name_namespace_only): Likewise.
5833         (begin_only_namespace_names): Likewise.
5834         (end_only_namespace_names): Likewise.
5835         * decl.c (only_namespace_names): Remove.
5836         (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
5837         (lookup_name_real): Do not check only_namespace_names.
5838         (lookup_name_namespace_only): Remove.
5839         (begin_only_namespace_names): Likewise.
5840         (end_only_namespace_names): Likewise.
5841         * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
5842         nested-name-specifiers more gracefully.
5843         (cp_parser_class_or_namespace_name): Avoid looking up namespace
5844         names when they cannot possibly appear.
5845         (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
5846         (cp_parser_elaborated_type_specifier): Likewise.
5847         (cp_parser_namespace_name): Only look for namespace names.
5848         (cp_parser_lookup_name): Add is_namespace parameter.
5849         (cp_parser_lookup_name_simple): Adjust call to
5850         cp_parser_lookup_name.
5852         * parser.c (cp_parser_dependent_type_p): Fix thinko.
5854 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
5856         * .cvsignore: Update.
5858 2002-12-31  Nathan Sidwell  <nathan@codesourcery.com>
5860         * class.c (modify_vtable_entry): Remove unused variable.
5861         (get_vcall_index): Always expect a non-thunk.
5862         (update_vtable_entry_for_fn): Combine covariant adjustments, when
5863         overriding a thunk. Pass get_vcall_index a non-thunk.
5865         * decl2.c (finish_file): Mark undefined inlines as extern.
5867 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
5869         * cp-tree.def (RETURN_INIT): Remove.
5870         * cp-tree.h (DECL_IN_MEMORY_P): Remove.
5871         (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
5872         (note_level_for_for): Remove.
5873         (note_level_for_try): Likewise.
5874         (note_level_for_catch): Likewise.
5875         (finish_named_return_value): Likewise.
5876         (do_pushlevel): Change prototype.
5877         (pending_lang_change): Remove.
5878         * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
5879         sk_for.
5880         (note_level_for_for): Remove.
5881         (note_level_for_try): Likewise.
5882         (note_level_for_catch): Likewise.
5883         (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
5884         * parser.c (cp_parser_context_free_list): Make it "deletable".
5885         (cp_parser_template_argument): Remove misleading comment.
5886         * pt.c (tsubst_expr): Remove RETURN_INIT code.
5887         * semantics.c (genrtl_named_return_value): Remove.
5888         (do_pushlevel): Take a scope kind as an argument.
5889         (begin_if_stmt): Adjust.
5890         (begin_while_stmt): Likewise.
5891         (begin_for_stmt): Likewise.
5892         (finish_for_init_stmt): Likewise.
5893         (begin_switch_stmt): Likewise.
5894         (begin_handler): Likewise.
5895         (begin_compound_stmt): Likewise.
5896         (finish_named_return_value): Remove.
5897         (cp_expand_stmt): Remove RETURN_INIT case.
5898         * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
5900 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
5902         PR c++/9112
5903         * parser.c (cp_parser_direct_declarator): Handle erroneous
5904         parenthesized declarators correctly.
5906 2002-12-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5908         * cp-tree.h (pending_lang_change): Declare.
5910 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
5912         * parser.c (cp_parser_context_free_list): New variable.
5913         (cp_parser_context_new): Use it.
5914         (cp_parser_error): Check return code from
5915         cp_parser_simulate_error.
5916         (cp_parser_simulate_error): Return a value.
5917         (cp_parser_id_expression): Optimize common case.
5918         (cp_parser_class_name): Likewise.
5919         (cp_parser_class_specifier): Adjust call to
5920         cp_parser_late_parsing_default_args.
5921         (cp_parser_lookup_name): Optimize common case.
5922         (cp_parser_late_parsing_for_member): Adjust call to
5923         cp_parser_late_parsing_default_args.
5924         (cp_parser_late_parsing_default_args): Add scope parameter.
5925         (cp_parser_require): Avoid creating the error message unless it's
5926         needed.
5927         (cp_parser_parse_definitely): Place free'd contexts on the free
5928         list.
5930         * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
5932 2002-12-30  David Edelsohn  <edelsohn@gnu.org>
5934         * parser.c (cp_parser_parameter_declaration_clause): Treat system
5935         header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
5937 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
5939         * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
5940         GCC, not GNU CC.
5942 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
5944         * parse.y: Remove.
5945         * spew.c: Likewise.
5946         * Make-lang.in (gt-cp-spew.h): Remove.
5947         * cp-tree.h (do_pending_lang_change): Remove.
5948         (do_identifier): Change prototype.
5949         (finish_id_expr): Remove.
5950         * decl.c (lookup_name_real): Remove yylex variable.
5951         * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
5952         * lex.c (init_cpp_parse): Remove.
5953         (reduce_cmp): Likewise.
5954         (token_cmp): Likewise.
5955         (yychar): Likewise.
5956         (lastiddecl): Likewise.
5957         (token_count): Likewise.
5958         (reduce_count): Likewise.
5959         (yyhook): Likewise.
5960         (print_parse_statistics): Likewise.
5961         (do_pending_lang_change): Likewise.
5962         (do_identifier): Remove parsing parameter.
5963         * lex.h (lastiddecl): Remove.
5964         (looking_for_typename): Remove.
5965         (looking_for_template): Likewise.
5966         (pending_lang_change): Likewise.
5967         (yylex): Likewise.
5968         * semantics.c (finish_id_expr): Remove.
5970         * decl.c (grokdeclarator): Diagnost "extern thread" and "static
5971         thread" correctly.
5973 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
5975         * decl.c, decl2.c, decl.h:  GCC, not GNU CC.  This is the C++ front
5976         end, not the C front end.
5978 2002-12-30  Nathan Sidwell  <nathan@codesourcery.com>
5980         * cp-tree.h (THUNK_TARGET): New macro.
5981         (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
5982         (finish_thunk): Remove offset parms.
5983         * class.c (find_final_overrider): Look through thunks.
5984         (get_vcall_index): Use THUNK_TARGET.
5985         (update_vtable_entry_for_fn): Look through thunks. Set covariant
5986         fixed offset here. Adjust finish_thunk call.
5987         (build_vtbl_initializer): Adjust finish_thunk calls.
5988         * mangle.c (mangle_call_offset): Remove superfluous if.
5989         (mangle_thunk): Adjust.
5990         * method.c (make_thunk): Adjust.
5991         (finish_thunk): Adjust.
5992         (thunk_adjust): Remove assert.
5993         (use_thunk): Use THUNK_TARGET
5994         * dump1.c (cp_dump_tree): Adjust thunk dumping.
5996         PR c++/9054
5997         * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
5998         * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
6000 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6002         Remove traditional C constructs 4/n.
6003         * decl2.c (grok_method_quals, warn_if_unknown_interface,
6004         grok_x_components, cp_build_parm_decl, build_artificial_parm,
6005         maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
6006         delete_sanity, check_member_template, check_java_method,
6007         check_classfn, finish_static_data_member_decl, grokfield,
6008         grokbitfield, grokoptypename, grok_function_init,
6009         cplus_decl_attributes, constructor_name, defer_fn,
6010         build_anon_union_vars, finish_anon_union, coerce_new_type,
6011         coerce_delete_type, comdat_linkage, maybe_make_one_only,
6012         key_method, import_export_vtable, import_export_class,
6013         output_vtable_inherit, import_export_decl, import_export_tinfo,
6014         build_cleanup, get_guard, get_guard_bits, get_guard_cond,
6015         set_guard, start_objects, finish_objects,
6016         start_static_storage_duration_function,
6017         finish_static_storage_duration_function, get_priority_info,
6018         start_static_initialization_or_destruction,
6019         finish_static_initialization_or_destruction,
6020         do_static_initialization, do_static_destruction,
6021         prune_vars_needing_no_initialization, write_out_vars,
6022         reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
6023         add_using_namespace, merge_functions, ambiguous_decl,
6024         lookup_using_namespace, lookup_using_namespace,
6025         qualified_lookup_using_namespace, set_decl_namespace,
6026         decl_namespace, current_decl_namespace, push_decl_namespace,
6027         pop_decl_namespace, push_scope, pop_scope, add_function,
6028         arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
6029         lookup_arg_dependent, do_namespace_alias,
6030         validate_nonmember_using_decl, do_nonmember_using_decl,
6031         do_toplevel_using_decl, do_local_using_decl,
6032         do_class_using_decl, do_using_directive, check_default_args,
6033         mark_used, handle_class_head): Use C90 prototypings.  Use booleans.
6034         * parser.c (cp_parser_class_head): Use booleanss.
6035         * decl.c (walk_globals, walk_vtables): Likewise.
6036         * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
6037         walk_globals): Change return type from 'int' to 'bool'.
6038         * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
6039         throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
6040         build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
6041         get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
6042         qualifier_flags, tinfo_base_init, generic_initializer,
6043         ptr_initializer, dfs_class_hint_mark, ptm_initializer,
6044         dfs_class_hint_unmark, class_hint_flags, class_initializer,
6045         typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
6046         get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
6047         unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
6048         * repo.c (repo_compile_flags, repo_template_declared,
6049         repo_template_defined, repo_class_defined, repo_get_id,
6050         repo_template_used, repo_vtable_used, repo_inline_used,
6051         repo_tinfo_used, repo_template_instantiated, extract_string,
6052         open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
6053         finish_repo): Likewise.
6054         * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
6055         cxx_print_xnode): Likewise..
6056         * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
6057         cxx_warn_unused_global_decl, cp_expr_size): Likewise.
6058         * cxxfilt.c (demangle_it, print_demangler_list, usage,
6059         standard_symbol_characters, hp_symbol_characters, main, fatal):
6060         Likewise.
6061         (strip_underscore):  Change type from 'int' to 'bool'.
6062         (main): Use boolean constants.
6064 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6066         Remove traditional C constructs 3/n.
6067         * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
6068         build_up_reference, warn_ref_binding, convert_to_reference,
6069         convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
6070         convert_to_void, convert, convert_force, build_type_conversion,
6071         build_expr_type_conversion, type_promotes_to,
6072         perform_qualification_conversions): Use C90 prototyping style.
6073         * decl2.c (grok_array_decl): Use boolean constant.
6074         (delete_sanity): Likewise.
6075         * typeck.c (build_unary_op): Likewise.
6076         * semantics.c (finish_switch_cond): Likewise.
6077         * parser.c (cp_parser_direct_new_declarator): Likewise.
6078         * init.c (build_new): Likewise.
6080 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
6082         * Make-lang.in (po-generated): Remove parse.c.
6083         (CXX_OBJS): Remove parse.o and spew.o.  Add parser.o.
6084         ($(srcdir)/cp/parse.h): Remove target.
6085         ($(srcdir)/cp/parse.c): Likewise.
6086         (gt-cp-parse.h): Likewise.
6087         (gt-cp-parser.h): New target.
6088         (c++.distclean): Do not remove parse.output.
6089         (c++.maintainer-clean): Do not remove parse.c or parse.h.
6090         (cp/spew.o): Remove target.
6091         (cp/lex.o): Adjust dependencies.
6092         (cp/pt.o): Likewise.
6093         (cp/parse.o): Likewise.
6094         (cp/TAGS): Do not mention parse.c.
6095         (cp/parser.o): New target.
6096         * NEWS: Mention the new parser.
6097         * call.c (build_scoped_method_call): Simplify.
6098         (build_method_call): Likewise.
6099         (build_new_function_call): Adjust calls to add_function_candidate
6100         and add_template_candidate.
6101         (build_new_op): Improve handling of erroroneous operands.
6102         (convert_default_arg): Remove circular argument processing.
6103         (name_as_c_string): New function.
6104         (build_new_method_call): Use it.
6105         (perform_implicit_conversion): Use error_operand_p.
6106         * class.c (finish_struct_anon): Use constructor_name_p.
6107         (check_field_decls): Likewise.
6108         (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
6109         (resolve_address_of_overloaded_function): Likewise.
6110         (instantiate_type): Tweak pointer-to-member handling.
6111         (get_primary_binfo): Remove incorrect assertion.
6112         * config-lang.in (gtfiles): Add parser.c, remove parse.c.
6113         * cp-tree.h (DEFARG_TOKENS): New macro.
6114         (default_arg): New structure.
6115         (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
6116         (lang_tree_node): Add default_arg.
6117         (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
6118         (type_info_ref_type): New macro.
6119         (saved_scope): Make processing_explicit_instantiation a boolean.
6120         (check_access): New field.
6121         (unparsed_text): Remove.
6122         (language_function): Remove unparsed_inlines.
6123         (error_operand_p): New macro.
6124         (lang_decl): Adjust pending_inline_info.
6125         (DEFARG_POINTER): Remove.
6126         (tag_types): Add typenames.
6127         (lookup_ualified_name): Declare.
6128         (lookup_name_real): Likewise.
6129         (shadow_tag): Adjust prototype.
6130         (get_scope_of_declarator): Declare it.
6131         (process_next_inline): Remove it.
6132         (check_for_missing_semicolon): Likewise.
6133         (maybe_get_template_decl_from_type_decl): Declare it.
6134         (finish_label_stmt): Adjust prototype.
6135         (finish_non_static_data_meber): Declare it.
6136         (finish_pseudo_destructor_call_expr): Rename to ...
6137         (finish_pseudo_destructor_expr): ... this.
6138         (finish_compound_literal): Declare it.
6139         (begin_inline_definitions): Remove it.
6140         (init_spew): Remove.
6141         (peekyylex): Likewise.
6142         (arbitrate_lookup): Likewise.
6143         (frob_opname): Likewise.
6144         (maybe_snarf_defarg): Likewise.
6145         (add_defarg_fn): Likewise.
6146         (do_pending_defargs): Likewise.
6147         (done_pending_defargs): Likewise.
6148         (unprocessed_defarg_fn): Likewise.
6149         (replace_defarg): Likewise.
6150         (end_input): Likewise.
6151         (get_overloaded_fn): Likewise.
6152         * cvt.c (convert_to_reference): Improve error handling.
6153         * decl.c (lookup_name_real): Do not declare it static.
6154         (maybe_push_to_top_level): Set check_access.
6155         (identifier_type_value): Adjust call to lookup_name_real.
6156         (lookup_qualified_name): New method.
6157         (lookup_name_real): Remove special-case parsing code.
6158         (lookup_name-nonclass): Adjust call to lookup_name_real.
6159         (lookup_name_namespace_only): Likewise.
6160         (lookup_name): Likewise.
6161         (check_tag_decl): Return the type declared.
6162         (shadow_tag): Likewise.
6163         (register_dtor_fn): Tweak check_access.
6164         (grokfndecl): Use constructor_name_p.
6165         (get_scope_of_declarator): New function.
6166         (grokdeclarator): Obscure tweaks for slightly different declarator
6167         representations.
6168         (start_method): Return error_mark_node to indicate failure.
6169         (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
6170         * decl2.c (constructor_name_full): Simplify.
6171         (constructor_name): Use it.
6172         (build_expr_from_tree): Adjust for changes to do new parser.
6173         (push_scope): Improve robustness.
6174         (validate_nonmember_using_decl): Process declarations, not names.
6175         (do_class_using_decl): Likewise.
6176         (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
6177         here.
6178         * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
6179         * expr.c (cxx_expand_expr): Handle BASELINKs.
6180         * init.c (member_init_ok_or_else): Issue more errors.
6181         (build_offset_ref): Tweak handling of FUNCTION_DECLs.
6182         * lex.c: Do not include parse.h.
6183         (yypring): Do not declare.
6184         (yylval): Likewise.
6185         (make_reference_declarator): Remove error-generating code.
6186         (rid_to_yy): Remove.
6187         (cxx_init): Do not call init_spew.
6188         (yypring): Remove.
6189         (check_for_missing_semicolon): Remove.
6190         * lex.h (got_scope): Remove.
6191         (got_object): Remove.
6192         * method.c (hack_identifier): Use finish_non_static_data_member.
6193         (implicitly_declare_fn): Adjust use of constructor_name.
6194         * parser.c: New file.
6195         * pt.c (parse.h): Do not include it.
6196         (maybe_get_template_decl_from_template): Do not declare it.
6197         (finish_member_template_decl): Tweak.
6198         (begin_explicit_instantiation): Adjust for
6199         processing_explicit_instantiation being boolean.
6200         (end_explicit_instantiation): Likewise.
6201         (maybe_process_partial_specialization): Tighten specialization
6202         test.
6203         (retrieve_local_specialization): Adjust ue of hash table.
6204         (eq_local_specializations): New function.
6205         (register_local_specialization): Likewise.
6206         (push_template_decl_real): Remove unnecessary test.
6207         (maybe_get_template_decl_from_type_decl): Don't make it static.
6208         (for_each_template_parm_r): Handle TYPEOF_TYPE.
6209         (tsubst_copy): Use retrieive_local_specialization to handle
6210         PARM_DECL.  Adjust handling of CONST_DECLs.  Handle BASELINKs.
6211         Handle COMPONENT_REFs with pseudo-destructor-expressions.
6212         Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
6213         (tsubst_expr): Pass decls, not names, to do_local_using_decl.
6214         (unify): Tweak handling of CONST_DECLs.
6215         (regenerate_decl_from_template): Use push_nested_class.
6216         (template_for_substitution): New funciton.
6217         (instantiate_decl): Use it.  Register parameters as local
6218         specializations.
6219         * rtti.c (init_rtti_processing): Set type_info_ref_type.
6220         (build_typeid): Use it.
6221         (get_typeid): Likeise.
6222         * search.c (accessible_p): Use check_access, not
6223         flag_access_control.
6224         (adjust_result_of_qualified_name_lookup): Pay attention to the
6225         context_class.
6226         * semantics.c (finish_asm_stmt): Adjust error handling.
6227         (finish_label_stmt): Return the statement.
6228         (finish_non_static_data_member): New function.
6229         (finish_class_expr): Handle BASELINKs.
6230         (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
6231         (finish_object_call_expr): Simplify handling during templates.
6232         (finish_pseudo_destructor_call_expr): Rename to ...
6233         (finish_pseudo_dtor_expr): ... this.
6234         (finish_compound_literal): New function.
6235         (begin_inline_definitions): Remove.
6236         (finish_sizeof): Remove special template handling.
6237         * spew.c: Do not include parse.h.
6238         * tree.c (get_overloaded_fn): Remove.
6239         * typeck.c (build_class_member_access_expr): Handle
6240         PSEUDO_DTOR_EXPR.  Adjust handling of static member functions.
6241         (lookup_destructor): New function.
6242         (finish_class_member_access_expr): Use it.
6243         (convert_arguments): Simplify.
6244         (build_unary_op): Handle BASELINKs.
6246 2002-12-26  Nathan Sidwell  <nathan@codesourcery.com>
6248         PR c++/4803
6249         * decl2.c (mark_used): Defer inline functions.
6250         (finish_file): Merge deferred_fns loops. Check all used
6251         inline functions have a definition.
6252         * method.c (make_thunk): Thunks are not inline.
6254         PR c++/5116, c++/764
6255         * call.c (build_new_op): Make sure template class operands are
6256         instantiated.
6258 2002-12-24  Nathan Sidwell  <nathan@codesourcery.com>
6260         PR C++/7964
6261         * cp-tree.h (resolve_scoped_fn_name): Prototype.
6262         * call.c (resolve_scoped_fn_name): New function. Deal with
6263         more template expansion. Broken out of ...
6264         * parse.y (parse_finish_call_expr): ... here. Call it.
6265         * decl2.c (build_expr_from_tree, CALL_EXPR): Use
6266         resolve_scoped_fn_name and build_call_from_tree.
6268         PR c++/9053
6269         * decl.c (duplicate_decls): Templates may be disambiguated by
6270         return type.
6272         PR c++/8702
6273         * decl2.c (check_classfn): Use lookup_fnfield_1. List all
6274         conversion operators on failure.
6276 2002-12-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6278         Remove traditional C constructs 2/n.
6279         * call.c (tourney, build_field_call, equal_functions, joust,
6280         compare_ics, build_over_call, build_java_interface_fn_ref,
6281         convert_like_real, op_error, build_object_call, resolve_args,
6282         build_vfield_ref, check_dtor_name, build_scoped_method_call,
6283         build_addr_func, build_call, build_method_call, null_ptr_cst_p,
6284         sufficient_parms_p, build_conv, non_reference, strip_top_quals,
6285         standard_conversion, reference_related_p,
6286         reference_compatible_p, convert_class_to_reference,
6287         direct_reference_binding, reference_binding,
6288         ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
6289         add_template_conv_candidate, any_viable, any_strictly_viable,
6290         build_this, splice_viable, print_z_candidates,
6291         build_user_type_conversion, build_new_function_call,
6292         conditional_conversion, build_conditional_expr, build_new_op,
6293         build_op_delete_call, enforce_access, call_builtin_trap,
6294         convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
6295         convert_default_arg, type_passed_as, convert_for_arg_passing,
6296         in_charge_arg_for_name, is_properly_derived_from,
6297         maybe_handle_implicit_object, maybe_handle_ref_bind,
6298         source_type, add_warning, can_convert, can_convert_arg,
6299         perform_implicit_conversion, can_convert_arg_bad,
6300         initialize_reference, add_conv_candidate,
6301         add_template_candidate_real, add_template_candidate): Ansify.
6303 2002-12-22  Nathan Sidwell  <nathan@codesourcery.com>
6305         PR c++/8572
6306         * cp-tree.h (grokoptypename): Add SCOPE parameter.
6307         * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
6308         if in a template scope.
6309         * parse.y (unoperator): Return the scope.
6310         (operator_name): Adjust grokoptypename call.
6312 2002-12-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6314         * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
6315         * decl.c (make_unbound_class_template): Adjust.  Check for tf_error.
6316         * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
6318 2002-12-20  Kazu Hirata  <kazu@cs.umass.edu>
6320         * ChangeLog: Fix a typo.
6321         * class.c: Fix comment typos.
6322         * cp-tree.h: Likewise.
6324 2002-12-18  Jason Merrill  <jason@redhat.com>
6326         Handle anonymous unions at the tree level.
6327         C++ ABI change: Mangle anonymous unions using the name of their
6328         first named field (by depth-first search).  Should not cause
6329         binary compatibility problems, though, as the compiler previously
6330         didn't emit anything for affected unions.
6331         * cp-tree.def (ALIAS_DECL): New tree code.
6332         * decl2.c (build_anon_union_vars): Build ALIAS_DECLs.  Return the
6333         first field, not the largest.
6334         (finish_anon_union): Don't mess with RTL.  Do set DECL_ASSEMBLER_NAME,
6335         push the decl, and write it out at namespace scope.
6336         * decl.c (lookup_name_real): See through an ALIAS_DECL.
6337         (pushdecl): Add namespace bindings for ALIAS_DECLs.
6338         * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
6339         of a decl which doesn't have one.
6340         * typeck.c (build_class_member_access_expr): Don't recurse if
6341         we already have the type we want.
6343 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6345         PR c++/8099
6346         * friend.c (make_friend_class): Allow partial specialization
6347         when declaration is not a template friend.
6349 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6351         PR c++/3663
6352         * pt.c (lookup_template_class): Copy TREE_PRIVATE and
6353         TREE_PROTECTED to created decl nodes.
6355 2002-12-18  Mark Mitchell  <mark@codesourcery.com>
6357         * class.c (build_base_field): Do not set DECL_PACKED on the
6358         FIELD_DECL.
6360 2002-12-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6362         * cp-tree.h (struct tree_srcloc): Use location_t.
6363         (SOURCE_LOCUS): New.
6364         (SRCLOC_FILE, SRCLOC_LINE): Adjust.
6366 2002-12-17  Jason Merrill  <jason@redhat.com>
6368         * decl.c (finish_function): Also complain about no return in
6369         templates.
6370         * semantics.c (finish_return_stmt): Also call check_return_expr in
6371         templates.
6372         * typeck.c (check_return_expr): In a template, just remember that we
6373         saw a return.
6375 2002-12-16  Jason Merrill  <jason@redhat.com>
6377         * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
6378         of the CALL_EXPR.
6380         * semantics.c (do_pushlevel): Call pushlevel after adding the
6381         SCOPE_STMT.
6382         (do_poplevel): Call poplevel before adding the SCOPE_STMT.
6383         * parse.y (function_body): Go back to using compstmt.
6384         * decl.c (pushdecl): Skip another level to get to the parms level.
6386         * call.c (build_new_method_call): Use is_dummy_object to determine
6387         whether or not to evaluate the object parameter to a static member
6388         function.
6390 2002-12-14  Jason Merrill  <jason@redhat.com>
6392         * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
6393         return slot for normal functions.  Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
6394         * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
6395         don't bother with an AGGR_INIT_EXPR.
6396         (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
6397         just generate a new decl normally.  Take return slot parm.
6398         * cp-tree.h: Adjust prototype.
6400 2002-12-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6402         PR C++/8031
6403         * cvt.c (convert_to_pointer_force): Don't try comparing against
6404         erronous type.
6406 2002-12-13  Geoffrey Keating  <geoffk@apple.com>
6408         * cp-tree.h: Have the multiple-include guards around
6409         the entire file.
6411 2002-12-10  David Edelsohn  <edelsohn@gnu.org>
6413         * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
6414         for SPEW_DEBUG.
6415         (snarf_method): Same.
6416         (snarf_defarg): Same.
6418 2002-12-10  Mark Mitchell  <mark@codesourcery.com>
6420         PR c++/8372
6421         * pt.c (tsubst_copy): Handle destructor names more correctly.
6423 2002-12-10  Matt Austern   <austern@apple.com>
6425         * cp-tree.h: get rid of needs_virtual_reinit bit.
6427 2002-12-09  Mark Mitchell  <mark@codesourcery.com>
6429         * NEWS: Document removal of in-class initialization extension for
6430         static data members of non-arithmetic, non-enumeration type.
6431         * decl.c (check_static_variable_definition): Do not allow that
6432         extension.
6433         * decl2.c (grokfield): Do not call digest_init when processing
6434         templates.
6436 2002-12-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6438         * error.c (dump_expr): Fix format specifier warning.
6440 2002-12-04  Geoffrey Keating  <geoffk@apple.com>
6442         * class.c (finish_struct_1): Correct comment.
6443         * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
6445 2002-12-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6447         PR C++/8799
6448         * error.c (dump_expr): Don't ever try to dump a non-existent
6449         expression.
6451 2002-12-03  Nathan Sidwell  <nathan@codesourcery.com>
6453         Implement covariant returns.
6454         * cp-tree.h (IS_AGGR_TYPE_2): Remove.
6455         (struct lang_decl_flags): Add this_thunk_p flag.
6456         Rename vcall_offset to virtual_offset.
6457         (struct lang_decl): Rename delta to fixed_offset.
6458         (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
6459         (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
6460         (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
6461         (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
6462         (make_thunk): Add this_adjusting arg.
6463         (finish_thunk): Declare.
6464         (mangle_thunk): Add this_adjusting arg.
6465         * class.c (get_vcall_index): Use base function for lookup.
6466         (update_vtable_entry_for_fn): Generate covariant thunk.
6467         (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
6468         (build_vtbl_initializer): Use base function for lookup.
6469         Finish covariant thunk here. Adjust thunk generation.
6470         * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
6471         Adjust thunk dumping.
6472         * mangle.c (mangle_call_offset): New function.
6473         (mangle_thunk): Adjust for covariant thunks.
6474         * method.c (make_thunk): Adjust. Do not set name here.
6475         (finish_thunk): New function. Set name here.
6476         (use_thunk): Generate covariant thunks too.
6477         (thunk_adjust): New function.
6478         * search.c (covariant_return_p): Remove. Fold into ...
6479         (check_final_overrider): ... here. Simplify.
6480         * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
6482 2002-12-03  Jason Merrill  <jason@redhat.com>
6484         PR c++/8674
6485         * call.c (build_over_call): Check specifically for TARGET_EXPR
6486         when eliding.
6488         PR c++/8461, c++/8625
6489         * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
6490         (cp_convert_parm_for_inlining): Remove.
6491         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
6492         Remove.
6493         * cp-tree.h (ADDR_IS_INVISIREF): Remove.
6494         * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
6496         * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
6497         an ambiguous conversion.
6499 2002-12-03  Mark Mitchell  <mark@codesourcery.com>
6501         PR c++/8688
6502         * decl.c (reshape_init): Handle erroneous initializers.
6504 2002-12-02  Mark Mitchell  <mark@codesourcery.com>
6506         PR c++/8720
6507         * spew.c (remove_last_token): Make sure that last_chunk is set
6508         correctly.
6510         PR c++/8615
6511         * error.c (dump_expr): Handle character constants with
6512         TREE_OVERFLOW set.
6514 2002-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6516         DR 180
6517         * decl.c (grokdeclarator): Require class-key for all friend class.
6518         Output the correct type and context in the error message.
6520 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
6522         PR c++/5919
6523         * pt.c (unify): Use variably_modified_type_p to test validity of
6524         template argument types.
6526         PR c++/8727
6527         * cp-tree.h (lang_type_class): Add typeinfo_var.
6528         (CLASSTYPE_TYPEINFO_VAR): New macro.
6529         * rtti.c (get_tinfo_decl): Use it.
6531         PR c++/8663
6532         * init.c (expand_member_init): Always get the main variant of a
6533         base class.
6535 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
6537         PR c++/8332
6538         PR c++/8493
6539         * decl.c (cxx_init_decl_processing): Use size_type_node, not
6540         c_size_type_node.
6541         * decl2.c (coerce_new_type): Likewise.
6542         * except.c (do_allocate_exception): Likewise.
6544 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
6546         * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
6547         dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
6548         lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
6549         repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
6550         typeck2.c: Include coretypes.h and tm.h.
6551         * Make-lang.in: Update dependencies.
6553 2002-11-30  Mark Mitchell  <mark@codesourcery.com>
6555         PR c++/8227
6556         * decl.c (layout_var_decl): Deal gracefully with erroneous types.
6557         (check_initializer): Validate the type of the initialized
6558         variable, even if the initializer is absent.
6559         * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
6561         PR c++/8214
6562         * typeck.c (convert_for_assignment): Do not use
6563         decl_constant_value on the operand.
6565         PR c++/8511
6566         * pt.c (instantiate_decl): Handle template friends defined outside
6567         of the class correctly.
6569 2002-11-29  Joe Buck <jbuck@synopsys.com>
6571         * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
6572         anonymous structs.
6574 2002-11-29  Mark Mitchell  <mark@codesourcery.com>
6576         * class.c (walk_subobject_offsets): Recur on binfos as well as on
6577         types.
6578         (layout_nonempty_base_or_field): Pass it a binfo when processing a
6579         base class.
6580         (layout_empty_base): Likewise.
6581         (build_base_field): Likewise.
6583 2002-11-27  Mark Mitchell  <mark@codesourcery.com>
6585         * class.c (build_base_field): Make sure we get the canonical base
6586         when descending through primary bases.
6588 2002-11-26  Geoffrey Keating  <geoffk@apple.com>
6590         * decl.c (check_initializer): Don't error on initialisation of
6591         a scalar with a brace-enclosed expression.
6593 2002-11-26  Nathan Sidwell  <nathan@codesourcery.com>
6595         * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
6596         (template_parms_equal): Remove prototype.
6597         * typeck.c (buuld_indirect_ref): Reformat.
6599 2002-11-25  Jason Merrill  <jason@redhat.com>
6601         * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
6602         and a DO_STMT.
6604 2002-11-25  Mark Mitchell  <mark@codesourcery.com>
6606         * tree.c (cp_build_qualified_type_real): Correct handling of
6607         array types.
6608         * class.c (walk_subobject_offsets): Fix thinko.
6609         (build_base_field): Record offsets of empty bases in primary
6610         virtual bases.
6611         (layout_class_type): Record offsets of empty bases in fields.
6613         * search.c (is_subobject_of_p_1): Fix thinko.
6614         (lookup_field_queue_p): Likewise.
6616 2002-11-24  Mark Mitchell  <mark@codesourcery.com>
6618         * class.c (layout_class_type): Reuse tail padding when laying out
6619         virtual bases.
6621 2002-11-22  Mark Mitchell  <mark@codesourcery.com>
6623         * rtti.c (qualifier_flags): Fix thinko.
6625 2002-11-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6627         Remove traditional C constructs 1/n.
6628         * cp-tree.h (init_method, set_mangled_name_for_decl,
6629         build_opfncall, hack_identifier, make_thunk, use_thunk,
6630         synthesize_method, implicitly_declare_fn,
6631         skip_artificial_parms_for, optimize_function, calls_setjmp_p,
6632         maybe_clone_body): Remove use of PARAMS.
6634         * method.c (do_build_assign_ref, do_build_copy_constructor,
6635         synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
6636         Likewise.
6637         (synthesize_method): Use 'bool' type and constants instead of
6638         'int'.
6639         (locate_copy): Likewise.
6640         (implicitly_declare_fn): Likewise.
6642         * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
6643         Remove old-style declaration.
6644         (maybe_clone_body): Use 'bool' type and constants.
6646 2002-11-21  Glen Nakamura  <glen@imodulo.com>
6648         PR c++/8342
6649         * typeck.c (get_member_function_from_ptrfunc): Make sure that a
6650         SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
6651         of the branches of a COND_EXPR.
6653 2002-11-19  Mark Mitchell  <mark@codesourcery.com>
6655         * pt.c (for_each_template_parm): Free allocated memory.
6656         * search.c (is_subobject_of_p_1): New function.
6657         (is_subobject_of_p): Avoid walking virtual bases multiple times.
6659 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
6661         * g++spec.c (lang_specific_spec_functions): New.
6663 2002-11-15  Kazu Hirata  <kazu@cs.umass.edu>
6665         * ChangeLog: Follow spelling conventions.
6666         * class.c: Likewise.
6667         * decl2.c: Likewise.
6669 2002-11-14  Zack Weinberg  <zack@codesourcery.com>
6671         * search.c (dfs_push_decls): Do not try to reorder elements
6672         3..n of method_vec if method_vec has only two elements.
6673         Reverse order of two tests to avoid accessing unallocated
6674         memory.
6676 2002-11-14  Mark Mitchell  <mark@codesourcery.com>
6678         * class.c (dfs_find_final_overrider): Adjust so that the most
6679         derived object is a binfo, rather than a class type.
6680         (find_final_overrider): Likewise.
6681         (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
6682         (add_vcall_offset): Likewise.
6684 2002-11-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6686         PR c++/8389
6687         * pt.c (instantiate_template): Push class scope for member
6688         functions.
6689         (get_mostly_instantiated_function_type): Likewise.  Don't call
6690         tsubst on context.  Remove CONTEXTP and TPARMSP parameters.
6691         * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
6692         * mangle.c (write_encoding, write_unqualified_name): Adjust.
6694 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
6696         * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
6697         vcall offfsets.  Split out ...
6698         (add_vcall_offset): ... new function.
6700         PR c++/8338
6701         * pt.c (for_each_template_parm): Add htab parameter.
6702         (process_partial_specialization): Adjust call.
6703         (push_template_decl_real): Likewise.
6704         (pair_fn_data): Add visited.
6705         (for_each_template_parm_r): Avoid walking duplicates more than
6706         once.
6707         (uses_template_parms): Adjust call to for_each_template_parm.
6709 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
6711         * class.c (add_implicitly_declared_members): Put implicitly
6712         declared functions at the end of TYPE_METHODs when -fabi-version
6713         is at least 2.
6715 2002-11-05  Geoffrey Keating  <geoffk@apple.com>
6717         * decl2.c (finish_file): Correct spelling.
6719 2002-11-03  Mark Mitchell  <mark@codesourcery.com>
6721         * call.c (build_special_member_call): Do not try to lookup VTTs by
6722         name.
6723         * class.c (vtbl_init_data): Add generate_vcall_entries.
6724         (get_vtable_decl): Do not look up virtual tables by name.
6725         (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
6726         (set_primary_base): Do not set CLASSTYPE_RTTI.
6727         (determine_primary_base): Likewise.
6728         (get_matching_virtual): Remove.
6729         (get_vcall_index): New function.
6730         (update_vtable_entry_for_fn): Do not try to use virtual thunks
6731         when they are not required.  Assign vcall indices at this point.
6732         (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
6733         Do update dynamic_classes.
6734         (build_vtt): Do not add VTTs to the symbol table.
6735         (build_ctor_vtbl_group): Likewise.
6736         (build_vtbl_initializer): Simplify handling of vcall indices.
6737         (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
6738         for the most derived class.
6739         (add_vcall_offset_vtbl_entries_1): But do not actually add them to
6740         the vtable.
6741         * cp-tree.h (dynamic_classes): New macro.
6742         (lang_type_class): Remove rtti.  Add vtables.  Add vcall_indices.
6743         (CLASSTYPE_RTTI): Remove.
6744         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
6745         (CLASSTYPE_VCALL_INDICES): New macro.
6746         (CLASSTYPE_VTABLES): Likewise.
6747         (BV_USE_VCALL_INDEX_P): Remove.
6748         (build_vtable_path): Remove.
6749         * decl2.c (finish_vtable_vardecl): Remove.
6750         (key_method): Remove #if 0'd code.
6751         (finish_vtable_vardecl): Rename to ...
6752         (maybe_emit_vtables): ... this.
6753         (finish_file): Use it.
6754         * search.c (look_for_overrides_here): Update comment.
6756 2002-11-01  Zack Weinberg  <zack@codesourcery.com>
6758         PR c/7353 redux
6759         * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
6761 2002-10-30  Jason Merrill  <jason@redhat.com>
6763         PR c++/8186
6764         * cp-tree.h (ADDR_IS_INVISIREF): New macro.
6765         * call.c (convert_for_arg_passing): Set it.
6766         * except.c (stabilize_throw_expr): Recurse for such an arg.
6768 2002-10-31  Mark Mitchell  <mark@codesourcery.com>
6770         * cp-tree.h (lang_decl_flags): Remove init_priority.
6771         (lang_decl): Add delta.
6772         (GLOBAL_INIT_PRIORITY): Remove.
6773         (THUNK_DELTA): Revise definition.
6774         * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
6775         * dump.c (cp_dump_tree): Don't dump it.
6777 2002-10-30  Mark Mitchell  <mark@codesourcery.com>
6779         PR c++/8160
6780         * typeck2.c (process_init_constructor): Call complete_array_type.
6782         PR c++/8149
6783         * decl.c (make_typename_type): Issue errors about invalid results.
6785 2002-10-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6787         Core issue 287, PR c++/7639
6788         * cp-tree.h (lang_type_class): Add decl_list field.
6789         (CLASSTYPE_DECL_LIST): New macro.
6790         (maybe_add_class_template_decl_list): Add declaration.
6791         * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
6792         (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
6793         (maybe_add_class_template_decl_list): New function.
6794         (add_implicitly_declared_members): Use it.
6795         * decl.c (maybe_process_template_type_declaration): Likewise.
6796         (pushtag): Likewise.
6797         * friend.c (add_friend): Likewise.
6798         (make_friend_class): Likewise.
6799         * semantics.c (finish_member_declaration): Likewise.
6800         (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
6801         * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
6802         to process members and friends in the order of declaration.
6804 2002-10-29  Mark Mitchell  <mark@codesourcery.com>
6806         PR c++/8287
6807         * decl.c (finish_destructor_body): Create the label to jump to
6808         when returning from a destructor here.
6809         (finish_function_body): Rather than here.
6811 2002-10-25  Zack Weinberg  <zack@codesourcery.com>
6813         PR c++/7266
6814         * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
6815         SCOPE_REF is not null before dereferencing it.
6817 2002-10-25  Mark Mitchell  <mark@codesourcery.com>
6819         * call.c (build_over_call): Use DECL_CONTEXT, not
6820         DECL_VIRTUAL_CONTEXT.
6821         * class.c (modify_vtable_entry): Don't mess with
6822         DECL_VIRTUAL_CONTEXT.
6823         (set_vindex): Remove.
6824         (set_primary_base): Remove vfuns_p parameter.
6825         (determine_primary_base): Likewise.
6826         (modify_all_vtables): Likewise.
6827         (layout_class_type): Likewise.  Adjust calls to other functions
6828         accordingly.
6829         (finish_struct_1): Adjust calls to modified functions.  Set
6830         DECL_VINDEX here.
6831         * cp-tree.h (lang_type_class): Remove vsize.
6832         (CLASSTYPE_VSIZE): Remove.
6833         (lang_decl): Remove thunks.
6834         (DECL_THUNKS): Adjust.
6835         (DECL_VIRTUAL_CONTEXT): Remove.
6836         (duplicate_decls): Don't copy it.
6837         * pt.c (build_template_decl): Don't set it.
6838         (tsubst_decl): Likewise.
6839         * typeck.c (expand_ptrmemfunc_cst): Don't use it.
6841         * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
6842         (build_vtable_entry): Remove.
6843         * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
6844         (lang_decl): Add thunks.
6845         (DECL_THUNKS): New macro.
6846         * decl.c (duplicate_decls): Copy it.
6847         * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
6848         * semantics.c (emit_associated_thunks): Simplify.
6850 2002-10-24  David Edelsohn  <edelsohn@gnu.org>
6852         PR c++/7228
6853         * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
6854         lang_type structure exists before accessing field.
6855         (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
6856         (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
6857         (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
6858         * class.c (check_field_decls): Use new macros.
6859         * typeck2.c (process_init_constructor): Remove redundant check for
6860         existence of lang_type structure.
6862 2002-10-24  Mark Mitchell  <mark@codesourcery.com>
6864         * class.c (end_of_base): New method.
6865         (end_of_class): Use it.  Check indirect virtual bases.
6867         * class.c (check_field_decls): Fix typo.
6869 2002-10-23  Mark Mitchell  <mark@codesourcery.com>
6871         PR c++/8067
6872         * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
6873         related variables.
6875         PR c++/7679
6876         * spew.c (next_token): Do not return an endless stream of
6877         END_OF_SAVED_INPUT tokens.
6878         (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
6879         the cached token stream.
6880         (snarf_defarg): Likewise.
6882 2002-10-23  Zack Weinberg  <zack@codesourcery.com>
6884         * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
6885         variably_modified_type_p.
6886         * cp-tree.h: Remove prototype of variably_modified_type_p.
6887         * tree.c (variably_modified_type_p): Remove; now implemented
6888         in language-independent code.
6890 2002-10-22  Mark Mitchell  <mark@codesourcery.com>
6892         PR c++/6579
6893         * spew.c (snarf_parenthesized_expression): New function.
6894         (snarf_block): Use it.
6896 2002-10-22  Richard Henderson  <rth@redhat.com>
6898         * method.c (use_thunk): Always compute vcall_value; assert that
6899         it is not zero.  Use can_output_mi_thunk; use output_mi_thunk
6900         for vcall thunks as well.
6902 2002-10-21  Mark Mitchell  <mark@codesourcery.com>
6904         * class.c (empty_base_at_nonzero_offset_p): New function.
6905         (layout_nonempty_base_or_field): Do not check for conflicts when
6906         laying out a virtual base using the GCC 3.2 ABI.
6907         (build_base_field): Correct checking for presence of empty classes
6908         at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
6910         * class.c (include_empty_classes): Use normalize_rli.
6911         (layout_class_type): Likewise.
6913         * decl.c (reshape_init): Tweak handling of character arrays.
6915         PR c++/8218
6916         * cp-tree.h (lang_type_class): Add contains_empty_class_p.
6917         (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
6918         * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
6919         (check_field_decls): Likewise.
6920         (layout_class_type): Likewise.
6921         (finish_struct_1): Initialize it.
6922         (walk_subobject_offsets): Use it to prune searches.
6924 2002-10-20  Mark Mitchell  <mark@codesourcery.com>
6926         * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
6927         * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
6928         TARGET_ASM_OUTPUT_MI_THUNK in comments.
6930 2002-10-18  Zack Weinberg  <zack@codesourcery.com>
6932         * decl.c (start_decl): Point users of the old initialized-
6933         typedef extension at __typeof__.
6935 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
6937         * Make-lang.in (method.o): Depend on TARGET_H.
6938         * method.c (target.h): Include it.
6939         (use_thunk): Use target hooks.  Use vcall thunks, if available.
6941 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
6943         * class.c (base_derived_from): Make sure return value is a bool.
6945 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
6947         * class.c (find_final_overrider_data_s): Remove overriding_fn and
6948         overriding_base.
6949         (dfs_base_derived_from): New function.
6950         (base_derived_from): Likewise.
6951         (dfs_find_final_overrider): Use base_derived_from.
6952         (find_final_overrider): Adjust.
6954 2002-10-18  Jason Merrill  <jason@redhat.com>
6956         PR c++/8080
6957         * semantics.c (finish_for_cond, finish_while_cond): Don't mess
6958         with condition decls in a template.
6960 2002-10-17  Nathan Sidwell  <nathan@codesourcery.com>
6962         * class.c (add_method): Compare template parms too.
6964 2002-10-17  Mark Mitchell  <mark@codesourcery.com>
6966         PR c++/7584
6967         * class.c (handle_using_decl): Allow the declaration used to be
6968         from an ambiguous base.
6970         * pt.c (convert_template_argument): Revert this change:
6971                 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
6972                 * pt.c (convert_template_argument): Do not fold non-type
6973                 template rguments when inside a template.
6975         * init.c (expand_default_init): Handle brace-enclosed initializers
6976         correctly.
6978 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
6980         * mangle.c (write_expression): Correct handling of enumeration
6981         constants.
6982         (write_template_arg): Likewise.
6983         * pt.c (convert_template_argument): Do not fold non-type template
6984         arguments when inside a template.
6986         PR c++/7478
6987         * cvt.c (convert_to_reference): Allow references as the incoming
6988         type.
6990 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
6992         PR c++/7524
6993         * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
6994         build_qualified_type.
6996 2002-10-15  Richard Henderson  <rth@redhat.com>
6998         * error.c (dump_expr): Use real_to_decimal directly, and with
6999         the new arguments.
7001 2002-10-15  Mark Mitchell  <mark@codesourcery.com>
7003         * decl.c (reshape_init): Fix typo.
7005         * cp-tree.h (operator_name_info_t): Add arity.
7006         * lex.c (init_operators): Initialize it.
7007         * mangle.c (write_conversion_operator_name): New function.
7008         (write_unqualified_name): Use it.
7009         (write_template_args): Accept template arguments as a TREE_LIST.
7010         (write_expression): Adjust handling of qualified names to match
7011         specification.
7013 2002-10-15  Jason Merrill  <jason@redhat.com>
7015         * call.c (call_builtin_trap): New fn.
7016         (convert_arg_to_ellipsis): Use it.  Downgrade error to warning.
7017         (build_call): Don't set current_function_returns_abnormally outside
7018         a function.
7020 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
7022         * class.c (check_field_decls): Remove empty_p parameter.  Instead,
7023         clear CLASSTYPE_EMPTY_P.
7024         (build_base_field): Likewise.
7025         (build_base_fields): Likewise.
7026         (check_bases_and_members): Likewise.
7027         (create_vtbl_ptr): Likewise.
7028         (layout_class_type): Likewise.  Ensure that empty classes have
7029         size zero when used as base classes in the 3.2 ABI.
7030         (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
7031         CLASSTYPE_NEARLY_EMPTY_P.  Adjust calls to avoid passing empty_p
7032         parameter.
7033         (is_empty_class): Correct definition when using post-3.2 ABI.
7034         * cp-tree.h (lang_type_class): Add empty_p.
7035         (CLASSTYPE_EMPTY_P): New macro.
7037 2002-10-12  Nathan Sidwell  <nathan@codesourcery.com>
7039         * init.c (build_delete): Do not apply save_expr for arrays.
7040         (build_vec_delete): Likewise.
7042 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
7044         * decl.c (layout_var_decl): Call layout_decl even for variables
7045         whose type is an array with unspecified bounds.
7047         PR c++/7176
7048         * lex.c (do_identifier): Add another option for the parsing
7049         parameter.
7050         * parse.y (do_id): Use it.
7052 2002-10-11  Gabriel Dos Reis  <gdr@integrable-solutions.net>
7054         PRs C++/6803, C++/7721 and C++/7803
7055         * decl.c (grokdeclarator): Gracefully handle template-name as
7056         decl-specifier.
7058 2002-10-11  Jason Molenda  <jmolenda@apple.com>
7060         * init.c (build_field_list): Provide uses_unions_p with a default
7061         value.
7063 2002-10-11  Mark Mitchell  <mark@codesourcery.com>
7065         PR c++/5661
7066         * cp-tree.h (variably_modified_type_p): New function.
7067         (grokdeclarator) Tighten check for variably modified types as
7068         fields.
7069         * pt.c (convert_template_argument): Do not allow variably modified
7070         types as template arguments.
7071         * tree.c (variably_modified_type_p): New function.
7073         * NEWS: Document removal of "new X = ..." extension.
7074         * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
7075         brace-enclosed initializers.
7076         * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
7077         (initialize_local_var): Remove declaration.
7078         (expand_static_init): Likewise.
7079         * decl.c (next_initializable_field): New function.
7080         (reshape_init): Likewise.
7081         (check_initializer): Use them.  Build dynamic initializer for
7082         aggregates here too.
7083         (initialize_local_var): Simplify, and incorporate cleanup
7084         insertion code as well.
7085         (destroy_local_var): Remove.
7086         (cp_finish_decl): Tidy.
7087         (expand_static_init): Fold checks for whether or not a variable
7088         needs initialization into this function.  Simplify.
7089         * decl2.c (do_static_initialization): Simplify.
7090         * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
7091         be done for us automatically.
7092         (expand_default_init): Handle brace-enclosed initializers
7093         correctly.
7094         (expand_aggr_init_1): Remove RTL-generation code.
7095         (build_vec_init): Remove "new X = ..." support.
7096         * parse.y (new_initializer): Likewise.
7097         * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
7098         brace-enclosed initializer.
7099         (create_pseudo_type_info): Likewise.
7100         * typeck2.c (store_init_value): Don't try to handle digest_init
7101         being called more than once.
7102         (digest_init): Tidy handling of brace-enclosed initializers.
7104 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7106         * decl.c (typename_hash): Use htab_hash_pointer.
7108 2002-10-10  Jim Wilson  <wilson@redhat.com>
7110         * decl.c (duplicate_decls): Don't call decl_attributes.
7112 2002-10-09  Zack Weinberg  <zack@codesourcery.com>
7114         PR c/7353
7115         * decl.c (start_decl): Unconditionally issue error for
7116         'typedef foo = bar'.
7117         (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
7118         (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
7120 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7122         * decl2.c (prune_vtable_vardecl): Delete unused function.
7124 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
7126         PR c++/7754
7127         * decl2.c (finish_anon_union): Do not expand anonymous unions when
7128         procesing template functions.
7129         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
7130         type. Call layout_decl.
7131         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
7133 2002-10-07  Richard Henderson  <rth@redhat.com>
7135         * decl2.c, pt.c: Revert c++/7754 fix.
7137 2002-10-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7139         PR c++/7804
7140         * error.c (dump_expr) [REAL_CST]: Output in decimal format.
7142 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
7144         PR c++/7931
7145         * pt.c (for_each_template_parm_r): Handle BASELINKs.
7147         PR c++/7754
7148         * decl2.c (finish_anon_union): Do not expand anonymous unions when
7149         procesing template functions.
7150         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
7151         type. Call layout_decl.
7152         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
7154 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
7156         PR c++/8006
7157         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
7158         template parameters.
7159         (globals): Add entity and need_abi_warning.
7160         (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
7161         CLASSTYPE_TEMPLATE_INFO.
7162         (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
7163         TYPE_TI_TEMPLATE.
7164         (write_prefix): Handle typename types correctly.
7165         (write_template_prefix): Handle template template parameters
7166         correctly.
7167         (start_mangling): Add entity parameter.
7168         (finish_mangling): Warn about names whose mangling will change.
7169         (mangle_decl_string): Adjust.
7170         (mangle_type_string): Likewise.
7171         (mangle_special_for_type): Likewise.
7172         (mangle_ctor_vtbl_for_type): Likewise.
7173         (mangle_thunk): Likewise.
7174         (mangle_guard_variable): Likewise.
7175         (mangle_ref_init_variable): Likewise.
7177 2002-10-02  Mark Mitchell  <mark@codesourcery.com>
7179         PR c++/7188.
7180         * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
7181         * cp-tree.h (emit_base_init): Rename to ....
7182         (emit_mem_initializers): ... this.
7183         (expand_member_init): Change prototype.
7184         * init.c (perform_member_init): Compute explicit, rather than
7185         requiring it as a parameter.
7186         (sort_member_init): Rename to ...
7187         (sort_mem_initializers): ... this.  Process bases and data members
7188         together.
7189         (sort_base_init): Remove.
7190         (emit_base_init): Rename to ...
7191         (emit_mem_initializers): ... this.
7192         (expand_aggr_vbase_init_1): Remove.
7193         (construct_virtual_bases): Rename to ...
7194         (construct_virtual_base): ... this.
7195         (expand_member_init): Rework handling of base initializers.
7196         * method.c (do_build_copy_constructor): Use
7197         finish_mem_initializers.
7198         * parse.y (member_init): Adjust calls to expand_member_init.
7199         * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
7200         (tsubst_initializer_list): Use expand_member_init.
7201         * semantics.c (finish_mem_intiailizers): Simplify.
7203 2002-10-02  Matt Austern  <austern@apple.com>
7204         * decl.c (walk_vtables_r): Fixed typo that caused result to
7205         never get a nonzero value.
7207 2002-10-02  Roger Sayle  <roger@eyesopen.com>
7209         PR optimization/6627
7210         * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
7211         from here, and move it to tree.h.
7212         * decl.c (cxx_init_decl_processing): If storing the vbit
7213         in function pointers, ensure that force_align_functions_log
7214         is atleast one.
7216 2002-10-02  Matt Austern  <austern@apple.com>
7218         * class.c (check_field_decls): Changed warning about const member
7219         variables so that it doesn't get issued for a class aggregate.
7221 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
7223         * decl.c (cp_finish_decl): Make sure array types are laid out,
7224         even if the array bounds are unknown.
7226 2002-10-01  Steve Ellcey  <sje@cup.hp.com>
7228         * class.c (build_vtbl_initializer): Change build_c_cast
7229         to build1.
7231 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
7233         * decl.c (cp_finish_decl): Make sure array types are laid out,
7234         even if the array bounds are unknown.
7236         * decl.c (cp_finish_decl): Correct check for dynamic
7237         initialization of thread-local storage.
7239 2002-09-30  Nathan Sidwell  <nathan@codesourcery.com>
7241         * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
7242         overloaded.
7244 2002-09-30  Steve Ellcey  <sje@cup.hp.com>
7246         * class.c (build_vtbl_initializer): Add cast.
7247         (add_vcall_offset_vtbl_entries_1):
7248         Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
7250 2002-09-30  Mark Mitchell  <mark@codesourcery.com>
7252         * class.c (walk_subobject_offsets): Correct the calculation of
7253         offsets for virtual bases.  Correct the counting of array
7254         elements.
7255         (layout_nonempty_base_or_field): Simplify.  Correct the
7256         calculation of offsets to be propagated through the binfo
7257         hierarchy.
7258         (build_base_field): Avoid creating a FIELD_DECL for empty bases.
7259         Add the FIELD_DECL to TYPE_FIELDS.
7260         (build_base_fields): Adjust accordingly.
7261         (layout_virtual_bases): Use build_base_field.
7262         (end_of_class): Return a tree, not an integer.
7263         (warn_about_ambiguous_direct_bases): Rename to ...
7264         (warn_about_ambiguous_bases): ... this.
7265         (include_empty_classes): New function.
7266         (layout_class_type): Create an alternative version of the type to
7267         be used when as a base class type.  Do not call
7268         finish_record_layout until we are done laying out the class.
7269         * cp-tree.h (lang_type_class): Remove size, size_unit.  Add
7270         as_base.
7271         (CLASSTYPE_SIZE): Reimplement.
7272         (CLASSTYPE_SIZE_UNIT): Likewise.
7273         (CLASSTYPE_ALIGN): Likweise.
7274         (CLASSTYPE_USER_ALIGN): Likewise.
7275         (CLASSTYPE_AS_BASE): New macro.
7276         (DECL_INITIALIZED_P): Likewise.
7277         (extract_init): Remove prototype.
7278         (build_forced_zero_init): Rename to ...
7279         (build_zero_init): ... this.
7280         (force_store_init_value): Remove.
7281         * decl.c (obscure_complex_init): Remove.
7282         (duplicate_decls): Copy DECL_INITIALIZED_P.
7283         (check_initializer): Do not leave junk in DECL_INITIAL.
7284         (cp_finish_decl): Handle zero-initialization of entities with
7285         static storage duration.
7286         * expr.c (extract_init): Remove.
7287         * init.c (build_forced_zero_init): Remove.
7288         (build_zero_init): New function.
7289         (build_default_init): Use it.
7290         (build_field_list): Skip FIELD_DECLs for base subobjects.
7291         (push_base_cleanups): Likewise.
7292         * method.c (do_build_assign_ref): Likewise.
7293         (synthesize_exception_spec): Likewise.
7294         * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
7295         (regenerate_decl_from_template): To not set DECL_INITIAL for a
7296         static data member whose initialization took place in its class.
7297         (instantiate_decl): Do not pass an initializer to cp_finish_decl
7298         in that situation.
7299         * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
7300         (dfs_unuse_fields): Likewise.
7301         * tree.c (pod_type_p): Handle error_mark_node.
7302         (zero_init_p): Likewise.
7303         * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
7304         subobjects.
7305         * typeck2.c (store_init_value): Remove #if 0'd code.
7306         (force_store_init_value): Remove.
7307         (process_init_constructor): Use build_zero_init.
7309 2002-09-29  Nathan Sidwell  <nathan@codesourcery.com>
7311         PR c++/7788
7312         * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
7314 2002-09-29  Kazu Hirata  <kazu@cs.umass.edu>
7316         * cp-tree.h: Fix comment typos.
7317         * decl.c: Likewise.
7318         * pt.c: Likewise.
7320 2002-09-25  Mark Mitchell  <mark@codesourcery.com>
7322         * cp/class.c (contains_empty_class_p): New method.
7323         (walk_subobject_offsets): Correct computation of field offset.
7324         (layout_empty_base): Correct placement of emtpy base classes.
7325         (layout_class_type): Warn about ABI changes.
7327 2002-09-23  Mark Mitchell  <mark@codesourcery.com>
7329         * cp/class.c (layout_virtual_bases): Do not round the size of the
7330         type to a multiple of the alignment before laying out virtual bases.
7331         (layout_class_type): Correct handling of bit-fields that are wider
7332         than their type inside unions.  Round the size of the type to a
7333         even number of bytes when computing the size without virtual
7334         bases.
7335         * cp/cp-tree.h (abi_version_at_least): New macro.
7337 2002-09-21  Kazu Hirata  <kazu@cs.umass.edu>
7339         * ChangeLog: Follow spelling conventions.
7340         * ChangeLog.2: Likewise.
7341         * call.c: Likewise.
7342         * class.c: Likewise.
7343         * cp-tree.h: Likewise.
7344         * cvt.c: Likewise.
7345         * decl.c: Likewise.
7346         * decl2.c: Likewise.
7347         * except.c: Likewise.
7348         * friend.c: Likewise.
7349         * g++spec.c: Likewise.
7350         * init.c: Likewise.
7351         * lex.c: Likewise.
7352         * mangle.c: Likewise.
7353         * method.c: Likewise.
7354         * operators.def: Likewise.
7355         * optimize.c: Likewise.
7356         * pt.c: Likewise.
7357         * rtti.c: Likewise.
7358         * search.c: Likewise.
7359         * semantics.c: Likewise.
7360         * spew.c: Likewise.
7361         * tree.c: Likewise.
7362         * typeck.c: Likewise.
7364 2002-09-18  Devang Patel  <dpatel@apple.com>
7366         * cp/cp-tree.h: New prototype for walk_vtabls().
7367         * cp/decl.c (walk_vtables_r): New function.
7368         (struct cp_binding_level): Add new members, namespaces,
7369         names_size and vtables.
7370         (add_decl_to_level): Add decl in namespaces or vtables
7371         chain, if conditions match.
7372         (walk_vtables): New function.
7373         (walk_namespaces_r): Travers separate namespace chain
7374         for namespace decls.
7375         (wrapup_globals_for_namespace): Use names_size instead
7376         of list_length().
7377         * cp/decl2.c (finish_file): Use walk_vtables() instead of
7378         walk_globals() to walk vtable decls.
7380 2002-09-18  Nathan Sidwell  <nathan@codesourcery.com>
7382         * decl.c (grokdeclarator): Use assert, not internal_error. Don't
7383         ICE with invalid pointers & references.
7385 2002-09-17  Zack Weinberg  <zack@codesourcery.com>
7387         * Make-lang.in: Remove all references to the demangler.
7388         * cxxfilt.c: Moved to binutils.
7390 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
7392         PR c++/7718
7393         * pt.c (tsubst_decl): Remove assert.
7395         Remove DR 295 implementation.
7396         * pt.c (check_cv_quals_for_unify): Disable function & method cases.
7397         * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
7398         about ignoring volatile qualifiers.
7400         * search.c (lookup_member): Correct documentation.
7402 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
7404         * cp-tree.h (union lang_tree_node): Add chain_next option.
7406 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
7408         * parse.y (parse_finish_call_expr): Check lookup_member result.
7410         PR c++/7015
7411         * semantic.c (finish_asm_stmt): Fix operand/output_operands
7412         thinko.
7413         * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
7415 2002-09-15  Nathan Sidwell  <nathan@codesourcery.com>
7417         PR c++/7919
7418         * call.c (build_over_call): Convert this pointer for fns found by
7419         using decls.
7421 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
7423         * ChangeLog: Follow spelling conventions.
7424         * ChangeLog.1: Likewise.
7426 2002-09-14  Nathan Sidwell  <nathan@codesourcery.com>
7428         PR c++/7768
7429         * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
7431 2002-09-14  Kazu Hirata  <kazu@cs.umass.edu>
7433         * error.c: Fix comment formatting.
7434         * except.c: Likewise.
7435         * expr.c: Likewise.
7436         * friend.c: Likewise.
7437         * g++spec.c: Likewise.
7438         * init.c: Likewise.
7439         * lex.c: Likewise.
7440         * mangle.c: Likewise.
7441         * method.c: Likewise.
7442         * optimize.c: Likewise.
7443         * pt.c: Likewise.
7444         * rtti.c: Likewise.
7445         * search.c: Likewise.
7446         * semantics.c: Likewise.
7447         * spew.c: Likewise.
7448         * tree.c: Likewise.
7449         * typeck.c: Likewise.
7450         * typeck2.c: Likewise.
7452 2002-09-13  Matt Austern  <austern@apple.com>
7454         PR C++/7828
7455         * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
7456         * cp/call.c: Change call-by-const-reference mechanism to use
7457         non_cast_lvalue_p when deciding whether the create a temporary.
7458         We need a temporary when passing, e.g. (long) x by const ref.
7460 2002-09-13  Nathan Sidwell  <nathan@codesourcery.com>
7462         * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
7464 2002-09-13  Kazu Hirata  <kazu@cs.umass.edu>
7466         * decl.c: Fix comment formatting.
7467         * decl2.c: Likewise.
7469 2002-09-12  Kazu Hirata  <kazu@cs.umass.edu>
7471         * call.c: Fix comment formatting.
7472         * class.c: Likewise.
7473         * cp-lang.c: Likewise.
7474         * cp-tree.h: Likewise.
7475         * cvt.c: Likewise.
7477 2002-09-11  Zack Weinberg  <zack@codesourcery.com>
7479         * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
7480         and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
7481         * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
7482         minor adjustments (use version_string, eliminate yet another
7483         duplicate of xmalloc)
7485 2002-09-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7487         * cp-tree.h (require_complete_eh_spec_types): Add prototype.
7489 2002-09-05  Jason Merrill  <jason@redhat.com>
7491         * typeck2.c (add_exception_specifier): Only pedwarn for an
7492         incomplete type.
7493         (require_complete_eh_spec_types): New fn.
7494         (cxx_incomplete_type_diagnostic): Also support pedwarning.
7495         * typeck.c (complete_type_or_diagnostic): Likewise.
7496         * call.c (build_call): Call require_complete_eh_spec_types.
7497         * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
7498         on an incomplete type.
7500 2002-09-04  Jakub Jelinek  <jakub@redhat.com>
7502         * decl.c (start_cleanup_fn): Clear interface_only before
7503         start_function, restore it afterwards.
7505 2002-09-02  Nathan Sidwell  <nathan@codesourcery.com>
7507         * cp-tree.h (finish_builtin_type): Remove.
7508         * decl2.c (finish_builtin_type): Move to common code.
7509         * decl.c (build_ptrmemfunc_type): Adjust.
7510         * rtti.c (create_pseudo_type_info): Adjust.
7511         (create_tinfo_types): Adjust.
7513 2002-08-31  Jason Merrill  <jason@redhat.com>
7515         * cp-lang.c (cp_expr_size): Allow initialization from a
7516         CONSTRUCTOR.
7518 2002-08-30  Richard Henderson  <rth@redhat.com>
7520         PR opt/7515
7521         * tree.c: Include target.h.
7522         (cp_cannot_inline_tree_fn): Don't auto-inline functions that
7523         don't bind locally.
7524         * Makefile.in (tree.o): Update.
7526 2002-08-27  Mark Mitchell  <mark@codesourcery.com>
7528         * class.c (layout_virtual_bases): Warn about bugs in G++ that
7529         result in incorrect object layouts.
7530         (layout_class_type): Likewise.
7532 2002-08-24  Matt Austern  <austern@apple.com>
7534         * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
7535         are allowable.
7536         (real_lvalue_p): Update caller.
7537         (lvalue_p): Ditto.
7538         (non_cast_lvalue_or_else): New.
7539         * tree.h: Declare it.
7540         * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
7542 2002-08-22  Mark Mitchell  <mark@codesourcery.com>
7544         * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
7545         and COND_EXPR specially; fix error message output.
7547 2002-08-22  Jason Merrill  <jason@redhat.com>
7549         * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
7550         * semantics.c (nullify_returns_r): Likewise.
7552 2002-08-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
7554         Fix PR/7621
7555         * typeck.c (finish_class_member_access_expr): Diagnose cases where
7556         name lookup finds nothing.
7558 2002-08-15  Jason Merrill  <jason@redhat.com>
7560         * semantics.c (finish_then_clause): Remove redundant assignment.
7561         (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
7562         extra binding level outside the if/switch statement.
7563         (finish_while_cond, finish_for_cond): Rewrite complex condition
7564         into the loop body.
7566 2002-08-15  Alexandre Oliva  <aoliva@redhat.com>
7568         * parse.y (sizeof, alignof, typeof): New non-terminals to
7569         increment skip_evaluation.  Replace terminals with them and
7570         decrement skip_evaluation at the end of rules using them.
7571         * decl2.c (mark_used): Don't assemble_external if
7572         skipping evaluation.
7574 2002-08-15  Gabriel Dos Reis  <gdr@nerim.net>
7576         Fix PR/7504
7577         * parse.y (parse_finish_call_expr): Handle incomplete
7578         type used to name a scope.
7580 2002-08-15  Nathan Sidwell  <nathan@codesourcery.com>
7582         PR c++/7598
7583         * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
7584         regression caused by my 2002-08-08 patch.
7586 2002-08-13  Mark Mitchell  <mark@codesourcery.com>
7588         * decl.c (pushdecl_class_level): Honor requests to bind names to
7589         OVERLOADs.
7591 2002-08-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7593         * decl2.c (build_call_from_tree): Fix uninitialized variable.
7594         * parse.y (parse_finish_call_expr): Likewise.
7595         * repo.c (old_args, old_dir, old_main): Const-ify.
7597 2002-08-11  Gabriel Dos Reis  <gdr@nerim.net>
7599         * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE
7600         DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
7601         * optimize.c (maybe_clone_body): Likewise.
7602         * pt.c (tsubst_enum): Likewise.
7603         (lookup_template_class): Likewise.
7604         * tree.c (cp_copy_res_decl_for_inlining): Likewise.
7606 2002-08-10  Neil Booth  <neil@daikokuya.co.uk>
7608         * lang-specs.h: Remove -ansi.
7610 2002-08-10  Nathan Sidwell  <nathan@codesourcery.com>
7612         * tree.c (maybe_dummy_object): Replace // with /* */
7614 2002-08-09  Mark Mitchell  <mark@codesourcery.com>
7616         * call.c (standard_conversion): Use build_ptrmem_type.
7617         * cp-tree.h (build_ptrmem_type): New function.
7618         (adjust_result_of_qualified_name_lookup): Likewise.
7619         * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
7620         static data members.
7621         (build_ptrmem_type): New function.
7622         (grokdeclarator): Do not use build_offset_type when encountering a
7623         qualified name.
7624         * parse.y (parse_finish_call_expr): Use
7625         adjust_result_of_qualified_name_lookup.
7626         * search.c (adjust_result_of_qualified_name_lookup): New function.
7627         * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
7628         accessing OFFSET_TYPEs directly.
7630 2002-08-08  Mike Stump  <mrs@apple.com>
7632         * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
7633         (type_decays_to): Likewise.
7634         * class.c (find_final_overrider): Likewise.
7635         (maybe_note_name_used_in_class): Likewise.
7636         * decl.c (current_tmpl_spec_kind): Likewise.
7637         (add_binding): Likewise.
7638         (push_class_binding): Likewise.
7639         (duplicate_decls): Likewise.
7640         (layout_var_decl): Likewise.
7641         (grokfndecl): Likewise.
7642         (grokdeclarator): Likewise.
7643         (check_default_argument): Likewise.
7644         * decl2.c (handle_class_head): Likewise.
7645         * error.c (dump_template_decl): Likewise.
7646         * init.c (build_offset_ref): Likewise.
7647         * pt.c (check_specialization_scope): Likewise.
7648         (determine_specialization): Likewise.
7649         (check_explicit_specialization): Likewise.
7650         (maybe_check_template_type): Likewise.
7651         (process_partial_specialization): Likewise.
7652         (check_default_tmpl_args): Likewise.
7653         (push_template_decl_real): Likewise.
7654         (convert_template_argument): Likewise.
7655         (try_class_unification): Likewise.
7656         (get_bindings_real): Likewise.
7657         (do_decl_instantiation): Likewise.
7658         * semantics.c (begin_function_definition): Likewise.
7659         (finish_member_declaration): Likewise.
7660         (check_multiple_declarators): Likewise.
7661         * typeck.c (comp_array_types): Likewise.
7662         (comptypes): Likewise.
7663         (expr_sizeof): Likewise.
7664         (build_binary_op): Likewise.
7665         (dubious_conversion_warnings): Likewise.
7666         (check_return_expr): Likewise.
7668 2002-08-08  Mark Mitchell  <mark@codesourcery.com>
7670         * typeck.c (build_class_member_access_expr): Do not return
7671         error_mark_node when no error has occurred.
7673 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
7675         * typeck.c (build_component_addr): Remove.
7676         (build_unary_op): Just check it's not a bitfield, and then build
7677         an ADDR_EXPR.
7679 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
7681         * class.c (convert_to_base): Correct check for error_mark_node.
7682         (create_vtable_ptr): Remove unused VFUNS_P parm.
7684 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
7686         * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
7688 2002-08-07  Mark Mitchell  <mark@codesourcery.com>
7690         Rework build_component_ref.
7691         * call.c (build_vfield_ref): Do not go through build_component_ref.
7692         (build_field_call): Use build_class_member_access_expr.
7693         (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
7694         (build_object_call): Likewise.
7695         * class.c (convert_to_base): New function.
7696         (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
7697         (instantiate_type): Handle BASELINKs.
7698         * cp-tree.def (BASELINK): New tree code.
7699         * cp-tree.h (BASELINK_P): Reimplement.
7700         (SET_BASELINK_P): Remove.
7701         (BASELINK_BINFO): Reimplement.
7702         (BASELINK_FUNCTIONS): Likewise.
7703         (BASELINK_ACCESS_BINFO): Likewise.
7704         (BASELINK_OPTYPE): Likewise.
7705         (convert_to_base): New function.
7706         (name_p): Likewise.
7707         (build_object_ref): Remove.
7708         (build_component_ref_1): Likewise.
7709         (build_component_ref): Likewise.
7710         (build_x_component_ref): Likewise.
7711         (build_class_member_access_expr): New function.
7712         (finish_class_member_access_expr): Likewise.
7713         (build_ptrmemfunc_access_expr): Likewise.
7714         * decl.c (grokdeclarator): Handle BASELINKs.
7715         * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
7716         finish_class_member_access_expr.
7717         (arg_assoc): Handle BASELINKs.
7718         (do_class_using_decl): Likewise.
7719         * error.c (dump_decl): Likewise.
7720         (dump_expr): Use build_ptrmemfunc_access_expr.
7721         * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
7722         destructors.
7723         (build_throw): Use BASELINK_FUNCTIONS.
7724         * init.c (perform_member_init): Use
7725         build_class_member_access_expr.
7726         (build_offset_ref): Handle BASELINKs.  Use
7727         build_class_member_access_expr.
7728         * method.c (hack_identifier): Likewise.
7729         * parse.y (do_id): Use BASELINK, not TREE_LIST.
7730         (primary): Remove uses of build_object_ref.
7731         * pt.c (lookup_template_function): Handle BASELINKs.
7732         (resolve_overloaded_unification): Likewise.
7733         * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
7734         (lookup_field): Use BASELINK, not TREE_LIST.
7735         (lookup_fnfiels): Likewise.
7736         (setup_class_bindings): Likewise.
7737         * semantics.c (finish_object_call_expr): Do not use
7738         build_method_call when we already know what function is being
7739         called.
7740         * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
7741         * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
7742         TREE_CHAIN.
7743         (name_p): New function.
7744         * typeck.c (build_object_ref): Remove.
7745         (build_component_ref_1): Likewise.
7746         (build_x_component_ref): Likewise.
7747         (build_class_member_access_expr): New function.
7748         (finish_class_member_access_expr): Likewise.
7749         (build_ptrmemfunc_access_expr): Likewise.
7750         (get_member_function_from_ptrfunc): Use
7751         build_ptrmemfunc_access_expr.
7752         (build_binary_op): Likewise.
7753         (build_unary_op): Likewise.
7754         (build_ptrmemfunc): Likewise.
7755         (pfn_from_ptrmemfunc): Likewise.
7756         * typeck2.c (build_m_component_ref): Adjust comment.
7758 2002-08-07  Neil Booth  <neil@daikokuya.co.uk>
7760         * Make-lang.in (CXX_C_OBJS): Update.
7761         * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
7762         * cp-tree.h (cxx_decode_option): Remove.
7763         * decl2.c (compare_options, lang_f_options, unsupported_options,
7764         cxx_decode_option): Remove.
7766 2002-08-06  Gabriel Dos Reis  <gdr@nerim.net>
7768         * typeck.c (build_x_unary_op): Handle pointer-to-member.
7770 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
7772         * class.c: Don't include obstack.h.
7773         (popclass):
7774         * decl2.c: Delete bogus comment.
7775         * error.c: Don't include obstack.h.
7776         * except.c: Likewise.
7777         (dump_type): Correct comment.
7778         * method.c: Don't include obstack.h.
7779         * tree.c: Likewise.
7781 2002-08-04  Gabriel Dos Reis  <gdr@nerim.net>
7783         Fix PR/2213
7784         * cvt.c (cp_convert_to_pointer): Reject conversions from integral
7785         expressions to pointer-to-data-member of pointer-to-member-functions.
7787 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
7789         * cvt.c (ocp_convert): Delete obsolete code.
7790         * parse.y (permanent_obstack): Delete declaration.
7791         * pt.c (permanent_obstack): Delete declaration.
7792         * repo.c (permanent_obstack): Delete declaration.
7793         (open_repo_file): Use xmalloc instead of permanent_obstack.
7794         (init_repo): Use xstrdup instead of permanent_obstack.
7796 2002-08-04  Nathan Sidwell  <nathan@codesourcery.com>
7798         * cp-tree.h (VF_DERIVED_VALUE): Remove.
7799         * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
7801 2002-08-03  Nathan Sidwell  <nathan@codesourcery.com>
7803         PR 7470.
7804         C++ ABI change - vfunc ordering.
7805         * class.c (add_virtual_function): Remove.
7806         (dfs_modify_all_vtables): Take list of all declared
7807         virtuals. Assign all that are not in primary base.
7808         (check_for_override): Adjust comments.
7809         (create_vtable_ptr): Take single list of virtuals. Build chain
7810         of declared virtuals here.
7811         (layout_class_type): Take single list of virtuals. Adjust.
7812         (finish_struct_1): Keep virtuals on single list. Adjust.
7814 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
7816         * init.c (build_member_call): Use build_new_method_call, not
7817         build_method_call.
7819 2002-08-02  Krister Walfridsson  <cato@df.lth.se>
7821         * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
7823 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
7825         * call.c (build_method_call): Issue a more helpful error message
7826         about ambiguous method names.
7828 2002-08-02  Nathan Sidwell  <nathan@codesourcery.com>
7830         * tree.c (build_shared_int_cst): Make cache file scope, and
7831         GTY it.
7833 2002-08-02  Jason Merrill  <jason@redhat.com>
7835         * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
7836         (cp_expr_size): New fn.
7837         * call.c (build_over_call): Lose empty class hackery.
7838         (convert_arg_to_ellipsis): Promote non-POD warning to error.
7839         * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
7841         * semantics.c (expand_body): Do tree optimization in the function
7842         context, too.
7844 2002-08-01  Neil Booth  <neil@daikokuya.co.uk>
7846         * cp-tree.h: Move all warning and flag declarations to c-common.h.
7847         * decl.c: Move all warning and flag variables to c-common.c.
7848         * decl2.c: Move all warning and flag variables to c-common.c.
7849         * lex.c (flag_digraphs): Remove.
7850         (warn_traditional): Now in c-common.c.
7852 2002-07-31  Mark Mitchell  <mark@codesourcery.com>
7854         * call.c (build_field_call): Do not look up the field by name.
7855         (build_method_call): Simplify.
7856         (struct z_candidate): Add access_path and conversion_path.  Remove
7857         basetype_path.
7858         (convert_class_to_reference): Adjust use of
7859         add_function_candidate.
7860         (add_candidate): Add conversion_path argument.
7861         (add_function_candidate): Use it.
7862         (add_conv_dndidate): Likewise.
7863         (build_builtin_candidate): Likewise.
7864         (add_template_candidate_real): Add conversion_path argument.
7865         (add_template_conv_candidate): Likewise.
7866         (add_template_candidate): Likewise.
7867         (build_user_type_conversion_1): Use it.
7868         (build_new_function_call): Remove name lookup code.  Adjust use of
7869         add_template_candidate and add_function_candidate.
7870         (build_new_op): Likewise.
7871         (convert_like_real): Use build_special_member_call.
7872         (build_over_call): Use cand->conversion_path.
7873         (build_special_member_call): New method.
7874         (build_new_method_call): Remove name lookup code.
7875         * cp-tree.def (OFFSET_REF): Update documentation.
7876         (TEMPLATE_ID_EXPR): Likewise.
7877         * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
7878         (BASELINK_OPTYPE): Likewise.
7879         (build_new_method_call): Adjust prototype.
7880         (build_special_member_call): New method.
7881         (build_baselink): New method.
7882         (build_offset_ref_call_from_tree): Likewise.
7883         (build_call_from_tree): Likewise.
7884         (finish_qualified_call_expr): Remove.
7885         (finish_call_expr): Adjust prototype.
7886         (build_x_function_call): Remove.
7887         * cvt.c (ocp_convert): Use build_special_member_call.
7888         * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
7889         (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
7890         CALL_EXPR.
7891         (build_offset_ref_call_from_tree): New function.
7892         (build_call_from_tree): Likewise.
7893         * init.c (expand_cleanup): Use build_special_member_call.
7894         (expand_default_init): Likewise.
7895         (build_member_call): Use finish_call_expr.
7896         (build_new_1): Use build_special_member_call.
7897         (push_base_cleanups): Likewise.
7898         * method.c (do_build_assign_ref): Likewise.
7899         * parse.y (template_id): Do not pass a COMPONENT_REF to
7900         lookup_template_function.
7901         (primary): Use parse_finish_call_epxr, not finish_call_expr.
7902         (parse_finish_call_expr): New function.
7903         * pt.c (lookup_template_function): Add assertions.
7904         * search.c (lookup_base): Allow T to be a binfo.
7905         (build_baselink): New function.
7906         (lookup_member): Use it.
7907         * semantics.c (finish_call_expr): Do not do name lookup.
7908         (finish_object_call_expr): Remove #if 0'd code.
7909         (finish_qualified_call_expr): Remove.
7910         * typeck.c (build_x_function_call): Remove.
7911         (build_static_case): Use build_special_member_call.
7912         * typeck2.c (build_functional_cast): Likewise.
7914 2002-07-30  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
7916         * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
7918 2002-07-30  Gabriel Dos Reis  <gdr@nerim.net>
7920         * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
7922 2002-07-30  Nathan Sidwell  <nathan@codesourcery.com>
7924         * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
7925         documentation.
7927 2002-07-29  Alan Modra  <amodra@bigpond.net.au>
7929         * cp-tree.h: Comment typo fix.
7931 2002-07-29  Richard Earnshaw  <rearnsha@arm.com>
7933         * spew.c (space_for_token): Allocate zeroed memory for a new token
7934         chunk.
7936 2002-07-27  Roger Sayle  <roger@eyesopen.com>
7938         * decl.c (builtin_function_1): No need to explicitly mark
7939         BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
7941 2002-07-27  Roger Sayle  <roger@eyesopen.com>
7943         * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
7945 2002-07-26  Jason Merrill  <jason@redhat.com>
7947         * call.c (build_over_call): Likewise.
7948         (cp_convert_parm_for_inlining): New fn.
7949         (convert_for_arg_passing): New fn.
7950         (convert_default_arg, build_over_call): Use it.
7951         (type_passed_as): New fn.
7952         * pt.c (tsubst_decl): Use it.
7953         * decl2.c (cp_build_parm_decl): New fn.
7954         (build_artificial_parm): Use it.
7955         (start_static_storage_duration_function): Likewise.
7956         * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
7957         (grokparms): Don't mess with DECL_ARG_TYPE.
7958         * typeck.c (convert_arguments): Use convert_for_arg_passing.
7959         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
7960         Define.
7961         * cp-tree.h: Declare new fns.
7963 2002-07-26  Neil Booth  <neil@daikokuya.co.uk>
7965         * cp-tree.h (flag_operator_names): Remove.
7966         * decl2.c (flag_operator_names): Remove.
7967         (lang_f_options): Remove operator-names.
7968         * lex.c (D_OPNAME): Remove.
7969         (reswords): Remove operator names.
7970         (rid_to_yy): Remove operator names.
7971         (init_reswords): No need to handle D_OPNAME.
7972         * spew.c (read_process_identifier): There are no operator
7973         names.
7975 2002-07-26  Jason Merrill  <jason@redhat.com>
7977         * dump.c (cp_dump_tree): Call c_dump_tree.
7978         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
7980 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
7982         * error.c (print_whitespace): Remove.
7983         * g++spec.c (LIBUNWIND): Move.
7984         * mangle.c (mangled_position, write_signed_number): Remove.
7986 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
7988         * decl2.c (cxx_decode_option): Similarly.
7990 2002-07-25  Gabriel Dos Reis  <gdr@nerim.net>
7992         * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
7993         (cxx_sizeof_or_alignof_type): Take a third argument.
7994         (cxx_sizeof): Adjust definition.
7995         (cxx_alignof): Likewise.
7996         * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
7997         * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
7998         complaining.
7999         (c_sizeof_nowarn): Remove definition.
8000         (build_unary_op): Use cxx_sizeof_nowarn.
8002 2002-07-24  Geoffrey Keating  <geoffk@redhat.com>
8004         * tree.c (cp_build_qualified_type_real): When copying
8005         pointer-to-method types, unshare the record that holds
8006         the cached pointer-to-member-function type.
8008 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
8010         * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
8012 2002-07-23  Gabriel Dos Reis  <gdr@nerim.net>
8014         Fix PR/7363:
8015         * typeck.c (cxx_sizeof_or_alignof_type): New function.
8016         (c_sizeof): Remove definition.
8017         (expr_sizeof): Use cxx_sizeof.
8018         * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
8019         * decl.c (finish_destructor_body): Use cxx_sizeof.
8020         * semantics.c (finish_alignof): Likewise.
8021         (finish_alignof): Use cxx_alignof.
8022         * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
8023         (cxx_sizeof_or_alignof_type): Declare.
8024         (my_friendly_assert): Move to ../c-common.h.
8026 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
8028         * class.c, method.c, pt.c, search.c: Don't define obstack macros.
8030 2002-07-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8032         PR c++/7347, c++/7348
8033         * cp-tree.h (tsubst_flags_t): Add tf_parsing.
8034         * decl.c (make_typename_type): Use it.
8035         (make_unbound_class_template): Likewise.
8036         (lookup_name_real): Don't call type_access_control if scope is
8037         template parameter dependent.
8038         * parse.y (template_arg): Call make_unbound_class_template with
8039         tf_parsing set.
8040         (nest_name_specifier): Call make_typename_type with tf_parsing set.
8041         (typename_sub0): Likewise.
8042         (typename_sub1): Likewise.
8043         (instantiate_decl): Push class scope.
8044         * pt.c (regenerate_decl_from_template): Call pushclass and popclass
8045         for both static variable and member function template.
8046         (instantiate_decl) Call pushclass and popclass when tsubst'ing type
8047         and arguments.
8048         * search.c (type_access_control): Do type access for TEMPLATE_DECL
8049         too.
8051 2002-07-20  Roger Sayle  <roger@eyesopen.com>
8053         * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
8054         test by using positive_option.  Make whitespace consistent.
8056 2002-07-20  Gabriel Dos Reis  <gdr@nerim.net>
8058         * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
8059         members with 'locus'.  Adjust use throughout.
8060         (struct feed):  Likewise.
8061         (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
8062         Adjust use.
8063         (snarf_defarg): Use error(), not error_with_file_and_line().
8065 2002-07-19  Chris Demetriou  <cgd@broadcom.com>
8067         * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
8068         cpp_options is included.
8070 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8072         PR c++/2862, c++/2863
8073         * pt.c (determine_specialization): Compare the length of
8074         TYPE_ARG_TYPES.  Tidy.
8076 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8078         PR c++/3797
8079         * decl.c (duplicate_decls): Don't propagate inlining parameters from
8080         olddecl to newdecl when newdecl is a specialization of the
8081         instantiation olddecl.
8083 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8085         PR c++/4802, c++/5387
8086         * decl.c (make_typename_type): Use enforce_access.
8088 2002-07-17  Scott Snyder <snyder@fnal.gov>
8090         PR c++/7320
8091         * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
8093 2002-07-12  Mark Mitchell  <mark@codesourcery.com>
8095         * class.c (add_method): Correct handling of conversion operators.
8097 2002-07-11  Mark Mitchell  <mark@codesourcery.com>
8099         PR c++/7224
8100         * class.c (add_method): Simplify.
8102 2002-07-11  Jason Merrill  <jason@redhat.com>
8104         PR c++/7279
8105         * tree.c (cp_copy_res_decl_for_inlining): Also copy
8106         TREE_ADDRESSABLE.
8108 2002-07-10  Graham Stott  <graham.stott@btinternet.com>
8110         * pt.c (template_parm_this_level_p, push_template_decl_real):
8111         Pass depth as int pointer.
8113 2002-07-11  Tim Josling  <tej@melbpc.org.au>
8115         Remove front end hard coding from gengtype.c.
8117         * config-lang.in (gtfiles): Add files needed for this front end.
8119 2002-07-10  Mark Mitchell  <mark@codesourcery.com>
8121         * cp-tree.h (unqualified_name_lookup_error): Declare it.
8122         (begin_function_definition): Adjust prototype.
8123         * lex.c (unqualified_name_lookup_error): New function, split out
8124         from ...
8125         (do_identifier): ... here.
8126         * parse.y (parse_begin_function_definition): New function.
8127         (fn.def1): Use it.
8128         * semantics.c (begin_function_definition): Accept decl-specifiers
8129         and attributes as separate parameters.
8131 2002-07-10  Jason Merrill  <jason@redhat.com>
8133         PR c++/6255
8134         * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
8135         modifying the old one.
8137 2002-07-09  Mark Mitchell  <mark@codesourcery.com>
8139         * cp-tree.h (constructor_name_p): Declare it.
8140         (check_template_template_default_arg): Likewise.
8141         * class.c (handle_using_decl): Use constructor_name_p.
8142         * decl.c (grokdeclarator): Likewise.
8143         * decl2.c (constructor_name_p): Define it.
8144         * init.c (build_member_call): Use constructor_name_p.
8145         * parse.y (template_parm): Use check_template_template_default_arg.
8146         * pt.c (check_explicit_specialization): Use constructor_name_p.
8147         * semantics.c (check_template_template_default_arg): New function.
8149 2002-07-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8151         * pt.c (can_complete_type_without_circularity): Add static to
8152         function definition.
8154 2002-07-08  Mark Mitchell  <mark@codesourcery.com>
8156         * cp-tree.h (have_extern_spec): Declare it
8157         * decl.c (have_extern_spec): Define it.
8158         (start_decl): Eliminate use of used_extern_spec.
8159         (start_function): Likewise.
8160         * parse.y (have_extern_spec): Remove declaration.
8161         (used_extern_spec): Likewise.
8162         (frob_specs): Eliminate use of used_extern_spec.
8163         (.hush_warning): Likewise.
8165 2002-07-07  Mark Mitchell  <mark@codesourcery.com>
8167         * Make-lang.in (cp/parse.o): Depend on decl.h.
8168         * cp-tree.h (do_decl_instantiation): Change prototype.
8169         * parse.y: Include decl.h.
8170         (parse_decl_instantiation): New function.
8171         (explicit_instantiation): Use it.
8172         * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
8173         and DECLSPECS.
8175 2002-07-07  Roger Sayle  <roger@eyesopen.com>
8177         * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
8178         constructor and destructor tests when passed a TEMPLATE_DECL.
8180 2002-07-05  Jason Merrill  <jason@redhat.com>
8182         * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
8183         pointers.
8185         PR optimization/7145
8186         * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
8188 2002-07-05  Nathan Sidwell  <nathan@codesourcery.com>
8190         Repair damage on weak-impared targets caused by my previous patch.
8191         * cp-tree.h (import_export_tinfo): Add parameter.
8192         * decl2.c (import_export_tinfo): Add parameter, post adjust
8193         DECL_COMDAT.
8194         * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
8195         import_export_tinfo.
8197 2002-07-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8199         PR c++/6944
8200         * init.c (build_aggr_init): Remove qualifiers of init before calling
8201         build_vec_init.
8202         (build_vec_init): Flatten multi-dimensional array during cleanup.
8203         (build_vec_delete_1): Abort if the type of each element is array.
8205 2002-07-03  Graham Stott  <graham.stott@btinternet.com>
8207         * pt.c (instantiate_class_template): Fix typo.
8209 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8211         * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
8212         by CVS conflict in my last patch.
8214 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8216         PR c++/6716
8217         * pt.c (can_complete_type_without_circularity): New function.
8218         (instantiate_class_template): Use it.
8219         * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
8220         message due to incomplete fields.
8222 2002-07-01  Mark Mitchell  <mark@codesourcery.com>
8224         PR c++/7112
8225         * mangle.c (write_expression): Add mangling for sizeof when
8226         applied to a type.
8227         * operators.def: Remove stale comment.
8229 2002-06-30  Nathan Sidwell  <nathan@codesourcery.com>
8231         * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
8232         (CPTI_TYPE_INFO_PTR_TYPE): ... this.
8233         (tinfo_decl_type): Replace with ...
8234         (type_info_ptr_type): ... this.
8235         (import_export_tinfo): Declare.
8236         (tinfo_decl_p): Rename to ...
8237         (unemitted_tinfo_decl_p): ... this.
8238         * decl2.c (import_export_decl): Break out tinfo handling into ...
8239         (import_export_tinfo): ... here. New function.
8240         (finish_file): Adjust.
8241         * rtti.c (TINFO_REAL_NAME): New macro.
8242         (init_rtti_processing): Create the tinfo types.
8243         (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
8244         (get_tinfo_decl): Adjust.
8245         (get_tinfo_ptr): New function.
8246         (get_type_id): Use it.
8247         (tinfo_base_init): Create vtable decl here, if it doesn't exist.
8248         (ptr_initializer): Use get_tinfo_ptr.
8249         (ptm_initializer): Likewise.
8250         (synthesize_tinfo_var): Break into ...
8251         (get_pseudo_ti_init): ... this. Just create the initializer.
8252         (get_pseudo_ti_desc): .. and this.
8253         (create_real_tinfo_var): Remove.
8254         (create_pseudo_type_info): Don't create the vtable decl here.
8255         (get_vmi_pseudo_type_info): Remove.
8256         (create_tinfo_types): Adjust.
8257         (tinfo_decl_p): Rename to ...
8258         (unemitted_tinfo_decl_p): ... here. Adjust.
8259         (emit_tinfo_decl): Adjust. Create the initializer.
8261 2002-06-27  Mark Mitchell  <mark@codesourcery.com>
8263         PR c++/6695
8264         * pt.c (tsubst_friend_class): Substitute into the context of the
8265         friend before using it.
8267 2002-06-26  Mark Mitchell  <mark@codesourcery.com>
8269         * cp-tree.h (xref_tag): Change prototype.
8270         (handle_class_head): Likewise.
8271         (build_x_component_ref): Likewise.
8272         * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
8273         (xref_tag): Take attributes as a separate parameter.
8274         (xref_tag_from_type): Adjust call to xref_tag.
8275         * decl2.c (build_expr_from_tree): Adjust call to
8276         build_x_component_ref.
8277         (handle_class_head): Take attributes as a separate parameter.
8278         * parse.y (parse_xref_tag): New function.
8279         (parse_handle_class_head): Likewise.
8280         (primary): Use parse_xref_tag.
8281         (class_head_decl): Use parse_handle_class_head.
8282         (class_head_defn): Likewise.
8283         * rtti.c (init_rtti_processing): Adjust call to xref_tag.
8284         (build_dynamic_cast_1): Likewise.
8285         (create_pseudo_type_info): Likewise.
8286         (emit_support_tinfos): Likewise.
8287         * typeck.c (build_object_ref): Adjust call to
8288         build_x_component_ref.
8289         (build_x_component_ref): Remove protect parameter.
8291 2002-06-25  Mark Mitchell  <mark@codesourcery.com>
8293         * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
8294         * class.c (handle_using_decl): Likewise.
8295         (instantiate_type): Likewise.
8296         * cp-tree.h (BASELINK_FUNCTIONS): New macro.
8297         (xref_basetypes): Change prototype.
8298         (begin_mem_initializers): New function.
8299         (get_overloaded_fn): Likewise.
8300         * decl.c (xref_basetypes): Simplify.
8301         * error.c (dump_expr): Use BASELINK_FUNCTIONS.
8302         * init.c (build_offset_ref): Likewise.
8303         * parse.y (base_init): Use begin_mem_initializers().
8304         (structsp): Adjust call to xref_basetypes.
8305         * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
8306         (instantiate_class_template): Adjust call to xref_basetypes.
8307         * semantics.c (begin_mem_initializers): New function.
8308         * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
8309         (really_overlaoded_fn): Likewise.
8310         (get_overloaded_fn): New function.'
8311         (get_first_fn): USe BASELINK_FUNCTIONS.
8313 2002-06-24  Mark Mitchell  <mark@codesourcery.com>
8315         * cp-tree.h (SCALAR_TYPE_P): New macro.
8316         (check_for_out_of_scope_variable): New function.
8317         (at_class_scope_p): Likewise.
8318         (finish_fname): Likewise.
8319         * class.c (finish_struct): Use at_function_scope_p.
8320         * decl.c (check_for_out_of_scope_variable): New function, split
8321         out from do_identifier.
8322         (finish_enum): Use at_function_scope_p.
8323         * lex.c (do_identifier): Use check_for_out_of_scope_variable.
8324         * parse.y (VAR_FUNC_NAME): Give it <ttype>.  Use finish_fname.
8325         (primary): Use at_function_scope_p.
8326         * search.c (at_class_scope_p): New function.
8327         * semantics.c (finish_fname): Likewise.
8328         (check_multiple_declarators): Use at_function_scope_p.
8330 2002-06-23  Mark Mitchell  <mark@codesourcery.com>
8332         * parse.y (parse_scoped_id): New function.
8333         (primary): Use it.
8334         * cp-tree.h (do_scoped_id): Adjust declaration.
8335         * lex.c (do_scoped_id): Remove call to yylex.
8336         * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
8337         * typeck2.c (add_exception_specifier): Use tree_cons, rather than
8338         expanding it inline.
8340 2002-06-23  Matt Thomas  <matt@3am-software.com>
8342         * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
8343         "#if VMS_TARGET".
8345 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8347         * mangle.c (integer_type_codes): Const-ify.
8349 2002-06-20  Richard Henderson  <rth@redhat.com>
8351         PR c++/6747
8352         * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
8353         Call put_var_into_stack.
8355 2002-06-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8357         * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
8358         array size calculation.
8360 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8362         PR c++/6892
8363         * pt.c (tsubst_expr): Handle FILE_STMT.
8365 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8367         PR c++/6723
8368         * pt.c (lookup_template_class): Don't build complete argument of
8369         BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
8370         argument.
8372 2002-06-19  Akim Demaille  <akim@epita.fr>
8374         * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
8375         decl.h's TYPENAME.
8376         * spew.c, lex.c: Adjust.
8377         * parse.y (explicit_instantiation): Add empty action to override
8378         the default $$ = $1 where it introduces a type clash.
8380 2002-06-14  Jason Merrill  <jason@redhat.com>
8382         * semantics.c (begin_for_stmt): Push the 'for' scope before
8383         adding the FOR_STMT.
8385         C++ ABI changes.
8386         * class.c (build_base_field): Set DECL_PACKED.
8387         (layout_class_type): Don't use tail padding of PODs.
8388         * mangle.c (write_unqualified_name): Fix template conversion op
8389         mangling.
8391 2002-06-16  Richard Henderson  <rth@redhat.com>
8393         PR opt/6793
8394         * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
8395         after template instantiation.
8397 2002-06-16  Richard Henderson  <rth@redhat.com>
8399         * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
8401 2002-06-15  Gabriel Dos Reis  <gdr@codesourcery.com>
8403         * cp-tree.h (compiler_error): Remove declaration.
8404         * lex.c (compiler_error): Remove definition.
8406 2002-06-14  Steve Ellcey  <sje@cup.hp.com>
8408         * g++spec.c (LIBUNWIND): New.
8409         (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
8411 2002-06-13  Jessica Han  <jessica@cup.hp.com>
8413         * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
8414         (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
8415         (build_vbase_offset_vtbl_entries): Likewise.
8416         * rtti.c (build_headof): Likewise.
8417         (get_tinfo_decl_dynamic): Likewise.
8418         (create_pseudo_type_info): Likewise.
8420 2002-06-12  Stan Shebs  <shebs@apple.com>
8422         * mpw-config.in: Remove file, no longer used.
8423         * mpw-make.sed: Ditto.
8425 2002-06-07  Zack Weinberg  <zack@codesourcery.com>
8427         * decl2.c: Update call to cpp_handle_option.
8429 2002-06-07  H.J. Lu  (hjl@gnu.org)
8431         * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
8433 2002-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
8435         * error.c (cp_error_at): Fix typo.
8437 2002-06-04  Gabriel Dos Reis  <gdr@codesourcery.com>
8439         * error.c (cp_diagnostic_starter): Adjust call.
8440         (maybe_print_instantiation_context): Change prototype to take a
8441         'diagnostic_info *'.
8442         (print_instantiation_full_context): Likewise.
8443         (print_instantiation_partial_context): Likewise.
8444         (cp_diagnostic_starter): Likewise.
8445         (cp_diagnostic_finalizer): Likewise.
8446         (cp_print_error_function): Likewise.
8447         (cp_printer): Take a secondary parameter as a 'text_info *'.
8448         Remove output_state savings.  Adjust calls.
8450 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
8452         * pt.c (inline_parm_levels): Mark for GC.
8454         * mangle.c (start_mangling): Allocate G.substitutions here...
8455         (init_mangle): ... rather than here.
8456         (finish_mangling): Clear the varray pointer when done with it.
8457         * spew.c (yylexstring): Don't use VARRAY_FREE.
8458         * search.c (bfs_walk): Don't use VARRAY_FREE.
8459         * decl2.c (pending_statics): Use gengtype to mark.
8460         (deferred_fns): Likewise.
8461         (ssdf_decls): Likewise.
8462         (init_decl2): Delete.
8463         * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
8464         (cxx_init_decl_processing): Don't call init_decl2.
8465         (cxx_pop_function_context): Don't use VARRAY_FREE.
8466         * cp-tree.h (struct saved_scope): No need for special marking
8467         of varrays.
8468         (struct language_function): Likewise.
8469         (local_classes): Use gengtype to mark.
8470         (init_decl2): Delete prototype.
8471         * class.c (init_class_processing): Don't use
8472         ggc_add_tree_varray_root.
8473         (build_vtbl_initializer): Don't use VARRAY_FREE.
8475         * decl.c (typename_compare): Don't use same_type_p.
8477         * decl.c: Include hashtab.h instead of hash.h.
8478         (typename_hash): Update to use htab_h.
8479         (typename_compare): Likewise.
8480         (typename_htab): Use gengtype to mark.
8481         (build_typename_type): Update to use htab_h.
8482         * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
8484         * Make-lang.in (gt-cp-tree.h): New rule.
8485         (cp/tree.o): Depend on gt-cp-tree.h.
8486         * config-lang.in (gtfiles): Add cp/tree.c.
8487         * tree.c: Include gt-cp-tree.h.
8488         (list_hash_table): Use gengtype to mark.
8489         (init_tree): Use gengtype to mark trees.
8491         * Make-lang.in (cp/decl.o): Add debug.h dependency.
8492         * call.c (struct z_candidate): Use gengtype.
8493         (USER_CONV_CAND): Use WRAPPER_ZC.
8494         (convert_class_to_reference): Use build_zc_wrapper.
8495         (build_type_conversion_1): Likewise.
8496         (build_over_call): Use WRAPPER_ZC.
8497         (add_warning): Use build_zc_wrapper.
8498         * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
8499         * cp-tree.h (struct lang_identifier): Use gengtype.
8500         (struct template_parm_index_s): Likewise.
8501         (struct ptrmem_cst): Likewise.
8502         (struct tree_binding): Likewise.
8503         (struct tree_overload): Likewise.
8504         (struct tree_srcloc): Likewise.
8505         (struct tree_wrapper): Likewise.  Also modify to have a pointer
8506         to struct z_candidate rather than void.
8507         (enum cp_tree_node_structure_enum): New.
8508         (union lang_tree_node): New.
8509         (cxx_mark_tree): Delete prototype.
8510         (cp_tree_node_structure): New prototype.
8511         (build_ptr_wrapper): Delete prototype.
8512         (build_int_wrapper): Delete prototype.
8513         (build_zc_wrapper): New prototype.
8514         * decl.c: Include debug.h
8515         (cxx_mark_tree): Delete.
8516         (cp_tree_node_structure): New.
8517         * tree.c (build_ptr_wrapper): Delete.
8518         (build_int_wrapper): Delete.
8519         (build_zc_wrapper): New.
8521         * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
8522         Correct typo.  Patch from k_fukui@highway.ne.jp.
8524         * semantics.c (current_stmt_tree): Update for change to
8525         struct language_function.
8526         (finish_mem_initializers): Likewise.
8527         * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
8528         * cp-tree.h (struct language_function): Rename from
8529         cp_language_function.  Change all uses.
8530         (cp_function_chain): Don't need to cast.
8532         * class.c (duplicate_tag_error): Reset discriminator.
8533         (check_bases_and_members): Update for data structure changes.
8534         * cp-tree.h (struct lang_id2): Use gengtype.
8535         (flagged_type_tree): Likewise.
8536         (SET_LANG_ID): Use GGC on struct lang_id2.
8537         (struct cp_language_function): Use gengtype.  Remove field
8538         'x_vcalls_possible_p'.
8539         (current_vcalls_possible_p): Delete.
8540         (struct lang_type_header): New.
8541         (struct lang_type_class): Rename from struct lang_type.  Include
8542         struct lang_type_header.
8543         (struct lang_type_ptrmem): New.
8544         (struct lang_type): New.
8545         (LANG_TYPE_CLASS_CHECK): New.  Use it in all the appropriate macros.
8546         (LANG_TYPE_PTRMEM_CHECK): New.  Use it in all the appropriate macros.
8547         (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
8548         (struct lang_decl_flags): Use gengtype.  Add discriminators.
8549         (struct lang_decl): Use gengtype.  Add and use discriminators.
8550         Update the macros that reference moved fields.
8551         (LANG_DECL_U2_CHECK): New function.  Use it when appropriate.
8552         (SET_DECL_THUNK_P): Set discriminator too.
8553         (clear_inline_text_obstack): Delete prototype.
8554         (finish_inline_definitions): Delete prototype.
8555         (mark_pending_inlines): Delete prototype.
8556         (lang_check_failed): New prototype.
8557         * decl.c (struct named_label_use_list): Use gengtype.
8558         (struct named_label_list): Likewise.
8559         (mark_binding_level): Delete.
8560         (mark_named_label_lists): Delete.
8561         (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
8562         (cxx_init_decl_processing): Use generated marker routine.
8563         (begin_destructor_body): Delete dead set to
8564         current_vcalls_possible_p.
8565         (mark_lang_function): Delete.
8566         (mark_cp_function_context): Delete.
8567         (lang_mark_tree): Use generated marker routines.
8568         * decl2.c (start_objects): Set discriminator when setting
8569         GLOBAL_INIT_PRIORITY.
8570         * lex.c (retrofit_lang_decl): Set discriminators.
8571         (copy_lang_type): Update for changes to lang_type structure.
8572         (cp_make_lang_type): Set discriminator.
8573         * parse.y: Use gengtype on YYLVAL.  Don't use dots in identifiers.
8574         * search.c: Include ggc.h.
8575         * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
8576         (finish_inline_definitions): Delete.
8577         * spew.c (struct token): Use gengtype.
8578         (struct token_chunk): New.
8579         (struct unparsed_text): Use gengtype.  Store tokens in chunks.
8580         (struct feed): Use gengtype.
8581         (feed_obstack): Delete.
8582         (feed): Mark as GC root.
8583         (pending_inlines): Mark as GC root.
8584         (pending_inlines_tail): Likewise.
8585         (processing_these_inlines): Likewise.
8586         (token_obstack): Make static.
8587         (first_token): Likewise.
8588         (init_spew): Don't initialize deleted things; use gengtype for roots.
8589         (clear_inline_text_obstack): Delete.
8590         (feed_input): Use GC for struct feed.  Update for changes to
8591         struct unparsed_text.
8592         (mark_pending_inlines): Delete.
8593         (next_token): Rename from add_token.  Change all callers.  Update
8594         for changes to struct unparsed_text.
8595         (space_for_token): New.
8596         (remove_last_token): New.
8597         (alloc_unparsed_text): New.
8598         (snarf_block): Take an unparsed_text.  Update for changes to struct
8599         unparsed_text.
8600         (snarf_method): Update for changes to struct unparsed_text.
8601         (snarf_defarg): Update for changes to struct unparsed_text.
8602         * tree.c (lang_check_failed): New.
8604         * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
8605         gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
8606         (cp/spew.o): Add dependency on gt-<filename>.h.
8607         (cp/decl2.o): Add dependency on gt-<filename>.h.
8608         (cp/call.o): Add dependency on gt-<filename>.h.
8609         (cp/pt.o): Add dependency on gt-<filename>.h.
8610         (cp/repo.o): Add dependency on gt-<filename>.h.
8611         (cp/parse.o): Add dependency on gt-<filename>.h.
8612         * call.c: Use gengtype for roots.
8613         * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
8614         decl2.c parse.y pt.c repo.c spew.c.
8615         * cp-tree.h: Use gengtype for roots.
8616         (struct saved_scope): Use GGC, gengtype.
8617         (cp_parse_init): Delete prototype.
8618         (init_pt): Delete prototype.
8619         * decl.c: Use gengtype for roots.
8620         (mark_saved_scope): Delete.
8621         (cxx_init_decl_processing): Don't call deleted initilisation
8622         routines.
8623         (signed_size_zero_node): Delete, unused.
8624         * decl.h: Use gengtype for roots.
8625         * decl2.c: Use gengtype for roots.
8626         * lex.h: Use gengtype for roots.
8627         * parse.y: Use gengtype for roots.
8628         (cp_parse_init): Delete.
8629         * pt.c: Use gengtype for roots.
8630         (init_pt): Delete.
8631         * repo.c: Use gengtype for roots.
8632         * spew.c: Use gengtype for roots.
8634         * Make-lang.in: Allow for filename changes.  Add gtype-cp.h.
8635         (cp/decl.o): Add dependency on gtype-cp.h.
8636         * decl.c: Remove use of add_deletable_root, use GTY marker instead.
8637         Include gtype-cp.h.  Allow for filename changes.
8639         * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
8640         (cp/decl.o): Add cp/gt-decl.h dependency.
8641         * config-lang.in (gtfiles): New.
8642         * tree.h: Rename struct binding_level to struct cp_binding_level.
8643         * decl.c: Rename struct binding_level to struct cp_binding_level.
8644         Include cp/gt-decl.h.
8645         (struct cp_binding_level): Use gengtype.
8646         (make_binding_level): Use GGC on struct cp_binding_level.
8647         (mark_binding_level): Use gt_ggc_m_cp_binding_level.
8648         (cxx_init_decl_processing): Mark free_binding_level as
8649         deletable.
8651         * decl.c (mark_cp_function_context): Update calling sequence.
8653         * decl.c (start_function): Don't free 'struct
8654         cp_language_function'.
8655         (pop_cp_function_context): Likewise.
8656         (save_function_data): Allocate it using GC.
8657         * semantics.c (genrtl_start_function): Don't free 'struct
8658         cp_language_function'.
8660 2002-05-31  Matthew Woodcraft  <mattheww@chiark.greenend.org.uk>
8662         * lang-specs.h: Use cpp_debug_options.
8664 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
8666         * mangle.c, tree.c: Include real.h.
8667         * Make-lang.in: Update dependency lists.
8669 2002-05-25  Neil Booth  <neil@daikokuya.demon.co.uk>
8671         * lex.c: Don't include c-lex.h.
8672         * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
8674 2002-05-23  Neil Booth  <neil@daikokuya.demon.co.uk>
8676         * spew.c (yyungetc, snarf_block): Remove indent_level handling.
8678 2002-05-22  Richard Henderson  <rth@redhat.com>
8680         * decl.c (obscure_complex_init): Check for VAR_DECL
8681         before using DECL_THREAD_LOCAL.
8683 2002-05-22  Richard Henderson  <rth@redhat.com>
8685         * decl.c (check_tag_decl): Handle RID_THREAD.
8686         (obscure_complex_init): Reject run-time init of tls.
8687         (grokvardecl, grokdeclarator): Handle RID_THREAD.
8688         * lex.c (reswords): Add __thread.
8689         (rid_to_yy): Map RID_THREAD to SCSPEC.
8691 2002-05-22  Neil Booth  <neil@daikokuya.demon.co.uk>
8693         * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
8694         * cp-tree.h (cxx_post_options): Kill.
8695         * cp-lex.c (cxx_post_options): Kill.
8697 2002-05-21  Richard Henderson  <rth@redhat.com>
8699         * lex.c (rid_to_yy): Add RID_THREAD.
8701 2002-05-21  Alexandre Oliva  <aoliva@redhat.com>
8703         * init.c (build_vec_init): Test for trivial copy-assignment when
8704         copy-assigning arrays.
8706 2002-05-20  Andreas Jaeger  <aj@suse.de>
8708         * init.c (build_default_init): Remove unused variable.
8710 2002-05-20  Alexandre Oliva  <aoliva@redhat.com>
8712         * call.c (any_strictly_viable): New.
8713         (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
8715 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8717         * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
8719 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8721         PR c++/186, DR 259
8722         * pt.c (do_decl_instantiation): Don't complain explicit
8723         instantiation after explicit specialization.
8724         (do_type_instantiation): Likewise.
8726 2002-05-19  Alexandre Oliva  <aoliva@redhat.com>
8728         * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
8729         renamed from...
8730         (complete_type_or_else): ... this.  Redefined as macro.
8731         (cxx_incomplete_type_diagnostic): Declare.
8732         (cxx_incomplete_type_error): Define as macro.
8733         * init.c (build_delete): Warn about incomplete types other than
8734         void, and use the built-in operator delete for them.
8735         * typeck.c (complete_type_or_diagnostic): Renamed from
8736         complete_type_or_else.  Added warn_only argument, passed to...
8737         * typeck2.c (cxx_incomplete_type_diagnostic): ... this.  Print
8738         warnings or errors depending on new warn_only argument.  Renamed
8739         from...
8740         (cxx_incomplete_type_error): ... this.  New implementation in
8741         terms of cxx_incomplete_type_diagnostic.
8743 2002-05-18  Jason Merrill  <jason@redhat.com>
8745         PR c++/6611
8746         * decl2.c (import_export_decl): If we clear
8747         DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
8749 2002-05-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8751         PR c++/6620
8752         * pt.c (verify_class_unification): Don't check if PARM is template
8753         parameter dependent.  Simplify.
8754         (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
8755         parameter dependent expression.
8757 2002-05-14  Jason Merrill  <jason@redhat.com>
8759         * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
8760         Do set DECL_COMDAT.
8761         (synthesize_tinfo_var): Take the public decl.
8762         (create_real_tinfo_var): Likewise.  Check DECL_COMDAT.
8763         (emit_tinfo_decl): Adjust.  Call import_export_decl.
8764         * decl2.c (import_export_decl): Simplify tinfo decl handling.
8766 2002-05-14  Alexandre Oliva  <aoliva@redhat.com>
8768         * cp-tree.h (struct lang_type): Added non_zero_init.
8769         (CLASSTYPE_NON_ZERO_INIT_P): New macro.
8770         (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
8771         * class.c (check_field_decls): Test non_zero_init.
8772         * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
8773         zero-to-NULL conversions.
8774         * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
8775         type that needs zero-initialization without zeros.
8776         (check_initializer_decl): Compute zero-initializer for types
8777         that require a non-trivial one.
8778         * init.c (build_forced_zero_init): New function.
8779         (build_default_init): Use it.
8780         * tree.c (zero_init_p): New function.
8781         * typeck2.c (force_store_init_value): New function.
8782         (process_init_constructor): Create non-trivial zero-initializers
8783         for array members and class fields.
8785 2002-05-14  Neil Booth  <neil@daikokuya.demon.co.uk>
8787         * lang-specs.h: Remove redundant -lang-c++.
8789 2002-05-13  Jason Merrill  <jason@redhat.com>
8791         * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
8792         (fixed_type_or_null): See through reference vars.
8793         (build_base_path): Vtable contents are constant.
8794         * typeck.c (get_member_function_from_ptrfunc): Likewise.
8796 2002-05-12  Jason Merrill  <jason@redhat.com>
8798         * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
8799         structs are safe.
8801 2002-05-09  Neil Booth  <neil@daikokuya.demon.co.uk>
8803         * cp-tree.h (flag_ansi): Remove.
8804         * decl2.c (flag_ansi): Remove.
8805         (cxx_decode_option): Set flag_iso and flag_undef.
8807 2002-05-09  Jason Merrill  <jason@redhat.com>
8809         * typeck.c (get_member_function_from_ptrfunc): Reorganize.
8810         Use subtraction rather than a bitmask to get the index.
8811         * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
8813         * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
8815 2002-05-07  Neil Booth  <neil@daikokuya.demon.co.uk>
8817         * Make-lang.in (decl2.o): Update.
8818         * cp-tree.h (warn_multichar): Remove.
8819         * decl2.c: Include c-common.h.
8820         (warn_multichar): Remove.
8822 2002-05-03  Jason Merrill  <jason@redhat.com>
8824         * tree.c (build_cplus_array_type): Only const and volatile get
8825         special handling.
8827         * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
8829 2002-04-30  Mark Mitchell  <mark@codesourcery.com>
8831         ABI change, returning simple classes from functions.
8832         * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
8833         TYPE_HAS_TRIVIAL_INIT_REF is false or
8834         TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
8836 2002-04-30  Jason Merrill  <jason@redhat.com>
8838         PR debug/6436
8839         * decl.c (grokdeclarator): Don't override TYPE_NAME of an
8840         anonymous class with a typedef if there are attributes.
8842 2002-04-29  Paul Eggert  <eggert@twinsun.com>
8844         * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
8846 2002-04-29  Jakub Jelinek  <jakub@redhat.com>
8848         PR c++/6477
8849         * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
8850         non-NULL first.
8852 2002-04-29  Mark Mitchell  <mark@codesourcery.com>
8854         PR c++/6492
8855         * pt.c (tsubst_friend_class): If the friend has an explicit scope,
8856         enter that scope before name lookup.
8858         PR c++/6486
8859         * method.c (do_build_copy_constructor): Avoid building
8860         cv-qualified reference types.
8862 2002-04-29  Nathan Sidwell  <nathan@codesourcery.com>
8864         PR c++/5719
8865         * decl.c (grok_op_properties): Assignment ops don't have to return
8866         by value. operator% should.
8868 2002-04-28  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
8870         PR c/6343
8871         * decl.c (duplicate_decls): Call merge_weak.
8873 2002-04-26  Richard Henderson  <rth@redhat.com>
8875         * parse.y (malloced_yyss, malloced_yyvs): New.
8876         (yyoverflow): Re-add.  Set them.
8877         (free_parser_stacks): New.
8879 2002-04-26  Mark Mitchell  <mark@codesourcery.com>
8881         PR c++/6497
8882         * method.c (do_build_assign_ref): Pass a derivation to
8883         build_method_call when calling base class assignment operators.
8885 2002-04-26  Richard Henderson  <rth@redhat.com>
8887         * parse.y (yyoverflow): Revert.
8889 2002-04-26  Richard Henderson  <rth@redhat.com>
8891         PR c/3581
8892         * parse.y (string): Remove.  Update all uses to use STRING
8893         instead, and not call combine_strings.
8894         * rtti.c (tinfo_name): Use fix_string_type.
8895         * semantics.c (finish_asm_stmt): Don't call combine_strings.
8896         * spew.c (yylexstring): New.
8897         (read_token): Use it.
8899 2002-04-25  Richard Henderson  <rth@redhat.com>
8901         PR c/2161
8902         * parse.y (yyoverflow): New.
8904 2002-04-25  Jason Merrill  <jason@redhat.com>
8906         PR c++/5607
8907         * search.c (check_final_overrider): No longer static.
8908         * class.c (update_vtable_entry_for_fn): Call it.
8909         * cp-tree.h: Adjust.
8911 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
8913         * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
8914         * cp-tree.h (cxx_set_yydebug): Die.
8915         * lex.c (YYDEBUG): Get from c-lex.h.
8916         (cxx_set_yydebug): Remove.
8917         * parse.y: Include c-lex.h.
8918         (YYDEBUG): Get from c-lex.h.
8920 2002-04-24  Mark Mitchell  <mark@codesourcery.com>
8922         PR c++/6438.
8923         * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
8924         void.
8926 2002-04-24  Neil Booth  <neil@daikokuya.demon.co.uk>
8928         * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
8929         LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
8930         Redefine.
8931         * cp-tree.h (cp_attribute_table): Rename.
8932         * decl.c (lang_attribute_table): Remove declaration.
8933         (cxx_init_decl_processing): Don't set it.
8934         * tree.c (cp_attribute_table): Rename.
8936 2002-04-24  Jason Merrill  <jason@redhat.com>
8938         PR c++/6331
8939         * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
8940         * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
8941         The pedwarn for array assignment is now unconditional.
8942         * tree.c (build_cplus_array_type_1): Still process simple array types
8943         normally in templates.
8945         PR c++/6395
8946         * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
8947         stuff for comdats.
8949 2002-04-23  Jakub Jelinek  <jakub@redhat.com>
8951         * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
8952         node with attributes.
8954 2002-2-23  David O'Brien  <obrien@FreeBSD.org>
8956         * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
8957         Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
8959 2002-04-23  Mark Mitchell  <mark@codesourcery.com>
8961         PR c++/6256:
8962         * pt.c (tsubst_friend_class): Handle templates with explicit
8963         nested names.
8965         PR c++/6331:
8966         * typeck.c (merge_types): Remember the cv-qualification of pointer
8967         types when merging them.
8969 2002-04-20  Neil Booth  <neil@daikokuya.demon.co.uk>
8971         * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
8972         LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
8973         * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
8974         cxx_mark_function_context): New.
8975         * decl.c (push_cp_function_context, pop_cp_function_context,
8976         mark_cp_function_context): Rename for consistency.
8977         (cxx_init_decl_processing): Don't set old hooks.
8979 2002-04-19  Neil Booth  <neil@daikokuya.demon.co.uk>
8981         * call.c (convert_type_from_ellipsis): Rename, update.
8982         * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
8983         * cp-tree.h (convert_type_from_ellipsis): Rename.
8984         * decl.c (cxx_init_decl_processing): Don't set hook.
8986 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
8988         * call.c (build_new_method_call): Update.
8989         * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
8990         * cp-tree.h (cxx_incomplete_type_error): New.
8991         * decl.c (grokdeclarator, grokparms): Update.
8992         * decl2.c (check_classfn): Update.
8993         * pt.c (tsubst): Update.
8994         * typeck.c (complete_type_or_else, expr_sizeof,
8995         decay_conversion): Update.
8996         * typeck2.c (incomplete_type_error): Rename.
8997         (add_exception_specifier): Update.
8999 2002-04-18  Jason Merrill  <jason@redhat.com>
9001         PR c++/5658
9002         * search.c (setup_class_bindings): A class template qualifies as a
9003         type binding.
9005 2002-04-17  Jakub Jelinek  <jakub@redhat.com>
9007         PR c++/6316
9008         * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
9009         before expanding.
9011 2002-04-16  Mark Mitchell  <mark@codesourcery.com>
9013         * init.c (begin_init_stmts): Remove commented out code.
9014         (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
9015         * semantics.c (begin_gobal_stmt_expr): Adjust call to
9016         expand_start_stmt_expr.
9018 2002-04-15  Mark Mitchell  <mark@codesourcery.com>
9020         * decl.c (register_dtor_fn): Pass the address of dso_handle, not
9021         dso_handle itself, to __cxa_atexit.
9023 2002-04-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
9025         * error.c (cxx_print_error_function): Adjust call to macros.
9027 2002-04-14  Jakub Jelinek  <jakub@redhat.com>
9029         * class.c (layout_virtual_bases): Do all dsize computation on trees.
9031 2002-04-14  Jason Merrill  <jason@redhat.com>
9033         * typeck.c (get_member_function_from_ptrfunc): Don't do
9034         gratuitious division and multiplication on
9035         ptrmemfunc_vbit_in_delta targets.
9037 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
9039         PR c++/5373.
9040         * semantics.c (finish_expr_stmt): Remember the type of the
9041         expression before any conversions are performed.
9043 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
9045         PR c++/5189.
9046         * call.c (add_template_candidate_real): Do not treat member
9047         templates as copy constructors.
9049 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
9051         * decl.c (duplicate_decls): Do not copy the RTL for a variable
9052         declaration if the old variable had an incomplete type and the new
9053         variable does not.
9054         (complete_vars): Do not call layout_decl for completed variables.
9056 2002-04-12  Richard Sandiford  <rsandifo@redhat.com>
9058         * decl.c (duplicate_decls): Don't try to unify an implicit typedef
9059         with an explicit one.
9060         (follow_tag_typedef): New.
9061         (lookup_tag): Use it to extract the tag of an explicit typedef.
9062         (xref_tag): Likewise.
9064 2002-04-11  Andrew Haley  <aph@redhat.com>
9066         * typeck.c (type_after_usual_arithmetic_conversions):
9067         If two types have the same variant, return immediately.
9068         When two floating-point operands are the same precision:
9069           convert to float if one of the operands is float;
9070           if neither operand is one of the standard types, return the type
9071           of the first operand.
9073 2002-04-10  Nathan Sidwell  <nathan@codesourcery.com>
9075         PR c++/5507
9076         * decl.c (make_typename_type): Remove implicit typenameness.
9078 2002-04-09  Jason Merrill  <jason@redhat.com>
9080         PR optimization/6189
9081         * semantics.c (genrtl_start_function): Don't free
9082         DECL_SAVED_FUNCTION_DATA for inline functions.
9084         * init.c (build_member_call): For now, don't convert to
9085         intermediate base if it would cause an error.
9087 2002-04-08  Paolo Carlini  <pcarlini@unitus.it>
9089         * parse.y (namespace_qualifier, maybe_identifier,
9090         begin_explicit_instantiation, end_explicit_instantiation,
9091         apparent_template_type, .finish_template_type,
9092         do_id, maybe_init, defarg_again, component_decl_1):
9093         Add ending ';', in accordance with POSIX.
9095 2002-04-06  Mark Mitchell  <mark@codesourcery.com>
9097         PR c++/5571
9098         * class.c (layout_class_type): Remember incomplete static
9099         variables.
9100         (finish_struct_1): Call complete_vars, not
9101         hack_incomplete_structures.
9102         * cp-tree.h (hack_incomplete_structures): Rename to ...
9103         (complete_vars): ... this.
9104         (struct saved_scope): Remove incomplete.
9105         (namespace_scope_incomplete): Remove.
9106         * decl.c (struct binding_level): Remove incomplete.
9107         (incomplete_vars): New variable.
9108         (mark_binding_level): Don't mark incomplete.
9109         (print_binding_level): Don't print it.
9110         (mark_saved_scope): Don't mark incomplete.
9111         (pushdecl): Use maybe_register_incopmlete_var.
9112         (cxx_init_decl_processing): Register incomplete_vars for GC.
9113         (start_decl_1): Clarify error message.
9114         (hack_incomplete_vars): Remove.
9115         (maybe_register_incomplete_var): New function.
9116         (complete_vars): Likewise.
9118 2002-04-06  Jason Merrill  <jason@redhat.com>
9120         PR c++/4934
9121         * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
9122         set before checking it.
9124         PR c++/525
9125         * init.c (build_member_call): Use build_scoped_ref.
9126         (resolve_offset_ref): Likewise.
9127         * call.c (build_scoped_method_call): Likewise.
9128         * tree.c (maybe_dummy_object): Kludge around current_class_type being
9129         wrong.
9130         * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
9131         * cp-tree.h: Adjust.
9133         * init.c (push_base_cleanups): Just use build_scoped_method_call.
9135         PR c++/6179
9136         * method.c (implicitly_declare_fn): Pass unqualified type to
9137         synthesize_exception_spec.
9139 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
9141         * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
9142         * cvt.c: Update comment.
9143         * init.c (expand_cleanup_for_base): Update.
9144         * semantics.c (finish_parenthesized_expr): Update.
9145         * typeck.c (cp_truthvalue_conversion): Update.
9147 2002-04-04  Jason Merrill  <jason@redhat.com>
9149         * semantics.c (finish_eh_cleanup): New fn.
9150         * cp-tree.h: Add prototype.
9151         * init.c (perform_member_init, expand_cleanup_for_base): Use
9152         finish_eh_cleanup.
9153         * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
9154         * cp-tree.h: Remove references.
9155         * decl.c (begin_constructor_body, end_constructor_body): Likewise.
9156         * dump.c (cp_dump_tree): Likewise.
9157         * pt.c (tsubst_expr): Likewise.
9158         * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
9159         (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
9160         * tree.c (cp_statement_code_p): Likewise.
9162         * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
9164         PR c++/5636
9165         * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
9166         cleanup for nrv.
9168         PR c++/5104
9169         * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
9170         specifiers.
9171         [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
9173 2002-04-03  Richard Henderson  <rth@redhat.com>
9175         * cp-lang.c (cxx_warn_unused_global_decl): New.
9176         (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
9178 2002-04-03  Neil Booth  <neil@daikokuya.demon.co.uk>
9180         * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
9181         * tree.c (init_tree): Don't set hook.
9183 2002-04-03  Roger Sayle  <roger@eyesopen.com>
9185         PR c++/5998:
9186         * decl.c (duplicate_decls): Don't mess with assembler names when
9187         redeclaring builtin functions as static.
9189 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
9191         * call.c (build_addr_func): Update.
9192         * class.c (resolve_address_of_overloaded_function): Update.
9193         * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
9194         * cp-tree.h (cxx_mark_addressable): New.
9195         * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
9196         * decl2.c (build_cleanup): Update.
9197         * except.c (build_throw): Update.
9198         * init.c (resolve_offset_ref): Update.
9199         * pt.c (convert_nontype_argument): Update.
9200         * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
9201         * typeck.c (decay_conversion, build_array_ref, build_unary_op,
9202         unary_complex_lvalue): Update.
9203         (mark_addressable): Rename.
9205 2002-04-01  Roger Sayle  <roger@eyesopen.com>
9207         PR c++/5998:
9208         * decl.c (duplicate_decls):  Overwrite the RTL when (and only
9209         when) overwriting a built-in function.  Don't use COPY_DECL_RTL,
9210         but follow the SET_DECL_RTL idiom used elsewhere in the function.
9212 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
9214         * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
9215         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
9216         * decl.c (grokdeclarator): Update.
9217         * mangle.c (write_integer_cst): Update.
9218         * typeck.c (build_binary_op): Update.
9220 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
9222         * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
9223         * lex.c (cxx_init): Don't set hook.
9225 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
9227         * Make-lang.in (error.o): Update.
9228         * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
9229         * cp-tree.h (struct diagnostic_context): Predeclare.
9230         (cxx_print_error_function): New.
9231         * error.c: Include langhooks-def.h.
9232         (lang_print_error_function): Rename.  Update.
9233         (init_error): Don't set hook.
9235 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
9237         * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
9238         Redefine.
9239         * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
9240         * decl.c (finish_enum): Similarly.
9241         * error.c (dump_type): Similarly.
9242         * lex.c (cxx_init): Similarly.
9243         * mangle.c (write_builtin_type): Similarly.
9244         * typeck.c (comptypes): Similarly.
9246 2002-03-28  Roger Sayle  <roger@eyesopen.com>
9248         PR c++/5998:
9249         * decl.c (cxx_init_decl_processing): Re-enable built-in functions
9250         in the g++ front-end.
9251         (duplicate_decl): Allow redefinition of anticipated built-ins.
9252         Fix inlining problem by over-writing the old DECL_RTL.
9253         (lookup_namespace_name): Fail to find an identifier in the
9254         specified namespace if its still anticipated.
9255         (builtin_function_1): New function split out from builtin_function
9256         to create a builtin in the current namespace with given context.
9257         (builtin_function): Call builtin_function_1 to define the
9258         appropriate builtins in both the std and global namespaces.
9259         (select_decl): Don't test for anticipated decls here.
9260         (unqualified_namespace_lookup): Instead ignore them whilst
9261         searching through scopes and namespaces.
9262         * decl2.c (do_nonmember_using_decl): If a using declaration
9263         specifies an anticipated built-in function, mark it as no longer
9264         anticipated in that scope.
9265         (ambiguous_decl):  Avoid resolving to an anticipated decl.
9266         * lex.c (do_scoped_id): Fail to find an identifier in the global
9267         namespace if its still anticipated.
9269 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
9271         * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
9272         * cp-tree.h (cp_make_lang_type): Rename.
9273         * lex.c (cp_make_lang_type): Rename.
9274         (make_aggr_type): Update.
9275         * tree.c (init_tree): Don't set make_lang_type_fn.
9277 2002-03-29  Jakub Jelinek  <jakub@redhat.com>
9279         PR c++/6073
9280         * class.c (finish_struct_1): Update static field's DECL_MODE even
9281         if its type is a variant of t.
9283 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
9285         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
9286         * cp-tree.h (cxx_insert_default_attributes): New.
9287         * decl.c (insert_default_attributes): Rename.
9289 2002-03-27  Mark Mitchell  <mark@codesourcery.com>
9291         PR c++/4884
9292         * call.c (build_op_delete_call): Allow for the fact the placement
9293         may be a COMPOUND_EXPR.
9295 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
9297         * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
9298         * cp-tree.h (init_cplus_expand): Remove.
9299         (cxx_expand_expr): New.
9300         * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
9301         fix prototype.
9302         (init_cplus_expand): Remove.
9303         * lex.c (cxx_init): Don't call init_cplus_expand.
9305 2002-03-26  Mark Mitchell  <mark@codesourcery.com>
9307         PR c++/4884.
9308         * init.c (build_new_1): Allow for the fact the result of
9309         build_function_call may be a COMPOUND_EXPR.
9311 2002-03-26  Nathan Sidwell  <nathan@codesourcery.com>
9313         PR c++/5682
9314         * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
9315         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
9316         (dfs_skip_nonprimary_vbases_markedp): Remove.
9317         * search.c (get_shared_vbase_if_not_primary): Remove.
9318         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
9319         (dfs_skip_nonprimary_vbases_markedp): Remove.
9320         (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
9321         (dfs_marked_real_bases_queue_p): Likewise.
9323 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
9325         * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
9326         * cp-tree.h (cxx_mark_tree): New.
9327         * decl.c (lang_mark_tree): Rename cxx_mark_tree.
9329 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
9331         * cp-tree.h (cxx_maybe_build_cleanup): New.
9332         * decl.c (destroy_local_var, hack_incomplete_structures): Update.
9333         (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
9334         * tree.c (build_target_expr): Update.
9335         * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
9337 2002-03-24  Neil Booth  <neil@daikokuya.demon.co.uk>
9339         * decl2.c (cxx_decode_option): Handle -E.
9340         * lang-specs.h (default_compilers): Preprocess with cc1plus.
9341         * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
9343 2002-03-23  Jakub Jelinek  <jakub@redhat.com>
9345         PR c++/6037
9346         * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
9348 2002-03-23  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
9350         * error.c (dump_type): Be careful about implicit typenames.
9352 2002-03-21  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
9354         PR C++/3656
9355         * semantics.c (finish_base_specifier): Handle erronous base
9356         classes.
9358 2002-03-22  Zack Weinberg  <zack@codesourcery.com>
9360         * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
9361         REAL_IS_NOT_DOUBLE.
9363 2002-03-22  Jeff Knaggs  <jknaggs@redhat.com>
9365         * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
9366         an index into the vtable_entry array regardless of
9367         TARGET_PTRMEMFUNC_VBIT_LOCATION.
9369 2002-03-21  Aldy Hernandez  <aldyh@redhat.com>
9371         * tree.c (cp_cannot_inline_tree_fn): Same.
9373 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
9375         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
9376         insert_block, getdecls, global_bindings_p): New.
9378 2002-03-20  Nathan Sidwell  <nathan@codesourcery.com>
9380         PR c++/4361
9381         * mangle.c (struct globals) Add internal_mangling_p member.
9382         (write_template_param): Do internal mangling, if needed.
9383         (mangle_conv_op_name_for_type): Request internal mangling.
9385 2002-03-20  Jason Merrill  <jason@redhat.com>
9387         PR c++/2136
9388         * init.c (build_delete): Check access for a member op delete here.
9389         * decl2.c (delete_sanity): Not here.
9391 2002-03-19  Jason Merrill  <jason@redhat.com>
9393         PR c++/5118
9394         * class.c (get_vfield_name): Use the constructor_name.
9396 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
9398         * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
9399         * cp-tree.h (lang_printable_name): Rename.
9400         * error.c (lang_decl_name): Use new hook.
9401         * lex.c (cxx_init): Remove old hook.
9402         * pt.c (tsubst_decl): Use new hook.
9403         * tree.c (lang_printable_name): Rename.
9405 2002-03-18  Eric Botcazou  <ebotcazou@multimania.com>
9407         PR c++/3882
9408         * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
9409         (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
9410         only after recording the declaration.
9412 2002-03-18  Jason Merrill  <jason@redhat.com>
9414         PR c++/2039
9415         * init.c (resolve_offset_ref): Hand off to build_component_ref.
9417         PR c++/4222, c++/5995
9418         * call.c (build_over_call): Fix empty class logic.
9420         PR c++/3870
9421         * cp-tree.h (struct saved_scope): Add last_parms field.
9422         * decl.c (maybe_push_to_top_level): Save last_function_parms.
9423         (pop_from_top_level): Restore it.
9425         PR c++/4377
9426         * mangle.c (write_expression): Strip NOP_EXPRs sooner.  Also strip
9427         NON_LVALUE_EXPRs.
9429         PR c++/4003
9430         * pt.c (tsubst_friend_function): Use decl_namespace_context.
9432         PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
9433         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
9434         type with a nontrivial destructor.
9436 2002-03-17  Jason Merrill  <jason@redhat.com>
9438         PR c++/4460
9439         * class.c (build_base_path): Virtual base layout is fixed in
9440         in-charge [cd]tors.
9442 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
9444         * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
9445         * parse.y (yyparse): Remove macro.
9447 2002-03-17  Jason Merrill  <jason@redhat.com>
9449         PR c++/5757
9450         * init.c (build_new_1): Pass the right pointer to op delete.
9452 2002-03-16  Nathan Sidwell  <nathan@codesourcery.com>
9454         PR c++/4361
9455         * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
9456         conversion operators go.
9457         (struct lang_decl_flags): Add template_conv_p and unused
9458         bitfields.
9459         (DECL_TEMPLATE_CONV_FN_P): New macro.
9460         * call.c (build_user_type_conversion_1): Don't check second type
9461         conversion of overload set first.
9462         * class.c (add_method): Make sure templated conversion operators
9463         all end up on slot 2.
9464         * lex.c (do_identifier): A conversion operator token might be
9465         satisfied by a templated conversion operator.
9466         * pt.c (check_explicit_specialization): Use
9467         CLASSTYPE_FIRST_CONVERSION_SLOT.
9468         (template_parm_this_level_p): New function.
9469         (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
9470         * search.c (lookup_fnfields_1): Template conversions will be on
9471         the first slot.
9472         * typeck.c (build_component_ref): Preserve the type of an
9473         conversion operator name on the overload type.
9474         (build_x_function_call): Retrieve the conversion operator name.
9476 2002-03-15  Richard Henderson  <rth@redhat.com>
9478         * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
9480 2002-03-15  Mark Mitchell  <mark@codesourcery.com>
9482         * cp-tree.h (CLEANUP_DECL): Remove.
9483         (CLEANUP_EXPR): Likewise.
9484         * decl.c (destroy_local_var): Simplify.
9485         (maybe_build_cleanup): Tidy.
9486         * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
9487         * semantics.c (cp_expand_stmt): Likewise.
9488         * cp/tree.c (cp_statement_code_p): Likewise.
9490 2002-03-15  Jason Merrill  <jason@redhat.com>
9492         PR c++/5857
9493         * decl.c (duplicate_decls): Use merge_types instead of common_type.
9494         * typeck.c (common_type): Just hand off to
9495         type_after_usual_arithmetic_conversions and
9496         composite_pointer_type.
9497         (merge_types): New fn.
9498         (commonparms): Use it instead of common_type.
9499         (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
9500         (composite_pointer_type): Also handle attributes.
9501         * cp-tree.h: Declare merge_types.
9503         * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
9504         variables.
9505         * decl2.c (maybe_make_one_only): Also mark the decl as needed.
9507 2002-03-14  Richard Henderson  <rth@redhat.com>
9509         * decl.c: Include c-pragma.h.
9510         (start_decl, start_function): Invoke maybe_apply_pragma_weak.
9511         * Make-lang.in: Update dependencies.
9513 2002-03-14  Jakub Jelinek  <jakub@redhat.com>
9515         PR c++/5908
9516         * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
9517         * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
9519 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
9521         * mangle.c (write_builtin_type): Handle 128-bit integers even if
9522         they are not a standard integer type.
9524 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
9526         * cp-tree.h (init_init_processing): Remove declaration.
9527         * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
9528         * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
9530 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9532         * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
9533         Define.
9534         * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
9535         tree_code_length.
9536         * lex.c (cplus_tree_code_type, cplus_tree_code_length,
9537         cplus_tree_code_name): Delete.
9538         (cxx_init): Don't call add_c_tree_codes, instead set
9539         lang_unsafe_for_reeval.  Don't try to copy into the various
9540         tree_code arrays.
9542 2002-03-12  Nathan Sidwell  <nathan@codesourcery.com>
9544         PR c++/5659
9545         * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
9546         * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
9547         definitions.
9549 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
9551         Revert 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>,
9552         DR209 is now not a defect.
9553         * cp-tree.h (skip_type_access_control): Remove.
9554         * decl.c (grokdeclarator): Do type access control for friend
9555         declarations.
9556         * semantics.c (decl_type_access_control): Don't reset
9557         current_type_lookups.
9558         (save_type_access_control): Always save the lookups.
9559         (skip_type_access_control): Remove.
9560         (finish_class_definition): Don't change type_lookups.
9562 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
9564         Revert 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>,
9565         It is incorrect.
9566         * typeck.c (build_static_cast): Compare non-qualified types
9567         with pointer to member conversions.
9569 2002-03-11  Dan Nicolaescu  <dann@ics.uci.edu>
9570             Daniel Berlin  <dan@dberlin.org>
9572         * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
9573         (cxx_get_alias_set): Use it.
9575 2002-03-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9577         * cp-tree.h (stabilize_expr): Prototype.
9579 2002-03-08  Craig Rodrigues  <rodrigc@gcc.gnu.org>
9581         * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
9582         conditional return void.
9584 2002-03-08  Neil Booth  <neil@daikokuya.demon.co.uk>
9586         * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
9587         * cp-tree.h (cxx_unsave): New.
9588         * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
9589         (init_tree): Update.
9591 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9593         * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
9594         explicit sizeof/sizeof.
9595         * decl2.c (cxx_decode_option): Likewise.
9596         * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
9598 2002-03-02  Nathan Sidwell  <nathan@codesourcery.com>
9600         PR c++/775
9601         * decl.c (lookup_tag): Only reject enum/class mismatch, not
9602         class/union mismatch.
9603         * parse.y (check_class_key): New function.
9604         (structsp): Call it.
9606 2002-03-01  Michael Matz  <matz@suse.de>
9608         * typeck.c (cp_pointer_int_sum): Complete inner type which is
9609         used later by size_in_bytes().
9611 2002-03-01  Phil Edwards  <pme@gcc.gnu.org>
9613         * cp-tree.h:  Require __GNUC__ to be #defined.
9614         (build_init):  Add missing prototype.
9616 2002-03-01  Jason Merrill  <jason@redhat.com>
9618         * except.c: Don't include decl.h or obstack.h.  Do include
9619         tree-inline.h.
9620         (build_throw): Destroy temporaries from the thrown
9621         expression before calling __cxa_throw.  Construct a thrown
9622         temporary directly into the exception object.
9623         (stabilize_throw_expr): New function.
9624         (wrap_cleanups_r): New function.
9625         * tree.c (stabilize_expr): New function.
9626         * init.c (build_init): New function.
9627         * Make-lang.in (cp/except.o): Adjust .h deps.
9629 2002-02-28  Jason Merrill  <jason@redhat.com>
9631         * search.c (lookup_base_r): Don't clear is_non_public just because
9632         we found a friendly scope.
9634         * decl.c (finish_function): Only warn about missing return
9635         statement with -Wreturn-type.
9637 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
9639         * class.c (build_clone): Update.
9640         * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
9641         * cp-tree.h (cxx_dup_lang_specific_decl): New.
9642         * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
9643         (copy_decl): Update.
9644         * method.c (make_thunk): Update.
9646 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
9648         * decl2.c: Delete traditional-mode-related code copied from
9649         the C front end but not used, or used only to permit the
9650         compiler to link.
9652 2002-02-24 Craig Rodrigues  <rodrigc@gcc.gnu.org>
9654         PR c++/4093
9655         * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
9656         to void.
9658 2002-02-22  Jakub Jelinek  <jakub@redhat.com>
9660         PR other/5746
9661         * semantics.c (finish_switch_cond): Don't call get_unwidened
9662         if error_mark_node.
9664 2002-02-22  Nathan Sidwell  <nathan@codesourcery.com>
9666         PR c++/2645, DR 295
9667         * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
9668         tf_keep_type_decl.
9669         (make_typename_type): Use tsubst_flags_t.
9670         * decl.c (make_typename_type): Adjust. Return non-artificial
9671         TYPE_DECLs, if required.
9672         (grokdeclarator): Simplify CVR qualification handling. Allow bad
9673         qualifiers on typedef types.
9674         * decl2.c (handle_class_head): Adjust make_typename_type call.
9675         * parse.y (nested_name_specifier): Likewise.
9676         (typename_sub0): Likewise.
9677         (typename_sub1): Likewise.
9678         * pt.c (convert_template_argument): Adjust make_typename_type
9679         return value.
9680         (tsubst): Adjust cp_build_qualified_type_real calls.
9681         (check_cv_quals_for_unify): Cope with allowing bad qualifications
9682         on template type parms.
9683         (instantiate_decl): Recheck substitutions to give warnings on bad
9684         qualifications.
9685         * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
9687 2002-02-21  Aldy Hernandez  <aldyh@redhat.com>
9689         * cp/decl.c (duplicate_decls): Merge always_inline attribute.
9691         * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
9692         unless DECL_ALWAYS_INLINE.
9694 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
9696         * typeck.c (cp_pointer_int_sum): Renamed from
9697         pointer_int_sum, call pointer_int_sum.
9699 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
9701         * decl.c (duplicate_decls): Return 0 if issued error about
9702         redeclaration.
9704 2002-02-19  Jason Merrill  <jason@redhat.com>
9706         ABI change: Mangle `void (A::*)() const' as
9707         M1AKFvvE, not MK1AFvvE.
9708         * mangle.c (write_function_type): Write cv-quals for member
9709         function type here.
9710         (write_pointer_to_member_type): Not here.
9712 2002-02-18  Jason Merrill  <jason@redhat.com>
9714         * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
9715         (do_decl_instantiation): Likewise.
9717 2002-02-17  Craig Rodrigues  <rodrigc@gcc.gnu.org>
9719         PR c++/5685
9720         * decl.c (duplicate_decls): Make warning unconditional
9721         if duplicate default argument declarations are present.
9723 2002-02-17  Jakub Jelinek  <jakub@redhat.com>
9725         * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
9726         shortening.
9728 2002-02-15  Nathan Sidwell  <nathan@codesourcery.com>
9730         * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
9731         remove incorrect comment. Move #if 0'd code to common path. Use
9732         IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
9734 2002-02-13  Jason Merrill  <jason@redhat.com>
9736         * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
9737         (finish_function): Don't warn if current_function_returns_null.
9739         * typeck2.c (digest_init): Do handle values of vector type.
9741         * typeck2.c (digest_init, process_init_constructor): Treat vectors
9742         like arrays.
9744 2002-02-11  Jason Merrill  <jason@redhat.com>
9746         * parse.y (reserved_declspecs): Don't handle attributes.
9747         (reserved_typespecquals): Handle them here.
9748         * Make-lang.in (parse.c): Adjust expected conflicts.
9750 2002-02-08  Jakub Jelinek  <jakub@redhat.com>
9752         * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
9753         instead of compstmt.
9754         (compstmt_or_stmtexpr): Renamed from compstmt.
9755         (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
9757 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
9759         Rename instantiate_type_flags to tsubst_flags_t & expand use.
9760         * cp-tree.h (instantiate_type_flags): Rename to ...
9761         (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
9762         add tf_warning flag.
9763         (instantiate_type): Adjust prototype.
9764         (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
9765         do_type_instantiation, cp_build_qualified_type_real): Likewise.
9766         cp_build_qualified_type: Adjust.
9767         * class.c (instantiate_type): Adjust parameter. Rename itf_* to
9768         tf_*.
9769         * call.c (standard_conversion): Rename itf_* to tf_*.
9770         (reference_binding): Likewise.
9771         (convert_like_real): Likewise.
9772         * cvt.c (cp_convert_to_pointer): Likewise.
9773         (convert_to_reference): Likewise.
9774         * decl.c (lookup_namespace_name): Use tf_* flags.
9775         (make_typename_type): Likewise.
9776         (grokdeclarator): Likewise.
9777         * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
9778         (coerce_template_template_parms, convert_template_argument,
9779         coerce_template_parms, maybe_get_template_decl_from_type_decl,
9780         lookup_template_class, tsubst_friend_function, tsubst_friend_class,
9781         instantiate_class_template, tsubst_template_arg_vector,
9782         tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
9783         tsubst_decl, tsubst_arg_types, tsubst_function_type,
9784         tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
9785         instantiate_template, fn_type_unification,
9786         resolve_overloaded_unification, verify_class_unification,
9787         unify, get_bindings_real, do_type_instantiation,
9788         regenerate_decl_from_template, instantiate_decl,
9789         tsubst_initializer_list, tsubst_enum,
9790         get_mostly_instantiated_function_type,
9791         invalid_nontype_parm_type_p): Likewise.
9792         * tree.c (cp_build_qualified_type_real): Likewise.
9793         * typeck.c (build_binary_op): Rename itf_* to tf_*.
9794         (build_ptrmemfunc): Likewise.
9795         (convert_for_assignment): Likewise.
9797 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
9799         PR c++/109
9800         * decl.c (grokdeclarator): Allow friend declarations from
9801         dependent types.
9802         * decl2.c (handle_class_head): Don't push into template parm contexts.
9803         * pt.c (push_template_decl_real): Template parm contexts are never
9804         being defined.
9806 2002-02-05  Alexandre Oliva  <aoliva@redhat.com>
9808         * class.c: Include target.h.
9809         (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
9810         BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
9811         bit-field layout.
9812         * Make-lang.in: Adjust deps.
9814 2002-02-05  Jason Merrill  <jason@redhat.com>
9816         * error.c (dump_type): Be more helpful about VECTOR_TYPE.
9818 2002-02-04  Jakub Jelinek  <jakub@redhat.com>
9820         * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
9821         (finish_switch_cond): Set SWITCH_TYPE.
9823 2002-02-04  Richard Henderson  <rth@redhat.com>
9825         * method.c (use_thunk): Always initialize the block tree.  Reindent.
9826         * semantics.c (expand_body): Emit thunks after function, not before.
9828 2002-02-04  Jason Merrill  <jason@redhat.com>
9830         * decl.c (start_function): Call cplus_decl_attributes immediately
9831         after grokdeclarator.
9833         * decl.c (start_function): Combine DECL_RESULT handling code.
9835 2002-02-03  Jason Merrill  <jason@redhat.com>
9837         * xref.c: Remove.
9838         * Make-lang.in (CXX_OBJS): Remove cp/xref.o
9839         (cp/xref.o): Remove dependencies.
9840         * class.c (finish_struct_1, check_methods): Don't call xref fns.
9841         (finish_struct_1): Likewise.
9842         * friend.c (make_friend_class): Likewise.
9843         * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
9844         * spew.c (read_process_identifier): Likewise.
9846 2002-02-01  Jason Merrill  <jason@redhat.com>
9848         PR c++/4872
9849         * decl.c (finish_function): Warn about a non-void function with
9850         no return statement and no abnormal exit.
9851         * cp-tree.h (struct cp_language_function): Add returns_abnormally.
9852         (current_function_returns_abnormally): New macro.
9853         * call.c (build_call): Set it.
9855         * typeck.c (build_component_ref): Always complain about offsetof
9856         constructs on non-PODs.  Only make it an error for members of
9857         virtual bases.
9859         * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
9860         (dump_function_decl): Always dump parms.
9862         * decl2.c (finish_static_data_member_decl): Complain about a local
9863         class with a static data member.
9865         PR c++/4286
9866         * search.c (lookup_field_1): Don't xref a static data member
9867         just because we looked it up.
9869 2002-01-31  Jason Merrill  <jason@redhat.com>
9871         * Make-lang.in (parse.c): Handle .output file.
9873         PR c++/3395
9874         * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
9875         not TREE_TYPE.
9876         * semantics.c (finish_class_definition): Adjust.
9878         Allow attributes in parms and casts.
9879         * parse.y (named_parm): Don't strip attrs.
9880         (declmods): Remove 'attributes' production.
9881         (nonempty_cv_qualifiers): Accept attributes.
9882         (ATTRIBUTE): Give precedence.
9883         * decl.c (groktypename): Handle attributes.
9884         (grokparms): Likewise.
9886 2002-01-29  Jakub Jelinek  <jakub@redhat.com>
9888         * decl2.c (cxx_decode_option): Pass 0 as last argument to
9889         cpp_handle_option.
9890         * lang-specs.h: Use cpp_unique_options instead of cpp_options
9891         when used together with cc1_options.
9893 2002-01-29  Nathan Sidwell  <nathan@codesourcery.com>
9895         PR c++/5132
9896         * typeck2.c (digest_init): Make sure non-array core type is
9897         instantiated.
9898         * decl2.c (reparse_absdcl_as_casts): Just store the type in the
9899         constructor, rather than build a new one.
9900         (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
9901         PURPOSE of constructor elts.
9903 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
9905         * Make-lang.in (parse.c): Adjust expected number of
9906         shift-reduce conflicts.
9907         (decl.o): Depend on diagnostic.h.
9908         * decl.c: Include diagnostic.h.
9909         (grokdeclarator): Check for null pointer.
9910         (finish_function): Don't abort when
9911         current_binding_level->parm_flag != 1, if errors have
9912         occurred; throw away the statement tree and extra binding
9913         levels, and continue.
9914         * lex.c (note_list_got_semicolon): Check for null pointer.
9915         * method.c (hack_identifier): Just return error_mark_node if
9916         value is error_mark_node.
9917         * parse.y (primary: TYPEID(type_id)): No need to use
9918         TYPE_MAIN_VARIANT here.
9919         (handler_seq): Accept an empty list of catch clauses and
9920         generate a fake handler block to avoid later crashes.
9921         (ansi_raise_identifier): Accept the error token too.
9922         * semantics.c (begin_class_definition,
9923         finish_class_definition): Check for error_mark_node.
9925 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
9927         * typeck2.c (friendly_abort): Delete definition.
9928         * cp-tree.h (friendly_abort): Don't prototype.
9929         (my_friendly_assert): Use fancy_abort.
9931 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
9933         * cp-tree.h (my_friendly_abort): Remove.
9935 2002-01-23  Jakub Jelinek  <jakub@redhat.com>
9937         * spew.c (pending_inlines, pending_inlines_tail,
9938         processing_these_inlines): Make static.
9939         (mark_pending_inlines): Remove static.
9940         (begin_parsing_inclass_inline): If in function, save pi
9941         for GC to cp_function_chain->unparsed_inlines instead.
9942         (process_next_inline): Likewise.
9943         * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
9944         (mark_pending_inlines): Add prototype.
9945         * decl.c (spew_debug): Remove unused extern.
9946         (mark_lang_function): Call mark_pending_inlines.
9948 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
9950         * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
9951         init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
9952         semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
9953         Change my_fancy_abort() to abort().
9955 2002-01-23  Jason Merrill  <jason@redhat.com>
9957         PR c++/5453
9958         * class.c (fixed_type_or_null): Fix thinko.
9960         PR c++/3331
9961         * init.c (resolve_offset_ref): Use build_indirect_ref.
9963         * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
9965 2002-01-22  Jason Merrill  <jason@redhat.com>
9967         * parse.y (function_body): Suppress the block for the outermost
9968         curly braces.
9969         * decl.c (pushdecl): Don't try to skip it.
9970         (begin_function_body): Keep the block we create, not the next one.
9971         * init.c (emit_base_init): Don't mess with keep_next_level.
9973         * class.c (build_base_path): Tweak formatting.
9975 2002-01-19  Nathan Sidwell  <nathan@codesourcery.com>
9977         Fix regression introduced with patch for c++/775
9978         * parse.y (class_head_defn): Check for template specializations
9979         with a different class-key.
9981 2002-01-17  Jason Merrill  <jason@redhat.com>
9983         * decl.c (begin_constructor_body, begin_destructor_body): New fns.
9984         (begin_function_body): Call them and keep_next_level.
9985         * init.c (emit_base_init): Call keep_next_level.
9986         * semantics.c (setup_vtbl_ptr): Lose.
9987         * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
9988         (vtbls_set_up_p): Lose.
9989         * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
9990         * method.c (do_build_copy_constructor): Likewise.
9991         (synthesize_method): Call finish_mem_initializers.
9992         * parse.y (nodecls): Likewise.
9994         * error.c (dump_type_suffix): Print the exception specs before
9995         recursing.
9996         (dump_function_decl): Here, too.
9998         * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
10000 2002-01-10  Ira Ruben   <ira@apple.com>
10002         PR c++/907
10003         * decl.c (start_method): Handle attrlist.
10005 2002-01-10  Jakub Jelinek  <jakub@redhat.com>
10007         * decl2.c (max_tinst_depth): Increase default limit to 500.
10009 2002-01-10  Graham Stott  <grahams@redhat.com>
10011         * spew.c (YYCHAR): Uppercase macro parameter and add
10012         parenthesis.
10013         (YYCODE): Likewise.
10014         (NAME): Uppercase macro parameter.
10016 2002-01-09  Graham Stott  <grahams@redhat.com>
10018         * decl.h (grokdeclarator): Wrap long line.
10020         * semantics.c (FINISH_COND): Uppercase macro paramaters and
10021         add parenthesis.
10023 2002-01-08  Graham Stott  <grahams@redhat.com>
10025         * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
10026         (PALLOC): Uppercase macro parameter and whitespace.
10027         (SALLOC): Uppercase macro parameter.
10028         (SFREE): Uppercase macros parameter, add parenthese and
10029         whitespace.
10030         (STREQL): Uppercase macro parameter and whitespace.
10031         (STRNEQ): Likewise.
10032         (STRLSS): Likewise.
10033         (STRLEQ): Likewise.
10034         (STRGTR): Likewise.
10035         (STRGEQ): Likewise.
10037         * call.c (convert_like): Add parenthesis and wrap.
10038         (convert_like_with_context): Likewise.
10039         (ICS_RANK): Whitespace.
10040         (NEED_TEMPORARY_P): Remove parenthesis.
10042         * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
10043         whitespace.
10044         (VTT_MARKED_BINFO_P): Likewise.
10046         * decl.c (BINDING_LEVEL): Add parenthesis.
10047         (DEF_OPERATOR): Likewise.
10049         * mangle.c (MANGLE_TRACE): Add parenthesis.
10050         (MANGLE_TRACE_TREE): Likewise.
10051         (write_signed_number): Likewise.
10052         (write_unsigned_number): Likewise.
10054         * pt.c (ccat): Uppercase macro parameter.
10055         (cat): Likewise
10057         * search.c (SET_BINFO_ACCESS): Add parenthesis.
10059 2002-01-07  Jason Merrill  <jason@redhat.com>
10061         * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
10062         to pedwarn.
10064         PR c++/3536
10065         * method.c (make_thunk): If !flag_weak, give the thunk the
10066         function's linkage.
10067         (use_thunk): Here, too.
10069 2002-01-07  Graham Stott  <grahams@redhat.com>
10071         * error.c: Update copyright date.
10072         (print_scope_operator): Add parenthesis.
10073         (print_left_paren): Likewise.
10074         (print_right_paren): Likewise.
10075         (print_left_bracket): Likewise.
10076         (print_right_bracket): Likewise.
10077         (print_template_argument_list_start): Likewise.
10078         (print_template_argument_list_end): Likewise.
10079         (print_non_consecutive_character): Likewise.
10080         (print_tree_identifier): Likewise.
10081         (print_identifier): Likewise.
10082         (NEXT_CODE): Uppercase macro parameter.
10083         (ident_fndecl): Delete unused.
10084         (GLOBAL_THING): Likewise.
10086 2002-01-06  Graham Stott  <grahams@redhat.com>
10088         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
10089         (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
10090         (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
10091         (RECORD_OR_UNION_TYPE_CHECK): Likewise.
10092         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
10093         (C_IS_RESERVED_WORD): Uppercase macro parameter.
10094         (C_RID_YYCODE) Likewise.
10095         (ptrmem_cst): Use rtx.
10096         (LOCAL_BINDING_P): Add whitespace.
10097         (INHERITED_VALUE_BINDING_P): Likewise.
10098         (BINDING_SCOPE): Wrap long line.
10099         (BINDING_HAS_LEVEL_P): Remove parenthesis.
10100         (BINDING_VALUE): Wrap long line.
10101         (BINDING_TYPE): Whitespace.
10102         (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
10103         (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
10104         (IDENTIFIER_NAMESPACE_VALUE): Likewise.
10105         (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
10106         (same_type_p): Uppercase macro parameters.
10107         (same_type_ignoring_top_level_qualifiers_p): Likewise.
10108         (OVL_FUNCTION): Wrap long line.
10109         (OVL_CHAIN): Whitespace.
10110         (OVL_CURRENT): Add parenthesis and whitespace.
10111         (OVL_NEXT): Whitespace.
10112         (OVL_USED): Likewise.
10113         (IDENTIFIER_TYPE_VALUE): Likewise.
10114         (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
10115         (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
10116         (LANG_ID_FIELD): Whitespace.
10117         (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
10118         (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
10119         (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
10120         (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
10121         (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
10122         (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
10123         (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
10124         (IDENTIFIER_VIRTUAL_P): Likewise.
10125         (IDENTIFIER_OPNAME_P): Likewise.
10126         (IDENTIFIER_TYPENAME_P): Remove parenthesis.
10127         (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
10128         (C_SET_EXP_ORIGINAL_CODE): Likewise.
10129         (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
10130         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
10131         (IS_AGGR_TYPE): Uppercase macro parameter.
10132         (CLASS_TYPE_P): Likewise.
10133         (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
10134         (IS_AGGR_TYPE_2): Whitespace.
10135         (TAGGED_TYPE_P): Uppercase macro parameter.
10136         (TYPE_BUILT_IN): Whitespace.
10137         (TYPE_FOR_JAVA): Likewise.
10138         (FUNCTION_ARG_CHAIN): Remove parenthesis.
10139         (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
10140         (FUNCTION_FIRST_USER_PARAM): Likewise.
10141         (PROMOTES_TO_AGGR_TYPE): Whitespace.
10142         (DERIVED_FROM_P): Add parenthesis and wrap.
10143         (UNIQUELY_DERIVED_FROM_P): Likewise.
10144         (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
10145         (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
10146         (CLASSTYPE_USE_TEMPLATE): Whitespace.
10147         (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
10148         (TYPE_GETS_DELETE): Add parenthesis.
10149         (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
10150         (TYPE_HAS_ASSIGN_REF): Likewise,
10151         (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
10152         (TYPE_HAS_INIT_REF): Likewise.
10153         (TYPE_HAS_CONST_INIT_REF): Likewise.
10154         (TYPE_BEING_DEFINED): Likewise.
10155         (TYPE_LANG_SPECIFIC): Likewise.
10156         (CLASSTYPE_RTTI): Likewise.
10157         (TYPE_OVERLOADS_CALL_EXPR): Likewise.
10158         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
10159         (TYPE_OVERLOADS_ARROW): Likewise.
10160         (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
10161         (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
10162         (CLASSTYPE_METHOD_VEC): Likewise.
10163         (CLASSTYPE_MARKED_N): Likewise.
10164         (CLASSTYPE_MARKED): Likewise.
10165         (CLASSTYPE_MARKED2): Likewise.
10166         (CLASSTYPE_MARKED3): Likewise.
10167         (CLASSTYPE_MARKED4): Likewise.
10168         (CLASSTYPE_MARKED5): Likewise.
10169         (CLASSTYPE_MARKED6): Likewise.
10170         (SET_CLASSTYPE_MARKED): Whitespace.
10171         (CLEAR_CLASSTYPE_MARKED): Likewise.
10172         (SET_CLASSTYPE_MARKED2): Likewise.
10173         (CLEAR_CLASSTYPE_MARKED2): Likewise.
10174         (SET_CLASSTYPE_MARKED3): Likewise.
10175         (CLEAR_CLASSTYPE_MARKED3): Likewise.
10176         (SET_CLASSTYPE_MARKED4): Likewise.
10177         (CLEAR_CLASSTYPE_MARKED4): Likewise.
10178         (SET_CLASSTYPE_MARKED5): Likewise.
10179         (CLEAR_CLASSTYPE_MARKED5): Likewise.
10180         (SET_CLASSTYPE_MARKED6): Likewise.
10181         (CLEAR_CLASSTYPE_MARKED6): Likewise.
10182         (CLASSTYPE_TAGS): Likewise.
10183         (CLASSTYPE_VSIZE): Likewise.
10184         (CLASSTYPE_VBASECLASSES): Likewise.
10185         (CANONICAL_BINFO): Add parenthesis.
10186         (CLASSTYPE_SIZE(NODE): Likewise.
10187         (CLASSTYPE_SIZE_UNIT): Likewise.
10188         (CLASSTYPE_ALIGN(NODE): Likewise.
10189         (CLASSTYPE_USER_ALIGN): Likewise.
10190         (TYPE_JAVA_INTERFACE): Likewise.
10191         (CLASSTYPE_PURE_VIRTUALS): Likewise.
10192         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
10193         (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
10194         (CLASSTYPE_HAS_MUTABLE): Likewise.
10195         (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
10196         (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
10197         (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
10198         (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
10199         (CLASSTYPE_INTERFACE_ONLY): Likewise.
10200         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
10201         (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
10202         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
10203         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
10204         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
10205         (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
10206         (BINFO_UNSHARED_MARKED): Whitespace.
10207         (BINFO_MARKED): Whitespace and wrap.
10208         (SET_BINFO_MARKED): Likewise.
10209         (CLEAR_BINFO_MARKED): Likewise.
10210         (BINFO_VTABLE_PATH_MARKED): Likewise.
10211         (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
10212         (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
10213         (BINFO_SUBVTT_INDEX): Remove parenthesis.
10214         (BINFO_VPTR_INDEX): Likewise.
10215         (BINFO_PRIMARY_BASE_OF): Likewise,
10216         (CLASSTYPE_VFIELDS): Whitespace.
10217         (VF_DERIVED_VALUE): Wrap long line.
10218         (NAMESPACE_LEVEL): Whitespace.
10219         (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
10220         (DEFARG_POINTER): Whitespace.
10221         (DECL_NEEDED_P): Remove parenthesis.
10222         (DECL_LANGUAGE): Whitespace.
10223         (SET_DECL_LANGUAGE): Add parenthesis.
10224         (DECL_CONSTRUCTOR_P): Whitespace and wrap.
10225         (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
10226         (DECL_IN_AGGR_P): Whitespace.
10227         (DECL_FRIEND_P): Likewise.
10228         (DECL_BEFRIENDING_CLASSES): Likewise.
10229         (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
10230         (DECL_NONCONVERTING_P): Whitespace.
10231         (DECL_PURE_VIRTUAL_P): Likewise.
10232         (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
10233         (DECL_PENDING_INLINE_INFO): Whitespace.
10234         (DECL_SORTED_FIELDS): Likewise.
10235         (DECL_DEFERRED_FN): Likewise.
10236         (DECL_TEMPLATE_INFO): Likewise.
10237         (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
10238         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
10239         (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
10240         (TMPL_ARGS_LEVEL): Likewise.
10241         (SET_TMPL_ARGS_LEVEL): Likewise.
10242         (INNERMOST_TEMPLATE_PARMS): Whitespace.
10243         (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
10244         (INTEGRAL_CODE_P(CODE): Add parenthesis.
10245         (CP_INTEGRAL_TYPE_P): Remove parenthesis.
10246         (TYPE_HAS_CONSTRUCTOR): Whitespace.
10247         (TREE_HAS_CONSTRUCTOR): Likewise.
10248         (TYPE_HAS_DESTRUCTOR): Likewise.
10249         (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
10250         (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
10251         (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
10252         (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
10253         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
10254         (TYPE_PTRMEMFUNC_P): Likewise.
10255         (TYPE_PTRMEMFUNC_FLAG): Likewise.
10256         (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
10257         (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
10258         (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
10259         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
10260         (DECL_ACCESS): Whitespace.
10261         (DECL_GLOBAL_CTOR_P): Remove parenthesis.
10262         (DECL_GLOBAL_DTOR_P): Likewise.
10263         (GLOBAL_INIT_PRIORITY): Likewise.
10264         (DECL_TEMPLATE_PARMS): Likewise.
10265         (DECL_TEMPLATE_RESULT): Likewise.
10266         (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
10267         (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
10268         (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
10269         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
10270         (PRIMARY_TEMPLATE_P): Add parenthesis.
10271         (DECL_USE_TEMPLATE): Whitespace.
10272         (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
10273         (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
10274         (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
10275         (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
10276         (CALL_DECLARATOR_PARMS): Remove parenthesis.
10277         (CALL_DECLARATOR_QUALS): Likewise.
10278         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
10279         (TEMP_NAME_P): Wrap.
10280         (VFIELD_NAME_P): Likewise.
10281         (B_SET): Uppercase macro parameters and add parenthesis.
10282         (B_CLR): Likewise.
10283         (B_TST): Likewise.
10284         (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
10285         (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
10286         (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
10287         (same_or_base_type_p): Likewise.
10288         (cp_deprecated): Likewise.
10290 2002-01-05  Richard Henderson  <rth@redhat.com>
10292         * semantics.c (expand_body): Revert last change.
10294 2002-01-04  Jason Merrill  <jason@redhat.com>
10296         PR c++/4122
10297         * class.c (update_vtable_entry_for_fn): Set delta to zero for a
10298         lost primary.
10300         * class.c (build_vtbl_initializer): Check for a lost primary
10301         before calculating the vtable entry to throw away.
10303 2002-01-02  Jason Merrill  <jason@redhat.com>
10305         * semantics.c (expand_body): Call outlining_inline_function when
10306         emitting an inline function out of line.
10308 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10310         PR c++/5116, c++/764 reversion
10311         * call.c (build_new_op): Revert the instantiations. They are
10312         incorrect.
10314 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10316         PR c++/5089
10317         * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
10319 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10321         PR c++/3716
10322         * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
10323         (tsubst, case POINTER_TYPE): Handle pmfs here.
10324         (tsubst, case OFFSET_TYPE): Check it is not an offset to
10325         reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
10327 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10329         PR c++/35
10330         * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
10331         (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
10332         * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
10333         PARM_DECL.
10334         (tsubst_template_parms): Break up loop statements.
10335         (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
10336         parm PARM_DECLs don't get promoted.
10338 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10340         PR c++/5123
10341         * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
10342         (build_x_function_call): Cope with a COMPONENT_REF containing a
10343         TEMPLATE_ID_EXPR.
10345 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10347         PR c++/5213
10348         * pt.c (convert_template_argument): Be more careful determining
10349         when RECORD_TYPE templates are or are not templates.
10351 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10353         PR c++/775
10354         * cp-tree.h (handle_class_head): Adjust prototype.
10355         * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
10356         parameters. Use for all class heads.
10357         * parse.y (named_class_head_sans_basetype, named_class_head,
10358         named_complex_class_head_sans_basetype,
10359         named_class_head_sans_basetype_defn,
10360         unnamed_class_head): Remove.
10361         (class_head, class_head_apparent_template): Recognize class heads
10362         (class_head_decl, class_head_defn): New reductions. Process class
10363         heads.
10364         (structsp): Adjust class definition and class declaration
10365         reductions.
10366         (maybe_base_class_list): Give diagnostic on empty list.
10368 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10370         PR c++/4379
10371         * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
10372         single non-static member.
10373         (unary_complex_lvalue): If it cannot be a pointer to member, don't
10374         make it so. Check it is not pointer to reference.
10376 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10378         PR c++/5132
10379         * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
10380         are processing a template decl.
10382 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10384         PR c++/5116, c++/764
10385         * call.c (build_new_op): Make sure template class operands are
10386         instantiated. Simplify arglist construction.
10388 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
10390         * call.c (build_user_type_conversion_1): Use my_friendly_assert
10391         rather than if ... abort.
10392         * cvt.c (convert_to_reference): Likewise.
10393         * semantics.c (setup_vtbl_ptr): Likewise.
10394         * pt.c (lookup_template_class): Comment typo.
10396 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
10398         PR c++/5125
10399         * pt.c (push_template_decl_real): Make sure DECL has
10400         DECL_LANG_SPECIFIC.
10402 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
10404         PR c++/335
10405         * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
10406         for non-reference fields.
10407         * typeck.c (require_complete_type): Use resolve_offset_ref).
10409 2001-12-26  Nathan Sidwell  <nathan@codesourcery.com>
10411         PR c++/196
10412         * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
10414 2001-12-24  Nathan Sidwell  <nathan@codesourcery.com>
10416         PR c++/160
10417         * typeck.c (build_modify_expr): Remove old unreachable code & tidy
10418         up. Don't stabilize_references when initializing a reference.
10420 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10422         * decl2.c (lang_f_options): Const-ify.
10424 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
10426         * config-lang.in (diff_excludes): Remove.
10428 2001-12-19  Nathan Sidwell  <nathan@codesourcery.com>
10430         PR c++/90
10431         * typeck.c (build_function_call_real): Use original function
10432         expression for errors.
10434 2001-12-18  Jason Merrill  <jason@redhat.com>
10436         PR c++/3242
10437         * class.c (add_method): Do compare 'this' quals when trying to match a
10438         used function.  Don't defer to another used function.
10440 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
10442         * pt.c (instantiate_clone): Remove, fold into ...
10443         (instantiate_template): ... here. Simplify by removing mutual
10444         recursion.
10445         * typeck2.c (build_m_component_ref): Don't cv qualify the function
10446         pointed to by a pointer to function.
10447         * class.c (delete_duplicate_fields_1): Typo.
10449 2001-12-18  Jason Merrill  <jason@redhat.com>
10451         C++ ABI change: destroy value arguments in caller.
10452         * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
10453         create an extra binding level for the parameters.
10454         * decl.c (store_parm_decls): Don't do parameter cleanups.
10456 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
10458         * call.c (build_new_method_call): Use '%#V'.
10459         * error.c (cv_to_string): Use V parameter to determine padding.
10461 2001-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
10463         * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
10464         spellings in messages.
10466 2001-12-17  Zack Weinberg  <zack@codesourcery.com>
10468         * cp-tree.h: Delete #defines for cp_error, cp_warning,
10469         cp_pedwarn, and cp_compiler_error.
10470         * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
10471         except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
10472         rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
10473         typeck2.c: Change calls to the above macros to use their
10474         language-independent equivalents: error, warning, pedwarn, and
10475         internal_error respectively.
10477 2001-12-16  Neil Booth  <neil@daikokuya.demon.co.uk>
10479         * decl2.c (finish_file): Remove back_end_hook.
10481 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
10483         * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
10484         cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
10485         pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
10487 2001-12-15  Joseph S. Myers  <jsm28@cam.ac.uk>
10489         * lang-options.h: Use American spelling in messages.
10491 2001-12-13  Jason Merrill  <jason@redhat.com>
10493         * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
10495         Use cleanups to run base and member destructors.
10496         * init.c (push_base_cleanups): New function, split out from...
10497         (build_delete): ...here.  Lose !TYPE_HAS_DESTRUCTOR code.
10498         * decl.c (finish_destructor_body): Move vbase destruction code to
10499         push_base_cleanups.
10500         (begin_function_body, finish_function_body): New fns.
10501         (finish_function): Move [cd]tor handling and call_poplevel to
10502         finish_function_body.
10503         (pushdecl): Skip the new level.
10504         * semantics.c (genrtl_try_block): Don't call end_protect_partials.
10505         (setup_vtbl_ptr): Call push_base_cleanups.
10506         * method.c (synthesize_method): Call {begin,end}_function_body.
10507         * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
10508         * cp-tree.h: Declare new fns.
10509         * parse.y (function_body, .begin_function_body): New nonterminals.
10510         (fndef, pending_inline, function_try_block): Use function_body.
10511         (ctor_initializer_opt, function_try_block): No longer has a value.
10512         (base_init): Remove .set_base_init token.
10513         (.set_base_init, compstmt_or_error): Remove.
10514         * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
10516         * optimize.c (maybe_clone_body): Fix parameter updating.
10518 2001-12-12  Jason Merrill  <jason@redhat.com>
10520         * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
10521         * semantics.c (genrtl_start_function): Don't pass
10522         parms_have_cleanups or push an extra binding level.
10523         (genrtl_finish_function): Lose cleanup_label cruft.
10525         * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
10526         (ctor_label): Remove.
10527         * semantics.c (finish_return_stmt): Lose ctor_label support.
10528         * decl.c (finish_constructor_body, mark_lang_function): Likewise.
10529         * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
10530         dtor_label.
10532         * call.c (build_new_method_call): Let resolves_to_fixed_type_p
10533         check for [cd]tors.
10534         * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
10536         * decl.c (finish_function): Check VMS_TARGET, not VMS.
10538         * decl.c (start_cleanup_fn): Remove redundant pushlevel.
10539         (end_cleanup_fn): And poplevel.
10541         * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
10542         if we're in a template.
10544 2001-12-12  Jakub Jelinek  <jakub@redhat.com>
10546         * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
10547         ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
10548         THIS_NAME_P): Delete.
10549         * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
10550         THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
10551         with internal naming scheme.
10552         * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
10554 2001-12-12  Nathan Sidwell  <nathan@codesourcery.com>
10556         * decl.c (grokdeclarator): Deprecated implicit typename use.
10558 2001-12-11  Nathan Sidwell  <nathan@codesourcery.com>
10560         PR g++/51
10561         * parse.y (frob_specs): Indicate it is a language linkage which
10562         contained the extern.
10563         * decl.c (grokdeclarator): Allow extern language linkage with
10564         other specifiers.
10566 2001-12-10  Nathan Sidwell  <nathan@codesourcery.com>
10568         PR g++/72
10569         * decl.c (add_binding): Don't reject duplicate typedefs involving
10570         template parameters.
10572 2001-12-10  Neil Booth  <neil@daikokuya.demon.co.uk>
10574         * parse.y, semantics.c: Similarly.
10576 2001-12-09  Nathan Sidwell  <nathan@codesourcery.com>
10578         PR g++/87
10579         * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
10580         (copy_args_p): Rename to ...
10581         (copy_fn_p): ... here.
10582         (grok_special_member_properties): New function.
10583         (grok_op_properties): Lose VIRTUALP parameter.
10584         (copy_assignment_arg_p): Remove.
10585         * call.c (build_over_call): Use copy_fn_p.
10586         * decl.c (grokfndecl): Reformat. Adjust call to
10587         grok_op_properties.
10588         (copy_args_p): Rename to ...
10589         (copy_fn_p): ... here. Reject template functions. Check for pass
10590         by value.
10591         (grok_special_member_properties): Remember special functions.
10592         (grok_ctor_properties): Don't remember them here, just check.
10593         (grok_op_properties): Likewise.
10594         (start_method): Call grok_special_member_properties.
10595         * decl2.c (grokfield): Likewise.
10596         (copy_assignment_arg_p): Remove.
10597         (grok_function_init): Don't remember abstract assignment here.
10598         * pt.c (instantiate_class_template): Call
10599         grok_special_member_properties.
10600         (tsubst_decl): Adjust grok_op_properties call.
10602 2001-12-08  Aldy Hernandez  <aldyh@redhat.com>
10604         * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
10605         RID_TYPES_COMPATIBLE_P.
10607 2001-12-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
10609         * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
10610         call to build_aggr_init.
10611         * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
10613 2001-12-08  Neil Booth  <neil@daikokuya.demon.co.uk>
10615         * parse.y: Replace uses of the string non-terminal with STRING.
10616         Don't perform string concatentaion here.
10617         (string): Remove non-terminal.
10618         * semantics.c (finish_asm_stmt): Don't concatenate strings here.
10620 2001-12-05  Jason Merrill  <jason@redhat.com>
10622         * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
10623         (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
10624         * tree.c (cp_start_inlining, cp_end_inlining): New fns.
10625         * pt.c (push_tinst_level): No longer static.
10626         * cp-tree.h: Declare them.
10628         * init.c (resolve_offset_ref): Don't check access for the base
10629         conversion to access a FIELD_DECL.
10631         * cp-tree.h (TYPE_REFFN_P): New macro.
10632         * decl.c (bad_specifiers): Check it, too.
10634         * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
10635         on the __*_type_info type if we haven't seen a definition.
10637 2001-12-05  Neil Booth  <neil@daikokuya.demon.co.uk>
10639         * decl.c: Include c-common.h.
10640         (shadow_warning): Move to c-common.c.
10642 2001-12-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10644         * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
10646 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
10648         * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
10650 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
10652         PR g++/164
10653         * init.c (sort_base_init): Allow binfos to be directly specified.
10654         * method.c (do_build_copy_constructor): Explicitly convert to the
10655         base instance.
10656         (do_build_assign_ref): Likewise.
10658 2001-12-03  Hans-Peter Nilsson  <hp@bitrange.com>
10660         * decl.c (xref_basetypes): Don't use C99 construct in tag_code
10661         declaration and initialization.
10663 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
10665         * typeck2.c: Remove leading capital from diagnostic messages, as
10666         per GNU coding standards.
10668 2001-12-03  Mumit Khan  <khan@nanotech.wisc.edu>
10670         PR c++/3394
10671         * decl.c (xref_basetypes): Handle attributes between
10672         'class' and name.
10674 2001-12-03  Nathan Sidwell  <nathan@codesourcery.com>
10676         PR g++/3381
10677         * parse.y (named_complex_class_head_sans_basetype): Add new
10678         reduction.
10679         * Make-lang.in (parse.c): Adjust expected conflict count.
10681 2001-12-03  Jason Merrill  <jason@redhat.com>
10683         * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
10684         immediate binfos for our virtual bases.
10686 2001-12-02  Neil Booth  <neil@daikokuya.demon.co.uk>
10688         * call.c (build_java_interface_fn_ref): Similarly.
10689         * except.c (is_admissible_throw_operand): Similarly.
10690         * init.c (build_java_class_ref): Similarly.
10691         * xref.c (open_xref_file): Similarly.
10693 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
10695         * class.c (finish_struct): Remove trailing periods from messages.
10696         * decl.c (check_tag_decl): Similarly.
10697         * lex.c (cxx_set_yydebug): Similarly.
10698         * typeck2.c (friendly_abort): Similarly.
10700 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
10702         PR c++/3048
10703         * cp-tree.h (ovl_member): Remove.
10704         * decl2.c (merge_functions): Handle extern "C" functions
10705         specially.
10706         * tree.c (ovl_member): Remove.
10708 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
10710         PR c++/4842
10711         * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
10712         FUNCTION_DECL, as input.
10713         (mark_overriders): Remove.
10714         (warn_hidden): Rework for the new ABI.
10716 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
10718         PR c++/3471
10719         * call.c (convert_like_real): Do not build additional temporaries
10720         for rvalues of class type.
10722 2001-11-28  Nathan Sidwell  <nathan@codesourcery.com>
10724         * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
10725         (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
10726         (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
10727         (DERIVED_FROM_P): Likewise.
10728         (enum base_access): Renumber, add ba_quiet bit mask.
10729         (get_binfo): Remove.
10730         (get_base_distance): Remove.
10731         (binfo_value): Remove.
10732         (ACCESSIBLY_DERIVED_FROM_P): Remove.
10733         * call.c (standard_conversion): Use lookup_base.
10734         * class.c (strictly_overrides): Likewise.
10735         (layout_virtual_bases): Likewise.
10736         (warn_about_ambiguous_direct_bases): Likewise.
10737         (is_base_of_enclosing_class): Likewise.
10738         (add_vcall_offset_vtbl_entries_1): Likewise.
10739         * cvt.c (build_up_reference): Adjust comment.
10740         * init.c (build_member_call): Reformat.
10741         * search.c (get_binfo): Remove.
10742         (get_base_distance_recursive): Remove.
10743         (get_base_distance): Remove.
10744         (lookup_base_r): Tweak.
10745         (lookup_base): Add ba_quiet control. Complete the types here.
10746         (covariant_return_p): Use lookup_base.
10747         * tree.c (binfo_value): Remove.
10748         (maybe_dummy_object): Use lookup_base.
10749         * typeck.c (build_static_cast): Use lookup_base.
10750         (get_delta_difference): Likewise.
10751         * typeck2.c (binfo_or_else): Use lookup_base.
10752         (build_scoped_ref): Add back error_mark_check.
10753         (build_m_component_ref): Use lookup_base.
10755 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
10757         * Make-lang.in (c++.generated-manpages): New dummy target.
10759 2001-11-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10761         * Make-lang.in (cp-lang.o): Depends on c-common.h.
10762         * cp-lang.c (c-common.h): Include.
10763         (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
10764         * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
10765         * expr.c (init_cplus_expand): Don't set lang_expand_constant.
10767 2001-11-26  Neil Booth  <neil@daikokuya.demon.co.uk>
10769         * decl2.c (c_language): Move to c-common.c.
10770         * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
10771         functions.
10772         (cxx_init): Update.
10774 2001-11-26  Jason Merrill  <jason@redhat.com>
10776         * call.c (joust): Remove COND_EXPR hack.
10778 2001-11-25  Aldy Hernandez  <aldyh@redhat.com>
10780         * search.c (lookup_base_r): Declare bk in variable declaration
10781         space.
10783 2001-11-25  Nathan Sidwell  <nathan@codesourcery.com>
10785         PR g++/3145
10786         * class.c (build_vbase_pointer): Remove.
10787         (build_vbase_path): Remove.
10788         (build_base_path): New function.
10789         * cp-tree.h (base_access, base_kind): New enumerations.
10790         (build_base_path): Declare.
10791         (convert_pointer_to_real): Remove.
10792         (convert_pointer_to): Remove.
10793         (lookup_base): Declare.
10794         (convert_pointer_to_vbase): Remove.
10795         * call.c (build_scoped_method_call): Use lookup_base &
10796         build_base_path instead of convert_pointer_to_real,
10797         get_base_distance & get_binfo.
10798         (build_over_call): Likewise.
10799         * cvt.c (cp_convert_to_pointer): Likewise.
10800         (convert_to_pointer_force): Likewise.
10801         (build_up_reference): Likewise.
10802         (convert_pointer_to_real): Remove.
10803         (convert_pointer_to): Remove.
10804         * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
10805         instead of convert_pointer_to_vbase & build_vbase_path.
10806         (emit_base_init): Use build_base_path instead of
10807         convert_pointer_to_real.
10808         (expand_virtual_init): Lose unrequired conversions.
10809         (resolve_offset_ref): Use lookup_base and build_base_path
10810         instead of convert_pointer_to.
10811         * rtti.c (build_dynamic_cast_1): Use lookup_base &
10812         build_base_path instead of get_base_distance & build_vbase_path.
10813         * search.c (get_vbase_1): Remove.
10814         (get_vbase): Remove.
10815         (convert_pointer_to_vbase): Remove.
10816         (lookup_base_r): New function.
10817         (lookup_base): New function.
10818         * typeck.c (require_complete_type): Use lookup_base &
10819         build_base_path instead of convert_pointer_to.
10820         (build_component_ref): Likewise.
10821         (build_x_function_call): Likewise.
10822         (get_member_function_from_ptrfunc): Likewise.
10823         (build_component_addr): Likewise.
10824         * typeck2.c (build_scoped_ref): Likewise.
10826 2001-11-22  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
10828         * cp-tree.h (CP_TYPE_QUALS): Removed.
10829         * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
10830         * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
10831         LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
10832         * dump.c (cp_dump_tree): Use void* dump_info argument to match
10833         lang-hooks prototype.
10834         * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
10835         rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
10836         CP_TYPE_QUALS changed to cp_type_quals.
10837         * Make-lang.in: References to c-dump.h changed to tree-dump.h.
10838         (CXX_C_OBJS): Remove c-dump.o.
10840 2001-11-21  Mark Mitchell  <mark@codesourcery.com>
10842         PR c++/3637
10843         * pt.c (lookup_template_class): Ensure that all specializations
10844         are registered on the list corresponding to the most general
10845         template.
10847 2001-11-20  Mark Mitchell  <mark@codesourcery.com>
10849         * call.c (non_reference): Add documentation.
10850         (convert_class_to_reference): Do not strip reference types
10851         from conversion operators.
10852         (maybe_handle_ref_bind): Simplify.
10853         (compare_ics): Correct handling of references.
10855 2001-11-19  John Wilkinson <johnw@research.att.com>
10857         * dump.c (dump_op): New function.
10858         (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION.  Use
10859         dump_op.  Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
10860         DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
10862 2001-11-19  Mark Mitchell  <mark@codesourcery.com>
10864         PR4629
10865         * semantics.c (finish_sizeof): Make sure that expression created
10866         while processing a template do not have a type.
10867         (finish_alignof): Likewise.
10868         * typeck.c (c_sizeof): Likewise.
10869         (expr_sizeof): Likewise.
10871 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
10873         * lex.c (cxx_finish): Call c_common_finish.
10874         (finish_parse): Remove.
10876 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10878         * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
10879         when displaying error message about missing array bounds.
10881 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10883         * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
10884         CONST_CAST_EXPR.
10885         * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
10887 2001-11-16  Neil Booth  <neil@daikokuya.demon.co.uk>
10889         * cp-tree.h (print_class_statistics): Restore.
10891 2001-11-15  Jason Merrill  <jason@redhat.com>
10893         * method.c (use_thunk): Don't emit debugging information for thunks.
10895         * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
10896         * decl.c (make_typename_type): Handle getting a class template.
10897         * search.c (lookup_field_r): A class template is good enough for
10898         want_type.
10900         * call.c (convert_like_real): Only use cp_convert for the bad part.
10901         (standard_conversion): Also allow bad int->enum.
10902         * typeck.c (ptr_reasonably_similar): Also allow functions to
10903         interconvert.  Pointers to same-size integers are reasonably
10904         similar.
10906         * cvt.c (convert_to_void): If we build a new COND_EXPR, always
10907         give it void type.
10909 2001-11-15  Nathan Sidwell  <nathan@codesourcery.com>
10911         PR g++/3154
10912         * init.c (sort_base_init): Remove unreachable code.
10913         (expand_member_init): Adjust comment to reflect reality. Simplify
10914         and remove unreachable code.
10916 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
10918         * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
10919         (cxx_init): Update prototype.
10920         * decl.c (init_decl_processing): Rename.  Move null node init
10921         to its creation time.
10922         * lex.c (cxx_init_options): Update.
10923         (cxx_init): Combine with old init_parse; also call
10924         cxx_init_decl_processing.
10926 2001-11-14  Richard Sandiford  <rsandifo@redhat.com>
10928         * decl.c (check_initializer): Try to complete the type of an
10929         array element before checking whether it's complete.  Don't
10930         complain about arrays with complete element types but an
10931         unknown size.
10932         (cp_finish_decl): Build the hierarchical constructor before
10933         calling maybe_deduce_size_from_array_init.
10935 2001-11-14  Joseph S. Myers  <jsm28@cam.ac.uk>
10937         * Make-lang.in: Change all uses of $(manext) to $(man1ext).
10939 2001-11-13  Nathan Sidwell  <nathan@codesourcery.com>
10941         PR g++/4206
10942         * parse.y (already_scoped_stmt): Remove.
10943         (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
10945 2001-11-12  H.J. Lu <hjl@gnu.org>
10947         * cvt.c (ocp_convert): Don't warn the address of a weak
10948         function is always `true'.
10950 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
10952         * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
10953         LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
10954         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
10955         * cp-tree.h (print_class_statistics): Remove.
10956         (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
10957         cxx_print_identifier, cxx_set_yydebug): New.
10958         * lex.c (set_yydebug): Rename c_set_yydebug.
10959         * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
10960         lang_print_xnode): Rename.
10961         * tree.c (print_lang_statistics): Rename.
10963 2001-11-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10965         * class.c (dump_array): Fix format specifier warning.
10967 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
10969         * cp-lang.c (LANG_HOOKS_NAME): Override.
10970         (struct lang_hooks): Constify.
10971         * lex.c (cxx_init_options): Update.
10972         (lang_identify): Remove.
10973         * parse.y (language_string): Remove.
10975 2001-11-08  Andreas Franck  <afranck@gmx.de>
10977         * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
10978         DEMANGLER_CROSS_NAME): Handle program_transform_name the way
10979         suggested by autoconf.
10980         (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
10981         (c++.install-common): Use the transformed target alias names.
10983 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
10985         * Make-lang.in: Update.
10986         * cp-lang.c: Include langhooks-def.h.
10988 2001-11-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10990         * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
10992 2001-11-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10994         * lex.c (copy_lang_type): Add static prototype.
10996 2001-11-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10998         * pt.c (unify): Handle SCOPE_REF.
11000 2001-11-01  Jakub Jelinek  <jakub@redhat.com>
11002         * tree.c (cp_copy_res_decl_for_inlining): Adjust
11003         DECL_ABSTRACT_ORIGIN for the return variable.
11005 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
11007         *  Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
11009 2001-10-28  Joseph S. Myers  <jsm28@cam.ac.uk>
11011         * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
11012         semantics.c, spew.c: Fix spelling errors.
11014 2001-10-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11016         * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
11018 2001-10-25  Zack Weinberg  <zack@codesourcery.com>
11020         * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
11021         pop_everything.
11023 2001-10-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11025         * cp-lang.c (cxx_get_alias_set): New function.
11026         Point LANG_HOOKS_GET_ALIAS_SET to it.
11028 2001-10-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11030         * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
11031         * cp-tree.h (make_unbound_class_template): Prototype new function.
11032         * decl.c (make_unbound_class_template): New function.
11033         * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
11034         * error.c (dump_type): Likewise.
11035         * mangle.c (write_type): Likewise.
11036         * parse.y (template_parm): Likewise.
11037         (template_argument): Use make_unbound_class_template.
11038         * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
11039         (tsubst): Likewise.
11040         (tsubst_copy): Likewise.
11041         (unify): Likewise.
11042         * tree.c (walk_tree): Likewise.
11043         * typeck.c (comptypes): Likewise.
11045 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11047         * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
11048         extra calls into fewer ones.
11050 2001-10-18  Alexandre Oliva  <aoliva@redhat.com>
11052         * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
11053         Warn when merging inline with attribute noinline.
11054         (start_decl, start_function): Warn if inline and attribute
11055         noinline appear in the same declaration.
11057 2001-10-16  H.J. Lu <hjl@gnu.org>
11059         * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
11060         for tree checking disabled.
11062 2001-10-16  Hans-Peter Nilsson  <hp@axis.com>
11064         * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
11065         NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
11067 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
11069         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
11070         (unify): Only handle MINUS_EXPR specially if the above flag is set
11071         and the subtracted constant is 1.  Clear the flag on recursive calls.
11072         Set it when unifying the maximum value in an INTEGER_TYPE's range.
11074 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
11076         * decl.c (bad_specifiers): Don't allow exception specifications
11077         on any typedefs.
11079 2001-10-14  Neil Booth  <neil@daikokuya.demon.co.uk>
11081         * cp/lex.c (init_cp_pragma): Similarly.
11083 2001-10-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11085         * pt.c (lookup_template_class): Build complete template arguments
11086         for BOUND_TEMPLATE_TEMPLATE_PARM.
11088 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11090         * cp-tree.h (TYPE_BINFO): Update comment.
11091         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
11092         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
11093         (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
11094         (copy_type): Prototype new function.
11095         * lex.c (copy_lang_decl): Gather tree node statistics.
11096         (copy_lang_type): New function.
11097         (copy_type): Likewise.
11098         (cp_make_lang_type): Create lang_type for
11099         BOUND_TEMPLATE_TEMPLATE_PARM.  Set TYPE_BINFO for TYPENAME_TYPE
11100         and BOUND_TEMPLATE_TEMPLATE_PARM.
11101         * pt.c (tsubst): Use copy_type instead of copy_node.
11102         * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
11104 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11106         * pt.c (determine_specialization): Ignore functions without
11107         DECL_TEMPLATE_INFO.
11109 2001-10-12  Nathan Sidwell  <nathan@codesourcery.com>
11111         PR g++/4476
11112         * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
11114 2001-10-11  Jason Merrill  <jason_merrill@redhat.com>
11116         * typeck2.c (store_init_value): Don't re-digest a bracketed
11117         initializer.
11119         * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
11120         ANON_AGGR_TYPE_P.
11122 2001-10-11  Richard Henderson  <rth@redhat.com>
11124         * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
11125         of an asm statement.
11126         (build_vtbl_ref_1): Split out from build_vtbl_ref.
11127         (build_vfn_ref): Use it to handle vtable descriptors before
11128         calling build_vtable_entry_ref.
11129         * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
11131 2001-10-10  Richard Henderson  <rth@redhat.com>
11133         * parse.y (asm_operand): Allow named operands.
11134         * semantics.c (finish_asm_stmt): Tweek for changed location
11135         of the operand constraint.
11137 2001-10-09  Jason Merrill  <jason_merrill@redhat.com>
11139         * call.c (standard_conversion): Add bad conversion between
11140         integers and pointers.
11141         (convert_like_real): Don't use convert_for_initialization for bad
11142         conversions; complain here and use cp_convert.
11143         (build_over_call): Don't handle bad conversions specially.
11144         (perform_implicit_conversion): Allow bad conversions.
11145         (can_convert_arg_bad): New fn.
11146         * cp-tree.h: Declare it.
11147         * typeck.c (convert_for_assignment): Use it.
11148         (ptr_reasonably_similar): Any target type is similar to void.
11150 2001-10-08  Alexandre Oliva  <aoliva@redhat.com>
11152         * Make-lang.in (CXX_OBJS): Added cp-lang.o.
11153         (cp/cp-lang.o): New rule.
11154         * cp-tree.h: Declare hooks.
11155         * tree.c: Make hooks non-static.
11156         (init_tree): Don't initialize hooks here.
11157         * lex.c: Likewise.  Move definition of lang_hooks to...
11158         * cp-lang.c: ... new file.
11160 2001-10-08  Richard Henderson  <rth@redhat.com>
11162         * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
11163         (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
11165 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11167         * class.c (build_vtable_entry_ref): Const-ify.
11168         * decl.c (predefined_identifier,
11169         initialize_predefined_identifiers): Likewise.
11170         * init.c (build_new_1): Likewise.
11171         * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
11172         Likewise.
11174 2001-10-05  Alexandre Oliva  <aoliva@redhat.com>
11176         * optimize.c (struct inline_data): Moved to ../tree-inline.c.
11177         (INSNS_PER_STMT): Likewise.
11178         (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
11179         (copy_body, initialize_inlined_parameters): Likewise.
11180         (declare_return_variable, inlinable_function_p): Likewise.
11181         (expand_call_inline, expand_calls_inline): Likewise.
11182         (optimize_inline_calls, clone_body): Likewise.
11183         * tree.c (walk_tree): Moved to ../tree-inline.c.
11184         (walk_tree_without_duplicates): Likewise.
11185         (copy_tree_r, remap_save_expr): Likewise.
11187 2001-10-04  Alexandre Oliva  <aoliva@redhat.com>
11189         * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
11190         (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
11191         * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
11192         (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
11193         (flag_inline_trees): Moved declaration to ../tree-inline.h.
11194         (walk_tree): Moved declaration to ../tree-inline.h.
11195         (walk_tree_without_duplicates, copy_tree_r): Likewise.
11196         (remap_save_expr): Likewise.
11197         * decl.c: Include tree-inline.h.
11198         (lang_mark_tree): Don't mark inlined_fns.
11199         * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
11200         * optimize.c: Include tree-inline.h.
11201         (optimize_inline_calls): Move declaration to ../tree.h, as
11202         non-static.
11203         (remap_decl): Use language-independent constructs and hooks.
11204         (remap_block, copy_body_r, declare_return_variable): Likewise.
11205         (inlinable_function_p): Likewise.  Don't test for
11206         DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
11207         no longer language-specific.
11208         (optimize_inline_calls): Likewise.  Make it non-static.  Moved
11209         call of dump_function to...
11210         (optimize_function): Here...
11211         (clone_body): New function, extracted from...
11212         (maybe_clone_body): ... here.  Build decl_map locally and pass
11213         it on to clone_body.
11214         * pt.c, semantics.c: Include tree-inline.h.
11215         * tree.c: Likewise.
11216         (cp_walk_subtrees): New language-specific hook for tree inlining.
11217         (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
11218         cp_is_overload_p, cp_auto_var_in_fn_p,
11219         cp_copy_res_decl_for_inlining): Likewise.
11220         (walk_tree): Move language-specific constructs into...
11221         (cp_walk_subtrees): this new function.
11222         (copy_tree_r): Use language-independent constructs and hooks.
11223         (init_tree): Initialize tree inlining hooks.
11224         (remap_save_expr): Adjust prototype so that the declaration
11225         does not require the definition of splay_tree.
11227 2001-10-03  John David Anglin  <dave@hiauly1.hia.nrc.ca>
11229         * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
11230         to build the declaration instead of the declaration itself.
11232 2001-10-02  Jason Merrill  <jason_merrill@redhat.com>
11234         * decl2.c (cxx_decode_option): Add 'else'.
11236         * spew.c (end_input): No longer static.
11237         * cp-tree.h: Declare it.
11238         * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
11240 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
11242         * call.c (build_over_call), typeck.c (build_function_call_real):
11243         Pass type attributes to check_function_format rather than name or
11244         assembler name.  Don't require there to be a name or assembler
11245         name to check formats.
11247 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
11249         * decl.c (init_decl_processing): Don't call
11250         init_function_format_info.  Initialize lang_attribute_table
11251         earlier.
11252         (builtin_function): Call decl_attributes.
11253         (insert_default_attributes): New.
11255 2001-10-01  Jason Merrill  <jason_merrill@redhat.com>
11257         * decl.c (grokdeclarator): Copy array typedef handling from C
11258         frontend.
11260         * decl.c (grokdeclarator): Copy too-large array handling from C
11261         frontend.
11263 2001-09-29  Alexandre Oliva  <aoliva@redhat.com>
11265         * config-lang.in (target_libs): Added target-gperf, so that we
11266         don't try to build it if C++ is disabled.
11268 2001-09-23  Zack Weinberg  <zack@codesourcery.com>
11270         * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
11271         (cp/errfn.o): Delete rule.
11272         (cp/error.o): Depend on flags.h.
11273         * errfn.c: Delete file.
11274         * cp-tree.h: Declare warn_deprecated.  Remove definitions of
11275         TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
11276         and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
11277         cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
11278         internal_error respectively.  Make cp_deprecated into a macro.
11279         Don't define cp_printer typedef or declare cp_printers.
11280         * error.c: Include flags.h.
11281         Delete: struct tree_formatting_info, print_function_argument_list,
11282         print_declaration, print_expression, print_function_declaration,
11283         print_function_parameter, print_type_id, print_cv_qualifier_seq,
11284         print_type_specifier_seq, print_simple_type_specifier,
11285         print_elaborated_type_specifier, print_rest_of_abstract_declarator,
11286         print_parameter_declaration_clause, print_exception_specification,
11287         print_nested_name_specifier, and definition of cp_printers.
11288         (locate_error): New function.
11289         (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
11290         rewritten in terms of locate_error and diagnostic.c.
11291         (cp_tree_printer): Rename cp_printer; wire up to *_to_string
11292         instead of deleted print_* routines.  Handle %C, %L, %O, %Q also.
11293         (init_error): Adjust to match.
11295 2001-09-22  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11297         * Make-lang.in (CXX_C_OBJS): Add attribs.o.
11299 2001-09-21  Richard Henderson  <rth@redhat.com>
11301         * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
11302         (build_vtbl_initializer): Likewise.
11303         (build_vfn_ref): New.
11304         * cp-tree.h: Declare it.
11305         * call.c (build_over_call): Use it.
11306         * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
11307         * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
11309 2001-09-21  J"orn Rennecke <amylaar@redhat.com>
11311         * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
11313 2001-09-21  Joseph S. Myers  <jsm28@cam.ac.uk>
11315         Table-driven attributes.
11316         * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
11317         * decl2.c (cplus_decl_attributes): Only take one attributes
11318         parameter.
11319         * cp-tree.c (cplus_decl_attributes): Update prototype.
11320         * class.c (finish_struct), decl.c (start_decl, start_function),
11321         decl2.c (grokfield), friend.c (do_friend), parse.y
11322         (parse_bitfield): Update calls to cplus_decl_attributes.
11323         * decl.c (grokdeclarator): Take a pointer to a single ordinary
11324         attribute list.
11325         * decl.h (grokdeclarator): Update prototype.
11326         * decl2.c (grokfield): Take a single ordinary attribute list.
11327         * friend.c (do_friend): Likewise.
11328         * decl.c (shadow_tag, groktypename, start_decl,
11329         start_handler_parms, grokdeclarator, grokparms, start_function,
11330         start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
11331         parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
11332         (process_template_parm, do_decl_instantiation): Pass single
11333         ordinary attribute lists around.
11334         * decl.c (grokdeclarator): Correct handling of nested attributes.
11335         Revert the patch
11336         1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
11337                 * decl.c (grokdeclarator): Embedded attrs bind to the right,
11338                 not the left.
11339         .
11340         * cp-tree.h (cp_valid_lang_attribute): Remove declaration
11341         (cp_attribute_table): Declare.
11342         * decl.c (valid_lang_attribute): Don't define.
11343         (lang_attribute_table): Define.
11344         (init_decl_processing): Initialize lang_attribute_table instead of
11345         valid_lang_attribute.
11346         * tree.c (cp_valid_lang_attribute): Remove.
11347         (handle_java_interface_attribute, handle_com_interface_attribute,
11348         handle_init_priority_attribute): New functions.
11349         (cp_attribute_table): New array.
11350         * decl2.c (import_export_class): Don't use
11351         targetm.valid_type_attribute.
11353 2001-09-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
11355         * Make-lang.in (cp/error.o): Depend on real.h
11356         * error.c: #include "real.h"
11358 2001-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11360         * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
11361         xmalloc/strcpy/strcat.
11363 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11365         * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
11366         Const-ification.
11367         * pt.c (tsubst_decl): Likewise.
11369 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11371         * decl2.c (lang_f_options): Const-ification.
11372         * lex.c (cplus_tree_code_name): Likewise.
11373         * spew.c (yyerror): Likewise.
11375 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
11377         PR c++/3986
11378         * class.c (force_canonical_binfo_r): Check & move an indirect
11379         primary base first.
11380         (force_canonical_binfo): Check that it's not already
11381         canonical.
11382         (mark_primary_virtual_base): Remove BINFO parameter.
11383         (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
11385 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
11387         Remove TYPE_NONCOPIED_PARTS.
11388         * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
11389         CLASSTYPE_PURE_VIRTUALS.
11390         (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
11391         * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
11392         (layout_class_type): Don't call fixup_inline_methods here ...
11393         (finish_struct_1): ... call it here.
11395 2001-09-04  Mark Mitchell  <mark@codesourcery.com>
11397         * decl.c (duplicate_decls): Remove code deadling with
11398         DECL_SAVED_INSNS.
11399         * decl2.c (finish_file): Likewise.
11400         * pt.c (instantiate_decl): Likewise.
11401         * semantics.c (expand_body): Don't defer local functions if
11402         they wouldn't be deferred for some other reason.  Don't
11403         generate RTL for functions that will not be emitted.
11404         (genrtl_start_function): Remove code deadling with
11405         DECL_SAVED_INSNS.
11406         (genrtl_finish_function): Likewise.
11408 2001-09-04  Nathan Sidwell  <nathan@codesourcery.com>
11410         PR c++/4203
11411         * call.c (build_over_call): Do not optimize any empty base
11412         construction.
11414 2001-08-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11416         * error.c (dump_template_decl): Output template parameters
11417         together with their specifiers.
11418         Output `class' prefix for template template parameter.
11419         (dump_decl): Fix formatting.
11421 2001-08-30  Kurt Garloff  <garloff@suse.de>
11423         * optimize.c (inlinable_function_p): Allow only smaller single
11424         functions. Halve inline limit after reaching recursive limit.
11426 2001-08-30  Joern Rennecke <amylaar@redhat.com>
11427             Jason Merrill  <jason_merrill@redhat.com>
11429         * class.c (build_vtable_entry_ref): Subtract in char*, not
11430         ptrdiff_t.
11432 2001-08-23  Jason Merrill  <jason_merrill@redhat.com>
11434         * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
11435         (build_cplus_array_type): Use cp_build_qualified_type, not
11436         TYPE_MAIN_VARIANT, to get an unqualified version.
11438         * decl2.c (grok_alignof): Lose.
11439         (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
11440         * typeck.c (c_alignof): Lose.
11441         * semantics.c (finish_sizeof, finish_alignof): New.
11442         * parse.y: Use them.
11443         * cp-tree.h: Declare them.
11445 2001-08-22  Jason Merrill  <jason_merrill@redhat.com>
11447         * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
11448         Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
11449         * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
11451 2001-08-19  Jakub Jelinek  <jakub@redhat.com>
11453         * typeck2.c (add_exception_specifier): Only require complete type if
11454         not in processing template declaration.
11456 2001-08-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11458         * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
11459         GNU_xref_start_scope and GNU_xref_end_scope.
11461         * tree.c (TYPE_HASH): Moved to ../tree.h.
11463 2001-08-16  Mark Mitchell  <mark@codesourcery.com>
11465         * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
11466         on COMPOUND_EXPRs.
11468 2001-08-14  Richard Henderson  <rth@redhat.com>
11470         * class.c, cp-tree.h (build_vfn_ref): Remove.
11471         * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
11473 2001-08-13  Mark Mitchell  <mark@codesourcery.com>
11475         * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
11476         empty class assignment as having side-effects to avoid
11477         spurious warnings.
11479 2001-08-13  Zack Weinberg  <zackw@panix.com>
11481         * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
11482         * except.c: Include libfuncs.h.
11484 2001-08-11  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
11486         * decl.c (grokdeclarator): Clarify diagnostic message.
11488 2001-08-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11490         * decl2.c (do_nonmember_using_decl): Replace using directive
11491         with using declaration in the error message.
11493 2001-08-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11495         * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
11496         criterion to avoid rebuilding expression tree instead of
11497         processing_template_decl.
11499 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
11501         Support named return value optimization for inlines, too.
11502         * decl.c (finish_function): Nullify returns here.
11503         * semantics.c (genrtl_start_function): Not here.
11504         (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
11505         (nullify_returns_r): No longer static.  Just clear RETURN_EXPR.
11506         Also nullify the CLEANUP_STMT for the nrv.
11507         * cp-tree.h: Declare it.
11508         * optimize.c (declare_return_variable): Replace the nrv with the
11509         return variable.
11510         * typeck.c (check_return_expr): Be more flexible on alignment check.
11511         Ignore cv-quals when checking for a matching type.
11513 2001-08-09  Richard Henderson  <rth@redhat.com>
11515         * decl2.c (finish_objects): Use target hooks instead of
11516         assemble_constructor and assemble_destructor.
11518 2001-08-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
11520         * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
11522 2001-08-07  Nathan Sidwell  <nathan@codesourcery.com>
11524         PR c++/3820
11525         Stop using TYPE_NONCOPIED_PARTS.
11526         * call.c (build_over_call): Be careful when copy constructing
11527         or assigning to an empty class.
11528         * class.c (check_bases_and_members): It has a
11529         COMPLEX_ASSIGN_REF if it has a vptr.
11530         (layout_class_type): Don't add empty class padding to
11531         TYPE_NONCOPIED_PARTS.
11532         (finish_struct_1): Don't add the VFIELD either.
11533         * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
11534         initialization.
11536 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
11538         * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
11540 2001-08-06  Richard Henderson  <rth@redhat.com>
11542         * decl2.c (finish_objects): Pass a symbol_ref and priority to
11543         assemble_{constructor,destructor}.  Remove priority handling.
11545 2001-08-05  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
11547         Don't allow template-id in using-declaration.
11548         * decl2.c (validate_nonmember_using_decl): Handle template-ids.
11549         (do_class_using_decl): Likewise.
11551 2001-08-04  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
11553         * cp/spew.c (read_token): No need to pop buffers.
11555 2001-08-02  Stan Shebs  <shebs@apple.com>
11557         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
11558         (fnaddr_from_vtable_entry): Remove decl.
11559         * method.c (use_thunk): Update comment.
11561 2001-08-01  Andrew Cagney  <ac131313@redhat.com>
11563         * repo.c (get_base_filename): Change return value to const char
11564         pointer.
11566 2001-08-02  Nathan Sidwell  <nathan@codesourcery.com>
11568         Kill -fhonor-std.
11569         * NEWS: Document.
11570         * cp-tree.h (flag_honor_std): Remove.
11571         (CPTI_FAKE_STD): Remove.
11572         (std_node): Remove comment about it being NULL.
11573         (fake_std_node): Remove.
11574         * decl.c (in_fake_std): Remove.
11575         (walk_namespaces_r): Remove fake_std_node check.
11576         (push_namespace): Remove in_fake_std code.
11577         (pop_namespace): Likewise.
11578         (lookup_name_real): Remove fake_std_node check.
11579         (init_decl_processing): Always create std_node. Always add
11580         std:: things there.
11581         (builtin_function): Always put non '_' fns in std.
11582         * decl2.c (flag_honor_std): Remove.
11583         (lang_f_options): Remove honor-std.
11584         (unsupported_options): Add honor-std.
11585         (set_decl_namespace): Remove fake_std_node check.
11586         (validate_nonmember_using_decl): Likewise.
11587         (do_using_directive): Likewise.
11588         (handle_class_head): Likewise.
11589         * dump.c (cp_dump_tree): Likewise.
11590         * except.c (init_exception_processing): Adjust.
11591         * init.c (build_member_call): Remove fake_std_node check.
11592         (build_offset_ref): Likewise.
11593         * lang-options.h: Remove -fhonor-std, -fno-honor-std.
11594         * rtti.c (init_rtti_processing): Adjust.
11596 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
11598         * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
11599         operand while calling cp_tree_equal.
11601 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
11603         The 3.0 ABI no longer has vbase pointer fields.
11604         * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
11605         FORMAT_VBASE_NAME): Remove.
11606         * method.c (do_build_copy_constructor): Adjust.
11607         (do_build_assign_ref): Adjust.
11608         * search.c (lookup_field_r): Adjust.
11609         * typeck.c (build_component_ref): Adjust.
11611         The 3.0 ABI always has a vtable pointer at the start of every
11612         polymorphic class.
11613         * rtti.c (build_headof_sub): Remove.
11614         (build_headof): Adjust.
11615         (get_tinfo_decl_dynamic): No need to check flag_rtti
11616         here. Adjust.
11617         (create_real_tinfo_var): Explain why we need a hidden name.
11619 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
11621         PR c++/3631
11622         * class.c (update_vtable_entry_for_fn): The fixed adjustment
11623         of a virtual thunk should be from declaring base.
11625 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
11627         * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
11628         the shared virtual base, so preserving inheritance graph order.
11630 2001-07-30  Andreas Jaeger  <aj@suse.de>
11632         * decl2.c: Remove unused var global_temp_name_counter.
11634 2001-07-28  Richard Henderson  <rth@redhat.com>
11636         * method.c (pending_inlines): Remove.
11638 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
11640         * class.c (mark_primary_virtual_base): Don't adjust base
11641         offsets here.
11642         (dfs_unshared_virtual_bases): Adjust them here.
11643         (mark_primary_bases): Explain why we adjust at the end.
11645 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
11647         * class.c (finish_struct_1): When copying the primary base's
11648         VFIELD, make sure we find it is at offset zero.
11650 2001-07-26  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11652         * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
11653         tsubst_expr for default template arguments.
11655 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
11657         PR c++/3621
11658         * spew.c (yylex): Only copy the token's lineno, if it is
11659         nonzero.
11661 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
11663         PR c++/3624
11664         * call.c (resolve_args): Simplify, call
11665         convert_from_reference.
11666         (build_new_op): Resolve and convert from reference ARG1
11667         earlier. Adjust ARG2 & ARG3 resolve and conversion.
11669 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
11671         * decl.c (last_function_parm_tags): Remove.
11672         (current_function_parm_tags): Remove.
11673         (init_decl_processing): Adjust.
11674         (start_function): Adjust.
11675         (store_parm_decls): Adjust.
11677         PR c++/3152
11678         * decl.c (grokdeclarator): Detect when a function typedef is
11679         declaring a function, and create last_function_parms correctly.
11681 2001-07-25  Jason Merrill  <jason_merrill@redhat.com>
11683         * call.c (joust): Only prefer a non-builtin candidate to a builtin
11684         one if they have the same signature.
11686         * cvt.c (build_up_reference): Take DECL parm.  Check TREE_STATIC on
11687         it rather than toplevel_bindings_p.  Give it a mangled name if static.
11688         (convert_to_reference): Adjust.
11689         * decl2.c (get_temp_name): Lose.
11690         * mangle.c (mangle_ref_init_variable): New fn.
11691         (mangle_guard_variable): Strip the ref-init header.
11692         * cp-tree.h: Adjust.
11693         * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
11694         initializer.
11695         (grok_reference_init): Always use DECL_INITIAL.
11697 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
11699         PR c++/3416
11700         * call.c (build_conditional_expr): Recheck args after
11701         conversions.
11702         * cp-tree.h (build_conditional_expr): Move to correct file.
11703         * typeck.c (decay_conversion): Diagnose any unknown types
11704         reaching here.
11705         (build_binary_op): Don't do initial decay or default
11706         conversions on overloaded functions.
11707         (build_static_cast): Don't do a decay conversion here.
11709 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
11711         PR c++/3543
11712         * typeck.c (condition_conversion): Resolve an OFFSET_REF.
11713         * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
11715 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
11717         * class.c (build_vtbl_or_vbase_field): Remove, move into ...
11718         (create_vtbl_ptr): ... here.
11720 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
11722         * class.c (build_vbase_offset_vbtl_entries): Look for
11723         non-primary base of which we are a sub vtable.
11725 2001-07-24  Phil Edwards  <pme@sources.redhat.com>
11727         * semantics.c (finish_this_expr):  Remove unused code.
11729 2001-07-24  Nathan Sidwell  <nathan@codesourcery.com>
11731         Simplify rtti, now we've only one ABI.
11732         * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
11733         CPTI_TINFO_VAR_ID.
11734         (tinfo_decl_id, tinfo_var_id): Remove.
11735         (get_typeid_1): Remove.
11736         * rtti.c
11737         (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
11738         (typeid_ok_p): New function.
11739         (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
11740         (get_tinfo_decl): Remove old abi documentation.
11741         (tinfo_from_decl): Remove.
11742         (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
11743         (get_typeid_1): Remove.
11744         (get_base_offset): Remove.
11745         (synthesize_tinfo_var): Absorb get_base_offset.
11746         (create_real_tinfo_var): Don't use tinfo_decl_id.
11748 2001-07-23  Graham Stott  <grahams@redhat.com>
11750         * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
11751         variable has_two_argument_delete_p.
11753 2001-07-21  Nathan Sidwell  <nathan@codesourcery.com>
11755         Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
11756         * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
11757         (CPTI_INDEX_IDENTIFIER): Remove.
11758         (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
11759         (delta2_identifier): Remove.
11760         (index_identifier): Remove.
11761         (pfn_or_delta2_identifier): Remove.
11762         (flag_vtable_thunks): Remove.
11763         (VTABLE_DELTA2_NAME): Remove.
11764         (VTABLE_INDEX_NAME): Remove.
11765         (FNADDR_FROM_VTABLE_ENTRY): Adjust.
11766         (vfunc_ptr_type_node): Adjust.
11767         (VTABLE_NAME_PREFIX): Adjust.
11768         (build_vfn_ref): Lose first parameter.
11769         (fixup_all_virtual_upcast_offsets): Remove.
11770         * decl.c (initialize_predefined_identifiers): Remove
11771         delta2_identifier, index_identifier, pfn_or_delta2_identifier.
11772         (init_decl_processing): Remove no-vtable-thunk code.
11773         * decl2.c (flag_vtable_thunks): Remove.
11774         (mark_vtable_entries): Remove no-vtable-thunk code.
11775         * error.c (dump_decl): Remove no-vtable-thunk code.
11776         (dump_expr): Adjust ptr to member function code.
11777         * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
11778         code.
11779         * rtti.c (build_headof): Remove no-vtable-thunk code.
11780         (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
11781         * search.c (get_base_distance): Remove expand_upcast_fixups case.
11782         (virtual_context) Remove.
11783         (expand_upcast_fixups): Remove.
11784         (fixup_virtual_upcast_offsets): Remove.
11785         (fixup_all_virtual_upcast_offsets): Remove.
11786         * typeck.c (get_member_function_from_ptrfunc): Remove
11787         no-vtable-thunk code.
11788         * call.c (build_over_call): Adjust call to build_vfn_ref.
11789         * class.c (build_vfn_ref): Lose first parameter. Remove
11790         no-vtable-thunk code.
11791         (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
11792         (build_vtable_entry): Remove no-vtable-thunk code.
11794 2001-07-20  Nathan Sidwell  <nathan@codesourcery.com>
11796         Remove old-abi remnants. Remove comments about old abi
11797         behavior. Remove references to 'new-abi' in comments.
11798         * cp-tree.h: Adjust comments.
11799         (vbase_offsets_in_vtable_p): Delete.
11800         (vcall_offsets_in_vtable_p): Delete.
11801         (vptrs_present_everywhere_p): Delete.
11802         (all_overridden_vfuns_in_vtables_p): Delete.
11803         (merge_primary_and_secondary_vtables_p): Delete.
11804         (TYPE_CONTAINS_VPTR_P): Adjust.
11805         (VTT_NAME_PREFIX): Remove.
11806         (CTOR_VTBL_NAME_PREFIX): Remove.
11807         (init_vbase_pointers): Remove.
11808         * class.c: Adjust coments.
11809         (build_vbase_pointer_fields): Delete.
11810         (build_vbase_pointer): Remove old-abi code.
11811         (build_secondary_vtable): Likewise.
11812         (modify_all_vtables): Likewise.
11813         (create_vtable_ptr): Likewise.
11814         (layout_class_type): Likewise.
11815         (finish_struct_1): Likewise.
11816         (finish_vtbls): Likewise.
11817         (dfs_finish_vtbls): Delete.
11818         (build_vbase_offset_vtbl_entries): Remove old-abi code.
11819         * cvt.c: Adjust comments.
11820         * decl.c: Adjust comments.
11821         * decl2.c: Adjust comments.
11822         * init.c: Adjust comments.
11823         (construct_virtual_bases): Remove old-abi code.
11824         * lang-specs.h: Remove -fno-new-abi.
11825         * mangle.c: Adjust comments.
11826         * rtti.c: Adjust comments.
11827         (get_base_offset): Remove old-abi-code.
11828         * search.c: Adjust comments.
11829         (dfs_init_vbase_pointers): Remove.
11830         (dfs_vtable_path_unmark): Remove.
11831         (init_vbase_pointers): Remove.
11832         * semantics.c: Adjust comments.
11833         (emit_associated_thunks): Remove old-abi code.
11834         * typeck.c: Adjust comments.
11836 2001-07-20  Daniel Berlin  <dan@cgsoftware.com>
11838         * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
11839         params.h.
11841 2001-07-19  Mark Mitchell  <mark@codesourcery.com>
11843         * class.c (finish_struct_anon): Forbid nested classes.
11845 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
11847         * decl2.c: Don't include dwarfout.h and dwarf2out.h.
11848         * optimize.c: Include debug.h.
11849         (maybe_clone_body): Use debug hook.
11850         * semantics.c: Include debug.h.
11851         (expand_body): Use debug hook.
11853 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
11855         * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
11857 2001-07-18  Mark Mitchell  <mark@codesourcery.com>
11859         * class.c (type_requires_array_cookie): New function.
11860         (check_methods): Don't try to figure out whether the type needs a
11861         cookie here.
11862         (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
11863         * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
11864         (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
11865         * pt.c (instantiate_class_template): Don't set
11866         TYPE_VEC_DELETE_TAKES_SIZE.
11867         * NEWS: Document ABI changes from GCC 3.0.
11869 2001-07-18  Xavier Delacour <xavier@fmaudio.net>,
11870             Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
11872         * NEWS (Changes in GCC 3.0): Fix typo.
11874 2001-07-13  Joseph S. Myers  <jsm28@cam.ac.uk>
11876         * decl2.c (cplus_decl_attributes): Take a pointer to the node to
11877         which attributes are to be attached, and a flags argument.  Update
11878         call to decl_attributes.
11879         (grokfield): Update call to decl_attributes.
11880         * class.c (finish_struct): Update call to cplus_decl_attributes.
11881         * cp-tree.h (cplus_decl_attributes): Update prototype.
11882         * decl.c (start_decl, grokdeclarator, start_function): Update
11883         calls to decl_attributes and cplus_decl_attributes.
11884         * friend.c (do_friend): Update call to cplus_decl_attributes.
11885         * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
11887 2001-07-12  Mark Mitchell  <mark@codesourcery.com>
11889         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
11890         for `register' variables with an asm-specification.
11892 2001-07-11  Mark Mitchell  <mark@codesourcery.com>
11894         * semantics.c (finish_asm_stmt): Mark the output operands
11895         to an asm addressable, if necessary.
11897 2001-07-11  Ben Elliston  <bje@redhat.com>
11899         * Revert this change -- there is a subtle bug.
11901         PR c++/80
11902         * decl.c (finish_enum): New "attributes" argument; pass it to
11903         cplus_decl_attributes.  Use a narrower type if the enum is packed.
11904         * cp-tree.h (finish_enum): Adjust prototype.
11905         * parse.y (enum_head): New non-terminal.
11906         (structsp): Use it. Enums now may be preceded or followed by
11907         optional attributes -- pass their chained tree to finish_enum().
11908         * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
11910 2001-07-10  Mark Mitchell  <mark@codesourcery.com>
11912         * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
11913         variables.
11915 2001-07-10  Jason Merrill  <jason_merrill@redhat.com>
11917         * semantics.c (cp_expand_stmt): Fix for null
11918         current_function_return_value.
11920 2001-07-10  Jan van Male  <jan.vanmale@fenk.wau.nl>
11922         * call.c (build_op_delete_call): Initialize fn.
11923         (convert_like_real): Delete conditional.
11924         (joust): Initialize *w and *l.
11925         * class.c: Add prototype for binfo_ctor_vtable.
11926         (get_primary_binfo): Initialize result.
11927         * init.c (build_java_class_ref): Initialize name.
11929 2001-07-09  Erik Rozendaal  <dlr@acm.org>
11931         * typeck.c (unary_complex_lvalue): Do not duplicate the
11932         argument to modify, pre-, or post-increment when used as an
11933         lvalue and when the argument has side-effects.
11935 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
11937         * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
11938         (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES.  Call
11939         cplus_decl_attributes even if attrs is NULL.
11940         * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
11942 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
11944         * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
11945         calls to decl_attributes.
11947 2001-07-06  Ira Ruben   <ira@apple.com>
11949         * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
11950         be DECL_TEMPLATE_RESULT.
11952 2001-07-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11954         * cp-tree.h (copy_template_template_parm): Rename to ...
11955         (bind_template_template_parm): ... here.
11956         * tree.c (copy_template_template_parm): Rename to ...
11957         (bind_template_template_parm): ... here.  Remove the case when
11958         NEWARGS is NULL_TREE.
11959         (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
11960         BOUND_TEMPLATE_TEMPLATE_PARM.
11961         * pt.c (lookup_template_class): Adjust.
11963 2001-07-05  Jason Merrill  <jason_merrill@redhat.com>
11965         * cvt.c (convert_lvalue): New fn.
11966         * cp-tree.h: Declare it.
11967         * method.c (do_build_assign_ref): Use it.
11968         (do_build_copy_constructor): Convert parm to base types
11969         before calling base constructors.
11971         * typeck.c (check_return_expr): Check DECL_ALIGN instead of
11972         DECL_USER_ALIGN.  Check flag_elide_constructors instead of
11973         optimize.
11974         * semantics.c (cp_expand_stmt): Don't destroy the named return value.
11976 2001-07-02  Nathan Sidwell  <nathan@codesourcery.com>
11978         * optimize.c (optimize_inline_calls): New function, broken out
11979         of ...
11980         (optimize_function): ... here. Call it. Don't inline if it is
11981         a thunk.
11982         (dump_function): Print name of dump flag causing this dump.
11983         * semantics.c (expand_body): Move thunk inline check to
11984         optimize_function.
11986 2001-06-29  Joseph S. Myers  <jsm28@cam.ac.uk>
11988         * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
11989         (comptypes): Use target.comp_type_attributes.
11991 2001-06-29  Nathan Sidwell  <nathan@codesourcery.com>
11993         * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
11995 2001-06-28  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
11997         * error.c (lang_print_error_function): Add a `diagnostic_context *'
11998         parameter. Tweak.
12000 2001-06-27  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
12002         * decl2.c (import_export_class): Update.
12004 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
12006         * error.c (init_error): Adjust settings.
12008 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
12010         * error.c (init_error): Adjust settings.
12012 2001-06-19  Richard Sandiford  <rsandifo@redhat.com>
12014         * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
12015         return pointers to data members by reference rather than by value.
12017 2001-06-18  Jason Merrill  <jason_merrill@redhat.com>
12019         Implement the Named Return Value optimization.
12020         * cp-tree.h (struct cp_language_function): Add x_return_value.
12021         (current_function_return_value): Now a macro.
12022         * decl.c: Don't define it.
12023         (define_label, finish_case_label): Don't clear it.
12024         (init_decl_processing): Don't register it with GC.
12025         * semantics.c (genrtl_finish_function): Don't check it for
12026         no_return_label.  Copy the RTL from the return value to
12027         current_function_return_value and walk, calling...
12028         (nullify_returns_r): ...this new fn.
12029         * typeck.c (check_return_expr): Set current_function_return_value.
12031 2001-06-15  Jason Merrill  <jason_merrill@redhat.com>
12033         * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
12034         sharing a ctor vtable with.  Merge code for cases 1 and 2.
12035         (binfo_ctor_vtable): New fn.
12036         (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
12038 2001-06-14  Jason Merrill  <jason_merrill@redhat.com>
12040         * class.c (dfs_find_final_overrider): Fix logic.
12042         * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
12043         virtual thunk instead of non-virtual.
12044         (get_matching_virtual): Uncomment.
12046         * pt.c (unify): Don't recurse between the POINTER_TYPE and the
12047         OFFSET_TYPE.  If we're adding cv-quals, the extra ones would be on
12048         PARM, not ARG.
12050 2001-06-14  Nathan Sidwell  <nathan@codesourcery.com>
12052         * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
12053         we've not emerged from the hierarchy of RTTI_BINFO on reaching
12054         a non-virtual base.
12056 2001-06-13  Mark Mitchell  <mark@codesourcery.com>
12058         * NEWS: Update release number.
12060 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
12062         PR c++/3130, c++/3131, c++/3132
12063         * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
12064         * class.c (force_canonical_binfo_r): Move
12065         BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
12066         virtual bases unless they're primary and what they're primary
12067         too has been moved.
12068         (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
12069         with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
12070         BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
12071         derived binfo.
12072         (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
12073         (layout_nonempty_base_or_field): Add most derived type
12074         parameter. Adjust.
12075         (layout_empty_base): Likewise.
12076         (build_base_field): Likewise.
12077         (build_base_fields): Likewise.
12078         (propagate_binfo_offsets): Add most derived type
12079         parameter. Skip non canonical virtual bases too.
12080         (dfs_set_offset_for_unshared_vbases): Don't skip primary
12081         bases. Do skip canonical bases.
12082         (layout_virtual_bases): Adjust.
12083         (layout_class_type): Adjust.
12084         (dfs_get_primary_binfo): Build list of virtual primary base
12085         candidates.
12086         (get_primary_binfo): Check that the shared virtual primary
12087         base candidate was found first.
12088         (accumulate_vtbl_inits): Don't do anything for non-vptr
12089         containing binfos. For case 1 primary virtual bases, keep
12090         checking that we've not emerged from the hierarchy of RTTI_BINFO.
12092 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
12094         PR c++/3089
12095         * class.c (dfs_accumulate_vtbl_inits): Always walk down the
12096         hierarchy looking for primary bases for a ctor
12097         vtable. Recursively call oneself, if we meet our primary via
12098         this route and haven't met it yet via inheritance graph order.
12100 2001-06-11  Mark Mitchell  <mark@codesourcery.com>
12102         * lang-options.h: Emit documentation for -fno-honor-std, not
12103         -fhonor-std.
12105 2001-06-10  Alexandre Oliva  <aoliva@redhat.com>
12107         * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
12108         Don't clobber delta.
12109         (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
12111 2001-06-10  Mark Mitchell <mark@codesourcery.com>
12112             Gabriel Dos Reis  <gdr@codesourcery.com>
12114         * Make-lang.in (cp/call.o): Depend on diagnostic.h
12115         (cp/typeck.o): Depend on diagnostic.h
12116         (cp/typeck2.o): Depend on diagnostic.h
12117         (cp/repo.o): Depend on dignostic.h
12118         * typeck.c: #include diagnostic.h
12119         (convert_for_initialization): Remove extern declaration for
12120         warningcount and errorcount.
12122         * call.c: #include diagnostic.h
12123         (convert_like_real): Remove extern declaration for warnincount and
12124         errorcount.
12126         * repo.c: #include diagnostic.h
12127         * typeck2.c: #include diagnostic.h
12129 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
12131         * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
12132         in previous change.
12134 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
12136         PR c++/2929
12137         * friend.c (do_friend): Use push_decl_namespace for classes at
12138         namespace scope.
12140 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
12141             Jason Merrill <jason_merrill@redhat.com>
12143         PR c++/3061
12144         * class.c (build_secondary_vtable): Use assert, rather than an error
12145         message.
12146         (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
12147         (dfs_accumulate_vtbl_inits): A lost primary virtual base may
12148         be between ORIG_BINFO and RTTI_BINFO, but neither of them.
12149         Don't set BINFO_VTABLE for a primary virtual base.
12151 2001-06-07  Mark Mitchell  <mark@codesourcery.com>
12153         * decl.c (duplicate_decls): Update source position information
12154         when a template function is defined.
12156 2001-06-07  Phil Edwards  <pme@sources.redhat.com>
12158         * lang-specs.h:  Move -D_GNU_SOURCE to config/linux.h.
12160 2001-06-07  Nathan Sidwell  <nathan@codesourcery.com>
12162         PR c++/2914
12163         * decl.c (pushtag): Don't push into a complete type's scope.
12165 2001-06-06  Jason Merrill  <jason_merrill@redhat.com>
12167         * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
12168         (struct lang_decl_flags): Lose generate_with_vtable_p.
12169         (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
12170         * class.c (copy_virtuals): Adjust.
12171         * decl2.c (mark_vtable_entries): Adjust.
12172         * method.c (make_thunk, build_vtable_entry): Adjust.
12173         * class.c (update_vtable_entry_for_fn): Only look as far as the
12174         first defining class.
12175         (build_vtbl_initializer): Put nothing in the slot for a function only
12176         defined in a lost primary virtual base.
12177         (add_vcall_offset_vtbl_entries_1): Use the same code for
12178         the lost primary case and the normal case.
12179         (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
12180         (get_vfield_offset, get_derived_offset): Lose.
12181         (dfs_find_final_overrider): Use look_for_overrides_here.
12182         (get_matching_virtual): New fn.
12183         * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
12184         not BV_VCALL_INDEX.
12185         * search.c (look_for_overrides_here): Split out from...
12186         (look_for_overrides_r): Here.
12188         * class.c (find_final_overrider): Return error_mark_node on error.
12190         * decl2.c (key_method): #if 0 accidental change.
12192 2001-06-06  John David Anglin  <dave@hiauly1.hia.nrc.ca>
12194         * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
12195         (build_over_call): Likewise.
12196         * decl.c (grokparms): Likewise.
12197         * pt.c (tsubst_decl): Likewise.
12198         * typeck.c (convert_arguments): Likewise.
12200 2001-06-05  Mark Mitchell  <mark@codesourcery.com>
12202         * semantics.c (begin_class_definition): Robustify.
12204         * pt.c (instantiate_decl): Tell the repository code about the
12205         clones, not the cloned functions.
12206         * repo.c (repo_template_used): Explicitly instantiate the cloned
12207         function, not the clones.
12209 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
12211         * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
12212         ICS_BAD_FLAG on created conversion.
12213         (compare_ics): Break out rank.
12215 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
12217         * decl.c (xref_tag): Remove extraneous %s on dependent name
12218         lookup warning.
12220 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
12222         * class.c (layout_vtable_decl): Fix off by one error on
12223         build_index_type.
12224         (build_vtt): Likewise.
12225         (build_ctor_vtbl_group): Likewise.
12227 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
12229         * class.c (maybe_indent_hierarchy): New function.
12230         (dump_class_hierarchy_r): Add flags. Dump extra binfo
12231         information, if enabled. Use maybe_indent_hierarchy. Adjust
12232         output format.
12233         (dump_class_hierarchy): Adjust prototype. Adjust output format.
12234         (dump_array, dump_vtable, dump_vtt): New functions.
12235         (finish_struct_1): Adjust hierarchy dumping.
12236         (initialize_vtable): Call dump_vtable.
12237         (build_vtt): Call dump_vtt.
12238         (build_ctor_vtbl_group): Call dump_vtable.
12239         * decl2.c (flag_dump_class_layout): Remove.
12240         (cxx_decode_option): Remove dump translation unit
12241         and dump class hierarchy check. Call dump_switch_p.
12242         (finish_file): Adjust dumping.
12243         (dump.c): Only dump base classes if not TDF_SLIM.
12244         Only dump namespace members if not TDF_SLIM.
12245         * optimize.c (dump_function): New function.
12246         (optimize_function): Call dump_function.
12247         * semantics.c (expand_body): Use dump_enabled_p.
12249 2001-06-01  Nathan Sidwell  <nathan@codesourcery.com>
12251         PR g++/2936
12252         Part missed from first commit
12253         * decl2.c (finish_anon_union): Copy context.
12255 2001-05-30  Nathan Sidwell  <nathan@codesourcery.com>
12257         PR g++/2936
12258         * optimize.c (remap_decl): Remap anonymous aggregate members too.
12260 2001-05-26  Nathan Sidwell  <nathan@codesourcery.com>
12262         PR g++/2823
12263         * semantics.c (expand_body): Don't optimize thunks.
12265 2001-05-25  Sam TH  <sam@uchicago.edu>
12267         * cp-tree.h lex.h: Fix header include guards.
12269 2001-05-25  Mark Mitchell <mark@codesourcery.com>
12271         * decl.c (init_decl_processing): Tweak.
12273 2001-05-24  Mark Mitchell  <mark@codesourcery.com>
12275         * decl.c (duplicate_decls): Tidy.
12276         (init_decl_processing): Always set flag_no_builtin.
12278 2001-05-24  Nathan Sidwell  <nathan@codesourcery.com>
12280         PR c++/2184
12281         * decl2.c (do_local_using_decl): Push the decls, even in a
12282         template.
12284 2001-05-22  Mark Mitchell  <mark@codesourcery.com>
12286         * optimize.c (initialize_inlined_parameters): Don't set
12287         TREE_READONLY for a VAR_DECL taking the place of an inlined
12288         PARM_DECL.
12290 2001-05-22  Jason Merrill  <jason_merrill@redhat.com>
12292         * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
12293         * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
12294         attribute.
12296 2001-05-22  Joseph S. Myers  <jsm28@cam.ac.uk>
12298         * parse.y: Refer to compound literals as such, not as
12299         constructor-expressions.
12301 2001-05-21  Mark Mitchell  <mark@codesourcery.com>
12303         * call.c (build_op_delete_call): Ignore exception-specifications
12304         when looking for matching delete operators.
12305         * init.c (build_new_1): Compute whether or not the allocation
12306         function used is a placement allocation function or not, and
12307         communicate this information to build_op_delete_call.
12309 2001-05-21  Jason Merrill  <jason_merrill@redhat.com>
12311         * class.c (build_vtable_entry_ref): Lose vtbl parm.  Fix for new abi.
12312         (build_vtbl_ref): Adjust.
12313         (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
12314         * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
12315         Re-add vtable-gc.
12316         (unsupported_options): Correspondingly.
12318         * decl2.c (maybe_make_one_only): Check flag_weak, not
12319         supports_one_only().
12321         * cp-tree.def (START_CATCH_STMT): Lose.
12322         * dump.c (cp_dump_tree): Don't dump it.  Do dump HANDLER_PARMS.
12323         * tree.c (cp_statement_code_p): Don't case it.
12324         * semantics.c (cp_expand_stmt): Likewise.
12325         * cp-tree.h (START_CATCH_TYPE): Lose.
12326         (HANDLER_TYPE): New.
12327         * except.c (expand_start_catch_block): Don't start any blocks.
12328         Return the type.
12329         (expand_end_catch_block): Don't end any blocks.
12330         * parse.y (handler): Don't pass anything from finish_handler_parms
12331         to finish_handler.
12332         * pt.c (tsubst_expr): Likewise.
12333         * semantics.c (begin_handler): Call note_level_for_catch here.
12334         (finish_handler_parms): Don't return anything.
12335         (genrtl_catch_block, begin_catch_block): Lose.
12336         (genrtl_handler): Call expand_start_catch here.
12338 2001-05-18  Jason Merrill  <jason_merrill@redhat.com>
12340         * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
12341         (get_vtable_decl, build_vtt): Not here.
12343 2001-05-20  Nathan Sidwell  <nathan@codesourcery.com>
12345         PR c++/2781
12346         * optimize.c (update_cloned_parm): Copy addressability and other
12347         flags.
12349 2001-05-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12351         * pt.c (determine_specialization): Ignore artificial functions.
12353 2001-05-20  Neil Booth  <neil@daikokuya.demon.co.uk>
12355         * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
12356         (C_RID_CODE): Remove.
12357         * lex.c (cxx_init_options): Call set_identifier_size.  Update.
12358         (init_parse): Don't do it here.
12360 2001-05-18  Diego Novillo  <dnovillo@redhat.com>
12362         * decl2.c (finish_objects): Use the original SYMBOL_REF from the
12363         function declaration to avoid stripping the symbol's attributes.
12365 2001-05-18  Nathan Sidwell  <nathan@codesourcery.com>
12367         * decl.c (pushdecl): Adjust error string.
12368         (xref_tag): Adjust friend class injection warning. Remove the
12369         inherited name from the class shadowed scope.
12371 2001-05-17  Mark Mitchell  <mark@codesourcery.com>
12373         * except.c (cp_protect_cleanup_actions): New function.
12374         (init_exception_processing): Don't set protect_cleanup_actions
12375         here.  Do set lang_protect_cleanup_actions.
12377 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
12379         * spew.c (read_token): Call yyerror on all unexpected tokens.
12381 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
12383         * init.c (member_init_ok_or_else): Take a tree rather than
12384         string for name.
12385         (expand_member_init): Adjust.
12387 2001-05-14  Nick Clifton  <nickc@cambridge.redhat.com>
12389         * decl.c (duplicate_decls): Suppress warning about duplicate
12390         decls if the first decl is a friend.
12392 2001-05-12  Zack Weinberg  <zackw@stanford.edu>
12394         * except.c (choose_personality_routine): Export.  Add
12395         explanatory comment.  Take an enum languages, not a boolean.
12396         (initialize_handler_parm): Adjust to match.
12397         * cp-tree.h: Prototype choose_personality_routine.
12398         * lex.c (handle_pragma_java_exceptions): New function.
12399         (init_cp_pragma): Register #pragma GCC java_exceptions.
12401 2001-05-12  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
12403         * method.c (build_mangled_C99_name): Remove unused prototype.
12405 2001-05-12  Alexandre Oliva  <aoliva@redhat.com>
12407         * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
12408         * typeck.c (get_member_function_from_ptrfunc,
12409         build_ptrmemfunc, expand_ptrmemfunc_cst): Take
12410         TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
12412         Reverted Geoff Keating's 2001-05-03's patch.
12414 2001-05-11  Ira Ruben   <ira@apple.com>
12416         * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
12418 2001-05-11  Neil Booth  <neil@daikokuya.demon.co.uk>
12420         * cp-tree.h (finish_label_expr, lookup_label): Delete.
12421         * parse.y: Update for '&&'; don't issue warning here.
12422         * semantics.c (finish_label_expr): Delete.
12424 2001-05-07  Mark Mitchell  <mark@codesourcery.com>
12426         * splay-tree.h (splay_tree_max): New function.
12427         (splay_tree_min): Likewise.
12429 2001-05-03  Geoffrey Keating  <geoffk@redhat.com>
12431         * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
12432         (pfn_vflag_identifier): Define.
12433         Update comment about layout of pointer functions.
12434         (build_ptrmemfunc1): Update prototype.
12435         (expand_ptrmemfunc_cst): Update prototype.
12436         * decl.c (initialize_predefined_identifiers): Initialize
12437         pfn_vflag_identifier.
12438         (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
12439         an extra field to the type.
12440         * expr.c (cplus_expand_constant): Pass 'flag' between
12441         expand_ptrmemfunc_cst and build_ptrmemfunc1.
12442         * typeck.c (get_member_function_from_ptrfunc): When
12443         FUNCTION_BOUNDARY < 16, look at additional field to determine
12444         if a pointer-to-member is a real pointer or a vtable offset.
12445         (build_ptrmemfunc1): Add new parameter to contain extra field.
12446         (build_ptrmemfunc): Pass the extra field around.
12447         (expand_ptrmemfunc_cst): Add new parameter to return extra field.
12448         (pfn_from_ptrmemfunc): Ignore the extra field.
12450 2001-05-03  Mark Mitchell  <mark@codesourcery.com>
12452         * cp-tree.h (flag_inline_trees): Update documentation.
12453         * decl.c (init_decl_processing): Adjust handling of
12454         flag_inline_functions and flag_inline_trees to support -O3.
12455         (grokfndecl): Set DECL_INLINE on all functions if that's what
12456         the user requested.
12457         (save_function_data): Clear DECL_INLINE in
12458         current_function_cannot_inline is non-NULL.
12459         * decl2.c (flag_inline_trees): Update documentation.
12461 2001-05-03  Nathan Sidwell  <nathan@codesourcery.com>
12463         * dump.c (cp_dump_tree, USING_STMT case): New case.
12464         * tree.c (cp_statement_code_p): Add USING_STMT.
12465         * decl2.c (do_using_directive): Add the using directive statement.
12467         * tree.c (walk_tree): Reformat an if block.
12469 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
12471         * decl.c (compute_array_index_type): Don't try to do anything with
12472         the indices when processing a template.
12474 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12476         * call.c: NULL_PTR -> NULL.
12477         * class.c: Likewise.
12478         * cvt.c: Likewise.
12479         * decl.c: Likewise.
12480         * decl2.c: Likewise.
12481         * except.c: Likewise.
12482         * init.c: Likewise.
12483         * rtti.c: Likewise.
12484         * search.c: Likewise.
12485         * tree.c: Likewise.
12486         * typeck.c: Likewise.
12487         * typeck2.c: Likewise.
12489 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
12491         * decl2.c (do_using_directive): Revert previous patch.
12493 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
12495         * cp-tree.def (USING_STMT): New statement node.
12496         * cp-tree.h (USING_STMT_NAMESPACE): New macro.
12497         * decl2.c (do_using_directive): Add USING_STMT to statement
12498         tree. Don't emit errors when processing template decl.
12499         * pt.c (tsubst_expr, USING_STMT case): New case.
12500         * semantics.c (cp_expand_stmt, USING_STMT case): New case.
12502 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
12504         * call.c (build_new_op): Convert args from reference here.
12505         (build_conditional_expr): Don't convert here.
12507 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
12509         * spew.c (last_token_id): New static variable.
12510         (read_token): Set it here.
12511         (yyerror): Use it here.
12513 2001-04-30  Richard Henderson  <rth@redhat.com>
12515         * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
12516         * decl.c: Likewise.
12518 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
12520         * gxxint.texi: Remove.
12521         * Make-lang.in: Remove all traces of gxxint.texi.
12523 2001-04-30  Mark P Mitchell  <mark@codesourcery.com>
12525         * decl2.c (start_static_initialization_or_destruction): Correct
12526         logic to handle the -fno-use-cxa-atexit case.
12528 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
12530         * optimize.c (update_cloned_parm): New function.
12531         (maybe_clone_body): Use it.  Update the `this' parameter too.
12533 2001-04-29  Joseph S. Myers  <jsm28@cam.ac.uk>
12535         * decl2.c (unsupported_options): Add new-abi.
12536         * lang-options.h: Remove no longer supported options.
12538 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
12540         * except.c (can_convert_eh): Don't check template parms,
12541         typename types etc.
12543 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
12545         * optimize.c (maybe_clone_body): Copy parameter names and locations.
12547 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
12549         * cp-tree.h (adjust_clone_args): Prototype new function.
12550         * class.c (adjust_clone_args): New function.
12551         * decl.c (start_function): Call it for in charge ctors.
12553 2001-04-26  Mark Mitchell  <mark@codesourcery.com>
12555         * method.c (use_thunk): Make sure that thunks really are emitted
12556         when requested.
12558 2001-04-26  Nathan Sidwell <nathan@codesourcery.com>
12560         * mangle.c (write_chars): New macro.
12561         (hwint_to_ascii): New function
12562         (write_number): Use it.
12563         (write_integer_cst): Deal with really big numbers.
12565 2001-04-25  Mark Mitchell  <mark@codesourcery.com>
12567         * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
12568         the clone.
12570 2001-04-25  Nathan Sidwell  <nathan@codesourcery.com>
12572         * decl.c (grokdeclarator): Set context of namespace scope
12573         TYPE_DECLS.
12575 2001-04-24  Zack Weinberg  <zackw@stanford.edu>
12577         * cp/optimize.c: Include hashtab.h.
12578         (struct inline_data): Add tree_pruner.
12579         (expand_call_inline, expand_calls_inline): Use it when calling
12580         walk_tree.
12581         (optimize_function): Initialize and free tree_pruner.
12583 2001-04-24  Nathan Sidwell <nathan@codesourcery.com>
12585         Lazy __FUNCTION__ generation.
12586         * cp-tree.def (FUNCTION_NAME): Remove.
12587         * cp-tree.h (function_name_declared_p): Remove.
12588         (cp_fname_init): Prototype.
12589         * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
12590         don't call declare_function_name. Call start_fname_decls.
12591         (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
12592         clobber the line number.
12593         (cp_fname_init): New function.
12594         (start_function): Call start_fname_decls.
12595         (finish_function): Call finish_fname_decls.
12596         * lex.c (reswords): Add slots for __FUNCTION__ et al.
12597         (rid_to_yy): Add mappings for __FUNCTION__ et al.
12598         * optimize.c (maybe_clone_body): Remove function_name_declared_p.
12599         * parse.y (VAR_FUNC_NAME): New token.
12600         (primary): Add VAR_FUNC_NAME.
12601         * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
12602         generation.
12603         (tsubst, FUNCTION_NAME case): Remove.
12604         (tsubst_copy, FUNCTION_NAME case): Remove.
12605         (tsubst_expr, DECL_STMT case): Be careful with a
12606         DECL_PRETTY_FUNCTION_P.
12607         (instantiate_decl): Remove function_name_declared_p.
12608         * semantics.c (begin_compound_statement): Don't call
12609         declare_function_name here.
12610         (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
12611         (finish_translation_unit): Call finish_fname_decls.
12612         (expand_body): Remove function_name_declared_p.
12613         * typeck2.c (digest_init): Allow any ERROR_MARK.
12615 2001-04-24  Nathan Sidwell  <nathan@codesourcery.com>
12617         * pt.c (tsubst_decl): Use VOID_TYPE_P.
12618         * semantics.c: Fix some typos.
12620 2001-04-23  Phil Edwards  <pme@sources.redhat.com>
12622         * cp/decl2.c (flag_honor_std):  Always initialize to 1.
12624 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12626         * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
12628 2001-04-23  Jason Merrill  <jason_merrill@redhat.com>
12630         * except.c (build_throw): Wrap the initialization of the exception
12631         object in a MUST_NOT_THROW_EXPR.
12632         (do_free_exception): #if 0.
12634 2001-04-20  Mark Mitchell  <mark@codesourcery.com>
12636         * cp-tree.h (finish_enum): Change prototype.
12637         * decl.c (finish_enum): Reorganize.
12638         * parse.y (structsp): Adjust calls to finish_enum.
12640 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
12642         * tree.c (cp_tree_equal): Adjust final switch formatting. Add
12643         't' case.
12645 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
12647         * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
12648         (layout_empty_base): Return at end flag.
12649         (build_base_field): Likewise.
12650         (build_base_fields): Likewise.
12651         (layout_virtual_bases): Don't add 1 to eoc value.
12652         (end_of_class): Use full size for empty bases.
12653         (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
12654         empty bases. Don't add 1 to eoc value. Only add trailing padding
12655         if we're an empty class with no empty bases.
12656         (dump_class_hierarchy): Dump size and alignment.
12658 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
12660         * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
12661         ICS_BAD_FLAG.
12663 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
12665         * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
12666         is found, look first if name does not match the structure name.
12668 2001-04-19  Mark Mitchell  <mark@codesourcery.com>
12670         * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
12671         set.
12672         (SET_DECL_LANGUAGE): New macro.
12673         * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
12674         (pushdecl): Likewise.
12675         (build_library_fn_1): Likewise.
12676         (build_cp_library_fn): Likewise.
12677         (grokfndecl): Likewise.
12678         (grokvardecl): Mark `extern "C"' variables as having C linkage.
12679         * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
12680         * lex.c (retrofit_lang_decl): Likewise.
12681         * mangle.c (mangle_decl_string): Don't mangle the names of
12682         variables declared with C language linkage.
12683         * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
12685 2001-04-18  John David Anglin  <dave@hiauly1.hia.nrc.ca>
12687         * semantics.c (simplify_aggr_init_exprs_r): Don't restore
12688         flag_access_control from uninitialized storage.
12690 2001-04-15  Mark Mitchell  <mark@codesourcery.com>
12692         * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
12693         * mangle.c (write_pointer_to_member_type): Fix mangling of
12694         pointers to cv-qualified member function types.
12696         * init.c (build_delete): Create a SAVE_EXPR for the address if
12697         we're going to use it more than once.
12699 2001-04-13  Mark Mitchell  <mark@codesourcery.com>
12701         * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
12702         (expand_ptremfunc_cst): Change prototype.
12703         (delta2_from_ptrmemfunc): Remove.
12704         * expr.c (cplus_expand_constant): Adjust call to
12705         expand_ptrmemfunc_cst.
12706         * typeck.c (build_ptrmemfunc1): Simplify.
12707         (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
12708         results in a constant.
12709         (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
12710         (delta2_from_ptrmemfunc): Remove.
12711         (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
12713 2001-04-12  Jason Merrill  <jason_merrill@redhat.com>
12715         * cp-tree.h (decl_namespace_list): New macro.
12716         (struct saved_scope): Add decl_ns_list.
12717         * decl.c (mark_saved_scope): Mark it.
12718         * decl2.c: Lose static decl_namespace_list.
12719         (init_decl2): Don't save it.
12721 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12723         * cp-tree.h (warn_return_type, yylex): Delete redundant
12724         declarations.
12726         * decl.c (current_class_depth, global_namespace): Likewise.
12728         * decl2.c (current_class_depth, flag_gnu_xref): Likewise
12730         * repo.c (flag_use_repository): Likewise.
12732 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12734         * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
12735         set_block, pushdecl, getdecls, gettags, init_decl_processing,
12736         maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
12737         lvalue_or_else, print_lang_statistics, comp_target_types,
12738         unsigned_type, signed_type, signed_or_unsigned_type,
12739         build_function_call, mark_addressable, incomplete_type_error):
12740         Delete redundant declarations.
12742 2001-04-11  Jason Merrill  <jason_merrill@redhat.com>
12744         * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
12745         (TYPE_ANONYMOUS_P): New macro.
12746         (TAGGED_TYPE_P): New macro.
12747         * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
12748         (grokfndecl, grokvardecl, grokdeclarator): Likewise.
12749         * tree.c (no_linkage_helper): Likewise.
12750         * semantics.c (begin_class_definition): Likewise.
12751         * pt.c (convert_template_argument): Likewise.
12752         * lex.c (check_for_missing_semicolon): Likewise.
12754 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
12756         * class.c (dfs_unshared_virtual_bases): New function.
12757         (mark_primary_bases): Call it.
12758         (check_bases): Ignore virtual bases when determining
12759         nearly-emptiness.
12761 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
12763         * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
12765 2001-04-11  Mark Mitchell  <mark@codesourcery.com>
12767         * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
12768         cloned function to the clone.
12770 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12772         * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
12774         * semantics.c: Include expr.h.
12776 2001-04-11  Nathan Sidwell  <nathan@codesourcery.com>
12778         * method.c (implicitly_declare_fn): Commonize code for copy ctor
12779         and assignment op. Set TREE_USED for parameter.
12781 2001-04-10  Mark Mitchell  <mark@codesourcery.com>
12783         * class.c (find_final_overrider_data): Add `candidates'.
12784         (dfs_find_final_overrider): Don't issue error messages
12785         prematurely.
12786         (find_final_overrider): Issue error messages here.
12787         (build_base_field): Don't warn about amgibuous direct bases here.
12788         (warn_about_ambiguous_direct_bases): New function.
12789         (layout_class_type): Use it.
12791 2001-04-10  Richard Henderson  <rth@redhat.com>
12793         * typeck.c (build_array_ref): Push the array reference inside
12794         COMPOUND_EXPR and COND_EXPR.
12796 2001-04-05  Mark Mitchell  <mark@codesourcery.com>
12798         * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
12799         * decl.c (duplicate_decls): Adjust accordingly.
12800         (maybe_commonize_var): Likewise.
12801         (grokfndecl): Likewise.
12802         (start_function): Likewise.
12803         (start_method): Likewise.
12804         * decl2.c (key_method): Likewise.
12805         (import_export_decl): Likewise.
12806         * method.c (implicitly_declare_fn): Likewise.
12807         * optimize.c (maybe_clone_body): Likewise.
12809 2001-04-05  Benjamin Kosnik  <bkoz@redhat.com>
12811         * lang-specs.h: Add __DEPRECATED.
12813 2001-04-05  J"orn Rennecke <amylaar@redhat.com>
12815         * search.c (get_dynamic_cast_base_type): When building a new
12816         constant, set its type to ssizetype.
12818 2001-04-04  Jakub Jelinek  <jakub@redhat.com>
12820         * optimize.c (expand_call_inline): Only add newly inlined statements
12821         into inlined_stmts.
12823 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
12825         * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
12826         (OPERATOR_FORMAT): Likewise.
12827         (OPERATOR_TYPENAME_FORMAT): Likewise.
12828         * operators.def: Remove old name-mangling information.
12829         * decl.c (grok_op_properties): Adjust accordingly.
12830         * lex.c (init_operators): Likewise.
12831         * rtti.c (get_tinfo_decl): Issue error messages about types that
12832         have variable size.
12834 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
12836         * decl2.c (import_export_decl): Don't call import_export_class
12837         when processing an inline member function.
12838         * semantics.c (expand_body): Call import_export_decl before
12839         emitting inline functions.
12841 2001-03-28  Richard Henderson  <rth@redhat.com>
12843         IA-64 ABI Exception Handling:
12844         * cp-tree.def (EH_SPEC_BLOCK): New.
12845         (MUST_NOT_THROW_EXPR): New.
12846         * cp-tree.h: Update changed function declarations.
12847         (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
12848         (CPTI_CALL_UNEXPECTED): New.
12849         (struct cp_language_function): Rename x_eh_spec_try_block
12850         to x_eh_spec_block.
12851         (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
12852         * decl.c (current_binding_level): If no current function
12853         bindings, revert to scope_chain.
12854         (initialize_predefined_identifiers): Remove __cp_push_exception.
12855         (store_parm_decls): Use begin_eh_spec_block.
12856         (finish_function): Use finish_eh_spec_block.
12857         (mark_lang_function): Update for name changes.
12858         * decl2.c (finish_file): No mark_all_runtime_matches.
12859         * dump.c (cp_dump_tree): Handle new tree codes.
12860         * error.c (dump_expr) [BIND_EXPR]: Fix typo.
12861         * except.c (catch_language_init, catch_language): Remove.
12862         (init_exception_processing): Don't set language code.
12863         Initialize call_unexpected_node, protect_cleanup_actions,
12864         eh_personality_libfunc, lang_eh_runtime_type.
12865         (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
12866         (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
12867         (prepare_eh_type): Split out type canonicalizations ...
12868         (build_eh_type_type): ... from here.
12869         (build_eh_type_type_ref): Remove.
12870         (mark_all_runtime_matches): Remove.
12871         (build_exc_ptr): New.
12872         (do_begin_catch, do_end_catch): New.
12873         (do_pop_exception): Remove.
12874         (build_terminate_handler): Remove.
12875         (choose_personality_routine): Split out language choice from ...
12876         (initialize_handler_parm): ... here.
12877         Use MUST_NOT_THROW_EXPR.
12878         (expand_start_catch_block): Use do_begin_catch.  Simplify Java
12879         exception object handling.
12880         (expand_start_eh_spec, expand_end_eh_spec): Remove.
12881         (expand_exception_blocks, alloc_eh_object): Remove.
12882         (begin_eh_spec_block, finish_eh_spec_block): New.
12883         (do_allocate_exception, do_free_exception): New.
12884         (expand_throw): Merge into ...
12885         (build_throw): ... here.  Update for abi.
12886         * expr.c (cplus_expand_expr): No expand_internal_throw.
12887         Handle MUST_NOT_THROW_EXPR.
12888         * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
12889         * semantics.c (*) Update for except.h name changes.
12890         (genrtl_try_block): No protect_with_terminate.
12891         (genrtl_eh_spec_block): New.
12892         (genrtl_handler): Don't emit the goto here.
12893         (cp_expand_stmt): Handle EH_SPEC_BLOCK.
12894         (genrtl_finish_function): Don't expand_exception_blocks.
12895         * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
12897 2001-03-28  Richard Henderson  <rth@redhat.com>
12899         * decl.c (struct named_label_list): Rename eh_region to
12900         in_try_scope, add in_catch_scope.
12901         (struct binding_level): Rename eh_region to is_try_scope,
12902         add is_catch_scope.
12903         (note_level_for_try): Rename from note_level_for_eh.
12904         (note_level_for_catch): New.
12905         (poplevel): Copy both is_try_scope and is_catch_scope to
12906         the named_label_list struct.
12907         (check_previous_goto_1): Don't check for catch block via
12908         DECL_ARTIFICIAL; use in_try_scope instead.
12909         (check_goto): Likewise.
12910         * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
12911         * except.c (expand_start_catch_block): Call note_level_for_catch.
12912         * semantics.c (begin_compound_stmt): Update for note_level_for_try.
12914 2001-03-27  Richard Henderson  <rth@redhat.com>
12916         * except.c: Use USING_SJLJ_EXCEPTIONS instead of
12917         exceptions_via_longjmp.
12919 2001-03-27  Phil Edwards  <pme@sources.redhat.com>
12921         * pt.c (check_default_tmpl_args):  Make error messages clearer.
12923 2001-03-26  Phil Edwards  <pme@sources.redhat.com>
12925         * error.c:  Also undefine 'A' macro used for cp_printers definition.
12927 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12929         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
12931 2001-03-26  Mike Yang <yang@research.att.com>
12932             Mark Mitchell  <mark@codesourcery.com>
12934         * dump.c (dump_access): New function.
12935         (cp_dump_tree): Use it.  Dump basetype information for class
12936         types.
12938 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
12940         * Makefile.in (optimize.o): Depend on params.h.
12941         (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
12942         (init_decl_processing): Set flag_no_inline when doing
12943         inlining-on-trees.
12944         * optimize.c: Include params.h.
12945         (struct inline_data): Improve documentation of FNS.  Add
12946         FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
12947         (INSNS_PER_STMT): New macro.
12948         (remap_block): Use CLONING_P.
12949         (inlinable_function_p): Don't inline big functions.
12950         (expand_call_inline): Keep track of how much inlining we've done.
12951         (optimize_function): Set FIRST_INLINED_FN.
12952         (maybe_clone_body): Set CLONING_P.
12953         * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
12954         tree nodes.
12955         (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
12956         rest_of_compilation.  Clear DECL_RTL for local variables
12957         afterwards.
12958         (clear_decl_rtl): New function.
12960 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>
12962         Implement DR 209
12963         * cp-tree.h (skip_type_access_control,
12964         reset_type_access_control): Prototype.
12965         * decl.c (grokdeclarator): Access of friends is not checked.
12966         * parse.y (component_decl_list): Reset type access control.
12967         * semantics.c (decl_type_access_control): Clear
12968         current_type_lookups.
12969         (save_type_access_control): Don't save if not deferring.
12970         (skip_type_access_control, reset_type_access_control): New
12971         functions.
12972         (begin_class_definition): Do type access control for basetypes.
12973         Start deferred access control.
12974         (finish_class_definition): Resume immediate access control if
12975         this is a local class.
12977 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12979         * class.c (add_method): Use memcpy/memmove, not bcopy.
12981         * decl.c (duplicate_decls): Likewise.
12983 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
12985         * mangle.c (write_discriminator): Use `_0' for discriminator 1,
12986         not `_'.
12988 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
12990         * decl.c (local_names): Define.
12991         (push_local_name): New.
12992         (grok_reference_init): Return init if initializing static reference
12993         variable with non-constant instead of emitting it.
12994         Move expand_static_init call to cp_finish_decl.
12995         (layout_var_decl): Call push_local_name.
12996         (maybe_commonize_var): Allow inlining functions even if they have
12997         static local variables, use comdat_linkage for them if flag_weak.
12998         (check_initializer): Call obscure_complex_init if
12999         grok_reference_init returned nonzero.
13000         (save_function_data): Clear x_local_names.
13001         (pop_cp_function_context): Free x_local_names.
13002         (mark_inlined_fns): Remove.
13003         (mark_lang_function): Mark x_local_names.
13004         (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
13005         Mark inlined_fns as tree, remove call to mark_inlined_fns.
13006         * class.c (alter_access): Ensure DECL_ACCESS is never set if
13007         DECL_DISCRIMINATOR_P.
13008         * cp-tree.h (cp_language_function): Add x_local_names.
13009         (lang_decl_flags): Add discriminator into u2.
13010         (lang_decl_inlined_fns): Remove.
13011         (lang_decl): inlined_fns is now a TREE_VEC.
13012         (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
13013         * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
13014         TREE_VEC, not a custom structure.
13015         (optimize_function): Likewise.
13016         * mangle.c (discriminator_for_local_entity): Discriminate among
13017         VAR_DECL local entities.
13018         * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
13019         is not valid.
13021 2001-03-22  Bryce McKinlay  <bryce@albatross.co.nz>
13023         Add support for Java interface method calls.
13024         * cp-tree.h (struct lang_type): Add java_interface flag.
13025         (TYPE_JAVA_INTERFACE): New macro.
13026         * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
13027         by setting TYPE_JAVA_INTERFACE.
13028         * call.c (java_iface_lookup_fn): New static.
13029         (build_over_call): If calling a method declared in a
13030         TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
13031         expression which resolves the function address.
13032         (build_java_interface_fn_ref): New function.
13034 2001-03-22  Richard Henderson  <rth@redhat.com>
13036         * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
13037         * except.c: Don't include it.
13039 2001-03-22  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
13040             based on an idea from Joe Buck <jbuck@synopsys.com>
13042         * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
13043         New nonterminals.
13044         (data_def, component_decl): Add reductions to bad_decl.
13046 2001-03-22  Jakub Jelinek  <jakub@redhat.com>
13048         * method.c (do_build_assign_ref): Don't use build_modify_expr for
13049         anonymous aggregates, since they don't have assignment operator
13050         method.
13051         * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
13052         assignment operators for anonymous structure fields.
13054 2001-03-21  Jason Merrill  <jason@redhat.com>
13056         * pt.c (instantiate_decl): Abort if we see a member constant
13057         instantiation that doesn't already have its initializer.
13058         Downgrade explicit instantiation without definition to pedwarn.
13060         * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
13061         * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
13062         (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
13064         * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
13065         (pending_vtables): Remove.
13066         * decl2.c (pending_vtables): Remove.
13067         (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
13068         CLASSTYPE_VTABLE_NEEDS_WRITING.
13069         (import_export_class): Likewise.
13070         (init_decl2): Don't mark pending_vtables.
13071         * lex.c (handle_pragma_vtable): Just sorry.
13072         * pt.c (instantiate_class_template): Don't mess with
13073         CLASSTYPE_VTABLE_NEEDS_WRITING.
13074         (mark_class_instantiated): Likewise.
13075         * ptree.c (print_lang_type): Don't print it.
13076         * semantics.c (begin_class_definition): Don't set it.
13078         * pt.c (template_tail): Replace with last_pending_template.
13079         (maybe_templates, maybe_template_tail): Remove.
13080         (add_pending_template): Adjust.
13081         (instantiate_pending_templates): Adjust.
13083         * cp-tree.h (struct saved_scope): Remove lang_stack field.
13084         (current_lang_stack): Remove.
13085         * decl.c (maybe_push_to_top_level): Don't initialize it.
13086         (duplicate_decls): Use current_lang_depth.
13087         (xref_basetypes): Likewise.
13088         * class.c (current_lang_depth): New fn.
13089         (push_lang_context): Use more varray functionality.
13090         (pop_lang_context): Likewise.
13092         * error.c (GLOBAL_THING): Always use '__'.
13094 2001-03-21  Mark Mitchell  <mark@codesourcery.com>
13096         * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
13098         * mangle.c (mangle_decl_string): Mangle the names of overloaded
13099         operators, even when they have `extern "C"' linkage.
13101 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
13103         * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
13104         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
13105         where it's not necessary.
13106         (add_method): Remove optimization involving comparison of
13107         DECL_ASSEMBLER_NAME.
13108         (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
13109         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
13110         where it's not necessary.
13111         (check_methods): Likewise.
13112         (build_clone): Likewise.
13113         (built_vtt): Likewise.
13114         * cp-tree.h (DECL_NEEDED_P): Likewise.
13115         * decl.c (pushtag): Likewise.
13116         (duplicate_decls): Likewise.
13117         (pushdecl): Likewise.
13118         (builtin_function): Likewise.
13119         (build_library_fn_1): Set DECL_LANGUAGE for library functions.
13120         (build_cp_library_fn): Likewise.
13121         (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
13122         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
13123         where it's not necessary.
13124         (make_rtl_for_nonlocal_decl): Likewise.
13125         (cp_finish_decl): Likewise.
13126         (grokfndecl): Likewise.
13127         (grokvardecl): Likewise.
13128         (grokdeclarator): Likewise.
13129         (start_function): Likewise.
13130         (cp_missing_return_ok_p): Likewise.
13131         * decl2.c (grokclassfn): Likewise.
13132         (check_classfn): Likewise.
13133         (finish_static_data_member_decl): Likewise.
13134         (grokfield): Likewise.
13135         * error.c (GLOBAL_IORD_P): Remove.
13136         (dump_global_iord): Improve output.
13137         (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
13138         * except.c (nothrow_libfn_p): Summarily reject any function not in
13139         namespace-scope.
13140         * init.c (build_java_class_ref): Don't explicitly set
13141         DECL_ASSEMBLER_NAME after calling mangle_decl.
13142         * mangle.c (mangle_decl_string): Handle extern "C" functions.
13143         (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
13144         * method.c (set_mangled_name_for_decl): Don't explicitly set
13145         DECL_ASSEMBLER_NAME after calling mangle_decl.
13146         (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
13147         IDENTIFIER_GLOBAL_VALUE for the thunk.
13148         * pt.c (set_mangled_name_for_template_decl): Remove.
13149         (check_explicit_specialization): Don't use it.
13150         (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
13151         (tsubst_friend_function): Likewise.
13152         (tsubst_decl): Likewise.
13153         (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
13154         * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
13155         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
13156         where it's not necessary.
13157         (tinfo_base_init): Likewise.
13158         (create_real_tinfo_var): Likewise.
13159         * search.c (looup_field_1): Likewise.
13160         * semantics.c (finish_named_return_value): Likewise.
13161         * tree.c (init_tree): Set lang_set_decl_assembler_name.
13163 2001-03-15  Gabriel Dos Reis  <gdr@codesourcery.com>
13165         Correct semantics restrictions checking in throw-expression.
13166         * except.c (is_admissible_throw_operand): New function.
13167         (build_throw): Use it.
13169 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
13171         * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
13172         and its ilk.
13174 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
13176         * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
13177         * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
13178         * decl.c (duplicate_decls): Likewise.
13179         (builtin_function): Likewise.
13180         (build_library_fn): Likewise.
13181         (build_cp_library_fn): Likewise.
13182         (check_initializer): Likewise.
13183         (cp_finish_decl): Likewise.
13184         * decl2.c (grokfield): Likewise.
13185         (grok_function_init): Remove #if 0'd code.
13186         (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
13187         * friend.c (do_friend): Likewise.
13188         * init.c (get_temp_regvar): Likewise.
13189         * method.c (make_thunk): Likewise.
13190         * pt.c (tsubst_friend_function): Likewise.
13191         (tsubst_decl): Likewise.
13192         (regenerate_decl_from_template): Likewise.
13193         * semantics.c (genrtl_named_return_value): Likewise.
13194         (expand_body): Likewise.
13195         (genrtl_finish_function): Likewise.
13196         * tree.c (cp_tree_equal): Likewise.
13198 2001-03-12  Nathan Sidwell  <nathan@codesourcery.com>
13200         * call.c (convert_like_real): Add extra semantics to INNER
13201         parameter. Don't convert to temporary if a user conversion
13202         gives us an lvalue that we're about to bind to a reference.
13203         Set INNER to indicate pending reference binding on recursive
13204         calls.
13206 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
13208         * cp/lex.c: Delete duplicate pending_lang_change.
13210 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
13212         * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
13213         Similarly.
13214         * cp/repo.c (get_base_filename, open_repo_file): Similarly.
13215         * cp/cp-tree.h: Remove file_name_nondirectory prototype.
13217 2001-03-09  Zack Weinberg  <zackw@stanford.edu>
13219         * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
13221 2001-03-08  Stan Shebs  <shebs@apple.com>
13223         * cp-tree.h (set_identifier_local_value): Remove unused decl.
13225 2001-03-06  Zack Weinberg  <zackw@stanford.edu>
13227         * spew.c: Remove references to CPP_OSTRING.
13229 2001-03-06  Andrew Haley  <aph@redhat.com>
13231         * typeck.c (convert_arguments): Check that we have an fndecl.
13233 2001-03-05  Andrew Haley  <aph@redhat.com>
13235         * typeck.c (convert_arguments): Don't do ellipsis conversion for
13236         __built_in_constant_p.
13238 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
13240         * typeck.c (build_static_cast): Allow enum to enum conversions
13241         as per DR 128.
13243 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
13245         * class.c (check_field_decls): Pointers to member do not a
13246         non-pod struct make, as per DR 148.
13248 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
13250         * call.c (joust): cp_pedwarn when using gnu extension concerning
13251         worst conversion sequences.
13253 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
13255         * decl.c: Replace all uses of 'boolean' with 'bool'.
13257 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
13259         * lang-specs.h: Add zero initializer for cpp_spec field to
13260         all array elements that need one.  Don't put an #ifdef inside
13261         the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
13262         use it.
13264 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
13266         Implement using decls inside template functions.
13267         * decl2.c (validate_nonmember_using_decl): Don't special case
13268         fake_std_node in the global namespace. Don't reject early when
13269         processing a template.
13270         (do_local_using_decl): Add to statement tree. Don't do further
13271         processing when building a template.
13272         * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
13274 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
13276         * decl2.c (do_nonmember_using_decl): Don't complain if we find
13277         same function. Do complain about ambiguating extern "C"
13278         declarations.
13280 2001-02-28  Nathan Sidwell  <nathan@codesourcery.com>
13282         Remove floating point and complex type template constant parms.
13283         * pt.c (convert_nontype_argument): Remove REAL_TYPE and
13284         COMPLEX_TYPE extensions.
13285         (invalid_nontype_parm_type_p): Likewise.
13287 2001-02-27  Jeffrey Oldham  <oldham@codesourcery.com>
13289         * except.c (call_eh_info): Revert "match_function"'s type.
13291 2001-02-27  Nathan Sidwell  <nathan@codesourcery.com>
13293         Fix ctor vtable vcall offsets.
13294         * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
13295         (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
13296         (get_matching_base): Remove.
13297         (get_original_base): New function.
13298         (build_vtbl_initializer): Initialize vid.rtti_binfo.
13299         Use a virtual thunk for a ctor vtable with an index
13300         (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
13301         primary base within a constructor vtable. Only set
13302         BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
13303         when primary base has been lost.
13304         * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
13306 2001-02-26  Jeffrey Oldham  <oldham@codesourcery.com>
13308         * call.c (joust): Ensure more_specialized()'s argument length
13309         parameter has correct value for constructors.
13311 2001-02-26  Nathan Sidwell  <nathan@codesourcery.com>
13313         * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
13315         * decl.c (mark_inlined_fns): Prototype.
13317 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
13319         * spew.c (yylex): Correct handling of friends.
13321 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
13323         * mangle.c (write_encoding): Pass write_function_type the
13324         FUNCTION_DECL for the function being encoded.
13325         (write_function_type): Pass it along to write_bare_function_type.
13326         (write_bare_function_type): Pass it along to write_method_parms.
13327         (write_method_parms): Don't mangle the compiler-generated
13328         parameters to a constructor or destructor.
13330 2001-02-22  Andreas Jaeger  <aj@suse.de>
13332         * optimize.c: Include toplev.h for
13333         note_deferral_of_defined_inline_function prototype.
13335 2001-02-22  Jakub Jelinek  <jakub@redhat.com>
13337         * cp-tree.h (struct lang_decl_inlined_fns): New.
13338         (struct lang_decls): Add inlined_fns.
13339         (DECL_INLINED_FNS): New macro.
13340         * optimize.c (struct inline_data): Add inlined_fns.
13341         (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
13342         (inlinable_function_p): Likewise, fix typo in comment,
13343         function is not inlinable if it already inlined function currently
13344         being optimized.
13345         (expand_call_inline): Add fn to inlined_fns if necessary.
13346         (optimize_function): Initialize inlined_fns.
13347         Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
13348         * decl.c (mark_inlined_fns): New function.
13349         (lang_mark_tree): Call it.
13351 2001-02-21  Jason Merrill  <jason@redhat.com>
13353         * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
13354         (DECL_UNINLINABLE): Move to middle-end.
13356         * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
13357         * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
13358         * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
13359         * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
13360         parms and outer BLOCK.  note_deferral_of_defined_inline_function.
13362         * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
13363         second parm of op=.
13365 2001-02-19  Mark Mitchell  <mark@codesourcery.com>
13367         * decl2.c (set_decl_namespace): Allow explicit instantiations in
13368         any namespace.
13370 2001-02-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
13372         * optimize.c (expand_call_inline): Don't walk subtrees of type
13373         nodes.
13375 2001-02-18  Mark Mitchell  <mark@codesourcery.com>
13377         * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
13378         for a destructor.
13380 2001-02-18  Jason Merrill  <jason@redhat.com>
13382         Do put the VTT parameter in DECL_ARGUMENTS.
13383         * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
13384         (current_vtt_parm): New macro.
13385         (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
13386         (DECL_HAS_VTT_PARM_P): New macro.
13387         (DECL_VTT_PARM): Remove.
13388         (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
13389         * decl.c (duplicate_decls): Only copy the operator code if
13390         appropriate.
13391         (start_function): Set current_vtt_parm.
13392         (lang_mark_tree): Don't mark vtt_parm.
13393         * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
13394         DECL_ARGUMENTS.  Set DECL_HAS_VTT_PARM_P.
13395         * class.c (build_clone): Maybe remove the VTT parm.
13396         * optimize.c (maybe_clone_body): Set up the VTT parm.
13397         * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
13398         * call.c (build_over_call): Just allow the VTT arg.
13399         * method.c (make_thunk): Don't set DECL_VTT_PARM.
13400         (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
13401         (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
13402         * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
13403         * error.c (dump_function_decl): Likewise.
13404         * call.c (build_user_type_conversion_1, convert_like_real): Abort
13405         if we try to call a constructor with in-charge or VTT parms.
13406         * method.c (skip_artificial_parms_for): New fn.
13407         * call.c (add_function_candidate, build_over_call): Call it.
13408         * call.c (build_new_method_call): Use current_vtt_parm.
13409         * init.c (expand_virtual_init): Likewise.
13410         * class.c (same_signature_p): No longer static.
13411         * cp-tree.h: Declare it.
13412         * search.c (look_for_overrides_r): Use it.
13414 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
13416         * cp-tree.h (new_abi_rtti_p): Remove.
13417         (name_mangling_version): Likewise.
13418         (flag_do_squangling): Likewise.
13419         * class.c (build_rtti_vtbl_entries): Remove old ABI support.
13420         * decl.c (grokfndecl): Likewise.
13421         * decl2.c (name_mangling_version): Remove.
13422         (flag_do_squangling): Likewise.
13423         (lang_f_options): Remove `squangle'.
13424         (unsupported_options): Add `squangle'.
13425         (cxx_decode_option): Issue a warning about uses of
13426         -fname-mangling-version.
13427         (finish_file): Remove old ABI support.
13428         * pt.c (check_explicit_specialization): Likewise.
13429         (tsubst_decl): Likewise.
13430         * rtti.c (init_rtti_processing): Likewise.
13431         (build_headof): Likewise.
13432         (get_tinfo_decl_dynamic): Likewise.
13433         (tinfo_from_decl): Likewise.
13434         (build_dynamic_cast_1): Likewise.
13435         (synthesize_tinfo_var): Likewise.
13436         * init.c (build_new): Allow enumeration types for the array-bounds
13437         in a direct-new-declarator.
13439         * semantics.c (finish_typeof): Resolve OFFSET_REFs.
13441         * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
13442         TREE_PROTECTED from the template being specialized.
13444 2001-02-17  Jason Merrill  <jason@redhat.com>
13446         * decl2.c (build_artificial_parm): Set TREE_READONLY.
13448         * decl.c (bad_specifiers): Allow throw specs on things with
13449         pointer-to-function or -member-function type.
13450         * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
13451         a pmf.
13453 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
13455         * call.c (check_dtor_name): Handle template names correctly.
13457 2001-02-16  Jason Merrill  <jason@redhat.com>
13459         * cp-tree.h (DECL_USE_VTT_PARM): Remove.
13460         * decl2.c (maybe_retrofit_in_chrg): Don't create it.
13461         * optimize.c (maybe_clone_body): Don't substitute it.
13462         * call.c (build_new_method_call): Check in_chrg instead.
13463         * init.c (expand_virtual_init): Likewise.
13465 2001-02-16  Gabriel Dos Reis  <gdr@codesourcery.com>
13467         * decl.c (check_tag_decl): Make sure a typedef for an anonymous
13468         class-type introduces at least a type-name.
13470 2001-02-16  Jakub Jelinek  <jakub@redhat.com>
13472         * call.c (convert_like_real): Create a temporary for non-lvalue.
13474 2001-02-16  Jeffrey Oldham  <oldham@codesourcery.com>
13476         * cp-tree.h: Fix typos in comments.
13478 2001-02-16  Jason Merrill  <jason@redhat.com>
13480         * optimize.c (remap_block): If we're compiling a clone, pass the
13481         new block to insert_block.
13483 2001-02-16  Mark Mitchell  <mark@codesourcery.com>
13485         * semantics.c (finish_asm_stmt): Robustify.
13487 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
13489         * pt.c (push_template_decl_real): Don't remangle the name of a
13490         class template.
13492 2001-02-15  Jim Meyering  <meyering@lucent.com>
13494         * Make-lang.in (c++.install-common): Depend on installdirs.
13495         (c++.install-info): Likewise.
13496         (c++.install-man): Likewise.
13498 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
13500         * typeck2.c (build_m_component_ref): Robustify.
13502 2001-02-15  Alexandre Oliva  <aoliva@redhat.com>
13504         * friend.c (do_friend): Don't take the nested [template] class
13505         into account when deciding whether to warn about the friend
13506         function not referring to a template function.
13508 2001-02-14  Jakub Jelinek  <jakub@redhat.com>
13510         * typeck.c (build_unary_op): Clarify error message.
13512 2001-02-08  Aldy Hernandez  <aldyh@redhat.com>
13514         * parse.y (component_constructor_declarator): allow optional
13515         parentheses around constructor class name.
13517 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
13519         * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
13520         section.
13521         * init.c (emit_base_init): Remove incorrect comment about
13522         virtual bases.
13523         * method.c (make_thunk): Fix comment alignment.
13525 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
13527         Kill remnants of this is variable.
13528         * cp-tree.h (flag_this_is_variable): Remove.
13529         * decl2.c (flag_this_is_variable): Remove.
13530         * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
13531         (build_vbase_path): The path is non-static, even in a cdtor.
13532         (resolves_to_fixed_type_p): Add additional return value.
13533         * search.c (init_vbase_pointers): Adjust.
13534         * tree.c (lvalue_p_1): Adjust.
13535         * typeck.c (mark_addressable): Adjust.
13537 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
13539         * pt.c (unify): Don't check cv quals of array types.
13541 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
13543         * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
13544         check whether we already have the type.
13546 2001-02-13  Mark Mitchell  <mark@codesourcery.com>
13548         * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
13549         * call.c (build_op_delete_call): Simplify to remove duplicate
13550         code.
13551         * class.c (clone_function_decl): Don't build the deleting variant
13552         of a non-virtual destructor.
13553         * decl.c (finish_destructor_body): Don't call delete if this is a
13554         non-virtual destructor.
13555         * init.c (build_delete): Explicitly call `operator delete' when
13556         deleting an object with a non-virtual destructor.
13558 2001-02-13  Jason Merrill  <jason@redhat.com>
13560         * lang-specs.h: Add more __EXCEPTIONS.
13562 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
13564         * typeck2.c (process_init_constructor): Check
13565         TREE_HAS_CONSTRUCTOR before issuing missing init warning.
13567 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
13569         * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
13570         Remove spurious information in comment. Allow further
13571         adjustments of REFERENCE_TYPE args.
13573 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
13575         * errfn.c (cp_deprecated): Tweak diagnostic text.
13576         * parse.y (new_initializer): Deprecate initializer lists
13577         extension.
13579 2001-02-12  Mark Mitchell  <mark@codesourcery.com>
13581         Remove old ABI support.
13583 2001-02-11  Mark Mitchell  <mark@codesourcery.com>
13585         * decl2.c (flag_vtable_thunks): Always set it to 1.
13586         (flag_new_abi): Likewise.
13587         * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
13589         * Makefile.in (g++spec.o): Fix typo.
13591 2001-02-09  Jason Merrill  <jason@redhat.com>
13593         * lang-specs.h: Restore definition of __EXCEPTIONS.
13595 2001-02-08  Jason Merrill  <jason@redhat.com>
13597         * search.c (shared_member_p): New function.
13598         (lookup_field_r): Use it.
13599         * cp-tree.h (SHARED_MEMBER_P): Remove.
13601         * method.c (process_overload_item): Handle template-dependent array
13602         bounds.
13603         * pt.c (type_unification_real): If we end up with undeduced nontype
13604         parms, try again.
13606         * decl.c (lookup_name_real): Tweak warning to refer to decls, not
13607         types.
13609         * typeck2.c (friendly_abort): Don't say anything if we have
13610         earlier errors or sorries.
13612         * decl.c (check_tag_decl): Notice attempts to redefine bool and
13613         wchar_t.  Ignore if in_system_header.
13615         * decl.c (maybe_push_cleanup_level): New fn...
13616         (start_decl_1): ...split out from here.
13617         * cvt.c (build_up_reference): Use it.
13618         * cp-tree.h: Declare it.
13620 2001-02-07  Mark Mitchell  <mark@codesourcery.com>
13622         * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
13623         spec.
13625 2001-02-06  Nathan Sidwell  <nathan@codesourcery.com>
13627         * pt.c (lookup_template_class): Make sure it's a primary
13628         template or template_template_parm when called from the parser.
13629         (instantiate_template_class): Add assertion.
13631 2001-02-05  Alexandre Oliva  <aoliva@redhat.com>
13633         * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
13634         from error_mark_node.
13636 2001-02-05  Nathan Sidwell  <nathan@codesourcery.com>
13638         Fix specification and implementation bugs in V3 ABI
13639         construction vtables.
13640         * cp-tree.h (flag_dump_class_layout): New flag.
13641         (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
13642         (BINFO_LOST_PRIMARY_P): New flag.
13643         (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
13644         (BINFO_PRIMARY_MARKED_P): Rename to ...
13645         (BINFO_PRIMARY_P): ... here.
13646         (binfo_via_virtual): New prototype.
13647         * decl2.c (flag_dump_class_layout): New flag.
13648         (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
13649         use `=' as a file name separator.
13650         * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
13651         bases.
13652         (build_vtbl_address): If this is a virtual primary base, then
13653         get the vtbl of what it is ultimately primary for.
13654         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
13655         for BINFO_PRIMARY_P.
13656         (dfs_skip_nonprimary_vbases_markedp): Likewise.
13657         (get_shared_vbase_if_not_primary): Likewise.
13658         (dfs_get_pure_virtuals): Likewise.
13659         (expand_upcast_fixups): Likewise.
13660         (fixup_virtual_upcast_offsets): Likewise.
13661         (dfs_find_vbase_instance): Likewise.
13662         (find_vbase_instance): Likewise.
13663         (binfo_from_vbase): Adjust comment to reflect reality.
13664         (binfo_via_virtual): New function.
13665         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
13666         for binfo walking during VTT construction.
13667         (dfs_mark_primary_bases): Remove.
13668         (force_canonical_binfo_r): New function.
13669         (force_canonical_binfo): New function.
13670         (mark_primary_virtual_base): New function.
13671         (mark_primary_bases): Walk in inheritance graph order, use
13672         mark_primary_virtual_base.
13673         (determine_primary_base): Use some more intermediate variables.
13674         (dfs_find_final_overrider): Don't check for overriding along a
13675         virtual path.
13676         (dfs_modify_vtables): Walk into primary virtual bases too.
13677         (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
13678         (build_base_fields): Likewise.
13679         (dfs_set_offset_for_unshared_vbases): Likewise.
13680         (layout_virtual_bases): Likewise.
13681         (end_of_class): Likewise.
13682         (finish_struct_1): Call dump_class_hierarchy, if requested.
13683         (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
13684         (dump_class_hierarchy_r): Add stream parameter. Emit more information.
13685         (dump_class_hierarchy): Add file parameter. Append to file, if
13686         required.
13687         (finish_vtbls): Adjust accumulate_vtbl_inits call.
13688         Use canonical base for virtual bases.
13689         (build_vtt): Add more comments. Adjust build_vtt_inits call.
13690         (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
13691         Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
13692         VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
13693         virtual VTTs.
13694         (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
13695         from DATA.  We want virtual primary bases and all bases via virtual.
13696         Only set BINFO_VPTR_INDEX for top level. Look up from a primary
13697         virtual base when not a construction vtable.
13698         (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
13699         (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
13700         Use canonical bases when processing virtual bases.
13701         (accumulate_vtbl_inits): We're interested in any base via a
13702         virtual path.
13703         (dfs_accumulate_vtbl_inits): If this is a primary virtual base
13704         within a construction vtable, determine what is being overridden.
13705         (build_vtbl_initializer): Add more comments
13706         (add_vcall_offset_vtbl_entries_1): Adjust comment.
13707         (build_rtti_vtbl_entries): Check if the base has lost its
13708         primary.
13710 2001-02-05  Mark Mitchell  <mark@codesourcery.com>
13712         * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
13714 2001-02-04  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13716         * decl.c (pushdecl): Call abort instead of fatal.
13717         * except.c (decl_is_java_type): Call fatal_error instead of fatal.
13718         * init.c (build_new_1): Likewise.
13719         (build_java_class_ref): Call internal_error and fatal_error, not fatal.
13720         * decl.c (build_typename_type): hash_table_init now returns void.
13721         decl.c (init_decl_processing): Make an error non-fatal.
13723 2001-02-04  Mark Mitchell  <mark@codesourcery.com>
13725         * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
13726         Document.
13727         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
13728         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
13729         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
13730         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
13731         * decl.c (maybe_commonize_var): Use the new name-mangling where
13732         appropriate.
13733         * decl2.c (comdat_linkage): Enhance comments.  Make all
13734         compiler-generated things static, if COMDAT is not available.
13735         (get_tinfo_decl): Do not make typeinfo objects that belong in the
13736         library COMDAT.
13737         (tinfo_base_init): Use the correct mangled name for typeinfo
13738         strings, and push them into the global scope.
13739         (typeinfo_in_lib_p): New function.
13740         (synthesize_tinfo_var): Use it.
13741         (create_real_tinfo_var): Likewise.
13743 2001-02-03  Jakub Jelinek  <jakub@redhat.com>
13745         * decl.c (push_class_binding): Use context_for_name_lookup instead
13746         of CP_DECL_CONTEXT.
13747         * search.c (context_for_name_lookup): Remove static.  Check for NULL
13748         context in the loop.
13749         * cp-tree.h (context_for_name_lookup): Add prototype.
13751 2001-02-02  Jakub Jelinek  <jakub@redhat.com>
13753         * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
13754         * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
13755         Remove.
13756         * call.c (convert_class_to_reference, build_user_type_conversion_1,
13757         add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
13759 2001-02-02  Mark Mitchell  <mark@codesourcery.com>
13761         * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
13762         of macros used when compiling g++spec.c.
13763         * g++spec.c (lang_specific_driver): Link with the shared
13764         libgcc by default.
13766 2001-01-29  Joseph S. Myers  <jsm28@cam.ac.uk>
13768         * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
13769         make_reference_declarator, make_call_declarator), method.c
13770         (implicitly_declare_fn), parse.y (namespace_using_decl,
13771         notype_unqualified_id, expr_or_declarator, new_type_id,
13772         after_type_declarator, direct_after_type_declarator,
13773         notype_declarator, complex_notype_declarator,
13774         complex_direct_notype_declarator, qualified_id,
13775         notype_qualified_id, overqualified_id, direct_new_declarator,
13776         absdcl, direct_abstract_declarator, conversion_declarator), pt.c
13777         (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
13778         instead of build_parse_node.
13780 2001-01-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13782         * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
13783         (minus_one_node): Moved to top level gcc directory.  Renamed
13784         to integer_minus_one_node.
13786         * init.c (init_init_processing): Don't set minus_one_node.
13787         (build_vec_init): Use integer_minus_one_node.
13789         * rtti.c (get_tinfo_decl_dynamic): Likewise.
13791 2001-01-28  Jakub Jelinek  <jakub@redhat.com>
13793         * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
13794         identical and they would be replaced with constant, remove
13795         MODIFY_EXPR from the tree.
13797 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13799         * Make-lang.in: Remove all dependencies on defaults.h.
13800         * call.c: Don't include defaults.h.
13801         * decl.c: Likewise.
13802         * decl2.c: Likewise.
13803         * except.c: Likewise.
13804         * pt.c: Likewise.
13805         * rtti.c: Likewise.
13806         * tree.c: Likewise.
13807         * typeck.c: Likewise.
13809 2001-01-25  Jakub Jelinek  <jakub@redhat.com>
13811         * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
13812         operators even in "C" linkage.
13813         * method.c (set_mangled_name_for_decl): Likewise.
13814         * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
13815         overloaded operators in "C" linkage.
13817 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
13819         * pt.c (tsubst_decl): Remove IN_DECL parameter.
13820         (tsubst_arg_types): Check parameter is not void.
13821         (tsubst): Adjust tsubst_decl call.
13823 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
13825         * call.c (add_builtin_candidate): Quote std properly, from
13826         previous change.
13828 2001-01-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
13830         * pt.c (check_explicit_specialization): Clone constructors and
13831         destructors.
13833 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
13835         * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
13836         indicates anything special about template depth. Make sure we
13837         only count the user visible template classes.
13839 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
13841         * call.c (build_conv): Typo in comment.
13842         (add_builtin_candidate): Add more explanation.
13843         Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
13844         Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
13845         when we have enumeral types.
13846         (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
13847         candidates for relops and eqops.
13848         (joust): Simplify control flow. Allow a non-template user
13849         function to hide a builtin.
13851 2001-01-22  Nathan Sidwell  <nathan@codesourcery.com>
13853         * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
13854         (more_specialized): Add deduction parameter.
13855         * call.c (joust): Adjust more_specialized call.
13856         * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
13857         UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
13858         (get_bindings_order): Remove.
13859         (get_bindings_real): Add DEDUCE parameter.
13860         (maybe_adjust_types_for_deduction): Return extra unify flags. Do
13861         REFERENCE_TYPE jig for DEDUCE_ORDER.
13862         (type_unification_real): Deal with DEDUCE_ORDER. Use result of
13863         maybe_adjust_types_for_deduction.
13864         (more_specialized): Add DEDUCE parameter. Call get_bindings_real
13865         directly.
13866         (try_one_overload): Use result of maybe_adjust_types_for_deduction.
13867         (check_cv_quals_for_unify): Use new unify qualifier flags.
13868         (unify): Clear new unify qualifier flags.
13869         (get_bindings_real): Add DEDUCE parameter.
13870         (get_bindings): Adjust call to get_bindings_real.
13871         (get_bindings_overload): Likewise.
13872         (most_specialized_instantiation): Adjust call to
13873         more_specialized.
13875 2001-01-19  Jason Merrill  <jason@redhat.com>
13877         * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
13879         * decl.c (init_decl_processing): Just force -fvtable-thunks on if
13880         -fnew-abi.
13882 2001-01-19  Ute Pelkmann  <scope.muc@t-online.de>
13884         * decl2.c (arg_assoc_class): Fix double iteration logic.
13886 2001-01-19  Jason Merrill  <jason@redhat.com>
13888         * init.c (build_delete): Always call convert_force to strip cv-quals.
13890         * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
13891         * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
13892         * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
13894 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
13896         * search.c (get_vbase_1): Count only virtual bases.
13898 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
13900         * class.c (duplicate_tag_error): Robustify flag clearing.
13902 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
13904         * cp-tree.h (lookup_template_class): Add complain parm.
13905         * decl.c (lookup_namespace_name): Adjust call to
13906         lookup_template_class.
13907         (make_typename_type): Likewise.
13908         * semantics.c (finish_template_type): Likewise.
13909         * pt.c (lookup_template_class): Add complain parm. Adjust.
13910         (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
13911         (tsubst): Likewise.
13913 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
13915         * pt.c (copy_default_args_to_explicit_spec): Preserve
13916         object's CV quals. Reorganize.
13918 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
13920         * typeck.c (build_modify_expr): Say `initialization' for
13921         INIT_EXPRs.
13922         * init.c (build_default_init): Convert to enumeral type, if
13923         needed.
13925 2001-01-18  Jakub Jelinek  <jakub@redhat.com>
13927         * parse.y (nomods_initdcl0): Properly set things up for
13928         initdcl0_innards.
13930 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
13932         * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
13933         (type_unification_real): Set it.
13934         (unify): Use it.
13936 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
13938         * decl.c (finish_destructor_body): Convert to vbase pointer here.
13940 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
13942         * semantics.c (begin_class_definition): Check we're not inside a
13943         template parm list.
13945 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
13947         * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
13948         BASELINK_P.
13950 2001-01-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
13952         * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
13953         * call.c (build_over_call): Add comment.
13955 2001-01-16 Daniel Berlin <dberlin@redhat.com>
13957         * cvt.c (ocp_convert): Handle vector type conversion
13958         * typeck2.c (digest_init): Handle vector type initializations
13960 2001-01-16  Phil Edwards  <pme@sources.redhat.com>
13962         * g++spec.c:  Don't add libraries needlessly if -fsyntax-only
13963           was given.
13965 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
13967         * pt.c (check_nontype_parm): Rename to ...
13968         (invalid_nontype_parm_type_p): ... here.
13969         (process_template_parm): Adjust.
13970         (convert_template_argument): Adjust.
13972 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
13974         * pt.c (check_nontype_parm): New function.
13975         (process_template_parm): Use it.
13976         (convert_template_argument): Use it.
13977         (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
13978         member.
13980 2001-01-14  Jeffrey Oldham  <oldham@codesourcery.com>
13982         * tree.c: Add defaults.h
13983         (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
13984         * Make-lang.in (cp/tree.o): Add defaults.h.
13986 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
13988         * Make-lang.in (CXX_C_OBJS): Add c-format.o.
13990 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
13992         * g++.1: Change to be ".so man1/gcc.1".
13994 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
13996         * Make-lang.in (c++.info, c++.install-info): Build and install g++
13997         internals info.
13998         (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
13999         ($(srcdir)/cp/g++int.info): New target.
14000         * gxxint.texi: Add info directory entry.  Use @@ in email address.
14001         * .cvsignore: Update.
14003 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
14005         * typeck.c (build_c_cast): Do template processing earlier.
14006         Always pedwarn on array casts.
14008 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
14010         * friend.c (make_friend_class): Make sure a templated class is
14011         actually a template.
14013 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
14015         * decl2.c (get_guard): Set linkage from guarded decl.
14017 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
14019         * call.c (convert_default_arg): Check for unprocessed
14020         DEFAULT_ARG.
14021         * cp-tree.h (replace_defarg): Move to spew.c.
14022         (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
14023         spew.c, which is where they really are.
14024         (done_pending_defargs): Declare.
14025         (unprocessed_defarg_fn): Declare.
14026         * decl.c (replace_defarg): Move to spew.c
14027         * parse.y (structsp): Call done_pending_defargs.
14028         * spew.c (defarg_fns): Rearrange list structure.
14029         (defarg_fnsdone): New static variable.
14030         (defarg_depfns): New static variable.
14031         (init_spew): Adjust.
14032         (add_defarg_fn): Store the type in TREE_TYPE.
14033         (do_pending_defargs): Detect and deal with ordering constraints
14034         and circularity.
14035         (done_pending_defargs): New function.
14036         (unprocessed_defarg_fn): New function.
14037         (replace_defarg): Moved from decl.c. Robustify. Don't save
14038         if circularity detected.
14040 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
14042         * pt.c (unify): Check array has a domain, before checking
14043         whether it is variable sized.
14045 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
14047         * decl.c (grokparms): Unobfuscate and get correct diagnostic for
14048         parameters with pointers to arrays of unknown bound.
14050 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
14052         * parse.y (template_parm_header, template_spec_header): New
14053         reductions. Split out from ...
14054         (template_header): ... here. Use them.
14055         (template_template_parm): Use template_parm_header.
14056         * semantics.c (finish_template_template_parm): Add assert.
14058 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
14060         * mangle.c (write_builtin_type): Fix thinko.
14062         * pt.c (copy_default_args_to_explicit_spec_1): New function.
14063         (copy_default_args_to_explicit_spec): Likewise.
14064         (check_explicit_specialization): Use it.
14066         * class.c (finish_struct_1):  Remove last argument in call to
14067         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
14068         * decl.c (builtin_function): Likewise.
14069         (build_cp_library_fn): Likewise.
14070         (check_initializer): Likewise.
14071         (make_rtl_for_nonlocal_decl): Likewise.
14072         (cp_finish_decl): Likewise.
14073         (start_function): Likewise.
14074         * decl2.c (finish_anon_union): Likewise.
14075         * friend.c (do_friend): Likewise.
14076         * init.c (build_java_class_ref): Likewise.
14077         * method.c (make_thunk): Likewise.
14078         * pt.c (tsubst_friend_function): Likewise.
14079         * semantics.c (expand_body): Likewise.
14081 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
14083         * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
14084         looking at DECL_CLONED_FUNCTION for non-functions.
14086 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
14088         * error.c (dump_template_parameter): Use parm to determine how
14089         to print default value.
14091 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
14093         * class.c (duplicate_tag_error): Clear more flags.
14095 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
14097         * call.c (build_new_method_call): Use binfo_for_vbase.
14099 2001-01-10  Joseph S. Myers  <jsm28@cam.ac.uk>
14101         * cp-tree.h (flag_cond_mismatch): Don't declare.
14102         * decl2.c (flag_cond_mismatch): Don't define.
14103         (lang_f_options): Remove cond-mismatch.
14104         (unsupported_options): Add cond-mismatch.
14106 2001-01-09  Nathan Sidwell  <nathan@codesourcery.com>
14108         * class.c (handle_using_decl): Reject using of constructor name
14109         of sourcing class. Allow injecting of a method with same name as
14110         nested class. Fixup error messages.
14112 2001-01-09  Joseph S. Myers  <jsm28@cam.ac.uk>
14114         * decl2.c (lang_decode_option): Handle -Wformat=2.
14116 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
14118         * cp-tree.h (lang_decl_flags): Rename defined_in_class to
14119         initialized_in_class.
14120         (DECL_DEFINED_IN_CLASS_P): Rename to ...
14121         (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
14122         * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
14123         (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
14124         * pt.c (check_default_tmpl_args): Adjust for
14125         DECL_INITIALIZED_IN_CLASS_P.
14126         (instantiate_class_template): Likewise.
14127         (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
14129         * class.c (finish_struct): Constify saved_filename.
14131 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
14133         * class.c (duplicate_tag_error): Adjust diagnostic.
14134         (finish_struct): Locally set location to start of struct.
14135         * decl.c (fixup_anonymous_aggr): Use cp_error_at.
14137 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
14139         * decl.c (struct binding_level): Adjust class_shadowed comments
14140         to reflect reality.
14141         (push_class_level_binding): Adjust comments to reflect reality.
14142         Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
14143         Don't set TREE_VALUE on the class_shadowed list.
14145 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14147         * decl2.c (acceptable_java_type): Allow references too.
14148         * init.c (build_java_class_ref): When using the new ABI, search
14149         `class$' and have it mangled with `mangle_decl.'
14150         * mangle.c (write_java_integer_type_codes): New function.
14151         (write_builtin_type): Detect and mangle Java integer and real
14152         types.
14154 2001-01-07  Mark Mitchell  <mark@codesourcery.com>
14156         * decl2.c (grokfield): Don't accept `asm' specifiers for
14157         non-static data members.
14159 2001-01-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14161         * expr.c (cplus_expand_expr): Don't reset `target'.
14163 2001-01-07  Neil Booth  <neil@daikokuya.demon.co.uk>
14165         * cp/decl2.c (cxx_post_options): Call cpp_post_options.
14167 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
14169         * parse.y (template_datadef): Check for error_mark_node.
14171 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
14173         * cp-tree.def (DEFAULT_ARG): Make `x' class.
14175 2001-01-04  Joseph S. Myers  <jsm28@cam.ac.uk>
14177         * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
14178         (record_builtin_type): Make non-static.
14179         (flag_short_double): Don't declare.
14180         (init_decl_processing): Remove the creation of many tree nodes now
14181         in c_common_nodes_and_builtins.
14182         (build_void_list_node): New function.
14183         * decl2.c (flag_short_double, flag_short_wchar): Don't define.
14184         * cp-tree.h (flag_short_wchar): Don't declare.
14186 2001-01-04  Mark Mitchell  <mark@codesourcery.com>
14188         * call.c (build_conv): Don't use build1 for USER_CONV.
14189         * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
14191 2001-01-03  Joseph S. Myers  <jsm28@cam.ac.uk>
14193         * lex.c (lang_init): Call c_common_lang_init.
14195 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
14197         * search.c (lookup_fnfields_here): Remove.
14198         (look_for_overrides_r): Use lookup_fnfields_1.
14199         Ignore functions from using declarations.
14201 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
14203         Implement exceptions specifiers for implicit member functions.
14204         * cp-tree.h (merge_exceptions_specifiers): Declare new function.
14205         * method.c (synthesize_exception_spec): New function.
14206         (locate_dtor, locate_ctor, locate_copy): New functions.
14207         (implicitly_declare_fn): Generate the exception spec too.
14208         * search.c (check_final_overrider): Check artificial functions
14209         too.
14210         * typeck2.c (merge_exception_specifiers): New function.
14212 2001-01-03  Jason Merrill  <jason@redhat.com>
14214         * init.c (build_default_init): New fn.
14215         (perform_member_init): Split out from here.
14216         (build_new_1): Use it.  Simplify initialization logic.
14217         (build_vec_init): Take an array, rather than a pointer and maxindex.
14218         Speed up simple initializations.  Don't clean up if we're assigning.
14219         * cp-tree.h: Adjust.
14220         * decl2.c (do_static_initialization): Remove TREE_VEC case.
14221         * parse.y (new_initializer): Return void_zero_node for ().
14222         * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
14223         * typeck2.c (digest_init): Only complain about user-written
14224         CONSTRUCTORs.
14226 2000-12-22  Mike Stump  <mrs@wrs.com>
14228         * decl2.c: (max_tinst_depth): Increase to 50.
14230 2001-01-02  Mark Mitchell  <mark@codesourcery.com>
14232         * class.c (invalidate_class_lookup_cache): Zero the
14233         previous_class_values.
14234         * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
14235         TREE_INT_CST_HIGH.
14236         (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
14237         * decl.c (free_bindings): New variable.
14238         (push_binding): Don't create a new binding if we have one on the
14239         free list.
14240         (pop_binding): Put old bindings on the free list.
14241         (init_decl_processing): Use size_int, not build_int_2.
14242         Register free_bindings as a GC root.
14243         (cp_make_fname_decl): Use size_int, not build_int_2.
14244         (push_inline_template_parms_recursive): Likewise.
14245         (end_template_parm_list): Likewise.
14246         (for_each_template_parm): Do not use walk_tree_without_duplicates.
14247         (tsubst_template_parms): Use size_int, not build_int_2.
14248         (tsubst): Likewise.
14249         * rtti.c (get_vmi_pseudo_type_info): Likewise.
14251 2001-01-02  Richard Henderson  <rth@redhat.com>
14253         * parse.y (asm): Set ASM_INPUT_P.
14255 2001-01-02  Jason Merrill  <jason@redhat.com>
14257         * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
14258         for v3 ABI.
14260         * typeck.c (cp_truthvalue_conversion): New fn.
14261         * cvt.c (ocp_convert): Use it.
14263         * cp-tree.h: Lose c-common.c decls.
14265         * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
14266         * cvt.c (convert_to_void): Use type_unknown_p.
14268         * typeck.c (strip_all_pointer_quals): Also strip quals from
14269         pointer-to-member types.
14271         * Make-lang.in (cp/TAGS): Use --no-globals.  Ignore parse.c, and treat
14272         parse.y as C.
14274         * call.c (build_new_method_call): Do evaluate the object parameter
14275         when accessing a static member.
14276         * typeck.c (build_component_ref): Likewise.
14278 2001-01-02  Andreas Jaeger  <aj@suse.de>
14280         * decl.c (cp_missing_noreturn_ok_p): New.
14281         (init_decl_processing): Set lang_missing_noreturn_ok_p.
14283 2000-12-29  Jakub Jelinek  <jakub@redhat.com>
14285         * decl.c (init_decl_processing): Fix sign of wchar_type_node.
14287 2000-12-29  Mark Mitchell  <mark@codesourcery.com>
14289         * class.c (pushclass): Remove #if 0'd code.
14290         * cp-tree.h (overload_template_name): Remove.
14291         * decl.c (store_bindings): Simplify.
14292         (pop_from_top_level): Likewise.
14293         * pt.c (overload_template_name): Remove.
14294         (instantiate_decl): Don't call push_to_top_level if it's not
14295         needed.
14297 2000-12-28  Mark Mitchell  <mark@codesourcery.com>
14299         * pt.c (register_local_specialization): Don't return a value.
14300         (lookup_template_class): Use move-to-front heuristic when looking
14301         up template instantiations.
14302         (instantiate_decl): Only push_to_top_level when we're actually
14303         going to instantiate the template.
14305 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
14307         * search.c (binfo_for_vtable): Return least derived class, not
14308         most.  Handle secondary vtables.
14310 2000-12-22  Jason Merrill  <jason@redhat.com>
14312         * pt.c (more_specialized): Don't optimize len==0.
14313         (fn_type_unification): If we're adding the return type, increase len.
14315         * typeck.c (build_binary_op): Fix pmf comparison logic.
14317         * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
14318         DECL_STATIC_FUNCTION_P.
14320         * semantics.c (genrtl_finish_function): Don't try to jump to
14321         return_label unless it exists.
14323         In partial ordering for a call, ignore parms for which we don't have
14324         a real argument.
14325         * call.c (joust): Pass len to more_specialized.
14326         (add_template_candidate_real): Strip 'this', pass len.
14327         * pt.c (more_specialized): Pass len down.  Lose explicit_args parm.
14328         (get_bindings_order): New fn.  Pass len down.
14329         (get_bindings_real): Strip 'this', pass len.
14330         (fn_type_unification): Likewise.
14331         (type_unification_real): Succeed after checking 'len' args.
14332         (most_specialized_instantiation): Lose explicit_args parm.
14333         * class.c (resolve_address_of_overloaded_function): Strip 'this',
14334         pass len.
14336 2000-12-21  Jason Merrill  <jason@redhat.com>
14338         * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
14339         DECL_TEMPLATE_RESULT.
14341         * search.c (lookup_field_r): Call lookup_fnfields_1, not
14342         lookup_fnfields_here.
14344         * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
14346         * call.c (build_object_call): Also allow conversions that return
14347         reference to pointer to function.
14348         (add_conv_candidate): Handle totype being ref to ptr to fn.
14349         (build_field_call): Also allow members of type reference to function.
14350         Lose support for calling pointer to METHOD_TYPE fields.
14352         * error.c (dump_expr): Handle *_CAST_EXPR.
14354         * typeck2.c (build_scoped_ref): Always convert to the naming class.
14356         * tree.c (break_out_cleanups): Lose.
14357         * cp-tree.h: Remove prototype.
14358         * typeck.c (build_component_ref): Don't break_out_cleanups.
14359         (build_compound_expr): Likewise.
14360         * semantics.c (finish_expr_stmt): Likewise.
14362 2000-12-20  Richard Henderson  <rth@redhat.com>
14364         * cp-tree.h: Update declarations.
14365         * decl.c (finish_case_label): Return the new stmt node.
14366         * semantics.c (finish_goto_stmt): Likewise.
14367         (finish_expr_stmt, finish_return_stmt): Likewise.
14368         (finish_break_stmt, finish_continue_stmt): Likewise.
14369         (finish_asm_stmt): Likewise.
14370         * parse.y (already_scoped_stmt): Set STMT_LINENO.
14371         (compstmt, implicitly_scoped_stmt, stmt): Likewise.
14372         (simple_if, simple_stmt): Return the new stmt node.
14373         (save_lineno): New.
14375 2000-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
14377         * cp-tree.h: Don't declare warn_long_long.
14379 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14381         * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
14382         IS_AGGR_TYPE.
14384 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14386         * pt.c (unify): Handle when both ARG and PARM are
14387         BOUND_TEMPLATE_TEMPLATE_PARM.
14389 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14391         * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
14392         DECL_TEMPLATE_PARM_P.
14394 2000-12-15  Jason Merrill  <jason@redhat.com>
14396         * init.c (build_new_1): Reorganize.  Now with 100% fewer SAVE_EXPRs!
14398         * init.c (build_new_1): Don't strip quals from type.
14400         * decl.c (pushdecl): Don't check for linkage on a non-decl.
14402         * call.c (build_op_delete_call): See through ARRAY_TYPEs.
14404         * call.c (build_new_function_call): Lose space before paren in
14405         error message.
14406         (build_new_method_call): Likewise.
14408         * typeck2.c (build_m_component_ref): Propagate quals from datum.
14410 2000-12-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14412         * pt.c (check_explicit_specialization): Propagate default
14413         function arguments to explicit specializations.
14415 2000-12-13  DJ Delorie  <dj@redhat.com>
14417         * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
14418         and <? operators.
14420 2000-12-08  Jason Merrill  <jason@redhat.com>
14422         * error.c (dump_function_name): Don't let the user see __comp_ctor.
14424         Clean up copy-initialization in overloading code.
14425         * call.c (build_user_type_conversion_1): Die if we are asked to
14426         convert to the same or a base type.
14427         (implicit_conversion): Avoid doing so.  Lose reference binding code.
14428         (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
14429         direct-initialization.  Also do direct-init part of copy-init.
14430         (build_user_type_conversion): Don't provide context to convert_like.
14431         * cvt.c (ocp_convert): build_user_type_conversion will now provide
14432         the constructor call for copy-init.
14434         * pt.c (tsubst_decl): Call clone_function_decl here if this is an
14435         instantiation of a member template.
14436         (do_decl_instantiation): Not here.
14438 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
14440         * class.c (check_field_decls): Don't special case anonymous
14441         fields in error messages.
14442         (note_name_declared_in_class): Use %D on diagnostic.
14444         * tree.c (pod_type_p): Use strip_array_types.
14445         (cp_valid_lang_attribute): Likewise.
14446         * typeck.c (cp_type_quals): Strip arrays separately, to avoid
14447         multiple evaluations.
14448         (cp_has_mutable_p): Use strip_array_types.
14450 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
14452         * cp-tree.h (sufficient_parms_p): Declare new function.
14453         * call.c (sufficient_parms_p): New function, broken out of ...
14454         (add_function_candidate): ... here. Use it.
14455         (add_conv_candidate): Use it.
14456         * decl.c (grok_ctor_properties): Use it.
14458 2000-12-07  Jakub Jelinek  <jakub@redhat.com>
14460         * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
14462 2000-12-07  Joseph S. Myers  <jsm28@cam.ac.uk>
14464         * decl2.c (lang_decode_option): Handle -Wformat-security.
14466 2000-12-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14468         * pt.c (verify_class_unification): New function.
14469         (get_class_bindings): Use it.
14470         (try_class_unification): Tidy.
14471         (unify): Handle when argument of a template-id is not
14472         template parameter dependent.
14473         (template_args_equal): Handle when TREE_CODE's do not match.
14475 2000-12-06  Alexandre Oliva  <aoliva@redhat.com>
14477         * lang-specs.h (c++): When invoking the stand-alone preprocessor
14478         for -save-temps, pass all relevant -Defines to it, and then don't
14479         pass them to cc1plus.
14481 2000-12-05  Will Cohen  <wcohen@redhat.com>
14483         * decl.c (finish_case_label): Cleared
14484         more_cleanups_ok in surrounding function scopes.
14485         (define_label): Likewise.
14487 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
14489         * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
14490         (get_matching_virtual): Remove.
14491         (look_for_overrides): Declare new function.
14492         * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
14493         DECL_VINDEX here.
14494         * class.c (check_for_override): Move base class iteration code
14495         to look_for_overrides.
14496         * search.c (next_baselink): Remove.
14497         (get_virtuals_named_this): Remove.
14498         (get_virtual_destructor): Remove.
14499         (tree_has_any_destructors_p): Remove.
14500         (struct gvnt_info): Remove.
14501         (check_final_overrider): Remove `virtual' from error messages.
14502         (get_matching_virtuals): Remove. Move functionality to ...
14503         (look_for_overrides): ... here, and ...
14504         (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
14505         to be overriding.
14507 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
14509         * typeck.c (get_delta_difference): If via a virtual base,
14510         return zero.
14511         * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
14512         adjustment.
14514 2000-12-04  Richard Henderson  <rth@redhat.com>
14516         * error.c (dump_tree): Use output_add_string not OB_PUTS.
14518 2000-12-04  Jason Merrill  <jason@redhat.com>
14520         * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
14521         (write_builtin_type): Pass intSI_type_node and the like through
14522         type_for_mode.
14523         * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
14524         Pass intSI_type_node and the like through type_for_mode.
14525         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
14526         * pt.c (tsubst, unify): Likewise.
14527         * tree.c (walk_tree): Likewise.
14528         * error.c (dump_type): Likewise.
14529         (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
14531         * Make-lang.in: Tweak top comment for emacs.
14532         (cp/TAGS): Restore.
14534         * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
14536         * class.c (clone_function_decl): Robustify.
14538 2000-12-04  Michael Matz  <matzmich@cs.tu-berlin.de>
14540         * decl.c (store_bindings): Only search in the non modified
14541         old_bindings for duplicates.
14543 2000-12-04  Nathan Sidwell  <nathan@codesourcery.com>
14545         * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
14546         TYPE_POLYMORPHIC_P.
14548         * typeck.c (build_static_cast): Remove unused variable.
14550 2000-12-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14552         * pt.c: Fix typo in comment.
14554 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
14556         * decl2.c (warn_format): Remove definition.
14557         (lang_decode_option): Handle -Wformat-nonliteral,
14558         -Wno-format-extra-args and -Wno-format-y2k.  Use set_Wformat.
14560 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
14562         * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
14563         (init_decl_processing): Don't create string_type_node,
14564         const_string_type_node, wint_type_node, intmax_type_node,
14565         uintmax_type_node, default_function_type, ptrdiff_type_node and
14566         unsigned_ptrdiff_type_node.  Adjust position of call to
14567         c_common_nodes_and_builtins.
14568         (identifier_global_value): New function.
14570 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>
14572         * call.c (standard_conversion): Reject pointer to member
14573         conversions from ambiguous, inaccessible or virtual bases.
14574         * typeck.c (build_static_cast): Don't check pointers to members
14575         specially.
14577 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
14579         * method.c (do_build_copy_constructor): Preserve cv
14580         qualifications when accessing source object members.
14581         (do_build_assign_ref): Likewise. Remove separate diagnostics for
14582         unnamed fields.
14584 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
14586         * method.c (do_build_assign_ref): Construct appropriately
14587         CV-qualified base reference. Don't allow const casts in base
14588         conversion.
14590 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
14592         * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
14593         incomplete return type.
14595 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
14597         * parse.y (base_class.1): Produce a _TYPE not a _DECL.
14598         * semantics.c (finish_base_specifier): Accept a _TYPE not a
14599         _DECL.
14601 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
14603         * spew.c (yyerror): Cope if yylval.ttype is NULL.
14605 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
14607         * decl.c (grokdeclarator): Diagnose undefined template contexts.
14609 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
14611         * decl.c (grokdeclarator): Do type access control on friend
14612         class.
14614 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
14616         * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
14617         bison parser ickiness.
14618         * pt.c (tsubst_friend_function): Enter namespace scope when
14619         tsubsting the function name.
14620         * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
14622 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
14624         * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
14625         * cvt.c (cp_convert_to_pointer): Add force parameter.
14626         Allow conversions via virtual base if forced.
14627         (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
14628         (ocp_convert): Likewise.
14629         * search.c (binfo_from_vbase): Return the virtual base's binfo.
14630         * typeck.c (get_delta_difference): Adjust handling of virtual
14631         bases.
14633 2000-11-26  Mark Mitchell  <mark@codesourcery.com>
14635         * tree.c (struct list_hash): Remove.
14636         (list_hash_table): Make it be an htab.
14637         (struct list_proxy): New type.
14638         (list_hash_eq): New function.
14639         (list_hash_pieces): Renamed from ...
14640         (list_hash): ... this.
14641         (list_hash_lookup): Remove.
14642         (list_hash_add): Remove.
14643         (hash_tree_cons): Use the generic hashtable.
14644         (mark_list_hash): Remove.
14645         (init_tree): Create the hashtable.
14647 2000-11-25  Joseph S. Myers  <jsm28@cam.ac.uk>
14649         * method.c (build_mangled_C9x_name): Rename to
14650         build_mangled_C99_name.  Change C9X references in comments to
14651         refer to C99.
14653 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
14655         * parse.y (unary_expr): Move VA_ARG from here ...
14656         (primary): ... to here.
14658 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
14660         * semantics.c (finish_id_expr): If type is error_mark, return
14661         error_mark.
14663 2000-11-23  Nathan Sidwell  <nathan@codesourcery.com>
14665         * pt.c (lookup_template_class): Simplify loop exit constructs.
14666         Cope when there is no partial instantiation of a template
14667         template member.
14669 2000-11-23  J"orn Rennecke <amylaar@redhat.com>
14671         * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
14673 2000-11-22  Mark Mitchell  <mark@codesourcery.com>
14675         * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
14676         prefix.
14678         * pt.c (do_decl_instantiate): Explicitly clone constructors and
14679         destructors that haven't already been cloned.
14681 2000-11-20  Richard Henderson  <rth@redhat.com>
14683         * parse.y (yyparse_1): Rename the parser entry point.
14685 2000-11-20  Alex Samuel  <samuel@codesourcery.com>
14687         * mangle.c (write_name): Use <unscoped-name> for names directly in
14688         function scope.
14689         (write_unscoped_name): Accept names directly in function scope.
14691 2000-11-20  Nathan Sidwell  <nathan@codesourcery.com>
14693         * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
14694         * parse.y (extdef): Add EXPORT reduction.
14695         * spew.c (yylex): Don't skip export here.
14697 2000-11-19  Mark Mitchell  <mark@codesourcery.com>
14699         * decl.c (init_decl_processing): Correct name of pure virtual
14700         function under the new ABI.
14701         * rtti.c (throw_bad_cast): Likewise, for bad cast function.
14702         (throw_bad_typeid): Likewise for bad typeid function.
14704 2000-11-18  Mark Mitchell  <mark@codesourcery.com>
14706         * decl.c (grokparms): Don't even function types of `void' type,
14707         either.
14708         * mangle.c (write_type): Don't crash when confronted with the
14709         error_mark_node.
14711         * decl.c (grokparms): Don't create parameters of `void' type.
14713 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
14715         * lex.c (mark_impl_file_chain): Delete.
14716         (init_parse): Remove call to ggc_add_string_root.  No need to
14717         ggc_strdup a string constant.  Do not add impl_file_chain to GC
14718         roots.
14719         (handle_pragma_implementation): No need to ggc_strdup main_filename.
14721 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
14723         * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
14725 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
14727         * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
14728         * decl.c (grokdeclarator): Don't reject void parms here.
14729         (require_complete_types_for_parms): Simplify, use
14730         complete_type_or_else.
14731         (grokparms): Remove bitrot. Remove funcdef parm.
14732         Deal with ellipsis parm lists here.
14733         * semantics.c (finish_parmlist): Don't append void_list_node
14734         here. Set PARMLIST_ELLIPSIS_P.
14736 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
14738         * typeck2.c (incomplete_type_error): Reorganize to avoid
14739         excessive diagnostics.
14741 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
14743         * lex.c (struct impl_files, internal_filename): Constify a char *.
14745 2000-11-16  Mark Mitchell  <mark@codesourcery.com>
14747         * mangle.c (write_special_name_constructor): Don't generate
14748         assembler junk when confronted with an old-style constructor.
14749         (write_special_name_destructor): Likewise.
14750         (mangle_decl_string): Do it here instead.
14752 2000-11-16  Nathan Sidwell  <nathan@codesourcery.com>
14754         * call.c (op_error): Make error messages clearer.
14756 2000-11-15  Mark Mitchell  <mark@codesourcery.com>
14758         * decl.c (wrapup_globals_for_namespace): Don't mark things
14759         TREE_ASM_WRITTEN when they're not.
14761 2000-11-15  Jason Merrill  <jason@redhat.com>
14763         * typeck2.c (friendly_abort): Uncount the error before handing
14764         off to fancy_abort.
14766 2000-11-15  Nathan Sidwell  <nathan@codesourcery.com>
14768         * typeck.c (lookup_anon_field): Cope with qv qualifiers.
14770 2000-11-14  Mark Mitchell  <mark@codesourcery.com>
14772         * class.c (build_vtbl_initializer): Fix typo in comment.
14773         * typeck.c (expr_sizeof): Don't crash on errors.
14775 2000-11-14  Jim Wilson  <wilson@redhat.com>
14777         * lang-specs.h: Add %2 after %(cc1_options).
14779 2000-11-14  Richard Henderson  <rth@redhat.com>
14781         * typeck.c (c_sizeof): Be strict about casting result value
14782         back to c_size_type_node.
14783         (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
14785 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
14787         * typeck.c (build_unary_op): Use boolean_increment from
14788         c-common.c, moving the relevant code there.
14790 2000-11-11  Jason Merrill  <jason@redhat.com>
14792         * typeck.c (mark_addressable): Don't call put_var_into_stack.
14794         * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
14795         in inlines.
14797 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14799         * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
14800         * lex.c (copy_lang_decl): Likewise.
14802 2000-11-09  Mark Mitchell  <mark@codesourcery.com>
14804         * dump.c (cp_dump_tree): Don't dump function bodies here.
14806         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
14807         (dump.o): Update dependency list.
14808         * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
14809         (flag_dump_translation_unit): Likewise.
14810         (CP_TYPE_QUALS): Adjust definition.
14811         (DECL_C_BIT_FIELD): Remove.
14812         (SET_DECL_C_BIT_FIELD): Likewise.
14813         (CLEAR_DECL_C_BIT_FIELD): Likewise.
14814         (add_maybe_template): Likewise.
14815         (strip_array_types): Likewise.
14816         (dump_node_to_file): Likewise.
14817         (cp_dump_tree): New function.
14818         * decl.c (init_decl_processing): Set lang_dump_tree.
14819         * decl2.c (flag_dump_translation_unit): Remove.
14820         * dump.c: Move most of it to ../c-dump.c.
14821         (cp_dump_tree): New function.
14822         * pt.c (add_maybe_template): Remove.
14823         * typeck.c (strip_array_types): Likewise.
14825 2000-11-07  Eric Christopher  <echristo@redhat.com>
14827         * decl.c (init_decl_processing): Change definition of
14828         __wchar_t to wchar_t.  Remove artificial declaration of
14829         wchar_t.
14830         * lex.c: Change instances of __wchar_t to wchar_t.
14832 2000-11-09  Nathan Sidwell  <nathan@codesourcery.com>
14834         * lex.c (do_identifier): Don't lookup_name for operators.
14835         * parse.y (operator): Save looking_for_typename.
14836         (unoperator): Restore it.
14837         * spew.c (frob_opname): Use nth_token for lookahead.
14839 2000-11-08  Nathan Sidwell  <nathan@codesourcery.com>
14841         * decl.c (grok_op_properties): Always use coerce_new_type and
14842         coerce_delete_type.
14843         * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
14844         exception specification. Tidy up.
14845         (coerce_delete_type): Preserve exception specification. Tidy up.
14847 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
14849         * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
14850         (push_binding_level), error.c (cp_tree_printer), pt.c
14851         (process_partial_specialization, tsubst_template_arg_vector),
14852         search.c (lookup_member): Use memset () instead of bzero ().
14854 2000-11-07  Nathan Sidwell  <nathan@codesourcery.com>
14856         * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
14858 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
14860         * Make-lang.in (c++.distdir): Remove.
14862 2000-11-04  Mark Mitchell  <mark@codesourcery.com>
14864         * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
14865         declarations from different namespaces to be combined.
14867 2000-11-03  Zack Weinberg  <zack@wolery.stanford.edu>
14869         * decl.c: Include tm_p.h.
14871 2000-11-03  Joseph S. Myers  <jsm28@cam.ac.uk>
14873         * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
14875 2000-11-02  Joseph S. Myers  <jsm28@cam.ac.uk>
14877         * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
14878         (build_overload_value), repo.c (open_repo_file), xref.c
14879         (open_xref_file): Use strchr () and strrchr () instead of index ()
14880         and rindex ().
14882 2000-11-01  Bernd Schmidt  <bernds@redhat.co.uk>
14884         * call.c (build_over_call): Call fold on the CALL_EXPR.
14886 2000-11-01  Gabriel Dos Reis  <gdr@codesourcery.com>
14888         * error.c (dump_template_decl): Separate template hearders with
14889         space not comma.
14891 2000-10-31  Gabriel Dos Reis  <gdr@codesourcery.com>
14893         * error.c: Move TFF_ macros into cp-tree.h.  Throughout, replace
14894         TS_* flags with corresponding TFF_*.  Adjust prototypes of
14895         functions (which used to take a tree_string_flags) to take an int.
14897         * cp-tree.h (enum tree_string_flags): Remove
14898         (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
14899         TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
14900         TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
14901         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
14902         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
14903         TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
14904         (type_as_string, decl_as_string, expr_as_string,
14905         context_as_string): Adjust prototype.
14907         * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
14908         instead of TS_PLAIN.
14910         * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
14911         instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
14912         plain `0'.
14914 2000-10-30  Mark Mitchell  <mark@codesourcery.com>
14916         * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
14917         (linkage_kind): New enumeration.
14918         (decl_linkage): New function.
14919         * decl2.c (comdat_linkage): Extend comment.
14920         * error.c (dump_function_decl): Print the arguments used to
14921         instantiate a template, even when not printing the type of the
14922         function.
14923         * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
14924         not TREE_PUBLIC, to test for external linkage.
14925         * tree.c (decl_linkage): New function.
14927 2000-10-28  Mark Mitchell  <mark@codesourcery.com>
14929         * pt.c (instantiate_decl): Always instantiate static data members
14930         initialized in-class.
14932 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
14934         * Make-lang.in: Move all build rules here from Makefile.in,
14935         adapt to new context.  Wrap all rules that change the current
14936         directory in parentheses.  Expunge all references to $(P).
14937         When one command depends on another and they're run all at
14938         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
14939         all object-file generation rules.  Delete obsolete variables.
14941         * Makefile.in: Delete.
14942         * config-lang.in: Delete outputs= line.
14944 2000-10-26  Gabriel Dos Reis  <gdr@codesourcery.com>
14946         * error.c (dump_function_decl): Print no space between
14947         `ptr-operator' the `type-specifier' of the return type.
14948         (dump_type_prefix): Make sure we put space at the appropriate
14949         place.
14951 2000-10-23  Jason Merrill  <jason@redhat.com>
14953         * call.c (equal_functions): Also call decls_match for extern "C" fns.
14955 2000-10-22  Jason Merrill  <jason@redhat.com>
14957         * call.c (build_conditional_expr): Use ocp_convert to force
14958         rvalue conversion.
14960 2000-10-22  Mark Mitchell  <mark@codesourcery.com>
14962         * call.c (standard_conversion): Use RVALUE_CONVs for all
14963         expressions that satisfy lvalue_p, not just those that satisfy
14964         real_lvalue_p.
14966         * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
14968         * typeck.c (c_sizeof): Return an expression of `size_t' type,
14969         not one with TYPE_IS_SIZETYPE set.
14970         (dubious_conversion_warnings): Remove special-case code.
14972 2000-10-21  Geoffrey Keating  <geoffk@cygnus.com>
14974         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
14975         * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
14976         (dump_type_prefix): Print vector-of-int as 'int vector'.
14977         (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
14978         * tree.c (walk_tree): Handle VECTOR_TYPE.
14980         * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
14982 2000-10-21  Jason Merrill  <jason@redhat.com>
14984         * parse.y (operator): Set got_object from got_scope.
14985         Set looking_for_typename.
14986         * decl.c (lookup_name_real): Clear val after setting from_obj.
14987         Reorganize diagnostic.
14989 2000-10-20  Jason Merrill  <jason@redhat.com>
14991         * tree.c (walk_tree): Don't walk into default args.
14993         * error.c (dump_expr): Use host_integerp.
14995 2000-10-20  David Edelsohn  <edelsohn@gnu.org>
14997         * typeck2.c (abstract_virtuals_error): Use "because" instead of
14998         "since" in error message.
15000 2000-10-20  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15002         * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
15004 2000-10-20  Jeffrey Oldham  <oldham@codesourcery.com>
15006         * decl.c (revert_static_member_fn): Fixed typo.
15008 2000-10-19  Mark Mitchell  <mark@codesourcery.com>
15010         * class.c (subobject_offset_fn): New type.
15011         (dfs_record_base_offsets): Remove.
15012         (record_base_offsets): Likewise.
15013         (dfs_search_base_offsets): Likewise.
15014         (record_subobject_offset): New function.
15015         (check_subobject_offset): Likewise.
15016         (walk_subobject_offsets): Likewise.
15017         (record_subobject_offsets): Likewise.
15018         (layout_conflict_p): Reimplement.
15019         (layout_nonempty_base_or_field): Correct handling of type
15020         conflicts during layout.
15021         (layout_empty_base): Likewise.
15022         (build_base_field): Adjust to handle new representation of empty
15023         base offset table.
15024         (build_base_fields): Likewise.
15025         (layout_virtual_bases): Likewise.
15026         (splay_tree_compare_integer_csts): New function.
15027         (layout_class_type): Use a splay_tree, rather than a varray, to
15028         represent the offsets of empty bases.
15030         * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
15031         * decl.c (select_decl): Don't return declarations that are
15032         DECL_ANTICIPATED.
15034 2000-10-18  Mark Mitchell  <mark@codesourcery.com>
15036         * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
15037         (fake_std_node): New macro.
15038         * decl.c (in_std): Rename to ...
15039         (in_fake_std): ... this.
15040         (flag_no_builtin): Remove.
15041         (flag_no_nonansi_builtin): Likewise.
15042         (walk_namespaces_r): Use fake_std_node.
15043         (push_namespace): Use std_identifier.
15044         (pop_namespace): Use in_fake_std.
15045         (lookup_name_real): Use fake_std_node.
15046         (init_decl_processing): When -fhonor-std, create the `std'
15047         namespace.  Don't create a dummy fake_std_node in that case.
15048         Adjust call to c_common_nodes_and_builtins.  Use std_identifier.
15049         (builtin_function): Put builtins whose names don't begin
15050         with `_' in the std namespace.
15051         * decl2.c (flag_no_builtin): Remove.
15052         (flag_no_nonansi_builtin): Likewise.
15053         (set_decl_namespace): Use fake_std_node.
15054         (validate_nonmember_using_decl): Likewise.
15055         (do_using_directive): Likewise.
15056         (handle_class_head): Likewise.
15057         * dump.c (dequeue_and_dump): Likewise.
15058         * except.c (init_exception_processing): Use std_identifier.
15059         * init.c (build_member_call): Use fake_std_node.
15060         * rtti.c (init_rtti_processing): Use std_identifier.
15062 2000-10-17  Mark Mitchell  <mark@codesourcery.com>
15064         * cp-tree.h (back_end_hook): Remove declaration.
15065         * decl2.c (back_end_hook): Remove definition.
15067         * dump.c (dequeue_and_dump): Dump TREE_USED.
15069 2000-10-17  Brad Lucier <lucier@math.purdue.edu>
15071         * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
15073 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
15075         * decl.c (WINT_TYPE): Define.
15076         (init_decl_processing): Create types unsigned_ptrdiff_type_node,
15077         c_size_type_node, signed_size_type_node and wint_type_node.
15079 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
15081         * decl2.c (warn_missing_format_attribute): New variable.
15082         (lang_decode_option): Decode -Wmissing-format-attribute.
15084 2000-10-16  Mark Mitchell  <mark@codesourcery.com>
15086         * typeck.c (qualify_type): Remove.
15087         (composite_pointer_type): Fix handling of conversions to `cv void*'.
15089 2000-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15091         * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
15093 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15095         * Makefile.in (parse.c, parse.h): Create atomically.
15097 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
15099         * class.c (current_obstack): Remove.
15100         * decl.c (ggc_p): Remove.
15101         (start_decl): Don't use decl_tree_cons.
15102         (grokdeclarator): Don't use build_decl_list.
15103         (start_function): Don't use decl_tree_cons.
15104         (finish_function): Don't mess with obstacks.
15105         * decl2.c (grok_x_components): Don't use build_decl_list.
15106         * lex.c (make_call_declarator): Don't call decl_tree_cons.
15107         (implicitly_declare_fn): Don't call build_decl_list.
15108         * parse.y (frob_specs): Don't call build_decl_list or
15109         decl_tree_cons.
15110         (expr_or_declarator_intern): Don't call decl_tree_cons.
15111         (primary): Don't call build_decl_list.
15112         (fcast_or_absdcl): Likewise.
15113         (typed_declspecs): Don't call decl_tree_cons.
15114         (reserved_declspecs): Don't call build_decl_list.
15115         (declmods): Likewise.
15116         (reserved_typespecquals): Likewise.
15117         (aggr): Likewise.
15118         (new_type_id): Likewise.
15119         (cv_qualifiers): Likewise.
15120         (after_type_declarator_intern): Likewise.
15121         (notype_declarator_intern): Likewise.
15122         (absdcl_intern): Likewise.
15123         (named_parm): Likewise.
15124         * pt.c (most_specialized_class): Likewise.
15125         * repo.c (temporary_obstack): Make it a structure, not a pointer.
15126         (init_repo): Initialize it.
15127         * search.c (current_obstack): Remove.
15128         * typeck2.c (add_exception_specifier): Don't call build_decl_list.
15130 2000-10-09  Richard Henderson  <rth@cygnus.com>
15132         * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
15133         (c++ language support bits for libgcc): Remove.
15134         (c++.clean): Remove cplib2.txt cleanup.
15135         * config-lang.in (headers, lib2funcs): Remove.
15137         * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
15138         * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
15139         * inc/cxxabi.h, inc/exception, inc/new: Remove files.
15140         * inc/new.h, inc/typeinfo: Remove files.
15142 2000-10-08  Joseph S. Myers  <jsm28@cam.ac.uk>
15144         * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
15145         defined.
15146         (init_decl_processing): Initialize intmax_type_node and
15147         uintmax_type_node.
15149 2000-10-06  Richard Henderson  <rth@cygnus.com>
15151         * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
15152         (original_result_rtx): Remove.
15153         * decl.c (save_function_data): Don't clear x_result_rtx.
15154         (mark_lang_function): Don't mark it either.
15155         * expr.c (fixup_result_decl): Remove.
15156         * semantics.c (genrtl_named_return_value): Frob the return decl
15157         before calling emit_local_var.
15158         (genrtl_finish_function): Don't call fixup_result_decl.
15159         Always emit the jump to return_label.
15161 2000-10-06  Nathan Sidwell  <nathan@codesourcery.com>
15163         * pt.c (lookup_template_class): Set current access for enum.
15164         (tsubst_enum): Set file & line for enum decl.
15166         * spew.c (yylex): Remove unused variable.
15168 2000-10-05  Richard Henderson  <rth@cygnus.com>
15170         * semantics.c (genrtl_finish_function): Don't init or check
15171         can_reach_end; remove noreturn and return value checks.
15173 2000-10-05  Tom Tromey  <tromey@cygnus.com>
15175         * init.c (build_java_class_ref): Use `build_static_name' with a
15176         suffix, not a prefix, to build the class object's name.
15178 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
15180         * cp-tree.h (access_kind): Fix comment typo.
15181         * decl2.c (grokfield): Fix diagnostic typo.
15182         * semantics.c (finish_template_type): Fix comment typo.
15183         (finish_qualified_object_call_expr): Likewise.
15185 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
15187         * pt.c (tsubst_expr, DECL_STMT case): Don't process if
15188         tsubsting fails.
15190 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
15192         * spew.c (frob_id): New static function.
15193         (frob_opname): Use it.
15194         (yylex): Use it.
15196 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
15198         * decl.c (lang_mark_false_label_stack): Remove.
15199         * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
15201 2000-09-30  Joseph S. Myers  <jsm28@cam.ac.uk>
15203         * gxxint.texi: Use @email for formatting email addresses.
15205 2000-09-29  Gabriel Dos Reis  <gdr@codesourcery.com>
15207         * error.c: Remove direct obstack manipulation.  Replace with
15208         output_buffer-based formatting.  Adjust calls to removed macros.
15209         (obstack_chunk_alloc, obstack_chunk_free): Remove.
15210         (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
15211         OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
15213 2000-09-24  Mark Mitchell  <mark@codesourcery.com>
15215         * ir.texi: Move to ../c-tree.texi.
15217 2000-09-20  Jason Merrill  <jason@redhat.com>
15219         * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
15221 2000-09-21  Andreas Jaeger  <aj@suse.de>
15223         * errfn.c: Move declaration of cp_printer and cp_printers to ...
15224         * cp-tree.h: ... here.
15226         * error.c: Remove declaration of cp_printer.
15228 2000-09-20  Mark Mitchell  <mark@codesourcery.com>
15230         * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
15232 2000-09-20  Hans-Peter Nilsson  <hp@axis.com>
15234         * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
15235         users.
15237 2000-09-18  Mark Mitchell  <mark@codesourcery.com>
15239         * decl.c (start_function): Robustify.
15241 2000-09-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15243         * cp-tree.h (check_function_format): Accept a `status' parameter.
15245         * call.c, typeck.c: Updates calls to `check_function_format'.
15247 2000-09-17  Geoffrey Keating  <geoffk@cygnus.com>
15249         * decl2.c (handle_class_head): Always push some scope even
15250         in the error case.
15252 2000-09-16  Mark Mitchell  <mark@codesourcery.com>
15254         * cp-tree.h (struct cp_language_function): Remove
15255         x_scope_stmt_stack and name_declared.
15256         (current_scope_stmt_stack): Remove.
15257         (function_name_declared_p): New macro.
15258         (struct lang_decl_flags): Use c_lang_decl as a base class.
15259         (context): Remove.
15260         (struct lang_decl): Replace saved_tree with context.
15261         (DECL_FRIEND_CONTEXT): Adjust accordingly.
15262         (SET_DECL_FRIEND_CONTEXT): Likewise.
15263         (DECL_VIRTUAL_CONTEXT): Likewise.
15264         (DECL_SAVED_TREE): Remove.
15265         (C_DECLARED_LABEL_FLAG): Likewise.
15266         (cplus_expand_expr_stmt): Don't declare.
15267         (add_decl_stmt): Likewise.
15268         (add_scope_stmt): Likewise.
15269         * decl.c (mark_stmt_tree): Remove.
15270         (case_compare): Likewise.
15271         (finish_case_label): Use c_add_case_label.
15272         (init_decl_processing): Set more language-specific hooks.
15273         (build_enumerator): Fix typo in comment.
15274         (cplus_expand_expr_stmt): Remove.
15275         (mark_lang_function): Use mark_c_language_function.
15276         (lang_mark_tree): Use c_mark_lang_decl.
15277         * decl2.c: Change order of inclusion.
15278         * except.c: Likewise.
15279         * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR.  Fall
15280         back on c_expand_expr.
15281         * friend.c: Include expr.h.
15282         * init.c: Change order of inclusion.
15283         * Makefile.in: Update dependencies.
15284         * lex.h (free_lang_decl_chain): Remove.
15285         * optimize.c (maybe_clone_body): Use function_name_declared_p.
15286         * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
15287         it doesn't exist.
15288         (instantiate_decl): Use function_name_declared_p.
15289         * semantics.c (lang_expand_expr_stmt): Remove.
15290         (set_current_function_name_declared): Likewise.
15291         (current_function_name_declared): Likewise.
15292         (begin_compound_stmt): Use function_name_declared_p.
15293         (add_decl_stmt): Remove.
15294         (setup_vtbl_ptr): Use function_name_declared_p.
15295         (add_scope_stmt): Remove.
15296         (current_scope_stmt_stack): New function.
15297         (cp_expand_stmt): Don't handle SCOPE_STMTs.
15298         (expand_body): Use function_name_declared_p.
15299         * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
15300         * typeck.c: Change order of includes.
15301         (convert_sequence): Remove.
15303 2000-09-14  Joseph S. Myers  <jsm28@cam.ac.uk>
15305         * lex.c (reswords): Add _Complex.
15307 2000-09-14  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15309         * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
15311 2000-09-13  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
15313         * init.c (begin_init_stmts): Don't use // comments.
15315 2000-09-12  Jason Merrill  <jason@redhat.com>
15317         * decl.c (maybe_deduce_size_from_array_init): Set do_default for
15318         all non-extern arrays.
15320         * decl.c (grokdeclarator): Complain about 'friend T' for implicit
15321         typenames, too.  Downgrade complaint to pedwarn.
15322         (xref_tag): Warn about surprising behavior of 'friend struct T'.
15323         * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
15324         'class This::Inherited'.
15326 2000-09-12  Mark Mitchell  <mark@codesourcery.com>
15328         * decl.c (finish_case_label): Given the LABEL_DECL a
15329         DECL_CONTEXT.
15331 2000-09-12  Gabriel Dos Reis  <gdr@codesourcery.com>
15333         * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
15334         TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
15335         TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
15336         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
15337         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
15338         New macros.
15339         (sorry_for_unsupported_tree, print_scope_operator,
15340         print_left_paren, print_right_paren, print_left_bracket,
15341         print_right_bracket, print_whitespace): Likewise.
15342         (aggr_variety): Rename to class_key_or_enum.
15343         (print_type): Rename to print_type_id.
15344         (print_type_specifier_seq, print_simple_type_specifier,
15345         print_elaborated_type_specifier,
15346         print_rest_of_abstract_declarator,
15347         print_parameter_declaration_clause, print_exception_specification,
15348         print_nested_name_specifier, print_template_id,
15349         typedef_original_name,  print_template_argument_list_start,
15350         print_template_argument_list_end): New functions.
15352 2000-09-11  Gabriel Dos Reis  <gdr@codesourcery.com>
15354         * ir.texi: Add more documentation.
15356 2000-09-11  Mark Mitchell  <mark@codesourcery.com>
15358         * cp-tree.h (struct saved_scope): Remove x_function_parms.
15359         (current_function_parms): Don't define.
15360         (struct cp_language_function): Remove parms_stored.
15361         (current_function_just_assigned_this): Don't define.
15362         (current_function_parms_stored): Likewise.
15363         (static_ctors): Declare.
15364         (static_dtors): Likewise.
15365         (SF_EXPAND): Don't define.
15366         (expand_start_early_try_stmts): Remove declaration.
15367         (store_parm_decls): Likewise.
15368         * decl.c (static_ctors): Don't declare.
15369         (static_dtors): Likewise.
15370         (struct binding_level): Remove this_block.
15371         (poplevel): Remove dead code.
15372         (set_block): Likewise.
15373         (mark_binding_level): Don't mark this_block.
15374         (mark_saved_scope): Don't mark x_function_parms.
15375         (init_decl_processing): Don't add current_function_parms as a GC
15376         root.
15377         (check_function_type): Change prototype.
15378         (start_function): Remove RTL-generation code.
15379         (expand_start_early_try_stmts): Remove.
15380         (store_parm_decls): Give it internal linkage.  Remove
15381         RTL-generation code.
15382         (finish_function): Remove RTL-generation code.
15383         * decl2.c (static_ctors): Fix formatting.
15384         (static_dtors): Likewise.
15385         * method.c (use_thunk): Don't call store_parm_decls.
15386         (synthesize_method): Likewise.
15387         * optimize.c (maybe_clone_body): Likewise.
15388         * parse.y (fn.def2): Likewise.
15389         (.set_base_init): Likewise.
15390         (nodecls): Likewise.
15391         * pt.c (instantiate_decl): Likewise.
15392         * rtti.c (synthesize_tinfo_fn): Likewise.
15393         * semantics.c (genrtl_try_block): Simplify.
15394         (expand_body): Use genrtl_start_function and
15395         genrtl_finish_function.
15396         (genrtl_start_function): New function.
15397         (genrtl_finish_function): Likewise.
15399 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
15401         * error.c (cp_tree_printer, case 'P'): Append break.
15403 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
15405         * cp-tree.h (frob_opname): Declare.
15406         * parse.y (saved_scopes): New static variable.
15407         (cp_parse_init): Adjust.
15408         (do_id): If lastiddecl is NULL, do do_identifier.
15409         (operator): Save scope information.
15410         (unoperator): New reduction. Restore scope information.
15411         (operator_name): Append unoperator. Call frob_opname.
15412         * spew.c (frob_opname): Define.
15414 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
15416         * decl.c, rtti.c: Include defaults.h if not already included.
15417         Don't define the *_TYPE_SIZE macros.
15419 2000-09-09  Mark Mitchell  <mark@codesourcery.com>
15421         * cp-tree.h (push_switch): Change prototype.
15422         (check_cp_case_value): Remove declaration.
15423         (decl_constant_value): Likewise.
15424         * decl.c (struct cp_switch): Add switch_stmt and cases.
15425         (case_compare): New function.
15426         (push_switch): Set switch_stmt.  Initialize cases.
15427         (pop_switch): Clean up cases.
15428         (define_case_label): Rename to ...
15429         (finish_case_label): ... this.  Do semantic analysis for case
15430         labels here.
15431         (start_function): Correct comment.
15432         * decl2.c (check_cp_case_value): Remove.
15433         * expr.c (do_case): Remove.
15434         * pt.c (tsubst_expr): Adjust call to finish_case_label.
15435         * semantics.c (genrtl_do_poplevel): Remove declaration.
15436         (RECHAIN_STMTS): Remove.
15437         (finish_break_stmt): Use build_break_stmt.
15438         (finish_continue_stmt): Use build_continue_stmt.
15439         (finish_switch_cond): Adjust condition here, rater than in
15440         c_expand_start_case.
15441         (finish_case_label): Remove.
15442         * typeck.c (c_expand_return): Remove.
15443         (c_expand_start_case): Likewise.
15445 2000-09-07  Gabriel Dos Reis  <gdr@codesourcery.com>
15447         * ir.texi: Document type nodes.
15449 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
15451         * cp-tree.h (init_cp_semantics): Declare.
15452         (genrtl_try_block): Don't declare.
15453         (genrtl_handler): Likewise.
15454         (genrtl_catch_block): Likewise.
15455         (genrtl_ctor_stmt): Likewise.
15456         (genrtl_subobject): Likewise.
15457         (genrtl_do_poplevel): Likewise.
15458         (genrtl_named_return_value): Likewise.
15459         * lex.c (init_parse): Call init_cp_semantics.
15460         * semantics.c (genrtl_try_block): Give it internal linkage.
15461         (genrtl_handler): Likewise.
15462         (genrtl_catch_block): Likewise.
15463         (genrtl_ctor_stmt): Likewise.
15464         (genrtl_subobject): Likewise.
15465         (genrtl_do_poplevel): Likewise.
15466         (genrtl_named_return_value): Likewise.
15467         (lang_expand_stmt): Rename to ...
15468         (cp_expand_stmt): ... this.  Only handle C++-specific nodes.
15469         (init_cp_semantics): Define.
15471         * decl.c (initialize_local_var): Remove RTL-generating code.
15472         * semantics.c (genrtl_try_block): Fix formatting.
15474         Move statement-tree facilities from C++ to C front-end.
15475         * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
15476         (void_zero_node): Remove.
15477         (stmt_tree): Likewise.
15478         (scope_chain): Adjust.
15479         (language_function): Rename to cp_language_function.
15480         (cp_function_chain): Adjust.
15481         (current_stmt_tree): Remove.
15482         (last_tree): Likewise.
15483         (last_expr_type): Likewise.
15484         (struct lang_decl): Adjust.
15485         (STMT_IS_FULL_EXPR_P): Remove.
15486         (add_tree): Remove.
15487         (begin_stmt_tree): Likewise.
15488         (finish_stmt_tree): Likewise.
15489         (walk_tree_fn): Likewise.
15490         (walk_stmt_tree): Likewise.
15491         * class.c (finish_struct): Replace use of add_tree with add_stmt.
15492         * decl.c (mark_stmt_tree): Adjust type.
15493         (init_decl_processing): Don't build void_zero_node.
15494         (initialize_local_var): Adjust usage of current_stmt_tree.
15495         (finish_enum): Use add_stmt, not add_tree.
15496         (save_function_data): Adjust use of language_function.
15497         (finish_constructor_body): Use add_stmt, not add_tree.
15498         (finish_destructor_body): Likewise.
15499         (push_cp_function_context): Adjust use of language_function.
15500         (pop_cp_function_context): Likewise.
15501         (mark_lang_function): Likewise.
15502         (mark_cp_function_context): Likewise.
15503         * init.c (build_aggr_init): Adjust use of current_stmt_tree.
15504         (build_vec_init): Likewise.
15505         * semantics.c (SET_LAST_STMT): Remove.
15506         (RECHAIN_STMTS): Don't use it.
15507         (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
15508         (current_stmt_tree): Define.
15509         (add_tree): Remove.
15510         (finish_goto_stmt): Use add_stmt, not add_tree.
15511         (finish_expr_stmt): Likewise.
15512         (begin_if_stmt): Likewise.
15513         (finish_then_clause): Likewise.
15514         (begin_while_stmt): Likewise.
15515         (begin_do_stmt): Likewise.
15516         (finish_return_stmt): Likewise.
15517         (begin_for_stmt): Likewise.
15518         (finish_break_stmt): Likewise.
15519         (finish_continue_stmt): Likewise.
15520         (begin_switch_stmt): Likewise.
15521         (finish_case_label): Likewise.
15522         (begin_try_block): Likewise.
15523         (begin_function_try_block): Likewise.
15524         (begin_handler): Likewise.
15525         (begin_catch_block): Likewise.
15526         (begin_compound_stmt): Likewise.
15527         (begin_asm_stmt): Likewise.
15528         (finish_asm_stmt): Likewise.
15529         (finish_label_stmt): Likewise.
15530         (add_decl_stmt): Likewise.
15531         (finish_subobject): Likewise.
15532         (finish_decl_cleanup): Likewise.
15533         (finish_named_return_value): Likewise.
15534         (setup_vtbl_ptr): Likewise.
15535         (add_scope_stmt): Likewise.
15536         (finish_stmt_expr): Likewise.
15537         (prune_unused_decls): Remove.
15538         (begin_stmt_tree): Likewise.
15539         (finish_stmt_tree): Likewise.
15540         (prep_stmt): Adjust use of current_stmt_tree.
15541         (lang_expand_stmt): Likewise.
15542         * tree.c (statement_code_p): Remove.
15543         (cp_statement_code_p): New function.
15544         (walk_stmt_tree): Remove.
15545         (init_tree): Set lang_statement_code_p.
15547 2000-09-06  Zack Weinberg  <zack@wolery.cumb.org>
15549         Integrated preprocessor.
15551         * Make-lang.in, Makefile.in: Remove all references to input.c,
15552         gxx.gperf, and hash.h.  Add ../c-lex.o to C_OBJS.
15553         * gxx.gperf, hash.h, input.c: Delete.
15554         * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
15555         initialized properly.
15557         * class.c (fixup_pending_inline): Take a tree, not a
15558         struct pending_inline *.  All callers changed.
15559         (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
15560         RID_PROTECTED entries in ridpointers[] array here.
15561         * decl.c (duplicate_decls): Do not refer to struct
15562         pending_inline.
15563         (record_builtin_type, init_decl_processing): Use RID_MAX not
15564         CP_RID_MAX.
15565         (grokdeclarator): Use C_IS_RESERVED_WORD.
15566         * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
15567         cpplib.
15568         (grok_x_components): Do not inspect pending_inlines chain.
15570         * cp-tree.h (struct lang_identifier): Add rid_code entry.
15571         (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
15572         (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
15573         (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
15574         TIME_IDENTIFIER_FILEINFO): Kill.
15575         Update prototypes.
15576         * lex.h: Expunge cp_rid.  Rewrite RIDBIT macros to use just a
15577         single 32-bit word.
15578         * parse.y: Call do_pending_inlines unconditionally.
15579         reinit_parse_for_method is now snarf_method.  fn.defpen is no
15580         longer necessary.  Remove unnecessary <itype> annotation on
15581         SCOPE.  Do not refer to end_of_file or struct pending_inline.
15582         * semantics.c (begin_inline_definitions): Call
15583         do_pending_inlines unconditionally.
15585         * lex.c: Remove all code now shared with C front end.
15586         Initialize cpplib properly if USE_CPPLIB.  Put reserved words
15587         into the get_identifier table.  Rewrite pragma handling to
15588         work with the registry.  Move code to save tokens for later
15589         processing to spew.c.
15591         * spew.c: Rewrite everything in terms of token streams instead
15592         of text.  Move routines here from lex.c / input.c as
15593         appropriate.  GC-mark trees hanging off the pending inlines
15594         chain.
15596 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
15598         * NEWS: Mention that the named return value extension has been
15599         deprecated.
15600         * cp-tree.h (original_result_rtx): Define.
15601         (TREE_REFERENCE_EXPR): Remove.
15602         (DECL_VPARENT): Likewise.
15603         (pushdecl_nonclass_level): Likewise.
15604         (store_return_init): Likewise.
15605         (reinit_lang_specific): Likewise.
15606         (genrtl_named_return_value): Change prototype.
15607         * decl.c (original_result_rtx): Remove.
15608         (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
15609         Do not generate RTL for local variables here.
15610         (store_return_init): Remove.
15611         * semantics.c (genrtl_named_return_value): Simplify.  Fold in
15612         store_return_init.
15613         (finish_named_return_value): Adjust accordingly.  Warn that this
15614         extension is deprecated.
15615         (lang_expand_stmt): Adjust call to genrtl_named_return_value.
15617 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
15619         * pt.c (type_unification_real): Replace switch with if.
15620         (unify): Tsubst non-type parms before comparing.
15622 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
15624         * error.c (dump_typename): New function, broken out of ...
15625         (dump_type): ... here. Use it.
15626         * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
15628 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
15630         * init.c (build_offset_ref): Deal with namespace scoped
15631         TEMPLATE_ID_EXPRs.
15633 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
15635         * class.c (resolve_address_of_overloaded_function): Add
15636         explanation message.
15637         * decl.c (define_case_label): Reformat explanation.
15638         * decl2.c (finish_static_data_member_decl): Likewise.
15639         (grokfield): Likewise.
15640         * friend.c (do_friend): Likewise.
15642 2000-09-05  Zack Weinberg  <zack@wolery.cumb.org>
15644         * tree.c (walk_tree): Expose tail recursion.
15645         (walk_stmt_tree): New function.
15646         * cp-tree.h: Prototype walk_stmt_tree.
15647         * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
15648         the BLOCKs directly.  If a BLOCK has no variables after
15649         pruning, discard it.
15650         (finish_stmt_tree): Use walk_stmt_tree.  No need to save and
15651         restore the line number.
15653 2000-09-05  Mark Mitchell  <mark@codesourcery.com>
15655         * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
15656         (pt.o): Remove dependency on HTAB_H.
15657         * cp-tree.h: Include hashtab.h.
15658         (walk_tree): Change prototype.
15659         (walk_tree_without_duplicates): New function.
15660         * decl.c (check_default_argument): Use it.
15661         * optimize.c (remap_decl): Adjust calls to walk_tree.
15662         (copy_body): Likewise.
15663         (expand_calls_inline): Likewise.
15664         (calls_setjmp_p): Use walk_tree_without_duplicates.
15665         * pt.c: Don't include hashtab.h.
15666         (for_each_template_parm): Use walk_tree_without_duplicates.
15667         * semantics.c (finish-stmt_tree): Likewise.
15668         (expand_body): Likewise.
15669         * tree.c (walk_tree): Add additional parameter.
15670         (walk_tree_without_duplicates): New function.
15671         (count_trees): Use it.
15672         (verify_stmt_tree): Adjust call to walk_tree.
15673         (find_tree): Use walk_tree_without_duplicates.
15674         (no_linkage_check): Likewise.
15675         (break_out_target_exprs): Adjust call to walk_tree.
15676         (cp_unsave): Likewise.
15678 2000-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
15680         * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
15681         (TEMPLATE_TEMPLATE_PARM): Adjust comment.
15682         * cp-tree.h (TYPE_BINFO): Adjust comment.
15683         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
15684         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
15685         (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
15686         (TYPE_TEMPLATE_INFO): Likewise.
15687         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
15688         * class.c (push_nested_class): Likewise.
15689         * decl.c (lookup_name_real): Likewise.
15690         (grokdeclarator): Likewise.
15691         (grok_op_properties): Likewise.
15692         (xref_tag): Likewise.
15693         (xref_basetypes): Likewise.
15694         * decl2.c (constructor_name_full): Likewise.
15695         (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
15696         (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
15697         * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
15698         (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15699         (dump_type_suffix): Likewise.
15700         * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
15701         instead.
15702         (get_aggr_from_typedef): Likewise.
15703         * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
15704         (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15705         (write_template_parm): Likewise.
15706         (write_template_template_parm): Check tree code instead of
15707         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
15708         * method.c (build_overload_nested_name): Add
15709         BOUND_TEMPLATE_TEMPLATE_PARM.
15710         (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
15711         * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15712         * pt.c (convert_template_argument): Check tree code instead of
15713         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
15714         (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
15715         (for_each_template_parm): Adjust comment.
15716         (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.
15717         (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15718         (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.  Use
15719         template_args_equal to compare template template parameter cases.
15720         * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15721         * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
15722         instead.
15723         * tree.c (copy_template_template_parm): Decide whether to create
15724         a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
15725         (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15726         (copy_tree_r): Likewise.
15727         * typeck.c (comptypes): Likewise.  Check tree code instead of
15728         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
15730 2000-09-04  Mark Elbrecht  <snowball3@bigfoot.com>
15732         * decl.c (finish_function): Move the code for handling functions
15733         marked with the constructor and destructor attributes inside the
15734         expand_p block.
15736 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
15738         * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
15740 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
15742         * pt.c (lookup_template_class): Remove abort.
15743         * tree.c (get_type_decl): Allow error_mark_node.
15745 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
15747         * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
15748         TEMPLATE_ID_EXPRs.
15750 2000-09-03  Mark Mitchell  <mark@codesourcery.com>
15752         * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
15753         new ABI mangling.
15755 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
15757         * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
15758         union tag mismatch error reporting.
15760 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
15762         * call.c (build_scoped_method_call): Check it is not a namespace.
15764 2000-08-30  Jason Merrill  <jason@redhat.com>
15766         * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
15768         * tree.c (bot_manip): Check TREE_CONSTANT rather than
15769         !TREE_SIDE_EFFECTS.  Call break_out_target_exprs and
15770         build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
15772         * decl.c (start_function): Always call make_function_rtl.
15774 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
15776         * semantics.c (prune_unused_decls): New function.
15777         (finish_stmt_tree): Call it via walk_tree.
15779 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
15781         * class.c (build_secondary_vtable): Constify a char *.
15782         * decl.c (init_decl_processing): Initialize function_id_node,
15783         pretty_function_id_node, and func_id_node.
15784         * input.c (struct input_source): Constify 'str'.
15785         (feed_input): Constify first argument.
15786         * mangle.c (write_identifier): Constify argument.
15787         * pt.c (mangle_class_name_for_template): Constify argument.
15789 2000-08-29  Mark Mitchell  <mark@codesourcery.com>
15791         * typeck.c (mark_addressable): Remove code that pokes around in
15792         RTL.
15794 2000-08-28  Jason Merrill  <jason@redhat.com>
15796         * lex.c (file_name_nondirectory): Move to toplev.c.
15798         * cp-tree.h (LOCAL_CLASS_P): New macro.
15799         * class.c (finish_struct_1): Use it.
15801 2000-08-27  Alex Samuel  <samuel@codesourcery.com>
15803         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
15804         (write_encoding): Pass another argument to write_name.
15805         (write_name): Add ignore_local_scope parameter.  Fix handling of
15806         local names.
15807         (write_nested_name): Use write_unqualified_name.
15808         (write_prefix): Likewise.  Skip out on FUNCTION_DECLs.
15809         (write_template_prefix): Use write_unqualified_name.
15810         (write_component): Remove.
15811         (write_local_name): Add parameter.  Use direct local entity to
15812         discriminator calculation.
15813         (write_class_enum_type): Pass another argument to write_name.
15814         (write_template_template_arg): Likewise.
15815         (make_guard_variable): Likewise.
15817 2000-08-27  Jason Merrill  <jason@redhat.com>
15819         * decl.c (pushdecl): Matching decls for local externs are found in
15820         the current level.  Propagate linkage information from previous
15821         declarations.
15823 2000-08-26  Gabriel Dos Reis  <gdr@codesourcery.com>
15825         * ir.texi (Expressions): Fix typo.
15827 2000-08-25  Greg McGary  <greg@mcgary.org>
15829         * tree.c (init_tree): Use ARRAY_SIZE.
15831 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
15833         * error.c (cp_tree_printer): Rework.
15835 2000-08-25  Mark Mitchell  <mark@codesourcery.com>
15837         * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
15838         dyn-string.o.
15839         (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
15840         (cp-demangle.o): Remove target.
15841         (dyn-string.o): Likewise.
15843         * decl.c (grokfndecl): Require that `main' return an `int'.
15844         * mangle.c (write_encoding): Don't mangle return types for
15845         conversion functions.
15847 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
15849         * error.c (tree_formatting_info): New data type.
15850         (tree_being_formatted): New macro.
15851         (tree_formatting_flags): Likewise.
15852         (put_whitespace): Likewise.
15853         (print_tree_identifier): Likewise.
15854         (print_identifier): Likewise.
15855         (cp_tree_printer, print_function_argument_list, print_declaration,
15856         print_expression, print_function_declaration,
15857         print_function_parameter, print_type, print_cv_qualifier): New
15858         functions.
15859         (init_error): Initialize lang_printer.
15861 2000-08-24  Jason Merrill  <jason@redhat.com>
15863         * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
15864         adjustment necessary.
15866 2000-08-24  Greg McGary  <greg@mcgary.org>
15868         * cp-tree.h (MAIN_NAME_P): Remove macro.
15870 2000-08-24  Gabriel Dos Reis  <gdr@codesourcery.com>
15872         * error.c (print_instantiation_context): Don't forget to flush the
15873         buffer.
15875 2000-08-23  Jason Merrill  <jason@redhat.com>
15877         * typeck.c (build_ptrmemfunc): Save the input pmf.
15879         * method.c (process_modifiers): Use same_type_p.
15881 2000-08-23  Mark Mitchell  <mark@codesourcery.com>
15883         * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
15884         * mangle.c (write_function_type): Change prototype.
15885         (write_encoding): Don't mangle return types for
15886         constructors or destructors.
15887         (write_type): Adjust call to write_function_type.
15888         * pt.c (instantiate_template): Instantiate alternate entry points
15889         when instantiating the main function.
15891 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
15893         * error.c (cp_print_error_function): Don't use embedded '\n' in
15894         output_printf.
15896 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
15898         * decl.c (init_decl_processing): Remove bogus initialization.
15899         * error.c (lang_print_error_function): Restore here.
15900         (init_error): Initialize print_error_function.
15902 2000-08-22  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
15904         * decl2.c (arg_assoc): Revert my 2000-08-11 change.
15906 2000-08-22  Gabriel Dos Reis  <gdr@codesourcery.com>
15908         * Makefile.in (error.o): Depends on diagnostic.h
15910         * cp-tree.h (problematic_instantiation_changed,
15911         record_last_problematic_instantiation, current_instantiation,
15912         print_instantiation_context): Declare.
15913         (maybe_print_template_context): Remove.
15915         * decl.c (init_decl_processing): Set print_error_function to NULL.
15916         (lang_print_error_function): Remove, since we're using a new
15917         machinery.
15919         * error.c: #include diagnostic.h
15920         (function_category): New function.
15921         (cp_diagnostic_starter): Likewise.
15922         (cp_diagnostic_finalizer): Likewise.
15923         (cp_print_error_function): Likewise.
15924         (maybe_print_instantiation_context): Likewise.
15925         (print_instantiation_full_context): Likewise.
15926         (print_instantiation_partial_context): Likewise.
15927         (print_instantiation_context): Define.
15928         (init_error): Initialize diagnostic pager and finalizer.
15930         * pt.c (problematic_instantiation_changed): Define.
15931         (record_last_problematic_instantiation): Likewise.
15932         (current_instantiation): Likewise.
15933         (maybe_print_template_context): Remove.
15934         (print_template_context): Likewise.
15935         (current_tinst_level): Make static to reflect Brendan Kehoe's
15936         change of 1995-04-13.
15937         (push_tinst_level): Call print_instantiation_context.
15939 2000-08-21  Nix  <nix@esperi.demon.co.uk>
15941         * lang-specs.h: Do not process -o or run the assembler if
15942         -fsyntax-only.
15944 2000-08-21  Joseph S. Myers  <jsm28@cam.ac.uk>
15946         * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
15947         variables.
15948         * decl2.c (lang_decode_option): Disable gettext attributes for
15949         -ansi.
15951 2000-08-21  Gabriel Dos Reis  <gdr@codesourcery.com>
15953         * lex.c (lang_init_options): Default diagnostic message maximum
15954         length to 80, when line-wrapping.
15956 2000-08-20  Mark Mitchell  <mark@codesourcery.com>
15958         * class.c (build_vtbl_initializer): Clear the entire
15959         vtbl_init_data.  Start keeping track of the functions for which we
15960         have created vcall offsets here.
15961         (dfs_build_vcall_offset_vtbl_entries): Remove.
15962         (build_vcall_offset_vtbl_entries): Reimplement.
15963         (add_vcall_offset_vtbl_entries_r): New function.
15964         (add_vcall_offset_vtbl_entries_1): Likewise.  Tweak logic for
15965         computing when vcall offsets are necessary.
15967 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
15969         * decl.c (member_function_or_else): Use cp_error ... %T.
15970         (grokdeclarator): Likewise.
15971         (start_method): Likewise.
15972         * friend.c (make_friend_class): Use cp_pedwarn ... %T.
15974 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
15976         * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
15977         TYPE_DECLs.
15979 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
15981         * cp-tree.h (PTRMEM_OK_P): New macro.
15982         (itf_ptrmem_ok): New enumeration value.
15983         * class.c (resolve_address_of_overloaded_function): Add PTRMEM
15984         argument. Diagnose implicit pointer to member.
15985         (instantiate_type): Don't diagnose implicit pointer to member
15986         here. Pass itf_ptrmem_ok if ok. Adjust calls to
15987         resolve_address_of_overloaded_function.
15988         * init.c (build_offset_ref): Set PTRMEM_OK_P.
15989         (resolve_offset_ref): Don't diagnose implicit pointer to member here.
15990         * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
15991         * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
15992         (build_unary_op): Deal with single non-static member in
15993         microsoft-land.
15995 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
15997         * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
15999 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
16001         * cp-tree.h (enum_name_string): Remove prototype.
16002         (report_case_error): Remove prototype.
16003         * cp/typeck2.c (enum_name_string): Remove.
16004         (report_case_error): Remove.
16005         * error.c (dump_expr): Deal with enum values directly.
16006         Correctly negate integer constant.
16008 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
16010         * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
16011         (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
16012         * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
16013         (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
16014         (__cxa_vec_new): Use __cxa_vec_new2.
16015         (__cxa_vec_delete): Use __cxa_vec_delete2.
16017 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
16019         * vec.cc (__cxa_vec_new): Set "C" linkage.
16020         (__cxa_vec_ctor): Likewise.
16021         (__cxa_vec_cctor): Likewise.
16022         (__cxa_vec_dtor): Likewise.
16023         (__cxa_vec_delete): Likewise.
16024         * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
16025         (__cxa_vec_ctor): Likewise.
16026         (__cxa_vec_cctor): Likewise.
16027         (__cxa_vec_dtor): Likewise.
16028         (__cxa_vec_delete): Likewise.
16030 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
16032         * class.c (instantiate_type): Reinstate local variable
16033         deleted in previous change.
16035         * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
16036         itf_no_attributes.
16038 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
16040         * cp-tree.h (instantiate_type_flags): New enumeration.
16041         (instantiate_type): Change parameter.
16042         * class.c (instantiate_type): Adjust prototype. Adjust.
16043         * call.c (standard_conversion): Adjust instantiate_type call.
16044         (reference_binding): Likewise.
16045         (build_op_delete_call): Likewise.
16046         (convert_like_real): Likewise.
16047         * cvt.c (cp_convert_to_pointer): Likewise.
16048         (convert_to_reference): Likewise.
16049         * pt.c (convert_nontype_argument): Likewise.
16050         * typeck.c (build_binary_op): Likewise.
16051         (build_ptrmemfunc): Likewise.
16052         (convert_for_assignment): Likewise.
16054 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
16056         * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
16057         (current_aggr): Define.
16058         * decl.c (grokdeclarator): Make sure a friend class is an
16059         elaborated type specifier.
16060         * parse.y (current_aggr): Remove static definition.
16061         (cp_parse_init): Adjust.
16062         (structsp): Clear and restore current_aggr.
16063         (component_decl_list): Clear current_aggr.
16065         * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
16066         aggregate tag on the typename's context.
16068         * pt.c (tsubst_friend_class): Return error_mark_node, if
16069         parms becomes NULL.
16070         (instantiate_class_template): Ignore error_mark_node friend types.
16072 2000-08-14  Nathan Sidwell  <nathan@codesourcery.com>
16074         * cvt.c (warn_ref_binding): New static function, broken out of ...
16075         (convert_to_reference): ... here. Use it.
16077 2000-08-11  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
16079         * parse.y (template_arg): Add rule for template qualified with
16080         global scope.
16082 2000-08-11  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
16084         * decl2.c (add_function): Reorganize.
16085         (arg_assoc): Do not consider function template decls.
16087 2000-08-11  Jason Merrill  <jason@redhat.com>
16089         * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
16090         looking inside.
16092 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
16094         * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
16095         (lookup_nested_tag): Likewise.
16097         * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
16098         can be produced.
16100 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
16102         * parse.y (named_complex_class_head_sans_basetype): Remove
16103         always true if.
16105 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
16107         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
16108         explicit TEMPLATE_ID_EXPR args.
16109         (build_expr_from_tree, case CALL_EXPR): Likewise.
16111 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
16113         * decl.c (check_tag_decl): Diagnose typename's which don't
16114         declare anything.
16116 2000-08-10  Nathan Sidwell  <nathan@codesourcery.com>
16118         * init.c (build_aggr_init): Reject bogus array initializers
16119         early.
16121 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
16123         * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
16124         runtime.
16125         * cp/tinfo.cc (__dynamic_cast): Likewise.
16126         * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
16128 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
16130         * cvt.c (convert_to_pointer_force): Fix error message when
16131         attempting to cast from ambiguous base.
16133 2000-08-08  Jason Merrill  <jason@redhat.com>
16135         * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
16136         (tsubst_template_arg_vector): Likewise.
16138         * decl2.c (build_anon_union_vars): Choose the largest field; don't
16139         assume that one will be as large as the union.
16141 2000-08-07  Kazu Hirata  <kazu@hxi.com>
16143         * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
16144         * decl.c (pop_labels): Likewise.
16146 2000-08-04  Jeffrey Oldham  <oldham@codesourcery.com>
16148         * inc/cxxabi.h (__pbase_type_info): Changed member names to match
16149         specifications.
16150         (__pointer_to_member_type_info): Likewise.
16151         (__base_class_info): Likewise.
16152         (__class_type_info): Likewise.
16153         (__si_class_type_info): Likewise.
16154         (__vmi_class_type_info): Likewise.
16155         * tinfo.cc (__si_class_type_info::__do_find_public_src):
16156         Changed member names to match specifications.
16157         (__vmi_class_type_info::__do_find_public_src): Likewise.
16158         (__si_class_type_info::__do_dyncast): Likewise.
16159         (__vmi_class_type_info::__do_dyncast): Likewise.
16160         (__si_class_type_info::__do_upcast): Likewise.
16161         (__vmi_class_type_info::__do_upcast): Likewise.
16162         * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
16163         (__pbase_type_info::__pointer_catch): Likewise.
16164         (__pointer_type_info::__pointer_catch): Likewise.
16165         (__pointer_to_member_type_info::__pointer_catch): Likewise.
16167 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
16169         * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
16170         * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
16171         (cc1plus): Link with $(BACKEND) and $(C_OBJS).
16173 2000-08-04  Mark Mitchell  <mark@codesourcery.com>
16175         * cp-tree.h (add_method): Change prototype.
16176         * class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
16177         Don't double the size of the method vector in the error case.
16178         (handle_using_decl): Adjust call to add_method.
16179         (add_implicitly_declared_members): Likewise.
16180         (clone_function_decl): Likewise.
16181         * decl2.c (check_classfn): Likewise.
16182         * semantics.c (finish_member_declaration): Likewise.
16184 2000-08-04  Joseph S. Myers  <jsm28@cam.ac.uk>
16186         * decl.c (flag_isoc94): New variable.
16188 2000-08-02  Jason Merrill  <jason@redhat.com>
16190         * pt.c (do_type_instantiation): Add complain parm; don't complain
16191         if called recursively.
16192         * cp-tree.h, parse.y: Adjust.
16194 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
16196         * decl2.c: Silently ignore -Wstrict-prototypes; warn about
16197         -Wno-strict-prototypes.
16199         * g++spec.c: Adjust type of second argument to
16200         lang_specific_driver, and update code as necessary.
16202         * cp-tree.h: Don't prototype min_precision here.
16203         (my_friendly_assert): Cast expression to void.
16204         * semantics.c (do_poplevel): Initialize scope_stmts.
16206 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
16208         * cp-tree.h (DECL_NEEDED_P): Tweak.
16210 2000-07-28  Jason Merrill  <jason@redhat.com>
16212         * lang-specs.h: Use %i in rule for .ii files.
16214 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
16216         * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
16218 2000-07-30  Mark Mitchell  <mark@codesourcery.com>
16220         Allow indirect primary bases.
16221         * cp-tree.h (struct lang_type): Remove vfield_parent.  Add
16222         primary_base.
16223         (CLASSTYPE_VFIELD_PARENT): Remove.
16224         (CLASSTYPE_PRIMARY_BINFO): Reimplement.
16225         (BINFO_PRIMARY_BINFO): Remove.
16226         (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
16227         (BINFO_VBASE_PRIMARY_P): Likewise.
16228         (BINFO_PRIMARY_BASE_OF): New macro.
16229         (BINFO_INDIRECT_PRIMARY_P): Likewise.
16230         (get_primary_binfo): New function.
16231         * decl.c (lang_mark_tree): Make lang_type::primary_base.
16232         * class.c (vcall_offset_data_s): Rename to ...
16233         (vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
16234         and add ctor_vtbl_p.
16235         (get_derived_offset): Use get_primary_binfo.
16236         (dfs_mark_primary_bases): Adjust handling of virtual primary
16237         bases.
16238         (mark_primary_bases): Likewise.
16239         (set_primary_base): Take a binfo, not an integer, as a
16240         representation of the primary base.
16241         (indirect_primary_base_p): Remove.
16242         (determine_primary_base): Adjust for indirect primary bases.
16243         (dfs_find_final_overrider): Fix typo in coment.
16244         (update_vtable_entry_for_fn): Use get_primary_binfo.
16245         (layout_nonempty_base_or_field): Tweak.
16246         (build_base_fields): Adjust for new primary base semantics.
16247         (dfs_propagate_binfo_offsets): Remove.
16248         (propagate_binfo_offsets): Rewrite.
16249         (dfs_set_offset_for_shared_vbases): Remove.
16250         (layout_virtual_bases): Don't use it.
16251         (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
16252         ABI.
16253         (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
16254         CLASSTYPE_VFIELD_PARENT.
16255         (dfs_get_primary_binfo): New function.
16256         (get_primary_binfo): Likewise.
16257         (dump_class_hierarchy_r): Tweak printing of primary bases.
16258         (build_vtbl_initializer): Fix typo in comments.  Use
16259         vtbl_init_data.
16260         (build_vcall_and_vbase_vtbl_entries): Likewise.
16261         (build_vbaes_offset_vtbl_entries): Likewise.
16262         (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
16263         BV_VCALL_INDEX to handle indirect primary bases.
16264         (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
16265         (build_rtti_vtbl_entries): Likewise.
16266         * search.c (get_shared_vbase_if_not_primary): Tweak.
16267         (find_vbase_instance): Likewise.
16268         (binfo_for_vtable): Simplify.
16269         * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
16270         (make_binfo): Make it have 11 entries.
16272 2000-07-30  Alex Samuel  <samuel@codesourcery.com>
16274         * mangle.c (DECL_TEMPLATE_ID_P): Remove.
16275         (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
16276         ascertaining primaryness.
16277         (G): Remove template_args.
16278         (decl_is_template_id): New function.
16279         (write_encoding): Use decl_is_template_id.
16280         (write_name): Likewise.  Handle type_decls.  Get main variant of
16281         type decls.
16282         (write_nested_name): Likewise.
16283         (write_prefix): Likewise.
16284         (write_template_prefix): Likewise.
16285         (write_special_name_constructor): Remove defunct production from
16286         comment.
16287         (write_bare_function_type): Remove comment about absent parameter.
16288         (write_template_template_arg): Add missing grammar production to
16289         comment.
16291 2000-07-27  Jason Merrill  <jason@redhat.com>
16293         * decl.c (duplicate_decls): If common_type produces a non-typedef
16294         type for a typedef, just use the old type.
16296 2000-07-27  Mark Mitchell  <mark@codesourcery.com>
16298         * cp-tree.h (function_depth): Declare.
16299         (verify_stmt_tree): Likewise.
16300         (find_tree): Likewise.
16301         * decl.c (function_depth): Give it external linkage.
16302         * optimize.c (optimize_function): Increment and decrement it.
16303         * tree.c (verify_stmt_tree_r): New function.
16304         (verify_stmt_tree): Likewise.
16305         (find_tree_r): Likewise.
16306         (find_tree): Likewise.
16308 2000-07-27  Jason Merrill  <jason@redhat.com>
16310         * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
16311         TYPE_PTRMEMFUNC_P.
16312         * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
16314 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
16316         * decl.c (start_cleanup_fn): Mark the function as `inline'.
16317         * decl2.c (get_guard): Call cp_finish_decl, not
16318         rest_of_decl_compilation, for local guards.
16319         * lex.c (do_identifier): Remove unused variable.
16321 2000-07-26      Marc Espie <espie@cvs.openbsd.org>
16323         * parse.y:  Add missing ';'.
16325 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
16327         * parse.y (empty_parms): Use `()', not `(...)', when in the scope
16328         of `extern "C++"'.
16330 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
16332         Kill strict_prototype. Backwards compatibility only for
16333         non NO_IMPLICIT_EXTERN_C systems.
16334         * cp-tree.h (flag_strict_prototype): Remove.
16335         (strict_prototype): Remove.
16336         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
16337         * decl.c (maybe_push_to_top_level): Adjust.
16338         (pop_from_top_level): Adjust.
16339         (decls_match): Only allow sloppy parm matching for ancient
16340         system headers.
16341         (init_decl_processing): Adjust.
16342         (grokdeclarator): Adjust.
16343         * decl2.c (flag_strict_prototype): Remove.
16344         (strict_prototype): Remove.
16345         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
16346         (lang_f_options): Remove "strict-prototype".
16347         (unsupported-options): Add "strict-prototype".
16348         * lex.c (do_identifier): Adjust.
16349         (do_scoped_id): Adjust.
16350         * parse.y (empty_parms): Adjust.
16351         * class.c (push_lang_context): Adjust.
16352         (pop_lang_context): Adjust.
16353         * typeck.c (comp_target_parms): Adjust.
16355 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
16357         * decl.c (poplevel): Deal with anonymous variables at for scope.
16358         (maybe_inject_for_scope_var): Likewise.
16360 2000-07-25  Zack Weinberg  <zack@wolery.cumb.org>
16362         * decl.c: Remove all signal handling code, now done in toplev.c.
16364 2000-07-23  Mark Mitchell  <mark@codesourcery.com>
16366         * decl.c (make_rtl_for_nonlocal_decl): Rework.
16368         * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
16369         correctly.
16371 2000-07-20  Zack Weinberg  <zack@wolery.cumb.org>
16373         * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
16374         Define my_friendly_assert and my_friendly_abort as macros
16375         which may call friendly_abort.  Prototype friendly abort, not
16376         my_friendly_abort or my_friendly_assert.
16377         * decl.c (signal_catch): Report the signal caught in the error
16378         message.  Call fatal directly.
16379         * typeck2.c (ack, my_friendly_assert): Delete.
16380         (my_friendly_abort): Rename to friendly_abort.  Expect file,
16381         line, and function parameters.  Report the abort code, then
16382         call fancy_abort.  Do not mask an abort if errors have
16383         already occurred.
16385 2000-07-18  Nathan Sidwell  <nathan@codesourcery.com>
16387         * typeck.c (comp_target_parms): Remove obsolete parameter.
16388         (comp_target_types): Adjust.
16390 2000-07-17  Jason Merrill  <jason@redhat.com>
16392         * typeck.c (mark_addressable): Never set TREE_USED.
16393         * call.c (build_call): Don't abort on calls to library functions
16394         that have been declared normally.
16396         * typeck.c (build_binary_op): Fix grammar in warning.
16398         * exception.cc (__eh_free): Fix prototype.
16400         * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
16402         * decl.c (pushdecl): Handle seeing an OVERLOAD in
16403         IDENTIFIER_NAMESPACE_VALUE.
16405 2000-07-16  Mark Mitchell  <mark@codesourcery.com>
16407         * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
16408         * method.c (use_thunk): Correct handling of vcall offsets.
16410 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
16412         * .cvsignore: parse.h and parse.c have no cp- prefix.
16414 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
16416         * .cvsignore: New file.
16418 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
16420         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
16422 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
16424         * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
16425         * parse.c: Remove.
16426         * parse.h: Likewise.
16428 2000-07-11  Mark Mitchell  <mark@codesourcery.com>
16430         * class.c (layout_class_type): Add pointers to virtual bases after
16431         base classes under the old ABI.
16433 2000-07-10  Benjamin Chelf  <chelf@codesourcery.com>
16435         * semantics.c (finish_for_stmt): Remove call to emit_line_note.
16436         (finish_continue_stmt): Likewise.
16437         (begin_for_stmt): Remove call to note_level_for_for.
16438         (finish_goto_stmt): Change call from build_min_nt
16439         to build_stmt.
16440         (finish_expr_stmt): Likewise.
16441         (begin_if_stmt): Likewise.
16442         (begin_while_stmt): Likewise.
16443         (finish_while_stmt): Likewise.
16444         (finish_return_stmt): Likewise.
16445         (begin_for_stmt): Likewise.
16446         (finish_for_stmt): Likewise.
16447         (finish_break_stmt): Likewise.
16448         (begin_switch_stmt): Likewise.
16449         (finish_case_label): Likewise.
16450         (genrtl_try_block): Likewise.
16451         (begin_try_block): Likewise.
16452         (begin_handler): Likewise.
16453         (begin_compound_stmt): Likewise.
16454         (finish_asm_stmt): Likewise.
16455         (finish_label_stmt): Likewise.
16456         (add_decl_stmt): Likewise.
16457         (finish_subobject): Likewise.
16458         (finish_decl_cleanup): Likewise.
16459         (finish_named_return_value): Likewise.
16460         (setup_vtbl_ptr): Likewise.
16461         (add_scope_stmt): Likewise.
16462         * decl.c (finish_constructor_body): Likewise.
16463         (finish_destructor_body): Likewise.
16464         * optimize.c (copy_body_r): Likewise.
16465         (initialize_inlined_parameters): Likewise.
16466         (declare_return_variable): Likewise.
16467         (expand_call_inline): Likewise.
16469 2000-07-10  Jakub Jelinek  <jakub@redhat.com>
16471         * semantics.c (expand_body): Sync interface information
16472         at the end of function body expansion.
16474 2000-07-09  Jason Merrill  <jason@redhat.com>
16476         * init.c (build_new_1): Bail early if the call to new fails.
16478         * decl.c (compute_array_index_type): Check specifically for
16479         an INTEGER_CST, not just TREE_CONSTANT.
16481         * decl.c (duplicate_decls): Don't call duplicate_decls on
16482         the DECL_TEMPLATE_RESULT.
16483         (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
16484         codes.
16486         * error.c (dump_template_bindings): Don't crash if we had an
16487         invalid argument list.
16489         * typeck.c (c_expand_start_case): Do narrowing here.
16490         * semantics.c (finish_switch_cond): Not here.
16492 2000-07-09  Hidvegi Zoli  <hzoli@austin.ibm.com>
16494         * parse.y (asm_clobbers): Do string concatenation.
16496 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
16498         * decl.c (pushtag): Don't put local classes in template functions
16499         on the local_classes list.
16501 2000-07-04  Scott Snyder  <snyder@fnal.gov>
16503         * decl2.c (get_guard): Add missing return for old ABI local
16504         variable case.
16506 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
16508         * cp-tree.h (char_type_p): New function.
16509         * decl.c (init_decl_processing): Don't initialize
16510         signed_wchar_type_node or unsigned_wchar_type_node.
16511         (complete_array_type): Handle brace-enclosed string-constants.
16512         * rtti.c (emit_support_tinfos): Remove #if 0'd code.
16513         * tree.c (char_type_p): New function.
16514         * typeck2.c (digest_init): Use char_type_p.
16516 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
16518         * pt.c (tsubst): Don't layout type, if it's error_mark.
16520 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
16522         * pt.c (instantiate_pending_templates): Reset template level.
16524 2000-07-05  Jason Merrill  <jason@redhat.com>
16526         * call.c (joust): Don't complain about `operator char *()' beating
16527         `operator const char *() const'.
16529 2000-07-04  scott snyder  <snyder@fnal.gov>
16530             Jason Merrill  <jason@redhat.com>
16532         * repo.c (repo_get_id): Handle the case where a class with virtual
16533         bases has a null TYPE_BINFO_VTABLE.
16535 2000-07-04  Kevin Buhr  <buhr@stat.wisc.edu>
16536             Jason Merrill  <jason@redhat.com>
16538         * parse.y (member_init): Just pass in the type.
16539         * init.c (expand_member_init): Handle getting a type.
16541 2000-07-04  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
16542             Jason Merrill  <jason@redhat.com>
16544         * decl.c (finish_function): Warn if a function has no return
16545         statement.
16546         Suggested by Andrew Koenig.
16547         * typeck.c (check_return_expr): Do set current_function_returns_value
16548         if we got an error_mark_node.
16550 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
16552         * decl2.c (push_decl_namespace): Push the original namespace.
16554 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
16556         * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
16557         * semantics.c (begin_class_definition): Clear it.
16559 2000-07-02  Benjamin Chelf  <chelf@codesourcery.com>
16561         * cp-tree.h (genrtl_goto_stmt): Remove declaration.
16562         (genrtl_expr_stmt): Likewise.
16563         (genrtl_decl_stmt): Likewise.
16564         (genrtl_if_stmt): Likewise.
16565         (genrtl_while_stmt): Likewise.
16566         (genrtl_do_stmt): Likewise.
16567         (genrtl_return_stmt): Likewise.
16568         (genrtl_for_stmt): Likewise.
16569         (genrtl_break_stmt): Likewise.
16570         (genrtl_continue_stmt): Likewise.
16571         (genrtl_scope_stmt): Likewise.
16572         (genrtl_switch_stmt): Likewise.
16573         (genrtl_case_label): Likewise.
16574         (genrtl_begin_compound_stmt): Likewise.
16575         (genrtl_finish_compound_stmt): Likewise.
16576         (genrtl_compound_stmt): Likewise.
16577         (genrtl_asm_stmt): Likewise.
16579         * init.c (begin_init_stmts): Remove call to
16580         genrtl_begin_compound_stmt.
16581         (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
16583         * semantics.c (lang_expand_stmt): Changed call to
16584         genrtl_compound_stmt to ignore return value.
16586 2000-07-02  Mark Mitchell  <mark@codesourcery.com>
16588         * mangle.c (canonicalize_for_substitution): Return the canonical
16589         variant of a type.
16591         * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
16592         TYPE_DECL.
16593         * typeck.c (commonparms): Remove obstack manipulations.
16595 2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>
16597         * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
16599         * Makefile.in (OBJS): Added ../c-semantics.o.
16600         (OBJDEPS): Likewise.
16602         * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
16603         ../c-common.h.
16604         (struct stmt_tree): Added comment.
16605         (current_function_name_declared): Removed.
16606         (stmts_are_full_exprs_p): Likewise.
16607         (genrtl_do_pushlevel): Likewise.
16608         (genrtl_clear_out_block): Likewise.
16609         (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
16610         (DECL_ANON_UNION_ELEMS): Likewise.
16611         (emit_local_var): Likewise.
16612         (make_rtl_for_local_static): Likewise.
16613         (do_case): Likewise.
16614         (expand_stmt): Likewise.
16615         (genrtl_decl_cleanup): Likewise.
16616         (c_expand_asm_operands): Likewise.
16617         (c_expand_return): Likewise.
16618         (c_expand_start_case): Likewise.
16620         * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
16621         (emit_local_var): Likewise.
16622         (initialize_local_var): Change reference to
16623         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
16624         Change reference to stmts_are_full_exprs_p to
16625         current_stmt_tree->stmts_are_full_exprs_p.
16626         (push_cp_function_context): Likewise.
16628         * expect.c (expand_throw): Change reference to
16629         stmts_are_full_exprs_p.
16631         * init.c (build_aggr_init): Change reference to
16632         stmts_are_full_exprs_p.
16633         (build_vec_init): Likewise.
16635         * optimize.c (maybe_clone_body): Change reference to
16636         current_function_name_declared to
16637         cp_function_chain->name_declared.
16639         * pt.c (instantiate_decl): Change reference to
16640         current_function_name_declared to
16641         cp_function_chain->name_declared.
16643         * semantics.c (expand_cond): Moved declaration to c-common.h.
16644         (genrtl_do_pushlevel): Moved to c-semantics.c.
16645         (genrtl_clear_out_block): Likewise.
16646         (genrtl_goto_stmt): Likewise.
16647         (genrtl_expr_stmt): Likewise.
16648         (genrtl_decl_stmt): Likewise.
16649         (gerntl_if_stmt): Likewise.
16650         (genrtl_while_stmt): Likewise.
16651         (genrtl_do_stmt): Likewise.
16652         (genrtl_return_stmt): Likewise.
16653         (genrtl_for_stmt): Likewise.
16654         (genrtl_break_stmt): Likewise.
16655         (genrtl_continue_stmt): Likewise.
16656         (genrtl_scope_stmt): Likewise.
16657         (genrtl_switch_stmt): Likewise.
16658         (genrtl_case_label): Likewise.
16659         (genrtl_begin_compound_stmt): Likewise.
16660         (genrtl_finish_compound_stmt): Likewise.
16661         (genrtl_compound_stmt): Likewise.
16662         (genrtl_asm_stmt): Likewise.
16663         (genrtl_decl_cleanup): Likewise.
16664         (expand_cond): Likewise.
16665         (expand_stmt): Renamed to ...
16666         (lang_expand_stmt): ... this.
16667         (lang_expand_expr_stmt): Initialize.
16668         (set_current_function_name_declared): Likewise.
16669         (stmts_are_full_exprs_p): Likewise.
16670         (current_function_name_declared): Likewise.
16671         (anon_aggr_type_p): Likewise.
16672         (do_poplevel): Change reference to
16673         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
16674         Change reference to stmts_are_full_exprs_p to
16675         current_stmt_tree->stmts_are_full_exprs_p.
16676         (add_tree): Likewise.
16677         (finish_expr_stmt): Likewise.
16678         (prep_stmt): Likewise.
16679         (lang_expand_stmt): Likewise.
16680         (begin_compound_stmt): Change reference to
16681         current_function_name_declared to
16682         cp_function_chain->name_declared and call to
16683         current_function_name_declared().
16684         (setup_vtbl_ptr): Likewise.
16685         (genrtl_do_poplevel): Removed.
16687 2000-06-30  Jason Merrill  <jason@redhat.com>
16689         * init.c (init_init_processing): Go back to aligning like
16690         double_type_node for old ABI.
16691         (get_cookie_size): Make cookie larger if we get a type that needs
16692         more alignment.
16693         (build_vec_delete): Call it.
16695         * typeck.c (qualify_type_recursive): New fn.
16696         (composite_pointer_type): Use it.
16697         (build_binary_op): Use composite_pointer_type.
16699 2000-06-24  Carlos O'Ryan  <coryan@cs.wustl.edu>
16700             Jason Merrill  <jason@redhat.com>
16702         * typeck.c (check_return_expr): Don't complain about returning
16703         NULL from operator new if -fcheck-new.
16704         * cp-tree.h: Declare flag_check_new here.
16705         * init.c: Not here.
16707 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
16709         * mangle.c (find_substitution): Use same_type_p.
16710         (write_encoding): Don't check for substitutions.
16712 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
16714         * parse.y (expr_no_comma_rangle): New non-terminal.
16715         (template_parm): Use it for default parameter case.
16716         (template_arg): Use it.
16717         (expr_no_commas): Remove commented out undefined extensions.
16718         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
16719         * parse.h, parse.c: Rebuilt.
16721 2000-06-30  Mark Mitchell  <mark@codesourcery.com>
16723         * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
16724         (finish_asm_stmt): Do it here, instead.
16726         * cp-tree.h (ridpointers): Don't declare.
16727         * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
16728         (record_builtin_java_type): Likewise.
16729         (init_decl_processing): Likewise.
16730         * lex.c: Move inclusion of lex.h.
16731         (ridpointers): Don't define.
16732         (init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
16733         RID_MAX.
16734         * lex.h (enum rid): Rename to ...
16735         (enum cp_rid): ... this.
16736         (ridpointers): Don't declare.
16737         * parse.y: Move inclusion of lex.h.
16738         * parse.c: Regenerated.
16739         * spew.c: Move inclusion of lex.h.
16741         * cp-tree.h (struct language_function): Remove temp_name_counter.
16742         (temp_name_counter): Remove.
16743         (get_temp_name): Change prototype.
16744         (get_guard): New function.
16745         (get_guard_cond): Likewise.
16746         (set_guard): Likewise.
16747         * cvt.c (build_up_reference): Adjust call to get_temp_name.
16748         * decl.c (expand_static_init): Use get_guard and friends to
16749         implement guard variables.
16750         * decl2.c (get_temp_name): Assume that the variables created are
16751         always static.
16752         (get_sentry): Rename to ...
16753         (get_guard): ... this.  Implement new ABI guard variables.
16754         (get_guard_bits): New function.
16755         (get_guard_cond): Likewise.
16756         (set_guard): Likewise.
16757         (start_static_initialization_or_destruction): Use them.
16758         (do_static_initialization): Replace sentry with guard throughout.
16759         (do_static_destruction): Likewise.
16760         * init.c (create_temporary_var): Add comment.
16762 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
16764         * mangle.c (find_substitution): Use same_type_p.
16765         (write_encoding): Don't check for substitutions.
16767 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
16769         * parse.y (expr_no_comma_rangle): New non-terminal.
16770         (template_parm): Use it for default parameter case.
16771         (template_arg): Use it.
16772         (expr_no_commas): Remove commented out undefined extensions.
16773         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
16774         * parse.h, parse.c: Rebuilt.
16776 2000-06-29  Mark Mitchell  <mark@codesourcery.com>
16778         * cp-tree.h (flag_const_strings): Remove.
16779         (warn_parentheses): Likewise.
16780         (warn_format): Likewise.
16781         (common_type): Likewise.
16782         (default_conversion): Likewise.
16783         (build_binary_op): Likewise.
16784         (cp_build_binary_op): New macro.
16785         * call.c (build_new_op): Use cp_build_binary_op instead of
16786         build_binary_op.
16787         * class.c (build_vtable_entry_ref): Likewise.
16788         * decl.c (expand_static_init): Likewise.
16789         (compute_array_index_type): Likewise.
16790         (build_enumerator): Likewise.
16791         * decl2.c (delete_sanity): Likewise.
16792         (start_static_initialization_or_destruction): Likewise.
16793         * error.c (dump_type_suffix): Likewise.
16794         * init.c (resolve_offset_ref): Likewise.
16795         (build_new): Likewise.
16796         (build_new_1): Likewise.
16797         (build_vec_delete_1): Likewise.
16798         (build_vec_init): Likewise.
16799         (build_delete): Likewise.
16800         * rtti.c (synthesize_tinfo_fn): Likewise.
16801         (synthesize_tinfo_var): Likewise.
16802         * search.c (expand_upcast_fixups): Likewise.
16803         (fixup_all_virtual_upcast_offsets): Likewise.
16804         * typeck.c (build_array_ref): Likewise.
16805         (get_member_function_from_ptrfunc): Likewise.
16806         (build_binary_op): Add parameter.
16807         (pointer_int_sum): Use cp_build_binary_op.
16808         (pointer_diff): Likewise.
16809         (build_modify_expr): Likewise.
16810         (get_delta_difference): Likewise.
16811         (build_ptrmemfunc): Likewise.
16813 2000-06-29  Nathan Sidwell  <nathan@codesourcery.com>
16815         * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
16816         * decl.c (create_implicit_typedef): Adjust.
16817         * decl2.c (build_artificial_parm): Adjust.
16818         * method.c (implicitly_declare_fn): Adjust.
16819         * pt.c (push_inline_template_parms_recursive): Adjust.
16820         (process_template_parm): Adjust.
16821         (overloaded_template_name): Adjust.
16822         * semantics.c (finish_template_template_parm): Adjust.
16824 2000-06-28  Mark Mitchell  <mark@codesourcery.com>
16826         * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
16827         * class.c (update_vtable_entry_for_fn): Correct logic for deciding
16828         where to emit thunks.
16829         (build_vtt): Adjust call to build_vtt_inits.
16830         (build_vtt_inits): Add parameter to indicate whether or not
16831         sub-VTTs for virtual bases should be included.  Adjust handling of
16832         construction vtables.
16833         (get_matching_base): New function.
16834         (dfs_build_vtt_inits): Rename to ...
16835         (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
16836         construction vtables.
16837         (dfs_fixup_binfo_vtbls): Likewise.
16838         (build_ctor_vtbl_groups): Build construction vtables for virtual
16839         bases, too.
16840         (accumulate_vtbl_inits): Tweak logic for deciding whether or not
16841         to build construction vtbls.
16842         (dfs_accumulate_vtbl_inits): Adjust handling of
16843         construction vtables.
16845         * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
16846         types correctly.
16848 2000-06-27  Mark Mitchell  <mark@codesourcery.com>
16850         * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
16852 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
16854         * search.c (hides): Remove.
16855         (is_subobject_of_p): Add most_derived parameter. Use
16856         CANONICAL_BINFO.
16857         (lookup_field_queue_p): Adjust.
16858         (lookup_field_r): Adjust.
16860 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
16862         * decl2.c (handle_class_head): Bash typedefs to the type's main
16863         decl.
16865 2000-06-25  Mark Mitchell  <mark@codesourcery.com>
16867         * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
16868         (begin_global_stmt_expr): ... this.
16869         (genrtl_finish_stmt_expr): Rename to ...
16870         (finish_global_stmt_expr): ... this.
16871         * init.c (begin_init_stmts): Adjust calls.
16872         (finish_init_stmts): Likewise.
16873         * semantics.c (genrtl_begin_stmt_expr): Rename to ...
16874         (begin_global_stmt_expr): ... this.
16875         (genrtl_finish_stmt_expr): Rename to ...
16876         (finish_global_stmt_expr): ... this.
16878 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
16880         * search.c (lookup_member): Fix typo in comment.
16882 2000-06-24  Jason Merrill  <jason@redhat.com>
16884         * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
16885         (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
16887 2000-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
16889         * parse.y (complex_direct_notype_declarator): Support global_scope.
16890         * Makefile.in: Adjust conflict count.
16892 2000-06-23  Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
16894         * parse.y (template_arg): Convert TEMPLATE_DECL
16895         that is a template template parameter to
16896         TEMPLATE_TEMPLATE_PARM here.
16898         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
16899         * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
16900         (copy_template_template_parm): Adjust prototype.
16901         * decl.c (grokdeclarator): Remove dead code.
16902         * pt.c (process_template_parm): Tidy.
16903         (lookup_template_class): Construct nodes in
16904         copy_template_template_parm.
16905         (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
16906         lookup_template_class.  Use TYPE_TI_TEMPLATE.
16907         * tree.c (copy_template_template_parm): Add NEWARGS
16908         parameter.
16909         (mapcar): Adjust call to copy_template_template_parm.
16910         * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
16911         * method.c (build_template_template_parm_names): Change error
16912         code to avoid compilation warning.
16914         * gxxint.texi: Document template template parameter
16915         name mangling.
16917 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
16919         * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
16920         (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
16921         (cp-demangle.o): New rule.
16922         (dyn-string.o): Likewise.
16923         * inc/cxxabi.h (__cxa_demangle): New declaration.
16925 2000-06-22  Mark Mitchell  <mark@codesourcery.com>
16927         * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
16928         (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
16929         (lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
16930         a tree, not an int.
16931         (THUNK_GENERATE_WITH_VTABLE_P): New macro.
16932         (make_thunk): Change prototype.
16933         (emit_thunk): Rename to use_thunk.
16934         (mangle_thunk): Change prototype.
16935         * class.c (get_derived_offset): Simplify.
16936         (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
16937         BV_GENERATE_THUNK_WITH_VTABLE_P.
16938         (build_primary_vtable): Simplify.
16939         (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
16940         (dfs_find_base): Remove.
16941         (update_vtable_entry_for_fn): Correct bug in finding the base
16942         where a virtual function was first declared.  Figure out whether
16943         or not to emit a vcall-thunk with the vtables in which it appears.
16944         Correct logic for deciding whether to use an ordinary thunk, or a
16945         vcall thunk.
16946         (finish_struct_1): Remove unnecssary code.
16947         (build_vtbl_initializer): Use ssize_int for the running counter of
16948         negative indices.
16949         (build_vtbl_initializer): Only use vcall thunks where necessary.
16950         Mark thunks as needing to be emitted with their vtables, or not.
16951         (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
16952         indices.  Use size_binop.
16953         (dfs_build_vcall_offset_vtbl_entries): Don't rely on
16954         BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
16955         size_binop.
16956         (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
16957         (build_vtable_entry): Mark thunks as needing to be emitted with
16958         their vtables, or not.
16959         * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
16960         * decl2.c (mark_vtable_entries): Use use_thunk instead of
16961         emit_thunk.
16962         * dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
16963         information.
16964         * error.c (dump_expr): Use BV_FN.
16965         * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
16966         not an int.
16967         * method.c (make_thunk): Likewise.
16968         (emit_thunk): Rename to use_thunk.  Allow callers to decide
16969         whether or not to actually emit the thunk.  Adjust for changes in
16970         representation of vcall offsets.
16971         * search.c (dfs_get_pure_virtuals): Use BV_FN.
16972         * semantics.c (emit_associated_thunks): New function.
16973         (expand_body): Use it.
16974         * ir.texi: Adjust decriptions of thunks.
16976 2000-06-22  Jason Merrill  <jason@redhat.com>
16978         * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
16979         (tsubst_friend_function): Copy it here.
16981         * decl.c (grok_op_properties): Fix typo.
16983         * decl2.c (delete_sanity): Clarify warning, avoid failure on
16984         deleting void*.
16986         * pt.c (check_explicit_specialization): Clarify error.
16988         * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
16989         an old OVERLOAD when we're declaring a non-function.
16990         (pushdecl, destroy_local_var): Check for error_mark_node.
16991         (warn_extern_redeclared_static): Also bail early if
16992         we're a CONST_DECL.
16993         (push_overloaded_decl): Ignore an old error_mark_node.
16995 2000-06-22  Nathan Sidwell  <nathan@codesourcery.com>
16997         * call.c (build_x_va_arg): Check if in a template decl.
16998         * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
17000 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17002         * class.c (push_lang_context): TYPE_NAME gets you to the Java
17003         types DECLs.
17004         * decl.c (check_goto): Computed gotos assumed OK.
17006 2000-06-20  Jason Merrill  <jason@redhat.com>
17008         * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
17009         for which we don't need to look for instantiations.
17011 2000-06-21  Nathan Sidwell  <nathan@codesourcery.com>
17013         * parse.y (program): Always call finish_translation_unit.
17014         * parse.c, parse.h: Rebuilt.
17016 2000-06-20  Zack Weinberg  <zack@wolery.cumb.org>
17018         * method.c: Don't include hard-reg-set.h.
17020 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
17022         * rtti.c (get_base_offset): Cope when vbase field is in a base.
17024 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
17026         * call.c (build_conditional_expr): Use VOID_TYPE_P.
17027         * cvt.c (cp_convert_to_pointer): Likewise.
17028         (convert_to_void): Likewise.
17029         * error.c (dump_expr): Likewise.
17030         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
17031         * init.c (build_delete): Likewise.
17032         * method.c (emit_thunk): Likewise.
17033         * optmize.c (declare_return_variable): Likewise.
17034         * rtti.c (get_tinfo_decl_dynamic): Likewise.
17035         (get_typeid): Likewise.
17036         (build_dynamic_cast_1): Likewise.
17037         * typeck.c (composite_pointer_type): Likewise.
17038         (common_type): Likewise.
17039         (build_indirect_ref): Likewise.
17040         (build_binary_op): Likewise.
17041         (build_x_compound_expr): Likewise.
17042         (check_return_expr): Likewise.
17043         * typeck2.c (add_exception_specifier): Likewise.
17045         * mangle.c (write_method_parms): Use direct comparison for end
17046         of parmlist.
17048 2000-06-19  Benjamin Chelf  <chelf@codesourcery.com>
17050         * cp-tree.h (genrtl_try_block): Declare function.
17051         (genrtl_handler): Likewise.
17052         (genrtl_catch_block): Likewise.
17053         (genrtl_ctor_stmt): Likewise.
17054         (genrtl_subobject): Likewise.
17055         (genrtl_decl_cleanup): Likewise.
17056         (genrtl_do_poplevel): Likewise.
17057         (genrtl_do_pushlevel): Likewise.
17058         (genrtl_clear_out_block): Likewise.
17059         (genrtl_goto_stmt): Likewise.
17060         (genrtl_expr_stmt): Likewise.
17061         (genrtl_decl_stmt): Likewise.
17062         (genrtl_if_stmt): Likewise.
17063         (genrtl_while_stmt): Likewise.
17064         (genrtl_do_stmt): Likewise.
17065         (genrtl_return_stmt): Likewise.
17066         (genrtl_for_stmt): Likewise.
17067         (genrtl_break_stmt): Likewise.
17068         (genrtl_continue_stmt): Likewise.
17069         (genrtl_scope_stmt): Likewise.
17070         (genrtl_switch_stmt): Likewise.
17071         (genrtl_case_label): Likewise.
17072         (genrtl_begin_compound_stmt): Likewise.
17073         (genrtl_finish_compound_stmt): Likewise.
17074         (genrtl_compound_stmt): Likewise.
17075         (genrtl_asm_stmt): Likewise.
17076         (genrtl_named_return_value): Likewise.
17077         (genrtl_begin_stmt_expr): Likewise.
17078         (genrtl_finish_stmt_expr): Likewise.
17079         (finish_for_stmt): Removed first argument.
17080         (finish_switch_stmt): Likewise.
17082         * semantics.c (genrtl_try_block): Define function.
17083         (genrtl_handler): Likewise.
17084         (genrtl_catch_block): Likewise.
17085         (genrtl_ctor_stmt): Likewise.
17086         (genrtl_subobject): Likewise.
17087         (genrtl_decl_cleanup): Likewise.
17088         (genrtl_do_poplevel): Likewise.
17089         (genrtl_do_pushlevel): Likewise.
17090         (genrtl_clear_out_block): Likewise.
17091         (genrtl_goto_stmt): Likewise.
17092         (genrtl_expr_stmt): Likewise.
17093         (genrtl_decl_stmt): Likewise.
17094         (genrtl_if_stmt): Likewise.
17095         (genrtl_while_stmt): Likewise.
17096         (genrtl_do_stmt): Likewise.
17097         (genrtl_return_stmt): Likewise.
17098         (genrtl_for_stmt): Likewise.
17099         (genrtl_break_stmt): Likewise.
17100         (genrtl_continue_stmt): Likewise.
17101         (genrtl_scope_stmt): Likewise.
17102         (genrtl_switch_stmt): Likewise.
17103         (genrtl_case_label): Likewise.
17104         (genrtl_begin_compound_stmt): Likewise.
17105         (genrtl_finish_compound_stmt): Likewise.
17106         (genrtl_compound_stmt): Likewise.
17107         (genrtl_asm_stmt): Likewise.
17108         (genrtl_named_return_value): Likewise.
17109         (genrtl_begin_stmt_expr): Likewise.
17110         (genrtl_finish_stmt_expr): Likewise.
17111         (finish_for_stmt): Removed first argument and generate rtl
17112         specific code.
17113         (finish_switch_stmt): Likewise.
17114         (do_poplevel): Removed generate rtl specific code.
17115         (do_pushlevel): Likewise.
17116         (add_tree): Likewise.
17117         (finish_goto_stmt): Likewise.
17118         (finish_expr_stmt): Likewise.
17119         (begin_if_stmt): Likewise.
17120         (finish_if_stmt_cond): Likewise.
17121         (finish_then_clause): Likewise.
17122         (begin_else_clause): Likewise.
17123         (finish_else_clause): Likewise.
17124         (finish_if_stmt): Likewise.
17125         (clear_out_block): Likewise.
17126         (begin_while_stmt): Likewise.
17127         (finish_while_stmt_cond): Likewise.
17128         (finish_while_stmt): Likewise.
17129         (begin_do_stmt): Likewise.
17130         (finish_do_body): Likewise.
17131         (finish_do_stmt): Likewise.
17132         (finish_return_stmt): Likewise.
17133         (begin_for_stmt): Likewise.
17134         (finish_for_init_stmt): Likewise.
17135         (finish_for_cond): Likewise.
17136         (finish_for_expr): Likewise.
17137         (finish_break_stmt): Likewise.
17138         (finish_continue_stmt): Likewise.
17139         (begin_switch_stmt): Likewise.
17140         (finish_switch_cond): Likewise.
17141         (finish_case_label): Likewise.
17142         (begin_try_block): Likewise.
17143         (begin_function_try_block): Likewise.
17144         (finish_try_block): Likewise.
17145         (finish_cleanup_try_block): Likewise.
17146         (finish_cleanup): Likewise.
17147         (finish_function_try_block): Likewise.
17148         (finish_handler_sequence): Likewise.
17149         (finish_function_handler_sequence): Likewise.
17150         (begin_handler): Likewise.
17151         (finish_handler_parms): Likewise.
17152         (begin_catch_block): Likewise.
17153         (finish_handler): Likewise.
17154         (begin_compound_stmt): Likewise.
17155         (finish_compound_stmt): Likewise.
17156         (finish_asm_stmt): Likewise.
17157         (finish_label_stmt): Likewise.
17158         (finish_label_decl): Likewise.
17159         (finish_subobject): Likewise.
17160         (finish_decl_cleanup): Likewise.
17161         (finish_named_return_value): Likewise.
17162         (begin_stmt_expr): Likewise.
17163         (finish_stmt_expr): Likewise.
17165         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
17166         to call genrtl_expr_stmt when appropriate.
17168         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
17169         begin_compound_expr to call genrtl_begin_stmt_expr and
17170         genrtl_begin_compound_expr when appropriate.
17171         (finish_init_stmts): Changed calls to finish_compound_expr and
17172         finish_stmt_expr to call genrtl_finish_compound_expr and
17173         genrtl_finish_stmt_expr when appropriate.
17174         (expand_default_init): Changed call to finish_expr_stmt to call
17175         genrtl_expr_stmt when appropriate.
17176         (build_vec_init): Likewise.
17178         * parse.y (simple_stmt): Removed first argument from call to
17179         finish_for_stmt. Removed first argument from call to
17180         finish_switch_stmt.
17182         * parse.c: Regenerated.
17184         * pt.c (tsubst_expr): Removed first argument from call to
17185         finish_for_stmt. Removed first argument from call to
17186         finish_switch_stmt.
17188 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
17190         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
17191         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
17193         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
17194         (cplus_tree_code_length[]): Likewise.
17195         (cplus_tree_code_name[]): Likewise.
17196         (init_parse): Added call to add_c_tree_codes. Changed
17197         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
17199 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
17201         * cp-tree.h (finish_mem_initializers): Declare.
17202         (count_trees): Likewise.
17203         * parse.y (base_init): Use finish_mem_initializers.
17204         * semantics.c (finish_mem_initializers): New function.
17206         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
17207         the number of trees.
17208         (n_trees): Remove.
17209         (count_trees): Don't use it.
17211 2000-06-15  Jason Merrill  <jason@redhat.com>
17213         * tree.c (count_trees): New debugging function.
17215         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
17216         * init.c (build_member_call): Pull out the name of a DECL.
17218         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
17219         * semantics.c (expand_body): Push to TV_INTEGRATION here.
17220         * optimize.c (optimize_function): Not here.
17221         * pt.c (instantiate_decl): Push to TV_PARSE.
17223 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
17225         * cp-tree.h (struct language_function): Remove x_base_init_list
17226         and x_member_init_list.
17227         (current_base_init_list): Remove.
17228         (current_member_init_list): Likewise.
17229         (setup_vtbl_ptr): Change prototype.
17230         (emit_base_init): Likewise.
17231         (expand_member_init): Likewise.
17232         (reinit_parse_for_function): Remove.
17233         * decl.c (save_function_data): Don't clear x_base_init_list and
17234         x_member_init_list.
17235         (mark_language_function): Don't mark them.
17236         * init.c (perform_member_init): Tweak comment.
17237         (sort_member_init): Take the list of initializers as an argument.
17238         (sort_base_init): Likewise.
17239         (emit_base_init): Likewise.
17240         (expand_member_init): Return the initializer.  Don't use global
17241         variables.
17242         * lex.c (reinit_parse_for_function): Remove.
17243         * method.c (build_template_parm_names): Correct substitution.
17244         (do_build_copy_constructor): Don't use current_member_init_list
17245         and current_base_init_list.
17246         (synthesize_method): Likewise.
17247         * parse.y (base_init): Split mem-initializers into
17248         base-initializers and field-initializers.
17249         (member_init_list): Build up the list here.
17250         (member_init): Return the initializer.
17251         (fn.depfn): Don't use reinit_parse_for_function.
17252         * parse.c: Regenerated.
17253         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
17254         ERROR_MARK.
17255         (tsubst_expr): Don't use current_member_init_list
17256         and current_base_init_list.
17257         (tsubst_expr_values): Rename to ...
17258         (tsubst_initializer_list): ... this.  Use convert_from_reference.
17259         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
17260         and current_base_init_list.
17261         (begin_function_definition): Don't call reinit_parse_for_function.
17263         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
17265         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
17266         correctly.
17268         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
17270 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
17272         * cp-tree.h (IF_COND): Move to c-common.h.
17273         (THEN_CLAUSE): Likewise.
17274         (ELSE_CLAUSE): Likewise.
17275         (WHILE_COND): Likewise.
17276         (WHILE_BODY): Likewise.
17277         (DO_COND): Likewise.
17278         (DO_BODY): Likewise.
17279         (RETURN_EXPR): Likewise.
17280         (EXPR_STMT_EXPR): Likewise.
17281         (FOR_INIT_STMT): Likewise.
17282         (FOR_COND): Likewise.
17283         (FOR_EXPR): Likewise.
17284         (FOR_BODY): Likewise.
17285         (SWITCH_COND): Likewise.
17286         (SWITCH_BODY): Likewise.
17287         (CASE_LOW): Likewise.
17288         (CASE_HIGH): Likewise.
17289         (GOTO_DESTINATION): Likewise.
17290         (COMPOUND_BODY): Likewise.
17291         (ASM_CV_QUAL): Likewise.
17292         (ASM_STRING): Likewise.
17293         (ASM_OUTPUTS): Likewise.
17294         (ASM_INPUTS): Likewise.
17295         (ASM_CLOBBERS): Likewise.
17296         (DECL_STMT_DECL): Likewise.
17297         (STMT_EXPR_STMT): Likewise.
17298         (LABEL_STMT_LABEL): Likewise.
17299         (SCOPE_BEGIN_P): Likewise.
17300         (SCOPE_END_P): Likewise.
17301         (SCOPE_STMT_BLOCK): Likewise.
17302         (SCOPE_NULLIFIED_P): Likewise.
17303         (SCOPE_NO_CLEANUPS_P): Likewise.
17304         (SCOPE_PARTIAL_P): Likewise.
17305         (ASM_VOLATILE_P): Likewise.
17306         (STMT_LINENO): Likewise.
17307         (STMT_LINENO_FOR_FN_P): Likewise.
17309         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
17310         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
17311         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
17312         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
17313         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
17315         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
17317         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
17318         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
17320         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
17321         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
17322         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
17324 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
17326         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
17327         * class.c (dfs_find_final_overrider): Set it appropriately.
17328         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
17329         avoid unneeded secondary vptrs.
17331 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
17333         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
17334         (check_bitfield_decl, check_field_decl): Likewise.
17335         (build_vtbl_or_vbase_field, build_base_field): Likewise.
17336         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
17337         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
17338         (xfer_tag, finish_enum): Likewise.
17339         * decl2.c (finish_builtin_type): Likewise.
17340         * init.c (init_init_processing): Likewise.
17341         * pt.c (instantiate_class_template): Likewise.
17342         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
17343         * cp-tree.h (struct lang_type): Add user_align member.
17344         (CLASSTYPE_USER_ALIGN): Define.
17346 2000-06-13  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
17348         * Make-lang.in (c++.install-common): Install g++-cross in
17349         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
17350         $(target_alias)-g++ and $(target_alias)-c++.
17352 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
17354         * class.c (vcall_offset_data_s): Add last_init and fns.
17355         (overrides): Rename to same_signature_p.
17356         (dfs_find_final_overrider): Adjust accordingly.
17357         (mark_overriders): Likewise.
17358         (warn_hidden): Likewise.
17359         (build_vtbl_initializer): Reorganize machinery for building things
17360         at negative offsets.
17361         (build_vcall_and_vbase_vtbl_entries): Likewise.
17362         (build_vbase_offset_vtbl_entries): Likewise.
17363         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
17364         offset entries.  Do not create two entries for functions with the
17365         same signature.
17366         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
17367         (build_rtti_vtbl_entries): Reorganize machinery for building things
17368         at negative offsets.
17370         * optimize.c (expand_call_inline): Don't recurse into the code
17371         used to initialize the parameters more than once.
17373 2000-06-11  Mark Mitchell <mark@codesourcery.com>
17375         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
17376         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
17377         (find_substitution): Only use the `Sa' substitution for
17378         std::allocator, not instantiations of it.
17379         (write_template_prefix): Move comment.  Only use a TREE_LIST to
17380         represent substitutions for a member template.
17381         (write_array_type): Mangle array dimensions correctly.
17382         * optimize.c (maybe_clone_body): Copy more information from the
17383         cloned function.
17384         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
17385         on the regenerated declaration.
17387 2000-06-11  Chip Salzenberg  <chip@valinux.com>
17388             Mark Mitchell <mark@codesourcery.com>
17390         * class.c (build_vtable): Clarify comment.
17391         (build_ctor_vtbl_group): Pass the most derived type to
17392         build_vtable.
17394 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17396         * decl2.c (compare_options): Don't needlessly cast away const-ness.
17398 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
17400         * decl.c (add_binding): Handle duplicate declarations of external
17401         variables.
17403 2000-06-09  Chip Salzenberg  <chip@valinux.com>
17404             Mark Mitchell <mark@codesourcery.com>
17406         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
17407         argument.
17408         (write_signed_number): New macro.
17409         (write_unsigned_number): Likewise.
17410         (write_source_name): Use them.
17411         (write_number): Handle signed and unsigned values.
17412         (write_integer_cst): Use tree_int_cst_sgn, and use
17413         write_unsigned_number or write_signed_number as appropriate.
17414         (write_discriminator): Use write_unsigned_number or
17415         write_signed_number as appropriate.
17416         (write_template_arg_literal): Likewise.
17417         (write_array_type): Use tree_low_cst.
17418         (write_template_parm):  Use write_unsigned_number or
17419         write_signed_number as appropriate.
17420         (write_substitution): Adjust call to write_number.
17421         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
17422         (write_expression): Handle non-type template arguments of
17423         reference type correctly.
17424         (mangle_thunk): Use write_signed_number.
17426 2000-06-09  Chip Salzenberg  <chip@valinux.com>
17428         * mangle.c (find_substition): Don't mangle objects with typename
17429         substitutions (e.g. "cin" as "Si").
17431 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
17433         * call.c (add_candidate): Use ggc_alloc_cleared.
17434         * decl.c (lookup_label): Likewise.
17435         * lex.c (retrofit_lang_decl): Likewise.
17437 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
17439         * semantics.c (expand_body): Push to TV_EXPAND.
17440         * optimize.c (optimize_function): Push to TV_INTEGRATION.
17441         * decl.c (start_function): Always call announce_function.
17443         * tinfo2.cc: Just declare abort.
17445 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
17447         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
17448         whenever @ is a symbolic name.
17450 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
17452         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
17454 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
17456         * decl.c (pushdecl): Look up functions by DECL_NAME, not
17457         DECL_ASSEMBLER_NAME.
17459 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
17461         * decl2.c (c_language): Define.
17463 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
17465         * lex.c (lang_init_options): Tweak.
17467         * decl2.c: Remove #inclusion of diagnostic.h
17468         (lang_decode_option): Move diagnostic formatting options to
17469         toplevel.
17471         * lang-options.h: Remove documentation for diagnostic options.
17473         * Makefile.in (lex.o): Depends upon diagnostic.h
17475 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
17477         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
17478         the same DECL_RESULT, it's not a redefinition.
17479         * pt.c (tsubst_decl): Remove code to handle illegal
17480         specializations.
17482 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
17484         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
17486 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
17488         * search.c (maybe_suppress_debug_info): Don't check
17489         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
17491         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
17492         here if extern_p.
17494         Remember instantiation context in deferred instantiations.
17495         * cp-tree.h (struct tinst_level): Remove.
17496         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
17497         * pt.c (current_tinst_level): Now a tree.
17498         (print_template_context, push_tinst_level, pop_tinst_level,
17499         tinst_for_decl): Adjust.
17500         (reopen_tinst_level): New fn.
17501         (init_pt): Register current_tinst_level as a root.
17502         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
17503         of the pending templates list.
17504         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
17505         * lex.c (extract_interface_info): Adjust.
17506         * decl2.c (warn_if_unknown_interface): Adjust.
17508 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
17510         * class.c (indirect_primary_base_p): New function.
17511         (determine_primary_base): Use it.
17513 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
17515         Update new-abi dynamic cast algorithm.
17516         * tinfo.cc (__class_type_info::__dyncast_result): Add
17517         whole_details. Adjust constructor.
17518         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
17519         Avoid unnecessary searching.
17520         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
17522 2000-06-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
17524         * decl.c (init_decl_processing): Don't call record_component_aliases.
17525         * tree.c (build_cplus_array_type_1): Likewise.
17527 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
17529         * ir.texi: Correct typo.
17530         * mangle.c (write_expression): Handle non-type template arguments
17531         with reference type.
17532         * method.c (build_overload_value): Likewise.
17533         * pt.c (convert_nontype_argument): Explicitly represent conversion
17534         to a reference with an ADDR_EXPR.
17535         (unify): Always unify arguments in left-to-right order.
17537 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
17538             Mark Mitchell  <mark@codesourcery.com>
17540         * Make-lang.in (CXX_SRCS): Add mangle.c.
17541         * Makefile.in (CXX_OBJS): Add mangle.o.
17542         (mangle.o): New rule.
17544         * class.c (local_classes): New variable.
17545         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
17546         (get_vtt_name): Use mangle_vtt_name for new ABI.
17547         (init_class_processing): Initialize local_classes.
17548         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
17549         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
17550         (std_identifier): New macro.
17551         (DECL_VOLATILE_MEMFUNC_P): New macro.
17552         (DECL_NAMESPACE_STD_P): Likewise.
17553         (local_classes): Declare.
17554         (get_mostly_instantiated_function_type): Declare.
17555         (init_mangle): Declare.
17556         (mangle_decl): Likewise.
17557         (mangle_type_string): Likewise.
17558         (mangle_type): Likewise.
17559         (mangle_typeinfo_for_type): Likewise.
17560         (mangle_typeinfo_string_for_type): Likewise.
17561         (mangle_vtbl_for_type): Likewise.
17562         (mangle_vtt_for_type): Likewise.
17563         (mangle_ctor_vtbl_for_type): Likewise.
17564         (mangle_thunk): Likewise.
17565         (mangle_conv_op_name_for_type): Likewise.
17566         (mangle_guard_variable): Likewise.
17567         * decl.c (pushtag): Keep track of local classes.
17568         (initialize_predefined_identifiers): Initialize std_identifier.
17569         (init_decl_processing): Use std_identifier.
17570         (start_decl): Don't treat instantiations as specializations.
17571         (grokdeclarator): Likewise.
17572         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
17573         name for fully-instantiated templates.
17574         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
17575         destructors with the new ABI.
17576         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
17577         (grokfield): Use mangle_type for new ABI.
17578         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
17579         (get_sentry): Use mangle_guard_variable for new ABI.
17580         (start_static_initialization_or_destruction): Likewise.
17581         * expr.c (extract_aggr_init): Remove.
17582         (extract_scalar_init): Likewise.
17583         (extract_init): Remove #if 0'd code.
17584         * mangle.c: New function.
17585         * method.c (build_mangled_name): Assert not flag_new_abi.
17586         (build_static_name): Likewise.
17587         (build_decl_overload_real): Likewise.
17588         (build_typename_overload): Likewise.
17589         (build_overload_with_type): Likewise.
17590         (build_overload_name): Likewise.
17591         (get_ctor_vtbl_name): Likewise.
17592         (start_squangling): Likewise.
17593         (get_id_2): Likewise.
17594         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
17595         (init_method): Call init_mangle for new ABI.
17596         (make_thunk): Call mangle_thunk for new ABI.
17597         * operators.def: Correct new ABI manglings for the `%' operator.
17598         Add `::' operator.
17599         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
17600         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
17601         (lookup_template_class): Call mangle_decl for new ABI.
17602         (get_mostly_instantiated_function_type): New function.
17603         (set_mangled_name_for_template_decl): Use it.
17604         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
17605         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
17606         conversion op names.
17607         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
17608         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
17609         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
17610         mangle_typeinfo_string_for_type.
17612 2000-06-03  Mark Mitchell  <mark@codesourcery.com>
17614         * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
17615         (INNERMOST_TEMPLATE_ARGS): New macro.
17616         (innermost_args): Remove.
17617         (get_innermost_template_args): New function.
17618         * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
17619         * error.c (dump_function_decl): Be caution when using
17620         most_general_template.
17621         * method.c (build_template_parm_names):  Use
17622         INNERMOST_TEMPLATE_ARGS.
17623         * pt.c (add_to_template_args): Tidy comment
17624         (get_innermost_template_args): New function.
17625         (check_explicit_specialization): Clear DECL_INITIAL for a new
17626         specialization.
17627         (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
17628         Tidy.
17629         (push_template_decl): Always register specializations of the most
17630         general template.
17631         (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
17632         (coerce_template_parms): Likewise.
17633         (lookup_template_class): Likewise.
17634         (innermost_args): Remove.
17635         (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
17636         (tsubst_decl): Handle tricky specializations.  Use
17637         get_innermost_template_args.
17638         (instantiate_template): Simplify handling of partial
17639         instantiations.
17640         (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
17641         (most_general_template): Reimplement, in a more straightforward
17642         manner.
17643         (regenerate_decl_from_template): Tweak formatting.  Use
17644         TMPL_ARGS_DEPTH for clarity.
17645         (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
17647         * dump.c (dequeue_and_dump): Dump information about thunks.
17649 2000-06-01  Richard Henderson  <rth@cygnus.com>
17651         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
17653 2000-06-01  Richard Henderson  <rth@cygnus.com>
17655         * decl2.c (unsupported_options): Fix typo, make const.
17656         (lang_decode_option): Fix bsearch argument order.
17658 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
17660         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
17661         on FIELD_DECLs.
17663 2000-05-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
17665         * cp-tree.h (c_get_alias_set): Deleted.
17666         * Makefile.in (decl.o): Include ../expr.h.
17667         * decl.c (expr.h): Include.
17668         (init_decl_processing): Call record_component_aliases for arrays.
17669         (grokdeclarator): Likewise.
17670         Set TREE_ADDRESSABLE for fields that aren't bitfields.
17671         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
17673 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
17675         Remove guiding declaration support.
17676         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
17677         (flag_guiding_decls): Remove.
17678         * call.c (build_user_type_conversion_1): Remove support for
17679         guiding decls.
17680         (build_new_function_call): Likewise.
17681         (build_new_op): Likewise.
17682         (build_new_method_call): Likewise.
17683         * decl.c (start_function): Likewise.
17684         * friend.c (is_friend): Likewise.
17685         (do_friend): Likewise.
17686         * decl2.c ((flag_dump_translation_unit): Make it const.
17687         (flag_guiding_decls): Remove.
17688         (unsupported_options): New variable
17689         (compare_options): New function.
17690         (lang_decode_option): Use them.
17692         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
17694         * method.c (mangle_expression): Adjust test for legal expression
17695         operators.
17697         * pt.c (instantiate_decl): Save and restore the local
17698         specializations list.
17700 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
17702         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
17704 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
17706         * call.c (add_template_candidate_real): Handle member template
17707         constructors for classes with virtual bases.
17708         (build_user_type_conversion_1): Use in_charge_arg_for_name.
17709         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
17711         * ir.texi: Update thunk documentation.
17713         * call.c (joust): Fix handling of overloaded builtin operators.
17715 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
17717         * cp-tree.h (DECL_ANTICIPATED): New macro.
17718         Document new use of DECL_LANG_FLAG_7.
17719         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
17720         in the user namespace.
17721         * lex.c (do_identifier): If the identifier's declaration has
17722         DECL_ANTICIPATED on, it has not yet been declared.  But do not
17723         replace it with an ordinary implicit declaration.
17725         * tinfo2.cc: Include stdlib.h.
17727 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
17729         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
17730         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
17731         CLASSTYPE_ALIGN.
17733 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
17735         * decl2.c (lang_decode_option): Use skip_leading_substring instead
17736         of plain strncmp.
17738 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
17740         * operators.def (<?): Duplicated, should have been...
17741         (>?): this.  Fixed.
17743 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
17744             Mark Mitchell  <mark@codesourcery.com>
17746         * cp-tree.h (ansi_opname): Make it a macro.
17747         (ansi_assopname): Likewise.
17748         (struct lang_decl_flags): Add assignment_operator_p.
17749         (struct lang_decl): Add operator_code.
17750         (DECL_VTT_PARM): Adjust.
17751         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
17752         overloaded operator.
17753         (SET_OVERLOADED_OPERATOR_CODE): New macro.
17754         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
17755         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
17756         (opname_tab): Remove.
17757         (assignop_tab): Likewise.
17758         (operator_name_info_t): New type.
17759         (operator_name_info): New variable.
17760         (assignment_operator_name_info): Likewise.
17761         (build_cp_library_fn): Remove declaration.
17762         (push_cp_library_fn): Likewise.
17763         (operator_name_string): Likewise.
17764         (build_decl_overload): Likewise.
17765         * call.c (print_z_candidates): Simplify.
17766         (build_object_call): Adjust usage of ansi_opname.  Use
17767         DECL_OVERLOADED_OPERATOR_P.
17768         (op_error): Adjust operator name lookup.
17769         (build_conditional_expr): Adjust usage of ansi_opname.
17770         (build_new_op): Likewise.
17771         (build_op_delete_call): Likewise.
17772         (build_over_call): Likewise.
17773         (joust): Use DECL_OVERLOADED_OPERATOR_P.
17774         * decl.c (duplicate_decls): Copy operator_code.
17775         (init_decl_processing): Adjust parameters to push_cp_library_fn.
17776         (builtin_function): Adjust parameters to build_library_fn_1.
17777         (build_library_fn_1): Accept an overloaded operator code.
17778         (build_library_fn): Pass ERROR_MARK.
17779         (build_cp_library_fn): Accept an overloaded operator code.
17780         (push_cp_library_fn): Likewise.
17781         (grokfndecl): Tweak.
17782         (grokdeclarator): Simplify code to compute names of overloaded
17783         operators.  Adjust use of ansi_opname.
17784         (ambi_op_p): Work on tree_codes, not identifiers.
17785         (unary_op_p): Likewise.
17786         (grok_op_properties): Likewise.
17787         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
17788         (lang_mark_tree): Don't try to mark the operator_code.
17789         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
17790         * error.c (dump_decl): Remove special handling for operator
17791         names.
17792         (dump_function_name): Likewise.
17793         (dump_expr): Adjust name lookup of operators.
17794         (op_to_string): Simplify.
17795         (assop_to_string): Likewise.
17796         * init.c (build_new_1): Adjust use of ansi_opname.
17797         * lex.c (opname_tab): Remove.
17798         (assignop_tab): Likewise.
17799         (ansi_opname): Likewise.
17800         (ansi_assopname): Likewise.
17801         (operator_name_string): Likewise.
17802         (reinit_lang_specific): Likewise.
17803         (operator_name_info): New variable.
17804         (assignment_operator_name_info): Likewise.
17805         (init_operators): New function.
17806         (init_parse): Use it.
17807         (do_identifier): Adjust use of ansi_opname.
17808         * method.c (mangle_expression): Don't use ansi_opname for
17809         mangling.
17810         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
17811         (build_decl_overload): Remove.
17812         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
17813         (do_build_assign_ref): Adjust use of ansi_opname.
17814         (synthesize_method): Likewise.
17815         (implicitly_declare_fn): Likewise.
17816         * operators.def: New file.
17817         * parse.y (operator): Adjust use of ansi_opname.
17818         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
17819         (set_mangled_name_for_template_decl): Don't play games with
17820         current_namespace.
17821         (special_function_p): Adjust use of ansi_opname.
17822         * typeck.c (check_return_expr): Likewise.
17823         * Make-lang.in (cc1plus): Depend on operators.def.
17824         * Makefile.in (lex.o): Likewise.
17825         (decl.o): Likewise.
17827 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
17829         * Make-lang.in (cplib2.ready): Eradicate.
17831 2000-05-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
17833         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
17834         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
17835         (built_min, cp_tree_equal): Likewise.
17837 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
17839         * class.c (layout_nonempty_base_or_field): Replace
17840         `record_layout_info' with `record_layout_info_s'.
17842 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
17844         Fix goto checking.
17845         * cp-tree.h (struct language_function): x_named_labels is now
17846         a struct named_label_list*.
17847         * decl.c (struct named_label_use_list): Renamed from...
17848         (struct named_label_list): ...this.  New struct.
17849         (push_binding_level): Don't set eh_region.
17850         (note_level_for_eh): New fn.
17851         (pop_label): Take label and old value directly.
17852         (pop_labels): Adjust for new named_labels format.
17853         (lookup_label): Likewise.
17854         (poplevel): Note characteristics of a binding level containing a
17855         named label.  Mess with named label lists earlier.
17856         (mark_named_label_lists): New fn.
17857         (mark_lang_function): Call it.
17858         (use_label): New fn, split out from...
17859         (make_label_decl): ...here.  Don't call it.
17860         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
17861         check_previous_gotos): New fns, split out from...
17862         (define_label): ...here.
17863         (check_switch_goto): New fn.
17864         (define_case_label): Call it.
17865         (check_goto): New fn.
17866         * semantics.c (finish_goto_stmt): Call it and use_label.
17867         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
17868         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
17870 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
17872         * class.c (build_vtable_entry_ref): Correct usage of
17873         get_vtbl_decl_for_binfo.
17875         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
17876         * method.c (implicitly_declare_fn): Not here.
17878 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
17880         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
17881         (CPTI_PTMD_DESC_TYPE): ... here.
17882         (ptmd_desc_type_node): Rename to ...
17883         (ptm_desc_type_node): ... here.
17884         * decl.c: Likewise.
17885         * rtti.c (ptmd_initializer): Rename to ...
17886         (ptm_initializer): ... here.
17887         (sythesize_tinfo_var): Adjust. Deal with pointer to member
17888         function.
17889         (create_tinfo_types): Adjust.
17891 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
17893         Finish implementation of VTTs.
17894         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
17895         CPTI_VTT_PARM_IDENTIFIER.
17896         (vtt_parm_identifier): New macro.
17897         (vtt_parm_type): Likewise.
17898         (BINFO_SUBVTT_INDEX): Likewise.
17899         (BINFO_VPTR_INDEX): Likewise.
17900         (struct lang_decl): Add vtt_parm.
17901         (DECL_VTT_PARM): New macro.
17902         (DECL_USE_VTT_PARM): Likewise.
17903         (DECL_NEEDS_VTT_PARM_P): Likewise.
17904         (get_vtt_name): Declare.
17905         (build_artificial_parm): Likewise.
17906         (fixup_all_virtual_upcast_offsets): Likewise.
17907         (expand_indirect_vtbls_init): Remove.
17908         * call.c (build_new_method_call): Pass the vtt to subobject
17909         constructors and destructors.
17910         * class.c (get_vtt_name): Give it external linkage.
17911         (build_clone): Handle the magic VTT parameters for clones.
17912         (clone_function_decl): Fix typo in comment.
17913         (build_vtt): Keep track of the indices in the VTTs where various
17914         entities are stored.
17915         (build_vtt_inits): Likewise.
17916         (dfs_build_vtt_inits): Likewise.
17917         (build_ctor_vtbl_group): Tweak type of construction vtables.
17918         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
17919         primary bases, when building construction vtables.
17920         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
17921         (initialize_predefined_identifiers): Add vtt_parm_identifier.
17922         (init_decl_processing): Initialize vtt_parm_type.
17923         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
17924         (lang_mark_tree): Make vtt_parm.
17925         * decl2.c (build_artificial_parm): New function.
17926         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
17927         (grokclassfn): Use build_artificial_parm.
17928         * init.c (initialize_vtbl_ptrs): Call
17929         fixup_all_virtual_upcast_offsets directly.
17930         (perform_member_init): Use the complete subobject destructor for
17931         member cleanups.
17932         (build_vtbl_address): New function.
17933         (expand_virtual_init): Handle VTTs.
17934         * optimize (maybe_clone_body): Likewise.
17935         * search.c (fixup_all_virtual_upcast_offsets): Give it external
17936         linkage.
17937         (expand_indirect_vtbls_init): Remove.
17938         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
17939         * tree.c (make_binfo): Make them bigger.
17941 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
17943         * inc/cxxabi.h (__pbase_type_info): Define, based on
17944         __pointer_type_info.
17945         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
17946         (__pointer_to_member_type_info): Likewise.
17947         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
17948         (__pointer_to_member_type_info::__is_pointer_p): Remove.
17949         (__pointer_type_info::__do_catch): Rename to ...
17950         (__pbase_type_info::__do_catch): ... here. Adjust.
17951         (__pbase_type_info::__pointer_catch): Implement.
17952         (__pointer_type_info::__pointer_catch): Adjust.
17953         (__pointer_to_member_type_info::__pointer_catch): Adjust.
17955 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
17957         * tinfo.h (__user_type_info::contained_virtual_p): New
17958         predicate.
17959         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
17960         shaped hierarchy.
17961         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
17962         diamond shaped hierarchy. Add early out for mixed diamond and
17963         duplicate shaped hierarchy.
17965 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
17967         * cp-tree.h (build_delete): Change prototype.
17968         (build_vec_delete): Likewise.
17969         * call.c (build_scoped_method_call): Use special_function_kind
17970         values to indicate the kind of destruction to be done.
17971         (build_method_call): Likewise.
17972         * decl.c (finish_destructor_body): Likewise.
17973         (maybe_build_cleanup_1): Likewise.  Rename to ...
17974         (maybe_build_cleanup): ... this.
17975         * decl2.c (delete_sanity): Use special_function_kind
17976         values to indicate the kind of destruction to be done.
17977         (build_cleanup): Likewise.
17978         * init.c (perform_member_init): Likewise.
17979         (build_vec_delete_1): Likewise.
17980         (build_dtor_call): Simplify.
17981         (build_delete): Use special_function_kind
17982         values to indicate the kind of destruction to be done.
17983         (build_vbase_delete): Likewise.
17984         (build_vec_delete): Likewise.
17986         * init.c (sort_member_init): Fix typo in error message generation
17987         code.
17989 2000-05-15  Donald Lindsay  <dlindsay@cygnus.com>
17991         * semantics.c (begin_class_definition): make the packed
17992         attribute be sensitive to the "-fpack-struct" command line flag
17994 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
17996         Update new-abi upcast algorithm.
17997         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
17998         prototype and meaning of return value.
17999         (__si_class_type_info::__do_upcast): Likewise.
18000         (__vmi_class_type_info::__do_upcast): Likewise.
18001         * tinfo.cc (__class_type_info::__upcast_result): Replace
18002         whole2dst with part2dst. Adjust ctor.
18003         (__class_type_info::__do_upcast): Adjust call of worker function.
18004         (__class_type_info::__do_upcast): Adjust.
18005         (__si_class_type_info::__do_upcast): Adjust. Use parent's
18006         __do_upcast.
18007         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
18008         virtual base in diamond hierarchy bug.
18010 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
18012         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
18013         and bitfield to tinfo_fn_p.
18014         (DECL_TINFO_FN_P): Adjust.
18015         (SET_DECL_TINFO_FN_P): Likewise.
18016         (DECL_MUTABLE_P): Likewise.
18017         (DECL_C_BIT_FIELD): Likewise.
18018         (SET_DECL_C_BIT_FIELD): Likewise.
18019         (CLEAR_DECL_C_BIT_FIELD): Likewise.
18020         (DECL_UNINLINABLE): Likewise.
18021         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
18022         (handle_using_decl): Remove assertion.
18023         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
18024         to build FIELD_DECLs.
18025         (build_base_field): Likewise.
18026         (layout_class_type): Likewise.
18027         * decl.c (init_decl_processing): Likewise.
18028         (build_ptrmemfunc_type): Likewise.
18029         (grokdeclarator): Likewise.
18030         * decl2.c (grok_x_components): Likewise.
18031         * except.c (call_eh_info): Likewise.
18032         * init.c (init_init_processing): Likewise.
18033         * rtti.c (expand_class_desc): Likewise.
18034         (create_pseudo_type_info): Likewise.
18035         (get_vmi_pseudo_type_info): Likewise.
18036         (create_tinfo_types): Likewise.
18037         * ptree.c (print_lang_decl): Adjust.
18038         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
18039         before checking DECL_MUTABLE_P.
18041         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
18042         parameters for template functions.
18043         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
18044         destructors as well as constructors.
18046 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
18048         * class.c (build_ctor_vtbl_group): Set inits.
18049         * optimize.c (maybe_clone_body): Set DECL_INLINE and
18050         DECL_THIS_INLINE appropriately for clones.
18052         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
18053         (DECL_CONV_FN_P): Simplify.
18054         (DECL_OPERATOR): Remove.
18055         (language_to_string): Declare.
18056         * decl.c (duplicate_decls): Fix typo in comment.
18057         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
18058         (grok_op_properties): Use DECL_CONV_FN_P instead of
18059         IDENTIFIER_TYPENAME_P.
18060         * dump.c (dequeue_and_dump): Dump the language linkage of
18061         declarations.
18062         * error.c (language_to_string): Give it external linkage.
18063         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
18064         (implicitly_declare_fn): Set DECL_LANGUAGE.
18065         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
18066         IDENTIFIER_TYPENAME_P.
18067         (tsubst_decl): Likewise.
18068         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
18069         * semantics.c (finish_member_declaration): Don't mark members of
18070         classes declared in an extern "C" region as extern "C".
18072 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
18074         * decl2.c (qualified_lookup_using_namespace): Look through
18075         namespace aliases.
18077         * decl.c (push_using_decl): Return the old decl on namespace level.
18079 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
18081         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
18082         (VTT_NAME_PREFIX): New macro.
18083         (CTOR_VTBL_NAME_PREFIX): Likewise.
18084         (get_ctor_vtbl_name): New function.
18085         * class.c (get_vtable_name): Simplify.
18086         (get_vtt_name): New function.
18087         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
18088         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
18089         when a virtual base becomes primary.
18090         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
18091         VTTs.
18092         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
18093         additional parameters.
18094         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
18095         (initialize_array): New function.
18096         (build_vtt): Likewise.
18097         (build_vtt_inits): Likewise.
18098         (dfs_build_vtt_inits): Likewise.
18099         (dfs_fixup_binfo_vtbls): Likewise.
18100         (build_ctor_vtbl_group): Likewise.
18101         (initialize_vtable): Use initialize_array.
18102         (accumulate_vtbl_inits): Reimplement to handle construction
18103         vtables.
18104         (dfs_accumulate_vtbl_inits): Likewise.
18105         (bulid_vtbl_initializer): Adjust parameter name.
18106         * method.c (build_typename_overload): Remove #if 0'd code.
18107         (get_ctor_vtbl_name): New function.
18108         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
18109         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
18111         * cp-tree.h (struct lang_type): Remove search_slot.
18112         (CLASSTYPE_SEARCH_SLOT): Remove.
18113         (emit_base_init): Change prototype.
18114         (initialize_vtbl_ptrs): Likewise.
18115         (expand_indirect_vtbls_init): Likewise.
18116         (clear_search_slots): Remove.
18117         * decl.c (lang_mark_tree): Don't mark search_slot.
18118         * init.c (initialize_vtbl_ptrs): Simplify.
18119         (emit_base_init): Likewise.
18120         * search.c (struct vbase_info): Document decl_ptr.
18121         (convert_pointer_to_single_level): Remove.
18122         (dfs_find_vbases): Remove.
18123         (dfs_init_base_pointers): Simplify.
18124         (dfs_clear_vbase_slots): Remove.
18125         (dfs_vtable_path_unmark): New function.
18126         (init_vbase_pointers): Simplify.
18127         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
18128         (expand_indirect_vtbls_init): Simplify.  Don't call
18129         mark_all_temps_used.
18130         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
18131         initialize_vtbl_ptrs.
18133 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
18135         * except.c: Add static prototypes.
18137 2000-05-20  H.J. Lu  <hjl@gnu.org>
18139         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
18141 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
18143         Don't create a separate copy of virtual bases for the
18144         CLASSTYPE_VBASECLASSES list.
18145         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
18146         (BINFO_FOR_VBASE): Remove.
18147         (CANONICAL_BINFO): Adjust.
18148         (binfo_for_vbase): New function.
18149         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
18150         instead of BINFO_FOR_VBASE.
18151         (build_vbase_pointer): Likewise.
18152         (build_secondary_vtable): Likewise.
18153         (dfs_mark_primary_bases): Likewise.
18154         (mark_primary_bases): Likewise.
18155         (layout_nonempty_base_or_field): Likewise.
18156         (dfs_set_offset_for_shared_vbases): Likewise.
18157         (dfs_set_offset_for_unshared_vbases): Likewise.
18158         (layout_virtual_bases): Likewise.  Adjust for changes to the
18159         CLASSTYPE_VBASECLASSES list.
18160         (dump_class_hierarchy_r): Use binfo_for_vbase
18161         instead of BINFO_FOR_VBASE.
18162         (dump_class_hierarchy): Likewise.
18163         (finish_vtbls): Likewise.
18164         (build_vtbl_initializer): Adjust for changes to the
18165         CLASSTYPE_VBASECLASSES list.
18166         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
18167         * decl.c (finish_destructor_body): Adjust for changes to the
18168         CLASSTYPE_VBASECLASSES list.
18169         * init.c (sort_base_init): Use binfo_for_vbase.
18170         (construct_virtual_bases): Adjust for changes to the
18171         CLASSTYPE_VBASECLASSES list.
18172         (expand_member_init): Use binfo_for_vbase.
18173         (build_vbase_delete):  Adjust for changes to the
18174         CLASSTYPE_VBASECLASSES list.
18175         * method.c (do_build_copy_constructor): Likewise.
18176         * rtti.c (get_base_offset): Use binfo_for_vbase.
18177         (expand_class_desc): Remove #if 0'd code.
18178         * search.c (struct vbase_info): Remove vbase_types.
18179         (get_base_distance):  Use binfo_for_vbase.
18180         (lookup_field_queue_p): Use CANONICAL_BINFO.
18181         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
18182         (get_pure_virtuals): Adjust for changes to the
18183         CLASSTYPE_VBASECLASSES list.
18184         (dfs_find_vbases): Use binfo_for_vbase.
18185         (dfs_init_vbase_pointers): Likewise.
18186         (init_vbase_pointers): Don't initialize vi.vbase_types.
18187         (virtual_context): Use binfo_for_vbase.
18188         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
18189         CLASSTYPE_VBASECLASSES list.
18190         (expand_indirect_vtbls_init): Simplify.
18191         (dfs_get_vbase_types): Don't replicate virtual bases.
18192         (find_vbase_instance): Use binfo_for_vbase.
18193         (binfo_for_vbase): New function.
18194         * typeck.c (get_delta_difference): Use binfo_for_vbase.
18196 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
18198         * decl2.c (finish_anon_union): Generalize error messages to handle
18199         anonymous structures.
18200         * init.c (perform_member_init): Remove `name' parameter.
18201         (build_field_list): New function.
18202         (sort_member_init): Handle anonymous union initialization order
18203         correctly.  Check for multiple initializations of the same union.
18204         (emit_base_init): Don't look up fields by name here.
18205         (expand_member_init): Record the result of name lookup for future
18206         reference.
18207         * typeck.c (build_component_ref): Fix formatting.
18209 2000-05-17  Andrew Cagney  <cagney@b1.cygnus.com>
18211         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
18212         * typeck.c (build_x_compound_expr): Replace warn_unused with
18213         warn_unused_value.
18215         * decl2.c (lang_decode_option): Update -Wall unused flags by
18216         calling set_Wunused.
18218 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
18220         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
18221         * init.c (dfs_vtable_path_unmark): Remove.
18222         * search.c (marked_new_vtable_p): Likewise.
18223         (unmarked_new_vtable_p): Likewise.
18224         (dfs_search_slot_nonempty_p): Likewise.
18225         (dfs_mark): Likewise.
18226         (dfs_vtable_path_unmark): Likewise.
18227         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
18228         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
18229         (dfs_init_vbase_pointers): Remove special-case new ABI code.
18230         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
18231         (init_vbase_pointers): Simplify.
18232         (expand_indirect_vtbls_init): Likewise.
18234         * class.c (copy_virtuals): New function.
18235         (build_primary_table): Use it.
18236         (build_secondary_vtable): Likewise.
18237         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
18238         indicate that no vcall offset is required.
18239         (add_virtual_function): Likewise.
18240         (modify_all_vtables): Likewise.
18241         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
18242         (dfs_accumulate_vtbl_inits): Likewise.
18243         (build_vtbl_initializer): Make changes to handle construction
18244         vtables.
18245         (dfs_build_vcall_offset_vtbl_entries): Likewise.
18246         (build_rtti_vtbl_entries): Likewise.
18247         (build_vtable_entries): Handle a NULL vcall_index.
18249 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
18251         * decl2.c (lang_decode_option): Fix thinko.
18253 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
18255         * except.c (check_handlers): New fn.
18256         * cp-tree.h: Declare it.
18257         * semantics.c (finish_handler_sequence): Call it.
18258         (finish_function_handler_sequence): Likewise.
18259         (finish_handler_parms): Set TREE_TYPE on the handler.
18260         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
18261         * search.c (get_base_distance_recursive): If protect>1, ignore
18262         special access.
18263         (get_base_distance): Don't reduce watch_access.
18265 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
18267         * lex.c: #include diagnostic.h.
18268         (lang_init_options): Set default prefixing rules.
18270         * lang-options.h: Add -fdiagnostics-show-location=.
18272         * decl2.c: #include diagnostic.h.
18273         (lang_decode_option): Handle -fdiagnostics-show-location=.
18275 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
18277         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
18278         * vec.cc: Revert my 2000-05-07 change.
18280 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
18282         * class.c (check_field_decls): Complain about non-static data
18283         members with same name as class in class with constructor.
18285 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
18287         * decl.c (grokdeclarator): Allow non-static data members with
18288         same name as class.
18290 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
18292         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
18293         and pending_inline.filename.  Update prototypes.
18294         * decl.c (define_label): Constify filename parameter.
18295         * decl2.c (warn_if_unknown_interface): Constify local char *.
18296         * input.c Constify input_source.filename. Don't declare
18297         input_filename or lineno.  Constify filename parameter to feed_input.
18298         * lex.c (init_parse): Constify parameter and return value.
18299         (cp_pragma_interface, cp_pragma_implementation): Constify
18300         filename argument.
18301         (reinit_parse_for_method, reinit_parse_for_block,
18302         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
18303         Constify local char *.
18304         * pt.c: Don't declare lineno or input_filename.
18305         (print_template_context, tsubst_friend_function, tsubst_decl,
18306         tsubst, instantiate_decl): Constify local char *.
18307         * semantics.c (expand_body): Constify local char *.
18308         * tree.c (build_srcloc): Constify filename parameter.
18309         * typeck.c (c_expand_asm_operands): Constify filename
18310         parameter.
18312 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
18314         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
18315         offsetof expansion.
18317 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
18319         * inc/cxxabi.h:  Fix typos in comment.
18320         (__base_class_info::__offset): Use a static_cast.
18322 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
18324         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
18325         of std::size_t and std::ptrdiff_t respectively.
18326         * tinfo.cc: Likewise.
18327         * vec.cc: Likewise.
18329 2000-05-06  Richard Henderson  <rth@cygnus.com>
18331         * typeck.c (build_c_cast): Don't warn integer->pointer size
18332         mismatch for constants.
18334 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
18336         * rtti.c (ptmd_initializer): Set non-public, if class is
18337         incomplete.
18339         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
18340         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
18341         __cxa_vec_delete): Likewise.
18342         * tinfo.cc (__dynamic_cast): Likewise.
18343         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
18344         __cxa_vec_delete): Likewise.
18346 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
18348         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
18349         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
18350         (lang_decl_flags): Add vcall_offset.
18351         (THUNK_VCALL_OFFSET): Use it.
18352         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
18353         * method.c (make_thunk): Create the lang_decl here, not in
18354         emit_thunk.
18355         (emit_thunk): Make generic thunks into ordinary functions once
18356         they have been fed to expand_body.
18357         * semantics.c (expand_body): Set current_function_is_thunk here.
18359 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18361         * class.c (update_vtable_entry_for_fn): Prototype.
18363         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
18364         and `tmpl'.
18366         * search.c (dfs_build_inheritance_graph_order): Prototype.
18368 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
18370         * cp-tree.h (special_function_kind): Add various kinds of
18371         destructors.
18372         (special_function_p): New function.
18373         * class.c (overrides): Don't let one kind of destructor override
18374         another.
18375         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
18376         whether or not to instantiate a template.
18377         * tree.c (special_function_p): Define.
18379 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
18381         * cp-tree.def (THUNK_DECL): Remove.
18382         * cp-tree.h (DECL_THUNK_P): New macro.
18383         (DECL_NON_THUNK_FUNCTION_P): Likewise.
18384         (DECL_EXTERN_C_FUNCTION_P): Likewise.
18385         (SET_DECL_THUNK_P): Likewise.
18386         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
18387         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
18388         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
18389         * decl.c (decls_match): Use DECL_EXTERN_C_P.
18390         (duplicate_decls): Likewise.
18391         (pushdecl): Likewise.  Adjust thunk handling.
18392         (grokfndecl): Use DECL_EXTERN_C_P.
18393         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
18394         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
18395         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
18396         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
18397         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
18398         DECL_NO_STATIC_CHAIN.
18399         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
18400         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
18401         * search.c (covariant_return_p): Remove THUNK_DECL handling.
18402         * ir.texi: Update.
18404 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
18406         * tree.c (walk_tree): Set lineno.
18408 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
18410         * exception.cc: Update license notice.
18411         * new.cc: Likewise.
18412         * new1.cc: Likewise.
18413         * new2.cc: Likewise.
18414         * tinfo.cc: Likewise.
18415         * tinfo2.cc: Likewise.
18416         * vec.cc: Likewise.
18417         * inc/cxxabi.h: Likewise.
18418         * inc/exception: Likewise.
18419         * inc/new: Likewise.
18420         * inc/new.h: Likewise.
18421         * inc/typeinfo: Likewise.
18423 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
18425         * tree.c (build_target_expr_with_type): If we already have a
18426         TARGET_EXPR, just return it.
18428         * optimize.c (initialize_inlined_parameters): Don't generate an
18429         EXPR_STMT if we can just use DECL_INITIAL.
18430         * decl.c (emit_local_var): Only make the initialization a
18431         full-expression if stmts_are_full_exprs_p.
18433 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
18435         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
18436         macro.
18437         * call.c (standard_conversion): Use it.
18438         (direct_reference_binding): Likewise.
18439         (build_over_call): Likewise.
18440         (is_properly_derived_from): Likewise.
18441         (compare_ics): Likewise.
18442         * class.c (resolves_to_fixed_type_p): Likewise.
18443         * optimize.c (declare_return_variable): Likewise.
18444         * pt.c (is_specialization_of): Likewise.
18445         (unify): Likewise.
18446         * typeck.c (comp_target_parms): Likeiwse.
18447         (build_static_cast): Likewise.
18448         (build_reinterpret_cast): Likewise.
18449         (build_const_cast): Likewise.
18450         (comp_ptr_ttypes_real): Likewise.
18451         (comp_ptr_ttypes_const): Likewise.
18452         * typeck2.c (process_init_constructor): Likewise.
18454 2000-04-30  Scott Snyder <snyder@fnal.gov>
18456         * decl.c (finish_destructor_body): Use the base destructor when
18457         destroying virtual bases.
18459 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
18461         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
18462         STMT_EXPRs.
18463         * optimize.c (struct inline_data): Add target_exprs field.
18464         (declare_return_variable): When a function returns an aggregate,
18465         use the variable declared in the TARGET_EXPR as the remapped
18466         DECL_RESULT.
18467         (expand_call_inline): Update the pending target_exprs stack.
18468         (optimize_function): Initialize the stack.
18470         * decl2.c (finish_file): Fix typo in comment.
18472         * method.c (emit_thunk): Don't try to return a `void' value.
18474         * optimize.c (initialize_inlined_parameters): If the parameter is
18475         addressable, we need to make a new VAR_DECL, even if the
18476         initializer is constant.
18478 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
18480         * decl.c (grok_op_properties): Add an extra check of argtypes.
18482 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
18484         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
18485         variables.
18486         (initialize_inlined_parameters): Try to avoid creating new
18487         VAR_DECLs.
18489 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
18491         * lex.c (my_get_run_time): Remove.
18492         (init_filename_times): Use get_run_time instead of my_get_run_time.
18493         (check_newline): Likewise.
18494         (dump_time_statistics): Likewise.
18495         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
18496         of computing elapsed time explicitly.
18498 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
18500         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
18501         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
18502         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
18503         before calling decl_constant_value.
18504         * class.c (check_bitfield_decl): Likewise.
18505         * cvt.c (ocp_convert): Likewise.
18506         (convert): Likewise.
18507         * decl.c (compute_array_index_type): Likewise.
18508         (build_enumerator): Likewise.
18509         * decl2.c (check_cp_case_value): Likewise.
18510         * pt.c (convert_nontype_argument): Likewise.
18511         (tsubst): Likewise.
18512         * typeck.c (decay_conversion): Likewise.
18513         (build_compound_expr): Likewise.
18514         (build_reinterpret_cast): Likewise.
18515         (build_c_cast): Likewise.
18516         (convert_for_assignment): Likewise.
18518 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
18520         * decl.c (finish_function): Don't play games with DECL_INLINE.
18522 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
18524         * ir.texi: Correct typo.
18526 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
18528         * decl.c (grokdeclarator): Reject VLAs as members.
18530 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
18532         * call.c (standard_conversion): Accept conversion between
18533         COMPLEX_TYPEs.
18535         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
18537 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
18539         * decl2.c (finish_file): Remove double setup for accounting
18540         compile time.
18542 2000-04-24  Robert Lipe <robertlipe@usa.net>
18544         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
18546 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
18548         * new.cc (set_new_handler): Needs to be in std::.
18550 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
18552         * cp-tree.h (lang_decl): Remove pretty_function_p.
18553         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
18554         language-specific node.
18555         * decl.c (cp_make_fname_decl): Use build_decl, not
18556         build_lang_decl, to build the variables.
18557         (grokvardecl): Don't call build_lang_decl for local variables in
18558         templates.
18559         (grokdeclarator): Don't call build_lang_decl for local type
18560         declarations in templates.
18561         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
18562         zero'd memory, rather than calling memset.
18563         * pt.c: Include hashtab.h.
18564         (local_specializations): New variable.
18565         (retrieve_local_specialization): Use it.
18566         (register_local_specialization): Likewise.
18567         (tsubst_decl): Don't assume local variables have
18568         DECL_LANG_SPECIFIC.
18569         (instantiate_decl): Set up local_specializations.
18570         * Makefile.in (HTAB_H): New variable.
18572 2000-04-23  Richard Henderson  <rth@cygnus.com>
18574         * typeck.c (c_expand_asm_operands): Restore the original
18575         contents of the output list.
18577 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
18579         * ir.texi:  Document complex number representation.
18581 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
18583         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
18584         (target_incomplete_p): New function.
18585         (tinfo_base_init): Create comdat NTBS name variable.
18586         (ptr_initializer): Add non_public parameter. Calculate it.
18587         (ptmd_initializer): Likewise.
18588         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
18589         (create_real_tinfo_var): Add non_public parameter. Use it.
18590         Push proxy into global namespace.
18591         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
18592         New enumeration.
18593         * inc/typeinfo (type_info::before, type_info::operator==):
18594         Compare __name addresses.
18596         * tinfo2.cc: Remove new-abi builtins comment.
18598 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
18600         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
18602         * call.c (joust): Exit early if we get the same function, too.
18604         * decl2.c (key_method): Return NULL_TREE for template classes.
18605         (import_export_class): Don't need to check for template classes.
18607 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
18609         * lex.c: Remove references to cccp.c.
18611 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
18613         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
18614         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
18615         (DECL_DESTRUCTOR_P): Use destructor_attr.
18616         (DECL_CONST_MEMFUNC_P): Reimplement.
18617         (DECL_VOLATILE_MEMFUNC_P): Remove.
18618         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
18619         (overrides): Use DECL_DESTRUCTOR_P.
18620         (check_for_override): Likewise.
18621         * decl.c (start_function): Likewise.
18622         * decl2.c (grokfclassfn): Likewise.
18623         (check_classfn): Likewise.
18624         (grok_function_init): Likewise.
18626 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
18628         * decl2.c (grokfield): Issue error on illegal data member
18629         declaration.
18631 2000-04-17  Mark P Mitchell  <mark@codesourcery.com>
18633         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
18635 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
18637         * class.c (build_vtable_entry): Don't build thunks for type-info
18638         functions.
18640 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
18642         * decl.c (decls_match): Allow a redeclaration of a builtin to
18643         specify args while the builtin did not.
18645 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
18647         * cp-tree.def (THUNK_DECL): Add to documentation.
18648         * cp-tree.h (flag_huge_objects): Declare.
18649         * class.c (modify_vtable_entry): Tidy.
18650         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
18651         Calculate delta appropriately for the new ABI.
18652         (dfs_modify_vtables): Use it.
18653         (modify_all_vtables): Fix thinko in code to add overriding copies
18654         of functions to primary vtables.
18655         (build_clone): Fix typo in comment.
18656         (clone_function_decl): Correct order of destructors in vtable.
18657         (build_vbase_offset_vtbl_entries): Adjust comment.
18658         (dfs_vcall_offset_queue_p): Remove.
18659         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
18660         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
18661         (build_vtable_entry): Correct check for pure virtual functions.
18662         Don't declare flag_huge_objects.
18663         * decl.c (flag_huge_objects): Remove declaration.
18664         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
18665         Use int_size_in_bytes.
18666         (emit_thunk): Handle vcall offset thunks.
18668 2000-04-15  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
18670         * decl2.c (parse_time, varconst_time): Delete declarations.
18671         (finish_file): Delete LINENO declaration.
18672         START_TIME and THIS_TIME now long.
18674 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
18676         * class.c (build_base_field): Reformat comment.
18678         * inc/cxxabi.h (stddef.h): Comment inclusion.
18679         (__base_class_info::__offset): Comment shift.
18681 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
18683         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
18684         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
18685         (cp_push_exception_identifier): New macro.
18686         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
18687         (DECL_BASE_DESTRUCTOR_P): Likewise.
18688         (DECL_DELETING_DESTRUCTOR_P): Likewise.
18689         (get_vtbl_decl_for_binfo): Fix formatting.
18690         (in_charge_arg_for_name): New macro.
18691         (maybe_build_cleanup_and_delete): Remove declaration.
18692         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
18693         (in_charge_arg_for_name): New function.
18694         (build_new_method_call): Use it.  Handle cloned destructors.
18695         (build_clone): Don't make the base constructor virtual.
18696         Automatically defer generated functions.
18697         (clone_function_decl): Handle destructors, too.
18698         (clone_constructors_and_destructors): Likewise.
18699         (create_vtable_ptr): Don't create a vtable entry for a cloned
18700         function.
18701         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
18702         (initialize_predefined_identifiers): Update appropriately.
18703         (finish_destructor_body): Simplify.
18704         (maybe_build_cleanup_and_delete): Remove.
18705         * except.c (expand_throw): Handle new-ABI destructors.
18706         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
18707         (build_dtor_call): New function.
18708         (build_delete): Use it.  Simplify.
18709         * optimize.c (maybe_clone_body): Handle destructors.
18710         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
18712         * exception.cc (cleanup_fn): New typedef.
18713         (CALL_CLEANUP): New macro.
18714         (cp_eh_info): Use them.
18715         (__cp_push_exception): Likewise.
18716         (__cp_pop_exception): Likewise.
18718 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
18720         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
18721         (complete_dtor_identifier): New macro.
18722         (CLASSTYPE_FIRST_CONVERSION): Remove.
18723         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
18724         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
18725         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
18726         (CLASSTYPE_CONSTRUCTORS): Likewise.
18727         (CLASSTYPE_DESTRUCTORS): Likewise.
18728         (lang_decl): Add cloned_function.
18729         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
18730         (DECL_BASE_CONSTRUCTOR_P): Likewise.
18731         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
18732         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
18733         (DECL_CLONED_FUNCTION_P): Likewise.
18734         (DECL_CLONED_FUNCTION): Likewise.
18735         (clone_function_decl): Declare.
18736         (maybe_clone_body): Likewise.
18737         * call.c (build_user_type_conversion_1): Call complete object
18738         constructors in the new ABI.
18739         (build_new_method_call): Don't add in-charge parameters under the
18740         new ABI.
18741         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
18742         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
18743         CLASSTYPE_DESTRUCTOR_SLOT.
18744         (build_clone): New function.
18745         (clone_function_decl): Likewise.
18746         (clone_constructors_and_destructors): Likewise.
18747         (check_bases_and_members): Use it.
18748         * decl.c (iniitialize_predefined_identifiers): Initialize
18749         complete_dtor_identifier.
18750         (finish_function): Don't add extra code to a clone.
18751         (lang_mark_tree): Mark cloned_function.
18752         * decl2.c (mark_used): Don't bother trying to instantiate things
18753         we synthesized.
18754         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
18755         * method.c (set_mangled_name_for_decl): Don't treat clones as
18756         constructors.
18757         (synthesize_method): Sythesize cloned functions, not the clones.
18758         * optimize.c (inline_data): Update comment on ret_label.
18759         (remap_block): Don't assume DECL_INITIAL exists.
18760         (copy_body_r): Allow ret_label to be NULL.
18761         (maybe_clone_body): Define.
18762         * pt.c (tsubst_decl): Handle clones.
18763         (instantiate_clone): New function.
18764         (instantiate_template): Use it.
18765         (set_mangled_name_for_template_decl): Don't treat clones as
18766         constructors.
18767         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
18768         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
18769         * semantics.c (expand_body): Clone function bodies as necessary.
18771         * optimize.c (remap_decl): Avoid sharing structure for arrays
18772         whose size is only known at run-time.
18773         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
18775         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
18776         to has_in_charge_parm_p.
18777         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
18778         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
18779         (DECL_COPY_CONSTRUCTOR_P): New macro.
18780         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
18781         (build_user_type_conversion_1): Likewise.
18782         (convert_like_real): Likewise.
18783         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
18784         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
18785         (copy_args_p): Likewise.
18786         (grok_ctor_properties): Likewise.
18787         (start_function): Likewise.
18788         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
18789         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
18790         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
18791         * method.c (do_build_copy_constructor): Use
18792         DECL_HAS_IN_CHARGE_PARM_P.
18793         (synthesize_method): Likewise.
18794         * pt.c (instantiate_template): Remove goto.
18795         * tree.c (build_cplus_method_type): Remove mention of obstacks in
18796         comment.
18798         * cp-tre.h (finish_function): Change prototype.
18799         * decl.c (end_cleanup_fn): Adjust caller.
18800         (finish_function): Take only one parameter.
18801         * decl2.c (finish_objects): Adjust caller.
18802         (finish_static_storage_duration_function): Likewise.
18803         * method.c (emit_thunk): Likewise.
18804         * parse.y: Likewise.
18805         * parse.c: Regenerated.
18806         * pt.c (instantiate_decl): Likewise.
18807         * rtti.c (synthesize_tinfo_fn): Likewise.
18808         * semantics.c (expand_body): Likewise.
18810         * cp-tree.h (copy_decl): New function.
18811         * class.c (finish_struct_1): Use it.
18812         * lex.c (copy_decl): Define it.
18813         * pt.c (tsubst_decl): Likewise.
18814         * tree.c (copy_template_template_parm): Likewise.
18816         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
18817         has_nonpublic_assign_ref.
18818         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
18819         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
18820         * class.c (finish_struct_methods): Don't set
18821         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
18822         (interface_only): Don't declare.
18823         (interface_unknown): Likewise.
18825 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
18827         * tree.h (HAVE_TEMPLATES): Remove definition.
18828         * lang-options.h (-fthis-is-variable): Remove documentation.
18830 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
18832         * class.c (instantiate_type): Handle object-relative template-id.
18834         * semantics.c (finish_expr_stmt): Call convert_to_void here.
18835         * decl.c (cplus_expand_expr_stmt): Not here.
18837         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
18838         Initialize exprtype earlier.
18840         * parse.y (fn.def1): Check for defining types in return types.
18842         * decl.c (check_tag_decl): Notice extra fundamental types.
18843         Diagnose empty decls in classes, too.
18845         * decl.c (grokdeclarator): Don't override an anonymous name if no
18846         declarator was given.
18848         * cvt.c (convert_to_void): Call resolve_offset_ref.
18850         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
18852         * decl2.c (decl_namespace): Handle getting a type.
18854         * typeck.c (build_c_cast): Re-enable warning for cast between
18855         pointer and integer of different size.
18857 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
18859         * inc/cxxabi.h (__pointer_type_info): Add restrict and
18860         incomplete flags.
18861         (__pointer_type_info::__pointer_catch): New virtual function.
18862         (__pointer_to_member_type_info): Derive from
18863         __pointer_type_info. Adjust.
18864         (__pointer_to_member_type_info::__do_catch): Remove.
18865         (__pointer_to_member_type_info::__is_pointer_p): Declare.
18866         (__pointer_to_member_type_info::__pointer_catch): Declare.
18867         * rtti.c (qualifier_flags): Add restrict flag.
18868         (ptmd_initializer): Reorder members.
18869         (create_tinfo_types): Expand comments. Reorder
18870         ptmd_desc_type_node members.
18871         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
18872         Implement.
18873         (__pointer_type_info::__do_catch): Move specific code into
18874         __pointer_catch. Call it.
18875         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
18876         specific catch checking. Fix void conversion check.
18877         (__pointer_to_member_type_info::__do_catch): Remove.
18878         (__pointer_to_member_type_info::__pointer_catch): Implement.
18880 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
18882         * lex.c (init_parse): Remove traces of classof and headof.
18883         * decl2.c (flag_operator_names): Default to 1.
18884         (lang_decode_option): Do not set it for -ansi.
18886 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
18888         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
18889         (DECL_MAIN_VARIANT): Remove.
18890         * decl.c (duplicate_decls): Don't set it.
18891         (start_function): Likewise.
18892         (lang_mark_tree): Don't mark it.
18893         * decl2.c (defer_fn): Don't use it.
18894         * lex.c (retrofit_lang_decl): Don't set it.
18895         * pt.c (tsubst_decl): Likewise.
18896         * ptree.c (print_lang_decl): Don't print it.
18897         * typeck.c (mark_addressable): Don't use it.
18899 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
18901         * vec.cc: Include <new> and <exception>.
18902         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
18903         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
18904         terminate.
18905         (__cxa_vec_delete): Catch dtor exceptions.
18907 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
18909         Prepend __ to implementation defined names.
18910         * inc/typeinfo (type_info): Rename _name to __name.
18911         (type_info::type_info): Rename parameter.
18912         (type_info::operator==, type_info::operator!=,
18913         type_info::before): Likewise.
18914         (type_info::is_pointer_p, type_info::is_function_p,
18915         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
18916         parameters.
18917         * inc/cxxabi.h
18918         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
18919         (__pointer_type_info::__pointer_type_info): Likewise.
18920         (__pointer_type_info::is_pointer_p,
18921         __pointer_type_info::do_catch): Prepend __. Rename parameters.
18922         (__array_type_info::__array_type_info): Rename parameters.
18923         (__function_type_info::__function_type_info): Likewise.
18924         (__function_type_info::is_function_p): Prepend __.
18925         (__enum_type_info::__enum_type_info): Rename parameters.
18926         (__pointer_to_member_type_info::__pointer_to_member_type_info):
18927         Likewise.
18928         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
18929         parameters.
18930         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
18931         (__class_type_info::__class_type_info): Rename parameters.
18932         (__class_type_info::sub_kind): Prepend __. Adjust member names.
18933         (__class_type_info::upcast_result,
18934         __class_type_info::dyncast_result): Prepend __. Move definition
18935         into tinfo.cc.
18936         (__class_type_info::do_upcast, __class_type_info::do_catch,
18937         __class_type_info::find_public_src,
18938         __class_type_info::do_dyncast,
18939         __class_type_info::do_find_public_src): Prepend __. Rename
18940         parameters.
18941         (__si_class_type_info::__si_class_type_info): Rename parameters.
18942         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
18943         __si_class_type_info::do_find_public_src): Prepent __. Rename
18944         parameters.
18945         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
18946         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
18947         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
18948         parameters.
18949         (__dynamic_cast): Rename parameters.
18950         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
18951         type_info::do_catch, type_info::do_upcast): Prepend __.
18952         (contained_p, public_p, virtual_p, contained_public_p,
18953         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
18954         (__class_type_info::do_catch,
18955         __class_type_info::do_upcast): Prepend __. Adjust.
18956         (__class_type_info::__upcast_result,
18957         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
18958         Adjust.
18959         (__class_type_info::find_public_src): Prepend __. Adjust.
18960         (__class_type_info::do_find_public_src,
18961         __si_class_type_info::do_find_public_src,
18962         __vmi_class_type_info::do_find_public_src): Likewise.
18963         (__class_type_info::do_dyncast,
18964         __si_class_type_info::do_dyncast,
18965         __vmi_class_type_info::do_dyncast): Likewise.
18966         (__class_type_info::do_upcast,
18967         __si_class_type_info::do_upcast,
18968         __vmi_class_type_info::do_upcast): Likewise.
18969         (__dynamic_cast): Adjust.
18970         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
18971         (__function_type_info::is_function_p): Likewise.
18972         (__pointer_type_info::do_catch): Likewise. Adjust.
18973         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
18974         (__throw_type_match_rtti_2): Adjust.
18975         (__is_pointer): Adjust.
18977 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
18979         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
18980         (complete_ctor_identifier): New macro.
18981         (special_function_kind): Add sfk_copy_constructor and
18982         sfk_assignment_operator.
18983         (LOOKUP_HAS_IN_CHARGE): Remove.
18984         (cons_up_default_function): Rename to ...
18985         (implicitly_declare_fn): ... this.
18986         * call.c (build_new_method_call): Add in-charge parameters for
18987         constructors here.
18988         * class.c (add_implicitly_declared_members): Change parameter name
18989         from cant_have_assignment to cant_have_const_assignment.
18990         Replace calls to cons_up_default_function to implicitly_declare_fn.
18991         * cvt.c (ocp_convert): Use complete_ctor_identifier.
18992         * decl.c (initialize_predefined_identifiers): Initialize it.
18993         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
18994         complex expression.
18995         * init.c (expand_default_init): Don't calculate the in-charge
18996         parameter here.
18997         (build_new_1): Likewise.
18998         * lex.c (cons_up_default_function): Move to method.c.
18999         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
19000         (implicitly_declare_fn): New function.
19001         * typeck.c (build_static_cast): Use complete_ctor_identifier.
19002         (build_modify_expr): Likewise.
19003         * typeck2.c (build_functional_cast): Likewise.
19005         Under the new ABI, constructors don't return `this'.
19006         * cp-tree.h (warn_reorder): Declare.
19007         (special_function_kind): New enum.
19008         (global_base_init_list): Remove declaration.
19009         (emit_base_init): Don't return a value.
19010         (check_base_init): Don't declare.
19011         (is_aggr_typedef): Likewise.
19012         * decl.c (check_special_function_return_type): New function.
19013         (return_types): Remove.
19014         (grokdeclarator): Use check_special_function_return_type.
19015         (start_function): Don't initialize ctor_label under the new ABI.
19016         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
19017         * init.c (begin_init_stmts): Move to top of file.
19018         (finish_init_stmts): Likewise.
19019         (warn_reorder): Don't declare.
19020         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
19021         value.
19022         (check_base_init): Remove.
19023         (is_aggr_typedef): Likewise.
19024         (build_new_1): Don't use the return value of a constructor.
19025         * semantics.c (setup_vtbl_ptr): Don't use the return value
19026         of emit_base_init.
19027         * typeck.c (check_return_expr): Don't magically convert return
19028         statements into `return this' in constructors under the new ABI.
19030         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
19031         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
19032         (base_ctor_identifier): New macro.
19033         (base_dtor_identifier): Likewise.
19034         (deleting_dtor_identifier): Likewise.
19035         * decl.c: Don't include obstack.h.
19036         (obstack_chunk_alloc): Don't define.
19037         (obstack_chunk_free): Likewise.
19038         (struct predefined_identifier): New type.
19039         (initialize_predefined_identifiers): New function.
19040         (init_decl_processing): Use it.
19041         (debug_temp_inits): Remove.
19042         (start_method): Don't call preserve_data.
19043         (hack_incomplete_structures): Update comment.
19044         * init.c (init_init_processing): Don't initialize
19045         nelts_identifier.
19046         (build_offset_rf): Remove dead code.
19047         (build_delete): Use CLASSTYPE_N_BASECLASSES.
19048         * search.c (init_search_processing): Don't initialize
19049         vptr_identifier.
19051 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
19053         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
19054         some sign_compare warnings.
19056 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
19058         Rename abi::__vmi_class_type_info members.
19059         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
19060         base_list, detail_masks members to vmi_flags, vmi_base_count,
19061         vmi_bases and vmi_flags_masks respectively.
19062         (__vmi_class_type_info::vmi_flags_masks): Rename
19063         details_unknown_mask to flags_unknown_mask.
19064         * tinfo.cc (__class_type_info::do_upcast): Adjust.
19065         (__vmi_class_type_info::do_find_public_src): Adjust.
19066         (__vmi_class_type_info::do_dyncast): Adjust.
19067         (__vmi_class_type_info::do_upcast): Adjust.
19069 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
19071         * tinfo.cc (convert_to_base): New function.
19072         (get_vbase_offset): Remove. Move into convert_to_base.
19073         (__vmi_class_type_info::do_find_public_src): Adjust.
19074         (__vmi_class_type_info::do_dyncast): Adjust.
19075         (__vmi_class_type_info::do_upcast): Adjust.
19077 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
19079         * tinfo.cc (operator=): Use __builtin_strcmp.
19080         * tinfo2.cc (before): Likewise.
19082 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
19084         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
19085         (DECL_SAVED_INLINE): Rename to ...
19086         (DECL_DEFERRED_FN): ... this.
19087         (in_function_p): Remove declaration.
19088         (mark_inline_for_output): Rename to ...
19089         (defer_fn): ... this.
19090         * decl.c (finish_function): Adjust call to mark_inline_for_output.
19091         (in_function_p): Remove definition.
19092         * decl2.c (saved_inlines): Rename to ...
19093         (deferred_fns): ... this.
19094         (saved_inlines_used): Rename to ...
19095         (deferred_fns_used): ... this.
19096         (mark_inline_for_output): Rename to ...
19097         (defer_fn): ... this.
19098         (finish_file): Adjust accordingly.
19099         (init_decl2): Likewise.
19100         * lex.c (cons_up_default_function): Likewise.
19101         * pt.c (mark_decl_instantiated): Likewise.
19102         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
19103         circumstances.
19104         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
19105         * semantics.c (expand_body): Defer more functions.
19107 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
19109         * vec.cc: New file.
19110         * Make-lang.in (CXX_LIB2FUNCS): Add it.
19111         (vec.o): Build it.
19112         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
19113         __cxa_vec_delete): Declare.
19115 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
19117         * rtti.c (dfs_class_hint_mark): New static function.
19118         (dfs_class_hint_unmark): New static function.
19119         (class_hint_flags): Use them.
19121 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
19123         * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
19125 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
19127         * cp-tree.h (instantiate_decl): Change prototype.
19128         * decl2.c (mark_used): Adjust call.
19129         * optimize.c (inlinable_function_p): Adjust handling of templates.
19130         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
19131         (do_type_instantiation): Likewise.
19132         (instantiate_decl): Defer more templates.
19133         (instantiate_pending_templates): Adjust logic to handle inline
19134         friend functions.
19136         * Makefile.in (GGC_H): New variable.  Use it throughout in place
19137         of ggc.h.
19139         * call.c: Don't include obstack.h.  Include ggc.h.
19140         (obstack_chunk_alloc): Don't define.
19141         (obstack_chunk_free): Likewise.
19142         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
19143         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
19144         (pop_switch): Free it.
19146         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
19148         * dump.c (dequeue_and_dump): Don't try to print the bit_position
19149         if we don't have a DECL_FIELD_OFFSET.
19151 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
19153         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
19154         special_function_p.
19156 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
19158         * cfns.gperf (hash, libc_name_p): Prototype.
19160         * rtti.c (build_dynamic_cast_1): Constification.
19162         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
19164         * semantics.c (deferred_type_access_control): Prototype.
19166 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
19168         Correct many new ABI issues regarding vbase and vcall offset
19169         layout.
19170         * cp-tree.h (BINFO_VTABLE): Document.
19171         (struct lang_type): Tweak formatting.
19172         (BINFO_PRIMARY_BINFO): Add to documentation.
19173         (CLASSTYPE_VSIZE): Fix typo in comment.
19174         (CLASSTYPE_VBASECLASSES): Update documentation.
19175         (BINFO_VBASE_MARKED): Remove.
19176         (SET_BINFO_VBASE_MARKED): Likewise.
19177         (CLEAR_BINFO_VBASE_MARKED): Likewise.
19178         (BINFO_FIELDS_MARKED): Remove.
19179         (SET_BINFO_FIELDS_MARKED): Likewise.
19180         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
19181         (enum access_kind): New enumeration.
19182         (num_extra_vtbl_entries): Remove declaration.
19183         (size_extra_vtbl_entries): Likewise.
19184         (get_vtbl_decl_for_binfo): New function.
19185         (dfs_vbase_unmark): Remove declaration.
19186         (mark_primary_bases): Likewise.
19187         * class.c (SAME_FN): Remove.
19188         (struct vcall_offset_data_s): Move definition.
19189         (build_vbase_pointer): Use `build', not `build_binary_op', to
19190         access the vbase pointer under the new ABI.
19191         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
19192         (build_primary_vtable): Likewise.
19193         (dfs_mark_primary_bases): Move here from search.c.
19194         (mark_primary_bases): Likewise.
19195         (determine_primary_bases): Under the new ABI, don't make a base
19196         class a primary base just because we don't yet have any virtual
19197         functions.
19198         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
19199         (num_vfun_entries): Remove.
19200         (dfs_count_virtuals): Likewise.
19201         (num_extra_vtbl_entries): Likewise.
19202         (size_extra_vtbl_entries): Likewise.
19203         (layout_virtual_bases): Iterate in inheritance graph order under
19204         the new ABI.
19205         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
19206         indicate that a vfield is present.
19207         (init_class_processing): Initialize access_public_node, etc., from
19208         ak_public, etc.
19209         (get_vtbl_decl_for_binfo): New function.
19210         (dump_class_hierarchy_r): Likewise.
19211         (dump_class_hierarchy): Use it.
19212         (finish_vtbls): Build the vtbls in inheritance graph order.
19213         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
19214         (initialize_vtable): Use get_vtbl_decl_for_binfo.
19215         (accumulate_vtbl_inits): Add comments explaining why a pre-order
19216         walk is required.
19217         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
19218         where the vptr points, even for primary vtables.
19219         (build_vtbl_initializer): Adjust handling of vbase and vcall
19220         offsets.
19221         (build_vcall_and_vbase_vtable_entries): New function.
19222         (dfs_build_vbase_offset_vtbl_entries): Remove.
19223         (build_vbase_offset_vtbl_entries): Reimplement.
19224         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
19225         were already handled in a primary base class vtable.
19226         (build_vcall_offset_vtbl_entries): Adjust.
19227         (build_rtti_vtbl_entries): Adjust.
19228         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
19229         * init.c (expand_virtual_init): Simplify.
19230         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
19231         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
19232         * search.c (BINFO_ACCESS): New macro.
19233         (SET_BINFO_ACCESS): Likewise.
19234         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
19235         (access_in_type): Likewise.
19236         (dfs_accessible_p): Likewise.
19237         (protected_accessible_p): Likewise.
19238         (lookup_fnfields_1): Adjust documentation.
19239         (dfs_mark_primary_bases): Move to class.c
19240         (mark_primary_bases): Likewise.
19241         (dfs_vbase_unmark): Remove.
19242         (virtual_context): Use BINFO_FOR_VBASE.
19243         (dfs_get_vbase_types): Simplify.
19244         (dfs_build_inheritance_graph_order): New function.
19245         (get_vbase_types): Use it.
19246         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
19248         * tinfo.cc (get_vbase_offset): New function.
19249         (__vmi_class_type_info::do_find_public_src): Use it.
19250         (__vmi_class_type_info::do_dyncast): Likewise.
19251         (__vmi_class_type_info::do_upcast): Likewise.
19253 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
19255         * lang-specs.h: Pass -fno-show-column to the preprocessor.
19257 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
19259         * rtti.c (class_hint_flags): Rename flags.
19260         (class_initializer): Remove flags.
19261         (synthesize_tinfo_var): Combine offset and flags. Add flags
19262         for __vmi_class_type_info.
19263         (create_tinfo_types): Remove flags from __class_type_info and
19264         __si_class_type_info. Merge flags and offset from
19265         base_class_type_info.
19266         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
19267         (__base_class_info::is_virtual_p): Adjust.
19268         (__base_class_info::is_public_p): Adjust.
19269         (__base_class_info::offset): New accessor.
19270         (__class_type_info::details): Remove member.
19271         (__class_type_info::__class_type_info): Lose details.
19272         (__class_type_info::detail_masks): Remove.
19273         (__si_class_type_info::__si_class_type_info): Lose details.
19274         (__vmi_class_type_info::details): New member.
19275         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
19276         (__vmi_class_type_info::detail_masks): New member.
19277         * tinfo.cc (__class_type_info::do_upcast): Initialize result
19278         with unknown_details_mask.
19279         (__vmi_class_type_info::do_find_public_src): Adjust
19280         (__vmi_class_type_info::do_dyncast): Adjust.
19281         (__vmi_class_type_info::do_upcast): Set result details, if
19282         needed. Adjust.
19283         (__dynamic_cast): Temporarily #if out optimization.
19285 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
19287         * rtti.c (get_tinfo_decl): Mark used.
19288         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
19289         mark as dealt with, if we output it.
19291 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
19293         * class.c: Reorganize to put virtual function table initialization
19294         machinery at the end of the file.
19296 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
19298         * class.c (finish_struct): Use bitsize_zero_node.
19299         * pt.c (instantiate_class_template): Likewise.
19301 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
19303         Put RTTI entries at negative offsets in new ABI.
19304         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
19305         vbase offset at index -3, not -1.
19306         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
19307         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
19308         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
19309         (build_rtti_vtbl_entries): New function.
19310         (set_rtti_entry): Remove.
19311         (build_primary_vtable): Don't use it.
19312         (build_secondary_vtable): Likewise.
19313         (start_vtable): Remove.
19314         (first_vfun_index): New function.
19315         (set_vindex): Likewise.
19316         (add_virtual_function): Don't call start_vtable.  Do call
19317         set_vindex.
19318         (set_primary_base): Rename parameter.
19319         (determine_primary_base): Likewise.
19320         (num_vfun_entries): Don't use skip_rtti_stuff.
19321         (num_extra_vtbl_entries): Include RTTI information.
19322         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
19323         (skip_rtti_stuff): Remove.
19324         (dfs_modify_vtables): Don't use it.
19325         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
19326         (layout_nonempty_base_or_field): Update size handling.
19327         (create_vtable_ptr): Tweak.
19328         (layout_class_type): Adjust parameter names.
19329         (finish_struct_1): Simplify.
19330         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
19331         (skip_rtti_stuff): Remove.
19332         (first_vfun_index): New function.
19333         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
19334         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
19335         (marked_vtable_pathp): Declare.
19336         (unmarked_vtable_pathp): Likewise.
19337         * error.c (dump_expr): Use first_vfun_index to calculate vtable
19338         offsets.
19339         * rtti.c (build_headof): Look for RTTI at negative offsets.
19340         (get_tinfo_decl_dynamic): Likewise.
19341         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
19342         here.
19343         (create_pseudo_type_info): Do it here instead.  Adjust so that
19344         vptr points at first virtual function.
19345         * search.c (marked_vtable_pathp): Make it global.
19346         (unmarked_vtable_pathp): Likewise.
19347         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
19348         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
19349         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
19350         (get_pure_virtuals): Likewise.
19351         (expand_upcast_fixups): Likewise.
19352         * tree.c (debug_binfo): Likewise.
19353         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
19354         negative offset.
19356 2000-03-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19358         * class.c (check_field_decl): Fix typo.
19359         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
19360         (check_methods): Likewise.
19361         (check_field_decls): Likewise.
19362         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
19363         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
19364         Use DECL_RESULT_FLD, not DECL_RESULT.
19365         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
19366         * lex.c (identifier_type): Likewise.
19367         * pt.c (determine_specialization, lookup_template_class): Likewise.
19368         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
19369         (resolve_overloaded_unification, more_specialized): Likewise.
19370         * semantics.c (finish_member_declaration): Likewise.
19371         * typeck.c (build_x_function_call): Likewise.
19373 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
19375         * class.c (layout_empty_base): Handle empty bases with non-byte
19376         alignment.
19377         (build_base_field): Likewise.
19378         (layout_virtual_bases): Likewise.
19380         * class.c (finish_struct_1): Fix typo in this change:
19382         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19384 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
19386         * decl.c (grokdeclarator): Count partial specializations when
19387         keeping track of how many template classes have been seen.
19389         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
19391 2000-03-25  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19393         * class.c (build_vbase_pointer_fields): layout_field now place_field.
19394         (get_vfield_offset): Use byte_position.
19395         (set_rtti_entry): Set OFFSET to ssizetype zero.
19396         (get_binfo_offset_as_int): Deleted.
19397         (dfs_record_base_offsets): Use tree_low_cst.
19398         (dfs_search_base_offsets): Likewise.
19399         (layout_nonempty_base_or_field): Reflect changes in RLI format
19400         and call byte_position.
19401         (layout_empty_base): Convert offset to ssizetype.
19402         (build_base_field): use rli_size_unit_so_far.
19403         (dfs_propagate_binfo_offsets): Do computation in proper type.
19404         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
19405         (layout_class_type): Reflect changes in RLI names and fields.
19406         (finish_struct_1): Set DECL_FIELD_OFFSET.
19407         * dump.c (dequeue_and_dump): Call bit_position.
19408         * expr.c (cplus_expand_constant): Use byte_position.
19409         * rtti.c (expand_class_desc): Use bitsize_one_node.
19410         * typeck.c (build_component_addr): Use byte_position and don't
19411         special case for zero offset.
19413 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
19415         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
19417         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
19418         tinfo object.
19419         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
19420         vtable.
19422 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
19424         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
19425         DECL_P macros.
19426         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
19427         make_typename_type, check_initializer, cp_finish_decl,
19428         xref_tag): Likewise.
19429         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
19430         decl_namespace, arg_assoc_template_arg, arg_assoc,
19431         validate_nonmember_using_decl, do_class_using_decl): Likewise.
19432         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
19433         args_to_string): Likewise.
19434         * friend.c (is_friend): Likewise.
19435         * lex.c (note_got_semicolon, note_list_got_semicolon,
19436         is_global): Likewise.
19437         * method.c (build_overload_nested_name, build_overload_value,
19438         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
19439         * parse.y (typename_sub, typename_sub1): Likewise.
19440         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
19441         process_partial_specialization, convert_template_argument,
19442         template_args_equal, add_pending_template, lookup_template_class,
19443         for_each_template_parm_r, maybe_fold_nontype_arg,
19444         tsubst, instantiate_template, type_unification_real, unify,
19445         instantiate_pending_templates, set_mangled_name_for_template_decl):
19446         Likewise.
19447         * repo.c (repo_get_id, repo_template_used): Likewise.
19448         * search.c (lookup_field_1): Likewise.
19449         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
19450         * xref.c (classname): Likewise.
19452 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
19454         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
19455         (CANONICAL_BINFO): New macro.
19456         (BINFO_NEW_VTABLE_MARKED): Use it.
19457         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
19458         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
19459         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
19460         not TREE_TYPE.
19461         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
19462         (build_secondary_vtable): Likewise.
19463         (dfs_finish_vtbls): Likewise.
19464         (dfs_accumulate_vtbl_inits): Likewise.
19465         (accumulate_vtbl_inits): New function.
19466         (finish_vtbls): Make sure that virtual bases come after
19467         non-virtual bases in the vtable group.
19468         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
19469         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
19470         * search.c (struct vbase_info): Move definition.
19471         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
19472         (unmarked_new_vtable_p): Likewise.
19473         (dfs_mark_vtable_path): Remove.
19474         (dfs_mark_new_vtable): Remove.
19475         (dfs_unmark_new_vtable): Likewise.
19476         (dfs_clear_search_slot): Likewise.
19477         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
19478         (dfs_clear_vbase_slots): Likewise.
19479         (init_vbase_pointers): LIkewise.
19481 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
19483         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
19484         SIZETYPE to a non-SIZETYPE.
19486 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
19488         * class.c (layout_virtual_bases): Adjust names in conditionally
19489         compiled code.
19491         * class.c (record_base_offsets): New function.
19492         (layout_conflict_p): Likewise.
19493         (layout_nonempty_base_or_field): Use it.
19494         (layout_empty_base): New function.
19495         (build_base_field): Use it.
19496         (build_base_fields): Update comment.
19497         (layout_virtual_bases): Fold in a little code form
19498         layout_basetypes.  Use layout_empty_base.
19499         (layout_basetypes): Remove.
19500         (end_of_class): New function.
19501         (layout_class_type): Use it.  Adjust.
19503         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
19504         (fntype_p): Remove.
19505         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
19506         comment.
19507         (dfs_skip_nonprimary_vbases_markedp): Likewise.
19508         * typeck.c (fntype_p): Remove.
19510         * cp-tree.h (TI_SPEC_INFO): Remove.
19511         (CLASSTYPE_TI_SPEC_INFO): Likewise.
19512         * pt.c (process_partial_specialization): Likewise.
19514         * class.c (build_base_field): Fix thinko in computation of binfo
19515         offsets.
19517         * tree.c (mark_local_for_remap_p): Mark variables declared in
19518         TARGET_EXPRs as well.
19520 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
19522         * typeck.c (require_complete_type, complete_type,
19523         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
19524         build_array_ref, convert_arguments, pointer_diff,
19525         build_x_unary_op, build_unary_op, build_c_cast,
19526         build_modify_expr): Use COMPLETE_TYPE_P etc.
19527         * call.c (is_complete, convert_like_real,
19528         build_new_method_call): Likewise.
19529         * class.c (build_vbase_pointer_fields, check_bases,
19530         build_base_field, finish_struct_1, pushclass): Likewise.
19531         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
19532         * decl.c (maybe_process_template_type_declaration, pushtag,
19533         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
19534         layout_var_decl, check_initializer, cp_finish_decl,
19535         grokdeclarator, require_complete_types_for_parms,
19536         grok_op_properties, xref_tag, xref_basetypes,
19537         check_function_type): Likewise.
19538         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
19539         * friend.c (do_friend): Likewise.
19540         * init.c (build_offset_ref): Likewise.
19541         * parse.y (structsp): Likewise.
19542         * pt.c (maybe_process_partial_specialization,
19543         tsubst_friend_function, instantiate_class_template, tsubst,
19544         do_type_instantiation, instantiate_pending_templates): Likewise.
19545         * repo.c (repo_get_id): Likewise.
19546         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
19547         synthesize_tinfo_var, emit_support_tinfos): Likewise.
19548         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
19549         * semantics.c (begin_class_definition): Likewise.
19550         * tree.c (build_cplus_method_type): Likewise.
19551         * typeck2.c (digest_init, build_functional_cast,
19552         add_exception_specifier): Likewise.
19553         * parse.h, parse.c: Regenerated.
19555 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
19557         * inc/cxxabi.h: New header file. Define new-abi entry points.
19558         (__pointer_type_info::target): Rename member to ...
19559         (__pointer_type_info::type): ... here.
19560         (__base_class_info::type): Rename member to ...
19561         (__base_class_info::base): ... here.
19562         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
19563         * cp-tree.h (CPTI_ABI): New global tree enumeration.
19564         (abi_node): New global tree node.
19565         * decl.c (abi_node): Document.
19566         (init_decl_processing): Initialize abi_node.
19567         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
19568         (get_vmi_pseudo_type_info): Likewise.
19569         (create_tinfo_types): Likewise.
19570         (emit_support_tinfos): Likewise.
19571         * tinfo.h (cxxabi.h): Include for new-abi.
19572         Move rtti class definitions to new header file.
19573         * tinfo.cc (abi): Use the namespace.
19574         (std): Move new abi rtti classes from here ...
19575         (__cxxabiv1): ... to here.
19576         * tinfo2.cc (cxxabi.h): Include for new-abi.
19577         Move rtti class definitions to new header file.
19578         (std): Move new abi rtti classes from here ...
19579         (__cxxabiv1): ... to here.
19580         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
19581         namespace.
19583 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
19584             Jason Merrill  <jason@casey.cygnus.com>
19586         * method.c (build_overload_int): Use host_integerp.
19588 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
19590         * init.c (build_offset_ref): Handle the case of a templated member
19591         function.
19593 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
19595         * except.c (expand_exception_blocks): Clear catch_clauses_last.
19597 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
19599         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
19600         * class.c (check_bitfield_decl): Turn illegal bitfields into
19601         non-bitfields.
19602         (dfs_propagate_binfo_offsets): Adjust for new size_binop
19603         semantics.
19604         (dfs_offset_for_unshared_vbases): Likewise.
19605         * cvt.c (cp_convert_to_pointer): Convert NULL to a
19606         pointer-to-member correctly under the new ABI.
19607         * expr.c (cplus_expand_constant): Don't use cp_convert when
19608         turning an offset into a pointer-to-member.
19609         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
19610         when dereferencing them under the new ABI.
19611         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
19612         of pointers-to-members under the new ABI.
19614         * class.c (check_bitfield_decl): Remove restriction on really long
19615         bitfields.
19616         (layout_class_type): Implement new ABI handling of bitfields
19617         longer than their types.
19619 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
19621         * parse.y (extdefs): Call ggc_collect.
19622         * parse.c: Regenerated.
19624 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
19626         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
19627         (note_name_declared_in_class): Use OVL_CURRENT to get at a
19628         potential overload.
19630 2000-03-17  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19632         * class.c (build_vbase_path): Use integer_zerop.
19633         (build_vtable_entry): Use tree_low_cst.
19634         (get_vfield_offset): Use bit_position.
19635         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
19636         Use tree_low_cst.
19637         (check_bitfield_decl): Set DECL_SIZE using convert.
19638         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
19639         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
19640         Use tree_low_cst.
19641         (finish_struct_1): Use bit_position.
19642         (dump_class_hierarchy): Use tree_low_cst.
19643         * cp-tree.h (min_precision): Add declaration.
19644         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
19645         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
19646         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
19647         * expr.c (cplus_expand_constant): Use bit_position.
19648         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
19649         * rtti.c (get_base_offset): Use bit_position.
19650         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
19651         host_integerp, and tree_low_cst.
19652         (pointer_int_sum): Use integer_zerop.
19653         (build_component_addr): Use bit_position.
19655 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
19657         * typeck.c (require_complete_type): Don't assume size_zero_node.
19658         (complete_type_or_else): Likewise.
19660 2000-03-16  Steven Grady <grady@digitaldeck.com>
19661             Jason Merrill  <jason@casey.cygnus.com>
19663         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
19665 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
19667         * decl2.c (grokfield): Bail out if type is error_mark_node.
19669 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
19671         * tinfo2.cc (__ptr_to_member_data): Rename to ...
19672         (__pointer_to_member_data): ... here. Adjust.
19673         * rtti.c (create_tinfo_types): Adjust.
19675 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
19677         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
19678         * decl.c (ref_desc_type_node): Undocument.
19679         * rtti.c (ptr_ref_initializer): Rename to ...
19680         (ptr_initializer): ... here. Adjust comments.
19681         (ptmd_initializer): Fix comment thinko.
19682         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
19683         (create_tinfo_types): Remove ref_desc_type_node init.
19684         * tinfo2.cc (__reference_type_info): Remove.
19686 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
19688         * decl.c (cp_finish_decl): Remove obsolete comment.
19690         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
19692 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
19694         * cp-tree.h: Tweak documentation.
19695         * class.c (build_vbase_pointer_fields): Layout the fields, too.
19696         (avoid_overlap): Remove.
19697         (get_binfo_offset_as_int): New function.
19698         (dfs_serach_base_offsets): Likewise.
19699         (layout_nonempty_base_or_field): Likewise.
19700         (build_base_field): Layout fields here.  Avoid placing two objects
19701         of the same type at the same address, under the new ABI.
19702         (build_base_fields): Adjust accordingly.
19703         (create_vtable_ptr): Return the new field, but don't attach it to
19704         TYPE_FIELDS.
19705         (remove_base_field): Remove.
19706         (remove_base_fields): Remove.
19707         (layout_basetypes): Adjust accordingly.
19708         (layout_class_type): Call layout_field for each field, rather than
19709         just making a wholesale call to layout_type.
19711 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
19713         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
19715 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
19717         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
19719         * except.c (dtor_nothrow): New fn.
19720         (do_pop_exception): Use it.  Take type parm.
19721         (push_eh_cleanup): Take type parm.
19722         (expand_start_catch_block): Pass it.
19723         (build_eh_type_type_ref): Accept null type.
19725 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
19727         * cp-tree.h (revert_static_member_fn): Change prototype.
19728         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
19729         (grok_op_properties): Likewise.
19730         (start_function): Likewise.
19731         (revert_static_member_fn): Simplify.
19732         * pt.c (check_explicit_specialization): Adjust call to
19733         revert_static_member_fn.
19735 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
19737         * cp-tree.h (scope_kind): New type.
19738         (tmpl_spec_kind): Likewise.
19739         (declare_pseudo_global_level): Remove.
19740         (pseudo_global_level_p): Rename to template_parm_scope_p.
19741         (pushlevel): Remove declaration.
19742         (begin_scope): New function.
19743         (finish_scope): Likewise.
19744         (current_tmpl_spec_kind): Likewise.
19745         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
19746         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
19747         Add template_spec_p.
19748         (toplevel_bindings_p): Adjust.
19749         (declare_pseudo_global_level): Remove.
19750         (pseudo_global_level_p): Rename to template_parm_scope_p.
19751         (current_tmpl_spec_kind): New function.
19752         (begin_scope): Likewise.
19753         (finish_scope): Likewise.
19754         (maybe_push_to_top_level): Adjust.
19755         (maybe_process_template_type_declaration): Likewise.
19756         (pushtag): Likewise.
19757         (pushdecl_nonclass_level): Likewise.
19758         (lookup_tag): Likewise.
19759         (grokfndecl): Handle member template specializations.  Share
19760         constructor and non-constructor code.
19761         * decl2.c (check_classfn): Handle member template specializations.
19762         * pt.c (begin_template_parm_list): Use begin_scope.
19763         (begin_specialization): Likewise.
19764         (end_specialization): Likewise.
19765         (check_explicit_specialization): Use current_tmpl_spec_kind.
19766         Handle member template specializations.
19767         (end_template_decl): Use finish_scope.  Remove call to
19768         get_pending_sizes.
19769         (push_template_decl_real): Remove bogus error message.
19770         (tsubst_decl): Fix typo in code contained in comment.
19771         (instantiate_template): Handle member template specializations.
19772         (most_general_template): Likewise.
19774 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
19776         * lex.c (whitespace_cr): Compress consecutive calls to warning().
19777         (do_identifier): Ditto for error().
19779         * pt.c (convert_nontype_argument): Ditto for cp_error().
19780         (convert_template_argument): Ditto for cp_pedwarn().
19782 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
19784         * exception.cc (__check_null_eh_spec): New fn.
19785         * except.c (expand_end_eh_spec): Call it if the spec is throw().
19787 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
19789         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
19790         * except.c (expand_end_eh_spec): Add the return type.
19791         * rtti.c (throw_bad_cast): Add the parmtypes.
19792         (throw_bad_typeid): Likewise.
19794         * semantics.c (expand_stmt): Only leave out rtl for unused
19795         artificials, and set DECL_IGNORED_P on them as well.
19796         * decl.c (wrapup_globals_for_namespace): Likewise.
19798 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
19800         * decl.c (maybe_commonize_var): Skip all artificial decls.
19801         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
19803 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
19805         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
19806         * cp-tree.h: Declare flag_enforce_eh_specs.
19807         * decl.c (store_parm_decls, finish_function): Check it.
19809         C library functions don't throw.
19810         * Makefile.in (cfns.h): New target.
19811         (except.o): Depend on it.
19812         * Make-lang.in (cc1plus): Depend on cfns.gperf.
19813         * cfns.gperf: New file.
19814         * cfns.h: Generated.
19815         * except.c: Include it.
19816         (nothrow_libfn_p): New fn.
19817         * decl.c (grokfndecl): Use it.
19818         * cp-tree.h: Declare it.
19820         * decl.c (push_overloaded_decl_1, auto_function,
19821         define_function): Lose.
19822         (build_library_fn_1): New static fn.
19823         (builtin_function): Use it.
19824         (get_atexit_node): Use build_library_fn_ptr.
19825         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
19826         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
19827         push_void_library_fn, push_throw_library_fn): New fns.
19828         * cp-tree.h: Declare them.
19829         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
19830         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
19831         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
19832         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
19833         * rtti.c (build_runtime_decl): Lose.
19834         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
19835         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
19836         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
19838         * call.c (build_call): Remove result_type parm.
19839         Call mark_used on unused artificial fns.
19840         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
19842 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
19844         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
19845         appropriate.
19846         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
19847         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
19848         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
19849         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
19850         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
19851         expand_generic_desc): Likewise.
19853 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
19855         * exception.cc (__cp_pop_exception): Cleanup the original object.
19857 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
19859         * decl.c (grok_op_properties): Merge conversion to void warning
19860         with other silly op warnings.
19862 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
19864         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
19865         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
19867 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
19869         * decl.c (cp_make_fname_decl): New function.
19870         (wrapup_globals_for_namespace): Don't emit unused static vars.
19871         (init_decl_processing): Remove comment about use of
19872         array_domain_type. Set make_fname_decl.
19873         (cp_finish_decl): Remove __FUNCTION__ nadgering.
19874         * semantics.c (begin_compound_stmt): Remove
19875         current_function_name_declared flagging.
19876         (expand_stmt): Don't emit unused local statics.
19877         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
19878         specially.
19880 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
19882         * typeck.c (convert_for_assignment): Don't look at array
19883         initializer.
19884         * call.c (convert_like_real): Likewise.
19886 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
19888         Add initial support for '\uNNNN' specifier.
19889         * lex.c (read_ucs): New fn.
19890         (readescape, skip_white_space): Call it.
19891         (is_extended_char, is_extended_char_1): New fns.
19892         (utf8_extend_token): New fn, #if 0'd out.
19893         (real_yylex): Treat extended chars like letters.
19895         * search.c (note_debug_info_needed): Walk the bases even if we
19896         weren't deferring the type itself.
19898 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
19900         * decl2.c (finish_objects): Constify a char*.
19902         * method.c (emit_thunk): Likewise.
19904 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
19906         * typeck.c (dubious_conversion_warnings): Look through
19907         REFERENCE_TYPE.
19909 2000-03-06  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19911         * class.c (dfs_modify_vtables): I is now unsigned.
19912         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
19913         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
19914         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
19915         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
19916         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
19917         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
19918         Call integer_all_onesp.
19919         * typeck2.c (process_init_constructor): Use compare_tree_int.
19921         * lang-specs.h (as): Don't call if -syntax-only.
19923 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
19925         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
19926         RTL_EXPR_HAS_NO_SCOPE after all.
19928 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
19930         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
19931         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
19932         RTL_EXPR_HAS_NO_SCOPE.
19934         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
19935         later.
19937         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
19939 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
19941         * call.c (convert_like): Macrofy.
19942         (convert_like_with_context): New macro.
19943         (convert_like_real): Renamed from convert_like.  Add calling
19944         context parameters, for diagnostics. Add recursive flag.  Call
19945         dubious_conversion_warnings for outer conversion.
19946         (build_user_type_conversion): Use convert_like_with_context.
19947         (build_over_call): Likewise. Don't warn about dubious
19948         conversions here. Adjust convert_default_arg calls.
19949         (convert_default_arg): Add context parameters for diagnostics.
19950         Pass through to convert_like_with_context.
19951         * cp-tree.h (convert_default_arg): Add context parameters.
19952         (dubious_conversion_warnings): Prototype new function.
19953         * typeck.c (convert_arguments): Adjust convert_default_arg call.
19954         (dubious_conversion_warnings): New function, broken
19955         out of convert_for_assignment.
19956         (convert_for_assignment): Adjust.
19958 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
19960         * decl2.c (key_method): Break out from...
19961         (import_export_vtable, import_export_class): ...here.
19963         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
19964         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
19966         * search.c (note_debug_info_needed, dfs_debug_mark,
19967         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
19968         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
19970 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
19972         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
19973         typos.
19975 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
19977         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
19978         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
19979         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
19980         (lang_type): Split gets_new into has_new and has_array_new.
19981         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
19982         (TYPE_GETS_NEW): Split into ...
19983         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
19984         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
19985         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
19986         (build_op_new_call): Don't declare.
19987         (build_new_1): Likewise.
19988         * call.c (build_op_new_call): Remove.
19989         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
19990         instead of TYPE_NEEDS_DESTRUCTOR.
19991         (finish_struct_bits): Likewise.
19992         (add_implicitly_declared_members): Likewise.
19993         (check_field_decl): Likewise.
19994         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
19995         correctly under the new ABI.
19996         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
19997         instead of TYPE_NEEDS_DESTRUCTOR.
19998         (initialize_local_var): Likewise.
19999         (destroy_local_var): Likewise.
20000         (cp_finish_decl): Likewise.
20001         (register_dtor_fn): Likewise.
20002         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
20003         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
20004         TYPE_VEC_DELETE_TAKES_SIZE here.
20005         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
20006         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
20007         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20008         (finish_destructor_body): Likewise.
20009         (maybe_build_cleanup_1): Likewise.
20010         * decl2.c (do_static_destruction): Likewise.
20011         * init.c (build_new_1): Make it static.
20012         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20013         (expand_cleanup_for_base): Likewise.
20014         (get_cookie_size): New function.
20015         (build_new_1): Handle array-new cookies correctly under the new
20016         ABI.
20017         (build_vec_delete_1): Likewise.
20018         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20019         (build_delete): Likewise.
20020         (build_vec_delete): Handle array-new cookies correctly under the new
20021         ABI.
20022         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20023         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
20024         TYPE_HAS_ARRAY_NEW_OPERATOR.
20025         * ptree.c (print_lang_type): Check them.
20026         * search.c (context_for_name_lookup): Fix typo in comment.
20027         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20028         * tree.c (break_out_cleanups): Likewise.
20029         (build_cplus_array_test_1): Likewise.
20030         (cp_build_qualified_type_real): Likewise.
20031         * typeck.c (complete_type): Likewise.
20033         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
20034         the command-line, not the end.
20036 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
20038         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
20040 2000-03-02  Tom Tromey  <tromey@cygnus.com>
20042         * cp-tree.h (build_java_class_ref): Declare.
20043         * init.c (build_java_class_ref): No longer static.
20044         * except.c (expand_throw): Generate a Java-style `throw' if the
20045         thrown object is a "Java" object.
20046         (initialize_handler_parm): Generate a Java-style lookup of
20047         exception info if the caught object is a "Java" object.
20048         (catch_language, catch_language_init): New globals.
20049         (decl_is_java_type): New function.
20050         (expand_start_catch_block): Don't call push_eh_info() or
20051         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
20052         class reference to build_catch_block.
20054 2000-03-02  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
20056         * typeck.c (comptypes): Treat sizetype like its language equivalent.
20058 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
20060         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
20061         to merge reference/pointer code and fix incorrect warnings.
20063 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
20065         * search.c (protected_accessible_p): Use context_for_name_lookup.
20067         * init.c (construct_virtual_bases): Fix thinko.
20068         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
20070 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
20072         * decl.c (current_function_decl): Move to toplev.c.
20074 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
20076         * pt.c (fn_type_unification): Unify return type, whenever
20077         provided.
20078         (get_bindings_real): Only pass return type when necessary.
20079         Remove explicit return type check.
20080         * class.c (resolve_address_of_overloaded_function): Pass desired
20081         return type to fn_type_unification.
20083 2000-02-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
20085         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
20086         DECL_FIELD_SIZE.
20087         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
20088         DECL_FIELD_SIZE.
20089         * rtti.c (expand_class_desc): Likewise.
20090         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
20091         (THUNK_VCALL_OFFSET): Likewise.
20092         (THUNK_DELTA): Reflect changes in ../tree.h.
20094 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
20096         * search.c (protected_accessible_p): Also allow the access if
20097         the member is public in DERIVED.  Lose TYPE parm.
20098         (friend_accessible_p): Lose TYPE parm.
20099         (accessible_p): Adjust.
20101 2000-02-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
20103         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
20104         on things that are not sizes; ssize_binop deleted.
20105         Call size_diffop when appropriate.
20106         (dfs_build_vcall_offset_vtbl_entries): Likewise.
20107         (build_primary_vtable, build_secondary_vtable): Likewise.
20108         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
20109         Variable I is HOST_WIDE_INT.
20110         (get_vfield_offset): Pass proper types to size_binop.
20111         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
20112         (finish_struct_1): Likewise.
20113         (skip_rtti_stuff): Arg N is now pointer to signed.
20114         (layout_class_type): Use size_zero_node.
20115         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
20116         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
20117         * decl.c (complete_arry_type): Pass proper types to size_binop.
20118         (xref_basetypes): BINFO_OFFSET is sizetype.
20119         * error.c (dump_expr): Don't use size_binop non-sizes.
20120         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
20121         * init.c (construct_virtual_bases): Fix type error.
20122         (build_vec_delete_1): Pass proper type to size_binop and don't
20123         fold result.
20124         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
20125         * rtti.c (get_base_offset): Pass proper type to size_binop.
20126         * search.c (dfs_find_vbases): Fix type error.
20127         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
20128         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
20129         * tree.c (debug_binfo): Variable N is signed.
20130         Use HOST_WIDE_INT_PRINT_DEC.
20131         * typeck.c (comptypes): sizetype is same as equivalent integer type.
20132         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
20133         size_one_node and size_zero_node.
20134         (c_alignof): Use size_one_node.
20135         (build_component_addr): Pass proper types to size_binop.
20136         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
20138 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
20140         Implement class scope using-declarations for functions.
20141         * class.c (handle_using_decl): Call add_method for used functions.
20142         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
20143         (add_method): Used functions are hidden by local functions.
20144         (check_bases_and_members): Handle using-decls before finalizing
20145         CLASSTYPE_METHOD_VEC.
20146         * call.c (add_function_candidate): Add ctype parm; if nonzero,
20147         override the type of 'this' accordingly.
20148         (add_template_candidate, add_template_candidate_real): Add ctype parm.
20149         (convert_class_to_reference, build_user_type_conversion_1,
20150         build_new_function_call, build_object_call, build_new_op,
20151         build_new_method_call): Pass ctype parm.
20153         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
20154         the baselink.
20155         * call.c (convert_class_to_reference, build_user_type_conversion_1,
20156         build_new_function_call, build_object_call, build_new_op,
20157         build_new_method_call, build_op_delete_call): Don't get basetype_path
20158         from a baselink.
20159         * typeck.c (build_component_ref): Likewise.
20160         * init.c (build_offset_ref): Likewise.
20161         (resolve_offset_ref): Don't call enforce_access.
20162         Call build_scoped_ref.
20163         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
20164         would cause an error or if -pedantic.
20165         * class.c (alter_access): Lose binfo parm.
20167 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
20169         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
20170         types.
20172 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
20174         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
20175         pseudo_type_info creation into the std namespace
20177 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
20179         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
20180         (import_export_class): Remove declaration.
20181         * decl2.c (import_export_class): Make it static.
20182         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
20183         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
20184         EXPR_WITH_FILE_LOCATION.
20185         * lex.c (check_newline): Tweak filename/lineno setting.
20186         * semantics.c (begin_while_stmt): Fix typo in comment.
20188 2000-02-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
20190         * lang-options.h (-fmessage-length=): Add missing option.
20192         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
20194 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
20196         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
20198 2000-02-25  Jim Wilson  <wilson@cygnus.com>
20200         * optimize.c (expand_call_inline): Emit the return label before
20201         evaluating the return value.
20203 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
20205         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
20206         than duplicating functionality here.
20207         * optimize.c: Include input.h.
20208         (expand_call_inline): Use push_srcloc and pop_srcloc.
20209         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
20210         * parse.c: Regenerated.
20211         * Makefile.in (lex.o): Depend on input.h.
20212         (optimize.o): Likewise.
20214 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
20216         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
20217         function type, rather than ICE.
20219 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
20221         * decl.c (grokdeclarator): Call decl_type_access_control.
20222         * parse.y (parse_end_decl): Don't call decl_type_access_control if
20223         decl is null.
20225 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
20227         * decl.c (decls_match): Remove obsolete static member nadgering.
20229 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
20231         * decl.c (grokdeclarator): Change ANSI to ISO.
20232         * lex.c (consume_string, readescape, do_identifier): Likewise.
20233         (parse_float, real_yylex): Likewise.
20234         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
20235         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
20236         new_type_id, maybe_label_decls, simple_stmt,
20237         for.init.statement): Likewise.
20238         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
20239         * semantics.c (finish_named_return_value): Likewise.
20240         * parse.c: Regenerate.
20242 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
20244         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
20245         (CPTI_CLASS_STAR_TYPE): Remove.
20246         (vtable_index_type): Likewise.
20247         (class_star_type_node): Remove.
20248         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
20249         (build_binary_op_nodefault): Remove.
20250         * call.c (build_new_op): Use build_binary_op instead of
20251         build_binary_op_nodefault.
20252         * decl.c (init_decl_processing): Remove class_star_type_node
20253         initialization.  Make delta_type_node ptrdiff_type_node under the
20254         new ABI.  Initialize vtable_index_type.
20255         (build_ptrmemfunc_type): Build different structures for the new
20256         ABI.
20257         (build_enumerator): Use build_binary_op instead of
20258         build_binary_op_nodefault.
20259         * method.c (build_overload_value): Mangle pointers-to-members
20260         appropriately under the new ABI.
20261         * typeck.c (build_array_ref): Use build_binary_op instead of
20262         build_binary_op_nodefault.
20263         (get_member_function_from_ptrfunc): Adjust for the new ABI.
20264         (build_binary_op_nodefault): Rename to ...
20265         (build_binary_op): ... this.  Remove old version.  Adjust for
20266         pointer-to-member comparisons under the new ABI.
20267         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
20268         (build_ptrmemfunc): Adjust for the new ABI.
20269         (expand_ptrmemfunc_cst): Likewise.
20270         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
20271         (pfn_from_ptrmemfunc): Adjust for the new ABI.
20273 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
20275         * call.c (build_object_call): Compress consecutive calls to
20276         cp_error.
20277         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
20278         (build_op_delete_call): Adjust message formatting.
20280         * class.c (check_bases): Compress consecutive calls to
20281         cp_pedwarn.
20282         (finish_struct_anon): Say 'ISO C++'.
20284         * decl.c (start_decl): Same here.
20285         (grok_reference_init): Likewise.
20286         (grokfndecl): Correct message formatting.
20287         (grokfndecl): Improve diagnostic.
20288         (check_static_variable_definition): Likewise. Say 'ISO C++'
20289         (compute_array_index_type): Say 'ISO C++'
20290         (create_array_type_for_decl): Compress consecutive calls to
20291         cp_error.
20292         (grokdeclarator): Say 'ISO C++'
20293         (grok_op_properties): Likewise.
20295         * decl2.c (delete_sanity): Clairify diagnostic.
20296         (check_member_template): Same here.
20297         (grok_function_init): Use consistent terminology.
20299         * expr.c (do_case): Say 'ISO C++'
20301         * friend.c (do_friend): Compress consecutive calls to warning.
20303 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
20305         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
20306         * class.c (build_secondary_vtable): Reorganize.  Don't create a
20307         new vtable under the new ABI.
20308         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
20309         computing the size.
20310         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
20311         the initializing elements.
20312         (initialize_vtable): New function.
20313         (dfs_finish_vtbls): Use it.
20314         (dfs_accumulate_vtbl_inits): New function.
20315         (finish_vtbls): Merge primary and secondary vtables under the new
20316         ABI.
20317         (finish_struct_1): Remove redundant call to layout_vtable_decl.
20318         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
20319         aren't VAR_DECLs.
20321         * class.c (build_vtable): New function, split out from ...
20322         (get_vtable_decl): ... here, and ...
20323         (build_secondary_vtable): ... here.
20325         * pt.c (tsubst_decl): Fix formatting.
20327 2000-02-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
20329         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
20330         (avoid_overlap, build_base_field): Likewise.
20331         (build_base_field, build_base_fields, is_empty_class):
20332         Test DECL_SIZE with integer_zero.
20333         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
20334         * cp-tree.h (struct lang_type): New field size_unit.
20335         (CLASSTYPE_SIZE_UNIT): New macro.
20336         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
20337         (cp_finish_decl): Delete -Wlarger-than processing.
20338         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
20339         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
20340         * tree.c (make_binfo): binfo vector is one entry longer.
20341         (walk_tree): Walk DECL_SIZE_UNIT.
20343 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
20345         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
20346         comment.
20347         (build_vtable_entry): Don't assume all vtable entries are
20348         functions.
20349         (build_vtbl_initializer): Adjust accordingly.
20350         (get_vtable_decl): Fix formatting.
20352 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
20354         * semantics.c (deferred_type_access_control): Walk the entire
20355         type_lookups list.
20356         (save_type_access_control): Rename from
20357         initial_deferred_type_access_control.  Just remember the value.
20358         (decl_type_access_control): New fn.
20359         (begin_function_definition): Use deferred_type_access_control, after
20360         we've started the function.  Set type_lookups to error_mark_node.
20361         * parse.y (frob_specs, fn.def1): Adjust.
20362         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
20363         (parse_end_decl, parse_bitfield0, parse_method): New fns.
20364         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
20365         (after_type_component_declarator0): Likewise.
20366         (after_type_component_declarator): Likewise.
20367         (notype_component_declarator): Likewise.
20368         * cp-tree.h: Adjust.
20370         * decl.c (redeclaration_error_message): Allow redeclaration of
20371         namespace-scope decls.
20373 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
20375         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
20377 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
20379         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
20380         * decl2.c (grokclassfn): Likewise.
20382         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
20384         * decl2.c (lang_decode_option): Don't set default message length
20385         here.
20386         * lex.c (lang_init_options): Set it here.
20388 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
20390         Make DECL_CONTEXT mean the class in which a member function was
20391         declared, even for a virtual function.
20392         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
20393         (DECL_FRIEND_CONTEXT): New macro.
20394         (DECL_REAL_CONTEXT): Remove.
20395         (SET_DECL_FRIEND_CONTEXT): Likewise.
20396         (DECL_VIRTUAL_CONTEXT): Adjust.
20397         (DECL_CLASS_SCOPE_P): Use TYPE_P.
20398         (add_friends): Remove.
20399         (hack_decl_function_context): Likewise.
20400         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
20401         CP_DECL_CONTEXT.
20402         (build_over_call): Fix indentation.  Use DECL_CONTEXT
20403         instead of DECL_CLASS_CONTEXT.
20404         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
20405         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
20406         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20407         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
20408         (build_base_field): Likewise.
20409         (finish_struct_1): Likewise.
20410         (build_self_reference): Likewise.
20411         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
20412         DECL_REAL_CONTEXT.
20413         (pushtag): Use decl_function_context, not
20414         hack_decl_function_context.
20415         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
20416         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
20417         (pushdecl): Remove bogus code.
20418         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
20419         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
20420         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20421         Use decl_function_context, nothack_decl_function_context.
20422         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
20423         (grokdeclarator): Likewise.  Use decl_function_context, not
20424         hack_decl_function_context.
20425         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
20426         (start_function): Use DECL_FRIEND_CONTEXT, not
20427         DECL_CLASS_CONTEXT.  Use decl_function_context, not
20428         hack_decl_function_context.
20429         (finish_function): Use decl_function_context, not
20430         hack_decl_function_context.
20431         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
20432         DECL_CLASS_CONTEXT.
20433         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
20434         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
20435         (grokfield): Likewise.
20436         (finish_builtin_type): Likewise.
20437         (finish_vtable_vardec): Use decl_function_context, not
20438         hack_decl_function_context.
20439         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20440         (start_static_initialization_or_destruction): Likewise.
20441         (finish_static_initialization_or_destruction): Likewise.
20442         (mark_used): Adjust logic for deciding when to synthesize methods.
20443         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
20444         DECL_REAL_CONTEXT.
20445         * error.c (dump_function_decl): Use DECL_CONTEXT, not
20446         DECL_CLASS_CONTEXT.
20447         * friend.c (is_friend): Likewise.
20448         (add_friends): Remove.
20449         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
20450         * lex.c (begin_definition_of_inclass_inline): Use
20451         decl_function_context, not hack_decl_function_context.
20452         (process_next_inline): Likewise.
20453         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
20454         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
20455         DECL_CLASSS_CONTEXT.
20456         (hack_identifier): Likewise.
20457         (synthesize_method):  Use decl_function_context, not
20458         hack_decl_function_context.
20459         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
20460         DECL_REAL_CONTEXT.
20461         (is_member_template): Use decl_function_context, not
20462         hack_decl_function_context.  Use DECL_CONTEXT, not
20463         DECL_CLASS_CONTEXT.
20464         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
20465         DECL_CLASS_CONTEXT.
20466         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
20467         DECL_REAL_CONTEXT.
20468         (push_template_decl_real): Likewise.
20469         (instantiate_class_template): Don't call add_friends.
20470         (tsubst_default_argument): Use DECL_CONTEXT, not
20471         DECL_REAL_CONTEXT.
20472         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
20473         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20474         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
20475         DECL_CLASS_CONTEXT.
20476         * repo.c (repo_inline_used): Likewise.
20477         * search.c (current_scope): Adjust for new _CONTEXT macros.
20478         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
20479         DECL_REAL_CONTEXT.
20480         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20481         (lookup_fnfields_here):Likewise.
20482         (check_final_overrider): Likewise.
20483         (init_vbase_pointers): Likewise.
20484         (virtual_context): Likewise.
20485         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
20486         (expand_body): Use decl_function_context, not
20487         hack_decl_function_context.
20488         * tree.c (hack_decl_function_context): Remove.
20489         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
20490         DECL_CLASS_CONTEXT.
20491         * typeck2.c (error_not_base_type): Likewise.
20493 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
20495         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
20497 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
20499         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
20501 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
20503         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
20505 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
20507         * decl2.c (lang_decode_option): Enable automatic line wrapping.
20509 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
20511         * parse.y (frob_specs): Split out...
20512         (parse_decl): From here.
20513         (fn.def2): Call initial_deferred_type_access_control.
20514         (after_type_component_declarator0): Call frob_specs.
20515         (notype_component_declarator0): Likewise.
20516         * search.c (friend_accessible_p): Nested classes are friends of their
20517         enclosing classes.
20519 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
20521         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
20522         used to create an implicit temporary.
20524         * class.c (dfs_modify_vtables): Tweak calculation of functions to
20525         override.
20527 2000-02-08  Nathan Sidwell  <nathan@acm.org>
20529         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
20530         strip array element qualifiers too.
20532 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
20534         * decl.c (store_parm_decls): Don't build cleanups for parameters
20535         while processing_template_decl.
20537 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
20539         * cp-tree.h (struct saved_scope): Add incomplete field.
20540         (namespace_scope_incomplete): New macro.
20541         * decl.c (pushdecl): Use it.
20542         (hack_incomplete_structures): Use it.  See through artificial
20543         binding levels.
20544         (mark_saved_scope): Mark it.
20546         Implement access control for nested types.
20547         * search.c (type_access_control): New fn.
20548         (accessible_p): Now we do perform access control for types.
20549         * semantics.c (deferred_type_access_control): New fn.
20550         (initial_deferred_type_access_control): New fn.
20551         (begin_function_definition): Call it.  Add lookups parm.
20552         * decl.c (struct binding_level): Add this_class field.
20553         (pushlevel_class): Set it.
20554         (mark_binding_level): Mark it.
20555         (lookup_name_real): Use it.  Call type_access_control.
20556         (mark_saved_scope): Mark lookups field.
20557         * cp-tree.h (flagged_type_tree): Add lookups field.
20558         (struct saved_scope): Add lookups field.
20559         (type_lookups): New macro.
20560         * parse.y (declmods): Now <ftype>.
20561         (parse_decl): Add lookups parm.  Call
20562         initial_deferred_type_access_control.
20563         (lang_extdef): Clear type_lookups.
20564         (typed_declspecs, declmods, typespec): Set lookups field.
20565         (initdcl): Call deferred_type_access_control.
20566         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
20567         component_decl_1, named_parm): Adjust.
20568         * friend.c (is_friend): Nested classes are friends of their
20569         enclosing classes.
20571         * class.c (currently_open_derived_class): New fn.
20572         * method.c (hack_identifier): Use it.
20574         * lex.c (do_identifier): Remove obsolete code.
20576         * parse.y (typed_typespecs): Propagate new_type_flag properly.
20578 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
20580         * tinfo.h: Remove apostrophes from C++ comment (xgettext
20581         thinks this file is plain C).
20583 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
20585         * Makefile.in (call.o): Depend on $(EXPR_H).
20587         * call.c: Include "expr.h".
20589         * class.c (dump_class_hierarchy): Add prototype.
20591         * search.c (dfs_get_pure_virtuals): Likewise.
20593 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
20595         * parse.y (simple_stmt): Allow :: token in asm parameter list.
20596         * parse.c: Rebuilt.
20598 2000-01-31  Jim Wilson  <wilson@cygnus.com>
20600         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
20601         Store it in DECL_FCONTEXT.
20602         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
20604 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
20606         * tinfo.h (old abi): #include "tconfig.h".
20607         * tinfo.cc (convert_to_base): Move into old abi section.
20609 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
20611         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
20612         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
20613         (BINFO_PRIMARY_BINFO): New macro.
20614         (BF_DELTA): Rename to ...
20615         (BV_DELTA): ... this.
20616         (BF_VCALL_INDEX): Rename to ...
20617         (BV_VCALL_INDEX): ... this.
20618         (BF_FN): Rename to ...
20619         (BV_FN): ... this.
20620         * class.c (build_vbase_path): Adjust for changes to reverse_path.
20621         (set_rtti_entry): Rename BF_ macros to BV_ variants.
20622         (modify_vtable_entry): Simplify.
20623         (add_virtual_function): Rename BF_ macros to BV_ variants.
20624         (build_vtable_initializer): Likewise.
20625         (get_class_offset_1): Remove.
20626         (dfs_get_class_offset): Likewise.
20627         (get_class_offset): Likewise.
20628         (dfs_find_final_overrider): New function.
20629         (find_final_overrider): Likewise.
20630         (modify_one_vtable): Remove.
20631         (dfs_find_base): New function.
20632         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
20633         find_final_overrider.
20634         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
20635         virtuals.
20636         (dfs_fixup_vtable_deltas): Remove.
20637         (override_one_vtable): Remove.
20638         (merge_overrides): Likewise.
20639         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
20640         unreal chilren of virtual bases.
20641         (finish_struct_1): Don't use merge_overrides.  Don't use
20642         dfs_fixup_vtable_deltas.
20643         * tree.c (reverse_path): Return a TREE_LIST, not a chain of
20644         BINFOs.
20646 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
20647             Jason Merrill  <jason@yorick.cygnus.com>
20649         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
20651 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
20653         * exception.cc (__throw_bad_typeid): Add missing std::.
20655 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
20657         * cp-tree.h (make_thunk): PROTO -> PARAMS.
20659 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
20661         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
20663         Runtime support for new-abi rtti.
20664         * inc/typeinfo (type_info::operator!=): Define in class.
20665         (type_info::before, type_info::name, type_info::operator==,
20666         type_info::operator!=): Define new ABI implementations.
20667         (type_info::is_pointer_p, type_info::is_function_p): Declare
20668         new virtual functions.
20669         (type_info::do_catch, type_info::do_upcast): Likewise.
20671         * tinfo.h (__base_class_info): Define new class.
20672         (__class_type_info): Likewise.
20673         (__si_class_type_info): Likewise.
20674         (__vmi_class_type_info): Likewise.
20675         (__dynamic_cast): Prototype.
20677         * tinfo.cc: Conditionalize old and new rtti mechanisms.
20678         (type_info::is_pointer_p): Define new function.
20679         (type_info::is_function_p): Likewise.
20680         (type_info::do_catch): Likewise.
20681         (type_info::do_upcast): Likewise.
20682         (vtable_prefix): New structure for vtable access.
20683         (adjust_pointer): Define new template function.
20684         (contained_p, public_p, virtual_p, contained_public_p,
20685         contained_nonpublic_p, contained_nonvirtual_p): Define new
20686         functions.
20687         (nonvirtual_base_type): New local variable.
20688         (__class_type_info::~__class_type_info): Define.
20689         (__si_class_type_info::~__si_class_type_info): Likewise.
20690         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
20691         (__class_type_info::do_catch): Define new function.
20692         (__class_type_info::do_upcast): Likewise.
20693         (__class_type_info::find_public_src): Likewise.
20694         (__class_type_info::do_find_public_src): Likewise.
20695         (__si_class_type_info::do_find_public_src): Likewise.
20696         (__vmi_class_type_info::do_find_public_src): Likewise.
20697         (__class_type_info::do_dyncast): Likewise.
20698         (__si_class_type_info::do_dyncast): Likewise.
20699         (__vmi_class_type_info::do_dyncast): Likewise.
20700         (__class_type_info::do_upcast): Likewise.
20701         (__si_class_type_info::do_upcast): Likewise.
20702         (__vmi_class_type_info::do_upcast): Likewise.
20703         (__dynamic_cast): Likewise.
20705         * tinfo2.cc (__fundamental_type_info): Define new class.
20706         (__pointer_type_info): Likewise.
20707         (__reference_type_info): Likewise.
20708         (__array_type_info): Likewise.
20709         (__function_type_info): Likewise.
20710         (__enum_type_info): Likewise.
20711         (__ptr_to_member_type_info): Likewise.
20712         (__fundamental_type_info::~__fundamental_type_info): Define.
20713         (__pointer_type_info::~__pointer_type_info): Likewise.
20714         (__reference_type_info::~__reference_type_info): Likewise.
20715         (__array_type_info::~__array_type_info): Likewise.
20716         (__function_type_info::~__function_type_info): Likewise.
20717         (__enum_type_info::~__enum_type_info): Likewise.
20718         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
20719         (__pointer_type_info::do_catch): Define new function.
20720         (__ptr_to_member_type_info::do_catch): Define new function.
20722         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
20723         (__is_pointer): Likewise.
20725         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
20727 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
20729         * cp/class.c (build_vtable): Rename to build_primary_vtable.
20730         (prepare_fresh_vtable): Rename to build_secondary_vtable.
20731         (make_new_vtable): New function.
20732         (modify_vtable_entry): Handle generation of new vtables correctly.
20733         (modify_one_vtable): Remove unused parameter.
20734         (dfs_fixup_vtable_deltas): Likewise.
20735         (override_one_vtable): Use build_secondary_vtable.
20736         (finish_struct_1): Use build_primary_vtable and
20737         build_secondary_vtable.
20739 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
20741         * cp/decl.c: Adjust variable names, comments, help strings.
20743 2000-01-29  Nathan Sidwell  <nathan@acm.org>
20745         * new2.cc (operator delete[]): Use operator delete, don't assume
20746         implementation.
20748 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
20750         * class.c (build_vtbl_initializer): Add argument to
20751         build_vtable_entry call.
20753 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
20755         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
20756         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
20757         (BF_DELTA): New macro.
20758         (BF_VCALL_INDEX): Likewise.
20759         (BF_FN): Likewise.
20760         (THUNK_VCALL_OFFSET): Likewise.
20761         (make_thunk): Change prototype.
20762         * class.c (build_vtable_entry): Integrate
20763         build_vtable_entry_for_fn.  Handle vcall indices.
20764         (build_vtable_entry_for_fn): Remove.
20765         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
20766         BF_VCALL_INDEX, BF_FN.
20767         (modify_vtable_entry): Integrate common code from
20768         modify_one_vtable and dfs_fixup_vtable_deltas.
20769         (add_virtual_function): Set BF_VCALL_INDEX.
20770         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
20771         and BF_FN.
20772         (modify_one_vtable): Simplify.
20773         (dfs_fixup_vtable_deltas): Likewise.
20774         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
20775         * method.c (make_thunk): Handle vcall indices.
20777 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
20779         Compiler side new abi rtti (not enabled).
20780         * cp-tree.h (new_abi_rtti_p): New macro.
20781         (emit_support_tinfos): Prototype new function.
20782         (tinfo_decl_p): Likewise.
20783         (emit_tinfo_decl): Likwise.
20784         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
20785         macros.
20786         (doing_runtime): New local static.
20787         (init_rtti_processing): Add new-abi initializer.
20788         (get_tinfo_decl): Add new-abi logic.
20789         (tinfo_from_decl): Likewise.
20790         (build_dynamic_cast_1): Likewise.
20791         (qualifier_flags): New static function.
20792         (tinfo_base_init): Likewise.
20793         (generic_initializer): Likewise.
20794         (ptr_ref_initializer): Likewise.
20795         (ptmd_initializer): Likewise.
20796         (class_hint_flags): Likewise.
20797         (class_initializer): Likewise.
20798         (synthesize_tinfo_var): Likewise.
20799         (create_real_tinfo_var): Likewise.
20800         (create_pseudo_type_info): Likewise.
20801         (get_vmi_pseudo_type_info): Likewise.
20802         (create_tinfo_types): Likewise.
20803         (emit_support_tinfos): New global function.
20804         (tinfo_decl_p): New global predicate.
20805         (emit_tinfo_decl): New global function.
20806         * class.c (set_rtti_entry): Generalize for old and new rtti.
20807         (build_vtbl_initializer): Likewise.
20808         * decl2.c (finish_file): Likewise.
20810 2000-01-27  Jim Wilson  <wilson@cygnus.com>
20812         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
20813         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
20815 2000-01-27  Mike Stump  <mrs@wrs.com>
20817         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
20818         for scopes.
20820 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
20822         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
20824 2000-01-26  J"orn Rennecke <amylaar@cygnus.co.uk>
20826         * optimize.c (calls_setjmp_r): Supply new argument
20827         to special_function_p.
20829 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
20831         * call.c: PROTO -> PARAMS.
20832         * class.c: Likewise.
20833         * cp-tree.h: Likewise.
20834         * cvt.c: Likewise.
20835         * decl.c: Likewise.
20836         * decl.h: Likewise.
20837         * decl2.c: Likewise.
20838         * dump.c: Likewise.
20839         * errfn.c: Likewise.
20840         * error.c: Likewise.
20841         * except.c: Likewise.
20842         * expr.c: Likewise.
20843         * init.c: Likewise.
20844         * input.c: Likewise.
20845         * lex.c: Likewise.
20846         * lex.h: Likewise.
20847         * method.c: Likewise.
20848         * optimize.c: Likewise.
20849         * parse.y: Likewise.
20850         * pt.c: Likewise.
20851         * repo.c: Likewise.
20852         * rtti.c: Likewise.
20853         * search.c: Likewise.
20854         * semantics.c: Likewise.
20855         * spew.c: Likewise.
20856         * tree.c: Likewise.
20857         * typeck.c: Likewise.
20858         * typeck2.c: Likewise.
20859         * xref.c: Likewise.
20861 2000-01-25  Richard Henderson  <rth@cygnus.com>
20863         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
20865 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
20867         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
20868         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
20869         (struct vcall_offset_data_s): New type.
20870         (dfs_vcall_offset_queue_p): New function.
20871         (dfs_build_vcall_offset_vtbl_entries): Likewise.
20872         (build_vcall_offset_vtbl_entries): Likewise.
20873         (layout_vtable_decl): Likewise.
20874         (num_vfun_entries): Likewise.
20875         (num_extra_vtbl_entries): Add the entries for vcall offsets.
20876         (build_vtbl_initializer): Likewise.
20877         (dfs_finish_vtabls): Use layout_vtable_decl.
20878         (modify_one_vtables): Always duplicate vtables under the new ABI.
20879         (finish_struct_1): Use layout_vtable_decl.
20881 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
20883         * decl.c (member_function_or_else): Change third arg from a format
20884         specifier to an `enum overload_flags'.  Callers changed.
20886 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
20888         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
20889         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
20890         build_const_cast, get_delta_difference, check_return_expr): Avoid
20891         ANSI string concatenation usage.
20893 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
20895         * class.c (layout_class_type): Put the fields required to make a
20896         class non-empty at the end, not the beginning, of the TYPE_FIELDs
20897         list.
20899 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
20901         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
20902         template.
20904         * decl2.c (mark_used): Do instantiate inlines that have been
20905         explicitly instantiated.
20907 2000-01-24  Richard Henderson  <rth@cygnus.com>
20909         * call.c (build_over_call): Use expand_tree_builtin.
20910         * typeck.c (build_function_call_real): Likewise.
20911         (build_binary_op_nodefault): Handle unordered compares.
20913 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
20915         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
20916         cp_tree_index values.
20917         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
20918         New global node #defines for them.
20919         * rtti.c (call_void_fn): Replace with ...
20920         (build_runtime_decl): ... new static function.
20921         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
20922         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
20923         (build_dynamic_cast_1): Always produce correctly typed result.
20924         Explicitly produce type_info addresses. Use dynamic_cast_node.
20925         * exception.cc (__throw_bad_cast): Return `void *'.
20926         (__throw_bad_typeid): Return `const type_info &'.
20928 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
20930         * cp-tree.h (get_vtable_decl): Prototype new function.
20931         * class.c (get_vtable_decl): New function. Broken out from ...
20932         (build_vtable): ... here. Use it.
20933         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
20934         by get_vtable_decl.
20936 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
20938         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
20939         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
20940         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
20941         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
20942         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
20943         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
20944         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
20945         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
20946         (CPTI_TINFO_VAR_ID): New enumeration.
20947         (__tp_desc_type_node, __access_mode_type_node,
20948         __bltn_desc_type_node, __user_desc_type_node,
20949         __class_desc_type_node, __ptr_desc_type_node,
20950         __attr_desc_type_node, __func_desc_type_node,
20951         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
20952         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
20953         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
20954         enum_desc_type_node, class_desc_type_node,
20955         si_class_desc_type_node, vmi_class_desc_type_node,
20956         ptmd_desc_type_node, base_desc_type_node): New #defines.
20957         (tinfo_fn_id, tinfo_fn_type): Rename to ...
20958         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
20959         (tinfo_var_id): New enumeration.
20960         (DECL_TINFO_FN_P): Augment comment.
20961         * decl.c (cp_global_trees): Adjust documentation.
20962         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
20963         tinfo_decl_type and tinfo_var_id.
20964         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
20965         (build_typeid): Remove unused variable.
20966         (get_tinfo_var): Use tinfo_var_id.
20967         (tinfo_name): New static function.
20968         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
20969         (tinfo_from_decl): Likewise.
20970         (get_base_offset): New static function, broken out of
20971         expand_class_desc.
20972         (expand_si_desc): Use tinfo_name.
20973         (expand_class_desc): Likewise. Lose local static variable.
20974         Use base_desc_type_node. Use get_base_offset.
20975         (expand_ptr_desc): Use tinfo_name.
20976         (expand_attr_desc): Likewise.
20977         (expand_generic_desc): Likewise.
20979         * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
20980         * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
20982 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
20984         * cp-tree.h (__eprintf): Remove declaration.
20985         * tree.c (__eprintf): Remove definition.
20987 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
20988             Mark Mitchell  <mark@codesourcery.com>
20990         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
20991         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
20993 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
20995         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
20997 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
20999         * cp-tree.h (register_dtor_fn): New function.
21000         * decl.c (destroy_local_static): Rename to ...
21001         (register_dtor_fn): ... this.  Give it external linkage.
21002         (expand_static_init): Use it.
21003         * decl2.c (do_static_initialization): Likewise, if using
21004         __cxa_atexit.
21005         (do_static_destruction): Check that __cxa_atexit is not in use.
21006         (finish_file): Don't call do_static_destruction if using
21007         __cxa_atexit.
21009         * typeck.c (convert_arguments): Restore two-message error
21010         reporting.
21012 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
21014         Remap dynamic cast hint values to be consistent across ABIs.
21015         * search.c (dynamic_cast_base_recurse): Remap generated value.
21016         (get_dynamic_cast_base_type): Adjust documentation.
21017         * tinfo.h (__user_type_info::dyncast): Likewise.
21018         (__user_type_info::find_public_subobj): Remap BOFF meaning.
21019         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
21020         (__class_type_info::do_dyncast): Likewise.
21021         (__class_type_info::do_find_public_subobj): Likewise.
21022         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
21024 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
21026         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
21028         * typeck2.c (incomplete_type_error): Restore previous
21029         cp_error and cp_error_at call sequence.
21031 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
21033         * class.c (dump_class_hierarchy): Make format agree with argument;
21034         cast pointer to unsigned long and print with %lx.
21036 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
21038         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
21040         * typeck.c (composite_pointer_type, common_type,
21041         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
21042         build_function_call_real, convert_arguments,
21043         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
21044         build_unary_op, mark_addressable, build_compound_expr,
21045         build_static_cast, build_reinterpret_cast, build_const_cast,
21046         build_c_cast, build_modify_expr, get_delta_difference,
21047         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
21048         'ISO C++'.  Fusion consecutive calls to diagnostic message routines
21049         into a single one.
21050         * typeck2.c (readonly_error, abstract_virtuals_error,
21051         process_init_constructor, check_for_new_type): Likewise.
21053 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
21055         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
21056         VAR_DECLs.
21058 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
21060         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
21061         (build_x_typeid): Likewise.
21062         (get_tinfo_fn): Likewise.
21063         (get_tinfo_fn_unused): Rename to ...
21064         (get_tinfo_decl): ... here.
21065         * rtti.c (build_headof): Replace logic error with assertion.
21066         (get_tinfo_fn_dynamic): Rename to ...
21067         (get_tinfo_decl_dynamic): ... here. Make static. Use
21068         complete_type_or_else.
21069         (build_x_typeid): Move into ...
21070         (build_typeid): ... here. Adjust call to
21071         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
21072         throw_bad_typeid expression.
21073         (get_tinfo_fn_unused): Rename to ...
21074         (get_tinfo_decl): ... here. Adjust comment.
21075         (get_tinfo_fn): Delete.
21076         (tinfo_from_decl): New static function.
21077         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
21078         (get_typeid): Use complete_type_or_else.
21079         (build_dynamic_cast_1): Adjust calls to
21080         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
21081         * parse.y (primary): Adjust call to build_typeid.
21082         * except.c (build_eh_type_type_ref): Adjust call to
21083         get_tinfo_decl. Mark as used.
21084         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
21085         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
21086         * parse.c: Regenerated.
21088 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
21090         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
21091         calling convention.
21092         (resolves_to_fixed_type_p): Document calling convention.
21093         * rtti.c (build_x_typeid): Initialize NONNULL.
21095         * cp-tree.h (build_shared_int_cst): New function.
21096         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
21097         * class.c (modify_vtable_entry): Likewise.
21098         (add_virtual_function): Split out code to generated shared
21099         INTEGER_CSTs to build_share_int_cst.
21100         (modify_all_vtables): Handle all the overridden functions here.
21101         Add overridden functions from non-primary virtual bases to the
21102         primary vtable.
21103         (finish_struct_1): Adjust call to modify_all_vtables.  Add
21104         overridden functions from non-primary bases to the vtable.
21105         * tree.c (build_shared_int_cst): New function.
21107         * cp-tree.h (scratchalloc): Remove.
21108         (build_scratch_list): Likewise.
21109         * call.c (convert_class_to_reference): Replace build_scratch_list
21110         and build_expr_list with build_tree_list.
21111         (add_candidate): Replace scratchalloc with expralloc.  Note memory
21112         leak.
21113         (build_user_type_conversion_1):  Replace build_scratch_list
21114         and build_expr_list with build_tree_list.
21115         (build_new_op): Likewise.
21116         (build_op_delete_call): Likewise.
21117         (convert_like): Likewise.
21118         * cvt.c (ocp_convert): Likewise.
21119         * decl.c (start_decl): Likewise.
21120         (start_function): Likewise.
21121         (finish_destructor_body): Likewise.
21122         (maybe_build_cleanup_1): Likewise.
21123         * decl2.c (reparse_decl_as_expr): Likewise.
21124         * init.c (perform_member_init): Likewise.
21125         (expand_cleanup_for_base): Likewise.
21126         (build_builtin_delete_call): Likewise.
21127         (build_new_1): Likewise.
21128         (build_delete): Likewise.
21129         * method.c (do_build_assign_ref): Likewise.
21130         * parse.y (already_scoped_stmt): Likewise.
21131         (nontrivial_exprlist): Likewise.
21132         (net_initializer): Likewise.
21133         (initlist): Likewise.
21134         * parse.c: Regenerated.
21135         * rtti.c (build_x_typeid): Likewise.
21136         (build_dynamic_cast_1): Likewise.
21137         * typeck.c (build_x_compound_expr): Likewise.
21138         (build_static_cast): Likewise.
21139         (build_modify_expr): Likewise.
21141         * cp-tree.h (DECL_VINDEX): Add documentation.
21142         * class.c (build_vtable_entry): Likewise.
21143         (start_vtable): Add comment.
21144         (add_virtual_function): Replace pending_hard_virtuals with
21145         overridden_virtuals and pending_virtuals with new_virtuals.
21146         Replace redundant assignments with assertions.
21147         (check_for_override): Add comment.
21148         (check_bases_and_members): Replace pending_hard_virtuals with
21149         overridden_virtuals and pending_virtuals with new_virtuals.
21150         (create_vtbl_ptr): Likewise.
21151         (layout_class_type): Likewise.
21152         (finish_struct_1): Likewise.  Add comments.
21154 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
21156         * class.c (finish_struct_1): Replace redundant code with
21157         assertions.
21159         * cp-tree.h (flag_new_abi): Move.
21160         (flag_use_cxa_atexit): Likewise.
21161         (flag_honor_std): Likewise.
21162         (flag_rtti): Likewise.
21163         (vbase_offsets_in_vtable_p): Define.
21164         (vptrs_present_everywhere_p): Likewise.
21165         (TYPE_CONTAINS_VPTR_P): Likewise.
21166         (dfs_walk_real): Declare.
21167         * class.c (build_vbase_pointer_fields): Check
21168         vbase_offsets_in_vtable_p.
21169         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
21170         BINFO_VPTR_FIELD.
21171         (build_vbase_offset_vtbl_entries): Simplify.
21172         (build_vbase_offset_vtbl_entries): Adjust.
21173         (build_vbase_pointer): Add ability to look up vbase offsets in
21174         vtable.
21175         (start_vtable): New function.
21176         (add_virtual_function): Use it.
21177         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
21178         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
21179         (build_vtbl_initializer): Take the type of the complete object as
21180         input.  Use it to correctly calculate vbase offsets.
21181         (dfs_finish_vtbls): Pass the complete type to
21182         build_vtbl_initializer.
21183         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
21184         (create_vtable_ptr): Create a vtable even if there are no
21185         new virtual functions, under the new ABI.
21186         (finish_struct_1): Likewise.
21187         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
21188         * decl.c (exapnd_static_init): Remove call to
21189         preserve_initializer.
21190         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
21191         vtables.
21192         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
21193         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
21194         (construct_virtual_bases): Don't initialize virtual base pointers
21195         under the new ABI.
21196         (build_aggr_init): Clean up comment.
21197         (expand_aggr_init_1): Likewise.
21198         * rtti.c (expand_class_desc): Store the virtual function table
21199         index where the vbase offset lives in the offset field.
21200         * search.c (dfs_walk_real): Make it global.
21201         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
21202         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
21204         * tinfo.h (USItype): Make it signed under the new ABI.
21205         * tinfo.cc (convert_to_base): New function.  Encapsulate base
21206         conversion logic here.
21207         (__class_type_info::do_upcast): Use it.
21208         (__class_type_info::do_dyncast): Likewise.
21209         (__class_type_info::do_find_public_subobj): Likewise.
21211         * init.c (construct_virtual_bases): Don't look up the addresses of
21212         virtual bases at run-time.
21214         * class.c (build_vbase_pointer): Relocate.
21215         (build_vbase_pointer_fields): Likewise.
21216         (dfs_build_vbase_offset_vtbl_entries): Likewise.
21217         (build_vbase_offset_vtbl_entries): Likewise.
21219         * decl.c (init_decl_processing): Complain if -fnew-abi
21220         -fno-vtable-thunks is used.
21222         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
21223         flag_new_abi.
21225 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
21227         * cp-tree.h (num_extra_vtbl_entries): New function.
21228         (size_extra_vtbl_entries): Likewise.
21229         (dfs_vtable_path_unmark): Likewise.
21230         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
21231         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
21232         * class.c (num_extra_vtbl_entries): New function.
21233         (size_extra_vtbl_entries): Likewise.
21234         (dfs_build_vbase_offset_vtbl_entries): New function.
21235         (build_vbase_offset_vtbl_entries): Likewise.
21236         (build_vtbl_initializer): Use it.
21237         (finish_struct_1): Adjust vtable sizes (using
21238         num_extra_vtbl_entries).
21239         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
21240         THUNK_DECL is non-NULL before expanding it.
21241         * init.c (expand_virtual_init): Adjust the vtable pointer by
21242         size_extra_vtbl_entries before storing it.
21243         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
21244         Handle TREE_LIST parameters here, not in the dfs_* functions.
21245         (dfs_unmarked_real_bases_queue_p): Adjust.
21246         (dfs_marked_real_bases_queue_p): Likewise.
21247         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
21248         (dfs_vtable_path_marked_real_bases_queue_p): New function.
21249         (dfs_vtable_path_unmark): Likewise.
21251 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
21253         * optimize.c (copy_body_r): Clear the operand three of a
21254         TARGET_EXPR when copying it.
21256 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
21258         * method.c (build_decl_overload_real): Check whether we are in ::
21259         before returning __builtin_new/delete.
21261 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
21263         * pt.c (tsubst_friend_function): Improve comment.
21264         (instantiate_decl): Avoid crashing when a "nested" function is
21265         instantiated from the top level.
21267         * dump.c (dqeueue_and_dump): Dump
21268         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
21270 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
21272         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
21274 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
21276         * g++spec.c (lang_specific_driver): Add -fnew-abi if
21277         ENABLE_NEW_GXX_ABI defined.
21278         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
21279         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
21280         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
21282 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
21284         * decl.c (start_cleanup_fn): Call pushdecl.
21286         * call.c (convert_class_to_reference): Fix typos.
21287         (build_conditional_expr): Handle errors gracefully.
21288         * class.c (push_nested_class): Likewise.
21289         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
21290         (DECL_THIS_EXTERN): Use it.
21291         (DECL_THIS_STATIC): Likewise.
21292         * cvt.c (convert_to_void): Handle errors gracefully.
21293         (build_expr_type_conversion): Likewise.
21294         * decl.c (maybe_push_decl): Likewise.
21295         (start_decl_1): Likewise.
21296         (require_complete_types_for_parms): Likewise.
21297         * parse.y (structsp): Likewise.
21298         (base_class): Likewise.
21299         * parse.c: Regenerated.
21300         * pt.c (finish_member_template_decl): Likewise.
21301         * typeck.c (decay_conversion): Likewise.
21303         * cp-tree.h (dfs_skip_vbases): New function.
21304         (find_vbase_instance): Likewise.
21305         * class.c (determine_primary_base): Allow a nearly empty base to
21306         serve as a primary base class under the new ABI.
21307         (get_class_offset_1): Rename to ...
21308         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
21309         messages here.
21310         (get_class_offset): Use it.  Issue error messages here.
21311         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
21312         find the right copies of virtual bases.
21313         (fixup_vtable_deltas1): Rename to ...
21314         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
21315         bases as primary bases.
21316         (fixup_vtable_deltas): Remove.
21317         (override_one_vtable): Handle virtual bases as primary bases.
21318         (merge_overrides): Likewise.
21319         (finish_struct_1): Likewise.
21320         (dump_class_hierarchy): Dump primary-ness of bases as well.
21321         * search.c (mark_primary_bases): Use a pre-order traversal to
21322         handle primary virtual bases.
21323         (dfs_skip_vbases): New fiunction.
21324         (expand_upcast_fixups): Adjust to handle primary virtual bases.
21325         (fixup_virtual_upcast_offsets): Likewise.
21326         (fixup_all_virtual_upcast_offsets): Likewise.
21327         (dfs_find_vbase_instances): New function.
21328         (find_vbase_instance): Likewise.
21330 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
21332         * lex.c (DIR_SEPARATOR): Delete macro.
21334 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
21336        * decl2.c (lang_decode_option): Handle automatic line wrapping
21337        option.
21339 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
21341         * friend.c (do_friend): Don't resolve scopes when processing
21342         template declarations, even if the qualifying scope doesn't
21343         involve template parameters.
21345 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
21347         * class.c (dfs_modify_vtables_queue_p): Remove.
21348         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
21349         and dfs_marked_real_bases_queue_p instead of
21350         dfs_modify_vtables_queue_p.
21352         * class.c (build_vbase_path): Simplify.
21353         (dfs_propagate_binfo_offsets): New function.
21354         (propagate_binfo_offsets): Use it.
21355         (remove_base_field): Simplify.
21356         (dfs_set_offset_for_vbases): Remove.
21357         (dfs_set_offset_for_shared_vbases): New function.
21358         (dfs_set_offset_for_unshared_vbases): Likewise.
21359         (layout_virtual_bases): Use them.
21360         (layout_basetypes): Don't call propagate_binfo_offsets.
21361         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
21362         for the vbases.
21364         * class.c (build_base_field): New function, split out from ...
21365         (build_base_fields): ... here.  Use it.  Allocate primary bases
21366         first, under the new ABI.
21367         (get_vtable_entry): Remove.
21368         (remove_base_field): New function, split out from ...
21369         (remove_base_fields): ... here.  Adjust since primary bases come
21370         first under the new ABI.
21372         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
21373         (initialize_vtbl_ptrs): New function.
21374         (expand_indirect_vtbls_init): Change prototype.
21375         (convert_pointer_to_vbase): Declare.
21376         * init.c (expand_direct_vtbls_init): Remove.
21377         (dfs_initialize_vtbl_ptrs): New function.
21378         (initialize_vtbl_ptrs): Likewise.
21379         (emit_base_init): Use initialize_vtbl_ptrs.
21380         * search.c (convert_pointer_to_vbase): Make it global.
21381         (expand_indirect_vtbls_init): Remove vtable initialization code.
21382         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
21384         * class.c (dfs_finish_vtbls): New function.
21385         (finish_vtbls): Use it.
21386         (dump_class_hierarchy): New function.
21388         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
21389         (BINFO_VBASE_PRIMARY_P): New macro.
21390         (BINFO_VIRTUALS): Add to documentation.
21391         (SET_BINFO_PRIMARY_MARKED_P): Remove.
21392         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
21393         (dfs_mark_primary_bases_queue_p): Likewise.
21394         (dfs_unmarked_real_bases_queue_p): New function.
21395         (dfs_marked_real_bases_queue_p): Likewise.
21396         * search.c (dfs_mark_primary_bases): Adjust.
21397         (mark_primary_bases): Likewise.
21398         (get_shared_vbase_if_not_primary): New function.
21399         (dfs_unmarked_real_bases_queue_p): Likewise.
21400         (dfs_marked_real_bases_queue_p): Likewise.
21401         (dfs_get_pure_virtuals): Simplify.
21402         (get_pure_virtuals): Likewise.
21404 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
21406         * lex.c: Include tm_p.h.
21408 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
21410         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
21412 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
21414         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
21415         * pt.c (instantiate_decl): Defer comdat templates that might not be
21416         needed.
21418         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
21419         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
21420         (finish_file): Likewise.
21422         * decl2.c (import_export_class): Undo 12/14 change.
21424         * error.c (dump_decl): operator new, not operatornew.
21426         * class.c (field_decl_cmp): A nontype is "greater" than a type.
21427         * search.c (lookup_field_1): Look for the last field with the
21428         desired name.
21430 2000-01-05  Nathan Sidwell  <nathan@acm.org>
21432         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
21433         FUNCTION_DECL.
21435 2000-01-05  Nathan Sidwell  <nathan@acm.org>
21437         * typeck.c (build_static_cast): Don't strip target qualifiers
21438         when casting from a class.
21440 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
21442         * class.c (warn_hidden): Initialize variable `fndecl'.
21444 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
21446         * decl.c (flag_isoc9x): New variable to be able to use code in
21447         c-common.c.  For now always zero.
21449 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
21451         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
21452         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
21453         or unshare_base_binfos for virtual bases here.
21454         * search.c (dfs_get_vbase_types): Do it here.
21455         (get_vbase_types): Adjust.
21457 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
21459         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
21460         (BINFO_PRIMARY_MARKED_P): Use flag 5.
21461         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
21462         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
21463         (unmark_primary_bases): Remove declaration.
21464         (unmarkedp): Declare.
21465         (dfs_vbase_unmark): Likewise.
21466         * class.c (determine_primary_base): Return immediately if there
21467         are no base classes.  Call mark_primary_bases here.
21468         (modify_all_direct_vtables): Remove.
21469         (modify_all_indirect_vtables): Remove.
21470         (dfs_modify_vtables_queue_p): New function.
21471         (dfs_modify_vtables): New function.
21472         (modify_all_vtables): Use them.
21473         (build_base_fields): Build FIELD_DECLs for primary virtual base
21474         classes.
21475         (create_vtable_ptr): Don't call determine_primary_base here.
21476         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
21477         (dfs_set_offset_for_vbases): ... this.
21478         (layout_virtual_bases): Use it.
21479         (layout_class_type): Call determine_primary_base here.
21480         * search.c (unmarkedp): Make it global.
21481         (shared_marked_p): Simplify.
21482         (shared_unmarked_p): Likewise.
21483         (dfs_primary_bases_queue_p): Remove.
21484         (dfs_unmark_primary_bases): Likewise.
21485         (unmark_primary_bases): Likewise.
21486         (mark_primary_bases): Simplify.
21487         (get_pure_virtuals): Don't call mark_primary_bases here.
21488         (dfs_vbase_unmark): New function.
21489         (get_vbase_types): Simplify.
21491         * class.c (struct base_info): Remove.
21492         (determine_primary_base): Take has_virtual_p rather than a
21493         base_info as input.  Don't calculate max_has_virtual.
21494         (finish_struct_bits): Remove max_has_virtual argument.
21495         (create_vtable_ptr): Remove max_has_virtual_p argument.
21496         (layout_virtual_bases): Remove max argument.
21497         (layout_basetypes): Likewise.
21498         (layout_class_type): Remove max_has_virtual_p argument.
21499         (finish_struct_1): Remove max_has_virtual.
21501         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
21502         (layout_basetypes): Remove.
21503         * class.c (propagate_binfo_offsets): Moved here from tree.c.
21504         Update to handle primary virtual bases.
21505         (remove_base_fields): New function, split out from
21506         layout_basetypes.
21507         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
21508         (layout_virtual_bases): New function, split out from
21509         layout_basetypes.  Update to handle primary virtual bases.
21510         (layout_basetypes): Moved here from tree.c.  Use
21511         remove_base_fields and layout_virtual_bases.
21512         * search.c (dfs_mark_primary_bases_queue_p): New function.
21513         (mark_primary_bases): Use it.
21514         * tree.c (CEIL): Remove.
21515         (propagate_binfo_offsets): Remove.
21516         (layout_basetypes): Remove.
21518 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
21520         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
21521         (BINFO_PRIMARY_MARKED_P): New macro.
21522         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
21523         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
21524         (mark_primary_bases): New function.
21525         (unmark_primary_bases): Likewise.
21526         * search.c (get_abstract_virtuals_1): Remove.
21527         (dfs_mark_primary_bases): New function.
21528         (mark_primary_bases): Likewise.
21529         (dfs_unmark_primary_bases): Likewise.
21530         (unmark_primary_bases): Likewise.
21531         (dfs_get_pure_virtuals): Likewise.
21533 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
21535         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
21536         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
21537         (modify_one_vtable): Adjust.
21538         (fixup_vtable_deltas1): Likewise.
21539         (override_one_vtable): Likewise.
21540         * search.c (get_abstract_virtuals_1): Likewise.
21541         (get_pure_virtuals): Likewise.
21542         (expand_upcast_fixups): Likewise.
21543         * tree.c (debug_binfo): Likewise.
21545         * class.c (build_vtable): Don't return a value.  Don't rebuild
21546         vtables for bases that have already been handled.
21547         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
21548         already been handled.
21549         (modify_one_vtable): Adjust accordingly.
21550         (fixup_vtable_deltas1): Likewise.
21551         (finish_struct_1): Likewise.
21553 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
21555         * call.c (build_new_method_call): Also check destructors.