Fix thinko.
[official-gcc.git] / gcc / cp / ChangeLog
blob9611f33a5a3f3c5f572125ebacf556cb2c3e29bb
1 2003-10-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3         Break out decl.c (2/n) 
4         * name-lookup.c: Include diagnostic.h
5         (cxx_binding_free): Make static.
6         (cxx_binding_make): Likewise.
7         (binding_table_new): Likewise
8         (binding_table_free): Likewise.
9         (binding_table_insert): Likewise.
10         (binding_table_find_anon_type): Likewise.
11         (binding_table_reverse_maybe_remap): Likewise.
12         (supplement_binding): Likewise.
13         * name-lookup.h (global_scope_name): Declare extern.
14         (global_type_node): Likewise.
15         (cxx_binding_free): Don't export.
16         (cxx_binding_make): Likewise.
17         (binding_table_new): Likewise.
18         (binding_table_free): Likewise.
19         (binding_table_insert): Likewise.
20         (binding_table_find_anon_type): Likewise.
21         (binding_table_reverse_maybe_remap): Likewise.
22         * Make-lang.in (cp/name-lookup.o): Depend on $(DIAGNOSTIC_H)
23         * decl.c (lookup_namespace_name): Move to name-lookup.c
24         (select_decl): Likewise.
25         (unqualified_namespace_lookup): Likewise.
26         (lookup_qualified_name): Likewise.
27         (lookup_name_real): Likewise.
28         (lookup_name_nonclass): Likewise.
29         (lookup_function_nonclass): Likewise.
30         (lookup_name): Likewise.
31         (lookup_name_current_level): Likewise.
32         (lookup_type_current_level): Likewise.
33         (lookup_flags): Likewise.
34         (qualify_lookup): Likewise.
35         (lookup_tag): Likewise.
36         (lookup_tag_reverse): Likewise.
37         (getdecls): Likewise.
38         (storedecls): Remove.
39         (cxx_remember_type_decls): Move to name-lookup.c.
40         (global_bindings_p): Likewise.
41         (innermost_nonclass_level): Likewise.
42         (toplevel_bindings_p): Likewise.
43         (namespace_bindings_p): Likewise.
44         (kept_level_p): Likewise.
45         (innermost_scope_kind): Likewise.
46         (template_parm_scope_p): Likewise.
47         (push_binding): Likewise.
48         (push_local_binding): Likewise.
49         (add_decl_to_level): Likewise.  Make extern.
50         (push_class_binding): Move to name-lookup.c.
51         (resume_level): Likewise.  Rename to resume_scope.
52         (begin_scope): Move to name-lookup.c.
53         (indent): Likewise.
54         (binding_depth): Likewise.
55         (is_class_level): Likewise.
56         (cxx_scope_descriptor): Likewise.
57         (cxx_scope_debug): Likewise.
58         (namespace_scope_ht_size): Likewise.
59         (leave_scope): Likewise.
60         (pushlevel_class): Likewise.
61         (poplevel_class): Likewise.
62         (clear_identifier_class_values): Likewise.
63         (pushdecl_with_scope): Likewise.
64         (pushdecl_namespace_level): Likewise.
65         (pushdecl_class_level): Likewise.
66         (push_class_level_binding): Likewise.
67         (push_using_directive): Likewise.
68         (identifier_global_value): Likewise.
69         (keep_next_level_flag): Likewise.
70         (keep_next_level): Likewise.
71         (free_binding_level): Likewise.
72         (set_class_shadows): Likewise.
73         (maybe_push_cleanup_level): Likewise.
74         (cp_namespace_decls): Likewise.
75         (bt_print_entry): Likewise.
76         (print_binding_level): Likewise.
77         (print_other_binding_stack): Likewise.
78         (print_binding_stack): Likewise.
79         (push_namespace): Likewise.
80         (pop_namespace): Likewise.
81         (push_nested_namespace): Likewise.
82         (pop_nested_namespace): Likewise.
83         (cxx_saved_binding_make): Likewise.
84         (struct cxx_saved_binding_make): Likewise.
85         (store_bindings): Likewise.
86         (maybe_push_to_top_level): Likewise.
87         (push_to_top_level): Likewise.
88         (pop_from_top_level): Likewise.
89         (identifier_type_value): Likewise.
90         (set_identifier_type_value): Likewise.
91         (set_identifier_type_value_with_scope): Likewise.
92         (pop_everything): Likewise.
93         (pushtag): Likewise.
94         (follow_tag_typedef): Likewise.
95         (maybe_process_template_type_declaration): Likewise.
96         (pop_binding): Likewise.
97         * cp-tree.h: Move corresponding declarations to name-lookup.h
98         
99 2003-10-12  Steven Bosscher  <steven@gcc.gnu.org>
101         * cvt.c (ocp_convert): Move warning to C common code.
103 2003-10-09  Jason Merrill  <jason@redhat.com>
105         PR c++/6392
106         * tree.c (build_cplus_array_type): Handle all quals the same.
107         (cp_build_qualified_type_real): Look through arrays first.
109         * tree.c (build_cplus_new): Use build_decl to create a VAR_DECL.
110         (build_target_expr_with_type): Likewise.
112         * pt.c (instantiate_class_template): Sanity check that our
113         enclosing class has been instantiated.
115 2003-10-08  Giovanni Bajo  <giovannibajo@libero.it>
117         * cp_tree.h: Added TFF_NO_FUNCTION_ARGUMENTS.
118         * error.c (dump_function_decl): Use it to skip the dump of the
119         arguments.
120         (dump_expr): When dumping a declaration found within an
121         expression, always set TFF_NO_FUNCTION_ARGUMENTS
122         in the flags.
124 2003-10-08  Giovanni Bajo <giovannibajo@libero.it>
126         PR c++/11097
127         * pt.c (tsubst_decl): Substitute also the DECL_NAME node of
128         USING_DECL.
130 2003-10-06  Mark Mitchell  <mark@codesourcery.com>
132         PR c++/10147
133         * call.c (initialize_reference): Tweak error message.
134         * cxx-pretty-print.h (cxx_pretty_printer_flags): Remove
135         pp_cxx_flag_qualified_id and pp_cxx_flag_global_scope.
136         * cxx-pretty-print.c (pp_cxx_id_expression): Always display
137         qualified entities using qualified names.
138         
139         PR c++/12337
140         * init.c (build_new_1): Make sure that the expression returned is
141         not an lvalue.
143         PR c++/12344, c++/12236, c++/8656
144         * decl.c (start_function): Do not ignore attributes embedded in a
145         function declarator.
147 2003-10-06  Mark Mitchell  <mark@codesourcery.com>
149         * Make-lang.in (c++.info): Remove.
150         (c++.dvi): Remove.
151         (c++.generated-manpages): Replace with ...
152         (generated-manpages): ... this.
154 2003-10-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
156         * decl.c (struct cp_binding_level): Move to name-lookup.h
157         (current_binding_level): Likewise.
158         (class_binding_level): Likewise.
159         * cp-tree.h (enum scope_kind): Likewise.
161 2003-10-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
163         * name-lookup.c (binding_entry_free): Nullify name and type
164         fields. 
166 2003-10-02  Mark Mitchell  <mark@codesourcery.com>
168         PR c++/12486
169         * typeck.c (finish_class_member_access_expr): Issue diagnostic
170         on erroneous use of qualified name.
172 2003-09-30  Richard Henderson  <rth@redhat.com>
174         * decl.c (duplicate_decls): Copy DECL_SAVED_INSNS too.
176 2003-09-30  Kelley Cook  <kelleycoook@wideopenwest.com>
178         * g++spec.c: Convert to ISO C90 prototypes.
179         * parser.c: Likewise.
181 2003-09-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
183         * decl.c (pop_binding): Don't mess with nullifying binding->scope
184         here. 
185         * name-lookup.c: Re-format.
186         (cxx_binding_free): Nullify binding->scope.
188 2003-09-29  Jan Hubicka  <jh@suse.cz>
190         PR C++/12047
191         * except.c (build_eh_type_type): Call mark_used on the type.
193 2003-09-28  Richard Henderson  <rth@redhat.com>
195         * typeck.c (c_expand_asm_operands): Take location_t, instead of
196         individual file and line.
198 2003-09-28  Andreas Jaeger  <aj@suse.de>
200         * decl.c (cxx_builtin_type_decls): Convert to ISO C90 function
201         definition.
202         * init.c (push_base_cleanups): Likewise.
203         * decl2.c (finish_file): Likewise.
204         * mangle.c (init_mangle): Likewise.
205         (dump_substitution_candidates): Likewise.
206         * search.c: Likewise.
208 2003-09-27  Gabriel Dos Reis  <gdr@integrable-solutions.net>
210         * name-lookup.h (get_global_value_if_present): New function.
211         (is_typename_at_global_scope): Likewise.
212         * except.c (do_begin_catch): Use get_global_value_if_present.
213         (do_end_catch): Likewise.
214         (do_allocate_exception): Likewise.
215         (do_free_exception): Likewise.
216         (build_throw): Likewise.
217         * parser.c (cp_parser_member_declaration): Likewise.
218         * rtti.c (throw_bad_cast): Likewise.
219         (throw_bad_typeid): Likewise.
220         * decl.c (check_tag_decl): Use is_typename_at_global_scope.
221         (grokdeclarator): Likewise.
222         * cp-tree.h (global_namespace): Move to name-lookup.h
223         * call.c (call_builtin_trap): Tidy.
225 2003-09-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
227         PR c++/11415
228         * parser.c (cp_parser_nested_name_specifier_opt): Issue correct
229         error message when parser->scope is global_namespace.
231 2003-09-27  Gabriel Dos Reis  <gdr@integrable-solutions.net>
233         * cp-tree.h, name-lookup.h, decl.c, decl2.c: Remove reference to
234         macros  BINDING_SCOPE, BINDING_VALUE and BINDING_TYPE.
236 2003-09-26  Gabriel Dos Reis  <gdr@integrable-solutions.net>
238         * decl.c (pop_binding_level, suspend_binding_level,
239         find_class_binding_level): Merge into leave_scope.  Remove.
240         (leave_scope):  New function.
241         (poplevel): Update.
242         (poplevel_class): Likewise.
243         (pop_namespace): Likewise.
245 2003-09-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
247         PR c++/5655
248         * parser.c (cp_parser_check_access_in_redeclaration): New function.
249         (cp_parser_member_declaration): Use it.
250         (cp_parser_template_declaration_after_export): Likewise.
252 2003-09-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
254         * cp-tree.h (scope_kind): Add new enumerator.
255         (keep_next_level): Change parameter type to bool.
256         (begin_scope):  Change prototype.
257         (pushlevel): Remove declaration.
258         * decl.c (push_binding_level): Fold in begin_scope.  Remove.
259         (struct cp_binding_level): Remove tag_tranparent field.  Make keep
260         of bitsize one.
261         (keep_next_level_flag): Make a bool.
262         (cxx_scope_descriptor): Update scope names table
263         (make_cxx_scope): Fold in begin_scope.  Remove..
264         (namespace_scope_ht_size): New function.
265         (begin_scope): Change prototype.  Return a scope.  Tidy.
266         (kept_level_p): Update.
267         (pushlevel): Remove.
268         (maybe_push_cleanup_level): Simplify.
269         (poplevel): Update for sk_cleanup and keep change.
270         (print_binding_level): Likewise.
271         (initial_push_namespace_scope): Fold in begin_scope.  Remove.
272         (push_namespace): Update.
273         (pushtag): Likewise.
274         (lookup_tag): Likewise.
275         (lookup_name_current_level): Likewise.
276         (lookup_type_current_level): Likewise.
277         (cxx_init_decl_processing): Likewise.
278         (start_function): Likewise.
279         (begin_function_body): Likewise.
280         (start_method): Likewise.
281         * pt.c (push_inline_template_parms_recursive): Likewise.
282         (begin_template_parm_list): Likewise.
283         (begin_specialization): Likewise.
284         * semantics.c (do_pushlevel): Likewise.
285         (begin_compound_stmt): Likewise.
286         (begin_stmt_expr): Likewise.
288 2003-09-21  Richard Henderson  <rth@redhat.com>
290         * class.c, cp-tree.h, decl.c, decl2.c, error.c, init.c,
291         method.c, optimize.c, pt.c, semantics.c, tree.c: Revert.
293 2003-09-21  Richard Henderson  <rth@redhat.com>
295         * class.c, cp-tree.h, decl.c, decl2.c, error.c, init.c,
296         method.c, optimize.c, pt.c, semantics.c, tree.c: Update for
297         DECL_SOURCE_LOCATION rename and change to const.
299 2003-09-20  Richard Henderson  <rth@redhat.com>
301         * decl.c, decl2.c, pt.c: Use %J in diagnostics.
303 2003-09-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
305         PR c++/157
306         * parser.c (cp_parser_direct_declarator): Clear
307         parser->num_template_parameter_lists when parsing function
308         parameters.
309         (cp_parser_constructor_declarator_p): Likewise.
311 2003-09-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
313         PR c++/495
314         * pt.c (tsubst_friend_class): Only use innermost template
315         arguments for the injected friend class template.
317 2003-09-19  Nathan Sidwell  <nathan@codesourcery.com>
319         PR c++/12332
320         * pt.c (instantiate_class_template): Increment
321         processing_template_decl around the tsubst of a template member
322         function.
324 2003-09-19  Gabriel Dos Reis  <gdr@integrable-solutions.net>
326         * decl.c (cxx_scope_descriptor): Fix thinko.
327         (struct cp_binding_level): Adjust type of binding_depth field. 
329 2003-09-18  Danny Smith  <dannysmith@users.sourceforge.net>
331         PR c++/12320
332         * call.c (type_passed_as): Check for incomplete type.
333         (convert_for_arg_passing): Likewise.
335 2003-09-18  Nathan Sidwell  <nathan@codesourcery.com>
337         PR c++/9848
338         * optimize.c (maybe_clone_body): Don't set MARK_USED on parameters
339         here.
340         * semantics.c (expand_body): Set it here on the remaining clones.
342 2003-09-18  Roger Sayle  <roger@eyesopen.com>
344         * lex.c (init_operators): Remove operator_name_info for FFS_EXPR.
345         * class.c (instantiate_type): Remove FFS_EXPR case.
347 2003-09-18  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
349         * ChangeLog: Fix recent commit.
351 2003-09-18  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
353         * ChangeLog: Add PR number to patch for PR c++/12316.
355 2003-09-18  Gabriel Dos Reis <gdr@integrable-solutions.net>
357         * error.c (dump_type): Simplify.  Use pp_type_specifier_seq for
358         "C" types. 
359         * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Fix thinko.
361 2003-09-17  Richard Henderson  <rth@redhat.com>
363         * semantics.c (expand_body): Don't save/restore input_location.
365 2003-09-17  Mark Mitchell  <mark@codesourcery.com>
367         PR c++/12266
368         * cp-tree.h (tsubst_flags_t): Add tf_conv.
369         * class.c (standard_conversion): Pass tf_conv to
370         instantiate_type.
371         (resolve_address_of_overloaded_function): Do not call mark_used
372         when just checking conversions.
374         PR debug/12066
375         * cp-lang.c (LANG_HOOKS_BUILTIN_TYPE_DECLS): Define.
376         * cp-tree.h (cxx_builtin_type_decls): Declare.
377         * decl.c (builtin_type_decls): New variables.
378         (cxx_builtin_type_decls): New function.
379         (record_builtin_type): Add to builtin_type_decls.
381 2003-09-17  Richard Henderson  <rth@redhat.com>
383         PR c++/12316
384         * semantics.c (expand_or_defer_fn): Inc/dec function_depth.
386 2003-09-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
388         PR c++/7939
389         * typeck.c (comptypes): Don't ICE when its first argument is
390         error_mark_node.
391         (compparms): Reverse the arguments of same_type_p.
393 2003-09-15  Nathan Sidwell  <nathan@codesourcery.com>
395         PR c++/12184
396         * typeck.c (convert_arguments): Return error_mark_node for an
397         incomplete parameter. Make error message more informative.
399 2003-09-12  Mark Mitchell  <mark@codesourcery.com>
401         PR c++/3907
402         * class.c (maybe_note_name_used_in_class): Refine test for whether
403         or not we are in a class scope.
405         * cp-tree.h (language_function): Remove x_expanding_p.
406         (expanding_p): Remove.
407         (doing_semantic_analysis_p): Remove.
408         (scope_kind): Add sk_function_parms, sk_class,
409         sk_namespace.
410         (innermost_scope_kind): New method.
411         * call.c (cxx_type_promotes_to): Use type_decays_to.
412         * cp-lang.c (LANG_HOOKS_PUSHLEVEL): Redefine.
413         (LANG_HOOKS_POPLEVEL): Likewise.
414         * decl.c (cp_binding_level): Remove parm_flag, template_parms_p,
415         template_spec_p, namespace_p, is_for_scope, is_try_scope, and
416         is_catch_scope.  Add kind and explicit_spec_p.
417         (cxx_scope_descriptor): Use a lookup table.
418         (find_class_binding_level): Use "kind" field in binding_level, not
419         the various flags.
420         (pop_binding_level): Likewise.
421         (innermost_nonclass_level): Likewise.
422         (toplevel_bindings_p): Likewise.
423         (namespace_bindings_p): Likewise.
424         (template_parm_scope_p): Likewise.
425         (innermost_scope_kind): New method.
426         (current_tmpl_spec_kind): Use "kind" field in binding_level, not
427         the various flags.
428         (pushlevel): Remove check for doing_semantic_analysis_p.
429         (begin_scope): Simplify.
430         (add_decl_to_level): Use "kind" field in binding_level, not
431         the various flags.
432         (push_local_binding): Likewise.
433         (pop_label): Remove check for doing_semantic_analysis_p.
434         (poplevel): Use "kind" field in binding_level, not
435         the various flags.
436         (set_block): Remove check for doing_semantic_analysis_p.
437         (pushlevel_class): Use "kind" field in binding_level, not
438         the various flags. 
439         (poplevel_class): Likewise.
440         (initial_push_namespace_scope): Likewise.
441         (maybe_push_to_top_level): Likewise.
442         (set_identifier_type_value_with_scope): Likewise.
443         (pop_everything): Likewise.
444         (maybe_process_template_type_declaration): Likewise.
445         (pushtag): Likewise.
446         (pushdecl): Likewise.
447         (pushdecl_with_scope): Likewise.
448         (check_previous_goto_1): Likewise.
449         (define_label): Likewise.
450         (finish_case_label): Likewise.
451         (lookup_tag): Likewise.
452         (unqualified_namespace_lookup): Likewise.
453         (lookup_name_real): Likewise.
454         (lookup_name_current_level): Likewise.
455         (lookup_type_current_level): Likewise.
456         (record_builtin_type): Likewise.
457         (cp_make_fname_decl): Likewise.
458         (maybe_inject_for_scope_var): Likewise.
459         (cp_finish_decl): Remove check for doing_semantic_analysis_p.
460         (start_function): Use begin_scope, not pushlevel.
461         (finish_function): Use "kind" field in binding_level, not
462         the various flags.
463         (start_method): Use begin_scope, not pushlevel.
464         (make_label_decl): Do not check expanding_p.
465         (save_function-data): Do not set expanding_p.
466         (cxx_push_function_context): Do not clear expanding_p.
467         * semantics.c (cxx_expand_function_start): Do not set expanding_p.
468         
469 2003-09-14  Mark Mitchell  <mark@codesourcery.com>
471         * class.c (layout_class_type): Make DECL_MODE match TYPE_MODE for
472         an bit-field whose width exceeds that of its type.
474 2003-09-14  Geoffrey Keating  <geoffk@apple.com>
476         * rtti.c (get_tinfo_decl): Set TREE_PUBLIC for typeinfo decls.
478 2003-09-14  Kazu Hirata  <kazu@cs.umass.edu>
480         * ChangeLog: Follow spelling conventions.
481         * parser.c: Likewise.
483 2003-09-13  Richard Henderson  <rth@redhat.com>
485         * decl2.c (finish_file): Check cgraph_assemble_pending_functions
486         during relaxation loop.
488 2003-09-11  David Edelsohn  <edelsohn@gnu.org>
490         * decl2.c (var_finalized_p): Swap arms of conditional.
492 2003-09-10  Nathan Sidwell  <nathan@codesourcery.com>
494         PR c++/11788
495         * typeck.c (build_address): If it is a function, mark it used.
496         (build_unary_op): Do not lose object's side-effects when taking
497         address of static member function.
498         * class.c (resolve_address_of_overloaded_function): Use
499         tsubst_flags_t parameter. Only expect overload sets. Adjust.
500         (instantiate_type): Adjust flags passing. Do not lose object's
501         side-effects when taking address of static member function.
503 2003-09-11  Richard Henderson  <rth@redhat.com>
505         * semantics.c (expand_or_defer_fn): Update for new
506         cgraph_finalize_function argument.
508 2003-09-10  Richard Henderson  <rth@redhat.com>
510         * decl2.c (cxx_callgraph_analyze_expr): Mark argument unused.
512 2003-09-10  Jan Hubicka  <jh@suse.cz>
514         * decl2.c (var_finalized_p): New.
515         (maybe_emit_vtables, write_out_vars, finish_file): Use it.
517 2003-09-10  Richard Henderson  <rth@redhat.com>
519         * decl2.c (cxx_callgraph_analyze_expr): New, from corpse of
520         mark_member_pointers.
521         (lower_function): Remove.
522         * cp-tree.h: Update to match.
523         * cp-lang.c (LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR): New.
524         (LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Remove.
526 2003-09-09  Richard Henderson  <rth@redhat.com>
528         * semantics.c (expand_or_defer_fn): Update call to 
529         cgraph_finalize_function.
531         * semantics.c (expand_or_defer_fn): Use cgraph_finalize_function
532         always.
534         * decl2.c (finish_file): Avoid out-of-bounds array reference
535         during memmove.
537 2003-09-09  Richard Henderson  <rth@redhat.com>
539         * decl2.c (mark_member_pointers): Rename from
540         mark_member_pointers_and_eh_handlers and don't check eh handlers.
542 2003-09-09  Christian Ehrhardt  <ehrhardt@mathematik.uni-ulm.de>
544         PR bootstrap/12168
545         * method.c (use_thunk): Clear DECL_RTL of copied nodes.
547 2003-09-08  Mark Mitchell  <mark@codesourcery.com>
549         * cp-lang.c (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define to
550         c_register_builtin_type.
552         PR c++/11786
553         * decl2.c (add_function): Do not complain about seeing the same
554         non-function twice.
555         * semantics.c (perform_koenig_lookup): Improve documentation.
557         PR c++/5296
558         * pt.c (try_one_overload): Add addr_p parameter.
559         (resolve_overloaded_unification): Pass it.
561 2003-09-08  Richard Henderson  <rth@redhat.com>
563         * optimize.c (maybe_clone_body): Inc/dec function_depth.
565 2003-09-08  Richard Henderson  <rth@redhat.com>
567         * decl.c (finish_function): Clear current_function_decl.
568         * decl2.c (mark_used): Don't push/pop gc context.
569         * optimize.c (optimize_function): Likewise.
570         * tree.c (cp_cannot_inline_tree_fn): Likewise.
571         * pt.c (instantiate_decl): Inc/dec function_depth instead.
572         * semantics.c (expand_body): Update for tree_rest_of_compilation
573         nested argument.
575 2003-09-07  Gabriel Dos Reis  <gcc@integrable-solutions.net>
577         PR c++/11762
578         * error.c (dump_decl): Handle namespace-alias-definition.
579         * decl.c (warn_extern_redeclared_static): There is no point in
580         checking changes in storage class specifier for a namespace
581         declaration. 
582         (duplicate_decls): Tidy diagnostic message.
583         * cxx-pretty-print.c (pp_cxx_left_brace): New macro.
584         (pp_cxx_right_brace): Likewise.
585         (pp_cxx_original_namespace_definition): New function.
586         (pp_cxx_namespace_alias_definition): Likewise.
587         (pp_cxx_declaration): Use them.  Handle NAMESPACE_DECLs.
589 2003-09-07  Jan Hubicka  <jh@suse.cz>
591         * decl2.c (maybe_emit_vtables, write_out_vars, finish_file):
592         Avoid re-emitting variables in unit-at-a-time mode.
594 2003-09-06  Mark Mitchell  <mark@codesourcery.com>
596         PR c++/11867
597         * call.c (standard_conversion): Improve comments.
598         (perform_direct_initialization): Make sure we return an expression
599         of the correct type.
600         * typeck.c (build_static_cast): Check for ambiguity and
601         accessibility when performing conversions.
603 2003-09-06  Gabriel Dos Reis  <gdr@integrable-solutions.net>
605         * cp-tree.h (add_binding): Remove declaration.
606         * name-lookup.h (supplement_binding): Declare.
607         * decl.c (add_binding): Move to name-lookup.c.
608         (push_local_binding): Adjust.
609         (push_class_binding): Likewise.
610         (set_identifier_type_value_with_scope): Likewise.
611         * name-lookup.c (supplement_binding): Rename from add_binding.
612         Return a bool.  Improve documentation. 
613         (set_namespace_binding): Adjust.
614         * Make-lang.in (cp/name-lookup.o): Depend on toplev.h
616 2003-09-06  Nathan Sidwell  <nathan@codesourcery.com>
618         PR c++/11794
619         * class.c (pushclass): Push dependent using decls for nested
620         classes of templates too.
622 2003-09-06  Roger Sayle  <roger@eyesopen.com>
624         PR c++/11409
625         * class.c (resolve_address_of_overloaded_function): When building
626         list of matching non-template function decls, ignore anticipated
627         declarations of undeclared or shadowed GCC builtins.
629 2003-09-06  Steven Bosscher  <steven@gcc.gnu.org>
631         PR c++/11595
632         * decl.c (define_label): Remove unreachable timevar pop.
633         Always return the decl, even if the definition is invalid.
635 2003-09-06  Nathan Sidwell  <nathan@codesourcery.com>
637         PR c++/12167
638         * parser.c (cp_parser_late_parsing_default_args): Push & pop the
639         unparsed functions queue.
641 2003-09-05  Mark Mitchell  <mark@codesourcery.com>
643         PR c++/12163
644         * call.c (perform_direct_initialization): Correct logic for
645         direct-initialization of a class type.
647         PR c++/12146
648         * pt.c (lookup_template_function): Robustify.
650 2003-09-05  Nathan Sidwell  <nathan@codesourcery.com>
652         PR c++/11922
653         * pt.c (tsubst_qualified_id): Make sure we get a non-type.
654         (tsubst_expr, tsubst_copy_and_build): Pass false, not zero, as
655         is_type_p to lookup_qualified_name.
657         * semantics.c (finish_call_expr): Refactor some code.
659         PR c++/12037
660         * cp-tree.h (COMPOUND_EXPR_OVERLOADED): New.
661         (build_min_non_dep): Declare.
662         * tree.c (build_min): Propagate TREE_SIDE_EFFECTS.
663         (build_min_non_dep): New.
664         * cvt.c (convert_to_void): Don't explicitly copy
665         TREE_SIDE_EFFECTS, TREE_NO_UNUSED_WARNING.
666         * call.c (build_new_method_call): Use build_min_non_dep.
667         * decl2.c (grok_array_decl): Likewise.
668         (build_offset_ref_call_from_tree): Likewise.
669         * typeck.c (finish_class_member_access_expr,
670         build_x_indirect_ref, build_x_binary_op, build_x_unary_op,
671         build_x_conditional_expr, build_x_compound_expr): Likewise.
672         (build_static_cast, build_reinterpret_cast,
673         build_const_cast): Propagate TREE_SIDE_EFFECTS inside a template.
674         * typeck2.c (build_x_arrow): Use build_min_non_dep.
675         (build_functional_cast): Propagate TREE_SIDE_EFFECTS inside a
676         template.
677         * rtti.c (build_dynamic_cast_1): Set DECL_IS_PURE.
678         (build_dynamic_cast): Set TREE_SIDE_EFFECTS.
679         * pt.c (build_non_dependent_expr): Check COMPOUND_EXPR_OVERLOADED.
681 2003-09-04  Richard Henderson  <rth@redhat.com>
683         * decl2.c (mark_member_pointers_and_eh_handlers): Update for
684         change in cgraph_mark_needed_node arguments.
686 2003-09-02  Geoffrey Keating  <geoffk@apple.com>
688         PR 12161
689         * decl2.c (mark_used): Use ggc_push_context/ggc_pop_context.
690         * tree.c (cp_cannot_inline_tree_fn): Likewise.
692 2003-09-04  Nathan Sidwell  <nathan@codesourcery.com>
694         * cp-tree.h (finish_sizeof, finish_alignof): Remove.
695         (expr_sizeof): Replace with ...
696         (cxx_sizeof_or_alignof_expr): ... here.
697         (cxx_sizeof_or_alignof_type): Make complain parameter a bool.
698         * parser.c (cp_parser_unary_expression): Commonize alignof and
699         sizeof handling.
700         * pt.c (tsubst_copy_and_build): Adjust alignof and sizeof
701         substitution.
702         * semantics.c (finish_sizeof, finish_alignof): Remove.
703         * typeck.c (cxx_sizeof_or_alignof_type): Complain parameter
704         becomes bool. Set TREE_READONLY.
705         (expr_sizeof): Replace with ...
706         (cxx_sizeof_or_alignof_expr): ... here. Clear TREE_SIDE_EFFECTS.
708 2003-09-04  Mark Mitchell  <mark@codesourcery.com>
710         Remove cast-as-lvalue extension.
711         * call.c (build_conditional_expr): Correct formatting.
712         (convert_like_real): Use lvalue_p, not non_cast_lvalue_p.
713         (initialize_real): Use real_lvalue_p, not real_non_cast_lvalue_p.
714         * cp-tree.h (non_cast_lvalue_p): Remove.
715         (real_non_cast_lvalue_p): Remove.
716         (non_cast_lvalue_or_else): Remove.
717         * tree.c (lvalue_p_1): Remove allow_cast_as_lvalue parameter.
718         (real_lvalue_p): Adjust call to lvalue_p_1.
719         (non_cast_lvalue_p): Remove.
720         (non_cast_lvalue_or_else): Remove.
721         (lvalue_p): Adjust call to lvalue_p_1.
722         (lvalue_or_else): Simplify.
723         * typeck.c (build_unary_op): Use lvalue_or_else, not
724         non_cast_lvalue_or_else.
725         (build_static_cast): Use real_lvalue_p, not real_non_cast_lvalue_p.
727 2003-09-03  DJ Delorie  <dj@redhat.com>
729         * decl.c (finish_function): Pass fndecl to aggregate_value_p.
731 2003-09-03  Mark Mitchell  <mark@codesourcery.com>
733         PR c++/12053
734         * class.c (include_empty_classes): Correct logic for ABI version 1.
736 2003-09-03  Richard Henderson  <rth@redhat.com>
738         * optimize.c (optimize_function): Push/pop ggc context around
739         the call to optimize_inline_calls.
741 2003-09-02  Scott Brumbaugh  <scottb.lists@verizon.net>
743         PR c++/11553
744         * parser.c (cp_parser_decl_specifier_seq): Add check for a
745         duplicate friend decl-specifier.
747 2003-09-02  Mark Mitchell  <mark@codesourcery.com>
749         PR c++/11847
750         * pt.c (convert_nontype_argument): Correct representation of
751         REFERENCE_TYPE expressions.
753         PR c++/11808
754         * cp-tree.h (KOENIG_LOOKUP_P): New macro.
755         (finish_call_expr): Change prototype.
756         * parser.c (cp_parser_postfix_expression): Adjust call to
757         finish_call_expr.
758         * pt.c (tsubst_copy_and_build): Use KOENIG_LOOKUP_P.
759         * semantics.c (finish_call_expr): Add koenig_p parameter.
761 2003-09-01  Mark Mitchell  <mark@codesourcery.com>
763         PR c++/12114
764         * cp-tree.h (initialize_reference): Change prototype.
765         * call.c (initialize_reference): Add cleanup parameter.
766         * decl.c (grok_reference_init): Likewise.
767         (check_initializer): Likewise.
768         (cp_finish_decl): Insert a CLEANUP_STMT if necessary.
769         (duplicate_decls): When replacing an anticipated builtin, do not
770         honor TREE_NOTHROW.
771         * typeck.c (convert_for_initialization): Correct call to
772         initialize_reference.
774         PR c++/11972
775         * pt.c (dependent_type_p_r): Pass only the innermost template
776         arguments to any_dependent_template_arguments_p.
778 2003-09-01  Josef Zlomek  <zlomekj@suse.cz>
780         * error.c (dump_expr): Kill BIT_ANDTC_EXPR.
781         * lex.c (init_operators): Kill BIT_ANDTC_EXPR.
782         * pt.c (tsubst_copy): Kill BIT_ANDTC_EXPR.
783         * typeck.c (build_binary_op): Kill BIT_ANDTC_EXPR.
784         (tsubst_copy_and_build): Kill BIT_ANDTC_EXPR.
786 2003-08-29  Mark Mitchell  <mark@codesourcery.com>
788         PR c++/12093
789         * pt.c (build_non_dependent_expr): Do not build a
790         NON_DEPENDENT_EXPR for a STRING_CST.
792         PR c++/11928
793         * search.c (add_conversions): Avoid adding two conversion
794         operators for the same type.
796 2003-08-29  Mark Mitchell  <mark@codesourcery.com>
798         PR c++/6196
799         * pt.c (tsubst_copy_and_build): Correct handling of
800         address-of-label extension.
801         * semantics.c (finish_goto_stmt): The address of a label must go
802         through the lvalue-to-rvalue conversion.
804 2003-08-29  Richard Henderson  <rth@redhat.com>
805             Jason Merrill <jason@redhat.com>
807         * cp-lang.c (LANG_HOOKS_RTL_EXPAND_START): New.
808         (LANG_HOOKS_RTL_EXPAND_STMT): New.
809         * cp-tree.h (cxx_expand_function_start): Declare.
810         * decl.c (start_function): Use allocate_struct_function.
811         Move stmts_are_full_exprs_p assertion from expand_body.
812         Do not free_after_parsing or free_after_compilation.
813         (cxx_push_function_context): Move code to set struct function
814         data from genrtl_start_function.
815         * optimize.c (optimize_function): Don't inc/dec function_depth.
816         * semantics.c (expand_body): Use tree_rest_of_compilation.
817         (cxx_expand_function_start): Rename from genrtl_start_function,
818         omit bits done by tree_rest_of_compilation.
819         (genrtl_finish_function): Remove.
820         (clear_decl_rtl): Move to ../tree-optimize.c.
822 2003-08-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
824         PR c++/11811
825         * cxx-pretty-print.c (pp_cxx_canonical_template_parameter): New
826         function. 
827         * cxx-pretty-print.h: Declare.
828         * error.c (dump_template_parameter): Use it.
829         (dump_type): Likewise.
831 2003-08-28  Mark Mitchell  <mark@codesourcery.com>
833         * init.c (decl_constant_value): Deal with COND_EXPR specially.
834         * call.c (build_conditional_expr): Revert previous patch.
836         PR optimization/5079
837         * call.c (build_conditional_expr): Use decl_constant_value to
838         simplify the arguments.
840 2003-08-26  Dan Nicolaescu  <dann@ics.uci.edu>
842         * parser.c (struct cp_token): Use enum bitfields.
843         (CP_TOKEN_BLOCK_NUM_TOKENS): Make sure cp_token_block fits in a
844         512B allocation unit.
845         (cp_parser_token_tree_map_node): Use enum bitfields.
847 2003-08-26  Nathan Sidwell  <nathan@codesourcery.com>
849         PR c++/11871
850         * decl.c (push_class_level_binding): Correct old_decl value from
851         my 2003-07-29 reorganization.
853         * call.c (build_call): Don't set TREE_SIDE_EFFECTS here.
854         (build_new_method_call): Add goto finish.
855         * semantics.c (simplify_aggr_init_exprs_r): Don't set
856         TREE_SIDE_EFFECTS on a call.
858 2003-08-25  Richard Henderson  <rth@redhat.com>
860         * cxx-pretty-print.c (pp_cxx_class_name): Remove unused function.
862 2003-08-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
864         * cxx-pretty-print.h (pp_cxx_flag_default_argument): New flag.
865         (cxx_pretty_printer): Adjust base type.
866         (pp_cxx_function_specifier): Declare.
867         * cxx-pretty-print.c (pp_cxx_whitespace): New macro.
868         (pp_cxx_left_paren): Likewise.
869         (pp_cxx_right_paren): Likewise.
870         (pp_cxx_dot): Likewise.
871         (pp_cxx_arrow): Likewise.
872         (pp_cxx_semicolon): Likewise.
873         (pp_cxx_identifier): Likewise.
874         (pp_cxx_cv_qualifier_seq): Likewise.
875         (pp_cxx_storage_class_specifier): Likewise.
876         (pp_cxx_expression_list): Likewise.
877         (pp_cxx_space_for_pointer_operator): Likewise.
878         (pp_cxx_init_declarator): Likewise.
879         (pp_cxx_call_argument_list): Likewise.
880         (pp_cxx_nonconsecutive_character): Tidy.
881         (pp_cxx_conversion_function_id): New function.
882         (pp_cxx_template_id): Likewise.
883         (pp_cxx_template_keyword_if_needed): Likewise.
884         (pp_cxx_nested_name_specifier): Likewise.
885         (pp_cxx_unqualified_id): Tidy
886         (pp_cxx_qualified_id): Handle more nodes.
887         (pp_cxx_primary_expression): Tidy.
888         (pp_cxx_postfix_expression): Likewise.
889         (pp_cxx_new_expression): Tidy.
890         (pp_cxx_delete_expression): Likewise.
891         (pp_cxx_cast_expression): New function.
892         (pp_cxx_pm_expression): Tidy.
893         (pp_cxx_conditional_expression): Likewise.
894         (pp_cxx_assignment_operator): New function.
895         (pp_cxx_assignment_expression): Tidy.
896         (pp_cxx_expression): New function.
897         (pp_cxx_function_specifier): Likewise.
898         (pp_cxx_decl_specifier_seq): Likewise.
899         (pp_cxx_simple_type_specifier): Tidy.
900         (pp_cxx_type_specifier_seq): Likewise.
901         (pp_cxx_ptr_operator): New function.
902         (pp_cxx_implicit_parameter_type): Likewise.
903         (pp_cxx_parameter_declaration): Tidy.
904         (pp_cxx_parameter_declaration_clause): New function.
905         (pp_cxx_exception_specification): Likewise.
906         (pp_cxx_direct_declarator): Tidy.
907         (pp_cxx_declarator): Likewise.
908         (pp_cxx_ctor_initializer): New function.
909         (pp_cxx_function_definition): Likewise.
910         (pp_cxx_abstract_declarator): Tidy.
911         (pp_cxx_direct_abstract_declarator): Likewise.
912         (pp_cxx_type_id): Likewise.
913         (pp_cxx_exception_declaration): New function.
914         (pp_cxx_statement): Likewise.
915         (pp_cxx_simple_declaration): Likewise.
916         (pp_cxx_template_parameter_list): Likewise.
917         (pp_cxx_template_parameter): Likewise.
918         (pp_cxx_template_declaration): Likewise.
919         (pp_cxx_explicit_specialization): Likewise.
920         (pp_cxx_explicit_instantiation): Likewise.
921         (pp_cxx_declaration): Tidy.
922         (pp_cxx_pretty_printer_init): Initialize more fields.
924 2003-08-25  Mark Mitchell  <mark@codesourcery.com>
926         PR c++/8795
927         * cp-tree.h (build_cplus_method_type): Remove.
928         * call.c (standard_conversion): Use build_method_type_directly
929         instead of build_cplus_method_type.
930         * class.c (build_clone): Likewise.
931         (adjust_clone_args): Likewise.
932         * decl.c (build_ptrmem_type): Likewise.
933         (grokdeclarator): Likewise.
934         (check_function_type): Likewise.
935         * decl2.c (grok_method_quals): Likewise.
936         (maybe_retrofit_in_chrg): Likewise.
937         * pt.c (copy_default_args_to_explicit_spec): Likewise.
938         (tsubst_function_type): Likewise.
939         (tsubst): Likewise.
940         * tree.c (build_cplus_method_type): Remove.
941         * typeck.c (merge_types): Use build_method_type_directly.
943 2003-08-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
945         PR c++/3765
946         * search.c (dfs_access_in_type): Fix typo in comment.
947         (dfs_accessible_queue_p): Likewise.
948         (dfs_accessible_p): Only terminate when a friend is found.
949         (accessible_p): Return immediately if access_in_type allows
950         access.
952 2003-08-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
954         PR c++/641, c++/11876
955         * friend.c (add_friend): Add complain parameter.
956         (make_friend_class): Likewise.
957         (do_friend): Adjust add_friend call.
958         * decl.c (grokdeclarator): Adjust make_friend_class call.
959         * parser.c (cp_parser_member_declaration): Likewise.
960         (cp_parser_template_declaration_after_export): Likewise.
961         * pt.c (instantiate_class_template): Adjust make_friend_class
962         and add_friend call.
963         * cp-tree.h (make_friend_class): Adjust declaration.
964         (add_friend): Likewise.
966 2003-08-21  Jason Merrill  <jason@redhat.com>
968         PR c++/11283
969         * call.c (build_conditional_expr): Ignore cv-qual differences for
970         non-class types.
972 2003-08-21  Mark Mitchell  <mark@codesourcery.com>
974         PR c++/11551
975         * parser.c (cp_parser_id_expression): Add declarator_p parameter.
976         (cp_parser_primary_expression): Adjust call to
977         cp_parser_id_expression.
978         (cp_parser_unqualified_id): Complain about the use of
979         typedef-names in a destructor declarator.
980         (cp_parser_postfix_expression): Adjust call to
981         cp_parser_id_expression.
982         (cp_parser_type_parameter): Likewise.
983         (cp_parser_template_argument): Likewise.
984         (cp_parser_declarator_id): Likewise.
986         PR c++/11919
987         * call.c (standard_conversion): Use same_type_p, not pointer
988         equality, to compare types.
990         PR c++/10762
991         * parser.c (cp_parser_using_declaration): Check for invalid uses
992         of template-ids here...
993         * decl2.c (do_class_using_decl): ... rather than here.
995 2003-08-20  Mark Mitchell  <mark@codesourcery.com>
997         PR c++/11834
998         * pt.c (more_specialized): Bump processing_template_decl.
1000 2003-08-21  Jason Merrill  <jason@redhat.com>
1002         PR c++/11614
1003         * decl.c (grokdeclarator): Recognize a flexible array based on the
1004         type, not the form of the declarator.
1006 2003-08-20  Jason Merrill  <jason@redhat.com>
1008         * semantics.c (simplify_aggr_init_expr): Split out from
1009         simplify_aggr_init_exprs_r.  Convert slot address to match
1010         the return type.
1011         * cp-tree.h: Declare it.
1012         * tree.c (cp_copy_res_decl_for_inlining): Don't clobber the
1013         DECL_NAME of a user variable.
1015 2003-08-20  Nathan Sidwell  <nathan@codesourcery.com>
1017         PR c++/11945
1018         * pt.c (build_non_dependent_expr): Look inside COND_EXPR and
1019         COMPOUND_EXPR.
1020         * semantics.c (finish_expr_stmt): Always convert to void.
1021         * typeck.c (build_x_compound_exp): Always convert to void.
1023 2003-08-19  Mark Mitchell  <mark@codesourcery.com>
1025         PR c++/11684
1026         * cp-tree.h (grok_op_properties): Change prototype.
1027         * decl.c (grok_op_properties): Add complain parameter.
1028         (grokfndecl): Pass it.
1029         * pt.c (tsubst_decl): Adjust accordingly.
1031         PR c++/10926
1032         * decl.c (start_method): Return immediately if push_template_decl
1033         does not like the declaration.
1034         * pt.c (push_template_decl_real): Disallow member template
1035         destructors.
1037         PR c++/11036
1038         * cp-tree.h (add_binding): Add prototype.
1039         * class.c (add_method): Set TYPE_HAS_DESTRUCTOR if appropriate.
1040         (maybe_warn_about_overly_private_class): Use
1041         CLASSTYPE_DESTRUCTORS.
1042         (pushclass): Adjust call to set_identifier_type_value.
1043         * decl.c (add_binding): Give it external linkage.
1044         (push_local_binding): Adjust call to add_binding.
1045         (push_class_binding): Likewise.
1046         (set_identifier_type_value_with_scope): Change prototype.  Use
1047         add_binding for global bindings.
1048         (set_identifier_type_value): Adjust accordingly.
1049         (pushtag): Likewise.
1050         (pushdecl): Use set_identifier_type_value, not
1051         set_identifier_type_value_with_scope.
1052         (pushdecl_namespace_level): Adjust calls to
1053         SET_IDENTIFIER_TYPE_VALUE to pass a DECL.
1054         (pushdecl_class_level): Likewise.
1055         (lookup_tag): Use select_decl.
1056         (select_decl): Improve comment.
1057         (record_builtin_type): Do not call pushdecl.
1058         (cxx_init_decl_processing): Do not call xref_tag for bad_alloc.
1059         (cp_finish_decl): Adjust call to set_identifier_type_value.
1060         (check_elaborated_type_specifier): Improve checks for invalid uses
1061         of typedefs.
1062         (xref_tag): Adjust call to check_elaborated_type_specifier.
1063         * decl2.c (grokclassfn): Do not set TYPE_HAS_DESTRUCTOR.
1064         * name-lookup.c (set_namespace_binding): Use add_binding.
1065         * parser.c (cp_parser_simple_type_specifier): Return a TYPE_DECL,
1066         rather than an IDENTIFIER_NODE, to represent built-in types, if
1067         requested by the caller.
1068         (cp_parser_postfix_expression): Adjust call.
1069         (cp_parser_type_specifier): Likewise.
1070         (cp_parser_elaborated_type_specifier): Adjust call to
1071         check_elaborated_type_specifier.
1072         * typeck2.c (build_functional_cast): Do not perform name lookups.
1074         PR c++/10717
1075         * decl.c (expand_static_init): Remove unncessary code.
1077 2003-08-19  Andrew Pinski  <pinskia@physics.uc.edu>
1079         PR c++/10538, PR c/5582
1080         * cp/cp-lang.c (LANG_HOOKS_DECL_UNINIT): Define.
1082 2003-08-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1084         PR c++/11174
1085         * init.c (build_offset_ref): Perform access checking for
1086         pointer to member correctly.
1088 2003-08-19  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1090         * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTICS): Fix spelling.
1092 2003-08-18  Nathan Sidwell  <nathan@codesourcery.com>
1094         PR c++/11957
1095         * cp-tree.h (finish_stmt_expr): Add bool parameter.
1096         * init.c (finish_init_stmts): Pass true to finish_stmt_expr. Don't
1097         adjust the stmt_expr here.
1098         (build_vec_init): Use finish_stmt_expr_expr, convert result to
1099         array type.
1100         * parser.c (cp_parser_primar_expression): Adjust finish_stmt_expr
1101         call.
1102         * pt.c (tsubst_copy): Likewise.
1103         * semantics.c (finish_stmt_expr): Add parameter.
1105         * pt.c (instantiate_class_template): Push to class's scope before
1106         tsubsting base.
1108 2003-08-17  Jan Hubicka  <jh@suse.cz>
1110         PR C++/11702
1111         * semantics.c (finish_id_expression): Mark all functions as used.
1113 2003-08-16  Nathan Sidwell  <nathan@codesourcery.com>
1115         PR c++/11512
1116         * cvt.c (convert_to_void): Indicate which side of conditional has
1117         no effects, and rhs of comma operator. Test for no sideeffect
1118         expressions here and always build a convert expr.
1119         * init.c (expand_default_init): Convert the init to void.
1120         * typeck.c (build_x_compound_expr): Do not check for side effects
1121         here.
1122         (build_compound_expr): Do not convert lhs when building a
1123         template.
1125 2003-08-15  Nathan Sidwell  <nathan@codesourcery.com>
1127         * cp-tree.def (NON_DEPENDENT_EXPR): Add operand.
1128         * decl2.c (build_offset_ref_call_from_tree): Use
1129         build_non_dependent_expr.
1130         * error.c (dump_expr) <NON_DEPENDENT_EXPR case>: Dump the operand.
1131         * pt.c (build_non_dependent_expr): Set operand.
1133 2003-08-14  Jan Hubicka  <jh@suse.cz>
1135         * decl2.c (mark_member_pointers): Rename to...
1136         (mark_member_pointers_and_eh_tinfos): ... this one; deal with eh tinfos
1137         (lower_function): Update call.
1138         * except.c (eh_type_info): Break out from ...
1139         (build_eh_type): ... here; tinfo is already used.
1140         (finish_eh_spec_block): Mark tinfos as used.
1141         * semantics.c (finish_handler_params): Mark tinfo as used.
1142         * cp-tree.h (eh_type_info): Declare.
1144 2003-08-15  Nathan Sidwell  <nathan@codesourcery.com>
1146         * pt.c (instantiate_class_template): Set location before
1147         substuting bases.
1149         * decl.c (make_typename_type): Use my_friendly_assert.
1150         * pt.c (tsubst_aggr_type): Rearrange context substitution.
1152 2003-08-14  Jan Hubicka  <jh@suse.cz>
1154         * method.c (use_thunk): Expand body directly.
1156 2003-08-12  Mark Mitchell  <mark@codesourcery.com>
1158         PR c++/11703
1159         * call.c (type_passed_as): Use TYPE_SIZE, not TYPE_PRECISION to
1160         determine whether or not to promote types.
1161         (convert_for_arg_passing): Likewise.
1162         * decl2.c (cp_build_parm_decl): Do not set DECL_ARG_TYPE in
1163         templates.
1164         * pt.c (tsubst_decl): Do not expect it to be set.
1166         PR c++/9512
1167         PR c++/10923
1168         * cp-tree.h (check_elaborated_type_specifier): Declare.
1169         (handle_class_head): Remove.
1170         (note_got_semicolon): Likewise.
1171         (note_list_got_semicolon): Likewise.
1172         (finish_class_definition): Likewise.
1173         * decl.c (check_elaborated_type_specifier): Make it public.
1174         Robustify.
1175         (handle_class_head): Remove.
1176         * parser.c (cp_parser_elaborated_type_specifier): Use
1177         check_elaborated_type_specifier.
1178         (cp_parser_class_specifier): Do not call finish_class_definition.
1179         (cp_parser_class_head): Or handle_class_head.  Check for
1180         over-qualified names.
1181         * semantics.c (finish_class_definition): Remove.
1183         * parser.c (cp_parser_check_for_definition_in_return_type): New
1184         function.
1185         (cp_parser_simple_declaration): Adjust call to
1186         cp_parser_init_declarator.
1187         (cp_parser_decl_specifier_seq): Change type of
1188         declares_class_or_enum parameter.
1189         (cp_parser_explicit_instantiation): Adjust accordingly.
1190         (cp_parser_type_specifier): Change type of
1191         declares_class_or_enum parameter.
1192         (cp_parser_init_declarator): Add declares_class_or_enum
1193         parameter.
1194         (cp_parser_parameter_declaration): Adjust call to
1195         cp_parser_decl_specifier_seq.
1196         (cp_parser_function_definition): Likewise.
1197         (cp_parser_member_declaration): Likewise.
1198         (cp_parser_single_declaration): Likewise.
1200         * cp-tree.h (lang_type_class): Remove has_call_overloaded,
1201         has_array_ref_overloaded, has_arrow_overloaded, and got_semicolon.
1202         (TYPE_OVERLOADS_CALL_EXPR): Remove.
1203         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
1204         (TYPE_OVERLOADS_ARROW): Likewise.
1205         (CLASSTYPE_GOT_SEMICOLON): Likewise.
1206         * class.c (check_bases): Do not set them.
1207         (finish_struct_1): Likewise.
1208         * decl.c (cp_finish_decl): Do not set CLASSTYPE_GOT_SEMICOLON.
1209         (build_ptrmemfunc_type): Likewise.
1210         (grok_op_properties): Do not set TYPE_OVERLOADS_*.
1211         (start_function): Do not check CLASSTYPE_GOT_SEMICOLON.
1212         * decl2.c (grokfield): Do not set CLASSTYPE_GOT_SEMICOLON.
1213         * lex.c (note_got_semicolon): Remove.
1214         (note_list_got_semicolon): Likewise.
1215         * parser.c (cp_parser_simple_declaration): Do not call
1216         note_list_got_semicolon.
1217         * pt.c (list_eq): Remove.
1218         (lookup_template_class): Do not set CLASSTYPE_GOT_SEMICOLON.
1219         (instantiate_class_template): Do not set TYPE_OVERLOADS*.
1220         (instantiate_class_template): Do not set CLASSTYPE_GOT_SEMICOLON.
1221         * ptree.c (cxx_print_type): Do not print them.
1222         * semantics.c (finish_member_class_template): Do not call
1223         note_list_got_semicolon.
1225 2003-08-11  Aldy Hernandez  <aldyh@redhat.com>
1227         * call.c (standard_conversion): Opaque pointers interconvert.
1229         * testsuite/g++.dg/other/opaque-3.C: New.
1231 2003-08-11  Mark Mitchell  <mark@codesourcery.com>
1233         * typeck.c (merge_types): Handle cv-qualified pointer-to-member
1234         types correctly.
1236 2003-08-10  Mark Mitchell  <mark@codesourcery.com>
1238         PR c++/11789
1239         * cp-tree.h (get_vbase): Remove.
1240         (get_vbase_types): Remove.
1241         * init.c (expand_member_init): Correct logic for looking up base
1242         classes.
1244 2003-08-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1246         * error.c (dump_expr): Tidy.
1247         * cxx-pretty-print.c (pp_cxx_nonconsecutive_character): New.
1248         (pp_cxx_begin_template_argument_list): Likewise.
1249         (pp_cxx_end_template_argument_list): Likewise.
1250         (is_destructor_name): Likewise.
1251         (pp_cxx_unqualified_id): Likewise.
1252         (pp_cxx_qualified_id): Likewise.
1253         (pp_cxx_id_expression): Likewise.
1254         (pp_cxx_new_expression): Likewise.
1255         (pp_cxx_delete_expression): Likewise.
1256         (pp_cxx_pm_expression): Likewise.
1257         (pp_cxx_type_specifier): Rework.
1258         (pp_cxx_type_id): Likewise.
1259         (pp_cxx_primary_expression): Likewise.
1260         (pp_cxx_postfix_expression): Likewise.
1261         (pp_cxx_unary_expression): Likewise.
1262         (pp_cxx_multiplicative_expression): Likewise.
1263         (pp_cxx_conditional_expression): Likewise.
1264         (pp_cxx_assignment_expression): Likewise.
1265         (pp_cxx_pretty_printer_init): Tidy.
1267 2003-08-10  Nathan Sidwell  <nathan@codesourcery.com>
1269         * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): non-NULL
1270         NODE is always a TREE_VEC of nonzero size.
1271         (NUM_TMPL_ARGS): NODE is always a TREE_VEC.
1272         * decl2.c (arg_assoc): Template args will be a vec.
1273         * error.c (dump_decl) <TEMPLATE_ID_EXPR case>: Call
1274         dump_template_argument_list.
1275         (dump_template_parms): Args will be a vec.
1276         * parser.c (cp_parser_template_argument_list): Produce a
1277         vector, not a list.
1278         * pt.c (coerce_template_parms): Args are always vectors.
1279         (mangle_class_name_for_template): Likewise.
1280         (lookup_template_function): Likewise.
1281         (lookup_template_class): Likewise.
1282         (tsubst_template_args): Likewise.
1283         (tsubst_baselink): Use tsubst_template_args.
1284         (tsubst_qualified_id): Likewise.
1285         (tsubst_copy) <TEMPLATE_ID_EXPR case>: Likewise.
1286         (tsubst_copy_and_build) <TEMPLATE_ID_EXPR case>: Likewise.
1287         (any_dependent_template_args_p):  Args are always vectors.
1288         * tree.c (cp_tree_equal): Add TEMPLATE_ID_EXPR case.
1290         PR c++/11670
1291         * call.c (convert_like_real): Add rvalue binding error message.
1292         * error.c (dump_expr) <NOP_EXPR case>: Detect when the no expr is
1293         really a cast.
1295         PR c++/10530
1296         * pt.c (dependent_type_p_r): A dependent template-id is a class
1297         type with dependent template arguments, or a bound template
1298         template parameter.
1299         (type_dependent_expression_p): A template function decl cannot
1300         have a dependent context.
1302 2003-08-07  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1304         PR c++/5767
1305         * parser.c (cp_parser_class_name): Return immediately when scope
1306         is error_mark_node.
1308 2003-08-07  Aldy Hernandez  <aldyh@redhat.com>
1310         * cp/Make-lang.in (cp/call.o): Add dependency for target.h.
1312         * cp/call.c (standard_conversion): Support opaque types.
1313         Include target.h.
1314         (strip_top_quals): Use cp_build_qualified_type instead of
1315         TYPE_MAIN_VARIANT.
1317         * cp/typeck.c (convert_for_assignment): Support opaque types.
1319         * testsuite/g++.dg/other/opaque-1.C: New.
1321         * testsuite/g++.dg/other/opaque-2.C: New.
1323 2003-08-06  Aldy Hernandez  <aldyh@redhat.com>
1325         * decl.c (grokparms): Use cp_build_qualified_type instead
1326         TYPE_MAIN_VARIANT.
1328 2003-08-05  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1330         * cxx-pretty-print.h: New file.
1331         * cxx-pretty-print.c: Likewise.
1332         * error.c (scratch_pretty_printer): Change type.
1333         (init_error): Tidy.
1334         (dump_aggr_type): Likewise.
1335         (dump_global_iord): Likewise.
1336         (dump_expr): Likewise.
1337         (dump_char): Remove.
1338         * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTITCS): Define.
1339         (cxx_initialize_diagnostics): New function.
1340         * Make-lang.in (CXX_OBJS): Add cp/cxx-pretty-print.o
1341         (CXX_PRETTY_PRINT_H): New variable.
1342         (cp/cxx-pretty-print.o): New rule.
1343         (cp/cp-lang.o): Update dependence.
1344         (cp/error.o): Likewise.
1346 2003-08-05  Steven Bosscher  <steven@gcc.gnu.org>
1348         * cp-tree.h (struct lang_decl): Don't include c_lang_decl.
1349         (DECL_DECLARED_INLINE_P): Remove.
1350         * decl2.c (import_export_decl): Only look at DECL_DECLARED_INLINE_P
1351         if decl is a FUNCTION_DECL.  This never made sense, but now it is
1352         required to avoid a tree check failure.
1353         * decl.c (grokfndecl): Don't touch DID_INLINE_FUNC.
1354         * optimize.c (maybe_clone_body): Likewise.
1356 2003-08-04  Roger Sayle  <roger@eyesopen.com>
1358         * decl.c (cxx_insert_default_attributes): Delete.
1359         * cp-tree.h (cxx_insert_default_attributes): Don't prototype.
1360         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Don't define.
1362 2003-08-03  Nathan Sidwell  <nathan@codesourcery.com>
1364         PR c++/11704
1365         * pt.c (type_dependent_expression_p): Cope with COMPONENT_REF with
1366         unknown type.
1368         PR c++/11766
1369         * typeck.c (comp_ptr_ttypes_real): Don't loop on pointers to
1370         member functions.
1372 2003-08-02  Nathan Sidwell  <nathan@codesourcery.com>
1374         PR c++/9447
1375         * cp-tree.def (USING_DECL): Document its type.
1376         * class.c (pushclass): If we're entering a template, push any
1377         dependent using decls it has.
1378         * decl2.c (do_class_using_decl): Refactor. Type is NULL iff it is
1379         a dependent scope.
1380         * pt.c (tsubst_decl) <USING_DECL case>: Set type.
1381         (tsubst): Remove USING_DECL checks.
1382         (type_dependent_expression_p): Remove USING_DECL case.
1383         * semantics.c (finish_member_declaration): A USING_DECL's type
1384         indicates whether it is dependent.
1386 2003-08-02  Nathan Sidwell  <nathan@codesourcery.com>
1388         * cp-tree.h (pushclass): Remove unneeded parameter.
1389         * class.c (pushclass): Remove unneeded MODIFY parm. Adjust.
1390         (push_nested_class): Adjust pushclass call.
1391         * pt.c (instantiate_class_template): Likewise.
1392         * semantics.c (begin_class_definition): Likewise.
1394 2003-08-01  Nathanael Nerode  <neroden@gcc.gnu.org>
1396         * typeck2.c (add_exception_specifier): Use 'bool' where appropriate.
1398 2003-08-01  Mark Mitchell  <mark@codesourcery.com>
1400         PR c++/11697
1401         * decl.c (decls_match): Don't ignore the types of template
1402         classes.
1404         PR c++/11744
1405         * pt.c (tsubst_copy_and_build): Refine Koenig lookup logic.
1407 2003-08-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1409         PR c++/8442, c++/8806
1410         * decl.c (qualify_lookup): Accept TEMPLATE_DECL if types are
1411         preferred.
1412         (check_elaborated_type_specifier): Add allow_template_p
1413         parameter.  Check tag mismatch and class template.
1414         (xref_tag): Add template_header_p parameter.  Add assertion
1415         that name is an IDENTIFIER_NODE.  Remove implicit typename
1416         warning.  Simplify lookup process if globalize is true.
1417         (cxx_init_decl_processing): Adjust call to xref_tag.
1418         (xref_tag_from_type): Likewise.
1419         * decl2.c (handle_class_head): Likewise.
1420         * parser.c (cp_parser_elaborated_type_specifier,
1421         cp_parser_class_head): Likewise.
1422         * rtti.c (init_rtti_processing, build_dynamic_cast1,
1423         tinfo_base_init, emit_support_tinfos): Likewise.
1424         * class.c (is_base_of_enclosing_class): Remove.
1425         * pt.c (convert_template_argument): Don't accept RECORD_TYPE as
1426         template template argument.
1427         * cp-tree.h (xref_tag): Adjust declaration.
1428         (is_base_of_enclosing_class): Remove.
1429         * NEWS: Document template template argument change.
1431 2003-08-01  Nathan Sidwell  <nathan@codesourcery.com>
1433         * parser.c (cp_parser_init_declarator,
1434         cp_paser_member_declaration): Reformat.
1435         * pt.c (lookup_template_class, type_unification_real, unify,
1436         type_dependent_expression_p): Reformat.
1438         PR c++/11295
1439         * cp-tree.h (tubst_flags_t): Add tf_stmt_expr_cmpd,
1440         tf_stmt_expr_body.
1441         (finish_stmt_expr_expr): Declare.
1442         * parser.c (cp_parser_primary_expression): Tell
1443         cp_parser_compount_statement that it is a statement expression.
1444         (cp_parser_statement, cp_parser_labeled_statement,
1445         cp_parser_compound_statement, cp_parser_statement_seq_opt): Add
1446         in_statement_expr_p parameter.
1447         (cp_parser_expression_statement): Likewise. Call
1448         finish_stmt_expr_expr for final expression of a statement
1449         expression.
1450         (cp_parser_for_init_statement,
1451         cp_parser_implicitly_scoped_statement,
1452         cp_parser_already_scoped_statement, cp_parser_function_definition,
1453         cp_parser_try_block, cp_parser_handled): Adjust.
1454         * pt.c (tsubst_copy) <STMT_EXPR case>: Pass tf_stmt_expr.
1455         (tsubst_expr): Process tf_stmt_expr and tf_stmt_exprs flags.
1456         (tsubst_expr) <EXPR_STMT case>: Check tf_stmt_exprs flag.
1457         * semantics.c (finish_expr_stmt): Do not deal with statement
1458         expressions.
1459         (begin_stmt_expr): Clear last_expr_type.
1460         (finish_stmt_expr_expr): New.
1461         (finish_stmt_expr): Process the value expression.
1463         * typeck.c (build_compound_expr): If RHS is a TARGET_EXPR, put the
1464         compound expr inside the target's initializer.
1466         PR c++/11525
1467         * parser.c (cp_parser_primary_expression): Do not set
1468         non-constant-p merely because it is a dependent scope.
1470         PR c++/9447
1471         * decl2.c (do_class_using_decl): Set type to NULL_TREE.
1472         * semantics.c (finish_expr_stmt): Do not convert to void in a
1473         template.
1475 2003-07-31  Nathan Sidwell  <nathan@codesourcery.com>
1477         * pt.c (coerce_template_parms): Refactor.
1478         (fn_type_unification): Increment processing_template_decl when
1479         tsubsting an incomplete set of explicit args.
1481         PR c++/11347
1482         * pt.c (instantiate_class_template): Increment
1483         processing_template_decl around the tsubst of a template member
1484         class.
1485         (tsubst_qualified_id): Assert we do not have a dependent scope.
1487         * pt.c (coerce_template_template_parms, lookup_template_class,
1488         can_complete_type_without_circularity, instantiate_class_template,
1489         tsubst_decl, unify): Reformat.
1491 2003-07-31  Jan Hubicka  <jh@suse.cz>
1493         * decl2.c (maybe_make_one_only): Use mark_referenced.
1494         * method.c (use_thunk): Likewsie.
1496 2003-07-30  Jan Hubicka  <jh@suse.cz>
1498         * class.c (build_vtable_entry_ref): Kill.
1499         (build_vtbl_ref_1): Do not call build_vtable_entry_ref.
1500         (build_vfn_ref): Do not call build_vtable_entry_ref.
1501         * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Kill.
1502         * cp-tree.h (prepare_assemble_variable): Kill.
1503         * cp-decl.c (prepare_assemble_variable): Kill.
1505 2003-07-29  Geoffrey Keating  <geoffk@apple.com>
1507         * parser.c (cp_lexer_new_main): Use c_common_no_more_pch instead
1508         of setting valid_pch by hand.
1510 2003-07-29  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
1512         * decl.c (finish_enum): Initialize underlying_type.
1514 2003-07-29  Nathan Sidwell  <nathan@codesourcery.com>
1516         PR c++/9447
1517         * decl.c (add_binding): Add bval local variable.
1518         (push_class_level_binding): Likewise. Allow a USING_DECL to be
1519         pushed.
1520         * decl2.c (do_class_using_decl):  The type of a using decl is
1521         unknown.
1522         * parser.c (cp_parser_postfix_expression): Refactor unqualified-id
1523         function call lookup code.
1524         * pt.c (tsubst): A USING_DECL will have unknown type.
1525         (tsubst_copy_and_build): Allow a using decl.
1526         (type_dependent_expression_p): A USING_DECL will make it
1527         dependent.
1528         * semantics.c (finish_member_declaration): Push a dependent using
1529         declaration.
1531 2003-07-28  Mark Mitchell  <mark@codesourcery.com>
1533         PR c++/11530
1534         * parser.c (cp_parser_postfix_expression): Do not call mark_used.
1535         * semantics.c (finish_id_expression): Call mark_used for all
1536         declarations.
1538 2003-07-28  Mark Mitchell  <mark@codesourcery.com>
1540         PR c++/11667
1541         * call.c (standard_conversion): Allow all integral->enumeral
1542         conversions, after marking them as bad.
1543         * decl.c (finish_enum): Make sure that all enumerators are
1544         properly converted to the underlying type.
1545         (build_enumerator): Set DECL_CONTEXT for namespace-scope
1546         enumeration types.
1547         * pt.c (tsubst_copy): Adjust handling of CONST_DECLs accordingly.
1548         (tsubst_enum): Tidy.
1550         * Make-lang.in (typeck.o): Depend on convert.h.
1551         (class.o): Likewise.
1552         (rtti.o): Likewise.
1553         * call.c: Include convert.h.
1554         (convert_arg_to_ellipsis): Use convert_to_real.
1555         * class.c: Include convert.h.
1556         (build_base_path): Use convert_to_integer.
1557         * rtti.c: Include convert.h.
1558         (build_headof): Use convert_to_integer.
1559         * typeck.c: Include convert.h.
1560         (decay_conversion): Use convert_to_integer.
1561         (build_unary_op): Use build_nop.
1562         (get_delta_difference): Use convert_to_integer.
1563         (build_ptrmemfunc): Avoid unncessary conversions.
1565 2003-07-28  Jan Hubicka  <jh@suse.cz>
1567         * decl2.c (mark_member_pointers): Verify that member pointer points to
1568         the function.
1570 2003-07-28  Nathan Sidwell  <nathan@codesourcery.com>
1572         * cp-tree.h (begin_compound_stmt): No scope arg is a bool.
1573         (finish_compound_stmt): Remove no scope arg.
1574         * decl.c (register_dtor_fn): Adjust begin_compound_stmt and
1575         end_compound_stmt calls.
1576         (expand_static_init, begin_destructor_body, begin_function_body,
1577         finish_function_body): Likewise.
1578         * decl2.c (start_objects, finish_objects,
1579         start_static_storage_duration_function,
1580         finish_static_storage_duration_function): Likewise.
1581         * init.c (begin_init_stmts, finish_init_stmts,
1582         construct_virtual_base, build_vec_init): Likewise.
1583         * method.c (do_build_assign_ref, synthesize_method): Likewise.
1584         * parser.c (cp_parser_compound_statement,
1585         cp_parser_implicitly_scoped_statement,
1586         cp_parser_already_scoped_statement): Likewise.
1587         * pt.c (tsubst_expr): Likewise.
1588         * semantics.c (begin_compound_stmt): No scope arg is a bool.
1589         (finish_compound_stmt): Remove no scope arg.
1591         * error.c (dump_expr) <COMPOUND_EXPR case>: A compound expr is
1592         always dyadic.
1594 2003-07-27  Mark Mitchell  <mark@codesourcery.com>
1596         * call.c (standard_conversion): Tweak handling of
1597         pointer-to-member types.
1598         * pt.c (tsubst): Correctly qualify pointers-to-data member types.
1599         * typeck.c (comp_ptr_ttypes_real): Check qualifiers on
1600         pointer-to-data member types.
1602 2003-07-27  Nathan Sidwell  <nathan@codesourcery.com>
1604         * parser.c (cp_parser_type_parameter): Reformat.
1605         (cp_parser_parameter_declaration): Deprecate default args where
1606         not allowed.
1608 2003-07-26  Nathan Sidwell  <nathan@codesourcery.com>
1610         * cfns.h: Rebuilt.
1612         * cp-tree.h (begin_init_stmts, finish_init_stmts): Remove.
1613         (begin_global_stmt_expr, finish_global_stmt_expr): Remove.
1614         * init.c (begin_init_stmts): Make static. Return is_global
1615         value. Always call begin_stmt_expr.
1616         (finish_init_stmts): Make static. Add is_global parm. Always
1617         building a stmt tree.
1618         (build_aggr_init): Adjust begin_init_stmts, finish_init_stmts calls.
1619         (build_vec_init): Likewise. Always building a stmt tree.
1620         (expand_default_init): Always building a stmt tree.
1621         (get_temp_regvar): Likewise.
1622         * semantics.c (begin_global_stmt_expr,
1623         finish_global_stmt_expr): Remove.
1625 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
1627         * cp-tree.h (build_compound_expr): Take LHS & RHS args.
1628         (build_x_compound_expr_from_list): Declare.
1629         * typeck.c (build_x_compound_expr_from_list): New.
1630         (build_x_compound_expr): Adjust.
1631         (build_compound_expr): Remove unreachable code. Take two
1632         parameters, adjust.
1633         * decl.c (grok_reference_init): Use
1634         build_x_compound_expr_from_list.
1635         (expand_static_init): Adjust build_compound_expr call.
1636         (cxx_maybe_build_cleanup): Likewise.
1637         * init.c (perform_member_init): Use
1638         build_x_compound_expr_from_list.
1639         (build_new_1): Likewise.
1640         (build_vec_delete): Adjust build_compound_expr calls.
1641         (build_vbase_delete): Likewise.
1642         * typeck2.c (store_init_value): Use
1643         build_x_compound_expr_from_list.
1644         (build_functional_cast): Likewise.
1646 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
1648         * cp-tree.h (enum tsubst_flags_t): Add tf_user.
1649         * decl.c (make_typename_type): Pass it.
1650         * pt.c (lookup_template_class): Use it.
1651         (resolve_typename_type): Pass it.
1652         * semantics.c (finish_template_type): Pass it.
1654 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
1656         PR c++/11617
1657         * cp-tree.h (qualified_name_lookup_error): Declare.
1658         * pt.c (tsubst_qualified_id): Use qualified_name_lookup_error for
1659         errors.
1660         (tsubst_expr) <DECL_STMT case>: Likewise.
1661         (tsubst_copy_and_build) <COMPONENT_REF case>: Likewise.
1662         * semantics.c (qualified_name_lookup_error): New, broken out of ...
1663         (finish_id_expression): ... here. Use it.
1665 2003-07-25  Falk Hueffner  <falk.hueffner@student.uni-tuebingen.de>
1667         * cfns.gperf: Add '%%' delimiter to placate gperf 3.0.
1669 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
1671         PR c++/11596
1672         * pt.c (maybe_fold_nontype_arg, maybe_fold_nontype_args): Remove.
1673         (tsubst_template_arg): New.
1674         (tsubst_template_arg_vector): Rename to ...
1675         (tsubst_template_args): ... this. Accept a TREE_LIST form. Use
1676         tsubst_template_arg.
1677         (coerce_template_parms): Use tsubst_template_arg for default
1678         value.
1679         (tsubst_template_parms): Likewise.
1680         (tsubst_aggr_type): Adjust.
1681         (tsubst_decl): Likewise.
1682         (tsubst): Use tsubst_template_arg for a DOMAIN. Adjust.
1683         (tsubst_copy) <TEMPLATE_ID_EXPR case>: Use tsubst_template_args.
1685 2003-07-25 Gabriel Dos Reis  <gdr@integrable-solutions.net>
1687         * Make-lang.in (cp/error.o): Depend on DIAGNOSTIC_H.
1688         * error.c: Use the new pretty-printer framework.
1690 2003-07-24  Per Bothner  <pbothner@apple.com>
1692         * decl.c (pushdecl_class_level): Don't use push_srcloc/pop_srcloc
1693         which causes errors messages to incorrectly mention included files.
1695 2003-07-24  Mark Mitchell  <mark@codesourcery.com>
1697         * cp-tree.h (convert_to_base_statically): Declare.
1698         * call.c (build_special_member_call): Convert INSTANCE to the base
1699         type.
1700         * class.c (convert_to_base_statically): New method.
1701         * init.c (construct_virtual_base): Use it.
1702         * method.c (do_build_assign_ref): Fix typo in comment.
1704 2003-07-24  Jason Merrill  <jason@redhat.com>
1706         * decl.c: Just set truthvalue_* to boolean_*.
1708 2003-07-24  Nathan Sidwell  <nathan@codesourcery.com>
1710         * decl.c (reshape_init): Remove unreachable code.
1712 2003-07-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1714         PR c++/11513
1715         * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): Use current_scope.
1717 2003-07-23  Mark Mitchell  <mark@codesourcery.com>
1719         PR c++/11645
1720         * cp-tree.h (accessible_base_p): Declare.
1721         * call.c (build_over_call): Use it.
1722         * search.c (accessible_base_p): New function, split out from ...
1723         (lookup_base): ... here.
1725         PR c++/11517
1726         * call.c (build_conditional_expr): Use perform_implicit_conversion
1727         and error_operand_p.  Robustify.
1728         * typeck.c (build_unary_op): Use perform_implicit_conversion.
1730 2003-07-23  Nathan Sidwell  <nathan@codesourcery.com>
1732         PR c++/10953
1733         * parser.c (cp_parser_nested_name_specifier): Reset scope on
1734         failure.
1735         (cp_parser_elaborated_type_specifier): Likewise.
1737 2003-07-22  Mark Mitchell  <mark@codesourcery.com>
1739         Eliminate use of POINTER_TYPE for pointers-to-members.
1740         * call.c (standard_conversion): Rework pointer-to-member handling.
1741         Add comments.
1742         (add_builtin_candidate): Likewise.
1743         (resolve_scoped_fn_name): Remove.
1744         (build_conditional_expr): Rework pointer-to-member handling.
1745         (compare_ics): Likewise.
1746         * class.c (check_field_decls): Use TYPE_PTR_P.
1747         * cp-lang.c (cp_var_mod_type_p): Rework pointer-to-member
1748         handling.
1749         * cp-tree.h (SCALAR_TYPE_P): Use TYPE_PTR_TO_MEMBER_P.
1750         (TYPE_PTRMEM_P): Add comment.
1751         (TYPE_PTR_P): Simplify.
1752         (TYPE_PTROB_P): Correct definition.
1753         (TYPE_PTR_TO_MEMBER_P): New macro.
1754         (TYPE_PTRMEM_CLASS_TYPE): Adjust.
1755         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
1756         (resolved_scoped_fn_name): Remove declaration.
1757         (build_offset_ref): Change prototype.
1758         (resolve_offset_ref): Remove.
1759         (comp_target_types): Remove.
1760         * cvt.c (cp_convert_to_pointer): Rework pointer-to-member
1761         handling.
1762         (convert_to_reference): Use can_convert.
1763         (ocp_convert): Improve error handling.  Rework pointer-to-member
1764         handling.
1765         (perform_qualification_conversions): Rework pointer-to-member
1766         handling.
1767         * decl.c (build_ptrmem_type): Handle functions too.
1768         (create_array_type_for_decl): Remove OFFSET_TYPE error message.
1769         (grokdeclarator): Use OFFSET_TYPE for pointers to data members.
1770         (grokparms): Remove OFFSET_TYPE error message.
1771         * dump.c (cp_dump_tree): Rework pointer-to-member handling.
1772         * error.c (dump_type_prefix): Likewise.
1773         * expr.c (cplus_expand_constant): Use build_nop.
1774         * init.c (build_offset_ref): Add address_p parameter.  Fold in
1775         necessary bits from resolve_offset_ref.
1776         (resolve_offset_ref): Remove.
1777         * parser.c (cp_parser_postfix_expression): Remove special case
1778         code for OFFSET_TYPE.
1779         * pt.c (convert_nontype_argument): Rework pointer-to-member
1780         handling.
1781         (convert_template_argument): Likewise.
1782         (unify): Likewise.
1783         (invalid_nontype_parm_type_p): Likewise.
1784         (dependent_type_p_r): Likewise.
1785         * rtti.c (get_tinfo_decl): Remove OFFSET_TYPE special case.
1786         (target_incomplete_p_): Rework pointer-to-member
1787         handling.
1788         (get_pseudo_ti_init): Likewise.
1789         (get_pseudo_ti_desc): Likewise.
1790         * semantics.c (finish_qualified_id_expr): Adjust call to
1791         build_offset_ref.  Remove use of resolve_offset_ref.
1792         * tree.c (pod_type_p): Use TYPE_PTR_TO_MEMBER_P.
1793         * typeck.c (target_type): Use TYPE_PTRMEM_P.
1794         (type_unknown_p): Remove obsolete code about the time before
1795         non-dependent expressions were handled correctly.
1796         (qualify_type_recursive): Remove.
1797         (composite_pointer_type_r): New function.
1798         (composite_pointer_type): Use it.
1799         (merge_types): Remove dead comments.
1800         (comp_cv_target_types): Remove.
1801         (comp_target_types): Likewise.
1802         (comp_target_parms): Likewise.
1803         (cxx_sizeof_or_alignof_type): Remove OFFSET_TYPE error.
1804         (build_indirect_ref): Use TYPE_PTR_TO_MEMBER_P.
1805         (build_binary_op): Do not use of comp_target_types.
1806         (pointer_diff): Remove OFFSET_TYPE case.
1807         (build_unary_op): Adjust pointer-to-member handling.
1808         (unary_complex_lvalue): Likewise.
1809         (check_for_casting_away_constness): Add description parameter.
1810         (build_static_cast): Pass it.
1811         (build_reinterpret_cast): Use check_for_casting_away_constness.
1812         (build_const_cast): Adjust pointer-to-member handling.
1813         (build_c_cast): Likewise.
1814         (convert_for_assignment): Remove OFFSET_TYPE error message.
1815         (comp_ptr_ttypes_real): Adjust pointer-to-member handling.
1816         (comp_ptr_ttypes_reinterpret): Remove.
1817         (casts_away_constness_r): Adjust pointer-to-member handling.
1818         (casts_away_constness): Liekwise.
1819         (strip_all_pointer_quals): Remove.
1820         * typeck2.c (digest_init): Adjust pointer-to-member handling.
1821         (build_m_component_ref): Likewise.
1823 2003-07-22  Wolfgang Bangerth  <bangerth@dealii.org>
1825         * lex.c (unqualified_fn_lookup_error): Mention that the error
1826         message needs to be kept in synch with the manual.
1828 2003-07-22  Nathan Sidwell  <nathan@codesourcery.com>
1830         PR c++/11614
1831         * decl.c (grokdeclarator): An array member is only a flexible
1832         array member if the field itself is the array.
1834 2003-07-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1836         PR c++/10793
1837         * decl.c (xref_basetypes): Handle error_mark_node.
1839 2003-07-22  Nathan Sidwell  <nathan@codesourcery.com>
1841         * cp-tree.h (enum cp_lvalue_kind): Add clk_packed.
1842         * tree.c (lvalue_p_1): Set it.
1843         * class.c (check_field): Don't allow non-packed non-POD fields to
1844         be packed.
1845         * call.c (reference_binding): Need a temporary for all bitfield
1846         and packed fields.
1847         (convert_like_real): Check it is ok to make a temporary here.
1849 2003-07-21  Nathan Sidwell  <nathan@codesourcery.com>
1851         * cp-tree.h (hack_identifier): Remove.
1852         * method.c (hack_identifier): Remove.
1853         * semantics.c (finish_id_expression): Expand hack_identifier
1854         here. Simplify.
1856 2003-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1858         * call.c class.c decl.c decl2.c g++spec.c lex.c parser.c pt.c rtti.c
1859         semantics.c typeck.c: Remove unnecessary casts.
1861 2003-07-18  Nathan Sidwell  <nathan@codesourcery.com>
1863         * cp-tree.h (hack_identifier): Remove.
1864         * method.c (hack_identifier): Remove.
1865         * semantics.c (finish_id_expression): Expand hack_identifier
1866         here. Simplify.
1868 2003-07-18  Nathan Sidwell  <nathan@codesourcery.com>
1870         * cp-tree.h (finish_non_static_data_member): Add object param.
1871         * method.c (hack_identifier): Adjust.
1872         * pt.c (tsubst_copy_and_build) <COMPONENT_REF case>: Don't search
1873         again for a FIELD_DECL.
1874         * semantics.c (finish_non_static_data_member): Add object
1875         parameter. Always save the DECL in the COMPONENT_REF.
1876         * call.c (resolve_scoped_fn_name): Adjust.
1878 2003-07-17  Zack Weinberg  <zack@codesourcery.com>
1880         * pt.c (get_bindings): Make definition consistent with
1881         forward declaration.
1883 2003-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1885         PR c++/7809
1886         * friend.c (add_friend): Check access for member functions
1887         and templates.
1889 2003-07-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1891         PR c++/10668
1892         * typeck.c (build_class_member_access_expr): Improve diagnostic.
1894 2003-07-16  Mark Mitchell  <mark@codesourcery.com>
1896         PR c++/11547
1897         * cp-tree.h (DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P): New
1898         macro.
1899         (DECL_PRETTY_FUNCTION_P): Use VAR_DECL_CHECK.
1900         * decl.c (duplicate_decls): Merge
1901         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1902         * parser.c (cp_parser_postfix_expression): Adjust call to
1903         cp_parser_initializer_list and
1904         cp_parser_parenthesized_expression_list.
1905         (cp_parser_parenthesized_expression_list): Add non_constant_p.
1906         (cp_parser_new_placement): Adjust call to
1907         cp_parser_parenthesized_expression_list.
1908         (cp_parser_direct_new_declarator): Likewise.
1909         (cp_parser_conditional_expression): Remove.
1910         (cp_parser_constant_expression): Parse an assignment-expression,
1911         not a conditional-expression.
1912         (cp_parser_simple_declaration): Resolve expression/declaration
1913         ambiguity more quickly.
1914         (cp_parser_mem_initializer): Adjust call to
1915         cp_parser_parenthesized_expression_list.
1916         (cp_parser_init_declarator): Keep track of whether or not the
1917         initializer is a constant-expression.
1918         (cp_parser_initializer): Add non_constant_p parameter.
1919         (cp_parser_initializer_clause): Likewise.
1920         (cp_parser_initializer_list): Likewise.
1921         (cp_parser_attribute_list): Adjust call to
1922         cp_parser_parenthesized_expression_list.
1923         (cp_parser_functional_cast): Likewise.
1924         * pt.c (tsubst_decl): Copy
1925         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1926         (tsubst_expr): Tweak use of DECL_PRETTY_FUNCTION_P.
1927         * semantics.c (finish_id_expression): Use
1928         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1930 2003-07-16  Neil Booth  <neil@daikokuya.co.uk>
1932         * lang-options.h: Remove.
1934 2003-07-16  Andrew Pinski  <pinskia@physics.uc.edu>
1936         PR c/10962
1937         * class.c (field_decl_cmp): Remove.
1938         (resort_field_decl_cmp): Remove.
1939         (resort_sorted_fields): Remove.
1940         (add_fields_to_vec): Rename to ...
1941         (add_fields_to_record_type): this.
1942         (finish_struct_1): Change to be using
1943         sorted_fields_type's fields.
1944         * cp-tree.h (lang_decl): In lang_decl_u3
1945         change sorted_fields to be a pointer to
1946         sorted_fields_type.
1947         (resort_sorted_fields): Remove prototype.
1948         * search.c (lookup_field_1): Change to be using
1949         sorted_fields_type's fields.
1951 2003-07-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1953         PR c++/5421
1954         * decl.c (grokdeclarator): Handle TEMPLATE_ID_EXPR if friend
1955         is a member of other class.
1956         * friend.c (do_friend): Don't build TEMPLATE_DECL if friend
1957         is a specialization of function template.
1959 2003-07-16  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1961         PR c++/10903
1962         * pt.c (convert_nontype_argument): Fix thinko in diagnostic.
1963         Improve.
1965 2003-07-15  Mark Mitchell  <mark@codesourcery.com>
1967         * cp-tree.def (LOOKUP_EXPR): Remove.
1968         * cp-tree.h (cp_id_kind): Add CP_ID_KIND_UNQUALIFIED_DEPENDENT.
1969         (LOOKUP_EXPR_GLOBAL): Remove.
1970         (get_bindings): Remove.
1971         (is_aggr_type_2): Remove.
1972         * call.c (resolved_scoped_fn_name): Remove support for
1973         LOOKUP_EXPR.
1974         * decl.c (grokfndecl): Likewise.
1975         (grokdeclarator): Likewise.
1976         * error.c (dump_decl): Likewise.
1977         (dump_expr): Likewise.
1978         * friend.c (do_friend): Likewise.
1979         * init.c (build_offset_ref): Likewise.
1980         * lex.c (unqualified_fn_lookup_error): Use pedwarn.  Do not create
1981         LOOKUP_EXPRs
1982         * mangle.c (write_expression): Remove support for LOOKUP_EXPR.
1983         * parser.c (cp_parser_postfix_expression): Modify Koenig lookup
1984         test.
1985         * pt.c (get_bindings): Give it internal linkage.
1986         (check_explicit_specialization): Remove support for LOOKUP_EXPR.
1987         (lookup_template_function): Likewise.
1988         (for_each_tempalte_parm_r): Likewise.
1989         (tsubst_decl): Likewise.
1990         (tsubst_qualified_id): Handle template template parameters.
1991         (tsubst_copy): Remove support for LOOKUP_EXPR.
1992         (tsubst_copy_and_build): Likewise.
1993         (most_general_template): Likewise.
1994         (value_dependent_expression_p): Likewise.
1995         (type_dependent_expression_p): Note that IDENTIFIER_NODEs are
1996         always dependent.
1997         * semantics.c (perform_koenig_lookup): Do not create
1998         IDENTIFIER_NODEs.
1999         (finish_fname): Likewise.
2000         (finish_id_expression): Likewise.
2001         * tree.c (is_aggr_type_2): Remove.
2003 2003-07-16  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2005         PR c++/11531
2006         * typeck.c (check_return_expr): Fix thinko in diagnostic.
2008 2003-07-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2010         PR c++/10108
2011         * pt.c (tsubst_decl) <TEMPLATE_DECL>: Add a check for
2012         error_mark_node.
2014 2003-07-14  Mark Mitchell  <mark@codesourcery.com>
2016         PR c++/11509
2017         * pt.c (dependent_scope_ref_p): New function.
2018         (value_dependent_expression_p): Use it.
2019         (type_dependent_expression_p): Likewise.
2021         * pt.c (tsubst_friend_function): Use reregister_specialization.
2023         PR c++/7019
2024         * cp-tree.h (lookup_qualified_name): Adjust prototype.
2025         * decl.c (lookup_qualified_name): Add complain parameter.  Adjust
2026         call to is_aggr_type.
2027         * parser.c (cp_parser_lookup_name): Adjust call to
2028         lookup_qualified_name.
2029         * pt.c (tsubst_qualified_id): Likewise.
2030         (tsubst_copy_and_build): Likewise.
2031         * semantics.c (finish_qualified_id_expr): Deal with erroneous
2032         expressions.
2034 2003-07-14  Gabriel Dos Reis <gdr@integrable-solutions.net>
2036         PR c++/11510
2037         * call.c (op_error): Properly format  REALPART_EXPR and
2038         IMAGPART_EXPR.
2039         * error.c (dump_expr): Likewise.
2041 2003-07-14  Gabriel Dos Reis <gdr@integrable-solutions.net>
2043         * error.c (dump_expr): Handle EMPTY_CLASS_EXPR.
2045 2003-07-14  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2047         PR c++/5293
2048         * call.c (initialize_reference): Improve diagnostic.
2050 2003-07-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2052         PR c++/11154
2053         * pt.c (more_specialized_class): Add full_args parameter.
2054         (most_specialized_class): Adjust calls to more_specialized_class.
2055         * cp-tree.h (more_specialized_class): Adjust declaration.
2057 2003-07-14  Dan Nicolaescu  <dann@ics.uci.edu>
2059         * lex.c (enum tree_node_kind): Delete.
2061 2003-07-13  Mark Mitchell  <mark@codesourcery.com>
2063         PR c++/11503
2064         * cp-tree.h (DECL_SELF_REFERENCE_P): New macro.
2065         (SET_DECL_SELF_REFERENCE_P): Likewise.
2066         * class.c (build_self_reference): Use SET_DECL_SELF_REFERENCE_P.
2067         * pt.c (tsubst_decl): Copy it.
2068         * search.c (lookup_base): Use DECL_SELF_REFERENCE_P.
2070         * pt.c (reregister_specialization): Fix thinko in previous change.
2072         * cp-tree.h (cp_id_kind): New type.
2073         (unqualified_name_lookup_error): Change prototype.
2074         (unqualified_fn_lookup_error): New function.
2075         (do_identifier): Remove.
2076         (do_scoped_id): Likewise.
2077         (tsubst_copy_and_build): Change prototype.
2078         (reregister_specialization): New function.
2079         (perform_koenig_lookup): Likewise.
2080         (finish_id_expression): Likewise.
2081         * call.c (build_method_call): Adjust call to
2082         unqualified_name_lookup_error.
2083         * decl.c (duplicate_decls): Use reregister_specialization.
2084         * lex.c (is_global): Remove.
2085         (unqualified_name_lookup_error): Return a value.
2086         (do_identifier): Remove.
2087         (do_scoped_id): Likewise.
2088         (identifier_typedecl_value): Remove.
2089         (unqualified_fn_lookup_error): New function.
2090         * parser.c (cp_parser_id_kind): Remove.
2091         (cp_parser_non_constant_id_expression): Remove.
2092         (cp_parser_primary_expression): Use finish_id_expression.
2093         (cp_parser_class_or_namespace_name): Use cp_id_kind, not
2094         cp_parser_id_kind.
2095         (cp_parser_postfix_expression): Use perform_koenig_lookup.
2096         (cp_parser_template_argument): Use cp_id_kind.
2097         (cp_parser_fold_non_dependent_expr): Adjust call to
2098         tsubst_copy_and_build.
2099         * pt.c (unregister_specialization): Rename to ...
2100         (reregister_specialization): This.
2101         (tsubst_friend_function): Use it.
2102         (maybe_fold_nontype_arg): Adjust call to tsubst_copy_and_build.
2103         (tsubst_qualified_id): Likewise.
2104         (tsubst_expr): Likewise.
2105         (tsubst_copy_and_build): Add function_p parameter.  Use
2106         finish_id_expression.  Introduce RECUR macro.
2107         (tsubst_non_call_postfix_expression): New function.
2108         (regenerate_decl_from_template): Use reregister_specialization.
2109         * semantics.c (perform_koenig_lookup): New function.
2110         (finish_id_expression): Likewise.
2112 2003-07-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2114         * pt.c (push_access_scope_real): Remove.
2115         (push_access_scope): Move code from push_access_scope_real.
2116         (pop_access_scope): Don't check for TEMPLATE_DECL.
2117         (instantiate_template): Defer access checking during template
2118         substitution.
2119         (regenerate_decl_from_template): Tidy.
2121 2003-07-11  Nathanael Nerode  <neroden@gcc.gnu.org>
2123         PR c++/11437
2124         * operators.def: Add definitions for __imag__, __real__.
2126 2003-07-11  Nathan Sidwell  <nathan@codesourcery.com>
2128         PR c++/11050
2129         * parser.c (cp_parser_expression_list): Rename to ...
2130         (cp_parser_parenthesized_expression_list): ... here. Add attribute
2131         parameter, parse the surounding parentheses.
2132         (cp_parser_skip_to_closing_parenthesis): Add recover and or_comma
2133         parameters. Return int.
2134         (cp_parser_skip_to_closing_parenthesis or comma): Remove.
2135         (cp_parser_postfix_expression): Adjust function call parsing.
2136         (cp_parser_new_placement): Adjust.
2137         (cp_parser_new_initializer): Likewise.
2138         (cp_parser_cast_expression): Likewise.
2139         (cp_parser_selection_statement): Likewise.
2140         (cp_parser_mem_initializer): Likewise.
2141         (cp_parser_asm_definition): Likewise.
2142         (cp_parser_init_declarator): Likewise.
2143         (cp_parser_declarator): Make
2144         cdtor_or_conv_p an int ptr.
2145         (cp_parser_direct_declarator): Likewise. Check for a parameter
2146         list on cdtors & conv functions.
2147         (cp_parser_initializer): Adjust.
2148         (cp_parser_member_declaration): Adjust.
2149         (cp_parser_attribute_list): Move code into
2150         cp_parser_parens_expression_list.
2151         (cp_parser_functional_cast): Adjust.
2152         * pt.c (type_dependent_expression_p): Erroneous expressions are
2153         non-dependent.
2155 2003-07-11  Geoffrey Keating  <geoffk@apple.com>
2157         * decl.c (cp_finish_decl): Handle 'used' attribute.
2159         * cp-lang.c (c_reset_state): New dummy routine.
2160         * cp-tree.h (finish_file): Move prototype to c-common.h.
2161         * parser.c (c_parse_file): Rename from yyparse; don't call finish_file.
2163 2003-07-11  Mark Mitchell  <mark@codesourcery.com>
2165         PR c++/8327
2166         * pt.c (tsubst_qualified_id): Implement suggested resolution for
2167         Core Issue 2.
2168         (type_dependent_expression_p): Likewise.
2170 2003-07-10  Mark Mitchell  <mark@codesourcery.com>
2172         * typeck.c (build_binary_op): Do not warn about signed
2173         vs. unsigned comparisons in the bodies of templates.
2175         PR c++/9411
2176         * parser.c (cp_parser_postfix_expression): Check dependency of
2177         functions.
2179 2003-07-09  Mark Mitchell  <mark@codesourcery.com>
2181         PR c++/10032
2182         * decl.c (cxx_init_decl_processing): With -pedantic, pedwarns are
2183         still errors.
2185         PR c++/10527
2186         * error.c (decl_to_string): Do not print default argument
2187         expressions.
2189         * cp-tree.h (break_out_calls): Remove declaration.
2190         * tree.c (break_out_calls): Remove.
2191         * typeck.c (build_modify_expr): Avoid invalid sharing of trees.
2193 2003-07-09  Nathan Sidwell  <nathan@codesourcery.com>
2195         PR c++ 9483
2196         * class.c (check_field_decls): Pass DECL_NAME to constructor_name_p.
2197         * decl2.c (constructor_name_p): Avoid repeated constructor_name
2198         calls.
2199         * decl.c (grokdeclarator): Refactor ctor/dtor detection.
2201 2003-07-09  Mark Mitchell  <mark@codesourcery.com>
2203         * typeck.c (build_x_unary_op): Take note of the fact that
2204         PREINCREMENT_EXPR and POSTINCREMENT_EXPR are binary operations on
2205         trees.
2207         * parser.c (cp_parser_primary_expression): Preserve the form of
2208         qualified expressions in templates, even if they are not
2209         dependent.
2210         * pt.c (convert_nontype_argument): Handle non-dependent SCOPE_REFs.
2211         (tsubst_qualified_id): Likewise.
2212         * search.c (accessible_p): Treat everything in the body of a
2213         template as accessible.
2215 2003-07-08  Mark Mitchell  <mark@codesourcery.com>
2217         * cp-tree.def (NON_DEPENDENT_EXPR): New node.
2218         * cp-tree.h (build_call_from_tree): Remove.
2219         (build_member_call): Likewise.
2220         (dependent_template_arg_p): Remove.
2221         (any_dependent_template_arguments_p): New function.
2222         (dependent_template_id_p): Likewise.
2223         (any_type_dependent_arguments_p): Likewise.
2224         (build_non_dependent_expr): Likewise.
2225         (build_non_dependent_args): Likewise.
2226         (build_x_compound_expr): Adjust prototype.
2227         * call.c (build_new_method_call): Handle non-dependent expressions
2228         correctly.
2229         * decl2.c (grok_array_decl): Likewise.
2230         (build_offset_ref_call_from_tree): Likewise.
2231         (build_call_from_tree): Remove.
2232         * error.c (dump_decl): Handle NON_DEPENDENT_EXPR.
2233         (dump_expr): Likewise.
2234         * init.c (build_member_call): Remove.
2235         * mangle.c (write_expression): Update handling for template-ids.
2236         * parser.c (cp_parser_primary_expression): Use
2237         any_dependent_template_arguments_p.  Update constant-expression
2238         handling.
2239         (cp_parser_postfix_expression): Use
2240         any_type_dependent_arguments_p.  Simplify call processing.
2241         (cp_parser_unary_expression): Simplify.
2242         (cp_parser_expression): Adjust for changes to
2243         build_x_compound_expr.
2244         (cp_parser_template_argument): Implement standard-conforming
2245         parsing of non-type template arguments.
2246         (cp_parser_direct_declarator): Use
2247         cp_parser_fold_non_dependent_expr.
2248         (cp_parser_fold_non_dependent_expr): New function.
2249         (cp_parser_next_token_ends_template_argument_p): Likewise.
2250         * pt.c (convert_template_argument): Do not call
2251         maybe_fold_nontype_arg.
2252         (tsubst_baselink): Likewise.
2253         (tsubst_copy_and_build): Share common code.  Make sizeof/alignof
2254         processing work correctly for non-dependent expressions.  Adjust
2255         handling of COMPOUND_EXPR.  Simplify call processing.
2256         (value_dependent_expression_p): Deal with functional casts and
2257         sizeof/alignof correctly.
2258         (type_dependent_expression_p): Handle overloaded functions.
2259         (any_type_dependent_arguments_p): New function.
2260         (any_dependent_template_arguments_p): Likewise.
2261         (dependent_template_p): Treat SCOPE_REFs as dependent.
2262         (dependent_template_id_p): Simplify.
2263         (build_non_dependent_expr): New function.
2264         (build_non_dependent_args): Likewise.
2265         * semantics.c (finish_stmt_expr): Don't make dependent
2266         statement-expresions have void type.
2267         (finish_call_expr): Handle non-dependent expressions
2268         correctly.
2269         * tree.c (lvalue_p_1): Treat NON_DEPENDENT_EXPRs as lvalues.
2270         * typeck.c (cxx_sizeof_or_alignof_type): Give the expression
2271         type size_t, even in templates.
2272         (expr_sizeof): Likewise.
2273         (finish_class_member_access_expr): Handle non-dependent expressions
2274         correctly.
2275         (build_x_indirect_ref): Likewise.
2276         (build_x_binary_op): Likewise.
2277         (build_x_unary_op): Likewise.
2278         (build_x_conditional_expr): Likewise.
2279         (build_x_compound_expr): Likewise.
2280         * typeck2.c (build_x_arrow): Likewise.
2282 2003-07-09  Jan Hubicka  <jh@suse.cz>
2284         * cp-lang.c (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): New.
2285         * decl.c (duplicate_decls): Use DECL_ESTIMATED_INSNS.
2286         (start_function): Use DECL_ESTIMATED_INSNS.
2287         * optimize.c (maybe_clone_body): Use DECL_ESTIMATED_INSNS.
2289         * decl2.c (maybe_emit_vtables): Fix marking vtables as needed in
2290         unit-at-a-time
2292 2003-07-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2294         PR c++/11030
2295         * pt.c (instantiate_class_template): Don't call xref_tag to
2296         inject name when the friend class is a specialization.
2298 2003-07-07  Mark Mitchell  <mark@codesourcery.com>
2300         * cp-tree.h (build_scoped_method_call): Remove.
2301         (lookup_qualified_name): Remove parameter.
2302         (tsubst_copy_and_build): Declare.
2303         (finish_qualified_object_call_expr): Remove.
2304         (check_accessibility_of_qualified_id): New function.
2305         (finish_qualified_id_expr): Likewise.
2306         (non_reference): Likewise.
2307         (build_expr_from-tree): Remove.
2308         * call.c (non_reference): Remove.
2309         (build_scoped_method_call): Likewise.
2310         (build_method_call): Use error_operand_p.  Assert that we are not
2311         processing a template.
2312         (standard_conversion): Use non_reference.
2313         * class.c (build_vtbl_entry_ref): Likewise.
2314         (build_vtbl_ref_1): Likewise.
2315         * cvt.c (build_expr_type_conversion): Use non_reference.
2316         * decl.c (lookup_qualified_name): Remove flags parameter.
2317         (grok_op_properties): Use non_reference.
2318         * decl2.c (grok_array_decl): Likewise.
2319         (build_expr_from_tree): Remove.
2320         (build_offset_ref_call_from_tree): Update comment.
2321         * error.c (parm_to_string): Call reinit_global_formatting_buffer.
2322         * except.c (prepare_eh_types): Use non_reference.
2323         (can_convert_eh): Likewise.
2324         * init.c (build_dtor_call): Avoid using build_method_call.
2325         * mangle.c (write_template_param): Remove misleading comment.
2326         * method.c (locate_copy): Use non_reference.
2327         * parser.c (cp_parser_scope_through_which_access_occurs): Remove.
2328         (cp_parser_primary_expression): Do not create SCOPE_REFs is
2329         non-dependent contexts.
2330         (cp_parser_postfix_expression): Use finish_qualified_id_expr.
2331         (cp_parser_direct_declarator): Use tsubst_copy_and_build, not
2332         build_expr_from_tree.
2333         (cp_parser_lookup_name): Adjust call to lookup_qualified_name.
2334         Use check_accessibility_of_qualified_id.
2335         * pt.c (maybe_fold_nontype_arg): Use tsubst_copy_and_build, not
2336         build_expr_from_tree.
2337         (tsubst_baselink): New function.
2338         (tsubst_qualified_id): Likewise.
2339         (tsubst_copy): Use them.  Remove support for METHOD_CALL_EXPR.
2340         (tsubst_expr): Adjust call to lookup_qualified_name.
2341         (tsubst_copy_and_build): Handle SCOPE_REFs specially.  Adjust
2342         handling of CALL_EXPRs.
2343         (value_dependent_expression_p): Use INTEGRAL_OR_ENUMERATION_TYPE_P.
2344         * rtti.c (get_tinfo_decl_dynamic): Use non_reference.
2345         * search.c (check_final_overrider): Likewise.
2346         * semantics.c (check_accessibility_of_qualified_id): New function.
2347         (finish_qualified_object_call_expr): Remove.
2348         * typeck.c (target_type): Use non_reference.
2349         (cxx_sizeof_or_alignof_type): Likewise.
2350         (dubious_conversion_warnings): Likewise.
2351         (convert_for_initialization): Likewise.
2352         (non_reference): New function.
2354 2003-07-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2356         * decl.c (print_binding_level, print_other_binding_stack,
2357         print_binding_stack): Merge uses of HOST_PTR_PRINTF with adjacent
2358         stdio calls.
2359         * ptree.c (cxx_print_decl, cxx_print_binding): Likewise.
2361 2003-07-07  Andreas Jaeger  <aj@suse.de>
2363         * friend.c: Convert to ISO C90 prototypes.
2365         * Make-lang.in ($(srcdir)/cp/cfns.h): Use ANSI-C as output
2366         language.
2367         * cfns.h: Regenerate.
2369         * typeck.c: Convert remaining prototypes to ISO C90.
2370         * search.c: Likewise.
2372         * decl2.c (build_expr_from_tree): Convert prototype to ISO C90.
2373         * semantics.c (expand_or_defer_fn): Likewise
2374         * mangle.c (discriminator_for_string_literal): Likewise.
2375         * g++spec.c (lang_specific_driver): Likewise.
2377         * search.c (lookup_base_r): Remove unused variable.
2379 2003-07-07  Nathan Sidwell  <nathan@codesourcery.com>
2381         * semantics.c: (genrtl_try_block) Adjust emit_line_note
2382         calls.
2384 2003-07-07  Andreas Jaeger  <aj@suse.de>
2386         * search.c (lookup_base_r): Remove unused variable.
2388 2003-07-06  Michael Chastain  <mec@shout.net>
2390         PR debug/10055
2391         * lex.c (cxx_init): Call push_srcloc and pop_srcloc rather than
2392         assigning to input_filename directly.
2394 2003-07-06  Kazu Hirata  <kazu@cs.umass.edu>
2396         * call.c: Fix comment formatting.
2397         * class.c: Likewise.
2398         * cp-tree.h: Likewise.
2399         * decl.c: Likewise.
2400         * decl2.c: Likewise.
2401         * error.c: Likewise.
2402         * method.c: Likewise.
2403         * name-lookup.c: Likewise.
2404         * parser.c: Likewise.
2405         * pt.c: Likewise.
2406         * rtti.c: Likewise.
2407         * search.c: Likewise.
2408         * typeck.c: Likewise.
2410 2003-07-06  Mark Mitchell  <mark@codesourcery.com>
2412         PR c++/11345
2413         * search.c (lookup_base_r): Remove is_non_public and
2414         within_current_scope parameters.  Remove other dead code.
2415         (lookup_base): Adjust call to lookup_base_r.
2416         (adjust_result_of_qualified_name_lookup): Improve comment.
2417         * semantics.c (finish_call_expr): Use maybe_dummy_object.
2419 2003-07-06  Neil Booth  <neil@daikokuya.co.uk>
2421         * cp-lang.c (LANG_HOOKS_HANDLE_FILENAME,
2422         LANG_HOOKS_MISSING_ARGUMENT): Override.
2424 2003-07-05  Mark Mitchell  <mark@codesourcery.com>
2426         PR c++/11431
2427         * typeck.c (build_static_cast): Check for reference conversions
2428         earlier.
2430 2003-07-04  Mark Mitchell  <mark@codesourcery.com>
2432         * cp-tree.h (perform_integral_promotions): Declare.
2433         * call.c (build_addr_func): Use decay_conversion.
2434         (convert_arg_to_ellipsis): Likewise.  Remove misleading comment.
2435         (convert_for_arg_passing): Use perform_integral_promotions.
2436         * cvt.c (build_expr_type_conversion): Use decay_conversion.
2437         (type_promotes_to): Do not return a cv-qualified type.
2438         * decl.c (grok_reference_init): Fix formatting.
2439         (get_atexit_node): Use decay_conversion.
2440         (build_enumerator): Use perform_integral_promotions.
2441         * init.c (build_vec_init): Use decay_conversion.
2442         * semantics.c (finish_expr_stmt): Likewise.
2443         (finish_switch_cond): Use perform_integral_promotions.
2444         * typeck.c (default_conversion): Likewise.
2445         (perform_integral_promotions): New function.
2446         (build_indirect_ref): Use decay_conversion.
2447         (build_array_ref): Use perform_integral_promotions.
2448         (convert_arguments): Use decay_conversion.
2449         (build_unary_op): Use perform_integral_promotions.
2450         (build_c_cast): Use decay_conversion.
2451         (build_modify_expr): Likewise.
2452         (convert_for_initialization): Likewise.
2453         * typeck2.c (build_x_arrow): Likewise.
2455 2003-07-04  Kazu Hirata  <kazu@cs.umass.edu>
2457         * call.c: Fix comment typos.
2458         * class.c: Likewise.
2459         * cp-tree.h: Likewise.
2460         * cvt.c: Likewise.
2461         * decl2.c: Likewise.
2462         * decl.c: Likewise.
2463         * init.c: Likewise.
2464         * mangle.c: Likewise.
2465         * parser.c: Likewise.
2466         * pt.c: Likewise.
2467         * search.c: Likewise.
2468         * semantics.c: Likewise.
2469         * tree.c: Likewise.
2470         * typeck.c: Likewise.
2472 2003-07-04  Zack Weinberg  <zack@codesourcery.com>
2474         * parser.c (cp_lexer_read_token): No need to handle string
2475         constant concatenation.
2477 2003-07-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2479         * cp-tree.h (GCC_DIAG_STYLE, ATTRIBUTE_GCC_CXXDIAG): Define.
2480         (cp_error_at, cp_warning_at, cp_pedwarn_at): Mark with
2481         ATTRIBUTE_GCC_CXXDIAG.
2483 2003-07-03  Mark Mitchell  <mark@codesourcery.com>
2485         * call.c (build_addr_func): Handle bound pointers-to-members.
2486         (build_method_call): Do not call resolve_offset_ref.
2487         (implicit_conversion): Likewise.
2488         (resolve_scoped_fn_name): Use finish_non_static_data_member, not
2489         resolve_offset_ref.
2490         (resolve_args): Do not call resolve_offset_ref.
2491         (build_conditional_expr): Likewise.
2492         (build_new_method_call): Likewise.
2493         * cp-tree.def (OFFSET_REF): Update documentation.
2494         * cvt.c (cp_convert_to_pointer): Update handling of conversions from
2495         pointers to members to pointers.
2496         (ocp_convert): Do not call resolve_offset_ref.
2497         (convert_to_void): Likewise.
2498         (build_expr_type_conversion): Likewise.
2499         * decl2.c (delete_sanity): Likewise.
2500         * init.c (resolve_offset_ref): Simplify greatly.
2501         (build_vec_delete): Do not call resolve_offset_ref.
2502         * parser.c (cp_parser_postfix_expression): Call resolve_offset_ref
2503         if appropriate.
2504         (cp_parser_unary_expression): Use
2505         cp_parser_simple_cast_expression.
2506         (cp_parser_delete_expression): Likewise.
2507         (cp_parser_cast_expression): Likewise.
2508         (cp_parser_pm_expression): Use cp_parser_binary_op.
2509         (cp_parser_simple_cast_expression): New function.
2510         * rtti.c (build_dynamic_cast_1): Do not call resolve_offset_ref.
2511         * semantics.c (finish_increment_expr): Likewise.
2512         (finish_typeof): Likewise.
2513         * tree.c (lvalue_p_1): Do not handle OFFSET_REF.
2514         * typeck.c (require_complete_type): Do not handle OFFSET_REFs.
2515         (decay_conversion): Do not call resolve_offset_ref.
2516         (finish_class_member_access_expr): Likewise.
2517         (convert_arguments): Likewise.
2518         (build_x_binary_op): Handle DOTSTAR_EXPR.
2519         (condition_conversion): Do not call resolve_offset_ref.
2520         (unary_complex_lvalue): Likewise.
2521         (build_static_cast): Likewise.
2522         (build_reinterpret_cast): Likewise.
2523         (build_const_cast): Likewise.
2524         (build_c_cast): Likewise.
2525         (build_modify_expr): Likewise.
2526         (convert_for_assignment): Likewise.
2527         (convert_for_initialization): Likewise.
2528         * typeck2.c (build_x_arrow): Likewise.
2529         (build_m_component_ref): Simplify.
2531         * call.c (build_scoped_method_call): Use convert_to_void.
2532         (build_method_call): Likewise.
2533         * class.c (check_field_decls): Remove dead code.
2534         * cvt.c (convert_from_reference): Remove OFFSET_TYPE handling.
2535         * decl2.c (grok_array_decl): Remove dead code.
2536         (arg_assoc_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
2537         as pointer-to-member representation.
2538         * init.c (build_offset_ref): Tidy.
2539         (build_vec_delete_1): Use convert_to_void.
2540         * mangle.c (write_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
2541         as pointer-to-member representation.
2543 2003-07-03  Nathan Sidwell  <nathan@codesourcery.com>
2545         PR c++/9162
2546         * decl.c (grokdeclarator): Return friend decls, not
2547         void_type_node.
2548         * decl2.c (grokfield): Alter friend decl check.
2549         * parser.c (struct cp_parser): Document default_arg chain on
2550         unparsed_functions_queue.
2551         (cp_parser_save_default_args): New.
2552         (cp_parser_init_declarator, cp_parser_function_definition,
2553         cp_parser_member_declaration): Call it.
2554         (cp_parser_class_specifier): Remove unused variable. Alter
2555         processing of unparsed_functions_queue.
2557 2003-07-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2559         * class.c (add_method, check_field_decl): Fix format specifier.
2560         * decl.c (duplicate_decls, pushdecl, check_goto,
2561         fixup_anonymous_aggr, maybe_commonize_var, grokdeclarator,
2562         start_enum): Likewise.
2563         * decl2.c (ambiguous_decl): Likewise.
2564         * pt.c (redeclare_class_template): Likewise.
2566 2003-07-02  Nathan Sidwell  <nathan@codesourcery.com>
2568         PR c++/10219
2569         * pt.c (type_unification_real): Don't unify exprs of error type.
2570         * tree.c (error_type): Don't die on error_type.
2572         PR c++/9779
2573         * decl2.c (arg_assoc_class): Don't die on NULL type.
2574         * typeck.c (type_unknown_p): Don't die on untyped expressions.
2576 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
2578         PR c++/6949
2579         * decl2.c (grokfield): Create TEMPLATE_DECLs for methods in local
2580         classes.
2582 2003-07-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2584         * error.c (locate_error): %P takes an `int', not a `tree'.
2586 2003-07-02  Jan Hubicka  <jh@suse.cz>
2588         * decl2.c (defer_fn): Set DECL_DEFER_OUTPUT.
2589         (finish-file): Do not process function with DECL_DEFER_OUTPUT clear;
2590         clear DECL_DEFER_OUTPUT once function is processed; avoid flags
2591         massaging.
2593         * cp-tree.h (DECL_NEEDED_P): Support unit-at-a-time
2594         (expand_or_defer_fn): Declare.
2595         (lower_function): Declare.
2596         * decl.c (start_cleanup_fn): Use expand_or_defer_fn.
2597         * decl2.c: Include cgraph.h and varpool.h
2598         (maybe_emit_vtables):  Make explicit instantations as needed.
2599         (mark_member_pointers, lower_function): New functions.
2600         (finish_file): Do unit-at-a-time.
2601         * method.c (synthesize_method): Use expand_or_defer_fn.
2602         * optimize.c (maybe_clone_body): Use expand_or_defer_fn.
2603         * parser.c (cp_parser_function_definition_after_decl): Use
2604         expand_or_defer_fn.
2605         * pt.c (instantiate_decl): Likewise.
2606         * semantics.c: Include cgraph.h
2607         (expand_or_defer_fn): Break out from ...
2608         (expand_body): ... here; deal with unit-at-a-time.
2609         * cp-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION,
2610         LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Define.
2612 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
2614         * call.c (resolve_scoped_fn_name): Return error_mark_node for
2615         erroneous cases.
2617 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
2619         PR c++/11149
2620         * call.c (resolve_scoped_fn_name): Check that the qualifying scope
2621         is a class type.
2623 2003-07-01  Giovanni Bajo  <giovannibajo@libero.it>
2625         PR c++/8046
2626         * error.c (dump_decl): Handle BIT_NOT_EXPR as
2627         pseudo destructor calls.
2629 2003-07-01  Nathan Sidwell  <nathan@codesourcery.com>
2631         * cp-tree.h (define_label): Replace filename and lineno
2632         arguments with a location_t.
2633         * decl.c (pop_label): Adjust define_label call.
2634         (define_label): Replace filename and lineno arguments with a
2635         location_t.
2636         * semantics.c (finish_label): Adjust define_label call.
2638 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
2640         PR c++/9559
2641         * decl2.c (grokfield): Do not build NOP_EXPRs around the
2642         error_mark_node.
2644 2003-06-30  Neil Booth  <neil@daikokuya.co.uk>
2646         * Make-lang.in: Update.
2647         * cp-lang.c (c_language): Define.
2648         (LANG_HOOKS_INIT_OPTIONS): Use common hook.
2649         * cp-tree.h (cxx_init_options): Remove.
2650         * lex.c: Don't include diagnostic.h.
2651         (cxx_init_options): Remove.
2653 2003-06-30  Giovanni Bajo  <giovannibajo@libero.it>
2655         PR c++/4933
2656         * error.c (dump_expr): Support correctly the COMPOUND_EXPR
2657         tree generated within a template. Use dump_expr to dump an
2658         expression sizeof.
2660 2003-06-30  Giovanni Bajo  <giovannibajo@libero.it>
2662         * mangle.c (write_expression): Exit gracefully when trying to
2663         mangle a CALL_EXPR.
2665 2003-06-30  Giovanni Bajo  <giovannibajo@libero.it>
2667         PR c++/10750
2668         * parser.c (cp_parser_primary_expression): A VAR_DECL with a
2669         (value- or type-) dependent expression as DECL_INITIAL is a
2670         valid constant-expression (at parser time).
2672 2003-06-30  Giovanni Bajo <giovannibajo@libero.it>
2674         PR c++/11106
2675         * error.c (dump_decl): Call dump_decl to dump the DECL_NAME for a
2676         USING_DECL, instead of print_tree_identifier.
2678 2003-06-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2680         * cp-tree.h (language_to_string): Adjust declaration.
2681         * dump.c (cp_dump_tree): Adjust usage.
2682         * error.c (dump_char): Use output_formatted_scalar. Tidy.
2683         (parm_to_string): Lose unused parameter.  Tidy.
2684         (expr_to_string): Likewise.
2685         (code_to_string): Likewise.
2686         (language_to_string): Likewise.
2687         (op_to_string): Likewise.
2688         (assop_to_string): Likewise.
2689         (digit_buffer): Remove.
2690         (dump_type): Format builtin vector type as __vector__.
2692 2003-06-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2694         * error.c (print_integer): Remove.
2695         (dump_type_suffix): Adjust.
2696         (dump_expr): Likewise.
2698 2003-06-28  Nathan Sidwell  <nathan@codesourcery.com>
2700         * error.c (print_instantiation_partial_context): Take a
2701         location_t.
2702         (print_instantiation_full_context): Adjust.
2703         (print_instantiation_context): Adjust.
2705         * cp-tree.h (cp_line_of, cp_file_of): Remove.
2706         * error.c (cp_line_of, cp_file_of): Merge into ...
2707         (location_of): ... here. Make static, return a location_t.
2708         (cp_error_at, cp_warning_at, cp_pedwarn_at): Adjust.
2710 2003-06-28  Nathan Sidwell  <nathan@codesourcery.com>
2712         PR c++/10784
2713         * call.c (joust): Move warn_conversion check outwards.
2715 2003-06-27  Zack Weinberg  <zack@codesourcery.com>
2717         * decl.c (build_typename_type)
2718         * mangle.c (write_template_template_arg)
2719         * parser.c (cp_parser_scope_through_which_access_occurs)
2720         * pt.c (push_access_scope_real, push_access_scope, pop_access_scope)
2721         * repo.c (get_base_filename)
2722         * semantics.c (maybe_convert_cond):
2723         Mark the definition static, matching the forward declaration.
2725 2003-06-27  Mark Mitchell  <mark@codesourcery.com>
2727         PR c++/10468
2728         * pt.c (tsubst): Handle qualified TYPEOF_TYPEs correctly.
2730 2003-06-27  Mark Mitchell  <mark@codesourcery.com>
2732         PR c++/10796
2733         * decl.c (finish_enum): Implement DR377.
2735         * decl.c (cp_finish_decl): Don't make variables with reference
2736         type readonly while they are being initialized.
2738 2003-06-26  Mark Mitchell  <mark@codesourcery.com>
2740         PR c++/11332
2741         * typeck.c (build_static_cast): Avoid returning expressions with
2742         reference type.
2744 2003-06-26  Nathan Sidwell  <nathan@codesourcery.com>
2746         * call.c (build_op_delete_call): Use strip_array_call. Correct
2747         error message to say 'delete' or 'delete[]'.
2749 2003-06-26  Giovanni Bajo  <giovannibajo@libero.it>
2751         PR c++/8266
2752         * pt.c (check_explicit_specialization): When looking up a
2753         template function from an identifier outside class-scope, bind
2754         it to CP_DECL_CONTEXT.
2756 2003-06-25  Mark Mitchell  <mark@codesourcery.com>
2758         PR c++/10990
2759         * search.c (lookup_base_r): Rely on accessible_p, rather than
2760         trying to emulate that logic here.
2762         PR c++/10931
2763         * call.c (convert_like): Pass issue_conversion_warnings.
2764         (convert_like_with_context): Likewise.
2765         (convert_like_real): Add issue_conversion_warnings parameter.
2766         (perform_direct_initialization_if_possible): New function.
2767         * cp-tree.h (perform_direct_initialization_if_possible): Declare it.
2768         * typeck.c (check_for_casting_away_constness): New function.
2769         (build_static_cast): Rewrite.
2771 2003-06-24  Nathan Sidwell  <nathan@codesourcery.com>
2773         * call.c (enforce_access): Assert we get a binfo.
2774         (build_op_delete_call): Pass a binfo to
2775         perform_or_defer_access_check.
2776         * class.c (alter_access): Likewise.
2777         * decl.c (make_typename_type): Likewise.
2778         (make_unbound_class_template): Likewise.
2779         * lex.c (do_identifier): Likewise.
2780         * method.c (hack_identifier): Likewise.
2781         * parser.c (cp_parser_lookup_name): Likewise.
2782         * search.c (lookup_member): Likewise. Move IDENTIFIER_CLASS_VALUE
2783         test.
2784         * semantics.c (finish_non_static_data_member): Likewise.
2785         (perform_or_defer_access_check): Expect a binfo.
2786         * typeck.c (comptypes): Expect types.
2788         * mangle.c (find_substitution): Don't pass a non-type to same_type_p
2789         * friend.c (make_friend_class): Likewise.
2790         * pt.c (check_default_tmpl_args): Likewise.
2791         (lookup_template_class): Likewise.
2793 2003-06-24  Jan Hubicka  <jh@suse.cz>
2795         * method.c (thunk_labelno): Move outside ifdef block to make garbage
2796         collector happy.
2798 2003-06-24  Jan Hubicka  <jh@suse.cz>
2800         * class.c (build_vtable): Make vtables.
2801         * cp-tree.h (DECL_VTABLE_OR_VTT_P): New macro.
2802         * decl2.c (output_vtable_inherit): Rename to ...
2803         (prepare_assemble_variable): ... this one; change interface.
2804         (maybe_emit_vtables): Do not call output_vtable_inherit.
2805         * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Define.
2806         * cp-tree.h (prepare_assemble_variable): New.
2808 2003-06-23  Andrew Pinski <pinskia@physics.uc.edu>
2810         * method.c: add prototype for make_alias_for_thunk.
2811         (thunk_labelno, make_alias_for_thunk): only define
2812         if ASM_OUTPUT_DEF is defined.
2814 2003-06-23  Jakub Jelinek  <jakub@redhat.com>
2816         * method.c (thunk_labelno): New variable.
2817         (make_alias_for_thunk): New function.
2818         (use_thunk): Use it if defined ASM_OUTPUT_DEF.  Put the thunk
2819         into the same section as the function it is calling.
2820         Include gt-cp-method.h.
2821         * Make-lang.in (gt-cp-method.h): Depend on s-gtype.
2822         (cp/method.o): Depend on gt-cp-method.h.
2823         * config-lang.in (gtfiles): Add $(srcdir)/cp/method.c.
2825 2003-06-23  Jan Hubicka  <jh@suse.cz>
2827         * decl.c (register_dtor_fn): Mark cleanup as used.
2828         * decl2.c (mark_vtable_entries): Skip nops.
2829         * rtti.c (get_tinfo_ptr): Mark tinfo as used.
2830         (build_dynamic_cast_1): Likewise.
2831         (tinfo_base_init): Likewise.
2832         (emit_tinfo_decl): Likewise.
2834 2003-06-23  Jakub Jelinek  <jakub@redhat.com>
2836         * mangle.c (hash_type): Val is the TREE_LIST itself, not a pointer
2837         to it.
2839 2003-06-21  Gabriel Dos Reis <gdr@integrable-solutions.net>
2841         PR c++/10784
2842         * call.c (joust): Warn about choosing conversion sequence only if
2843         -Wconversion.
2845 2003-06-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2847         PR c++/10864
2848         * call.c (op_error): Tidy.
2849         * error.c (dump_expr): Properly format 'T()' when T is an
2850         aggregate type.
2852 2003-06-21  Gabriel Dos Reis <gdr@integrable-solutions.net>
2854         PR c++/10915
2855         * decl.c (grok_op_properties): Warn possible confusing conversion
2856         only if -Wconversion.
2858 2003-06-20  Mark Mitchell  <mark@codesourcery.com>
2860         PR c++/10749
2861         * parser.c (cp_parser_class_head): See through dependent names
2862         when parsing a class-head.
2864         PR c++/10845
2865         * pt.c (try_class_unification): Correct handling of member class
2866         templates.
2868 2003-06-20  Nathan Sidwell  <nathan@codesourcery.com>
2870         * semantics.c (genrtl_finish_function): Adjust
2871         expand_function_end call.
2873 2003-06-19  Mark Mitchell  <mark@codesourcery.com>
2875         PR c++/10939
2876         * pt.c (tsubst_decl): Do not try to substitute into non-dependent
2877         functions.
2878         (value_dependent_expression_p): Correct logic for FUNCTION_DECLs.
2880         PR c++/9649
2881         * cp-tree.h (pushdecl_class_level): Change prototype.
2882         (push_class_level_binding): Likewise.
2883         * decl.c (add_binding): Reject duplicate static data members.
2884         (pushdecl_class_level): Return a value indicating whether or not
2885         the binding was valid.
2886         (push_class_level_binding): Likewise.
2887         * semantics.c (finish_member_declaration): Don't keep invalid
2888         declarations.
2890         PR c++/11041
2891         * call.c (initialize_reference): Do not use cp_finish_decl to emit
2892         temporary variables.
2893         * cp-tree.h (static_aggregates): Declare.
2894         (pushdecl_top_level_and_finish): Likewise.
2895         * decl.c (pushdecl_top_level_1): New function.
2896         (pushdecl_top_level): Use it.
2897         (pushdecl_top_level_and_finish): New function.
2898         (initialize_local_var): Remove redundant code.
2899         (cp_finish_decl): Remove support for RESULT_DECLs.  Don't check
2900         building_stmt_tree.
2901         * decl.h (static_aggregates): Remove.
2902         * decl2.c (get_guard): Use pushdecl_top_level_and_finish.
2903         * rtti.c (get_tinfo_decl): Use pushdecl_top_level_and_finish.
2904         (tinfo_base_init): Likewise.
2906 2003-06-19  Matt Austern  <austern@apple.com>
2908         PR c++/11228
2909         * init.c (build_zero_init): Assert that number of array elements
2910         is an integer constant.
2911         (build_default_init) Don't use build_zero_init for arrays with
2912         variable number of elements.
2914 2003-06-19  Andreas Jaeger  <aj@suse.de>
2916         * cp-tree.h: Remove duplicated declarations.
2918 2003-06-18  Nathanael Nerode  <neroden@gcc.gnu.org>
2920         * pt.c: Convert to ISO C.
2921         * semantics.c: Convert to ISO C.
2923 2003-06-18  Nathan Sidwell  <nathan@codesourcery.com>
2925         * cp-tree.h (comp_except_specs, compparms, cp_has_mutable_p,
2926         at_least_as_qualified_p, more_qualified_p): Return bool.
2927         * typeck.c: ANSIFY function definitions.
2928         (comp_array_types): Take redeclaration bool parameter.
2929         (comptypes): Rearrange STRICT handling.
2930         (at_least_as_qualified_p, more_qualified_p,
2931         comp_cv_qualification): Cache cv quals.
2932         (compparms): Rearrange loop.
2934 2003-06-18  Nathan Sidwell  <nathan@codesourcery.com>
2936         * cp-tree.h (COMPARE_RELAXED): Rename to ...
2937         (COMPARE_DERIVED): ... here. Adjust comment.
2938         (resolve_typename_type_in_current_instantiation): Remove.
2939         (cp_tree_equal, comptypes): Return a bool.
2940         * cvt.c (convert_to_reference): Adjust comptypes call.
2941         * pt.c (template_args_equal, unify,): Adjust cp_tree_equal call.
2942         (resolve_typename_type_in_current_instantiation): Remove.
2943         * tree.c (cp_tree_equal): Return bool. Cope with TEMPLATE_DECLs and
2944         IDENTIFIER_NODEs. Abort if undeciderable. Adjust recursive
2945         calls. Refactor code.
2946         * typeck.c (comp_array_types): Return bool. Lose callback.
2947         parameter. Adjust cp_tree_equal calls.
2948         (comptypes): Return bool. Adjust strict handling. Remove relaxed
2949         enumeration and java type handling. Deal with typename types here.
2950         Adjust recursive and cp_tree_equals calls. Adjust base and derived
2951         checking.
2952         (comp_target_types): Remove unreachable code. Adjust
2953         same_or_base_type_p calls.
2954         (ptr_reasonably_similar): Adjust base and derived check.
2956         * typeck.c (maybe_warn_about_returning_address_of_local): Remove
2957         unused calculation.
2958         (check_return_expr): Adjust error messages.
2959         * cp-tree.def (SCOPE_REF): Correct comment.
2961 2003-06-17  Mark Mitchell  <mark@codesourcery.com>
2963         * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
2964         string again.
2966 2003-06-17  Robert Abeles  <rabeles@archaelogic.com>
2968         * optimize.c (dump_function): Form complete flag name by
2969         prefixing 'fdump-' to string returned by dump_flag_name().
2971 2003-06-17  Mark Mitchell  <mark@codesourcery.com>
2973         * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
2974         string.
2976 2003-06-17  Jason Merrill  <jason@redhat.com>
2978         PR c++/10929
2979         * decl.c (grokfndecl): Don't mark a function inline for
2980         -finline-functions if it isn't defined.
2982 2003-06-17  Mark Mitchell  <mark@codesourcery.com>
2984         PR c++/10712
2985         * class.c (handle_using_decl): Robustify.
2987         PR c++/11105
2988         * cp-tree.h (DECL_CONV_FN_TYPE): New method.
2989         * mangle.c (struct globals): Remove internal_mangling_p.
2990         (write_unqualified_name): Use DECL_CONV_FN_TYPE.
2991         (write_template_parm): Don't write out the level number.
2992         (conv_type_names): New variable.
2993         (hash_type): New function.
2994         (compare_type): Likewise.
2995         (mangle_conv_op_name_for_type): Don't try to mangle conversion
2996         operator names.
2997         * search.c (lookup_conversion_operator): New function.
2998         (lookup_fnfields_1): Use it.
3000 2003-06-17  Andreas Jaeger  <aj@suse.de>
3002         * except.c: Remove duplicate declaration of push_eh_cleanup.
3004         * call.c: Remove extra declaration of inhibit_warnings.
3006 2003-06-16  Nathanael Nerode  <neroden@gcc.gnu.org>
3008         2003-06-16  Jens-Michael Hoffmann  <jensmh@gmx.de>
3009         * mangle.c: Convert to ISO C.
3011 2003-06-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3013         * cp/decl.c, cp/pt.c, cp/search.c, cp/tree.c: Don't use the PTR
3014         macro.
3016 2003-06-16  Nathanael Nerode  <neroden@gcc.gnu.org>
3018         * tree.c: Convert to ISO C.
3020 2003-06-16  Kazu Hirata  <kazu@cs.umass.edu>
3022         * cp-tree.h: Follow spelling conventions.
3023         * mangle.c: Likewise.
3024         * method.c: Likewise.
3025         * parser.c: Likewise.
3027 2003-06-14  Nathan Sidwell  <nathan@codesourcery.com>
3029         * decl.c (start_function): Adjust init_function_start call.
3030         * method.c (use_thunk): Likewise.
3031         * semantics.c (genrtl_start_function): Likewise.
3033 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
3035         * Make-lang.in: Remove c-options.o.
3037 2003-06-13  Nathanael Nerode  <neroden@gcc.gnu.org>
3039         * lex.c: Convert to ISO C.
3041         2003-05-19  Jens-Michael Hoffmann  <jensmh@gmx.de>
3042         * init.c: removes use of PARAMS macro.  Use ISO style function
3043         declarations.  (Not copyright-significant change.)
3045         * rtti.c: Remove PARAMS.
3047         * typeck2.c: Convert to ISO C.
3049 2003-06-12  Mark Mitchell  <mark@codesourcery.com>
3051         PR c++/10635
3052         * typeck.c (build_c_cast): Check that the destination type is
3053         complete.
3055 2003-06-11  Mark Mitchell  <mark@codesourcery.com>
3057         PR c++/10432
3058         * cp-tree.h (finish_declarator): Remove.
3059         * decl.c (cp_finish_decl): Make sure to pop_nested_class even for
3060         erroneous declarations.
3061         * semantics.c (finish_declarator): Remove.
3063 2003-06-11  Roger Sayle  <roger@eyesopen.com>
3065         * decl2.c (generate_ctor_or_dtor_function): Avoid expanding a
3066         global static constructor/destructor if it will be empty, i.e.
3067         either doesn't call any ctors/dtors or only calls pure or const
3068         ctors/dtors.
3070 2003-06-11  Mark Mitchell  <mark@codesourcery.com>
3072         * mangle.c (tm_p.h): Include it.
3073         * Make-lang.in (cp/mangle.o): Depend on $(TM_P_H).
3075         PR c++/11131
3076         * tree.c (cp_cannot_inline_fn): Check for "inline" before
3077         instantiation.
3079 2003-06-10  Jason Merrill  <jason@redhat.com>
3081         PR c++/10968
3082         * pt.c (mark_decl_instantiated): Clear DECL_COMDAT.
3084 2003-06-10  Andrew Pinski  <pinskia@physics.uc.edu>
3086         * decl.c (start_cleanup_fn): Move static 'counter' out, mark with GTY.
3087         (start_cleanup_cnt): New.
3089 2003-06-10  Mark Mitchell  <mark@codesourcery.com>
3091         PR c++/11131
3092         * cp-tree.h (template_for_substitution): Declare.
3093         * decl2.c (mark_used): Use it when figuring out whether or not a
3094         function is inline.
3095         * pt.c (template_for_substitution): Give it external linkage.
3096         * tree.c (cp_cannot_inline_tree_fn): Instantiate as early as
3097         possible.
3099 2003-06-09  Zack Weinberg  <zack@codesourcery.com>
3101         PR 8861
3102         * mangle.c (write_real_cst): New function.  Implement
3103         ABI-compliant mangling of floating-point literals when
3104         -fabi-version>=2; provide backward compatibility with 3.3 when
3105         -fabi-version=1 (with warning).  Clarify commentary.
3106         (write_template_arg_literal): Use write_real_cst.
3108 2003-06-07  Andreas Jaeger  <aj@suse.de>
3110         * cp/decl.c (xref_tag): Remove undefined macro NONNESTED_CLASSES.
3112 2003-06-07  Neil Booth  <neil@daikokuya.co.uk>
3114         * cp-lang.c (LANG_HOOKS_DECODE_OPTON): Drop.
3115         (LANG_HOOKS_HANDLE_OPTION): Override.
3116         * cp-tree.h (cxx_init_options): Update.
3117         * lex.c (cxx_init_options): Update.
3119 2003-06-05  Jan Hubicka  <jh@suse.cz>
3121         * Make-lang.in:  Add support for stageprofile and stagefeedback
3123 2003-06-04  J"orn Rennecke <joern.rennecke@superh.com>
3125         * decl.c (grokdeclarator): Error_mark_node in, error_mark_node out.
3127 2003-06-04  Andreas Jaeger  <aj@suse.de>
3129         * g++spec.c (lang_specific_driver): Remove ALT_LIBM usage.
3131 2003-06-03  Jason Merrill  <jason@redhat.com>
3133         * cp/cp-tree.h (CP_AGGREGATE_TYPE_P): Accept vectors.
3135         * cp/decl.c (reshape_init): Handle vectors.
3137         * testsuite/g++.dg/init/array10.C: New.
3139 2003-06-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3141         PR c++/10940
3142         * pt.c (check_explicit_specialization): Check for 'static'
3143         earlier.
3145 2003-05-31  Diego Novillo  <dnovillo@redhat.com>
3147         * class.c (dump_array): Call CONSTRUCTOR_ELTS to access
3148         the operand of a CONSTRUCTOR node.
3150 2003-05-31  Gabriel Dos Reis <gdr@integrable-solutions.net>
3152         * decl.c (cp_binding_level::this_entity): Rename from this_class.
3153         (cxx_scope_descriptor): New function.
3154         (cxx_scope_debug): Likewise.
3155         (push_binding_level): Use it.
3156         (pop_binding_level): Likewise.
3157         (suspend_binding_level): Likewise.
3158         (resume_binding_level): Likewise.
3159         (pushlevel_class): Adjust use of this_class.
3160         (pushtag): Likewise.
3161         (lookup_name_real): Likewise.
3162         (global_scope_name): New variable.
3163         (initialize_predefined_identifiers): Initialize it.
3164         (push_namespace): Use it.
3165         (make_cxx_scope): New function.
3166         (pushlevel): Use it.
3167         (pushlevel_class): Likewise.
3168         (push_binding_level): Simplify.  Loose the last two arguments.
3169         (make_binding_level): Remove.
3170         (initial_push__namespace_scope): New function.
3171         (push_namespace): Use it.  Simplify.
3172         (cxx_init_decl_processing): Likewise.
3173         (declare_namespace_level): Remove.
3175 2003-05-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3177         PR c++/10956
3178         * pt.c (instantiate_decl): Don't use full template arguments if
3179         we are dealing with specializations.
3181 2003-05-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3183         * decl.c (ENABLE_SCOPE_CHECKING): Rename from DEBUG_BINDING_LEVELS.
3184         (binding_depth): Unconditionally define.
3185         (is_class_level): Likewise.
3186         (indent): Likewise.  Take an indenting parameter.
3187         (push_binding_level): Remove conditional definittion.
3188         (pop_binding_level): Likewise.
3189         (suspend_binding_level): Likewise.
3190         (resume_binding_level): Likewise.
3191         (pushlevel): Likewise.
3192         (pushlevel_class): Likewise.
3193         (poplevel_class): Likewise.
3194         (pop_everything): Likewise.
3196 2003-05-27  Gabriel Dos Reis <gdr@integrable-solutions.net>
3198         * name-lookup.h (global_scope_p): New macro.
3199         * decl.c (pop_binding_level): Use it.  Don't refer directly to
3200         global_binding_level.
3201         (suspend_binding_level): Likewise.
3202         (global_bindings_p): Likewise.
3203         (print_other_binding_stack): Likewise.
3204         (print_binding_stack): Likewise.
3205         (maybe_push_to_top_level): Likewise.
3206         (pushdecl_namespace_level): Likewise.
3207         (cxx_init_decl_processing): Likewise.
3208         (start_decl): Likewise.
3209         (cp_finish_decl): Likewise.
3210         (start_function): Likewise.
3211         (global_binding_level): Remove.
3213 2003-05-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3215         * parser.c (cp_parser_explicit_instantiation): Restore old
3216         access before template instantiation.
3218 2003-05-23  Geoffrey Keating  <geoffk@apple.com>
3220         * lang-specs.h: Use -o to specify preprocessor's output file.
3221         Make -no-integrated-cpp work when building PCH files.
3223 2003-05-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3225         PR c++/10682
3226         * pt.c (instantiate_class_template): Use DECL_ARTIFICIAL to
3227         check for implicitly created typedef to an enum.
3229 2003-05-21  Jason Merrill  <jason@redhat.com>
3231         * init.c (build_vec_delete): Copy the address into a temporary
3232         variable before calling build_vec_delete_1.
3233         * decl2.c (delete_sanity): Don't call stabilize_reference.
3235 2003-05-21  Nathan Sidwell  <nathan@codesourcery.com>
3237         * pt.c (register_specialization): Update the decl's location,
3238         if necessary.
3239         (check_explicit_specialization): Likewise.
3241 2003-05-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3243         * error.c (dump_expr): Use HOST_WIDE_INT_PRINT_DOUBLE_HEX.
3245 2003-05-21  Danny Smith  <dannysmith@users.sourceforge.net>
3247         PR c++/9738
3248         * decl.c (duplicate_decls): Re-invoke make_decl_rtl
3249         if the old decl had instantiated DECL_RTL.
3250         (Base on Richard Henderson 2003-05-13 patch to c-decl.c).
3252 2003-05-19  Matt Austern  <austern@apple.com>
3254         * lang-options.h: Document -Wno-invalid-offsetof
3255         * typeck.c (build_class_member_access_expr): Don't complain about
3256         (Foo *)p->x for non-POD Foo if warn_invalid_offset is zero.
3258 2003-05-18 Andrew Pinski <pinskia@physics.uc.edu>
3260         * name-lookup.c (free_binding_entry): fix where the GTY markers are.
3261         (binding_entry_make): Make entry->chain NULL after getting an entry.
3262         fix the spelling of chain in a comment.
3263         (binding_table_free): speed up by having temporary variable.
3264         (binding_table_new): set table->chain to be NULL after allocating
3265         a table.
3266         (cxx_binding_make): use gcc_alloc instead of ggc_alloc_cleared and set
3267         binding->previous to NULL after getting an binding for speed.
3269 2003-05-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3271         * cp-tree.h (struct lang_type_class): Replace data member tags
3272         with hash-table nested_udts.
3273         (CLASSTYPE_NESTED_UTDS): Rename from CLASSTYPE_TAGS.
3274         * class.c (unreverse_member_declarations): Don't touch
3275         CLASSTYPE_TAGS.
3276         (pushclass): Use cxx_remember_type_decls.
3277         * decl.c (struct cp_binding_level): Replace data member tags with
3278         hash-table type_decls.
3279         (pop_binding_level): Handle level->type_decls.
3280         (kept_level_p): Adjust.
3281         (poplevel): Remove unused local variable.
3282         (bt_print_entry): New function.
3283         (print_binding_level): Use it.
3284         (push_namespace): Build current_binding_level->type_decls.
3285         (maybe_process_template_type_declaration): Adjust.
3286         (pushtag): Likewise.
3287         (clear_anon_tags): Use binding_table_remove_anonymous_types.
3288         (gettags): Remove.
3289         (cxx_remember_type_decls):  Rename from storetags.  Adjust.
3290         (lookup_tag): Use binding_table_find_anon_type.  Tidy.
3291         (lookup_tag_reverse): Use binding_table_reverse_maybe_remap.
3292         (cxx_init_decl_processing): Build global_binding_level->type_decls.
3293         (store_parm_decls): Remove pointless code.
3294         * name-lookup.c (free_binding_entry): New variable.
3295         (ENTRY_INDEX): New macro.
3296         (struct binding_table_s): New datatype.
3297         (binding_entry_make): New function.
3298         (binding_entry_free): Likewise.
3299         (binding_table_construct): Likewise.
3300         (binding_table_free): Likewise.
3301         (binding_table_new): Likewise.
3302         (binding_table_expand): Likewise.
3303         (binding_table_insert): Likewise.
3304         (binding_table_find): Likewise.
3305         (binding_table_find_anon_type): Likewise.
3306         (binding_table_reverse_maybe_remap): Likewise.
3307         (binding_table_remove_anonymous_types): Likewise.
3308         (binding_table_foreach): Likewise.
3309         * name-lookup.h (binding_table): New type.
3310         (binding_entry): Likewise.
3311         (bt_foreach_proc): Likewise.
3312         (struct binding_entry_s): New datatype.
3313         (SCOPE_DEFAULT_HT_SIZE): New macro.
3314         (CLASS_SCOPE_HT_SIZE): Likewise.
3315         (NAMESPACE_ORDINARY_HT_SIZE): Likewise.
3316         (NAMESPACE_STD_HT_SIZE): Likewise.
3317         (GLOBAL_SCOPE_HT_SIZE): Likewise.
3318         (binding_table_new): Declare.
3319         (binding_table_free): Likewise.
3320         (binding_table_insert): Likewise.
3321         (binding_table_find_anon_type): Likewise.
3322         (binding_table_reverse_maybe_remap): Likewise.
3323         (binding_table_remove_anonymous_types): Likewise.
3324         (binding_table_foreach): Likewise.
3325         (binding_table_find): Likewise.
3326         (cxx_remember_type_decls): Likewise.
3327         * pt.c (bt_instantiate_type_proc): New function.
3328         (do_type_instantiation): Use it.
3329         * search.c (lookup_field_r): Use binding_table_find.
3331 2003-05-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3333         * semantics.c (perform_deferred_access_checks): Don't discard
3334         checked access.
3336 2003-05-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3338         * error.c (cp_error_at, cp_warning_at, cp_pedwarn_at): Eliminate
3339         libiberty VA_ macros, always use stdarg.
3340         * rtti.c (create_pseudo_type_info): Likewise.
3341         * tree.c (build_min_nt, build_min): Likewise.
3343 2003-05-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3345         * ptree.c (cxx_print_type, cxx_print_xnode): Use string
3346         concatentation on HOST_WIDE_INT_PRINT_* format specifier to
3347         collapse multiple function calls into one.
3348         * tree.c (debug_binfo): Likewise.
3350 2003-05-15  Jason Merrill  <jason@redhat.com>
3352         PR c++/5388
3353         * call.c (conditional_conversion): Don't consider implicit
3354         conversions if T2 is a base of T1.
3355         * cp-tree.h (DERIVED_FROM_P, UNIQUELY_DERIVED_FROM_P): Make boolean.
3356         (ACCESSIBLY_UNIQUELY_DERIVED_P, PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
3358         * parser.c (cp_parser_primary_expression): Convert a static data
3359         member from reference.
3361 2003-05-15  Mark Mitchell  <mark@codesourcery.com>
3363         * call.c (build_op_delete_call): Avoid creating unnecessary types.
3364         * class.c (instantiate_type): Remove tests for tf_no_attributes.
3365         * cp-tree.h (tsubst_flags_t): Remove tf_no_attributes.
3366         (COMPARE_NO_ATTRIBUTES): Remove.
3367         * typeck.c (comptypes): Do not check COMPARE_NO_ATTRIBUTES.
3369         PR c++/8385
3370         * semantics.c (finish_typeof): Refine type-dependency check.
3372 2003-05-13  Jason Merrill  <jason@redhat.com>
3374         * typeck.c (build_modify_expr): Don't always stabilize the lhs and
3375         rhs.  Do stabilize the lhs of a MODIFY_EXPR used on the lhs.
3377 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3379         * method.c (synthesize_method): Call push/pop_deferring_access_checks.
3381 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3383         PR c++/10230, c++/10481
3384         * semantics.c (finish_non_static_data_member): Handle when the
3385         non-static member is not from a base of the current class type.
3387 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3389         PR c++/10552
3390         * pt.c (tsubst_copy): Handle TEMPLATE_DECL that is a member class
3391         template and has dependent context.
3393 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3395         * pt.c (instantiate_decl): Call push/pop_deferring_access_checks.
3397 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3399         PR c++/9252
3400         * cp-tree.h (saved_scope): Remove check_access field.
3401         (tsubst_flags_t): Remove tf_parsing.
3402         * decl.c (maybe_push_to_top_level): Don't initialize
3403         scope_chain->check_access.
3404         (make_typename_type, make_unbound_class_template): Don't use
3405         tf_parsing.
3406         (register_dtor_fn): Use push/pop_deferring_access_checks
3407         instead of scope_chain->check_access.
3408         * method.c (use_thunk): Likewise.
3409         * parser.c (cp_parser_explicit_instantiation
3410         (cp_parser_constructor_declarator_p): Don't call
3411         push/pop_deferring_access_checks here.
3412         (cp_parser_template_argument, cp_parser_class_name): Don't use
3413         tf_parsing.
3414         (yyparse): Check flag_access_control.
3415         * pt.c (instantiate_class_template): Call
3416         push/pop_deferring_access_checks.
3417         * semantics.c (push_deferring_access_checks): Propagate
3418         dk_no_check.
3419         (perform_or_defer_access_check): Make sure basetype_path is
3420         a type before comparison.
3421         * call.c (build_op_delete_call, build_over_call): Use
3422         perform_or_defer_access_check.
3423         * class.c (alter_access): Likewise.
3424         * init.c (build_offset_ref): Likewise.
3425         * lex.c (do_identifier): Likewise.
3426         * method.c (hack_identifier): Likewise.
3427         * search.c (lookup_member): Likewise.
3428         * semantics.c (finish_non_static_data_member): Likewise.
3429         (simplify_aggr_init_exprs_r): Use push/pop_deferring_access_checks
3430         instead of flag_access_control.
3432 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3434         PR c++/9554
3435         * parser.c (cp_parser_class_name): Remove check_access parameter.
3436         All caller adjusted.  Update declaration.
3437         (cp_parser_lookup_name): Likewise.
3438         * semantics.c (push_deferring_access_checks): Change parameter type
3439         to enum deferring_kind.  All caller adjusted.
3440         (resume_deferring_access_checks): Adjust to use new enum.
3441         (stop_deferring_access_checks): Likewise.
3442         (perform_or_defer_access_check): Likewise.
3443         * cp-tree.h (deferring_kind): New enum.
3444         (deferred_access): Adjust field type.
3445         (push_deferring_access_checks): Update declaration.
3447 2003-05-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3449         PR c++/10555, c++/10576
3450         * pt.c (lookup_template_class): Handle class template with
3451         multiple levels of parameters when one of the levels contain
3452         errors.
3454 2003-05-08  Jason Merrill  <jason@redhat.com>
3456         * init.c (build_new_1): Don't reuse a TARGET_EXPR in an
3457         expression.  Undo some of the recent reorg.
3459 2003-05-07  Richard Henderson  <rth@redhat.com>
3461         PR c++/10570
3462         * cfns.gperf: Comment out POSIX thread cancellation points,
3463         plus abort and raise.
3464         * cfns.h: Regenerate.
3466 2003-05-07  Jason Merrill  <jason@redhat.com>
3468         * call.c (build_conditional_expr): Don't assume that the folded
3469         expression has result_type.
3471 2003-05-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3473         * typeck.c (build_unary_op): Deal with const qualifier in
3474         invalid pointer-to-member earlier.
3476 2003-05-05  Jason Merrill  <jason@redhat.com>
3478         PR c++/9537
3479         * call.c (conditional_conversion): Build an RVALUE_CONV if
3480         we're just changing the cv-quals.
3481         (build_conditional_expr): Don't call convert to change
3482         cv-quals.
3484 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3486         PR c++/10496
3487         * typeck.c (build_unary_op): Don't output const qualifier when
3488         output invalid pointer-to-member diagnostics.
3490 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3492         * decl.c: Fix typos.
3494 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3496         PR c++/4494
3497         * decl.c (start_function): Use same_type_p to check return type
3498         of main.
3500 2003-05-03  Zack Weinberg  <zack@codesourcery.com>
3502         PR c/10604
3503         * cp/typeck.c (build_x_compound_expr): No need to check
3504         extra_warnings as well as warn_unused_value.
3506 2003-05-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3508         PR c++/9364, c++/10553, c++/10586
3509         * decl.c (make_typename_type): Don't crash on illegal code.
3511 2003-05-03  Nathan Sidwell  <nathan@codesourcery.com>
3513         * class.c (finish_struct): Use location_t and input_location
3514         directly.
3515         * decl.c (make_label_decl): Likewise.
3516         (use_label): Likewise.
3517         * decl2.c (warn_if_unknown_interface): Likewise.
3518         (start_static_initialization_or_destruction): Likewise.
3519         (generate_ctor_or_dtor_function): Likewise.
3520         (finish_file): Likewise.
3521         * error.c (print_instantiation_full_context): Likewise.
3522         * init.c (create_temporary_var): Likewise.
3523         * method.c (synthesize_method): Likewise.
3524         * parser.c (cp_token): Likewise.
3525         (cp_lexer_set_source_position_from_token): Likewise.
3526         (cp_lexer_get_preprocessor_token): Likewise.
3527         (cp_parser_statement): Likewise.
3528         * pt.c (tsubst_friend_function): Likewise.
3529         (instantiate_class_template): Likewise.
3530         (tsubst_decl): Likewise.
3531         (tsubst): Likewise.
3532         (instantiate_decl): Likewise.
3533         * semantics.c (begin_class_definition): Likewise.
3534         (expand_body): Likewise.
3536 2003-05-01  Nathan Sidwell  <nathan@codesourcery.com>
3538         * class.c (finish_struct): Rename lineno to input_line.
3539         * decl.c (push_binding_level, pop_binding_level,
3540         suspend_binding_level, resume_binding_level, make_label_decl,
3541         use_label, start_function): Likewise.
3542         * decl2.c (warn_if_unknown_interface,
3543         start_static_initialization_or_destruction,
3544         generate_ctor_or_dtor_function, finish_file): Likewise.
3545         * error.c (cp_line_of, print_instantiation_full_context,
3546         print_instantiation_context): Likewise.
3547         * except.c (check_handlers_1, check_handlers): Likewise.
3548         * init.c (create_temporary_var): Likewise.
3549         * method.c (use_thunk, synthesize_method): Likewise.
3550         * parser.c (cp_lexer_set_source_position_from_token,
3551         cp_lexer_get_preprocessor_token): Likewise.
3552         * pt.c (push_tinst_level, pop_tinst_level,
3553         tsubst_friend_function, instantiate_class_template, tsubst_decl,
3554         tsubst, tsubst_expr, instantiate_decl): Likewise.
3555         * semantics.c (genrtl_try_block, finish_label_stmt,
3556         begin_class_definition, expand_body,
3557         genrtl_finish_function): Likewise.
3558         * tree.c (build_min_nt, build_min): Likewise.
3560 2003-05-01  Mark Mitchell  <mark@codesourcery.com>
3562         * decl2.c (comdat_linkage): Don't externalize explicit
3563         instantiations.
3565 2003-05-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3567         PR c++/10554
3568         * decl2.c (do_class_using_decl): Check if operand 0 of SCOPE_REF
3569         is not NULL.
3571 2003-05-01  Steven Bosscher  <steven@gcc.gnu.org>
3573         * cp-tree.h (struct lang_id2): Remove.  Move fields from here...
3574         (struct lang_identifier): ... to here.
3575         (LANG_ID_FIELD): Remove.
3576         (SET_LANG_ID): Remove.
3577         (IDENTIFIER_LABEL_VALUE): Adjust for new lang_identifier.
3578         (SET_IDENTIFIER_LABEL_VALUE): Likewise.
3579         (IDENTIFIER_IMPLICIT_DECL): Likewise.
3580         (SET_IDENTIFIERL_IMPLICIT_DECL): Likewise.
3581         (IDENTIFIER_ERROR_LOCUS): Likewise.
3582         (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
3584 2003-05-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3586         PR c++/8772
3587         * pt.c (convert_template_argument): Correct diagnostic.
3589 2003-04-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3591         PR c++/9432, c++/9528
3592         * decl2.c (validate_nonmember_using_decl): Handle SCOPE_REF.
3594 2003-04-30  Garbiel Dos Reis  <gcc@integrable-solutions.net>
3596         * decl.c (check_previous_goto_1): Adjust prototype.
3597         (check_previous_goto): Adjust use.
3598         (check_switch_goto): Likewise.
3599         (use_label): Adjust.
3600         (check_previous_goto_1): Don't use pedwarn_with_file_and_line.
3601         (struct named_label_use_list): Use location_t datatype.
3603 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
3605         PR c++/10551
3606         * pt.c (mark_decl_instantiated): Defer all explicit instantiations
3607         that have not yet been written out.
3609 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
3611         PR c++/10549
3612         * class.c (layout_class_type): Mark overlong bitfields as having
3613         the maximum size permitted by their type, after layout.
3615         PR c++/10527
3616         * error.c (dump_expr): Correctly handling of NEW_EXPR.4
3618 2003-04-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3620         * call.c (build_operator_new_call): Fix typo.
3621         * lang-options.h: Likewise.
3623 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
3625         PR c++/10515
3626         * cp-tree.h (lookup_field_1): Declare it.
3627         * search.c (lookup_field_1): Make it public.
3628         * decl.c (reshape_init): Handle designated initializers.
3630         * decl.c (maybe_commonize_var): Further tweak support for systems
3631         without weak symbols.
3633 2003-04-27  Mark Mitchell  <mark@codesourcery.com>
3635         * decl.c (maybe_commonize_var): Fix thinko in last patch.
3637 2003-04-27  Mark Mitchell  <mark@codesourcery.com>
3639         PR c++/10506
3640         * method.c (use_thunk): Decrement immediate_size_expand.
3642         PR c++/10503
3643         * cp-tree.h (DECL_VAR_MARKED_P): New macro.
3644         (DECL_MAYBE_TEMPLATE): Remove.
3645         * class.c (fixed_type_or_null): Avoid infinite recursion.
3647         * decl.c (maybe_commonize_var): Make the code match the comments.
3648         * pt.c (instantiate_decl): Move call to import_export_decl.
3650 2003-04-26  Mark Mitchell  <mark@codesourcery.com>
3652         * decl2.c (finish_file): Fix merge botch.
3654 2003-04-25  Mark Mitchell  <mark@codesourcery.com>
3656         * decl2.c (finish_file): Don't call import_export_decl for
3657         functions that are not defined.
3658         (handle_class_head): Robustify.
3659         * pt.c (instantiate_decl): Do not call cp_finish_decl for
3660         variables that are not defined.
3662 2003-04-24  Sylvain Pion  <Sylvain.Pion@mpi-sb.mpg.de>
3664         * call.c (print_z_candidates): Fix off by one error.
3666 2003-04-24  Nathan Sidwell  <nathan@codesourcery.com>
3668         PR c++/10337
3669         * call.c (joust): Don't warn about conversion ops that are exact
3670         or cv-conversions. Rearrange to avoid multiple type comparisons.
3672 2003-04-23  Mark Mitchell  <mark@codesourcery.com>
3674         PR c++/10471
3675         * call.c (build_cxx_call): Robustify.
3677 2003-04-23  Neil Booth  <neil@daikokuya.co.uk>
3679         * Make-lang.in (lex.o): Remove mbchar.h.
3680         * lex.c (MULTIBYTE_CHARS): Lose.
3681         * parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled
3682         in c-lex.c.
3684 2003-04-23  Mark Mitchell  <mark@codesourcery.com>
3686         PR c++/9847
3687         * cp-tree.h (duplicate_tag_error): Remove.
3688         * class.c (duplicate_tag_error): Remove.
3689         * semantics.c (begin_class_definition): Return immediately for a
3690         duplicate class definition.
3692         PR c++/10451
3693         * decl.c (grokdeclarator): Correct logic for "mutable" errors.
3695 2003-04-22  Mark Mitchell  <mark@codesourcery.com>
3697         PR c++/10446
3698         * search.c (lookup_fnfields_1): Handle empty slots in the method
3699         vector.
3701         PR c++/10428
3702         * decl.c (check_elaborated_type_specifier): New function, split
3703         out from ...
3704         (xref_tag): ... here.  Use the new function in more places.
3706         * rtti.c (throw_bad_typeid): Use build_cxx_call.
3708 2003-04-21  Mark Mitchell  <mark@codesourcery.com>
3710         * call.c (build_over_call): Use build_cxx_call.
3711         (build_cxx_call): New method, split out of build_over_call.
3712         * cp-tree.h (language_function): Add can_throw.
3713         (build_cxx_call): Declare it.
3714         * decl.c (finish_function): If a function does not contain any
3715         calls to functions that can throw an exception, indicate that
3716         fact.
3717         * decl2.c (mark_used): Do not defer the instantiation of
3718         functions, if the current function does not throw.
3719         * optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones.
3720         * pt.c (instantiate_decl): Make sure import_export_decl is called
3721         before emitting things.
3722         * rtti.c (throw_bad_cast): Use build_cxx_call.
3723         (build_dynamic_cast_1): Likewise.
3724         * typeck.c (build_function_call): Likewise.
3726 2003-04-21  Nathan Sidwell  <nathan@codesourcery.com>
3728         PR c++/9881
3729         * typeck.c (build_unary_op): Fold all COMPONENT_REF addr
3730         expressions. Reverts my 2002-08-08 patch.
3732         * typeck.c (comp_ptr_ttypes_real): Swap final && operands for
3733         cheaper early exit.
3735 2003-04-20  Nathan Sidwell  <nathan@codesourcery.com>
3737         * cp/decl2.c (start_static_storage_duration_function): Take count
3738         arg, don't check if it wraps round.
3739         (generate_ctor_or_dtor_function): Add locus arg, use it.
3740         (generate_ctor_and_dtor_functions_for_priority): Data arg is a
3741         locus.
3742         (finish_file): Set line numbers to past EOF for synthesized
3743         functions.
3745 2003-04-20  Nathan Sidwell  <nathan@codesourcery.com>
3747         PR c++/10405
3748         * search.c (lookup_field_1): Final scan goes backwards for
3749         types, forwards for non-types.
3751 2003-04-17  Roger Sayle  <roger@eyesopen.com>
3753         PR c/10375
3754         * decl.c (duplicate_decls): Preserve "const", "noreturn" and
3755         "nothrow" function attributes.
3757 2003-04-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3759         PR c++/10347
3760         * pt.c (type_dependent_expression_p): Handle array new.
3762 2003-04-15  Mark Mitchell  <mark@codesourcery.com>
3764         PR c++/10381
3765         * parser.c (cp_parser_primary_expression): Reorganize logic for
3766         dealing with name lookup failures.
3768 2003-04-15  Jason Merrill  <jason@redhat.com>
3770         * decl2.c (mark_used): Don't instantiate anything if
3771         skip_evaluation.
3773 2003-04-14  Ziemowit Laski  <zlaski@apple.com>
3775         * tree.c (build_cplus_array_type_1): Do not call
3776         uses_template_parms() on a NULL index_type.
3778 2003-04-13  Roger Sayle  <roger@eyesopen.com>
3780         * decl.c (duplicate_decls): Preserve pure and malloc attributes.
3782 2003-04-12  Mark Mitchell  <mark@codesourcery.com>
3784         PR c++/10300
3785         * init.c (build_new_1): Reorganize.
3787 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
3789         * class.c (initialize_array)
3790         * decl.c (reshape_init)
3791         * decl2.c (build_expr_from_tree)
3792         * init.c (build_zero_init)
3793         * pt.c (tsubst_copy, tsubst_copy_and_build)
3794         * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer)
3795         (ptm_initializer, class_initializer, get_pseudo_ti_init)
3796         * semantics.c (finish_compound_literal)
3797         * typeck.c (build_ptrmemfunc1)
3798         * typeck2.c (store_init_value, process_init_constructor)
3799         (build_functional_cast): Use build_constructor.
3801 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
3803         * call.c (print_z_candidates): Use gcc_gettext_width, not
3804         strlen, to determine how much padding to use.
3806 2003-04-10  Zack Weinberg  <zack@codesourcery.com>
3808         * decl.c: Update all calls to shadow_warning.
3810 2003-04-10  Mark Mitchell  <mark@codesourcery.com>
3812         * class.c (layout_class_type): Correct handling for overlong
3813         bit-fields whose width is the same as an integer type.
3815 2003-04-06  Zack Weinberg   <zack@codesourcery.com>
3817         * cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero.
3818         * cp-lang.c (cp_tree_size): New function.
3819         (LANG_HOOKS_TREE_SIZE): Override.
3821         * cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct
3822         tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill.
3823         (union lang_tree_node): Remove common and srcloc members.
3824         (build_srcloc_here): Don't prototype.
3825         * decl.c (cp_tree_node_structure): Kill SRCLOC case.
3826         * pt.c (pending_templates): Correct comment.
3827         * tree.c (build_srcloc, build_srcloc_here): Kill.
3829 2003-04-06  Zack Weinberg   <zack@codesourcery.com>
3831         * call.c: Include intl.h.
3832         (print_z_candidate): Always use inform; get rid of errfn
3833         argument. Reorganize so that all the strings get picked up
3834         by xgettext.  Note obligation of caller to pass first argument
3835         through gettext.
3836         (print_z_candidates): Update to match.  Indent second and
3837         successive candidates by strlen() of translated message.
3838         (joust): Restructure ambiguous-conversion pedwarn so that
3839         translators see a complete sentence.  Update calls to
3840         print_z_candidate.
3842         * Make-lang.in (cp/call.o): Update dependencies.
3844 2003-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3846         * decl.c (set_current_binding_level): Delete, revert last change.
3847         (current_binding_level): Modify to allow it as as lvalue.
3849 2003-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3851         * name-lookup.c (find_binding): Pass appropriate pointer type to
3852         POP_TIMEVAR_AND_RETURN.
3854 2003-04-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3856         * Make-lang.in (cp-warn): Add $(STRICT_WARN).
3857         * cp-tree.h: Don't insist on having GNUC.
3859 2003-04-03  Jason Merrill  <jason@redhat.com>
3861         * cvt.c (ocp_convert): Only abort if we try to convert an object
3862         of TREE_ADDRESSABLE type.
3864         * class.c (build_vtable): Set DECL_ALIGN here.
3865         (get_vtable_decl): Not here.
3866         (layout_vtable_decl): Or here.
3867         (create_vtable_ptr): Or here.
3868         (layout_class_type): Or here.
3869         (check_bitfield_decl): Don't mess with field alignment.
3871 2003-04-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3873         * operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR,
3874         DEF_ASSN_OPERATOR): Delete spurious semi-colon.
3875         * rtti.c (dfs_class_hint_mark): Likewise.
3877         * decl.c (push_local_name, push_class_level_binding,
3878         maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in
3879         functions returning void.
3880         * decl2.c (add_using_namespace): Likewise.
3882         * decl.c (print_binding_level, print_other_binding_stack,
3883         print_binding_stack): Cast argument of %p specifier to void*.
3884         * ptree.c (cxx_print_decl): Likewise.
3886         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
3887         VAR_FUNCTION_OR_PARM_DECL_CHECK,
3888         VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
3889         BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK,
3890         LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__.
3892         * decl.c (set_current_binding_level): New macro.  Use throughout
3893         when setting the current binding level.
3895         * cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma
3896         in enum.
3897         * method.c (mangling_flags): Likewise.
3899         * cp-tree.h (lang_type_header): Add __extension__ and use
3900         CHAR_BITFIELD for members.
3902 2003-04-02  Geoffrey Keating  <geoffk@apple.com>
3904         PR other/9274
3905         * mangle.c: Include gt-cp-mangle.h.
3906         (subst_identifiers): Mark with GTY.
3907         * config-lang.in (gtfiles): Add cp/mangle.c.
3908         * Make-lang.in: (gt-cp-mangle.h): New rule.
3909         (cp/mangle.o): Depends on gt-cp-mangle.h.
3911 2003-04-01  Andrew Pinski  <pinskia@physics.uc.edu>
3913         * config-lang.in (gtfiles): Add \$(srcdir)/cp/name-lookup.c
3914         after \$(srcdir)/cp/name-lookup.h.
3915         * name-lookup.c: (cxx_binding_make): Use ggc_alloc_clearedinstead
3916         of ggc_alloc.  Include gt-cp-name-lookup.h at the end of the file.
3917         * Make-lang.in: (gt-cp-name-lookup.h): Is generated by gengtype.
3918         (cp/name-lookup.o): Depends on gt-cp-name-lookup.h.
3920 2003-03-31  Jason Merrill  <jason@redhat.com>
3922         PR java/10145
3923         * class.c (check_field_decl): Don't set DECL_ALIGN.
3925 2003-03-30  Mark Mitchell  <mark@codesourcery.com>
3927         PR c++/7647
3928         * decl.c (grokdeclarator): Tidy, slightly.
3929         * search.c (lookup_field_1): Add want_type parameter.
3930         (lookup_field_r): Adjust call to lookup_field_1.
3932 2003-03-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3934         * Make-lang.in (cp/name-lookup.o): Add more dependencies.
3936 2003-03-30  Gabriel Dos Reis <gdr@integrable-solutions.net>
3938         * cp-tree.h (binding_for_name: Move to name-lookup.h  Adjust
3939         prototype.
3940         (cxx_scope_find_binding_for_name): Likewise.
3941         * decl.c (find_binding: Move to name-lookup.c.
3942         (binding_for_name): Likewise.
3943         (cxx_scope_find_binding_for_name): Likewise.
3944         (BINDING_LEVEL):  Remove.
3945         (push_binding): Tidy.
3946         (push_class_binding): Likewise.
3947         (pop_binding): Likewise.
3948         (poplevel): Likewise.
3949         (poplevel_class): Likewise.
3950         (set_identifier_type_value_with_scope): Likewise.
3951         (push_overloaded_decl): Likewise.
3952         (lookup_tag): Likewise.
3953         (unqualified_namespace_lookup): Likewise.
3954         (lookup_name_current_level): Likewise.
3955         (maybe_inject_for_scope_var): Likewise.
3956         (namespace_binding): Move to name-lookup.c.
3957         (set_namespace_binding): Likewise.
3958         * decl2.c (lookup_using_namespace): Tidy.
3959         (qualified_lookup_using_namespace): Likewise.
3960         (do_toplevel_using_decl): Likewise.
3961         * name-lookup.c: Include "timevar.h"
3962         * name-lookup.h (cxx_scope):  Declare.
3963         (struct cxx_binding): Lose member "has_level".  Adjust "scope"
3964         member declaration.
3965         (BINDING_SCOPE): Adjust definition.
3966         (BINDING_HAS_LEVEL_P): Remove.
3968 2003-03-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3970         * name-lookup.c: New file.
3971         * name-lookup.h: Likewise..
3972         * decl.c (push_binding): Adjust use cxx_binding_make.
3973         (free_bindings): Move to name-lookup.c
3974         (pop_binding): Use cxx_binding_free.
3975         (binding_for_name): Tidy.
3976         * cp-tree.h: Include "name-lookup.h"
3977         (cxx_binding_make): Move to name-lookup.h
3978         (cxx_binding_clear): Likewise.
3979         (struct cxx_binding): Likewise.
3980         (LOCAL_BINDING_P): Likewise.
3981         (INHERITED_VALUE_BINDING_P): Likewise.
3982         (BINDING_SCOPE): Likewise.
3983         (BINDING_HAS_LEVEL_P): Likewise.
3984         (BINDING_VALUE): Likewise.
3985         (BINDING_TYPE): Likewise.
3986         * config-lang.in (gtfiles): Add cp/name-lookup.h
3987         * Make-lang.in (cp/name-lookup.o): New rule.
3988         (CXX_OBJS): Add cp/name-lookup.o
3989         (CXX_TREE_H): Add cp/name-lookup.h
3991 2003-03-28  Jason Merrill  <jason@redhat.com>
3993         PR c++/10245
3994         * cvt.c (force_rvalue): New fn.
3995         * call.c (build_conditional_expr): Use it.
3996         * cp-tree.h: Declare it.
3998 2003-03-28  Mike Stump  <mrs@apple.com>
4000         * error.c (dump_expr): Add 0x to printed hex numbers to make
4001         output match source code better.
4003 2003-03-28  Mark Mitchell  <mark@codesourcery.com>
4005         PR c++/10218
4006         * decl.c (grokfndecl): Return NULL_TREE for bogus out-of-class
4007         definitions.
4009         * decl2.c (generate_ctor_or_dtor_function): Tolerate a
4010         non-existant ssdf_decls array.
4011         (finish_file): Call generator_ctor_or_dtor_function when there are
4012         static constructors or destructors and no other static
4013         initializations.
4015 2003-03-28  Nathan Sidwell  <nathan@codesourcery.com>
4017         PR c++/10047
4018         * decl2.c (finish_file): Don't warn about explicitly instantiated
4019         inline decls.
4021 2003-03-27  Nathan Sidwell  <nathan@codesourcery.com>
4023         PR c++/10224
4024         * pt.c (lookup_template_class): Only check instantiated args if
4025         they do not contain template parameters.
4027 2003-03-27  Nathan Sidwell  <nathan@codesourcery.com>
4029         PR c++/10158
4030         * parser.c (cp_parser_function_definition): Set
4031         DECL_INITIALIZED_IN_CLASS for members.
4032         * pt.c (instantiate_decl): Only reduce the template args for
4033         friends that are not defined in class.
4035 2003-03-25  Jason Merrill  <jason@redhat.com>
4037         * call.c (print_z_candidate): Change name of first arg to msgid.
4038         (joust): Add comment for translators.
4040 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
4042         PR c++/9898, PR c++/383, DR 322
4043         * pt.c (maybe_adjust_types_for_deduction) <DEDUCE_CONV>: Look
4044         through reference types on both PARM and ARG.
4046 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
4048         PR c++/10119
4049         * error.c (dump_expr) <BASELINK>: Use dump_expr.
4050         * pt.c (maybe_fold_nontype_args): New function.
4051         (tsubst_copy) <SCOPE_REF>: Subst any template_id args.
4052         <TEMPLATE_ID_EXPR>: Break out folding code, call it.
4053         (tsubst_copy_and_build) <TEMPLATE_ID_EXPR>: Call
4054         maybe_fold_nontype_args.
4056 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
4058         PR c++/10026
4059         * decl2.c (arg_assoc_type) <ERROR_MARK>: Don't die.
4061 2003-03-23  Mark Mitchell  <mark@codesourcery.com>
4063         PR c++/7086
4064         * typeck.c (cxx_mark_addressable):  Adjust call to
4065         gen_mem_addressof or put_var_into_stack.
4067 2003-03-22  Nathan Sidwell  <nathan@codesourcery.com>
4069         PR c++/9978, c++/9708
4070         * cp-tree.h (instantiate_template): Add tsubst_flags parameter.
4071         * call.c (add_template_candidate_real): Adjust
4072         instantiate_template call.
4073         * class.c (resolve_address_of_overloaded_function): Likewise.
4074         * decl.c (build_enumerator): Set TREE_CONSTANT.
4075         * pt.c (check_instantiated_args): New.
4076         (push_inline_template_parms_recursive): Set TREE_CONSTANT,
4077         TREE_READONLY.
4078         (build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY.
4079         (reduce_template_parm_level): Likewise.
4080         (process_template_parm): Likewise.
4081         (check_explicit_specialization): Adjust instantiate_template call.
4082         (convert_template_argument): Don't check non-type argument here.
4083         (lookup_template_class): Check them here.
4084         (tsubst_friend_function): Adjust instantiate_template call.
4085         (instantiate_template): Add tsubst_flags parameter, use it. Check
4086         instantiated args.
4088 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
4090         * decl.c: Update calls to shadow_warning.
4092 2003-03-21  Nathan Sidwell  <nathan@codesourcery.com>
4094         PR c++/9898
4095         * error.c (dump_decl) [CONST_DECL]: Print '<enumerator>'.
4096         (dump_expr) [CONSTRUCTOR]: Print default ctor as a function call.
4098 2003-03-20  Mark Mitchell  <mark@codesourcery.com>
4100         * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope
4101         friends.
4102         * cp/pt.c (instantiate_class_template): Fix formatting.
4104 2003-03-14  Matt Austern  <austern@apple.com>
4106         * cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray.
4107         (unemitted_tinfo_decl_p): Remove.
4108         (emit_tinfo_decl): Change declaration to remove unused parameter.
4109         * decl2.c (finish_file): Change tinfo emission to loop through
4110         unemitted_tinfo_decls array instead of looping through all decls.
4111         * rtti.c (unemitted_tinfo_decl_p): Declare as static, remove
4112         unused second parameter.
4113         (init_rtti_processing): initialize unemitted_tinfo_decls varray.
4114         (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls.
4115         (emit_tinfo_decl): remove unused second parameter, add assertion
4116         that decl hasn't already been emitted.
4118 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
4120         * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
4121         type from 'int' to 'bool'. Replace 0 and 1 with true and false in
4122         return statements.
4124 2003-03-19  Jason Merrill  <jason@redhat.com>
4126         PR c++/8316, c++/9315, c++/10136
4127         * call.c (print_z_candidate): Split out from...
4128         (print_z_candidiates): ...here.
4129         (joust): Use it.
4131 2003-03-17  Roger Sayle  <roger@eyesopen.com>
4133         PR c++/10031
4134         * decl.c (duplicate_decls): Use the new type when prototyping
4135         anticipated decls, even when the types match.  This defines the
4136         exception list for the built-in function.
4138 2003-03-17  Jason Merrill  <jason@redhat.com>
4140         PR c++/10091
4141         * typeck.c (build_class_member_access_expr): Compare
4142         TYPE_MAIN_VARIANTs.
4144 2003-03-17  Mark Mitchell  <mark@codesourcery.com>
4146         PR c++/9639
4147         * parser.c (cp_parser_declarator_id): Clear parser->scope.
4149 2003-03-16  Jason Merrill  <jason@redhat.com>
4151         PR c++/9993
4152         * decl.c (finish_function): Only allow the NRVO to use variables
4153         declared at function scope.
4155 2003-03-17  Andreas Jaeger  <aj@suse.de>
4157         * Make-lang.in (cp/TAGS): Remove.
4159 2003-03-16  Nathan Sidwell  <nathan@codesourcery.com>
4161         PR c++/9629
4162         * cp-tree.h (struct language_function): Add in_base_initializer.
4163         (in_base_initializer): define it.
4164         (expand_member_init): Remove INIT param.
4165         * init.c (expand_member_init): Remove INIT param, return the member.
4166         (emit_mem_initializers): Set in_base_initializer.
4167         * class.c (build_base_path): Check in_base_initializer.
4168         * parser.c (cp_parser_mem_initializer): Set in_base_initializer.
4169         * pt.c (tsubst_initializer_list): Likewise.
4171 2003-03-16   Gabriel Dos Reis <gdr@integrable-solutions.net>
4173         * decl.c (binding_for_name): Fix initialization thinko.
4175 2003-03-15  Gabriel Dos Reis <gdr@integrable-solutions.net>
4177         Compile-time improvement: 2/n.
4178         * cp-tree.h (struct cxx_binding): New datatype;
4179         (struct lang_identifier): Use it.
4180         (LOCAL_BINDING_P): Adjust definition.
4181         (INHERITED_VALUE_BINDING_P): Likewise.
4182         (BINDING_SCOPE): Likewise.
4183         (BINDING_HAS_LEVEL_P): Likewise.
4184         (BINDING_VALUE): Likewise.
4185         (BINDING_TYPE): Likewise.
4186         (IDENTIFIER_VALUE): Likewise.
4187         (struct tree_binding): Remove.
4188         (TS_CP_BINDING): Likewise.
4189         ((union lang_tree_node): Remove field "binding".
4190         (cxx_binding_clear): New macro.
4191         (binding_for_name): Adjust return type.
4192         (qualified_lookup_using_namespace): Adjust prototype.
4193         (lookup_using_namespace): Adjust prototype.
4194         (cxx_scope_find_binding_for_name): Declare.
4195         * cp-tree.def: Remove CPLUS_BINDING definition.
4196         * decl.c (push_binding): Adjust local variable type.
4197         (add_binding): Likewise.
4198         (push_class_binding): Likewise.
4199         (pop_binding): Likewise.
4200         (poplevel): Likewise.
4201         (poplevel_class): Likewise.
4202         (free_bindings):  Adjust type.
4203         (find_binding): Adjust return type, add a third parameter. Remove
4204         non-useful assertion now that we use static typing.
4205         (cxx_scope_find_binding_for_name): New function.
4206         (binding_for_name): Use it.  Adjust local variable type. Simplify.
4207         (namespace_binding):  Simplify.
4208         (set_namespace_binding): Likewise.
4209         (set_identifier_type_value_with_scope): Adjust local variable type.
4210         (lookup_tag): Don't type-abuse of local variable 'old'.
4211         (lookup_namespace_name): Likewise.  Allocate binding on stack.
4212         (select_decl): Adjust prototype.
4213         (unqualified_namespace_lookup):  Allocate binding on stack.
4214         Don't type-abuse of local variable 'val'.
4215         (lookup_name_real): Likewise.
4216         (maybe_inject_for_scope_var): Adjust local variable type.
4217         (cp_tree_node_structure): Remove CPLUS_BINDING case label.
4218         (namespace_binding): Adjust logic, simplify.
4219         (BINDING_LEVEL): Adjust definition.
4220         (push_class_level_binding): Adjust local variable type.
4221         (struct cxx_saved_binding): Adjust field 'binding' type.
4222         * decl2.c (ambiguous_decl): Adjust prototype.
4223         (lookup_using_namespace): Adjust local variable type.
4224         (qualified_lookup_using_namespace): Catch type error and correct
4225         ensueing logic error.
4226         (do_nonmember_using_decl): Adjust local variable type.  Allocate
4227         temporary cxx_binding on stack.
4228         (do_toplevel_using_decl): Adjust local variable type.
4229         * ptree.c (cxx_print_cxx_binding): New function.
4230         (cxx_print_identifier): Use it.
4231         (cxx_print_xnode): Delete CPLUS_BINDING case label.
4233 2003-03-15  Roger Sayle  <roger@eyesopen.com>
4235         * tree.c (count_functions): Fix whitespace.
4237 2003-03-15  Neil Booth  <neil@daikokuya.co.uk>
4239         * Make-lang.in: Update.
4241 2003-03-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4243         PR c++/6440
4244         * pt.c (maybe_process_partial_specialization): Handle
4245         member class template when enclosing class template is
4246         explicit specialized.
4247         (most_general_template): Stop looking when DECL is already
4248         specialized.
4250 2003-03-13  Jason Merrill  <jason@redhat.com>
4252         PR c++/9420
4253         * search.c (lookup_conversions): Call complete_type here.
4254         * call.c (implicit_conversion): Not here.
4256 2003-03-13  Mark Mitchell  <mark@codesourcery.com>
4258         * decl2.c (do_nonmember_using_decl): Correct handling of
4259         simultaneous type/non-type bindings.
4261         * call.c (initialize_reference): Remove bogus assertion.
4262         * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
4264 2003-03-12  Andrew Lewycky  <andrew@mxc.ca>
4266         PR c++/7050
4267         * expr.c (cxx_expand_expr): Return const0_rtx for throw
4268         expressions.
4270 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
4272         PR c++/9474
4273         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
4274         to merge old and new declarations.
4276 2003-03-12  Alexandre Oliva  <aoliva@redhat.com>
4278         * g++.1: Remove.
4279         * Make-lang.in (c++.generated-manpages): Build cp/g++.1.
4280         (cp/g++.1): Build it from scratch in the build tree.
4281         (c++.install-man): Depend on it.  Install it from the build tree.
4282         (c++.mostlyclean): Clean it.
4284 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
4286         PR c++/9474
4287         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
4288         to merge old and new declarations.
4290         PR c++/9924
4291         * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
4293 2003-03-11  Jason Merrill  <jason@redhat.com>
4295         PR c++/9820
4296         * search.c (lookup_member): Fix handling of functions in a class
4297         being defined.
4299 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
4301         PR c++/8700
4302         * call.c (convert_class_to_reference): Adjust usage of
4303         splice_viable.
4304         (any_viable): Remove.
4305         (splice_viable): Combine with any_viable.
4306         (print_z_candidates): Avoid printing duplicates.
4307         (build_user_type_conversion_1): Adjust usage of splice_viable.
4308         (build_new_function_call): Likewise.
4309         (build_operator_new_call): Likewise.
4310         (build_object_call): Likewise.
4311         (build_conditional_expr): Likewise.
4312         (build_new_op): Likewise.
4313         (build_new_method_call): Likewise.
4314         (joust): Remove spurious comment.
4315         * cp-tree.h (DECL_FRIENDLIST): Correct documentation.
4316         * decl2.c (arg_assoc_class): Simplify.
4317         * friend.c (add_friend): Likewise.
4319 2003-03-11  Jason Merrill  <jason@redhat.com>
4321         PR c++/8660
4322         * decl2.c (check_classfn): A member template only matches a
4323         member template.
4325 2003-03-11  Neil Booth  <neil@daikokuya.co.uk>
4327         * Make-lang.in (CXX_C_OBJS): Update.
4328         * lang-specs.h: Don't define __GNUG__ here.
4330 2003-03-10  Mark Mitchell  <mark@codesourcery.com>
4332         * call.c (perform_overload_resolution): New function.
4333         (build_new_function_call): Use it.
4334         (build_operator_new_call): Likewise.
4335         (add_candidates): Add explicit_targs and template_only parameters.
4336         (build_new_op): Adjust accordingly.
4337         * cp-tree.h (build_operator_new_call): New function.
4338         (build_function_call_real): Remove.
4339         (build_function_call_maybe): Likewise.
4340         * init.c (build_new_1): Use build_operator_new_call.
4341         * typeck.c (build_function_call_real): Rename to ...
4342         (build_function_call): ... this.
4344 2003-03-10  Devang Patel  <dpatel@apple.com>
4346         PR c++/9394
4347         * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
4349 2003-03-10  Jason Merrill  <jason@redhat.com>
4351         PR c++/9798
4352         * decl.c (push_using_directive): Push before recursing.
4354         PR c++/9868, c++/9524
4355         * call.c (resolve_scoped_fn_name): Handle the case of a function
4356         pointer member.
4358         * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
4359         argument in the pointer-to-member case.
4361 2003-03-09  Mark Mitchell  <mark@codesourcery.com>
4363         PR c++/9373
4364         * cp-lang.c (cxx_get_alias_set): Use alias set zero for
4365         pointers to member functions.
4367         PR c++/8534
4368         * decl.c (build_ptrmemfunc_type): Do not allow default arugments
4369         in pointer-to-member-function types.
4371 2003-03-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4373         * expr.c (cplus_expand_constant): Use C90 prototype style.
4374         (cxx_expand_expr): Likewise.
4376 2003-03-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4378         PR c++/9970
4379         * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
4380         functions.
4382 2003-03-08  Geoffrey Keating  <geoffk@apple.com>
4384         * lang-specs.h (c++-header): Change .pch to .gch.
4386 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
4388         * cp-tree.h (cxx_init): Update prototype.
4389         * lex.c (cxx_init): Similarly.
4391 2003-03-08  Mark Mitchell  <mark@codesourcery.com>
4393         PR c++/9823
4394         * cp-tree.h (begin_mem_initializers): Remove.
4395         * parser.c (cp_parser_mem_initializer_list): Inline it here.
4396         Do not call finish_mem_initializers if not in a constructor.
4397         (cp_parser_class_head): Fix typo in error message.
4398         * semantics.c (begin_mem_initializers): Remove.
4399         * testsuite/g++.dg/parser/constructor1.C: New test.
4401         PR c++/9809
4402         * call.c (add_function_candidate): Skip builtin fuctions that have
4403         not yet been declared.
4405         PR c++/9982
4406         * init.c (build_new_1): Correct logic for determining whether or
4407         not to use an array cookie.
4409         PR c++/9524
4410         * parser.c (cp_parser_postfix_expression): Call
4411         finish_non_static_data_member, even when processing_template_decl.
4413         PR c++/9912
4414         * cp-tree.h (is_ancestor): New function.
4415         (handle_class_head): Change prototype.
4416         * decl2.c (is_namespace_ancestor): Rename to ...
4417         (namespace_anecestor): ... this.
4418         (set_decl_namespace): Adjust accordingly.
4419         (handle_class_head): Remove unncessary parameters.
4420         * parser.c (cp_parser_class_head): Check that
4421         nested-name-specifiers are used appropriately.
4423 2003-03-07  Mark Mitchell  <mark@codesourcery.com>
4425         * call.c (reference_binding): Remove REF_IS_VAR parameter.
4426         (implicit_conversion): Adjust call to reference_binding.
4427         (make_temporary_var_for_ref_to_type): Add TYPE parameter.
4428         (initialize_reference): Adjust handling for references bound to
4429         rvalues.
4430         * cp-tree.h (make_temporary_var_for_ref_to_temp): Change
4431         prototype.
4432         (real_non_cast_lvalue_p): New method.
4433         * cvt.c (build_up_reference): Adjust use of
4434         make_temporary_var_for_ref_to_temp.
4435         * tree.c (real_non_cast_lvalue_p): New method.
4437 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4439         * except.c (init_exception_processing): Use C90 prototype style.
4440         (cp_protect_cleanup_actions): Likewise.
4441         (prepare_eh_type): Likewise.
4442         (build_eh_type_type): Likewise.
4443         (build_exc_ptr): Likewise.
4444         (do_begin_catch): Likewise.
4445         (dtor_nothrow): Likewise.
4446         (do_end_catch): Likewise.
4447         (push_eh_cleanup): Likewise.
4448         (decl_is_java_type): Likewise.
4449         (choose_personality_routine): Likewise.
4450         (initialize_handler_parm): Likewise.
4451         (expand_start_catch_block): Likewise.
4452         (expand_end_catch_block): Likewise.
4453         (begin_eh_spec_block): Likewise.
4454         (finish_eh_spec_block): Likewise.
4455         (do_allocate_exception): Likewise.
4456         (do_free_exception): Likewise.
4457         (wrap_cleanups_r): Likewise.
4458         (stabilize_throw_expr): Likewise.
4459         (build_throw): Likewise.
4460         (complete_ptr_ref_or_void_ptr_p): Likewise.
4461         (is_admissible_throw_operand): Likewise.
4462         (nothrow_libfn_p): Likewise.
4463         (can_convert_eh): Likewise.
4464         (check_handlers_1): Likewise.
4465         (check_handlers): Likewise.
4467 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
4469         * call.c (merge_conversion_sequences): New function.
4470         (build_conv): Set ICS_USER_FLAG for USER_CONVs.
4471         (convert_class_to_reference): Correct handling of second
4472         standard conversion sequence in a user-defined conversion
4473         sequence.
4474         (build_user_type_conversion_1): Use merge_conversion_sequences.
4475         * cp-tree.def: Add comments for CONV nodes.
4476         * rtti.c (get_tinfo_decl): Use build_address/build_nop.
4478 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4480         * error.c (init_error): Use C90 prototype style.
4481         (dump_scope): Likewise.
4482         (dump_qualifiers): Likewise.
4483         (dump_template_argument): Likewise.
4484         (dump_template_argument_list): Likewise.
4485         (dump_template_parameter): Likewise.
4486         (dump_template_bindings): Likewise.
4487         (dump_type): Likewise.
4488         (dump_typename): Likewise.
4489         (class_key_or_enum): Likewise.
4490         (dump_aggr_type): Likewise.
4491         (dump_type_prefix): Likewise.
4492         (dump_type_suffix): Likewise.
4493         (dump_global_iord): Likewise.
4494         (dump_simple_decl): Likewise.
4495         (dump_decl): Likewise.
4496         (dump_template_decl): Likewise.
4497         (dump_function_decl): Likewise.
4498         (dump_parameters): Likewise.
4499         (dump_exception_spec): Likewise.
4500         (dump_function_name): Likewise.
4501         (dump_template_parms): Likewise.
4502         (dump_char): Likewise.
4503         (dump_expr_list): Likewise.
4504         (dump_expr): Likewise.
4505         (dump_binary_op): Likewise.
4506         (dump_unary_op): Likewise.
4507         (type_as_string): Likewise.
4508         (expr_as_string): Likewise.
4509         (decl_as_string): Likewise.
4510         (context_as_string): Likewise.
4511         (lang_decl_name): Likewise.
4512         (cp_file_of): Likewise.
4513         (cp_line_of): Likewise.
4514         (decl_to_string): Likewise.
4515         (expr_to_string): Likewise.
4516         (fndecl_to_string): Likewise.
4517         (code_to_string): Likewise.
4518         (language_to_string): Likewise.
4519         (parm_to_string): Likewise.
4520         (op_to_string): Likewise.
4521         (type_to_string): Likewise.
4522         (assop_to_string): Likewise.
4523         (args_to_string): Likewise.
4524         (cv_to_string): Likewise.
4525         (cxx_print_error_function): Likewise.
4526         (cp_diagnostic_starter): Likewise.
4527         (cp_diagnostic_finalizer): Likewise.
4528         (cp_print_error_function): Likewise.
4529         (function_category): Likewise.
4530         (print_instantiation_full_context): Likewise.
4531         (print_instantiation_partial_context): Likewise.
4532         (maybe_print_instantiation_context): Likewise.
4533         (print_instantiation_context): Likewise.
4534         (cp_printer): Likewise.
4535         (print_integer): Likewise.
4536         (print_non_consecutive_character): Likewise.
4537         (locate_error): Likewise.
4539 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
4541         PR c++/9965
4542         * call.c (reference_binding): Add ref_is_var parameter.
4543         (implicit_conversion): Adjust call to reference_binding.
4544         (initialize_reference): Likewise.
4546         PR c++/9400
4547         * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
4548         PARM_DECLs.
4550         PR c++/9791
4551         * class.c (get_basefndecls): Use lookup_fnfields_1.
4553 2003-03-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4555         PR c++/9188
4556         * parser.c (cp_parser_type_parameter): Remove redundant `expect'
4557         in error message.
4558         (cp_parser_single_declaration): Likewise.
4560 2003-03-05  Jason Merrill  <jason@redhat.com>
4562         PR c++/9440
4563         * call.c (build_conditional_expr): Use convert rather than an
4564         explicit NOP_EXPR.
4566 2003-03-02  Matt Austern  <austern@apple.com>
4568         * decl.c (cp_binding_level): Add static_decls varray member.
4569         (add_decl_to_level): Add static/inline namespace scope
4570         declarations to static_decls array.
4571         (wrapup_global_for_namespace): Pass static_decls only, instead of
4572         all decls, to wrapup_global_declarations/check_global_declarations.
4573         (push_namespace): Initialize static_decls for ordinary namespaces.
4574         (cxx_init_decl_processing): Initialize static_decls for global
4575         namespace.
4577 2003-03-05  Mark Mitchell  <mark@codesourcery.com>
4579         * class.c (end_of_class): Correct thinko.
4581 2003-03-04  Nathanael Nerode  <neroden@gcc.gnu.org>
4583         * config-lang.in: Replace ${libstdcxx_version} by its value.
4585 2003-03-04  Gabriel Dos Reis <gdr@integrable-solutions.net>
4587         * cp-tree.h (cxx_saved_binding): Declare.
4588         (struct saved_scope): Adjust type of field 'old_binding'.
4589         * decl.c (cxx_saved_binding_make): New macro.
4590         (struct cxx_saved_binding): Define.
4591         (store_bindings): Adjust prototype.  Use cxx_saved_binding to save
4592         C++ bindings.
4593         (maybe_push_to_top_level): Adjust local variable type.
4594         (pop_from_top_level): Likewise.
4596 2003-03-04  Tom Tromey  <tromey@redhat.com>
4598         * Make-lang.in (c++.tags): New target.
4600 2003-03-04  Neil Booth  <neil@daikokuya.co.uk>
4602         * Make-lang.in: Update.
4604 2003-03-03  Jason Merrill  <jason@redhat.com>
4606         * decl.c (finish_enum): Do set the type in a template. Simplify.
4607         * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
4609 2003-03-03  Mark Mitchell  <mark@codesourcery.com>
4611         PR c++/9878
4612         * call.c (convert_class_to_reference): Correct conversion
4613         sequences.
4614         (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
4615         (implicit_conversion): Adjust call to reference_binding.
4616         (add_candidate): Change type of candidates parameter.
4617         (add_function_candidate): Likewise.
4618         (add_conv_candidate): Likewise.
4619         (build_builtin_candidate): Likewise.
4620         (add_builtin_candidate): Likewise.
4621         (add_builtin_candidates): Likewise.
4622         (add_template_candidate_real): Likewise.
4623         (add_template_candidate): Likewise.
4624         (add_template_conv_candidate): Likewise.
4625         (build_user_type_conversion_1): Adjust accordingly.
4626         (build_object_call): Likewise.
4627         (build_conditional_expr): Likewise.
4628         (add_candidates): Likewise.
4629         (build_new_op): Likewise.
4630         (convert_like_real): Use USER_CONV_CAND.  Use build_nop.
4631         (build_new_method_call): Adjust calls to add_function_candidate.
4632         (make_temporary_var_for_ref_to_temp): New function.
4633         (initialize_reference): Add decl parameter.
4634         * class.c (build_rtti_vtbl_entries): Use build_address and
4635         build_nop.
4636         * cp-tree.h (initialize_reference): Change prototype.
4637         (make_temporary_var_for_ref_to_temp): New function.
4638         (build_type_conversion): Change prototype.
4639         (build_address): New function.
4640         (build_nop): Likewise.
4641         * cvt.c (cp_convert_to_pointer): Adjust call to
4642         build_type_conversion.  Avoid indicating redundant NOP_EXPRs.
4643         Use build_nop.
4644         (convert_to_pointer_force): Use build_nop.
4645         (build_up_reference): Use make_temporary_var_for_ref_to_temp.
4646         (convert_to_reference): Adjust call to build_type_conversion.
4647         (ocp_convert): Likewise.
4648         (build_type_conversion): Remove for_sure parameter.
4649         * decl.c (grok_reference_init): Use initialize_reference.
4650         * typeck.c (build_address): New function.
4651         (build_nop): Likewise.
4652         (build_unary_op): Use them.
4653         (build_ptrmemfunc): Tidy slightly.
4654         (convert_for_initialization): Adjust call to
4655         initialize_reference.
4656         * typeck2.c (store_init_value): Remove #if 0'd code.
4658 2003-03-03  Jason Merrill  <jason@redhat.com>
4660         * decl.c (start_function): Clear DECL_NUM_STMTS.
4662         * class.c (get_vtable_decl): Use vtbl_type_node.
4663         (build_primary_vtable): Check for it.
4665 2003-03-02  Aldy Hernandez  <aldyh@redhat.com>
4667         * decl.c (check_initializer): Check for vector_opaque_p.
4669 2003-03-02  Ashif Harji  <asharji@uwaterloo.ca>
4671         * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
4672           invoke an external cpp during compilation.
4674 2003-03-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4676         * decl.c (duplicate_decls): Convert use of warning_with_decl() to
4677         that of warning().
4678         (start_decl): Likewise.
4679         (start_function): Likewise.
4681 2003-03-01  Neil Booth  <neil@daikokuya.co.uk>
4683         * Make-lang.in (CXX_C_OBJS): Update.
4685 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
4687         PR c++/9892
4688         * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
4689         instantiating it.
4691 2003-02-28  Aldy Hernandez  <aldyh@redhat.com>
4693         * parser.c (cp_parser_init_declarator): Revert opaque
4694         vector_opaque_p change.
4695         Do not include target.h.
4697 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
4699         PR c++/9879
4700         * cp-tree.h (build_zero_init): Add parameter.
4701         * decl.c (cp_finish_decl): Adjust call.
4702         * init.c (build_zero_init): Add nelts parameter.  Adjust recursive
4703         calls.
4704         (build_default_init): Add nelts parameter.  Adjust calls to
4705         build_zero_init.
4706         (build_new_1): Adjust call to build_default_init.
4707         * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
4709 2003-02-26  Devang Patel  <dpatel@apple.com>
4711         * decl.c (finish_enum): Merge two 'for' loops. Copy value node if
4712         required.  Postpone enum setting for template decls.
4713         (build_enumerator): Delay copying value node until finish_enum
4714         (). Remove #if 0'ed code.
4715         * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
4716         (tsubst_copy): Add check for enum type.
4718 2003-02-25  Mark Mitchell  <mark@codesourcery.com>
4720         PR c++/9683
4721         * decl2.c (prune_vars_needing_no_initialization): Do not throw
4722         away initializations for DECL_EXTERNAL VAR_DECLs.
4723         (finish_file): Adjust accordingly.
4724         * pt.c (instantiate_decl): Do not defer VAR_DECLs.
4726 2003-02-24 Gabriel Dos Reis  <gdr@integrable-solutions.net>
4728         * decl.c (add_binding): Time TV_NAME_LOOKUP.
4729         (push_class_binding): Likewise.
4730         (set_namespace_binding): Likewise.
4732 2003-02-24  Mark Mitchell  <mark@codesourcery.com>
4734         PR c++/9836
4735         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
4736         specializations back to the main template.
4737         * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
4738         * pt.c (resolve_typename_type): Likewise.
4740 2003-02-24  Jeffrey D. Oldham  <oldham@codesourcery.com>
4742         PR c++/9778
4743         * pt.c (tsubst_copy_and_build): For a templated function inside a
4744         scope, process template arguments.
4746 2003-02-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4748         PR c++/9602
4749         * typeck2.c (abstract_virtuals_error): Don't check when
4750         TYPE is still template parameter dependent.
4752 2003-02-23  Mark Mitchell  <mark@codesourcery.com>
4754         PR c++/5333
4755         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
4756         * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
4757         * pt.c (instantiate_class_template): Don't try to instantiate
4758         dependent types.
4759         (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
4761 2003-02-21  Mark Mitchell  <mark@codesourcery.com>
4763         PR c++/9749
4764         * decl.c (grokdeclarator): Do not allow parameters with variably
4765         modified types.
4767 2003-02-21  Nathan Sidwell  <nathan@codesourcery.com>
4769         * search.c (grow_bfs_bases): Remove. Fold into ...
4770         (bfs_walk): ... here, fix fencepost error. Fix merge lossage
4771         in previous patch.
4773 2003-02-20  Mark Mitchell  <mark@codesourcery.com>
4775         PR c++/9729
4776         * mangle.c (mangle_conv_op_name_for_type): Issue an error message
4777         when the G++ 3.2 ABI prevents correct compilation.
4779 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
4781         Change base class access representation. Share virtual base
4782         binfos.
4783         * cp/call.c (build_special_member_call): Remove binfo_for_vbase
4784         call.
4785         * cp/class.c (build_base_path): Likewise.
4786         (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
4787         (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
4788         (make_new_vtable): Adjust.
4789         (force_canonical_binfo_r): Delete.
4790         (force_canonical_binfo): Delete.
4791         (mark_primary_virtual_base): Delete.
4792         (dfs_unshared_virtual_bases): Delete.
4793         (mark_primary_bases): Adjust.
4794         (maybe_warn_about_overly_private_class): Adjust.
4795         (dfs_base_derived_from): Delete.
4796         (base_derived_from): Follow the inheritance chain.
4797         (struct find_final_overrider_data): Add vpath member.
4798         (dfs_find_final_overrider): Adjust.
4799         (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
4800         (find_final_overrider): Adjust.
4801         (update_vtable_entry_for_fn): Adjust.
4802         (modify_all_vtables): Adjust.
4803         (walk_subobject_offsets): Adjust.
4804         (layout_nonempty_base_or_field): Adjust.
4805         (layout_empty_base): Remove last parameter. Adjust.
4806         (build_base_field): Adjust.
4807         (build_base_fields): Adjust.
4808         (propagate_binfo_offsets): Remove last parameter. Adjust.
4809         (dfs_set_offset_for_unshared_vbases): Delete.
4810         (layout_virtual_bases): Adjust.
4811         (finish_struct_1): Adjust.
4812         (init_class_processing): Don't init access nodes.
4813         (dfs_get_primary_binfo): Delete.
4814         (get_primary_binfo): Adjust.
4815         (dump_class_hierarchy_r): Remove most derived arg, add IGO
4816         parameter. Adjust.
4817         (dump_class_hierarchy): Adjust.
4818         (finish_vtbls): Adjust.
4819         (get_original_base): Delete.
4820         (build_vtt_inits): Adjust.
4821         (dfs_build_secondary_vptr_vtt_inits): Adjust.
4822         (dfs_ctor_vtable_bases_queue_p): Adjust.
4823         (build_ctor_vtbl_group): Adjust.
4824         (dfs_accumulate_vtbl_inits): Adjust.
4825         (build_vtbl_initializer): Adjust.
4826         (build_vbase_offset_vtbl_entries): Adjust.
4827         (add_vcall_offset_vtbl_entries_1): Adjust.
4828         * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
4829         (access_*_node): Remove.
4830         (CANONICAL_BINFO): Delete.
4831         (BINFO_UNSHARED_MARKED): Remove.
4832         (BINFO_MARKED): Set LANG_FLAG_0 directly.
4833         (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
4834         (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
4835         (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
4836         Delete.
4837         (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
4838         (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
4839         (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
4840         Delete.
4841         (BINFO_DEPENDENT_BASE_P): New.
4842         (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
4843         index.
4844         (markedp, unmarkedp): Adjust.
4845         (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
4846         dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
4847         find_vbase_instance, binfo_for_vbase): Delete.
4848         (copied_binfo, original_binfo): Declare.
4849         (finish_base_specifier): Add virtual_p arg.
4850         (unshare_base_binfos): Delete.
4851         (copy_base_binfos): Declare.
4852         (reverse_path): Delete.
4853         * cp/decl.c (xref_basetypes): Access and virtuality passed
4854         differently. Don't copy direct base binfos here. Call
4855         copy_base_binfos.
4856         * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
4857         (initialize_vtbl_ptrs): Adjust.
4858         (expand_member_init): Adjust.
4859         * cp/parser.c (cp_parser_base_specifier): Adjust.
4860         * cp/pt.c (instantiate_class_template): Adjust.
4861         (get_template_base_recursive): Adjust.
4862         * cp/rtti.c (get_pseudo_ti_init): Adjust.
4863         (get_pseudo_ti_desc): Adjust.
4864         * cp/tree.c (unshare_base_binfos): Rename to ...
4865         (copy_base_binfos): ... here, reimplement.
4866         (make_binfo): Set BINFO_DEPENDENT_BASE_P.
4867         (reverse_path): Remove.
4868         * cp/typeck.c (get_delta_difference): Adjust error messages.
4869         * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
4870         * cp/search.c (lookup_base_r): Adjust.
4871         (dynamic_cast_base_recurse): Adjust.
4872         (canonical_binfo): Remove.
4873         (dfs_canonical_queue): Remove.
4874         (dfs_assert_unmarked_p): Remove.
4875         (assert_canonical_unmarked): Remove.
4876         (shared_marked_p, shared_unmarked_p): Remove.
4877         (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
4878         (dfs_access_in_type): Adjust.
4879         (access_in_type): Adjust.
4880         (dfs_accessible_queue_p): Adjust.
4881         (dfs_accessible_p): Adjust.
4882         (is_subobject_of_p_1, is_subobject_of_p): Remove.
4883         (struct lookup_field_info): Remove from_dep_base_p field.
4884         (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
4885         (lookup_field_r): Remove dependent base code.
4886         (lookup_member): Likewise.
4887         (dfs_walk, dfs_walk_real): Add access arg to queue fn.
4888         (dfs_unmarked_real_bases_queue_p): Remove.
4889         (dfs_marked_real_bases_queue_p): Remove.
4890         (dfs_skip_vbases): Remove.
4891         (dfs_get_pure_virtuals): Adjust.
4892         (markedp, unmarkedp): Adjust.
4893         (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
4894         (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
4895         (dfs_unmark): Adjust.
4896         (dfs_get_vbase_types):Remove.
4897         (dfs_build_inheritance_graph_order): Remove.
4898         (get_vbase_types): Remove
4899         (dfs_find_vbase_instance): Remove.
4900         (find_vbase_instance): Remove.
4901         (dfs_debug_unmarkedp): Adjust.
4902         (dependent_base_p): Remove.
4903         (dfs_push_type_decls): Adjust.
4904         (dfs_push_decls): Adjust.
4905         (dfs_no_overlap_yet): Adjust.
4906         (copied_binfo): New function.
4907         (original_binfo): New function.
4908         (binfo_for_vbase): Remove.
4910 2003-02-18  Zack Weinberg  <zack@codesourcery.com>
4912         * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
4913         (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
4914         vectors, for speed.
4916 2003-02-18  Mark Mitchell  <mark@codesourcery.com>
4918         PR c++/9704
4919         * class.c (layout_class_type): In the 3.2 ABI, take into account
4920         trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
4922 2003-02-18  Matt Austern <austern@apple.com>
4924         * cp/cp-lang.c: Change lang hooks so that final_write_globals does
4925         nothing for C++.
4926         * cp/decl.c (wrapup_globals_for_namespace): Remove special
4927         handling of global namespace.
4929 2003-02-18  Geoffrey Keating  <geoffk@apple.com>
4931         * cp-tree.h (rid_to_yy): Delete.
4932         (C_RID_YYCODE): Delete.
4933         (finish_file): Delete redundant declaration.
4935 2003-02-18  Jason Merrill  <jason@redhat.com>
4937         PR c++/9623
4938         * decl.c (reshape_init): Don't mess with initializer labels.
4940         PR c++/9485
4941         * parser.c (cp_parser_postfix_expression): Set idk properly for
4942         object->scope::member.
4944 2003-02-18  Ben Elliston  <bje@redhat.com>
4946         PR other/7350
4947         * decl.c (duplicate_decls): Fix typo in comment.
4949 2003-02-17  Michael Elizabeth Chastain <mec@shout.net>
4951         PR debug/9717
4952         * class.c (build_base_field): Mark fields for base classes with
4953         DECL_IGNORED_P.
4955 2003-02-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4957         PR c++/9457
4958         * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
4959         CONSTRUCTOR_ELTS only once.
4961 2003-02-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4963         PR c++/9459
4964         * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
4965         (dump_type_suffix): Likewise.
4967 2003-02-14  Nathan Sidwell  <nathan@codesourcery.com>
4969         * search.c: ANSIfy function declarations and definitions.
4970         * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
4971         * call.c (build_method_call, resolve_scoped_fn_name,
4972         build_java_interface_fn_ref): Adjust lookup_field, lookup_member
4973         calls.
4974         * class.c (handle_using_decl): Likewise.
4975         * decl.c (make_typename_type, make_unmound_class_template,
4976         start_decl, compute_array_index_type): Likewise.
4977         * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
4978         * init.c (expand_member_init, build_member_call): Likewise.
4979         * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
4980         resolve_typename_type): Likewise.
4981         * typeck.c (lookup_destructor, finish_class_member_access_exprm
4982         build_prememfunc_access_expr): Likewise.
4984 2003-02-13  Gabriel Dos Reis <gdr@integrable-solutions.net>
4986         * decl2.c: Include "timevar.h".
4987         (namespace_ancestor): Time name lookup.
4988         (add_using_namespace): Likewise.
4989         (lookup_using_namespace): Likewise.
4990         (qualified_lookup_using_namespace): Likewise.
4991         (decl_namespace): Likewise.
4992         (lookup_arg_dependent): Likewise.
4993         * lex.c (do_identifier): Likewise.
4994         (do_scoped_id): Likewise.
4995         * pt.c (lookup_template_class): Likewise.
4997 2003-02-14   Andrew Pinski <pinskia@physics.uc.edu>
4999         * decl.c: (define_label): Fix warning for return 0 instead of NULL.
5001 2003-02-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5003         * decl.c: Include "timevar.h".
5004         (poplevel): Time name lookup.
5005         (find_binding): Likewise.
5006         (push_namespace): Likewise.
5007         (pop_nested_namespace): Likewise.
5008         (store_bindings): Likewise.
5009         (maybe_push_to_top_level): Likewise.
5010         (pop_from_top_level): Likewise.
5011         (push_local_name): Likewise.
5012         (pushtag): Likewise.
5013         (pushdecl): Likewise.
5014         (pushdecl_with_scope): Likewise.
5015         (pushdecl_namespace_level): Likewise.
5016         (pushdecl_top_level): Likewise.
5017         (pushdecl_class_level): Likewise.
5018         (push_class_level_binding): Likewise.
5019         (push_using_decl): Likewise.
5020         (push_using_directive): Likewise.
5021         (push_overloaded_decl): Likewise.
5022         (lookup_label): Likewise.
5023         (define_label): Likewise.
5024         (lookup_tag): Likewise.
5025         (lookup_tag_reverse): Likewise.
5026         (lookup_namespace_name): Likewise.
5027         (select_decl): Likewise.
5028         (unqualified_namespace_lookup): Likewise.
5029         (lookup_name_real): Likewise.
5030         (lookup_name_current_level): Likewise.
5031         (lookup_type_current_level): Likewise.
5032         (maybe_inject_for_scope_var): Likewise.
5033         (xref_tag): Likewise.
5035         * Make-lang.in (cp/decl.o): Add dependency on timevar.h
5037 2003-02-12  Phil Edwards  <pme@gcc.gnu.org>
5039         * decl.c (build_enumerator):  Remove unneeded test.
5041 2003-02-09  Dan Nicolaescu  <dann@ics.uci.edu>
5043         * cp-tree.h (struct lang_type_header): Make all fields unsigned
5044         char.
5046 2003-02-03  Mark Mitchell  <mark@codesourcery.com>
5048         PR c++/7129
5049         * call.c (z_candidate): Add args.
5050         (convert_class_to_reference): Set it.
5051         (implicit_conversion): Tidy.
5052         (add_candidate): Add args parameter.
5053         (add_function_candidate): Adjust call to add_candidate.
5054         (add_conv_candidate): Likewise.
5055         (build_builtin_candidate): Likewise.
5056         (build_user_type_conversion_1): Eliminate wasteful tree_cons
5057         usage.
5058         (build_new_function_call): Likewise.
5059         (build_object_call): Likewise.
5060         (add_candidates): New function.
5061         (build_new_op): Use it.
5062         (covert_like_real): Adjust call to build_over_call.
5063         (build_over_call): Remove args parameter.
5064         * operators.def: Add <?= and >?=.
5066 2003-02-01  Richard Sandiford  <rsandifo@redhat.com>
5068         * typeck.c (build_indirect_ref): Don't check flag_volatile.
5070 2003-01-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5072         PR c++/8849
5073         * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
5075 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
5077         * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
5078         BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
5079         (BINFO_LANG_ELTS): New #define.
5080         * tree.c (make_binfo): Use BINFO_LANG_ELTS.
5082 2003-01-30  Geoffrey Keating  <geoffk@apple.com>
5084         * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
5086 2003-01-30  Mark Mitchell  <mark@codesourcery.com>
5088         * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
5089         for class types.
5090         * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
5091         rather than TYPE_LANG_FLAG_0.
5092         (TYPE_BUILT_IN): Remove.
5093         (TYPE_DEPENDENT_P): New macro.
5094         (TYPE_DEPENDENT_P_VALID): Likewise.
5095         (lang_type_class): Add fields_readonly.
5096         * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
5097         * pt.c (dependent_type_p_r): New function, split out from ...
5098         (dependent_type_p): ... here.  Memoize results.
5099         * search.c (dependent_base_p): Use dependent_type_p, not
5100         uses_template_parms.
5101         * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
5102         for class types.
5104 2003-01-29  Mark Mitchell  <mark@codesourcery.com>
5106         * call.c (build_field_call): Use build_new_op, not build_opfncall.
5107         (prep_operand): New function.
5108         (build_new_op): Use it.  Remove dead code.
5109         * class.c (pushclass): Change "modify" parameter type from int to
5110         bool.
5111         (currently_open_class): Use same_type_p, not pointer equality.
5112         (push_nested_class): Adjust calls to pushclass, remove modify
5113         parameter.
5114         * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
5115         (pushclass): Change prototype.
5116         (push_nested_class): Likewise.
5117         (grokoptypename): Remove.
5118         (build_opfncall): Remove.
5119         (value_dependent_expression_p): Declare.
5120         (resolve_typename_type): Likewise.
5121         (resolve_typename_type_in_current_instantiation): Likewise.
5122         (enter_scope_of): Remove.
5123         (tsubst): Remove.
5124         (tsubst_expr): Likewise.
5125         (tsubst_copy): Likewise.
5126         (tsubst_copy_and_build): Likewise.
5127         * decl.c (warn_about_implicit_typename_lookup): Remove.
5128         (finish_case_label): Return error_mark_node for erroneous labels.
5129         (start_decl): Adjust calls to push_nested_class.
5130         (grokfndecl): Call push_scope/pop_scope around call to
5131         duplicate_decls.
5132         (grokdeclarator): Do not call tsubst.
5133         (start_function): Adjust calls to push_nested_class.
5134         * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
5135         (check_classfn): Use push_scope/pop_scope around type comparisions.
5136         (grokoptypename): Remove.
5137         (push_sscope): Adjust call to push_nested_class.
5138         * error.c (dump_type): Show cv-qualification of typename types.
5139         * init.c (build_member_call): Use build_new_op, not
5140         build_opfncall.
5141         * method.c (build_opfncall): Remove.
5142         * parser.c (cp_parser): Add allow_non_constant_expression_p and
5143         non_constant_expression_p.
5144         (cp_parser_constant_expression): Adjust prototype.
5145         (cp_parser_resolve_typename_type): Remove.
5146         (cp_parser_non_constant_expression): New function.
5147         (cp_parser_non_constant_id_expression): Likewise.
5148         (cp_parser_new): Set allow_non_constant_expression_p and
5149         non_constant_expression_p.
5150         (cp_parser_primary_expression): Reject `this' and `va_arg' in
5151         constant-expressions.  Note that dependent names aren't really
5152         constant.
5153         (cp_parser_postfix_expression): Reject conversions to non-integral
5154         types in constant-expressions.  Neither are increments or
5155         decrements.
5156         (cp_parser_unary_expression): Reject increments and decrements in
5157         constant-expressions.
5158         (cp_parser_direct_new_declarator): Adjust call to
5159         cp_parser_constant_expression.
5160         (cp_parser_cast_expression): Reject conversions to non-integral
5161         types in constant-expressions.
5162         (cp_parser_assignment_expression): Rejects assignments in
5163         constant-expressions.
5164         (cp_parser_expression): Reject commas in constant-expressions.
5165         (cp_parser_labeled_statement): Adjust call to
5166         cp_parser_constant_expression.
5167         (cp_parser_direct_declarator): Simplify array bounds, even in
5168         templates, when they are non-dependent.  Use
5169         resolve_typename_type, not cp_parser_resolve_typename_type.
5170         (cp_parser_class_head): Use resolve_typename_type, not
5171         cp_parser_resolve_typename_type.
5172         (cp_parser_member_declaration): Adjust call to
5173         cp_parser_constant_expression.
5174         (cp_parser_constant_initializer): Likewise.
5175         (cp_parser_constructor_declarator): Use resolve_typename_type, not
5176         cp_parser_resolve_typename_type.
5177         (cp_parser_late_parsing_default_args): Adjust call to
5178         push_nested_class.
5179         * pt.c (tsubst): Give it internal linkage.
5180         (tsubst_expr): Likewise.
5181         (tsubst_copy): Likewise.
5182         (tsubst_copy_and_build): Likewise.
5183         (push_access_scope_real): Likewise.
5184         (tsubst_friend_class): Likewise.
5185         (instantiate_class_template): Adjust call to pushclass.
5186         (value_dependent_expression_p): Give it external linkage.
5187         Robustify.
5188         (resolve_typename_type): New function.
5189         * semantics.c (finish_call_expr): Use build_new_op, not
5190         build_opfncall.
5191         (begin_constructor_declarator): Remove.
5192         (begin_class_definition): Adjust call to pushclass.
5193         (enter_scope_of): Remove.
5194         * typeck.c (comptypes): Resolve typename types as appropriate.
5195         (build_x_indirect_ref): Use build_new_op, not build_opfncall.
5196         (build_x_compound_expr): Likewise.
5197         (build_modify_expr): Likewise.
5198         (build_x_modify_expr): Likewise.
5199         * typeck2.c (build_x_arrow): Likewise.
5201 2003-01-29  Fariborz Jahanian  <fjahanian@apple.com>
5203         * pt.c (last_pending_template) Declare GTY().
5205 2003-01-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5207         PR c++/8591
5208         * parser.c (cp_parser_elaborated_type_specifier): Convert
5209         TEMPLATE_DECL to TYPE_DECL only when processing template friends.
5210         (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
5212 2003-01-28  Nathan Sidwell  <nathan@codesourcery.com>
5214         PR c++/9437
5215         * pt.c (unify): Don't unify '*T' with 'U C::*'.
5217         PR c++/3902
5218         * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
5219         inside a declarator.
5221 2003-01-27  Nathan Sidwell  <nathan@codesourcery.com>
5223         * class.c (update_vtable_entry_for_fn): Add index parameter.
5224         Generate vcall thunk for covariant overriding from a virtual
5225         primary base.
5226         (dfs_modify_vtables): Adjust.
5228 2003-01-25  Nathan Sidwell  <nathan@codesourcery.com>
5230         PR c++/9403
5231         * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
5232         template keyword.
5233         (cp_parser_base_specifier): Look for and consume a
5234         TEMPLATE keyword. Replace switch with array index.
5236         PR c++/795
5237         * semantics.c (finish_non_static_data_member): Remember the
5238         field's type even in a template.
5240         PR c++/9415
5241         * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
5242         already scoped.
5244         PR c++/8545
5245         * parser.c (cp_parser_cast_expression): Be more tentative.
5247 2003-01-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5249         * cp-tree.h (flagged_type_tree_s): Remove.
5250         (check_for_new_type): Likewise.
5251         * typeck2.c (check_for_new_type): Likewise.
5253 2003-01-23  Nathanael Nerode  <neroden@gcc.gnu.org>
5255         * dump.c: ANSIfy function declarations and definitions.
5257         * cp-tree.h, decl.h: Get rid of PARAMS.  Again.
5259 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
5261         PR c++/9354
5262         * init.c (build_new): Set the type of the new-expression, even
5263         when processing_templte_decl.
5265         PR c++/9216
5266         * parser.c (cp_parser_primary_expression): Improve error message
5267         for templates used in an expression context.
5269         PR c++/8696
5270         * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
5271         parse when encountering "typedef".
5273 2003-01-22  Nathanael Nerode  <neroden@gcc.gnu.org>
5275         * class.c, parser.c: ANSIfy function definitions and declarations.
5277 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
5279         PR c++/9328
5280         * error.c (dump_decl): For an OVERLOAD, just print the name of the
5281         function; it doesn't make sense to try to print its type.
5282         * semantics.c (finish_typeof): Issue errors about invalid uses.
5284         PR c++/9298
5285         * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
5286         function.
5287         (cp_parser_expression_statement): Use it.
5288         (cp_parser_explicit_instantiation): Likewise.
5289         * pt.c (do_decl_instantiation): Improve error handling logic.
5291 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
5293         PR c++/9384
5294         * parser.c (cp_parser_using_declaration): Issue error messages
5295         about name resolution failures here.
5297         PR c++/9388
5298         * class.c (currently_open_derived_class): Use dependent_type_p.
5299         * cp-tree.h (dependent_type_p): New function.
5300         (dependent_template_arg_p): Likewise.
5301         (dependent_template_p): Likewise.
5302         (type_dependent_expression_p): Likewise.
5303         * parser.c (cp_parser_dependent_type_p): Remove.
5304         (cp_parser_value_dependent_type_p): Likewise.
5305         (cp_parser_type_dependent_expression_p): Likewise.
5306         (cp_parser_dependent_template_arg_p): Likewise.
5307         (cp_parser_dependent_template_id_p): Likewise.
5308         (cp_parser_dependent_template_p): Likewise.
5309         (cp_parser_diagnose_invalid_type_name): Replace
5310         cp_parser_dependent_type_p with dependent_type_p, etc.
5311         (cp_parser_primary_expresion): Likewise.
5312         (cp_parser_nested_name_specifier_opt): Likewise.
5313         (cp_parser_postfix_expression): Likewise.
5314         (cp_parser_unary_expression): Likewise.
5315         (cp_parser_template_name): Likewise.
5316         (cp_parser_class_name): Likewise.
5317         (cp_parser_lookup_name): Likewise.
5318         * pt.c (dependent_type_p): New function.
5319         (value_dependent_expression_p): Likewise.
5320         (type_dependent_expression_p): Likewise.
5321         (dependent_template_arg_p): Likewise.
5322         (dependent_template_id_p): Likewise.
5323         (dependent_template_p): Likewise.
5325         PR c++/9285
5326         PR c++/9294
5327         * parser.c (cp_parser_simple_declaration): Return quickly when
5328         encountering errors.
5330 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5332         Make-lang.in (cp/decl.o-warn): Add -Wno-error.
5334 2003-01-17  Jason Merrill  <jason@redhat.com>
5336         PR c++/9167, c++/9358
5337         * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
5339 2003-01-17  Jason Merrill  <jason@redhat.com>
5341         PR c++/9342
5342         * call.c (build_conditional_expr): Always do lvalue-rvalue
5343         conversion.
5345 2003-01-17  Mark Mitchell  <mark@codesourcery.com>
5347         PR c++/9294
5348         * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
5349         * cp-tree.h (BASELINK_BINFO): Adjust.
5350         (BASELINK_FUNCTIONS): Likewise.
5351         (BASELINK_ACCESS_BINFO): Likewise.
5352         (tree_baselink): New structure.
5353         (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
5354         (lang_tree_node): Add baselink.
5355         * decl.c (cp_tree_node_structure): Add BASELINK case.
5356         * search.c (build_baselink): Adjust.
5357         * tree.c (cp_walk_subtrees): Add BASELINK case.  Remove BASELINK_P
5358         test from TREE_LIST case.
5360         PR c++/9272
5361         * parser.c (cp_parser_constructor_declarator_p): Do not assume
5362         that a constructor cannot be declared outside of its own class.
5364         * parser.c (cp_parser_resolve_typename_type): If the scope cannot
5365         be resolved, neither can the qualified name.
5367         * rtti.c (get_pseudo_ti_desc): Fix thinko.
5369 2003-01-16  Jason Merrill  <jason@redhat.com>
5371         PR c++/8564
5372         * init.c (build_vec_init): Re-add maxindex parm.
5373         (perform_member_init, build_aggr_init): Pass it.
5374         (build_new_1): Pass it. Use an incomplete array type for full_type.
5375         * typeck.c (build_modify_expr): Pass it.
5376         * cp-tree.h: Adjust.
5378 2003-01-16  Jeffrey D. Oldham  <oldham@codesourcery.com>
5380         * cp-tree.h (tsubst_copy_and_build): New declaration.
5381         * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
5382         (tsubst_expr): Use 'tsubst_copy_and_build'.  Update initial comment.
5383         (tsubst_copy_and_build): New function.
5385 2003-01-16  Mark Mitchell  <mark@codesourcery.com>
5387         * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
5388         (PARTIAL_INSTANTIATION_P): Remove.
5389         (IMPLICIT_TYPENAME_P): Likewise.
5390         (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
5391         (build_typename_type): Remove declaration.
5392         (parmlist_is_exprlist): Likewise.
5393         * decl.c (build_typename_type): Make it static, remove third
5394         parameter.
5395         (push_class_binding): Don't do implicit typename stuff.
5396         (make_typename_type): Likewise.
5397         (lookup_name_real): Likewise.
5398         (grokdeclarator): Don't try to convert declarations into
5399         initializations.  Don't do implicit typename stuff.
5400         (parmlist_is_exprlist): Remove.
5401         (xref_basetypes): Simplify.
5402         * decl2.c (grokfield): Don't try to convert declarations into
5403         initializations.
5404         (build_anon_union_vars): Do this while processing templates, too.
5405         (finish_anon_union): Likewise.
5406         * error.c (dump_type): Remove implicit typename handling.
5407         * parser.c (cp_parser_diagnose_invalid_type_name): New method.
5408         (cp_parser_primary_expression): Correct handling of names not
5409         found by unqualified name lookup in templates.
5410         (cp_parser_nested_name_specifier_opt): Avoid checking dependency
5411         of types when possible.
5412         (cp_parser_simple_declaration): Complain intelligently about some
5413         invalid declarations.
5414         (cp_parser_member_declaration): Likewise.
5415         (cp_parser_constructor_declarator_p): Don't check when we're in a
5416         function scope.
5417         * pt.c (instantiate_class_template): Remove
5418         PARTIAL_INSTANTIATION_P gunk.
5419         * search.c (lookup_field_r): Don't build implicit typenames.
5420         (marked_pushdecls_p): Don't enter dependent base types.
5421         (unmarked_pushdecls_p): Likewise.
5422         * semantics.c (begin_class_definition): Remove implicit typename
5423         stuff.
5425 2003-01-16  Nathan Sidwell  <nathan@codesourcery.com>
5427         PR c++/9212
5428         * parser.c (cp_parser_direct_declarator): If accepting either
5429         abstract or named, the name must be an unqualified-id.
5431 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5433         * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
5435 2003-01-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5437         * decl2.c (check_classfn): Fix uninitialized warning.
5438         (build_anon_union_vars): Likewise.
5439         * pt.c (tsubst_copy): Likewise.
5441 2003-01-14  Jeffrey D. Oldham  <oldham@codesourcery.com>
5443         Further conform g++'s __vmi_class_type_info to the C++ ABI
5444         specification.
5445         * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
5446         the specification.
5447         (class_hint_flags): Likewise.
5449 2003-01-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5451         * config-lang.in: Add semantics.c to gtfiles.
5452         * cp-tree.h (flagged_type_tree_s): Remove lookups field.
5453         (saved_scope): Likewise.
5454         (type_lookups): Remove.
5455         (deferred_access): New structure.
5456         (type_access_control): Remove.
5457         (save_type_access_control): Likewise.
5458         (reset_type_access_control): Likewise.
5459         (decl_type_access_control): Likewise.
5460         (push_deferring_access_checks): Declare.
5461         (resume_deferring_access_checks): Likewise.
5462         (stop_deferring_access_checks): Likewise.
5463         (pop_deferring_access_checks): Likewise.
5464         (get_deferred_access_checks): Likewise.
5465         (pop_to_parent_deferring_access_checks): Likewise.
5466         (perform_deferred_access_checks): Likewise.
5467         (perform_or_defer_access_check): Likewise.
5468         * decl.c (make_typename_type): Use perform_or_defer_access_check.
5469         (make_unbound_class_template): Likewise.
5470         (grokdeclarator): Don't call decl_type_access_control.
5471         * parser.c (cp_parser_context): Remove deferred_access_checks
5472         and deferring_access_checks_p fields.
5473         (cp_parser_context_new): Adjust.
5474         (cp_parser): Remove access_checks_lists.
5475         (cp_parser_defer_access_check): Remove.
5476         (cp_parser_start_deferring_access_checks): Remove.
5477         (cp_parser_stop_deferring_access_checks): Remove.
5478         (cp_parser_perform_deferred_access_checks): Remove.
5479         (cp_parser_nested_name_specifier_opt): Use new deferred access
5480         functions.
5481         (cp_parser_simple_declaration): Likewise.
5482         (cp_parser_template_id): Likewise.
5483         (cp_parser_function_definition): Likewise.
5484         (cp_parser_class_specifier): Likewise.
5485         (cp_parser_lookup_name): Likewise.
5486         (cp_parser_single_declaration): Likewise.
5487         (cp_parser_pre_parsed_nested_name_specifier): Likewise.
5488         (cp_parser_parse_tentatively): Likewise.
5489         (cp_parser_parse_definitely): Likewise.
5490         (yyparse): Likewise.
5491         (cp_parser_init_declarator): Remove access_checks parameter.
5492         Use new deferred access functions.
5493         (cp_parser_function_definition_from_specifiers_and_declarator):
5494         Likewise.
5495         (cp_parser_class_head): Remove deferring_access_checks_p and
5496         saved_access_checks parameters.  Use new deferred access functions.
5497         (cp_parser_member_specification_opt): Don't call
5498         reset_type_access_control.
5499         * search.c (type_access_control): Remove.
5500         * semantics.c: Include "gt-cp-semantics.h".
5501         (deferred_type_access_control): Remove.
5502         (deferred_access_stack): New variable.
5503         (deferred_access_free_list): Likewise.
5504         (push_deferring_access_checks): New function.
5505         (resume_deferring_access_checks): Likewise.
5506         (stop_deferring_access_checks): Likewise.
5507         (pop_deferring_access_checks): Likewise.
5508         (get_deferred_access_checks): Likewise.
5509         (pop_to_parent_deferring_access_checks): Likewise.
5510         (perform_deferred_access_checks): New function, adapted from
5511         cp_parser_perform_deferred_access_checks.
5512         (perform_or_defer_access_check): New function, adapted from
5513         cp_parser_defer_access_check.
5514         (current_type_lookups): Remove.
5515         (deferred_type_access_control): Likewise.
5516         (decl_type_access_control): Likewise.
5517         (save_type_access_control): Likewise.
5518         (reset_type_access_control): Likewise.
5519         (begin_function_definition): Adjust.
5520         (begin_class_definiton): Likewise.
5522 2003-01-13  Jason Merrill  <jason@redhat.com>
5524         PR c++/8748
5525         * class.c (build_base_path): Take the address before calling save_expr.
5527         * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
5528         all the ambiguous conversions are bad.
5530         * class.c (maybe_warn_about_overly_private_class): Don't stop
5531         searching when we find a nonprivate method.
5533         * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
5535 2003-01-12  Mark Mitchell  <mark@codesourcery.com>
5537         * cp-tree.h (get_arglist_len_in_bytes): Remove.
5539         PR c++/9264
5540         * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
5541         typeame types more robustly.
5543 2003-01-11  Phil Edwards  <pme@gcc.gnu.org>
5545         * parser.c:  Fix comment typos.
5547 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
5549         PR c++/9099
5550         * parser.c (cp_parser_scope_through_which_access_occurs): Handle
5551         an object_type which is not a class type.
5553 2003-01-10  Geoffrey Keating  <geoffk@apple.com>
5555         * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
5556         (cp_parser_late_parsing_default_args): Likewise.
5558 2003-01-10  Nathanael Nerode  <neroden@gcc.gnu.org>
5560         * cfns.gperf: ANSIfy function declarations.
5561         * cfns.h: Regenerate.
5562         * cp-tree.h: ANSIfy function declarations.
5564 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
5566         * cp-tree.h (reparse_absdcl_as_expr): Remove.
5567         (reparse_absdcl_as_casts): Likewise.
5568         (reparse_decl_as_expr): Likewise.
5569         (finish_decl_parsing): Likewise.
5570         * decl2.c (reparse_absdcl_as_expr): Remove.
5571         (reparse_absdcl_as_casts): Likewise.
5572         (repase_decl_as_expr): Likewise.
5573         (finish_decl_parsing): Likewise.
5575         PR c++/9128
5576         PR c++/9153
5577         PR c++/9171
5578         * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
5579         function.
5580         (cp_parser_nested_name_specifier_opt): Correct the
5581         check_dependency_p false.
5582         (cp_parser_postfix_expression): Fix formatting.
5583         (cp_parser_decl_specifier_seq): Avoid looking for constructor
5584         declarators when possible.
5585         (cp_parser_template_id): Avoid performing name-lookup when
5586         possible.
5587         (cp_parser_class_head): Do not count specializations when counting
5588         levels of templates.
5589         (cp_parser_constructor_declarator_p): Return immediately if
5590         there's no chance that the tokens form a constructor declarator.
5591         * rtti.c (throw_bad_typeid): Add comment.  Do not return an
5592         expression with reference type.
5593         (get_tinfo_decl_dynamic): Do not return an expression with
5594         reference type.
5595         (build_typeid): Add comment.  Do not return an expression with
5596         reference type.
5597         * typeck.c (build_class_member_access_expr): Improve handling of
5598         conditionals and comma-expressions as objects.
5600 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
5602         * cfns.gperf: ANSIfy function declarations.
5603         * cfns.h: Regenerate.
5604         * cp-tree.h: ANSIfy function declarations.
5605         * parser.c: ANSIfy function declarations & definitions.
5607         * decl.c (bad_specifiers): Fix parameter order error I introduced.
5609 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
5611         Merge from pch-branch:
5613         2003-01-09  Geoffrey Keating  <geoffk@apple.com>
5615         Merge to tag pch-merge-20030102:
5617         * semantics.c (finish_translation_unit): Don't call finish_file.
5618         * parser.c: Don't include ggc.h.
5619         (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
5620         read first token here.  Don't allow PCH files after the first
5621         token is read.
5622         (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
5623         (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
5624         (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
5625         (cp_parser_late_parsing_for_member): Don't duplicate call to
5626         cp_lexer_set_source_position_from_token.
5627         (cp_parser_late_parsing_default_args): Likewise.
5628         (yyparse): Call finish_file after clearing the_parser.
5630         2002-12-11  Geoffrey Keating  <geoffk@apple.com>
5632         * Make-lang.in: Remove $(GGC_H) from all dependencies.
5633         (CXX_TREE_H): Add $(GGC_H).
5634         * class.c: Don't include ggc.h.
5635         (field_decl_cmp): Make parameters be 'const void *' to match qsort.
5636         (method_name_cmp): Likewise.
5637         (resort_data): New variable.
5638         (resort_field_decl_cmp): New.
5639         (resort_method_name_cmp): New.
5640         (resort_sorted_fields): New.
5641         (resort_type_method_vec): New.
5642         (finish_struct_methods): Delete cast.
5643         (finish_struct_1): Delete cast.
5644         * cp-tree.h: Include ggc.h.
5645         (struct lang_type_class): Add reorder attribute to field `methods'.
5646         (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
5647         (resort_sorted_fields): New prototype.
5648         (resort_type_method_vec): New prototype.
5649         * call.c: Don't include ggc.h.
5650         * decl.c: Likewise.
5651         * decl2.c: Likewise.
5652         * init.c: Likewise.
5653         * lex.c: Likewise.
5654         * method.c: Likewise.
5655         * optimize.c: Likewise.
5656         * parse.y: Likewise.
5657         * pt.c: Likewise.
5658         * repo.c: Likewise.
5659         * search.c: Likewise.
5660         * semantics.c: Likewise.
5661         * spew.c: Likewise.
5662         * tree.c: Likewise.
5664         * lang-specs.h: Remove comment.
5666         2002-12-03  Geoffrey Keating  <geoffk@apple.com>
5668         * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
5669         (operator_name_info): Mark to be saved for PCH, specify size.
5670         (assignment_operator_name_info): Likewise.
5672         2002-11-19  Geoffrey Keating  <geoffk@apple.com>
5674         * decl.c (anon_cnt): Mark to be saved for PCH.
5676         2002-10-25  Geoffrey Keating  <geoffk@apple.com>
5678         * lex.c  (init_reswords): Delete now-untrue comment.
5679         Allocate ridpointers using GGC.
5681         2002-10-04  Geoffrey Keating  <geoffk@apple.com>
5683         * cp-tree.h (union lang_decl_u2): Add tags to all fields.
5685         * g++spec.c (lang_specific_driver): Don't include standard
5686         libraries in `added'.
5688         2002-08-27  Geoffrey Keating  <geoffk@redhat.com>
5690         * decl2.c (finish_file): Call c_common_write_pch.
5691         * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
5693         2002-08-17  Geoffrey Keating  <geoffk@redhat.com>
5695         * g++spec.c (lang_specific_driver): Treat .h files as C++ header
5696         files when using g++.
5697         * lang-specs.h: Handle compiling C++ header files.
5699 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
5701         * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
5703 2003-01-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5705         * pt.c (push_access_scope_real): Call push_to_top_level for
5706         function in namespace scope.
5707         (pop_access_scope): Call pop_from_top_level for function in
5708         namespace scope.
5710 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
5712         * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
5714 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
5716         * Make-lang.in (c++.install-common, c++.install-man,
5717         c++.uninstall): Prepend $(DESTDIR) to destination paths in
5718         all (un)installation commands.
5719         (c++.install-common): Rewrite $(LN) commands to support
5720         DESTDIR with "ln" as well as with "ln -s".
5722 2003-01-08  Jason Merrill  <jason@redhat.com>
5724         * parser.c (cp_parser_primary_expression): See through explicitly
5725         scoped ALIAS_DECLs, too.
5727 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
5729         * decl.c: Remove some #if 0 code.
5731         * decl.c: ANSIfy function declarations.
5733 2003-01-07  Mark Mitchell  <mark@codesourcery.com>
5735         * parser.c (cp_parser_asm_definition): Correct handling of omitted
5736         operands.
5738 2003-01-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5740         PR c++/9030
5741         * decl.c (make_typename_type): Check access only when tf_error.
5742         (make_unbound_class_template): Likewise.
5743         * pt.c (saved_access_scope): New variable.
5744         (push_access_scope_real): New function.
5745         (push_access_scope): Likewise.
5746         (pop_access_scope): Likewise.
5747         (tsubst_default_argument): Use them.
5748         (instantiate_template): Likewise.
5749         (regenerate_decl_from_template): Likewise.
5750         (instantiate_decl): Likewise.
5751         (get_mostly_instantiated_function_type): Likewise.
5753 2003-01-07  Nathanael Nerode <neroden@gcc.gnu.org>
5755         * tree.c: Delete bogus #if 0 code.
5757 2003-01-07  Andreas Schwab  <schwab@suse.de>
5759         * class.c (layout_class_type): Don't use
5760         PCC_BITFIELD_TYPE_MATTERS if not defined.
5762 2003-01-06  Mark Mitchell  <mark@codesourcery.com>
5764         PR c++/9165
5765         * decl2.c (build_cleanup): Mark the object as used.
5767         * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
5768         (hash_local_specialization): New function.
5769         (register_local_specialization): Revert 2003-01-05 change.
5770         (instantiate_decl): Use hash_local_specialization when creating
5771         the local_specializations table.
5773         * decl2.c (mark_used): Do not synthesize thunks.
5775         * class.c (layout_class_type): Correct handling of unnamed
5776         bitfields wider than their types.
5778         PR c++/9189
5779         * parser.c (cp_parser): Remove default_arg_types.  Update
5780         documentation for unparsed_functions_queues.
5781         (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
5782         parameter.
5783         (cp_parser_new): Don't set parser->default_arg_types.
5784         (cp_parser_function_definition): Adjust usage of
5785         unparsed_funtions_queues.
5786         (cp_parser_class_specifier): Don't mess with
5787         parser->default_arg_types.  Handle default argument processing in
5788         a separate phase from function body processing.
5789         (cp_parser_template_declaration_after_export): Adjust usage of
5790         unparsed_functions_queues.
5791         (cp_parser_late_parsing_for_member): Do not handle default
5792         arguments.
5794 2003-01-06  Nathan Sidwell  <nathan@codesourcery.com>
5796         PR c++/9109
5797         * parser.c (cp_parser_declarator_kind): New enum.
5798         (cp_parser_declarator): Adjust.
5799         (cp_parser_direct_declarator): Adjust. Allow for either named or
5800         abstract declarator. Prefer abstract, if possible. Allow
5801         parenthesized function name.
5802         (cp_parser_condition): Adjust cp_parser_declarator call.
5803         (cp_parser_explicit_instantiation): Likewise.
5804         (cp_parser_init_declarator): Likewise.
5805         (cp_parser_type_id): Likewise.
5806         (cp_parser_function_definition): Likewise.
5807         (cp_parser_member_declaration): Likewise.
5808         (cp_parser_parameter_declaration): Use cp_parser_declarator to do
5809         the tentative parsing.
5810         (cp_parser_exception_declaration): Likewise.
5812 2003-01-05  Mark Mitchell  <mark@codesourcery.com>
5814         * parser.c (cp_parser_template_parameter): Adjust call to
5815         cp_parser_parameter_declaration.
5816         (cp_parser_parameter_declaration_list): Likewise.
5817         (cp_parser_parameter_declaration): Replace
5818         greater_than_is_operator_p with template_parm_p parameter.  Do not
5819         cache tokens for template default arguments.
5821         * pt.c (retrieve_local_specialization): Use htab_find, not
5822         htab_find_with_hash.
5823         (register_local_specialization): Use htab_find_slot, not
5824         htab_find_slot_with_hash.
5825         (instantiate_decl): Pass a hash function to htab_create.
5827 2003-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5829         * parser.c (cp_parser_binary_expression,
5830         cp_parser_multiplicative_expression,
5831         cp_parser_additive_expression, cp_parser_shift_expression,
5832         cp_parser_relational_expression, cp_parser_equality_expression,
5833         cp_parser_and_expression, cp_parser_exclusive_or_expression,
5834         cp_parser_inclusive_or_expression,
5835         cp_parser_logical_and_expression, cp_parser_logical_or_expression,
5836         cp_parser_binary_expression): Const-ify.
5838 2003-01-04  Mark Mitchell  <mark@codesourcery.com>
5840         * method.c (use_thunk): Disable access control while building the
5841         body of the thunk.
5843 2003-01-03  Nathanael Nerode  <neroden@gcc.gnu.org>
5845         * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
5846         front end.
5848 2003-01-03  Matt Austern  <austern@apple.com>
5850         * cp-tree.h (struct lang_type_class): add field for key method
5851         (cp_global_trees): rename dynamic_classes to keyed_classes
5852         (key_method): add definition
5853         * class.c (finish_struct_1): compute class's key method, and add
5854         the class to keyed_classes list if there is no key method.
5855         * decl.c (finish_function): add class to keyed_classes list if we
5856         see a definition of the class's key method.
5857         * pt.c (instantiate_class_template): add template specialization
5858         of a dynamic class to keyed_classes list.
5859         * decl2.c (key_method): remove
5860         (finish_file): iterate only through keyed_classes list when
5861         deciding whether to emit vtables, remove class from its list after
5862         we do the emission.
5864 2003-01-02  Jason Merrill  <jason@redhat.com>
5866         * call.c (build_conditional_expr): Stabilize lvalues properly.
5867         * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
5868         * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
5869         Don't allow CALL_EXPR or VA_ARG_EXPR, either.
5871         * call.c (convert_like_real): Call decl_constant_value for an
5872         IDENTITY_CONV even if there are no more conversions.
5874         * cvt.c (build_up_reference): Don't push unnamed temps.
5876         * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
5878         * dump.c (cp_dump_tree): Don't try to dump class-specific fields
5879         for a backend struct.
5881         * except.c (wrap_cleanups_r, build_throw): Make
5882         MUST_NOT_THROW_EXPRs void.
5883         * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
5885         * init.c (build_vec_delete_1): Pre-evaluate the base address.
5887         * init.c (get_temp_regvar): Simplify logic.
5889         * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
5890         our replacement is a decl.
5892         * decl.c (cp_make_fname_decl): Push the decls inside the
5893         outermost scope.
5895 2003-01-03  Nathan Sidwell  <nathan@codesourcery.com>
5897         PR c++/45, c++/3784
5898         * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
5899         the same too.
5901 2003-01-03  Graham Stott  <graham.stott@btinternet.com>
5903         * parser.c (struct cp_parser): Add access_checks_lists field
5904         (cp_parser_simple_declaration): Use.
5905         (cp_parser_init_declarator): Likewise.
5907 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
5909         * parser.c (cp_parser_declaration): Accept the __extension__
5910         keyword before the declaration.
5912         PR c++/2843
5913         * parser.c (cp_parser_parameter_declaration): Allow attributes to
5914         appear after the declarator.
5916         * call.c (build_new_method_call): Fix typo in message format
5917         string.
5919 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
5921         * parser.c (cp_lexer_next_token_is): Declare it inline.
5922         (cp_lexer_set_source_position_from_token): Likewise.
5923         (cp_lexer_debugging_p): Likewise.
5924         (cp_parser_parsing_tentatively): Likewise.
5925         (cp_parser_nested_name_specifier_opt): Reduce the number of calls
5926         to the cp_lexer_peek_token.
5928         * parser.c (cp_parser_sizeof_operand): Do not evaluate the
5929         expression.
5931 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
5933         * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
5934         cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
5935         cp/repo.c: Fix copyright years.
5937 2003-01-01  Neil Booth  <neil@daikokuya.co.uk>
5939         * lex.c: Remove superfluous include of cpplib.h.
5940         (CONSTRAINT): Define without conditions.
5941         (init_cp_pragma): Use c_register_pragma.
5943 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
5945         * .cvsignore: Remove.
5947 2002-12-31  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5949         * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
5950           except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
5951           lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
5952           pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
5953           typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
5954           copyright header.
5955         * lex.h: parse.y is dead, so don't mention it.  Also replace the
5956           copyright header with the default GNU copyright header.
5958 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
5960         * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
5961         (lookup_name_namespace_only): Likewise.
5962         (begin_only_namespace_names): Likewise.
5963         (end_only_namespace_names): Likewise.
5964         * decl.c (only_namespace_names): Remove.
5965         (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
5966         (lookup_name_real): Do not check only_namespace_names.
5967         (lookup_name_namespace_only): Remove.
5968         (begin_only_namespace_names): Likewise.
5969         (end_only_namespace_names): Likewise.
5970         * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
5971         nested-name-specifiers more gracefully.
5972         (cp_parser_class_or_namespace_name): Avoid looking up namespace
5973         names when they cannot possibly appear.
5974         (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
5975         (cp_parser_elaborated_type_specifier): Likewise.
5976         (cp_parser_namespace_name): Only look for namespace names.
5977         (cp_parser_lookup_name): Add is_namespace parameter.
5978         (cp_parser_lookup_name_simple): Adjust call to
5979         cp_parser_lookup_name.
5981         * parser.c (cp_parser_dependent_type_p): Fix thinko.
5983 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
5985         * .cvsignore: Update.
5987 2002-12-31  Nathan Sidwell  <nathan@codesourcery.com>
5989         * class.c (modify_vtable_entry): Remove unused variable.
5990         (get_vcall_index): Always expect a non-thunk.
5991         (update_vtable_entry_for_fn): Combine covariant adjustments, when
5992         overriding a thunk. Pass get_vcall_index a non-thunk.
5994         * decl2.c (finish_file): Mark undefined inlines as extern.
5996 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
5998         * cp-tree.def (RETURN_INIT): Remove.
5999         * cp-tree.h (DECL_IN_MEMORY_P): Remove.
6000         (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
6001         (note_level_for_for): Remove.
6002         (note_level_for_try): Likewise.
6003         (note_level_for_catch): Likewise.
6004         (finish_named_return_value): Likewise.
6005         (do_pushlevel): Change prototype.
6006         (pending_lang_change): Remove.
6007         * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
6008         sk_for.
6009         (note_level_for_for): Remove.
6010         (note_level_for_try): Likewise.
6011         (note_level_for_catch): Likewise.
6012         (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
6013         * parser.c (cp_parser_context_free_list): Make it "deletable".
6014         (cp_parser_template_argument): Remove misleading comment.
6015         * pt.c (tsubst_expr): Remove RETURN_INIT code.
6016         * semantics.c (genrtl_named_return_value): Remove.
6017         (do_pushlevel): Take a scope kind as an argument.
6018         (begin_if_stmt): Adjust.
6019         (begin_while_stmt): Likewise.
6020         (begin_for_stmt): Likewise.
6021         (finish_for_init_stmt): Likewise.
6022         (begin_switch_stmt): Likewise.
6023         (begin_handler): Likewise.
6024         (begin_compound_stmt): Likewise.
6025         (finish_named_return_value): Remove.
6026         (cp_expand_stmt): Remove RETURN_INIT case.
6027         * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
6029 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
6031         PR c++/9112
6032         * parser.c (cp_parser_direct_declarator): Handle erroneous
6033         parenthesized declarators correctly.
6035 2002-12-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6037         * cp-tree.h (pending_lang_change): Declare.
6039 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
6041         * parser.c (cp_parser_context_free_list): New variable.
6042         (cp_parser_context_new): Use it.
6043         (cp_parser_error): Check return code from
6044         cp_parser_simulate_error.
6045         (cp_parser_simulate_error): Return a value.
6046         (cp_parser_id_expression): Optimize common case.
6047         (cp_parser_class_name): Likewise.
6048         (cp_parser_class_specifier): Adjust call to
6049         cp_parser_late_parsing_default_args.
6050         (cp_parser_lookup_name): Optimize common case.
6051         (cp_parser_late_parsing_for_member): Adjust call to
6052         cp_parser_late_parsing_default_args.
6053         (cp_parser_late_parsing_default_args): Add scope parameter.
6054         (cp_parser_require): Avoid creating the error message unless it's
6055         needed.
6056         (cp_parser_parse_definitely): Place free'd contexts on the free
6057         list.
6059         * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
6061 2002-12-30  David Edelsohn  <edelsohn@gnu.org>
6063         * parser.c (cp_parser_parameter_declaration_clause): Treat system
6064         header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
6066 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
6068         * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
6069         GCC, not GNU CC.
6071 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
6073         * parse.y: Remove.
6074         * spew.c: Likewise.
6075         * Make-lang.in (gt-cp-spew.h): Remove.
6076         * cp-tree.h (do_pending_lang_change): Remove.
6077         (do_identifier): Change prototype.
6078         (finish_id_expr): Remove.
6079         * decl.c (lookup_name_real): Remove yylex variable.
6080         * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
6081         * lex.c (init_cpp_parse): Remove.
6082         (reduce_cmp): Likewise.
6083         (token_cmp): Likewise.
6084         (yychar): Likewise.
6085         (lastiddecl): Likewise.
6086         (token_count): Likewise.
6087         (reduce_count): Likewise.
6088         (yyhook): Likewise.
6089         (print_parse_statistics): Likewise.
6090         (do_pending_lang_change): Likewise.
6091         (do_identifier): Remove parsing parameter.
6092         * lex.h (lastiddecl): Remove.
6093         (looking_for_typename): Remove.
6094         (looking_for_template): Likewise.
6095         (pending_lang_change): Likewise.
6096         (yylex): Likewise.
6097         * semantics.c (finish_id_expr): Remove.
6099         * decl.c (grokdeclarator): Diagnost "extern thread" and "static
6100         thread" correctly.
6102 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
6104         * decl.c, decl2.c, decl.h:  GCC, not GNU CC.  This is the C++ front
6105         end, not the C front end.
6107 2002-12-30  Nathan Sidwell  <nathan@codesourcery.com>
6109         * cp-tree.h (THUNK_TARGET): New macro.
6110         (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
6111         (finish_thunk): Remove offset parms.
6112         * class.c (find_final_overrider): Look through thunks.
6113         (get_vcall_index): Use THUNK_TARGET.
6114         (update_vtable_entry_for_fn): Look through thunks. Set covariant
6115         fixed offset here. Adjust finish_thunk call.
6116         (build_vtbl_initializer): Adjust finish_thunk calls.
6117         * mangle.c (mangle_call_offset): Remove superfluous if.
6118         (mangle_thunk): Adjust.
6119         * method.c (make_thunk): Adjust.
6120         (finish_thunk): Adjust.
6121         (thunk_adjust): Remove assert.
6122         (use_thunk): Use THUNK_TARGET
6123         * dump1.c (cp_dump_tree): Adjust thunk dumping.
6125         PR c++/9054
6126         * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
6127         * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
6129 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6131         Remove traditional C constructs 4/n.
6132         * decl2.c (grok_method_quals, warn_if_unknown_interface,
6133         grok_x_components, cp_build_parm_decl, build_artificial_parm,
6134         maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
6135         delete_sanity, check_member_template, check_java_method,
6136         check_classfn, finish_static_data_member_decl, grokfield,
6137         grokbitfield, grokoptypename, grok_function_init,
6138         cplus_decl_attributes, constructor_name, defer_fn,
6139         build_anon_union_vars, finish_anon_union, coerce_new_type,
6140         coerce_delete_type, comdat_linkage, maybe_make_one_only,
6141         key_method, import_export_vtable, import_export_class,
6142         output_vtable_inherit, import_export_decl, import_export_tinfo,
6143         build_cleanup, get_guard, get_guard_bits, get_guard_cond,
6144         set_guard, start_objects, finish_objects,
6145         start_static_storage_duration_function,
6146         finish_static_storage_duration_function, get_priority_info,
6147         start_static_initialization_or_destruction,
6148         finish_static_initialization_or_destruction,
6149         do_static_initialization, do_static_destruction,
6150         prune_vars_needing_no_initialization, write_out_vars,
6151         reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
6152         add_using_namespace, merge_functions, ambiguous_decl,
6153         lookup_using_namespace, lookup_using_namespace,
6154         qualified_lookup_using_namespace, set_decl_namespace,
6155         decl_namespace, current_decl_namespace, push_decl_namespace,
6156         pop_decl_namespace, push_scope, pop_scope, add_function,
6157         arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
6158         lookup_arg_dependent, do_namespace_alias,
6159         validate_nonmember_using_decl, do_nonmember_using_decl,
6160         do_toplevel_using_decl, do_local_using_decl,
6161         do_class_using_decl, do_using_directive, check_default_args,
6162         mark_used, handle_class_head): Use C90 prototypings.  Use booleans.
6163         * parser.c (cp_parser_class_head): Use booleanss.
6164         * decl.c (walk_globals, walk_vtables): Likewise.
6165         * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
6166         walk_globals): Change return type from 'int' to 'bool'.
6167         * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
6168         throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
6169         build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
6170         get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
6171         qualifier_flags, tinfo_base_init, generic_initializer,
6172         ptr_initializer, dfs_class_hint_mark, ptm_initializer,
6173         dfs_class_hint_unmark, class_hint_flags, class_initializer,
6174         typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
6175         get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
6176         unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
6177         * repo.c (repo_compile_flags, repo_template_declared,
6178         repo_template_defined, repo_class_defined, repo_get_id,
6179         repo_template_used, repo_vtable_used, repo_inline_used,
6180         repo_tinfo_used, repo_template_instantiated, extract_string,
6181         open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
6182         finish_repo): Likewise.
6183         * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
6184         cxx_print_xnode): Likewise..
6185         * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
6186         cxx_warn_unused_global_decl, cp_expr_size): Likewise.
6187         * cxxfilt.c (demangle_it, print_demangler_list, usage,
6188         standard_symbol_characters, hp_symbol_characters, main, fatal):
6189         Likewise.
6190         (strip_underscore):  Change type from 'int' to 'bool'.
6191         (main): Use boolean constants.
6193 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6195         Remove traditional C constructs 3/n.
6196         * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
6197         build_up_reference, warn_ref_binding, convert_to_reference,
6198         convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
6199         convert_to_void, convert, convert_force, build_type_conversion,
6200         build_expr_type_conversion, type_promotes_to,
6201         perform_qualification_conversions): Use C90 prototyping style.
6202         * decl2.c (grok_array_decl): Use boolean constant.
6203         (delete_sanity): Likewise.
6204         * typeck.c (build_unary_op): Likewise.
6205         * semantics.c (finish_switch_cond): Likewise.
6206         * parser.c (cp_parser_direct_new_declarator): Likewise.
6207         * init.c (build_new): Likewise.
6209 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
6211         * Make-lang.in (po-generated): Remove parse.c.
6212         (CXX_OBJS): Remove parse.o and spew.o.  Add parser.o.
6213         ($(srcdir)/cp/parse.h): Remove target.
6214         ($(srcdir)/cp/parse.c): Likewise.
6215         (gt-cp-parse.h): Likewise.
6216         (gt-cp-parser.h): New target.
6217         (c++.distclean): Do not remove parse.output.
6218         (c++.maintainer-clean): Do not remove parse.c or parse.h.
6219         (cp/spew.o): Remove target.
6220         (cp/lex.o): Adjust dependencies.
6221         (cp/pt.o): Likewise.
6222         (cp/parse.o): Likewise.
6223         (cp/TAGS): Do not mention parse.c.
6224         (cp/parser.o): New target.
6225         * NEWS: Mention the new parser.
6226         * call.c (build_scoped_method_call): Simplify.
6227         (build_method_call): Likewise.
6228         (build_new_function_call): Adjust calls to add_function_candidate
6229         and add_template_candidate.
6230         (build_new_op): Improve handling of erroroneous operands.
6231         (convert_default_arg): Remove circular argument processing.
6232         (name_as_c_string): New function.
6233         (build_new_method_call): Use it.
6234         (perform_implicit_conversion): Use error_operand_p.
6235         * class.c (finish_struct_anon): Use constructor_name_p.
6236         (check_field_decls): Likewise.
6237         (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
6238         (resolve_address_of_overloaded_function): Likewise.
6239         (instantiate_type): Tweak pointer-to-member handling.
6240         (get_primary_binfo): Remove incorrect assertion.
6241         * config-lang.in (gtfiles): Add parser.c, remove parse.c.
6242         * cp-tree.h (DEFARG_TOKENS): New macro.
6243         (default_arg): New structure.
6244         (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
6245         (lang_tree_node): Add default_arg.
6246         (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
6247         (type_info_ref_type): New macro.
6248         (saved_scope): Make processing_explicit_instantiation a boolean.
6249         (check_access): New field.
6250         (unparsed_text): Remove.
6251         (language_function): Remove unparsed_inlines.
6252         (error_operand_p): New macro.
6253         (lang_decl): Adjust pending_inline_info.
6254         (DEFARG_POINTER): Remove.
6255         (tag_types): Add typenames.
6256         (lookup_ualified_name): Declare.
6257         (lookup_name_real): Likewise.
6258         (shadow_tag): Adjust prototype.
6259         (get_scope_of_declarator): Declare it.
6260         (process_next_inline): Remove it.
6261         (check_for_missing_semicolon): Likewise.
6262         (maybe_get_template_decl_from_type_decl): Declare it.
6263         (finish_label_stmt): Adjust prototype.
6264         (finish_non_static_data_meber): Declare it.
6265         (finish_pseudo_destructor_call_expr): Rename to ...
6266         (finish_pseudo_destructor_expr): ... this.
6267         (finish_compound_literal): Declare it.
6268         (begin_inline_definitions): Remove it.
6269         (init_spew): Remove.
6270         (peekyylex): Likewise.
6271         (arbitrate_lookup): Likewise.
6272         (frob_opname): Likewise.
6273         (maybe_snarf_defarg): Likewise.
6274         (add_defarg_fn): Likewise.
6275         (do_pending_defargs): Likewise.
6276         (done_pending_defargs): Likewise.
6277         (unprocessed_defarg_fn): Likewise.
6278         (replace_defarg): Likewise.
6279         (end_input): Likewise.
6280         (get_overloaded_fn): Likewise.
6281         * cvt.c (convert_to_reference): Improve error handling.
6282         * decl.c (lookup_name_real): Do not declare it static.
6283         (maybe_push_to_top_level): Set check_access.
6284         (identifier_type_value): Adjust call to lookup_name_real.
6285         (lookup_qualified_name): New method.
6286         (lookup_name_real): Remove special-case parsing code.
6287         (lookup_name-nonclass): Adjust call to lookup_name_real.
6288         (lookup_name_namespace_only): Likewise.
6289         (lookup_name): Likewise.
6290         (check_tag_decl): Return the type declared.
6291         (shadow_tag): Likewise.
6292         (register_dtor_fn): Tweak check_access.
6293         (grokfndecl): Use constructor_name_p.
6294         (get_scope_of_declarator): New function.
6295         (grokdeclarator): Obscure tweaks for slightly different declarator
6296         representations.
6297         (start_method): Return error_mark_node to indicate failure.
6298         (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
6299         * decl2.c (constructor_name_full): Simplify.
6300         (constructor_name): Use it.
6301         (build_expr_from_tree): Adjust for changes to do new parser.
6302         (push_scope): Improve robustness.
6303         (validate_nonmember_using_decl): Process declarations, not names.
6304         (do_class_using_decl): Likewise.
6305         (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
6306         here.
6307         * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
6308         * expr.c (cxx_expand_expr): Handle BASELINKs.
6309         * init.c (member_init_ok_or_else): Issue more errors.
6310         (build_offset_ref): Tweak handling of FUNCTION_DECLs.
6311         * lex.c: Do not include parse.h.
6312         (yypring): Do not declare.
6313         (yylval): Likewise.
6314         (make_reference_declarator): Remove error-generating code.
6315         (rid_to_yy): Remove.
6316         (cxx_init): Do not call init_spew.
6317         (yypring): Remove.
6318         (check_for_missing_semicolon): Remove.
6319         * lex.h (got_scope): Remove.
6320         (got_object): Remove.
6321         * method.c (hack_identifier): Use finish_non_static_data_member.
6322         (implicitly_declare_fn): Adjust use of constructor_name.
6323         * parser.c: New file.
6324         * pt.c (parse.h): Do not include it.
6325         (maybe_get_template_decl_from_template): Do not declare it.
6326         (finish_member_template_decl): Tweak.
6327         (begin_explicit_instantiation): Adjust for
6328         processing_explicit_instantiation being boolean.
6329         (end_explicit_instantiation): Likewise.
6330         (maybe_process_partial_specialization): Tighten specialization
6331         test.
6332         (retrieve_local_specialization): Adjust ue of hash table.
6333         (eq_local_specializations): New function.
6334         (register_local_specialization): Likewise.
6335         (push_template_decl_real): Remove unnecessary test.
6336         (maybe_get_template_decl_from_type_decl): Don't make it static.
6337         (for_each_template_parm_r): Handle TYPEOF_TYPE.
6338         (tsubst_copy): Use retrieive_local_specialization to handle
6339         PARM_DECL.  Adjust handling of CONST_DECLs.  Handle BASELINKs.
6340         Handle COMPONENT_REFs with pseudo-destructor-expressions.
6341         Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
6342         (tsubst_expr): Pass decls, not names, to do_local_using_decl.
6343         (unify): Tweak handling of CONST_DECLs.
6344         (regenerate_decl_from_template): Use push_nested_class.
6345         (template_for_substitution): New funciton.
6346         (instantiate_decl): Use it.  Register parameters as local
6347         specializations.
6348         * rtti.c (init_rtti_processing): Set type_info_ref_type.
6349         (build_typeid): Use it.
6350         (get_typeid): Likeise.
6351         * search.c (accessible_p): Use check_access, not
6352         flag_access_control.
6353         (adjust_result_of_qualified_name_lookup): Pay attention to the
6354         context_class.
6355         * semantics.c (finish_asm_stmt): Adjust error handling.
6356         (finish_label_stmt): Return the statement.
6357         (finish_non_static_data_member): New function.
6358         (finish_class_expr): Handle BASELINKs.
6359         (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
6360         (finish_object_call_expr): Simplify handling during templates.
6361         (finish_pseudo_destructor_call_expr): Rename to ...
6362         (finish_pseudo_dtor_expr): ... this.
6363         (finish_compound_literal): New function.
6364         (begin_inline_definitions): Remove.
6365         (finish_sizeof): Remove special template handling.
6366         * spew.c: Do not include parse.h.
6367         * tree.c (get_overloaded_fn): Remove.
6368         * typeck.c (build_class_member_access_expr): Handle
6369         PSEUDO_DTOR_EXPR.  Adjust handling of static member functions.
6370         (lookup_destructor): New function.
6371         (finish_class_member_access_expr): Use it.
6372         (convert_arguments): Simplify.
6373         (build_unary_op): Handle BASELINKs.
6375 2002-12-26  Nathan Sidwell  <nathan@codesourcery.com>
6377         PR c++/4803
6378         * decl2.c (mark_used): Defer inline functions.
6379         (finish_file): Merge deferred_fns loops. Check all used
6380         inline functions have a definition.
6381         * method.c (make_thunk): Thunks are not inline.
6383         PR c++/5116, c++/764
6384         * call.c (build_new_op): Make sure template class operands are
6385         instantiated.
6387 2002-12-24  Nathan Sidwell  <nathan@codesourcery.com>
6389         PR C++/7964
6390         * cp-tree.h (resolve_scoped_fn_name): Prototype.
6391         * call.c (resolve_scoped_fn_name): New function. Deal with
6392         more template expansion. Broken out of ...
6393         * parse.y (parse_finish_call_expr): ... here. Call it.
6394         * decl2.c (build_expr_from_tree, CALL_EXPR): Use
6395         resolve_scoped_fn_name and build_call_from_tree.
6397         PR c++/9053
6398         * decl.c (duplicate_decls): Templates may be disambiguated by
6399         return type.
6401         PR c++/8702
6402         * decl2.c (check_classfn): Use lookup_fnfield_1. List all
6403         conversion operators on failure.
6405 2002-12-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6407         Remove traditional C constructs 2/n.
6408         * call.c (tourney, build_field_call, equal_functions, joust,
6409         compare_ics, build_over_call, build_java_interface_fn_ref,
6410         convert_like_real, op_error, build_object_call, resolve_args,
6411         build_vfield_ref, check_dtor_name, build_scoped_method_call,
6412         build_addr_func, build_call, build_method_call, null_ptr_cst_p,
6413         sufficient_parms_p, build_conv, non_reference, strip_top_quals,
6414         standard_conversion, reference_related_p,
6415         reference_compatible_p, convert_class_to_reference,
6416         direct_reference_binding, reference_binding,
6417         ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
6418         add_template_conv_candidate, any_viable, any_strictly_viable,
6419         build_this, splice_viable, print_z_candidates,
6420         build_user_type_conversion, build_new_function_call,
6421         conditional_conversion, build_conditional_expr, build_new_op,
6422         build_op_delete_call, enforce_access, call_builtin_trap,
6423         convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
6424         convert_default_arg, type_passed_as, convert_for_arg_passing,
6425         in_charge_arg_for_name, is_properly_derived_from,
6426         maybe_handle_implicit_object, maybe_handle_ref_bind,
6427         source_type, add_warning, can_convert, can_convert_arg,
6428         perform_implicit_conversion, can_convert_arg_bad,
6429         initialize_reference, add_conv_candidate,
6430         add_template_candidate_real, add_template_candidate): Ansify.
6432 2002-12-22  Nathan Sidwell  <nathan@codesourcery.com>
6434         PR c++/8572
6435         * cp-tree.h (grokoptypename): Add SCOPE parameter.
6436         * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
6437         if in a template scope.
6438         * parse.y (unoperator): Return the scope.
6439         (operator_name): Adjust grokoptypename call.
6441 2002-12-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6443         * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
6444         * decl.c (make_unbound_class_template): Adjust.  Check for tf_error.
6445         * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
6447 2002-12-20  Kazu Hirata  <kazu@cs.umass.edu>
6449         * ChangeLog: Fix a typo.
6450         * class.c: Fix comment typos.
6451         * cp-tree.h: Likewise.
6453 2002-12-18  Jason Merrill  <jason@redhat.com>
6455         Handle anonymous unions at the tree level.
6456         C++ ABI change: Mangle anonymous unions using the name of their
6457         first named field (by depth-first search).  Should not cause
6458         binary compatibility problems, though, as the compiler previously
6459         didn't emit anything for affected unions.
6460         * cp-tree.def (ALIAS_DECL): New tree code.
6461         * decl2.c (build_anon_union_vars): Build ALIAS_DECLs.  Return the
6462         first field, not the largest.
6463         (finish_anon_union): Don't mess with RTL.  Do set DECL_ASSEMBLER_NAME,
6464         push the decl, and write it out at namespace scope.
6465         * decl.c (lookup_name_real): See through an ALIAS_DECL.
6466         (pushdecl): Add namespace bindings for ALIAS_DECLs.
6467         * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
6468         of a decl which doesn't have one.
6469         * typeck.c (build_class_member_access_expr): Don't recurse if
6470         we already have the type we want.
6472 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6474         PR c++/8099
6475         * friend.c (make_friend_class): Allow partial specialization
6476         when declaration is not a template friend.
6478 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6480         PR c++/3663
6481         * pt.c (lookup_template_class): Copy TREE_PRIVATE and
6482         TREE_PROTECTED to created decl nodes.
6484 2002-12-18  Mark Mitchell  <mark@codesourcery.com>
6486         * class.c (build_base_field): Do not set DECL_PACKED on the
6487         FIELD_DECL.
6489 2002-12-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6491         * cp-tree.h (struct tree_srcloc): Use location_t.
6492         (SOURCE_LOCUS): New.
6493         (SRCLOC_FILE, SRCLOC_LINE): Adjust.
6495 2002-12-17  Jason Merrill  <jason@redhat.com>
6497         * decl.c (finish_function): Also complain about no return in
6498         templates.
6499         * semantics.c (finish_return_stmt): Also call check_return_expr in
6500         templates.
6501         * typeck.c (check_return_expr): In a template, just remember that we
6502         saw a return.
6504 2002-12-16  Jason Merrill  <jason@redhat.com>
6506         * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
6507         of the CALL_EXPR.
6509         * semantics.c (do_pushlevel): Call pushlevel after adding the
6510         SCOPE_STMT.
6511         (do_poplevel): Call poplevel before adding the SCOPE_STMT.
6512         * parse.y (function_body): Go back to using compstmt.
6513         * decl.c (pushdecl): Skip another level to get to the parms level.
6515         * call.c (build_new_method_call): Use is_dummy_object to determine
6516         whether or not to evaluate the object parameter to a static member
6517         function.
6519 2002-12-14  Jason Merrill  <jason@redhat.com>
6521         * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
6522         return slot for normal functions.  Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
6523         * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
6524         don't bother with an AGGR_INIT_EXPR.
6525         (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
6526         just generate a new decl normally.  Take return slot parm.
6527         * cp-tree.h: Adjust prototype.
6529 2002-12-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6531         PR C++/8031
6532         * cvt.c (convert_to_pointer_force): Don't try comparing against
6533         erronous type.
6535 2002-12-13  Geoffrey Keating  <geoffk@apple.com>
6537         * cp-tree.h: Have the multiple-include guards around
6538         the entire file.
6540 2002-12-10  David Edelsohn  <edelsohn@gnu.org>
6542         * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
6543         for SPEW_DEBUG.
6544         (snarf_method): Same.
6545         (snarf_defarg): Same.
6547 2002-12-10  Mark Mitchell  <mark@codesourcery.com>
6549         PR c++/8372
6550         * pt.c (tsubst_copy): Handle destructor names more correctly.
6552 2002-12-10  Matt Austern   <austern@apple.com>
6554         * cp-tree.h: get rid of needs_virtual_reinit bit.
6556 2002-12-09  Mark Mitchell  <mark@codesourcery.com>
6558         * NEWS: Document removal of in-class initialization extension for
6559         static data members of non-arithmetic, non-enumeration type.
6560         * decl.c (check_static_variable_definition): Do not allow that
6561         extension.
6562         * decl2.c (grokfield): Do not call digest_init when processing
6563         templates.
6565 2002-12-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6567         * error.c (dump_expr): Fix format specifier warning.
6569 2002-12-04  Geoffrey Keating  <geoffk@apple.com>
6571         * class.c (finish_struct_1): Correct comment.
6572         * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
6574 2002-12-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6576         PR C++/8799
6577         * error.c (dump_expr): Don't ever try to dump a non-existent
6578         expression.
6580 2002-12-03  Nathan Sidwell  <nathan@codesourcery.com>
6582         Implement covariant returns.
6583         * cp-tree.h (IS_AGGR_TYPE_2): Remove.
6584         (struct lang_decl_flags): Add this_thunk_p flag.
6585         Rename vcall_offset to virtual_offset.
6586         (struct lang_decl): Rename delta to fixed_offset.
6587         (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
6588         (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
6589         (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
6590         (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
6591         (make_thunk): Add this_adjusting arg.
6592         (finish_thunk): Declare.
6593         (mangle_thunk): Add this_adjusting arg.
6594         * class.c (get_vcall_index): Use base function for lookup.
6595         (update_vtable_entry_for_fn): Generate covariant thunk.
6596         (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
6597         (build_vtbl_initializer): Use base function for lookup.
6598         Finish covariant thunk here. Adjust thunk generation.
6599         * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
6600         Adjust thunk dumping.
6601         * mangle.c (mangle_call_offset): New function.
6602         (mangle_thunk): Adjust for covariant thunks.
6603         * method.c (make_thunk): Adjust. Do not set name here.
6604         (finish_thunk): New function. Set name here.
6605         (use_thunk): Generate covariant thunks too.
6606         (thunk_adjust): New function.
6607         * search.c (covariant_return_p): Remove. Fold into ...
6608         (check_final_overrider): ... here. Simplify.
6609         * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
6611 2002-12-03  Jason Merrill  <jason@redhat.com>
6613         PR c++/8674
6614         * call.c (build_over_call): Check specifically for TARGET_EXPR
6615         when eliding.
6617         PR c++/8461, c++/8625
6618         * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
6619         (cp_convert_parm_for_inlining): Remove.
6620         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
6621         Remove.
6622         * cp-tree.h (ADDR_IS_INVISIREF): Remove.
6623         * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
6625         * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
6626         an ambiguous conversion.
6628 2002-12-03  Mark Mitchell  <mark@codesourcery.com>
6630         PR c++/8688
6631         * decl.c (reshape_init): Handle erroneous initializers.
6633 2002-12-02  Mark Mitchell  <mark@codesourcery.com>
6635         PR c++/8720
6636         * spew.c (remove_last_token): Make sure that last_chunk is set
6637         correctly.
6639         PR c++/8615
6640         * error.c (dump_expr): Handle character constants with
6641         TREE_OVERFLOW set.
6643 2002-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6645         DR 180
6646         * decl.c (grokdeclarator): Require class-key for all friend class.
6647         Output the correct type and context in the error message.
6649 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
6651         PR c++/5919
6652         * pt.c (unify): Use variably_modified_type_p to test validity of
6653         template argument types.
6655         PR c++/8727
6656         * cp-tree.h (lang_type_class): Add typeinfo_var.
6657         (CLASSTYPE_TYPEINFO_VAR): New macro.
6658         * rtti.c (get_tinfo_decl): Use it.
6660         PR c++/8663
6661         * init.c (expand_member_init): Always get the main variant of a
6662         base class.
6664 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
6666         PR c++/8332
6667         PR c++/8493
6668         * decl.c (cxx_init_decl_processing): Use size_type_node, not
6669         c_size_type_node.
6670         * decl2.c (coerce_new_type): Likewise.
6671         * except.c (do_allocate_exception): Likewise.
6673 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
6675         * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
6676         dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
6677         lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
6678         repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
6679         typeck2.c: Include coretypes.h and tm.h.
6680         * Make-lang.in: Update dependencies.
6682 2002-11-30  Mark Mitchell  <mark@codesourcery.com>
6684         PR c++/8227
6685         * decl.c (layout_var_decl): Deal gracefully with erroneous types.
6686         (check_initializer): Validate the type of the initialized
6687         variable, even if the initializer is absent.
6688         * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
6690         PR c++/8214
6691         * typeck.c (convert_for_assignment): Do not use
6692         decl_constant_value on the operand.
6694         PR c++/8511
6695         * pt.c (instantiate_decl): Handle template friends defined outside
6696         of the class correctly.
6698 2002-11-29  Joe Buck <jbuck@synopsys.com>
6700         * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
6701         anonymous structs.
6703 2002-11-29  Mark Mitchell  <mark@codesourcery.com>
6705         * class.c (walk_subobject_offsets): Recur on binfos as well as on
6706         types.
6707         (layout_nonempty_base_or_field): Pass it a binfo when processing a
6708         base class.
6709         (layout_empty_base): Likewise.
6710         (build_base_field): Likewise.
6712 2002-11-27  Mark Mitchell  <mark@codesourcery.com>
6714         * class.c (build_base_field): Make sure we get the canonical base
6715         when descending through primary bases.
6717 2002-11-26  Geoffrey Keating  <geoffk@apple.com>
6719         * decl.c (check_initializer): Don't error on initialisation of
6720         a scalar with a brace-enclosed expression.
6722 2002-11-26  Nathan Sidwell  <nathan@codesourcery.com>
6724         * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
6725         (template_parms_equal): Remove prototype.
6726         * typeck.c (buuld_indirect_ref): Reformat.
6728 2002-11-25  Jason Merrill  <jason@redhat.com>
6730         * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
6731         and a DO_STMT.
6733 2002-11-25  Mark Mitchell  <mark@codesourcery.com>
6735         * tree.c (cp_build_qualified_type_real): Correct handling of
6736         array types.
6737         * class.c (walk_subobject_offsets): Fix thinko.
6738         (build_base_field): Record offsets of empty bases in primary
6739         virtual bases.
6740         (layout_class_type): Record offsets of empty bases in fields.
6742         * search.c (is_subobject_of_p_1): Fix thinko.
6743         (lookup_field_queue_p): Likewise.
6745 2002-11-24  Mark Mitchell  <mark@codesourcery.com>
6747         * class.c (layout_class_type): Reuse tail padding when laying out
6748         virtual bases.
6750 2002-11-22  Mark Mitchell  <mark@codesourcery.com>
6752         * rtti.c (qualifier_flags): Fix thinko.
6754 2002-11-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6756         Remove traditional C constructs 1/n.
6757         * cp-tree.h (init_method, set_mangled_name_for_decl,
6758         build_opfncall, hack_identifier, make_thunk, use_thunk,
6759         synthesize_method, implicitly_declare_fn,
6760         skip_artificial_parms_for, optimize_function, calls_setjmp_p,
6761         maybe_clone_body): Remove use of PARAMS.
6763         * method.c (do_build_assign_ref, do_build_copy_constructor,
6764         synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
6765         Likewise.
6766         (synthesize_method): Use 'bool' type and constants instead of
6767         'int'.
6768         (locate_copy): Likewise.
6769         (implicitly_declare_fn): Likewise.
6771         * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
6772         Remove old-style declaration.
6773         (maybe_clone_body): Use 'bool' type and constants.
6775 2002-11-21  Glen Nakamura  <glen@imodulo.com>
6777         PR c++/8342
6778         * typeck.c (get_member_function_from_ptrfunc): Make sure that a
6779         SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
6780         of the branches of a COND_EXPR.
6782 2002-11-19  Mark Mitchell  <mark@codesourcery.com>
6784         * pt.c (for_each_template_parm): Free allocated memory.
6785         * search.c (is_subobject_of_p_1): New function.
6786         (is_subobject_of_p): Avoid walking virtual bases multiple times.
6788 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
6790         * g++spec.c (lang_specific_spec_functions): New.
6792 2002-11-15  Kazu Hirata  <kazu@cs.umass.edu>
6794         * ChangeLog: Follow spelling conventions.
6795         * class.c: Likewise.
6796         * decl2.c: Likewise.
6798 2002-11-14  Zack Weinberg  <zack@codesourcery.com>
6800         * search.c (dfs_push_decls): Do not try to reorder elements
6801         3..n of method_vec if method_vec has only two elements.
6802         Reverse order of two tests to avoid accessing unallocated
6803         memory.
6805 2002-11-14  Mark Mitchell  <mark@codesourcery.com>
6807         * class.c (dfs_find_final_overrider): Adjust so that the most
6808         derived object is a binfo, rather than a class type.
6809         (find_final_overrider): Likewise.
6810         (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
6811         (add_vcall_offset): Likewise.
6813 2002-11-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6815         PR c++/8389
6816         * pt.c (instantiate_template): Push class scope for member
6817         functions.
6818         (get_mostly_instantiated_function_type): Likewise.  Don't call
6819         tsubst on context.  Remove CONTEXTP and TPARMSP parameters.
6820         * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
6821         * mangle.c (write_encoding, write_unqualified_name): Adjust.
6823 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
6825         * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
6826         vcall offfsets.  Split out ...
6827         (add_vcall_offset): ... new function.
6829         PR c++/8338
6830         * pt.c (for_each_template_parm): Add htab parameter.
6831         (process_partial_specialization): Adjust call.
6832         (push_template_decl_real): Likewise.
6833         (pair_fn_data): Add visited.
6834         (for_each_template_parm_r): Avoid walking duplicates more than
6835         once.
6836         (uses_template_parms): Adjust call to for_each_template_parm.
6838 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
6840         * class.c (add_implicitly_declared_members): Put implicitly
6841         declared functions at the end of TYPE_METHODs when -fabi-version
6842         is at least 2.
6844 2002-11-05  Geoffrey Keating  <geoffk@apple.com>
6846         * decl2.c (finish_file): Correct spelling.
6848 2002-11-03  Mark Mitchell  <mark@codesourcery.com>
6850         * call.c (build_special_member_call): Do not try to lookup VTTs by
6851         name.
6852         * class.c (vtbl_init_data): Add generate_vcall_entries.
6853         (get_vtable_decl): Do not look up virtual tables by name.
6854         (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
6855         (set_primary_base): Do not set CLASSTYPE_RTTI.
6856         (determine_primary_base): Likewise.
6857         (get_matching_virtual): Remove.
6858         (get_vcall_index): New function.
6859         (update_vtable_entry_for_fn): Do not try to use virtual thunks
6860         when they are not required.  Assign vcall indices at this point.
6861         (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
6862         Do update dynamic_classes.
6863         (build_vtt): Do not add VTTs to the symbol table.
6864         (build_ctor_vtbl_group): Likewise.
6865         (build_vtbl_initializer): Simplify handling of vcall indices.
6866         (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
6867         for the most derived class.
6868         (add_vcall_offset_vtbl_entries_1): But do not actually add them to
6869         the vtable.
6870         * cp-tree.h (dynamic_classes): New macro.
6871         (lang_type_class): Remove rtti.  Add vtables.  Add vcall_indices.
6872         (CLASSTYPE_RTTI): Remove.
6873         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
6874         (CLASSTYPE_VCALL_INDICES): New macro.
6875         (CLASSTYPE_VTABLES): Likewise.
6876         (BV_USE_VCALL_INDEX_P): Remove.
6877         (build_vtable_path): Remove.
6878         * decl2.c (finish_vtable_vardecl): Remove.
6879         (key_method): Remove #if 0'd code.
6880         (finish_vtable_vardecl): Rename to ...
6881         (maybe_emit_vtables): ... this.
6882         (finish_file): Use it.
6883         * search.c (look_for_overrides_here): Update comment.
6885 2002-11-01  Zack Weinberg  <zack@codesourcery.com>
6887         PR c/7353 redux
6888         * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
6890 2002-10-30  Jason Merrill  <jason@redhat.com>
6892         PR c++/8186
6893         * cp-tree.h (ADDR_IS_INVISIREF): New macro.
6894         * call.c (convert_for_arg_passing): Set it.
6895         * except.c (stabilize_throw_expr): Recurse for such an arg.
6897 2002-10-31  Mark Mitchell  <mark@codesourcery.com>
6899         * cp-tree.h (lang_decl_flags): Remove init_priority.
6900         (lang_decl): Add delta.
6901         (GLOBAL_INIT_PRIORITY): Remove.
6902         (THUNK_DELTA): Revise definition.
6903         * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
6904         * dump.c (cp_dump_tree): Don't dump it.
6906 2002-10-30  Mark Mitchell  <mark@codesourcery.com>
6908         PR c++/8160
6909         * typeck2.c (process_init_constructor): Call complete_array_type.
6911         PR c++/8149
6912         * decl.c (make_typename_type): Issue errors about invalid results.
6914 2002-10-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6916         Core issue 287, PR c++/7639
6917         * cp-tree.h (lang_type_class): Add decl_list field.
6918         (CLASSTYPE_DECL_LIST): New macro.
6919         (maybe_add_class_template_decl_list): Add declaration.
6920         * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
6921         (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
6922         (maybe_add_class_template_decl_list): New function.
6923         (add_implicitly_declared_members): Use it.
6924         * decl.c (maybe_process_template_type_declaration): Likewise.
6925         (pushtag): Likewise.
6926         * friend.c (add_friend): Likewise.
6927         (make_friend_class): Likewise.
6928         * semantics.c (finish_member_declaration): Likewise.
6929         (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
6930         * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
6931         to process members and friends in the order of declaration.
6933 2002-10-29  Mark Mitchell  <mark@codesourcery.com>
6935         PR c++/8287
6936         * decl.c (finish_destructor_body): Create the label to jump to
6937         when returning from a destructor here.
6938         (finish_function_body): Rather than here.
6940 2002-10-25  Zack Weinberg  <zack@codesourcery.com>
6942         PR c++/7266
6943         * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
6944         SCOPE_REF is not null before dereferencing it.
6946 2002-10-25  Mark Mitchell  <mark@codesourcery.com>
6948         * call.c (build_over_call): Use DECL_CONTEXT, not
6949         DECL_VIRTUAL_CONTEXT.
6950         * class.c (modify_vtable_entry): Don't mess with
6951         DECL_VIRTUAL_CONTEXT.
6952         (set_vindex): Remove.
6953         (set_primary_base): Remove vfuns_p parameter.
6954         (determine_primary_base): Likewise.
6955         (modify_all_vtables): Likewise.
6956         (layout_class_type): Likewise.  Adjust calls to other functions
6957         accordingly.
6958         (finish_struct_1): Adjust calls to modified functions.  Set
6959         DECL_VINDEX here.
6960         * cp-tree.h (lang_type_class): Remove vsize.
6961         (CLASSTYPE_VSIZE): Remove.
6962         (lang_decl): Remove thunks.
6963         (DECL_THUNKS): Adjust.
6964         (DECL_VIRTUAL_CONTEXT): Remove.
6965         (duplicate_decls): Don't copy it.
6966         * pt.c (build_template_decl): Don't set it.
6967         (tsubst_decl): Likewise.
6968         * typeck.c (expand_ptrmemfunc_cst): Don't use it.
6970         * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
6971         (build_vtable_entry): Remove.
6972         * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
6973         (lang_decl): Add thunks.
6974         (DECL_THUNKS): New macro.
6975         * decl.c (duplicate_decls): Copy it.
6976         * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
6977         * semantics.c (emit_associated_thunks): Simplify.
6979 2002-10-24  David Edelsohn  <edelsohn@gnu.org>
6981         PR c++/7228
6982         * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
6983         lang_type structure exists before accessing field.
6984         (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
6985         (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
6986         (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
6987         * class.c (check_field_decls): Use new macros.
6988         * typeck2.c (process_init_constructor): Remove redundant check for
6989         existence of lang_type structure.
6991 2002-10-24  Mark Mitchell  <mark@codesourcery.com>
6993         * class.c (end_of_base): New method.
6994         (end_of_class): Use it.  Check indirect virtual bases.
6996         * class.c (check_field_decls): Fix typo.
6998 2002-10-23  Mark Mitchell  <mark@codesourcery.com>
7000         PR c++/8067
7001         * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
7002         related variables.
7004         PR c++/7679
7005         * spew.c (next_token): Do not return an endless stream of
7006         END_OF_SAVED_INPUT tokens.
7007         (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
7008         the cached token stream.
7009         (snarf_defarg): Likewise.
7011 2002-10-23  Zack Weinberg  <zack@codesourcery.com>
7013         * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
7014         variably_modified_type_p.
7015         * cp-tree.h: Remove prototype of variably_modified_type_p.
7016         * tree.c (variably_modified_type_p): Remove; now implemented
7017         in language-independent code.
7019 2002-10-22  Mark Mitchell  <mark@codesourcery.com>
7021         PR c++/6579
7022         * spew.c (snarf_parenthesized_expression): New function.
7023         (snarf_block): Use it.
7025 2002-10-22  Richard Henderson  <rth@redhat.com>
7027         * method.c (use_thunk): Always compute vcall_value; assert that
7028         it is not zero.  Use can_output_mi_thunk; use output_mi_thunk
7029         for vcall thunks as well.
7031 2002-10-21  Mark Mitchell  <mark@codesourcery.com>
7033         * class.c (empty_base_at_nonzero_offset_p): New function.
7034         (layout_nonempty_base_or_field): Do not check for conflicts when
7035         laying out a virtual base using the GCC 3.2 ABI.
7036         (build_base_field): Correct checking for presence of empty classes
7037         at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
7039         * class.c (include_empty_classes): Use normalize_rli.
7040         (layout_class_type): Likewise.
7042         * decl.c (reshape_init): Tweak handling of character arrays.
7044         PR c++/8218
7045         * cp-tree.h (lang_type_class): Add contains_empty_class_p.
7046         (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
7047         * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
7048         (check_field_decls): Likewise.
7049         (layout_class_type): Likewise.
7050         (finish_struct_1): Initialize it.
7051         (walk_subobject_offsets): Use it to prune searches.
7053 2002-10-20  Mark Mitchell  <mark@codesourcery.com>
7055         * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
7056         * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
7057         TARGET_ASM_OUTPUT_MI_THUNK in comments.
7059 2002-10-18  Zack Weinberg  <zack@codesourcery.com>
7061         * decl.c (start_decl): Point users of the old initialized-
7062         typedef extension at __typeof__.
7064 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
7066         * Make-lang.in (method.o): Depend on TARGET_H.
7067         * method.c (target.h): Include it.
7068         (use_thunk): Use target hooks.  Use vcall thunks, if available.
7070 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
7072         * class.c (base_derived_from): Make sure return value is a bool.
7074 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
7076         * class.c (find_final_overrider_data_s): Remove overriding_fn and
7077         overriding_base.
7078         (dfs_base_derived_from): New function.
7079         (base_derived_from): Likewise.
7080         (dfs_find_final_overrider): Use base_derived_from.
7081         (find_final_overrider): Adjust.
7083 2002-10-18  Jason Merrill  <jason@redhat.com>
7085         PR c++/8080
7086         * semantics.c (finish_for_cond, finish_while_cond): Don't mess
7087         with condition decls in a template.
7089 2002-10-17  Nathan Sidwell  <nathan@codesourcery.com>
7091         * class.c (add_method): Compare template parms too.
7093 2002-10-17  Mark Mitchell  <mark@codesourcery.com>
7095         PR c++/7584
7096         * class.c (handle_using_decl): Allow the declaration used to be
7097         from an ambiguous base.
7099         * pt.c (convert_template_argument): Revert this change:
7100                 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
7101                 * pt.c (convert_template_argument): Do not fold non-type
7102                 template rguments when inside a template.
7104         * init.c (expand_default_init): Handle brace-enclosed initializers
7105         correctly.
7107 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
7109         * mangle.c (write_expression): Correct handling of enumeration
7110         constants.
7111         (write_template_arg): Likewise.
7112         * pt.c (convert_template_argument): Do not fold non-type template
7113         arguments when inside a template.
7115         PR c++/7478
7116         * cvt.c (convert_to_reference): Allow references as the incoming
7117         type.
7119 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
7121         PR c++/7524
7122         * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
7123         build_qualified_type.
7125 2002-10-15  Richard Henderson  <rth@redhat.com>
7127         * error.c (dump_expr): Use real_to_decimal directly, and with
7128         the new arguments.
7130 2002-10-15  Mark Mitchell  <mark@codesourcery.com>
7132         * decl.c (reshape_init): Fix typo.
7134         * cp-tree.h (operator_name_info_t): Add arity.
7135         * lex.c (init_operators): Initialize it.
7136         * mangle.c (write_conversion_operator_name): New function.
7137         (write_unqualified_name): Use it.
7138         (write_template_args): Accept template arguments as a TREE_LIST.
7139         (write_expression): Adjust handling of qualified names to match
7140         specification.
7142 2002-10-15  Jason Merrill  <jason@redhat.com>
7144         * call.c (call_builtin_trap): New fn.
7145         (convert_arg_to_ellipsis): Use it.  Downgrade error to warning.
7146         (build_call): Don't set current_function_returns_abnormally outside
7147         a function.
7149 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
7151         * class.c (check_field_decls): Remove empty_p parameter.  Instead,
7152         clear CLASSTYPE_EMPTY_P.
7153         (build_base_field): Likewise.
7154         (build_base_fields): Likewise.
7155         (check_bases_and_members): Likewise.
7156         (create_vtbl_ptr): Likewise.
7157         (layout_class_type): Likewise.  Ensure that empty classes have
7158         size zero when used as base classes in the 3.2 ABI.
7159         (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
7160         CLASSTYPE_NEARLY_EMPTY_P.  Adjust calls to avoid passing empty_p
7161         parameter.
7162         (is_empty_class): Correct definition when using post-3.2 ABI.
7163         * cp-tree.h (lang_type_class): Add empty_p.
7164         (CLASSTYPE_EMPTY_P): New macro.
7166 2002-10-12  Nathan Sidwell  <nathan@codesourcery.com>
7168         * init.c (build_delete): Do not apply save_expr for arrays.
7169         (build_vec_delete): Likewise.
7171 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
7173         * decl.c (layout_var_decl): Call layout_decl even for variables
7174         whose type is an array with unspecified bounds.
7176         PR c++/7176
7177         * lex.c (do_identifier): Add another option for the parsing
7178         parameter.
7179         * parse.y (do_id): Use it.
7181 2002-10-11  Gabriel Dos Reis  <gdr@integrable-solutions.net>
7183         PRs C++/6803, C++/7721 and C++/7803
7184         * decl.c (grokdeclarator): Gracefully handle template-name as
7185         decl-specifier.
7187 2002-10-11  Jason Molenda  <jmolenda@apple.com>
7189         * init.c (build_field_list): Provide uses_unions_p with a default
7190         value.
7192 2002-10-11  Mark Mitchell  <mark@codesourcery.com>
7194         PR c++/5661
7195         * cp-tree.h (variably_modified_type_p): New function.
7196         (grokdeclarator) Tighten check for variably modified types as
7197         fields.
7198         * pt.c (convert_template_argument): Do not allow variably modified
7199         types as template arguments.
7200         * tree.c (variably_modified_type_p): New function.
7202         * NEWS: Document removal of "new X = ..." extension.
7203         * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
7204         brace-enclosed initializers.
7205         * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
7206         (initialize_local_var): Remove declaration.
7207         (expand_static_init): Likewise.
7208         * decl.c (next_initializable_field): New function.
7209         (reshape_init): Likewise.
7210         (check_initializer): Use them.  Build dynamic initializer for
7211         aggregates here too.
7212         (initialize_local_var): Simplify, and incorporate cleanup
7213         insertion code as well.
7214         (destroy_local_var): Remove.
7215         (cp_finish_decl): Tidy.
7216         (expand_static_init): Fold checks for whether or not a variable
7217         needs initialization into this function.  Simplify.
7218         * decl2.c (do_static_initialization): Simplify.
7219         * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
7220         be done for us automatically.
7221         (expand_default_init): Handle brace-enclosed initializers
7222         correctly.
7223         (expand_aggr_init_1): Remove RTL-generation code.
7224         (build_vec_init): Remove "new X = ..." support.
7225         * parse.y (new_initializer): Likewise.
7226         * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
7227         brace-enclosed initializer.
7228         (create_pseudo_type_info): Likewise.
7229         * typeck2.c (store_init_value): Don't try to handle digest_init
7230         being called more than once.
7231         (digest_init): Tidy handling of brace-enclosed initializers.
7233 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7235         * decl.c (typename_hash): Use htab_hash_pointer.
7237 2002-10-10  Jim Wilson  <wilson@redhat.com>
7239         * decl.c (duplicate_decls): Don't call decl_attributes.
7241 2002-10-09  Zack Weinberg  <zack@codesourcery.com>
7243         PR c/7353
7244         * decl.c (start_decl): Unconditionally issue error for
7245         'typedef foo = bar'.
7246         (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
7247         (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
7249 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7251         * decl2.c (prune_vtable_vardecl): Delete unused function.
7253 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
7255         PR c++/7754
7256         * decl2.c (finish_anon_union): Do not expand anonymous unions when
7257         procesing template functions.
7258         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
7259         type. Call layout_decl.
7260         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
7262 2002-10-07  Richard Henderson  <rth@redhat.com>
7264         * decl2.c, pt.c: Revert c++/7754 fix.
7266 2002-10-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7268         PR c++/7804
7269         * error.c (dump_expr) [REAL_CST]: Output in decimal format.
7271 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
7273         PR c++/7931
7274         * pt.c (for_each_template_parm_r): Handle BASELINKs.
7276         PR c++/7754
7277         * decl2.c (finish_anon_union): Do not expand anonymous unions when
7278         procesing template functions.
7279         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
7280         type. Call layout_decl.
7281         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
7283 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
7285         PR c++/8006
7286         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
7287         template parameters.
7288         (globals): Add entity and need_abi_warning.
7289         (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
7290         CLASSTYPE_TEMPLATE_INFO.
7291         (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
7292         TYPE_TI_TEMPLATE.
7293         (write_prefix): Handle typename types correctly.
7294         (write_template_prefix): Handle template template parameters
7295         correctly.
7296         (start_mangling): Add entity parameter.
7297         (finish_mangling): Warn about names whose mangling will change.
7298         (mangle_decl_string): Adjust.
7299         (mangle_type_string): Likewise.
7300         (mangle_special_for_type): Likewise.
7301         (mangle_ctor_vtbl_for_type): Likewise.
7302         (mangle_thunk): Likewise.
7303         (mangle_guard_variable): Likewise.
7304         (mangle_ref_init_variable): Likewise.
7306 2002-10-02  Mark Mitchell  <mark@codesourcery.com>
7308         PR c++/7188.
7309         * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
7310         * cp-tree.h (emit_base_init): Rename to ....
7311         (emit_mem_initializers): ... this.
7312         (expand_member_init): Change prototype.
7313         * init.c (perform_member_init): Compute explicit, rather than
7314         requiring it as a parameter.
7315         (sort_member_init): Rename to ...
7316         (sort_mem_initializers): ... this.  Process bases and data members
7317         together.
7318         (sort_base_init): Remove.
7319         (emit_base_init): Rename to ...
7320         (emit_mem_initializers): ... this.
7321         (expand_aggr_vbase_init_1): Remove.
7322         (construct_virtual_bases): Rename to ...
7323         (construct_virtual_base): ... this.
7324         (expand_member_init): Rework handling of base initializers.
7325         * method.c (do_build_copy_constructor): Use
7326         finish_mem_initializers.
7327         * parse.y (member_init): Adjust calls to expand_member_init.
7328         * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
7329         (tsubst_initializer_list): Use expand_member_init.
7330         * semantics.c (finish_mem_intiailizers): Simplify.
7332 2002-10-02  Matt Austern  <austern@apple.com>
7333         * decl.c (walk_vtables_r): Fixed typo that caused result to
7334         never get a nonzero value.
7336 2002-10-02  Roger Sayle  <roger@eyesopen.com>
7338         PR optimization/6627
7339         * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
7340         from here, and move it to tree.h.
7341         * decl.c (cxx_init_decl_processing): If storing the vbit
7342         in function pointers, ensure that force_align_functions_log
7343         is atleast one.
7345 2002-10-02  Matt Austern  <austern@apple.com>
7347         * class.c (check_field_decls): Changed warning about const member
7348         variables so that it doesn't get issued for a class aggregate.
7350 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
7352         * decl.c (cp_finish_decl): Make sure array types are laid out,
7353         even if the array bounds are unknown.
7355 2002-10-01  Steve Ellcey  <sje@cup.hp.com>
7357         * class.c (build_vtbl_initializer): Change build_c_cast
7358         to build1.
7360 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
7362         * decl.c (cp_finish_decl): Make sure array types are laid out,
7363         even if the array bounds are unknown.
7365         * decl.c (cp_finish_decl): Correct check for dynamic
7366         initialization of thread-local storage.
7368 2002-09-30  Nathan Sidwell  <nathan@codesourcery.com>
7370         * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
7371         overloaded.
7373 2002-09-30  Steve Ellcey  <sje@cup.hp.com>
7375         * class.c (build_vtbl_initializer): Add cast.
7376         (add_vcall_offset_vtbl_entries_1):
7377         Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
7379 2002-09-30  Mark Mitchell  <mark@codesourcery.com>
7381         * class.c (walk_subobject_offsets): Correct the calculation of
7382         offsets for virtual bases.  Correct the counting of array
7383         elements.
7384         (layout_nonempty_base_or_field): Simplify.  Correct the
7385         calculation of offsets to be propagated through the binfo
7386         hierarchy.
7387         (build_base_field): Avoid creating a FIELD_DECL for empty bases.
7388         Add the FIELD_DECL to TYPE_FIELDS.
7389         (build_base_fields): Adjust accordingly.
7390         (layout_virtual_bases): Use build_base_field.
7391         (end_of_class): Return a tree, not an integer.
7392         (warn_about_ambiguous_direct_bases): Rename to ...
7393         (warn_about_ambiguous_bases): ... this.
7394         (include_empty_classes): New function.
7395         (layout_class_type): Create an alternative version of the type to
7396         be used when as a base class type.  Do not call
7397         finish_record_layout until we are done laying out the class.
7398         * cp-tree.h (lang_type_class): Remove size, size_unit.  Add
7399         as_base.
7400         (CLASSTYPE_SIZE): Reimplement.
7401         (CLASSTYPE_SIZE_UNIT): Likewise.
7402         (CLASSTYPE_ALIGN): Likweise.
7403         (CLASSTYPE_USER_ALIGN): Likewise.
7404         (CLASSTYPE_AS_BASE): New macro.
7405         (DECL_INITIALIZED_P): Likewise.
7406         (extract_init): Remove prototype.
7407         (build_forced_zero_init): Rename to ...
7408         (build_zero_init): ... this.
7409         (force_store_init_value): Remove.
7410         * decl.c (obscure_complex_init): Remove.
7411         (duplicate_decls): Copy DECL_INITIALIZED_P.
7412         (check_initializer): Do not leave junk in DECL_INITIAL.
7413         (cp_finish_decl): Handle zero-initialization of entities with
7414         static storage duration.
7415         * expr.c (extract_init): Remove.
7416         * init.c (build_forced_zero_init): Remove.
7417         (build_zero_init): New function.
7418         (build_default_init): Use it.
7419         (build_field_list): Skip FIELD_DECLs for base subobjects.
7420         (push_base_cleanups): Likewise.
7421         * method.c (do_build_assign_ref): Likewise.
7422         (synthesize_exception_spec): Likewise.
7423         * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
7424         (regenerate_decl_from_template): To not set DECL_INITIAL for a
7425         static data member whose initialization took place in its class.
7426         (instantiate_decl): Do not pass an initializer to cp_finish_decl
7427         in that situation.
7428         * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
7429         (dfs_unuse_fields): Likewise.
7430         * tree.c (pod_type_p): Handle error_mark_node.
7431         (zero_init_p): Likewise.
7432         * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
7433         subobjects.
7434         * typeck2.c (store_init_value): Remove #if 0'd code.
7435         (force_store_init_value): Remove.
7436         (process_init_constructor): Use build_zero_init.
7438 2002-09-29  Nathan Sidwell  <nathan@codesourcery.com>
7440         PR c++/7788
7441         * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
7443 2002-09-29  Kazu Hirata  <kazu@cs.umass.edu>
7445         * cp-tree.h: Fix comment typos.
7446         * decl.c: Likewise.
7447         * pt.c: Likewise.
7449 2002-09-25  Mark Mitchell  <mark@codesourcery.com>
7451         * cp/class.c (contains_empty_class_p): New method.
7452         (walk_subobject_offsets): Correct computation of field offset.
7453         (layout_empty_base): Correct placement of emtpy base classes.
7454         (layout_class_type): Warn about ABI changes.
7456 2002-09-23  Mark Mitchell  <mark@codesourcery.com>
7458         * cp/class.c (layout_virtual_bases): Do not round the size of the
7459         type to a multiple of the alignment before laying out virtual bases.
7460         (layout_class_type): Correct handling of bit-fields that are wider
7461         than their type inside unions.  Round the size of the type to a
7462         even number of bytes when computing the size without virtual
7463         bases.
7464         * cp/cp-tree.h (abi_version_at_least): New macro.
7466 2002-09-21  Kazu Hirata  <kazu@cs.umass.edu>
7468         * ChangeLog: Follow spelling conventions.
7469         * ChangeLog.2: Likewise.
7470         * call.c: Likewise.
7471         * class.c: Likewise.
7472         * cp-tree.h: Likewise.
7473         * cvt.c: Likewise.
7474         * decl.c: Likewise.
7475         * decl2.c: Likewise.
7476         * except.c: Likewise.
7477         * friend.c: Likewise.
7478         * g++spec.c: Likewise.
7479         * init.c: Likewise.
7480         * lex.c: Likewise.
7481         * mangle.c: Likewise.
7482         * method.c: Likewise.
7483         * operators.def: Likewise.
7484         * optimize.c: Likewise.
7485         * pt.c: Likewise.
7486         * rtti.c: Likewise.
7487         * search.c: Likewise.
7488         * semantics.c: Likewise.
7489         * spew.c: Likewise.
7490         * tree.c: Likewise.
7491         * typeck.c: Likewise.
7493 2002-09-18  Devang Patel  <dpatel@apple.com>
7495         * cp/cp-tree.h: New prototype for walk_vtabls().
7496         * cp/decl.c (walk_vtables_r): New function.
7497         (struct cp_binding_level): Add new members, namespaces,
7498         names_size and vtables.
7499         (add_decl_to_level): Add decl in namespaces or vtables
7500         chain, if conditions match.
7501         (walk_vtables): New function.
7502         (walk_namespaces_r): Travers separate namespace chain
7503         for namespace decls.
7504         (wrapup_globals_for_namespace): Use names_size instead
7505         of list_length().
7506         * cp/decl2.c (finish_file): Use walk_vtables() instead of
7507         walk_globals() to walk vtable decls.
7509 2002-09-18  Nathan Sidwell  <nathan@codesourcery.com>
7511         * decl.c (grokdeclarator): Use assert, not internal_error. Don't
7512         ICE with invalid pointers & references.
7514 2002-09-17  Zack Weinberg  <zack@codesourcery.com>
7516         * Make-lang.in: Remove all references to the demangler.
7517         * cxxfilt.c: Moved to binutils.
7519 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
7521         PR c++/7718
7522         * pt.c (tsubst_decl): Remove assert.
7524         Remove DR 295 implementation.
7525         * pt.c (check_cv_quals_for_unify): Disable function & method cases.
7526         * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
7527         about ignoring volatile qualifiers.
7529         * search.c (lookup_member): Correct documentation.
7531 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
7533         * cp-tree.h (union lang_tree_node): Add chain_next option.
7535 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
7537         * parse.y (parse_finish_call_expr): Check lookup_member result.
7539         PR c++/7015
7540         * semantic.c (finish_asm_stmt): Fix operand/output_operands
7541         thinko.
7542         * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
7544 2002-09-15  Nathan Sidwell  <nathan@codesourcery.com>
7546         PR c++/7919
7547         * call.c (build_over_call): Convert this pointer for fns found by
7548         using decls.
7550 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
7552         * ChangeLog: Follow spelling conventions.
7553         * ChangeLog.1: Likewise.
7555 2002-09-14  Nathan Sidwell  <nathan@codesourcery.com>
7557         PR c++/7768
7558         * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
7560 2002-09-14  Kazu Hirata  <kazu@cs.umass.edu>
7562         * error.c: Fix comment formatting.
7563         * except.c: Likewise.
7564         * expr.c: Likewise.
7565         * friend.c: Likewise.
7566         * g++spec.c: Likewise.
7567         * init.c: Likewise.
7568         * lex.c: Likewise.
7569         * mangle.c: Likewise.
7570         * method.c: Likewise.
7571         * optimize.c: Likewise.
7572         * pt.c: Likewise.
7573         * rtti.c: Likewise.
7574         * search.c: Likewise.
7575         * semantics.c: Likewise.
7576         * spew.c: Likewise.
7577         * tree.c: Likewise.
7578         * typeck.c: Likewise.
7579         * typeck2.c: Likewise.
7581 2002-09-13  Matt Austern  <austern@apple.com>
7583         PR C++/7828
7584         * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
7585         * cp/call.c: Change call-by-const-reference mechanism to use
7586         non_cast_lvalue_p when deciding whether the create a temporary.
7587         We need a temporary when passing, e.g. (long) x by const ref.
7589 2002-09-13  Nathan Sidwell  <nathan@codesourcery.com>
7591         * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
7593 2002-09-13  Kazu Hirata  <kazu@cs.umass.edu>
7595         * decl.c: Fix comment formatting.
7596         * decl2.c: Likewise.
7598 2002-09-12  Kazu Hirata  <kazu@cs.umass.edu>
7600         * call.c: Fix comment formatting.
7601         * class.c: Likewise.
7602         * cp-lang.c: Likewise.
7603         * cp-tree.h: Likewise.
7604         * cvt.c: Likewise.
7606 2002-09-11  Zack Weinberg  <zack@codesourcery.com>
7608         * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
7609         and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
7610         * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
7611         minor adjustments (use version_string, eliminate yet another
7612         duplicate of xmalloc)
7614 2002-09-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7616         * cp-tree.h (require_complete_eh_spec_types): Add prototype.
7618 2002-09-05  Jason Merrill  <jason@redhat.com>
7620         * typeck2.c (add_exception_specifier): Only pedwarn for an
7621         incomplete type.
7622         (require_complete_eh_spec_types): New fn.
7623         (cxx_incomplete_type_diagnostic): Also support pedwarning.
7624         * typeck.c (complete_type_or_diagnostic): Likewise.
7625         * call.c (build_call): Call require_complete_eh_spec_types.
7626         * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
7627         on an incomplete type.
7629 2002-09-04  Jakub Jelinek  <jakub@redhat.com>
7631         * decl.c (start_cleanup_fn): Clear interface_only before
7632         start_function, restore it afterwards.
7634 2002-09-02  Nathan Sidwell  <nathan@codesourcery.com>
7636         * cp-tree.h (finish_builtin_type): Remove.
7637         * decl2.c (finish_builtin_type): Move to common code.
7638         * decl.c (build_ptrmemfunc_type): Adjust.
7639         * rtti.c (create_pseudo_type_info): Adjust.
7640         (create_tinfo_types): Adjust.
7642 2002-08-31  Jason Merrill  <jason@redhat.com>
7644         * cp-lang.c (cp_expr_size): Allow initialization from a
7645         CONSTRUCTOR.
7647 2002-08-30  Richard Henderson  <rth@redhat.com>
7649         PR opt/7515
7650         * tree.c: Include target.h.
7651         (cp_cannot_inline_tree_fn): Don't auto-inline functions that
7652         don't bind locally.
7653         * Makefile.in (tree.o): Update.
7655 2002-08-27  Mark Mitchell  <mark@codesourcery.com>
7657         * class.c (layout_virtual_bases): Warn about bugs in G++ that
7658         result in incorrect object layouts.
7659         (layout_class_type): Likewise.
7661 2002-08-24  Matt Austern  <austern@apple.com>
7663         * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
7664         are allowable.
7665         (real_lvalue_p): Update caller.
7666         (lvalue_p): Ditto.
7667         (non_cast_lvalue_or_else): New.
7668         * tree.h: Declare it.
7669         * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
7671 2002-08-22  Mark Mitchell  <mark@codesourcery.com>
7673         * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
7674         and COND_EXPR specially; fix error message output.
7676 2002-08-22  Jason Merrill  <jason@redhat.com>
7678         * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
7679         * semantics.c (nullify_returns_r): Likewise.
7681 2002-08-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
7683         Fix PR/7621
7684         * typeck.c (finish_class_member_access_expr): Diagnose cases where
7685         name lookup finds nothing.
7687 2002-08-15  Jason Merrill  <jason@redhat.com>
7689         * semantics.c (finish_then_clause): Remove redundant assignment.
7690         (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
7691         extra binding level outside the if/switch statement.
7692         (finish_while_cond, finish_for_cond): Rewrite complex condition
7693         into the loop body.
7695 2002-08-15  Alexandre Oliva  <aoliva@redhat.com>
7697         * parse.y (sizeof, alignof, typeof): New non-terminals to
7698         increment skip_evaluation.  Replace terminals with them and
7699         decrement skip_evaluation at the end of rules using them.
7700         * decl2.c (mark_used): Don't assemble_external if
7701         skipping evaluation.
7703 2002-08-15  Gabriel Dos Reis  <gdr@nerim.net>
7705         Fix PR/7504
7706         * parse.y (parse_finish_call_expr): Handle incomplete
7707         type used to name a scope.
7709 2002-08-15  Nathan Sidwell  <nathan@codesourcery.com>
7711         PR c++/7598
7712         * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
7713         regression caused by my 2002-08-08 patch.
7715 2002-08-13  Mark Mitchell  <mark@codesourcery.com>
7717         * decl.c (pushdecl_class_level): Honor requests to bind names to
7718         OVERLOADs.
7720 2002-08-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7722         * decl2.c (build_call_from_tree): Fix uninitialized variable.
7723         * parse.y (parse_finish_call_expr): Likewise.
7724         * repo.c (old_args, old_dir, old_main): Const-ify.
7726 2002-08-11  Gabriel Dos Reis  <gdr@nerim.net>
7728         * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE
7729         DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
7730         * optimize.c (maybe_clone_body): Likewise.
7731         * pt.c (tsubst_enum): Likewise.
7732         (lookup_template_class): Likewise.
7733         * tree.c (cp_copy_res_decl_for_inlining): Likewise.
7735 2002-08-10  Neil Booth  <neil@daikokuya.co.uk>
7737         * lang-specs.h: Remove -ansi.
7739 2002-08-10  Nathan Sidwell  <nathan@codesourcery.com>
7741         * tree.c (maybe_dummy_object): Replace // with /* */
7743 2002-08-09  Mark Mitchell  <mark@codesourcery.com>
7745         * call.c (standard_conversion): Use build_ptrmem_type.
7746         * cp-tree.h (build_ptrmem_type): New function.
7747         (adjust_result_of_qualified_name_lookup): Likewise.
7748         * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
7749         static data members.
7750         (build_ptrmem_type): New function.
7751         (grokdeclarator): Do not use build_offset_type when encountering a
7752         qualified name.
7753         * parse.y (parse_finish_call_expr): Use
7754         adjust_result_of_qualified_name_lookup.
7755         * search.c (adjust_result_of_qualified_name_lookup): New function.
7756         * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
7757         accessing OFFSET_TYPEs directly.
7759 2002-08-08  Mike Stump  <mrs@apple.com>
7761         * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
7762         (type_decays_to): Likewise.
7763         * class.c (find_final_overrider): Likewise.
7764         (maybe_note_name_used_in_class): Likewise.
7765         * decl.c (current_tmpl_spec_kind): Likewise.
7766         (add_binding): Likewise.
7767         (push_class_binding): Likewise.
7768         (duplicate_decls): Likewise.
7769         (layout_var_decl): Likewise.
7770         (grokfndecl): Likewise.
7771         (grokdeclarator): Likewise.
7772         (check_default_argument): Likewise.
7773         * decl2.c (handle_class_head): Likewise.
7774         * error.c (dump_template_decl): Likewise.
7775         * init.c (build_offset_ref): Likewise.
7776         * pt.c (check_specialization_scope): Likewise.
7777         (determine_specialization): Likewise.
7778         (check_explicit_specialization): Likewise.
7779         (maybe_check_template_type): Likewise.
7780         (process_partial_specialization): Likewise.
7781         (check_default_tmpl_args): Likewise.
7782         (push_template_decl_real): Likewise.
7783         (convert_template_argument): Likewise.
7784         (try_class_unification): Likewise.
7785         (get_bindings_real): Likewise.
7786         (do_decl_instantiation): Likewise.
7787         * semantics.c (begin_function_definition): Likewise.
7788         (finish_member_declaration): Likewise.
7789         (check_multiple_declarators): Likewise.
7790         * typeck.c (comp_array_types): Likewise.
7791         (comptypes): Likewise.
7792         (expr_sizeof): Likewise.
7793         (build_binary_op): Likewise.
7794         (dubious_conversion_warnings): Likewise.
7795         (check_return_expr): Likewise.
7797 2002-08-08  Mark Mitchell  <mark@codesourcery.com>
7799         * typeck.c (build_class_member_access_expr): Do not return
7800         error_mark_node when no error has occurred.
7802 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
7804         * typeck.c (build_component_addr): Remove.
7805         (build_unary_op): Just check it's not a bitfield, and then build
7806         an ADDR_EXPR.
7808 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
7810         * class.c (convert_to_base): Correct check for error_mark_node.
7811         (create_vtable_ptr): Remove unused VFUNS_P parm.
7813 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
7815         * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
7817 2002-08-07  Mark Mitchell  <mark@codesourcery.com>
7819         Rework build_component_ref.
7820         * call.c (build_vfield_ref): Do not go through build_component_ref.
7821         (build_field_call): Use build_class_member_access_expr.
7822         (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
7823         (build_object_call): Likewise.
7824         * class.c (convert_to_base): New function.
7825         (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
7826         (instantiate_type): Handle BASELINKs.
7827         * cp-tree.def (BASELINK): New tree code.
7828         * cp-tree.h (BASELINK_P): Reimplement.
7829         (SET_BASELINK_P): Remove.
7830         (BASELINK_BINFO): Reimplement.
7831         (BASELINK_FUNCTIONS): Likewise.
7832         (BASELINK_ACCESS_BINFO): Likewise.
7833         (BASELINK_OPTYPE): Likewise.
7834         (convert_to_base): New function.
7835         (name_p): Likewise.
7836         (build_object_ref): Remove.
7837         (build_component_ref_1): Likewise.
7838         (build_component_ref): Likewise.
7839         (build_x_component_ref): Likewise.
7840         (build_class_member_access_expr): New function.
7841         (finish_class_member_access_expr): Likewise.
7842         (build_ptrmemfunc_access_expr): Likewise.
7843         * decl.c (grokdeclarator): Handle BASELINKs.
7844         * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
7845         finish_class_member_access_expr.
7846         (arg_assoc): Handle BASELINKs.
7847         (do_class_using_decl): Likewise.
7848         * error.c (dump_decl): Likewise.
7849         (dump_expr): Use build_ptrmemfunc_access_expr.
7850         * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
7851         destructors.
7852         (build_throw): Use BASELINK_FUNCTIONS.
7853         * init.c (perform_member_init): Use
7854         build_class_member_access_expr.
7855         (build_offset_ref): Handle BASELINKs.  Use
7856         build_class_member_access_expr.
7857         * method.c (hack_identifier): Likewise.
7858         * parse.y (do_id): Use BASELINK, not TREE_LIST.
7859         (primary): Remove uses of build_object_ref.
7860         * pt.c (lookup_template_function): Handle BASELINKs.
7861         (resolve_overloaded_unification): Likewise.
7862         * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
7863         (lookup_field): Use BASELINK, not TREE_LIST.
7864         (lookup_fnfiels): Likewise.
7865         (setup_class_bindings): Likewise.
7866         * semantics.c (finish_object_call_expr): Do not use
7867         build_method_call when we already know what function is being
7868         called.
7869         * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
7870         * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
7871         TREE_CHAIN.
7872         (name_p): New function.
7873         * typeck.c (build_object_ref): Remove.
7874         (build_component_ref_1): Likewise.
7875         (build_x_component_ref): Likewise.
7876         (build_class_member_access_expr): New function.
7877         (finish_class_member_access_expr): Likewise.
7878         (build_ptrmemfunc_access_expr): Likewise.
7879         (get_member_function_from_ptrfunc): Use
7880         build_ptrmemfunc_access_expr.
7881         (build_binary_op): Likewise.
7882         (build_unary_op): Likewise.
7883         (build_ptrmemfunc): Likewise.
7884         (pfn_from_ptrmemfunc): Likewise.
7885         * typeck2.c (build_m_component_ref): Adjust comment.
7887 2002-08-07  Neil Booth  <neil@daikokuya.co.uk>
7889         * Make-lang.in (CXX_C_OBJS): Update.
7890         * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
7891         * cp-tree.h (cxx_decode_option): Remove.
7892         * decl2.c (compare_options, lang_f_options, unsupported_options,
7893         cxx_decode_option): Remove.
7895 2002-08-06  Gabriel Dos Reis  <gdr@nerim.net>
7897         * typeck.c (build_x_unary_op): Handle pointer-to-member.
7899 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
7901         * class.c: Don't include obstack.h.
7902         (popclass):
7903         * decl2.c: Delete bogus comment.
7904         * error.c: Don't include obstack.h.
7905         * except.c: Likewise.
7906         (dump_type): Correct comment.
7907         * method.c: Don't include obstack.h.
7908         * tree.c: Likewise.
7910 2002-08-04  Gabriel Dos Reis  <gdr@nerim.net>
7912         Fix PR/2213
7913         * cvt.c (cp_convert_to_pointer): Reject conversions from integral
7914         expressions to pointer-to-data-member of pointer-to-member-functions.
7916 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
7918         * cvt.c (ocp_convert): Delete obsolete code.
7919         * parse.y (permanent_obstack): Delete declaration.
7920         * pt.c (permanent_obstack): Delete declaration.
7921         * repo.c (permanent_obstack): Delete declaration.
7922         (open_repo_file): Use xmalloc instead of permanent_obstack.
7923         (init_repo): Use xstrdup instead of permanent_obstack.
7925 2002-08-04  Nathan Sidwell  <nathan@codesourcery.com>
7927         * cp-tree.h (VF_DERIVED_VALUE): Remove.
7928         * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
7930 2002-08-03  Nathan Sidwell  <nathan@codesourcery.com>
7932         PR 7470.
7933         C++ ABI change - vfunc ordering.
7934         * class.c (add_virtual_function): Remove.
7935         (dfs_modify_all_vtables): Take list of all declared
7936         virtuals. Assign all that are not in primary base.
7937         (check_for_override): Adjust comments.
7938         (create_vtable_ptr): Take single list of virtuals. Build chain
7939         of declared virtuals here.
7940         (layout_class_type): Take single list of virtuals. Adjust.
7941         (finish_struct_1): Keep virtuals on single list. Adjust.
7943 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
7945         * init.c (build_member_call): Use build_new_method_call, not
7946         build_method_call.
7948 2002-08-02  Krister Walfridsson  <cato@df.lth.se>
7950         * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
7952 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
7954         * call.c (build_method_call): Issue a more helpful error message
7955         about ambiguous method names.
7957 2002-08-02  Nathan Sidwell  <nathan@codesourcery.com>
7959         * tree.c (build_shared_int_cst): Make cache file scope, and
7960         GTY it.
7962 2002-08-02  Jason Merrill  <jason@redhat.com>
7964         * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
7965         (cp_expr_size): New fn.
7966         * call.c (build_over_call): Lose empty class hackery.
7967         (convert_arg_to_ellipsis): Promote non-POD warning to error.
7968         * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
7970         * semantics.c (expand_body): Do tree optimization in the function
7971         context, too.
7973 2002-08-01  Neil Booth  <neil@daikokuya.co.uk>
7975         * cp-tree.h: Move all warning and flag declarations to c-common.h.
7976         * decl.c: Move all warning and flag variables to c-common.c.
7977         * decl2.c: Move all warning and flag variables to c-common.c.
7978         * lex.c (flag_digraphs): Remove.
7979         (warn_traditional): Now in c-common.c.
7981 2002-07-31  Mark Mitchell  <mark@codesourcery.com>
7983         * call.c (build_field_call): Do not look up the field by name.
7984         (build_method_call): Simplify.
7985         (struct z_candidate): Add access_path and conversion_path.  Remove
7986         basetype_path.
7987         (convert_class_to_reference): Adjust use of
7988         add_function_candidate.
7989         (add_candidate): Add conversion_path argument.
7990         (add_function_candidate): Use it.
7991         (add_conv_dndidate): Likewise.
7992         (build_builtin_candidate): Likewise.
7993         (add_template_candidate_real): Add conversion_path argument.
7994         (add_template_conv_candidate): Likewise.
7995         (add_template_candidate): Likewise.
7996         (build_user_type_conversion_1): Use it.
7997         (build_new_function_call): Remove name lookup code.  Adjust use of
7998         add_template_candidate and add_function_candidate.
7999         (build_new_op): Likewise.
8000         (convert_like_real): Use build_special_member_call.
8001         (build_over_call): Use cand->conversion_path.
8002         (build_special_member_call): New method.
8003         (build_new_method_call): Remove name lookup code.
8004         * cp-tree.def (OFFSET_REF): Update documentation.
8005         (TEMPLATE_ID_EXPR): Likewise.
8006         * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
8007         (BASELINK_OPTYPE): Likewise.
8008         (build_new_method_call): Adjust prototype.
8009         (build_special_member_call): New method.
8010         (build_baselink): New method.
8011         (build_offset_ref_call_from_tree): Likewise.
8012         (build_call_from_tree): Likewise.
8013         (finish_qualified_call_expr): Remove.
8014         (finish_call_expr): Adjust prototype.
8015         (build_x_function_call): Remove.
8016         * cvt.c (ocp_convert): Use build_special_member_call.
8017         * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
8018         (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
8019         CALL_EXPR.
8020         (build_offset_ref_call_from_tree): New function.
8021         (build_call_from_tree): Likewise.
8022         * init.c (expand_cleanup): Use build_special_member_call.
8023         (expand_default_init): Likewise.
8024         (build_member_call): Use finish_call_expr.
8025         (build_new_1): Use build_special_member_call.
8026         (push_base_cleanups): Likewise.
8027         * method.c (do_build_assign_ref): Likewise.
8028         * parse.y (template_id): Do not pass a COMPONENT_REF to
8029         lookup_template_function.
8030         (primary): Use parse_finish_call_epxr, not finish_call_expr.
8031         (parse_finish_call_expr): New function.
8032         * pt.c (lookup_template_function): Add assertions.
8033         * search.c (lookup_base): Allow T to be a binfo.
8034         (build_baselink): New function.
8035         (lookup_member): Use it.
8036         * semantics.c (finish_call_expr): Do not do name lookup.
8037         (finish_object_call_expr): Remove #if 0'd code.
8038         (finish_qualified_call_expr): Remove.
8039         * typeck.c (build_x_function_call): Remove.
8040         (build_static_case): Use build_special_member_call.
8041         * typeck2.c (build_functional_cast): Likewise.
8043 2002-07-30  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
8045         * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
8047 2002-07-30  Gabriel Dos Reis  <gdr@nerim.net>
8049         * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
8051 2002-07-30  Nathan Sidwell  <nathan@codesourcery.com>
8053         * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
8054         documentation.
8056 2002-07-29  Alan Modra  <amodra@bigpond.net.au>
8058         * cp-tree.h: Comment typo fix.
8060 2002-07-29  Richard Earnshaw  <rearnsha@arm.com>
8062         * spew.c (space_for_token): Allocate zeroed memory for a new token
8063         chunk.
8065 2002-07-27  Roger Sayle  <roger@eyesopen.com>
8067         * decl.c (builtin_function_1): No need to explicitly mark
8068         BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
8070 2002-07-27  Roger Sayle  <roger@eyesopen.com>
8072         * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
8074 2002-07-26  Jason Merrill  <jason@redhat.com>
8076         * call.c (build_over_call): Likewise.
8077         (cp_convert_parm_for_inlining): New fn.
8078         (convert_for_arg_passing): New fn.
8079         (convert_default_arg, build_over_call): Use it.
8080         (type_passed_as): New fn.
8081         * pt.c (tsubst_decl): Use it.
8082         * decl2.c (cp_build_parm_decl): New fn.
8083         (build_artificial_parm): Use it.
8084         (start_static_storage_duration_function): Likewise.
8085         * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
8086         (grokparms): Don't mess with DECL_ARG_TYPE.
8087         * typeck.c (convert_arguments): Use convert_for_arg_passing.
8088         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
8089         Define.
8090         * cp-tree.h: Declare new fns.
8092 2002-07-26  Neil Booth  <neil@daikokuya.co.uk>
8094         * cp-tree.h (flag_operator_names): Remove.
8095         * decl2.c (flag_operator_names): Remove.
8096         (lang_f_options): Remove operator-names.
8097         * lex.c (D_OPNAME): Remove.
8098         (reswords): Remove operator names.
8099         (rid_to_yy): Remove operator names.
8100         (init_reswords): No need to handle D_OPNAME.
8101         * spew.c (read_process_identifier): There are no operator
8102         names.
8104 2002-07-26  Jason Merrill  <jason@redhat.com>
8106         * dump.c (cp_dump_tree): Call c_dump_tree.
8107         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
8109 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
8111         * error.c (print_whitespace): Remove.
8112         * g++spec.c (LIBUNWIND): Move.
8113         * mangle.c (mangled_position, write_signed_number): Remove.
8115 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
8117         * decl2.c (cxx_decode_option): Similarly.
8119 2002-07-25  Gabriel Dos Reis  <gdr@nerim.net>
8121         * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
8122         (cxx_sizeof_or_alignof_type): Take a third argument.
8123         (cxx_sizeof): Adjust definition.
8124         (cxx_alignof): Likewise.
8125         * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
8126         * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
8127         complaining.
8128         (c_sizeof_nowarn): Remove definition.
8129         (build_unary_op): Use cxx_sizeof_nowarn.
8131 2002-07-24  Geoffrey Keating  <geoffk@redhat.com>
8133         * tree.c (cp_build_qualified_type_real): When copying
8134         pointer-to-method types, unshare the record that holds
8135         the cached pointer-to-member-function type.
8137 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
8139         * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
8141 2002-07-23  Gabriel Dos Reis  <gdr@nerim.net>
8143         Fix PR/7363:
8144         * typeck.c (cxx_sizeof_or_alignof_type): New function.
8145         (c_sizeof): Remove definition.
8146         (expr_sizeof): Use cxx_sizeof.
8147         * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
8148         * decl.c (finish_destructor_body): Use cxx_sizeof.
8149         * semantics.c (finish_alignof): Likewise.
8150         (finish_alignof): Use cxx_alignof.
8151         * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
8152         (cxx_sizeof_or_alignof_type): Declare.
8153         (my_friendly_assert): Move to ../c-common.h.
8155 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
8157         * class.c, method.c, pt.c, search.c: Don't define obstack macros.
8159 2002-07-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8161         PR c++/7347, c++/7348
8162         * cp-tree.h (tsubst_flags_t): Add tf_parsing.
8163         * decl.c (make_typename_type): Use it.
8164         (make_unbound_class_template): Likewise.
8165         (lookup_name_real): Don't call type_access_control if scope is
8166         template parameter dependent.
8167         * parse.y (template_arg): Call make_unbound_class_template with
8168         tf_parsing set.
8169         (nest_name_specifier): Call make_typename_type with tf_parsing set.
8170         (typename_sub0): Likewise.
8171         (typename_sub1): Likewise.
8172         (instantiate_decl): Push class scope.
8173         * pt.c (regenerate_decl_from_template): Call pushclass and popclass
8174         for both static variable and member function template.
8175         (instantiate_decl) Call pushclass and popclass when tsubst'ing type
8176         and arguments.
8177         * search.c (type_access_control): Do type access for TEMPLATE_DECL
8178         too.
8180 2002-07-20  Roger Sayle  <roger@eyesopen.com>
8182         * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
8183         test by using positive_option.  Make whitespace consistent.
8185 2002-07-20  Gabriel Dos Reis  <gdr@nerim.net>
8187         * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
8188         members with 'locus'.  Adjust use throughout.
8189         (struct feed):  Likewise.
8190         (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
8191         Adjust use.
8192         (snarf_defarg): Use error(), not error_with_file_and_line().
8194 2002-07-19  Chris Demetriou  <cgd@broadcom.com>
8196         * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
8197         cpp_options is included.
8199 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8201         PR c++/2862, c++/2863
8202         * pt.c (determine_specialization): Compare the length of
8203         TYPE_ARG_TYPES.  Tidy.
8205 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8207         PR c++/3797
8208         * decl.c (duplicate_decls): Don't propagate inlining parameters from
8209         olddecl to newdecl when newdecl is a specialization of the
8210         instantiation olddecl.
8212 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8214         PR c++/4802, c++/5387
8215         * decl.c (make_typename_type): Use enforce_access.
8217 2002-07-17  Scott Snyder <snyder@fnal.gov>
8219         PR c++/7320
8220         * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
8222 2002-07-12  Mark Mitchell  <mark@codesourcery.com>
8224         * class.c (add_method): Correct handling of conversion operators.
8226 2002-07-11  Mark Mitchell  <mark@codesourcery.com>
8228         PR c++/7224
8229         * class.c (add_method): Simplify.
8231 2002-07-11  Jason Merrill  <jason@redhat.com>
8233         PR c++/7279
8234         * tree.c (cp_copy_res_decl_for_inlining): Also copy
8235         TREE_ADDRESSABLE.
8237 2002-07-10  Graham Stott  <graham.stott@btinternet.com>
8239         * pt.c (template_parm_this_level_p, push_template_decl_real):
8240         Pass depth as int pointer.
8242 2002-07-11  Tim Josling  <tej@melbpc.org.au>
8244         Remove front end hard coding from gengtype.c.
8246         * config-lang.in (gtfiles): Add files needed for this front end.
8248 2002-07-10  Mark Mitchell  <mark@codesourcery.com>
8250         * cp-tree.h (unqualified_name_lookup_error): Declare it.
8251         (begin_function_definition): Adjust prototype.
8252         * lex.c (unqualified_name_lookup_error): New function, split out
8253         from ...
8254         (do_identifier): ... here.
8255         * parse.y (parse_begin_function_definition): New function.
8256         (fn.def1): Use it.
8257         * semantics.c (begin_function_definition): Accept decl-specifiers
8258         and attributes as separate parameters.
8260 2002-07-10  Jason Merrill  <jason@redhat.com>
8262         PR c++/6255
8263         * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
8264         modifying the old one.
8266 2002-07-09  Mark Mitchell  <mark@codesourcery.com>
8268         * cp-tree.h (constructor_name_p): Declare it.
8269         (check_template_template_default_arg): Likewise.
8270         * class.c (handle_using_decl): Use constructor_name_p.
8271         * decl.c (grokdeclarator): Likewise.
8272         * decl2.c (constructor_name_p): Define it.
8273         * init.c (build_member_call): Use constructor_name_p.
8274         * parse.y (template_parm): Use check_template_template_default_arg.
8275         * pt.c (check_explicit_specialization): Use constructor_name_p.
8276         * semantics.c (check_template_template_default_arg): New function.
8278 2002-07-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8280         * pt.c (can_complete_type_without_circularity): Add static to
8281         function definition.
8283 2002-07-08  Mark Mitchell  <mark@codesourcery.com>
8285         * cp-tree.h (have_extern_spec): Declare it
8286         * decl.c (have_extern_spec): Define it.
8287         (start_decl): Eliminate use of used_extern_spec.
8288         (start_function): Likewise.
8289         * parse.y (have_extern_spec): Remove declaration.
8290         (used_extern_spec): Likewise.
8291         (frob_specs): Eliminate use of used_extern_spec.
8292         (.hush_warning): Likewise.
8294 2002-07-07  Mark Mitchell  <mark@codesourcery.com>
8296         * Make-lang.in (cp/parse.o): Depend on decl.h.
8297         * cp-tree.h (do_decl_instantiation): Change prototype.
8298         * parse.y: Include decl.h.
8299         (parse_decl_instantiation): New function.
8300         (explicit_instantiation): Use it.
8301         * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
8302         and DECLSPECS.
8304 2002-07-07  Roger Sayle  <roger@eyesopen.com>
8306         * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
8307         constructor and destructor tests when passed a TEMPLATE_DECL.
8309 2002-07-05  Jason Merrill  <jason@redhat.com>
8311         * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
8312         pointers.
8314         PR optimization/7145
8315         * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
8317 2002-07-05  Nathan Sidwell  <nathan@codesourcery.com>
8319         Repair damage on weak-impared targets caused by my previous patch.
8320         * cp-tree.h (import_export_tinfo): Add parameter.
8321         * decl2.c (import_export_tinfo): Add parameter, post adjust
8322         DECL_COMDAT.
8323         * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
8324         import_export_tinfo.
8326 2002-07-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8328         PR c++/6944
8329         * init.c (build_aggr_init): Remove qualifiers of init before calling
8330         build_vec_init.
8331         (build_vec_init): Flatten multi-dimensional array during cleanup.
8332         (build_vec_delete_1): Abort if the type of each element is array.
8334 2002-07-03  Graham Stott  <graham.stott@btinternet.com>
8336         * pt.c (instantiate_class_template): Fix typo.
8338 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8340         * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
8341         by CVS conflict in my last patch.
8343 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8345         PR c++/6716
8346         * pt.c (can_complete_type_without_circularity): New function.
8347         (instantiate_class_template): Use it.
8348         * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
8349         message due to incomplete fields.
8351 2002-07-01  Mark Mitchell  <mark@codesourcery.com>
8353         PR c++/7112
8354         * mangle.c (write_expression): Add mangling for sizeof when
8355         applied to a type.
8356         * operators.def: Remove stale comment.
8358 2002-06-30  Nathan Sidwell  <nathan@codesourcery.com>
8360         * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
8361         (CPTI_TYPE_INFO_PTR_TYPE): ... this.
8362         (tinfo_decl_type): Replace with ...
8363         (type_info_ptr_type): ... this.
8364         (import_export_tinfo): Declare.
8365         (tinfo_decl_p): Rename to ...
8366         (unemitted_tinfo_decl_p): ... this.
8367         * decl2.c (import_export_decl): Break out tinfo handling into ...
8368         (import_export_tinfo): ... here. New function.
8369         (finish_file): Adjust.
8370         * rtti.c (TINFO_REAL_NAME): New macro.
8371         (init_rtti_processing): Create the tinfo types.
8372         (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
8373         (get_tinfo_decl): Adjust.
8374         (get_tinfo_ptr): New function.
8375         (get_type_id): Use it.
8376         (tinfo_base_init): Create vtable decl here, if it doesn't exist.
8377         (ptr_initializer): Use get_tinfo_ptr.
8378         (ptm_initializer): Likewise.
8379         (synthesize_tinfo_var): Break into ...
8380         (get_pseudo_ti_init): ... this. Just create the initializer.
8381         (get_pseudo_ti_desc): .. and this.
8382         (create_real_tinfo_var): Remove.
8383         (create_pseudo_type_info): Don't create the vtable decl here.
8384         (get_vmi_pseudo_type_info): Remove.
8385         (create_tinfo_types): Adjust.
8386         (tinfo_decl_p): Rename to ...
8387         (unemitted_tinfo_decl_p): ... here. Adjust.
8388         (emit_tinfo_decl): Adjust. Create the initializer.
8390 2002-06-27  Mark Mitchell  <mark@codesourcery.com>
8392         PR c++/6695
8393         * pt.c (tsubst_friend_class): Substitute into the context of the
8394         friend before using it.
8396 2002-06-26  Mark Mitchell  <mark@codesourcery.com>
8398         * cp-tree.h (xref_tag): Change prototype.
8399         (handle_class_head): Likewise.
8400         (build_x_component_ref): Likewise.
8401         * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
8402         (xref_tag): Take attributes as a separate parameter.
8403         (xref_tag_from_type): Adjust call to xref_tag.
8404         * decl2.c (build_expr_from_tree): Adjust call to
8405         build_x_component_ref.
8406         (handle_class_head): Take attributes as a separate parameter.
8407         * parse.y (parse_xref_tag): New function.
8408         (parse_handle_class_head): Likewise.
8409         (primary): Use parse_xref_tag.
8410         (class_head_decl): Use parse_handle_class_head.
8411         (class_head_defn): Likewise.
8412         * rtti.c (init_rtti_processing): Adjust call to xref_tag.
8413         (build_dynamic_cast_1): Likewise.
8414         (create_pseudo_type_info): Likewise.
8415         (emit_support_tinfos): Likewise.
8416         * typeck.c (build_object_ref): Adjust call to
8417         build_x_component_ref.
8418         (build_x_component_ref): Remove protect parameter.
8420 2002-06-25  Mark Mitchell  <mark@codesourcery.com>
8422         * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
8423         * class.c (handle_using_decl): Likewise.
8424         (instantiate_type): Likewise.
8425         * cp-tree.h (BASELINK_FUNCTIONS): New macro.
8426         (xref_basetypes): Change prototype.
8427         (begin_mem_initializers): New function.
8428         (get_overloaded_fn): Likewise.
8429         * decl.c (xref_basetypes): Simplify.
8430         * error.c (dump_expr): Use BASELINK_FUNCTIONS.
8431         * init.c (build_offset_ref): Likewise.
8432         * parse.y (base_init): Use begin_mem_initializers().
8433         (structsp): Adjust call to xref_basetypes.
8434         * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
8435         (instantiate_class_template): Adjust call to xref_basetypes.
8436         * semantics.c (begin_mem_initializers): New function.
8437         * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
8438         (really_overlaoded_fn): Likewise.
8439         (get_overloaded_fn): New function.'
8440         (get_first_fn): USe BASELINK_FUNCTIONS.
8442 2002-06-24  Mark Mitchell  <mark@codesourcery.com>
8444         * cp-tree.h (SCALAR_TYPE_P): New macro.
8445         (check_for_out_of_scope_variable): New function.
8446         (at_class_scope_p): Likewise.
8447         (finish_fname): Likewise.
8448         * class.c (finish_struct): Use at_function_scope_p.
8449         * decl.c (check_for_out_of_scope_variable): New function, split
8450         out from do_identifier.
8451         (finish_enum): Use at_function_scope_p.
8452         * lex.c (do_identifier): Use check_for_out_of_scope_variable.
8453         * parse.y (VAR_FUNC_NAME): Give it <ttype>.  Use finish_fname.
8454         (primary): Use at_function_scope_p.
8455         * search.c (at_class_scope_p): New function.
8456         * semantics.c (finish_fname): Likewise.
8457         (check_multiple_declarators): Use at_function_scope_p.
8459 2002-06-23  Mark Mitchell  <mark@codesourcery.com>
8461         * parse.y (parse_scoped_id): New function.
8462         (primary): Use it.
8463         * cp-tree.h (do_scoped_id): Adjust declaration.
8464         * lex.c (do_scoped_id): Remove call to yylex.
8465         * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
8466         * typeck2.c (add_exception_specifier): Use tree_cons, rather than
8467         expanding it inline.
8469 2002-06-23  Matt Thomas  <matt@3am-software.com>
8471         * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
8472         "#if VMS_TARGET".
8474 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8476         * mangle.c (integer_type_codes): Const-ify.
8478 2002-06-20  Richard Henderson  <rth@redhat.com>
8480         PR c++/6747
8481         * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
8482         Call put_var_into_stack.
8484 2002-06-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8486         * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
8487         array size calculation.
8489 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8491         PR c++/6892
8492         * pt.c (tsubst_expr): Handle FILE_STMT.
8494 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8496         PR c++/6723
8497         * pt.c (lookup_template_class): Don't build complete argument of
8498         BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
8499         argument.
8501 2002-06-19  Akim Demaille  <akim@epita.fr>
8503         * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
8504         decl.h's TYPENAME.
8505         * spew.c, lex.c: Adjust.
8506         * parse.y (explicit_instantiation): Add empty action to override
8507         the default $$ = $1 where it introduces a type clash.
8509 2002-06-14  Jason Merrill  <jason@redhat.com>
8511         * semantics.c (begin_for_stmt): Push the 'for' scope before
8512         adding the FOR_STMT.
8514         C++ ABI changes.
8515         * class.c (build_base_field): Set DECL_PACKED.
8516         (layout_class_type): Don't use tail padding of PODs.
8517         * mangle.c (write_unqualified_name): Fix template conversion op
8518         mangling.
8520 2002-06-16  Richard Henderson  <rth@redhat.com>
8522         PR opt/6793
8523         * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
8524         after template instantiation.
8526 2002-06-16  Richard Henderson  <rth@redhat.com>
8528         * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
8530 2002-06-15  Gabriel Dos Reis  <gdr@codesourcery.com>
8532         * cp-tree.h (compiler_error): Remove declaration.
8533         * lex.c (compiler_error): Remove definition.
8535 2002-06-14  Steve Ellcey  <sje@cup.hp.com>
8537         * g++spec.c (LIBUNWIND): New.
8538         (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
8540 2002-06-13  Jessica Han  <jessica@cup.hp.com>
8542         * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
8543         (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
8544         (build_vbase_offset_vtbl_entries): Likewise.
8545         * rtti.c (build_headof): Likewise.
8546         (get_tinfo_decl_dynamic): Likewise.
8547         (create_pseudo_type_info): Likewise.
8549 2002-06-12  Stan Shebs  <shebs@apple.com>
8551         * mpw-config.in: Remove file, no longer used.
8552         * mpw-make.sed: Ditto.
8554 2002-06-07  Zack Weinberg  <zack@codesourcery.com>
8556         * decl2.c: Update call to cpp_handle_option.
8558 2002-06-07  H.J. Lu  (hjl@gnu.org)
8560         * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
8562 2002-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
8564         * error.c (cp_error_at): Fix typo.
8566 2002-06-04  Gabriel Dos Reis  <gdr@codesourcery.com>
8568         * error.c (cp_diagnostic_starter): Adjust call.
8569         (maybe_print_instantiation_context): Change prototype to take a
8570         'diagnostic_info *'.
8571         (print_instantiation_full_context): Likewise.
8572         (print_instantiation_partial_context): Likewise.
8573         (cp_diagnostic_starter): Likewise.
8574         (cp_diagnostic_finalizer): Likewise.
8575         (cp_print_error_function): Likewise.
8576         (cp_printer): Take a secondary parameter as a 'text_info *'.
8577         Remove output_state savings.  Adjust calls.
8579 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
8581         * pt.c (inline_parm_levels): Mark for GC.
8583         * mangle.c (start_mangling): Allocate G.substitutions here...
8584         (init_mangle): ... rather than here.
8585         (finish_mangling): Clear the varray pointer when done with it.
8586         * spew.c (yylexstring): Don't use VARRAY_FREE.
8587         * search.c (bfs_walk): Don't use VARRAY_FREE.
8588         * decl2.c (pending_statics): Use gengtype to mark.
8589         (deferred_fns): Likewise.
8590         (ssdf_decls): Likewise.
8591         (init_decl2): Delete.
8592         * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
8593         (cxx_init_decl_processing): Don't call init_decl2.
8594         (cxx_pop_function_context): Don't use VARRAY_FREE.
8595         * cp-tree.h (struct saved_scope): No need for special marking
8596         of varrays.
8597         (struct language_function): Likewise.
8598         (local_classes): Use gengtype to mark.
8599         (init_decl2): Delete prototype.
8600         * class.c (init_class_processing): Don't use
8601         ggc_add_tree_varray_root.
8602         (build_vtbl_initializer): Don't use VARRAY_FREE.
8604         * decl.c (typename_compare): Don't use same_type_p.
8606         * decl.c: Include hashtab.h instead of hash.h.
8607         (typename_hash): Update to use htab_h.
8608         (typename_compare): Likewise.
8609         (typename_htab): Use gengtype to mark.
8610         (build_typename_type): Update to use htab_h.
8611         * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
8613         * Make-lang.in (gt-cp-tree.h): New rule.
8614         (cp/tree.o): Depend on gt-cp-tree.h.
8615         * config-lang.in (gtfiles): Add cp/tree.c.
8616         * tree.c: Include gt-cp-tree.h.
8617         (list_hash_table): Use gengtype to mark.
8618         (init_tree): Use gengtype to mark trees.
8620         * Make-lang.in (cp/decl.o): Add debug.h dependency.
8621         * call.c (struct z_candidate): Use gengtype.
8622         (USER_CONV_CAND): Use WRAPPER_ZC.
8623         (convert_class_to_reference): Use build_zc_wrapper.
8624         (build_type_conversion_1): Likewise.
8625         (build_over_call): Use WRAPPER_ZC.
8626         (add_warning): Use build_zc_wrapper.
8627         * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
8628         * cp-tree.h (struct lang_identifier): Use gengtype.
8629         (struct template_parm_index_s): Likewise.
8630         (struct ptrmem_cst): Likewise.
8631         (struct tree_binding): Likewise.
8632         (struct tree_overload): Likewise.
8633         (struct tree_srcloc): Likewise.
8634         (struct tree_wrapper): Likewise.  Also modify to have a pointer
8635         to struct z_candidate rather than void.
8636         (enum cp_tree_node_structure_enum): New.
8637         (union lang_tree_node): New.
8638         (cxx_mark_tree): Delete prototype.
8639         (cp_tree_node_structure): New prototype.
8640         (build_ptr_wrapper): Delete prototype.
8641         (build_int_wrapper): Delete prototype.
8642         (build_zc_wrapper): New prototype.
8643         * decl.c: Include debug.h
8644         (cxx_mark_tree): Delete.
8645         (cp_tree_node_structure): New.
8646         * tree.c (build_ptr_wrapper): Delete.
8647         (build_int_wrapper): Delete.
8648         (build_zc_wrapper): New.
8650         * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
8651         Correct typo.  Patch from k_fukui@highway.ne.jp.
8653         * semantics.c (current_stmt_tree): Update for change to
8654         struct language_function.
8655         (finish_mem_initializers): Likewise.
8656         * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
8657         * cp-tree.h (struct language_function): Rename from
8658         cp_language_function.  Change all uses.
8659         (cp_function_chain): Don't need to cast.
8661         * class.c (duplicate_tag_error): Reset discriminator.
8662         (check_bases_and_members): Update for data structure changes.
8663         * cp-tree.h (struct lang_id2): Use gengtype.
8664         (flagged_type_tree): Likewise.
8665         (SET_LANG_ID): Use GGC on struct lang_id2.
8666         (struct cp_language_function): Use gengtype.  Remove field
8667         'x_vcalls_possible_p'.
8668         (current_vcalls_possible_p): Delete.
8669         (struct lang_type_header): New.
8670         (struct lang_type_class): Rename from struct lang_type.  Include
8671         struct lang_type_header.
8672         (struct lang_type_ptrmem): New.
8673         (struct lang_type): New.
8674         (LANG_TYPE_CLASS_CHECK): New.  Use it in all the appropriate macros.
8675         (LANG_TYPE_PTRMEM_CHECK): New.  Use it in all the appropriate macros.
8676         (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
8677         (struct lang_decl_flags): Use gengtype.  Add discriminators.
8678         (struct lang_decl): Use gengtype.  Add and use discriminators.
8679         Update the macros that reference moved fields.
8680         (LANG_DECL_U2_CHECK): New function.  Use it when appropriate.
8681         (SET_DECL_THUNK_P): Set discriminator too.
8682         (clear_inline_text_obstack): Delete prototype.
8683         (finish_inline_definitions): Delete prototype.
8684         (mark_pending_inlines): Delete prototype.
8685         (lang_check_failed): New prototype.
8686         * decl.c (struct named_label_use_list): Use gengtype.
8687         (struct named_label_list): Likewise.
8688         (mark_binding_level): Delete.
8689         (mark_named_label_lists): Delete.
8690         (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
8691         (cxx_init_decl_processing): Use generated marker routine.
8692         (begin_destructor_body): Delete dead set to
8693         current_vcalls_possible_p.
8694         (mark_lang_function): Delete.
8695         (mark_cp_function_context): Delete.
8696         (lang_mark_tree): Use generated marker routines.
8697         * decl2.c (start_objects): Set discriminator when setting
8698         GLOBAL_INIT_PRIORITY.
8699         * lex.c (retrofit_lang_decl): Set discriminators.
8700         (copy_lang_type): Update for changes to lang_type structure.
8701         (cp_make_lang_type): Set discriminator.
8702         * parse.y: Use gengtype on YYLVAL.  Don't use dots in identifiers.
8703         * search.c: Include ggc.h.
8704         * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
8705         (finish_inline_definitions): Delete.
8706         * spew.c (struct token): Use gengtype.
8707         (struct token_chunk): New.
8708         (struct unparsed_text): Use gengtype.  Store tokens in chunks.
8709         (struct feed): Use gengtype.
8710         (feed_obstack): Delete.
8711         (feed): Mark as GC root.
8712         (pending_inlines): Mark as GC root.
8713         (pending_inlines_tail): Likewise.
8714         (processing_these_inlines): Likewise.
8715         (token_obstack): Make static.
8716         (first_token): Likewise.
8717         (init_spew): Don't initialize deleted things; use gengtype for roots.
8718         (clear_inline_text_obstack): Delete.
8719         (feed_input): Use GC for struct feed.  Update for changes to
8720         struct unparsed_text.
8721         (mark_pending_inlines): Delete.
8722         (next_token): Rename from add_token.  Change all callers.  Update
8723         for changes to struct unparsed_text.
8724         (space_for_token): New.
8725         (remove_last_token): New.
8726         (alloc_unparsed_text): New.
8727         (snarf_block): Take an unparsed_text.  Update for changes to struct
8728         unparsed_text.
8729         (snarf_method): Update for changes to struct unparsed_text.
8730         (snarf_defarg): Update for changes to struct unparsed_text.
8731         * tree.c (lang_check_failed): New.
8733         * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
8734         gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
8735         (cp/spew.o): Add dependency on gt-<filename>.h.
8736         (cp/decl2.o): Add dependency on gt-<filename>.h.
8737         (cp/call.o): Add dependency on gt-<filename>.h.
8738         (cp/pt.o): Add dependency on gt-<filename>.h.
8739         (cp/repo.o): Add dependency on gt-<filename>.h.
8740         (cp/parse.o): Add dependency on gt-<filename>.h.
8741         * call.c: Use gengtype for roots.
8742         * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
8743         decl2.c parse.y pt.c repo.c spew.c.
8744         * cp-tree.h: Use gengtype for roots.
8745         (struct saved_scope): Use GGC, gengtype.
8746         (cp_parse_init): Delete prototype.
8747         (init_pt): Delete prototype.
8748         * decl.c: Use gengtype for roots.
8749         (mark_saved_scope): Delete.
8750         (cxx_init_decl_processing): Don't call deleted initilisation
8751         routines.
8752         (signed_size_zero_node): Delete, unused.
8753         * decl.h: Use gengtype for roots.
8754         * decl2.c: Use gengtype for roots.
8755         * lex.h: Use gengtype for roots.
8756         * parse.y: Use gengtype for roots.
8757         (cp_parse_init): Delete.
8758         * pt.c: Use gengtype for roots.
8759         (init_pt): Delete.
8760         * repo.c: Use gengtype for roots.
8761         * spew.c: Use gengtype for roots.
8763         * Make-lang.in: Allow for filename changes.  Add gtype-cp.h.
8764         (cp/decl.o): Add dependency on gtype-cp.h.
8765         * decl.c: Remove use of add_deletable_root, use GTY marker instead.
8766         Include gtype-cp.h.  Allow for filename changes.
8768         * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
8769         (cp/decl.o): Add cp/gt-decl.h dependency.
8770         * config-lang.in (gtfiles): New.
8771         * tree.h: Rename struct binding_level to struct cp_binding_level.
8772         * decl.c: Rename struct binding_level to struct cp_binding_level.
8773         Include cp/gt-decl.h.
8774         (struct cp_binding_level): Use gengtype.
8775         (make_binding_level): Use GGC on struct cp_binding_level.
8776         (mark_binding_level): Use gt_ggc_m_cp_binding_level.
8777         (cxx_init_decl_processing): Mark free_binding_level as
8778         deletable.
8780         * decl.c (mark_cp_function_context): Update calling sequence.
8782         * decl.c (start_function): Don't free 'struct
8783         cp_language_function'.
8784         (pop_cp_function_context): Likewise.
8785         (save_function_data): Allocate it using GC.
8786         * semantics.c (genrtl_start_function): Don't free 'struct
8787         cp_language_function'.
8789 2002-05-31  Matthew Woodcraft  <mattheww@chiark.greenend.org.uk>
8791         * lang-specs.h: Use cpp_debug_options.
8793 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
8795         * mangle.c, tree.c: Include real.h.
8796         * Make-lang.in: Update dependency lists.
8798 2002-05-25  Neil Booth  <neil@daikokuya.demon.co.uk>
8800         * lex.c: Don't include c-lex.h.
8801         * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
8803 2002-05-23  Neil Booth  <neil@daikokuya.demon.co.uk>
8805         * spew.c (yyungetc, snarf_block): Remove indent_level handling.
8807 2002-05-22  Richard Henderson  <rth@redhat.com>
8809         * decl.c (obscure_complex_init): Check for VAR_DECL
8810         before using DECL_THREAD_LOCAL.
8812 2002-05-22  Richard Henderson  <rth@redhat.com>
8814         * decl.c (check_tag_decl): Handle RID_THREAD.
8815         (obscure_complex_init): Reject run-time init of tls.
8816         (grokvardecl, grokdeclarator): Handle RID_THREAD.
8817         * lex.c (reswords): Add __thread.
8818         (rid_to_yy): Map RID_THREAD to SCSPEC.
8820 2002-05-22  Neil Booth  <neil@daikokuya.demon.co.uk>
8822         * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
8823         * cp-tree.h (cxx_post_options): Kill.
8824         * cp-lex.c (cxx_post_options): Kill.
8826 2002-05-21  Richard Henderson  <rth@redhat.com>
8828         * lex.c (rid_to_yy): Add RID_THREAD.
8830 2002-05-21  Alexandre Oliva  <aoliva@redhat.com>
8832         * init.c (build_vec_init): Test for trivial copy-assignment when
8833         copy-assigning arrays.
8835 2002-05-20  Andreas Jaeger  <aj@suse.de>
8837         * init.c (build_default_init): Remove unused variable.
8839 2002-05-20  Alexandre Oliva  <aoliva@redhat.com>
8841         * call.c (any_strictly_viable): New.
8842         (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
8844 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8846         * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
8848 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8850         PR c++/186, DR 259
8851         * pt.c (do_decl_instantiation): Don't complain explicit
8852         instantiation after explicit specialization.
8853         (do_type_instantiation): Likewise.
8855 2002-05-19  Alexandre Oliva  <aoliva@redhat.com>
8857         * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
8858         renamed from...
8859         (complete_type_or_else): ... this.  Redefined as macro.
8860         (cxx_incomplete_type_diagnostic): Declare.
8861         (cxx_incomplete_type_error): Define as macro.
8862         * init.c (build_delete): Warn about incomplete types other than
8863         void, and use the built-in operator delete for them.
8864         * typeck.c (complete_type_or_diagnostic): Renamed from
8865         complete_type_or_else.  Added warn_only argument, passed to...
8866         * typeck2.c (cxx_incomplete_type_diagnostic): ... this.  Print
8867         warnings or errors depending on new warn_only argument.  Renamed
8868         from...
8869         (cxx_incomplete_type_error): ... this.  New implementation in
8870         terms of cxx_incomplete_type_diagnostic.
8872 2002-05-18  Jason Merrill  <jason@redhat.com>
8874         PR c++/6611
8875         * decl2.c (import_export_decl): If we clear
8876         DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
8878 2002-05-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8880         PR c++/6620
8881         * pt.c (verify_class_unification): Don't check if PARM is template
8882         parameter dependent.  Simplify.
8883         (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
8884         parameter dependent expression.
8886 2002-05-14  Jason Merrill  <jason@redhat.com>
8888         * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
8889         Do set DECL_COMDAT.
8890         (synthesize_tinfo_var): Take the public decl.
8891         (create_real_tinfo_var): Likewise.  Check DECL_COMDAT.
8892         (emit_tinfo_decl): Adjust.  Call import_export_decl.
8893         * decl2.c (import_export_decl): Simplify tinfo decl handling.
8895 2002-05-14  Alexandre Oliva  <aoliva@redhat.com>
8897         * cp-tree.h (struct lang_type): Added non_zero_init.
8898         (CLASSTYPE_NON_ZERO_INIT_P): New macro.
8899         (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
8900         * class.c (check_field_decls): Test non_zero_init.
8901         * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
8902         zero-to-NULL conversions.
8903         * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
8904         type that needs zero-initialization without zeros.
8905         (check_initializer_decl): Compute zero-initializer for types
8906         that require a non-trivial one.
8907         * init.c (build_forced_zero_init): New function.
8908         (build_default_init): Use it.
8909         * tree.c (zero_init_p): New function.
8910         * typeck2.c (force_store_init_value): New function.
8911         (process_init_constructor): Create non-trivial zero-initializers
8912         for array members and class fields.
8914 2002-05-14  Neil Booth  <neil@daikokuya.demon.co.uk>
8916         * lang-specs.h: Remove redundant -lang-c++.
8918 2002-05-13  Jason Merrill  <jason@redhat.com>
8920         * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
8921         (fixed_type_or_null): See through reference vars.
8922         (build_base_path): Vtable contents are constant.
8923         * typeck.c (get_member_function_from_ptrfunc): Likewise.
8925 2002-05-12  Jason Merrill  <jason@redhat.com>
8927         * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
8928         structs are safe.
8930 2002-05-09  Neil Booth  <neil@daikokuya.demon.co.uk>
8932         * cp-tree.h (flag_ansi): Remove.
8933         * decl2.c (flag_ansi): Remove.
8934         (cxx_decode_option): Set flag_iso and flag_undef.
8936 2002-05-09  Jason Merrill  <jason@redhat.com>
8938         * typeck.c (get_member_function_from_ptrfunc): Reorganize.
8939         Use subtraction rather than a bitmask to get the index.
8940         * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
8942         * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
8944 2002-05-07  Neil Booth  <neil@daikokuya.demon.co.uk>
8946         * Make-lang.in (decl2.o): Update.
8947         * cp-tree.h (warn_multichar): Remove.
8948         * decl2.c: Include c-common.h.
8949         (warn_multichar): Remove.
8951 2002-05-03  Jason Merrill  <jason@redhat.com>
8953         * tree.c (build_cplus_array_type): Only const and volatile get
8954         special handling.
8956         * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
8958 2002-04-30  Mark Mitchell  <mark@codesourcery.com>
8960         ABI change, returning simple classes from functions.
8961         * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
8962         TYPE_HAS_TRIVIAL_INIT_REF is false or
8963         TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
8965 2002-04-30  Jason Merrill  <jason@redhat.com>
8967         PR debug/6436
8968         * decl.c (grokdeclarator): Don't override TYPE_NAME of an
8969         anonymous class with a typedef if there are attributes.
8971 2002-04-29  Paul Eggert  <eggert@twinsun.com>
8973         * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
8975 2002-04-29  Jakub Jelinek  <jakub@redhat.com>
8977         PR c++/6477
8978         * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
8979         non-NULL first.
8981 2002-04-29  Mark Mitchell  <mark@codesourcery.com>
8983         PR c++/6492
8984         * pt.c (tsubst_friend_class): If the friend has an explicit scope,
8985         enter that scope before name lookup.
8987         PR c++/6486
8988         * method.c (do_build_copy_constructor): Avoid building
8989         cv-qualified reference types.
8991 2002-04-29  Nathan Sidwell  <nathan@codesourcery.com>
8993         PR c++/5719
8994         * decl.c (grok_op_properties): Assignment ops don't have to return
8995         by value. operator% should.
8997 2002-04-28  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
8999         PR c/6343
9000         * decl.c (duplicate_decls): Call merge_weak.
9002 2002-04-26  Richard Henderson  <rth@redhat.com>
9004         * parse.y (malloced_yyss, malloced_yyvs): New.
9005         (yyoverflow): Re-add.  Set them.
9006         (free_parser_stacks): New.
9008 2002-04-26  Mark Mitchell  <mark@codesourcery.com>
9010         PR c++/6497
9011         * method.c (do_build_assign_ref): Pass a derivation to
9012         build_method_call when calling base class assignment operators.
9014 2002-04-26  Richard Henderson  <rth@redhat.com>
9016         * parse.y (yyoverflow): Revert.
9018 2002-04-26  Richard Henderson  <rth@redhat.com>
9020         PR c/3581
9021         * parse.y (string): Remove.  Update all uses to use STRING
9022         instead, and not call combine_strings.
9023         * rtti.c (tinfo_name): Use fix_string_type.
9024         * semantics.c (finish_asm_stmt): Don't call combine_strings.
9025         * spew.c (yylexstring): New.
9026         (read_token): Use it.
9028 2002-04-25  Richard Henderson  <rth@redhat.com>
9030         PR c/2161
9031         * parse.y (yyoverflow): New.
9033 2002-04-25  Jason Merrill  <jason@redhat.com>
9035         PR c++/5607
9036         * search.c (check_final_overrider): No longer static.
9037         * class.c (update_vtable_entry_for_fn): Call it.
9038         * cp-tree.h: Adjust.
9040 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
9042         * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
9043         * cp-tree.h (cxx_set_yydebug): Die.
9044         * lex.c (YYDEBUG): Get from c-lex.h.
9045         (cxx_set_yydebug): Remove.
9046         * parse.y: Include c-lex.h.
9047         (YYDEBUG): Get from c-lex.h.
9049 2002-04-24  Mark Mitchell  <mark@codesourcery.com>
9051         PR c++/6438.
9052         * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
9053         void.
9055 2002-04-24  Neil Booth  <neil@daikokuya.demon.co.uk>
9057         * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
9058         LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
9059         Redefine.
9060         * cp-tree.h (cp_attribute_table): Rename.
9061         * decl.c (lang_attribute_table): Remove declaration.
9062         (cxx_init_decl_processing): Don't set it.
9063         * tree.c (cp_attribute_table): Rename.
9065 2002-04-24  Jason Merrill  <jason@redhat.com>
9067         PR c++/6331
9068         * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
9069         * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
9070         The pedwarn for array assignment is now unconditional.
9071         * tree.c (build_cplus_array_type_1): Still process simple array types
9072         normally in templates.
9074         PR c++/6395
9075         * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
9076         stuff for comdats.
9078 2002-04-23  Jakub Jelinek  <jakub@redhat.com>
9080         * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
9081         node with attributes.
9083 2002-2-23  David O'Brien  <obrien@FreeBSD.org>
9085         * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
9086         Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
9088 2002-04-23  Mark Mitchell  <mark@codesourcery.com>
9090         PR c++/6256:
9091         * pt.c (tsubst_friend_class): Handle templates with explicit
9092         nested names.
9094         PR c++/6331:
9095         * typeck.c (merge_types): Remember the cv-qualification of pointer
9096         types when merging them.
9098 2002-04-20  Neil Booth  <neil@daikokuya.demon.co.uk>
9100         * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
9101         LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
9102         * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
9103         cxx_mark_function_context): New.
9104         * decl.c (push_cp_function_context, pop_cp_function_context,
9105         mark_cp_function_context): Rename for consistency.
9106         (cxx_init_decl_processing): Don't set old hooks.
9108 2002-04-19  Neil Booth  <neil@daikokuya.demon.co.uk>
9110         * call.c (convert_type_from_ellipsis): Rename, update.
9111         * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
9112         * cp-tree.h (convert_type_from_ellipsis): Rename.
9113         * decl.c (cxx_init_decl_processing): Don't set hook.
9115 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
9117         * call.c (build_new_method_call): Update.
9118         * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
9119         * cp-tree.h (cxx_incomplete_type_error): New.
9120         * decl.c (grokdeclarator, grokparms): Update.
9121         * decl2.c (check_classfn): Update.
9122         * pt.c (tsubst): Update.
9123         * typeck.c (complete_type_or_else, expr_sizeof,
9124         decay_conversion): Update.
9125         * typeck2.c (incomplete_type_error): Rename.
9126         (add_exception_specifier): Update.
9128 2002-04-18  Jason Merrill  <jason@redhat.com>
9130         PR c++/5658
9131         * search.c (setup_class_bindings): A class template qualifies as a
9132         type binding.
9134 2002-04-17  Jakub Jelinek  <jakub@redhat.com>
9136         PR c++/6316
9137         * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
9138         before expanding.
9140 2002-04-16  Mark Mitchell  <mark@codesourcery.com>
9142         * init.c (begin_init_stmts): Remove commented out code.
9143         (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
9144         * semantics.c (begin_gobal_stmt_expr): Adjust call to
9145         expand_start_stmt_expr.
9147 2002-04-15  Mark Mitchell  <mark@codesourcery.com>
9149         * decl.c (register_dtor_fn): Pass the address of dso_handle, not
9150         dso_handle itself, to __cxa_atexit.
9152 2002-04-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
9154         * error.c (cxx_print_error_function): Adjust call to macros.
9156 2002-04-14  Jakub Jelinek  <jakub@redhat.com>
9158         * class.c (layout_virtual_bases): Do all dsize computation on trees.
9160 2002-04-14  Jason Merrill  <jason@redhat.com>
9162         * typeck.c (get_member_function_from_ptrfunc): Don't do
9163         gratuitious division and multiplication on
9164         ptrmemfunc_vbit_in_delta targets.
9166 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
9168         PR c++/5373.
9169         * semantics.c (finish_expr_stmt): Remember the type of the
9170         expression before any conversions are performed.
9172 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
9174         PR c++/5189.
9175         * call.c (add_template_candidate_real): Do not treat member
9176         templates as copy constructors.
9178 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
9180         * decl.c (duplicate_decls): Do not copy the RTL for a variable
9181         declaration if the old variable had an incomplete type and the new
9182         variable does not.
9183         (complete_vars): Do not call layout_decl for completed variables.
9185 2002-04-12  Richard Sandiford  <rsandifo@redhat.com>
9187         * decl.c (duplicate_decls): Don't try to unify an implicit typedef
9188         with an explicit one.
9189         (follow_tag_typedef): New.
9190         (lookup_tag): Use it to extract the tag of an explicit typedef.
9191         (xref_tag): Likewise.
9193 2002-04-11  Andrew Haley  <aph@redhat.com>
9195         * typeck.c (type_after_usual_arithmetic_conversions):
9196         If two types have the same variant, return immediately.
9197         When two floating-point operands are the same precision:
9198           convert to float if one of the operands is float;
9199           if neither operand is one of the standard types, return the type
9200           of the first operand.
9202 2002-04-10  Nathan Sidwell  <nathan@codesourcery.com>
9204         PR c++/5507
9205         * decl.c (make_typename_type): Remove implicit typenameness.
9207 2002-04-09  Jason Merrill  <jason@redhat.com>
9209         PR optimization/6189
9210         * semantics.c (genrtl_start_function): Don't free
9211         DECL_SAVED_FUNCTION_DATA for inline functions.
9213         * init.c (build_member_call): For now, don't convert to
9214         intermediate base if it would cause an error.
9216 2002-04-08  Paolo Carlini  <pcarlini@unitus.it>
9218         * parse.y (namespace_qualifier, maybe_identifier,
9219         begin_explicit_instantiation, end_explicit_instantiation,
9220         apparent_template_type, .finish_template_type,
9221         do_id, maybe_init, defarg_again, component_decl_1):
9222         Add ending ';', in accordance with POSIX.
9224 2002-04-06  Mark Mitchell  <mark@codesourcery.com>
9226         PR c++/5571
9227         * class.c (layout_class_type): Remember incomplete static
9228         variables.
9229         (finish_struct_1): Call complete_vars, not
9230         hack_incomplete_structures.
9231         * cp-tree.h (hack_incomplete_structures): Rename to ...
9232         (complete_vars): ... this.
9233         (struct saved_scope): Remove incomplete.
9234         (namespace_scope_incomplete): Remove.
9235         * decl.c (struct binding_level): Remove incomplete.
9236         (incomplete_vars): New variable.
9237         (mark_binding_level): Don't mark incomplete.
9238         (print_binding_level): Don't print it.
9239         (mark_saved_scope): Don't mark incomplete.
9240         (pushdecl): Use maybe_register_incopmlete_var.
9241         (cxx_init_decl_processing): Register incomplete_vars for GC.
9242         (start_decl_1): Clarify error message.
9243         (hack_incomplete_vars): Remove.
9244         (maybe_register_incomplete_var): New function.
9245         (complete_vars): Likewise.
9247 2002-04-06  Jason Merrill  <jason@redhat.com>
9249         PR c++/4934
9250         * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
9251         set before checking it.
9253         PR c++/525
9254         * init.c (build_member_call): Use build_scoped_ref.
9255         (resolve_offset_ref): Likewise.
9256         * call.c (build_scoped_method_call): Likewise.
9257         * tree.c (maybe_dummy_object): Kludge around current_class_type being
9258         wrong.
9259         * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
9260         * cp-tree.h: Adjust.
9262         * init.c (push_base_cleanups): Just use build_scoped_method_call.
9264         PR c++/6179
9265         * method.c (implicitly_declare_fn): Pass unqualified type to
9266         synthesize_exception_spec.
9268 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
9270         * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
9271         * cvt.c: Update comment.
9272         * init.c (expand_cleanup_for_base): Update.
9273         * semantics.c (finish_parenthesized_expr): Update.
9274         * typeck.c (cp_truthvalue_conversion): Update.
9276 2002-04-04  Jason Merrill  <jason@redhat.com>
9278         * semantics.c (finish_eh_cleanup): New fn.
9279         * cp-tree.h: Add prototype.
9280         * init.c (perform_member_init, expand_cleanup_for_base): Use
9281         finish_eh_cleanup.
9282         * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
9283         * cp-tree.h: Remove references.
9284         * decl.c (begin_constructor_body, end_constructor_body): Likewise.
9285         * dump.c (cp_dump_tree): Likewise.
9286         * pt.c (tsubst_expr): Likewise.
9287         * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
9288         (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
9289         * tree.c (cp_statement_code_p): Likewise.
9291         * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
9293         PR c++/5636
9294         * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
9295         cleanup for nrv.
9297         PR c++/5104
9298         * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
9299         specifiers.
9300         [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
9302 2002-04-03  Richard Henderson  <rth@redhat.com>
9304         * cp-lang.c (cxx_warn_unused_global_decl): New.
9305         (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
9307 2002-04-03  Neil Booth  <neil@daikokuya.demon.co.uk>
9309         * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
9310         * tree.c (init_tree): Don't set hook.
9312 2002-04-03  Roger Sayle  <roger@eyesopen.com>
9314         PR c++/5998:
9315         * decl.c (duplicate_decls): Don't mess with assembler names when
9316         redeclaring builtin functions as static.
9318 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
9320         * call.c (build_addr_func): Update.
9321         * class.c (resolve_address_of_overloaded_function): Update.
9322         * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
9323         * cp-tree.h (cxx_mark_addressable): New.
9324         * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
9325         * decl2.c (build_cleanup): Update.
9326         * except.c (build_throw): Update.
9327         * init.c (resolve_offset_ref): Update.
9328         * pt.c (convert_nontype_argument): Update.
9329         * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
9330         * typeck.c (decay_conversion, build_array_ref, build_unary_op,
9331         unary_complex_lvalue): Update.
9332         (mark_addressable): Rename.
9334 2002-04-01  Roger Sayle  <roger@eyesopen.com>
9336         PR c++/5998:
9337         * decl.c (duplicate_decls):  Overwrite the RTL when (and only
9338         when) overwriting a built-in function.  Don't use COPY_DECL_RTL,
9339         but follow the SET_DECL_RTL idiom used elsewhere in the function.
9341 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
9343         * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
9344         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
9345         * decl.c (grokdeclarator): Update.
9346         * mangle.c (write_integer_cst): Update.
9347         * typeck.c (build_binary_op): Update.
9349 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
9351         * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
9352         * lex.c (cxx_init): Don't set hook.
9354 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
9356         * Make-lang.in (error.o): Update.
9357         * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
9358         * cp-tree.h (struct diagnostic_context): Predeclare.
9359         (cxx_print_error_function): New.
9360         * error.c: Include langhooks-def.h.
9361         (lang_print_error_function): Rename.  Update.
9362         (init_error): Don't set hook.
9364 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
9366         * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
9367         Redefine.
9368         * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
9369         * decl.c (finish_enum): Similarly.
9370         * error.c (dump_type): Similarly.
9371         * lex.c (cxx_init): Similarly.
9372         * mangle.c (write_builtin_type): Similarly.
9373         * typeck.c (comptypes): Similarly.
9375 2002-03-28  Roger Sayle  <roger@eyesopen.com>
9377         PR c++/5998:
9378         * decl.c (cxx_init_decl_processing): Re-enable built-in functions
9379         in the g++ front-end.
9380         (duplicate_decl): Allow redefinition of anticipated built-ins.
9381         Fix inlining problem by over-writing the old DECL_RTL.
9382         (lookup_namespace_name): Fail to find an identifier in the
9383         specified namespace if its still anticipated.
9384         (builtin_function_1): New function split out from builtin_function
9385         to create a builtin in the current namespace with given context.
9386         (builtin_function): Call builtin_function_1 to define the
9387         appropriate builtins in both the std and global namespaces.
9388         (select_decl): Don't test for anticipated decls here.
9389         (unqualified_namespace_lookup): Instead ignore them whilst
9390         searching through scopes and namespaces.
9391         * decl2.c (do_nonmember_using_decl): If a using declaration
9392         specifies an anticipated built-in function, mark it as no longer
9393         anticipated in that scope.
9394         (ambiguous_decl):  Avoid resolving to an anticipated decl.
9395         * lex.c (do_scoped_id): Fail to find an identifier in the global
9396         namespace if its still anticipated.
9398 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
9400         * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
9401         * cp-tree.h (cp_make_lang_type): Rename.
9402         * lex.c (cp_make_lang_type): Rename.
9403         (make_aggr_type): Update.
9404         * tree.c (init_tree): Don't set make_lang_type_fn.
9406 2002-03-29  Jakub Jelinek  <jakub@redhat.com>
9408         PR c++/6073
9409         * class.c (finish_struct_1): Update static field's DECL_MODE even
9410         if its type is a variant of t.
9412 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
9414         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
9415         * cp-tree.h (cxx_insert_default_attributes): New.
9416         * decl.c (insert_default_attributes): Rename.
9418 2002-03-27  Mark Mitchell  <mark@codesourcery.com>
9420         PR c++/4884
9421         * call.c (build_op_delete_call): Allow for the fact the placement
9422         may be a COMPOUND_EXPR.
9424 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
9426         * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
9427         * cp-tree.h (init_cplus_expand): Remove.
9428         (cxx_expand_expr): New.
9429         * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
9430         fix prototype.
9431         (init_cplus_expand): Remove.
9432         * lex.c (cxx_init): Don't call init_cplus_expand.
9434 2002-03-26  Mark Mitchell  <mark@codesourcery.com>
9436         PR c++/4884.
9437         * init.c (build_new_1): Allow for the fact the result of
9438         build_function_call may be a COMPOUND_EXPR.
9440 2002-03-26  Nathan Sidwell  <nathan@codesourcery.com>
9442         PR c++/5682
9443         * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
9444         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
9445         (dfs_skip_nonprimary_vbases_markedp): Remove.
9446         * search.c (get_shared_vbase_if_not_primary): Remove.
9447         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
9448         (dfs_skip_nonprimary_vbases_markedp): Remove.
9449         (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
9450         (dfs_marked_real_bases_queue_p): Likewise.
9452 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
9454         * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
9455         * cp-tree.h (cxx_mark_tree): New.
9456         * decl.c (lang_mark_tree): Rename cxx_mark_tree.
9458 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
9460         * cp-tree.h (cxx_maybe_build_cleanup): New.
9461         * decl.c (destroy_local_var, hack_incomplete_structures): Update.
9462         (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
9463         * tree.c (build_target_expr): Update.
9464         * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
9466 2002-03-24  Neil Booth  <neil@daikokuya.demon.co.uk>
9468         * decl2.c (cxx_decode_option): Handle -E.
9469         * lang-specs.h (default_compilers): Preprocess with cc1plus.
9470         * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
9472 2002-03-23  Jakub Jelinek  <jakub@redhat.com>
9474         PR c++/6037
9475         * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
9477 2002-03-23  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
9479         * error.c (dump_type): Be careful about implicit typenames.
9481 2002-03-21  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
9483         PR C++/3656
9484         * semantics.c (finish_base_specifier): Handle erronous base
9485         classes.
9487 2002-03-22  Zack Weinberg  <zack@codesourcery.com>
9489         * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
9490         REAL_IS_NOT_DOUBLE.
9492 2002-03-22  Jeff Knaggs  <jknaggs@redhat.com>
9494         * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
9495         an index into the vtable_entry array regardless of
9496         TARGET_PTRMEMFUNC_VBIT_LOCATION.
9498 2002-03-21  Aldy Hernandez  <aldyh@redhat.com>
9500         * tree.c (cp_cannot_inline_tree_fn): Same.
9502 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
9504         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
9505         insert_block, getdecls, global_bindings_p): New.
9507 2002-03-20  Nathan Sidwell  <nathan@codesourcery.com>
9509         PR c++/4361
9510         * mangle.c (struct globals) Add internal_mangling_p member.
9511         (write_template_param): Do internal mangling, if needed.
9512         (mangle_conv_op_name_for_type): Request internal mangling.
9514 2002-03-20  Jason Merrill  <jason@redhat.com>
9516         PR c++/2136
9517         * init.c (build_delete): Check access for a member op delete here.
9518         * decl2.c (delete_sanity): Not here.
9520 2002-03-19  Jason Merrill  <jason@redhat.com>
9522         PR c++/5118
9523         * class.c (get_vfield_name): Use the constructor_name.
9525 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
9527         * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
9528         * cp-tree.h (lang_printable_name): Rename.
9529         * error.c (lang_decl_name): Use new hook.
9530         * lex.c (cxx_init): Remove old hook.
9531         * pt.c (tsubst_decl): Use new hook.
9532         * tree.c (lang_printable_name): Rename.
9534 2002-03-18  Eric Botcazou  <ebotcazou@multimania.com>
9536         PR c++/3882
9537         * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
9538         (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
9539         only after recording the declaration.
9541 2002-03-18  Jason Merrill  <jason@redhat.com>
9543         PR c++/2039
9544         * init.c (resolve_offset_ref): Hand off to build_component_ref.
9546         PR c++/4222, c++/5995
9547         * call.c (build_over_call): Fix empty class logic.
9549         PR c++/3870
9550         * cp-tree.h (struct saved_scope): Add last_parms field.
9551         * decl.c (maybe_push_to_top_level): Save last_function_parms.
9552         (pop_from_top_level): Restore it.
9554         PR c++/4377
9555         * mangle.c (write_expression): Strip NOP_EXPRs sooner.  Also strip
9556         NON_LVALUE_EXPRs.
9558         PR c++/4003
9559         * pt.c (tsubst_friend_function): Use decl_namespace_context.
9561         PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
9562         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
9563         type with a nontrivial destructor.
9565 2002-03-17  Jason Merrill  <jason@redhat.com>
9567         PR c++/4460
9568         * class.c (build_base_path): Virtual base layout is fixed in
9569         in-charge [cd]tors.
9571 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
9573         * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
9574         * parse.y (yyparse): Remove macro.
9576 2002-03-17  Jason Merrill  <jason@redhat.com>
9578         PR c++/5757
9579         * init.c (build_new_1): Pass the right pointer to op delete.
9581 2002-03-16  Nathan Sidwell  <nathan@codesourcery.com>
9583         PR c++/4361
9584         * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
9585         conversion operators go.
9586         (struct lang_decl_flags): Add template_conv_p and unused
9587         bitfields.
9588         (DECL_TEMPLATE_CONV_FN_P): New macro.
9589         * call.c (build_user_type_conversion_1): Don't check second type
9590         conversion of overload set first.
9591         * class.c (add_method): Make sure templated conversion operators
9592         all end up on slot 2.
9593         * lex.c (do_identifier): A conversion operator token might be
9594         satisfied by a templated conversion operator.
9595         * pt.c (check_explicit_specialization): Use
9596         CLASSTYPE_FIRST_CONVERSION_SLOT.
9597         (template_parm_this_level_p): New function.
9598         (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
9599         * search.c (lookup_fnfields_1): Template conversions will be on
9600         the first slot.
9601         * typeck.c (build_component_ref): Preserve the type of an
9602         conversion operator name on the overload type.
9603         (build_x_function_call): Retrieve the conversion operator name.
9605 2002-03-15  Richard Henderson  <rth@redhat.com>
9607         * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
9609 2002-03-15  Mark Mitchell  <mark@codesourcery.com>
9611         * cp-tree.h (CLEANUP_DECL): Remove.
9612         (CLEANUP_EXPR): Likewise.
9613         * decl.c (destroy_local_var): Simplify.
9614         (maybe_build_cleanup): Tidy.
9615         * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
9616         * semantics.c (cp_expand_stmt): Likewise.
9617         * cp/tree.c (cp_statement_code_p): Likewise.
9619 2002-03-15  Jason Merrill  <jason@redhat.com>
9621         PR c++/5857
9622         * decl.c (duplicate_decls): Use merge_types instead of common_type.
9623         * typeck.c (common_type): Just hand off to
9624         type_after_usual_arithmetic_conversions and
9625         composite_pointer_type.
9626         (merge_types): New fn.
9627         (commonparms): Use it instead of common_type.
9628         (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
9629         (composite_pointer_type): Also handle attributes.
9630         * cp-tree.h: Declare merge_types.
9632         * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
9633         variables.
9634         * decl2.c (maybe_make_one_only): Also mark the decl as needed.
9636 2002-03-14  Richard Henderson  <rth@redhat.com>
9638         * decl.c: Include c-pragma.h.
9639         (start_decl, start_function): Invoke maybe_apply_pragma_weak.
9640         * Make-lang.in: Update dependencies.
9642 2002-03-14  Jakub Jelinek  <jakub@redhat.com>
9644         PR c++/5908
9645         * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
9646         * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
9648 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
9650         * mangle.c (write_builtin_type): Handle 128-bit integers even if
9651         they are not a standard integer type.
9653 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
9655         * cp-tree.h (init_init_processing): Remove declaration.
9656         * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
9657         * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
9659 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9661         * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
9662         Define.
9663         * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
9664         tree_code_length.
9665         * lex.c (cplus_tree_code_type, cplus_tree_code_length,
9666         cplus_tree_code_name): Delete.
9667         (cxx_init): Don't call add_c_tree_codes, instead set
9668         lang_unsafe_for_reeval.  Don't try to copy into the various
9669         tree_code arrays.
9671 2002-03-12  Nathan Sidwell  <nathan@codesourcery.com>
9673         PR c++/5659
9674         * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
9675         * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
9676         definitions.
9678 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
9680         Revert 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>,
9681         DR209 is now not a defect.
9682         * cp-tree.h (skip_type_access_control): Remove.
9683         * decl.c (grokdeclarator): Do type access control for friend
9684         declarations.
9685         * semantics.c (decl_type_access_control): Don't reset
9686         current_type_lookups.
9687         (save_type_access_control): Always save the lookups.
9688         (skip_type_access_control): Remove.
9689         (finish_class_definition): Don't change type_lookups.
9691 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
9693         Revert 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>,
9694         It is incorrect.
9695         * typeck.c (build_static_cast): Compare non-qualified types
9696         with pointer to member conversions.
9698 2002-03-11  Dan Nicolaescu  <dann@ics.uci.edu>
9699             Daniel Berlin  <dan@dberlin.org>
9701         * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
9702         (cxx_get_alias_set): Use it.
9704 2002-03-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9706         * cp-tree.h (stabilize_expr): Prototype.
9708 2002-03-08  Craig Rodrigues  <rodrigc@gcc.gnu.org>
9710         * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
9711         conditional return void.
9713 2002-03-08  Neil Booth  <neil@daikokuya.demon.co.uk>
9715         * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
9716         * cp-tree.h (cxx_unsave): New.
9717         * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
9718         (init_tree): Update.
9720 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9722         * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
9723         explicit sizeof/sizeof.
9724         * decl2.c (cxx_decode_option): Likewise.
9725         * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
9727 2002-03-02  Nathan Sidwell  <nathan@codesourcery.com>
9729         PR c++/775
9730         * decl.c (lookup_tag): Only reject enum/class mismatch, not
9731         class/union mismatch.
9732         * parse.y (check_class_key): New function.
9733         (structsp): Call it.
9735 2002-03-01  Michael Matz  <matz@suse.de>
9737         * typeck.c (cp_pointer_int_sum): Complete inner type which is
9738         used later by size_in_bytes().
9740 2002-03-01  Phil Edwards  <pme@gcc.gnu.org>
9742         * cp-tree.h:  Require __GNUC__ to be #defined.
9743         (build_init):  Add missing prototype.
9745 2002-03-01  Jason Merrill  <jason@redhat.com>
9747         * except.c: Don't include decl.h or obstack.h.  Do include
9748         tree-inline.h.
9749         (build_throw): Destroy temporaries from the thrown
9750         expression before calling __cxa_throw.  Construct a thrown
9751         temporary directly into the exception object.
9752         (stabilize_throw_expr): New function.
9753         (wrap_cleanups_r): New function.
9754         * tree.c (stabilize_expr): New function.
9755         * init.c (build_init): New function.
9756         * Make-lang.in (cp/except.o): Adjust .h deps.
9758 2002-02-28  Jason Merrill  <jason@redhat.com>
9760         * search.c (lookup_base_r): Don't clear is_non_public just because
9761         we found a friendly scope.
9763         * decl.c (finish_function): Only warn about missing return
9764         statement with -Wreturn-type.
9766 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
9768         * class.c (build_clone): Update.
9769         * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
9770         * cp-tree.h (cxx_dup_lang_specific_decl): New.
9771         * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
9772         (copy_decl): Update.
9773         * method.c (make_thunk): Update.
9775 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
9777         * decl2.c: Delete traditional-mode-related code copied from
9778         the C front end but not used, or used only to permit the
9779         compiler to link.
9781 2002-02-24 Craig Rodrigues  <rodrigc@gcc.gnu.org>
9783         PR c++/4093
9784         * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
9785         to void.
9787 2002-02-22  Jakub Jelinek  <jakub@redhat.com>
9789         PR other/5746
9790         * semantics.c (finish_switch_cond): Don't call get_unwidened
9791         if error_mark_node.
9793 2002-02-22  Nathan Sidwell  <nathan@codesourcery.com>
9795         PR c++/2645, DR 295
9796         * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
9797         tf_keep_type_decl.
9798         (make_typename_type): Use tsubst_flags_t.
9799         * decl.c (make_typename_type): Adjust. Return non-artificial
9800         TYPE_DECLs, if required.
9801         (grokdeclarator): Simplify CVR qualification handling. Allow bad
9802         qualifiers on typedef types.
9803         * decl2.c (handle_class_head): Adjust make_typename_type call.
9804         * parse.y (nested_name_specifier): Likewise.
9805         (typename_sub0): Likewise.
9806         (typename_sub1): Likewise.
9807         * pt.c (convert_template_argument): Adjust make_typename_type
9808         return value.
9809         (tsubst): Adjust cp_build_qualified_type_real calls.
9810         (check_cv_quals_for_unify): Cope with allowing bad qualifications
9811         on template type parms.
9812         (instantiate_decl): Recheck substitutions to give warnings on bad
9813         qualifications.
9814         * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
9816 2002-02-21  Aldy Hernandez  <aldyh@redhat.com>
9818         * cp/decl.c (duplicate_decls): Merge always_inline attribute.
9820         * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
9821         unless DECL_ALWAYS_INLINE.
9823 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
9825         * typeck.c (cp_pointer_int_sum): Renamed from
9826         pointer_int_sum, call pointer_int_sum.
9828 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
9830         * decl.c (duplicate_decls): Return 0 if issued error about
9831         redeclaration.
9833 2002-02-19  Jason Merrill  <jason@redhat.com>
9835         ABI change: Mangle `void (A::*)() const' as
9836         M1AKFvvE, not MK1AFvvE.
9837         * mangle.c (write_function_type): Write cv-quals for member
9838         function type here.
9839         (write_pointer_to_member_type): Not here.
9841 2002-02-18  Jason Merrill  <jason@redhat.com>
9843         * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
9844         (do_decl_instantiation): Likewise.
9846 2002-02-17  Craig Rodrigues  <rodrigc@gcc.gnu.org>
9848         PR c++/5685
9849         * decl.c (duplicate_decls): Make warning unconditional
9850         if duplicate default argument declarations are present.
9852 2002-02-17  Jakub Jelinek  <jakub@redhat.com>
9854         * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
9855         shortening.
9857 2002-02-15  Nathan Sidwell  <nathan@codesourcery.com>
9859         * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
9860         remove incorrect comment. Move #if 0'd code to common path. Use
9861         IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
9863 2002-02-13  Jason Merrill  <jason@redhat.com>
9865         * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
9866         (finish_function): Don't warn if current_function_returns_null.
9868         * typeck2.c (digest_init): Do handle values of vector type.
9870         * typeck2.c (digest_init, process_init_constructor): Treat vectors
9871         like arrays.
9873 2002-02-11  Jason Merrill  <jason@redhat.com>
9875         * parse.y (reserved_declspecs): Don't handle attributes.
9876         (reserved_typespecquals): Handle them here.
9877         * Make-lang.in (parse.c): Adjust expected conflicts.
9879 2002-02-08  Jakub Jelinek  <jakub@redhat.com>
9881         * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
9882         instead of compstmt.
9883         (compstmt_or_stmtexpr): Renamed from compstmt.
9884         (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
9886 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
9888         Rename instantiate_type_flags to tsubst_flags_t & expand use.
9889         * cp-tree.h (instantiate_type_flags): Rename to ...
9890         (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
9891         add tf_warning flag.
9892         (instantiate_type): Adjust prototype.
9893         (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
9894         do_type_instantiation, cp_build_qualified_type_real): Likewise.
9895         cp_build_qualified_type: Adjust.
9896         * class.c (instantiate_type): Adjust parameter. Rename itf_* to
9897         tf_*.
9898         * call.c (standard_conversion): Rename itf_* to tf_*.
9899         (reference_binding): Likewise.
9900         (convert_like_real): Likewise.
9901         * cvt.c (cp_convert_to_pointer): Likewise.
9902         (convert_to_reference): Likewise.
9903         * decl.c (lookup_namespace_name): Use tf_* flags.
9904         (make_typename_type): Likewise.
9905         (grokdeclarator): Likewise.
9906         * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
9907         (coerce_template_template_parms, convert_template_argument,
9908         coerce_template_parms, maybe_get_template_decl_from_type_decl,
9909         lookup_template_class, tsubst_friend_function, tsubst_friend_class,
9910         instantiate_class_template, tsubst_template_arg_vector,
9911         tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
9912         tsubst_decl, tsubst_arg_types, tsubst_function_type,
9913         tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
9914         instantiate_template, fn_type_unification,
9915         resolve_overloaded_unification, verify_class_unification,
9916         unify, get_bindings_real, do_type_instantiation,
9917         regenerate_decl_from_template, instantiate_decl,
9918         tsubst_initializer_list, tsubst_enum,
9919         get_mostly_instantiated_function_type,
9920         invalid_nontype_parm_type_p): Likewise.
9921         * tree.c (cp_build_qualified_type_real): Likewise.
9922         * typeck.c (build_binary_op): Rename itf_* to tf_*.
9923         (build_ptrmemfunc): Likewise.
9924         (convert_for_assignment): Likewise.
9926 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
9928         PR c++/109
9929         * decl.c (grokdeclarator): Allow friend declarations from
9930         dependent types.
9931         * decl2.c (handle_class_head): Don't push into template parm contexts.
9932         * pt.c (push_template_decl_real): Template parm contexts are never
9933         being defined.
9935 2002-02-05  Alexandre Oliva  <aoliva@redhat.com>
9937         * class.c: Include target.h.
9938         (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
9939         BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
9940         bit-field layout.
9941         * Make-lang.in: Adjust deps.
9943 2002-02-05  Jason Merrill  <jason@redhat.com>
9945         * error.c (dump_type): Be more helpful about VECTOR_TYPE.
9947 2002-02-04  Jakub Jelinek  <jakub@redhat.com>
9949         * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
9950         (finish_switch_cond): Set SWITCH_TYPE.
9952 2002-02-04  Richard Henderson  <rth@redhat.com>
9954         * method.c (use_thunk): Always initialize the block tree.  Reindent.
9955         * semantics.c (expand_body): Emit thunks after function, not before.
9957 2002-02-04  Jason Merrill  <jason@redhat.com>
9959         * decl.c (start_function): Call cplus_decl_attributes immediately
9960         after grokdeclarator.
9962         * decl.c (start_function): Combine DECL_RESULT handling code.
9964 2002-02-03  Jason Merrill  <jason@redhat.com>
9966         * xref.c: Remove.
9967         * Make-lang.in (CXX_OBJS): Remove cp/xref.o
9968         (cp/xref.o): Remove dependencies.
9969         * class.c (finish_struct_1, check_methods): Don't call xref fns.
9970         (finish_struct_1): Likewise.
9971         * friend.c (make_friend_class): Likewise.
9972         * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
9973         * spew.c (read_process_identifier): Likewise.
9975 2002-02-01  Jason Merrill  <jason@redhat.com>
9977         PR c++/4872
9978         * decl.c (finish_function): Warn about a non-void function with
9979         no return statement and no abnormal exit.
9980         * cp-tree.h (struct cp_language_function): Add returns_abnormally.
9981         (current_function_returns_abnormally): New macro.
9982         * call.c (build_call): Set it.
9984         * typeck.c (build_component_ref): Always complain about offsetof
9985         constructs on non-PODs.  Only make it an error for members of
9986         virtual bases.
9988         * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
9989         (dump_function_decl): Always dump parms.
9991         * decl2.c (finish_static_data_member_decl): Complain about a local
9992         class with a static data member.
9994         PR c++/4286
9995         * search.c (lookup_field_1): Don't xref a static data member
9996         just because we looked it up.
9998 2002-01-31  Jason Merrill  <jason@redhat.com>
10000         * Make-lang.in (parse.c): Handle .output file.
10002         PR c++/3395
10003         * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
10004         not TREE_TYPE.
10005         * semantics.c (finish_class_definition): Adjust.
10007         Allow attributes in parms and casts.
10008         * parse.y (named_parm): Don't strip attrs.
10009         (declmods): Remove 'attributes' production.
10010         (nonempty_cv_qualifiers): Accept attributes.
10011         (ATTRIBUTE): Give precedence.
10012         * decl.c (groktypename): Handle attributes.
10013         (grokparms): Likewise.
10015 2002-01-29  Jakub Jelinek  <jakub@redhat.com>
10017         * decl2.c (cxx_decode_option): Pass 0 as last argument to
10018         cpp_handle_option.
10019         * lang-specs.h: Use cpp_unique_options instead of cpp_options
10020         when used together with cc1_options.
10022 2002-01-29  Nathan Sidwell  <nathan@codesourcery.com>
10024         PR c++/5132
10025         * typeck2.c (digest_init): Make sure non-array core type is
10026         instantiated.
10027         * decl2.c (reparse_absdcl_as_casts): Just store the type in the
10028         constructor, rather than build a new one.
10029         (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
10030         PURPOSE of constructor elts.
10032 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
10034         * Make-lang.in (parse.c): Adjust expected number of
10035         shift-reduce conflicts.
10036         (decl.o): Depend on diagnostic.h.
10037         * decl.c: Include diagnostic.h.
10038         (grokdeclarator): Check for null pointer.
10039         (finish_function): Don't abort when
10040         current_binding_level->parm_flag != 1, if errors have
10041         occurred; throw away the statement tree and extra binding
10042         levels, and continue.
10043         * lex.c (note_list_got_semicolon): Check for null pointer.
10044         * method.c (hack_identifier): Just return error_mark_node if
10045         value is error_mark_node.
10046         * parse.y (primary: TYPEID(type_id)): No need to use
10047         TYPE_MAIN_VARIANT here.
10048         (handler_seq): Accept an empty list of catch clauses and
10049         generate a fake handler block to avoid later crashes.
10050         (ansi_raise_identifier): Accept the error token too.
10051         * semantics.c (begin_class_definition,
10052         finish_class_definition): Check for error_mark_node.
10054 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
10056         * typeck2.c (friendly_abort): Delete definition.
10057         * cp-tree.h (friendly_abort): Don't prototype.
10058         (my_friendly_assert): Use fancy_abort.
10060 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
10062         * cp-tree.h (my_friendly_abort): Remove.
10064 2002-01-23  Jakub Jelinek  <jakub@redhat.com>
10066         * spew.c (pending_inlines, pending_inlines_tail,
10067         processing_these_inlines): Make static.
10068         (mark_pending_inlines): Remove static.
10069         (begin_parsing_inclass_inline): If in function, save pi
10070         for GC to cp_function_chain->unparsed_inlines instead.
10071         (process_next_inline): Likewise.
10072         * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
10073         (mark_pending_inlines): Add prototype.
10074         * decl.c (spew_debug): Remove unused extern.
10075         (mark_lang_function): Call mark_pending_inlines.
10077 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
10079         * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
10080         init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
10081         semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
10082         Change my_fancy_abort() to abort().
10084 2002-01-23  Jason Merrill  <jason@redhat.com>
10086         PR c++/5453
10087         * class.c (fixed_type_or_null): Fix thinko.
10089         PR c++/3331
10090         * init.c (resolve_offset_ref): Use build_indirect_ref.
10092         * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
10094 2002-01-22  Jason Merrill  <jason@redhat.com>
10096         * parse.y (function_body): Suppress the block for the outermost
10097         curly braces.
10098         * decl.c (pushdecl): Don't try to skip it.
10099         (begin_function_body): Keep the block we create, not the next one.
10100         * init.c (emit_base_init): Don't mess with keep_next_level.
10102         * class.c (build_base_path): Tweak formatting.
10104 2002-01-19  Nathan Sidwell  <nathan@codesourcery.com>
10106         Fix regression introduced with patch for c++/775
10107         * parse.y (class_head_defn): Check for template specializations
10108         with a different class-key.
10110 2002-01-17  Jason Merrill  <jason@redhat.com>
10112         * decl.c (begin_constructor_body, begin_destructor_body): New fns.
10113         (begin_function_body): Call them and keep_next_level.
10114         * init.c (emit_base_init): Call keep_next_level.
10115         * semantics.c (setup_vtbl_ptr): Lose.
10116         * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
10117         (vtbls_set_up_p): Lose.
10118         * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
10119         * method.c (do_build_copy_constructor): Likewise.
10120         (synthesize_method): Call finish_mem_initializers.
10121         * parse.y (nodecls): Likewise.
10123         * error.c (dump_type_suffix): Print the exception specs before
10124         recursing.
10125         (dump_function_decl): Here, too.
10127         * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
10129 2002-01-10  Ira Ruben   <ira@apple.com>
10131         PR c++/907
10132         * decl.c (start_method): Handle attrlist.
10134 2002-01-10  Jakub Jelinek  <jakub@redhat.com>
10136         * decl2.c (max_tinst_depth): Increase default limit to 500.
10138 2002-01-10  Graham Stott  <grahams@redhat.com>
10140         * spew.c (YYCHAR): Uppercase macro parameter and add
10141         parenthesis.
10142         (YYCODE): Likewise.
10143         (NAME): Uppercase macro parameter.
10145 2002-01-09  Graham Stott  <grahams@redhat.com>
10147         * decl.h (grokdeclarator): Wrap long line.
10149         * semantics.c (FINISH_COND): Uppercase macro paramaters and
10150         add parenthesis.
10152 2002-01-08  Graham Stott  <grahams@redhat.com>
10154         * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
10155         (PALLOC): Uppercase macro parameter and whitespace.
10156         (SALLOC): Uppercase macro parameter.
10157         (SFREE): Uppercase macros parameter, add parenthese and
10158         whitespace.
10159         (STREQL): Uppercase macro parameter and whitespace.
10160         (STRNEQ): Likewise.
10161         (STRLSS): Likewise.
10162         (STRLEQ): Likewise.
10163         (STRGTR): Likewise.
10164         (STRGEQ): Likewise.
10166         * call.c (convert_like): Add parenthesis and wrap.
10167         (convert_like_with_context): Likewise.
10168         (ICS_RANK): Whitespace.
10169         (NEED_TEMPORARY_P): Remove parenthesis.
10171         * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
10172         whitespace.
10173         (VTT_MARKED_BINFO_P): Likewise.
10175         * decl.c (BINDING_LEVEL): Add parenthesis.
10176         (DEF_OPERATOR): Likewise.
10178         * mangle.c (MANGLE_TRACE): Add parenthesis.
10179         (MANGLE_TRACE_TREE): Likewise.
10180         (write_signed_number): Likewise.
10181         (write_unsigned_number): Likewise.
10183         * pt.c (ccat): Uppercase macro parameter.
10184         (cat): Likewise
10186         * search.c (SET_BINFO_ACCESS): Add parenthesis.
10188 2002-01-07  Jason Merrill  <jason@redhat.com>
10190         * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
10191         to pedwarn.
10193         PR c++/3536
10194         * method.c (make_thunk): If !flag_weak, give the thunk the
10195         function's linkage.
10196         (use_thunk): Here, too.
10198 2002-01-07  Graham Stott  <grahams@redhat.com>
10200         * error.c: Update copyright date.
10201         (print_scope_operator): Add parenthesis.
10202         (print_left_paren): Likewise.
10203         (print_right_paren): Likewise.
10204         (print_left_bracket): Likewise.
10205         (print_right_bracket): Likewise.
10206         (print_template_argument_list_start): Likewise.
10207         (print_template_argument_list_end): Likewise.
10208         (print_non_consecutive_character): Likewise.
10209         (print_tree_identifier): Likewise.
10210         (print_identifier): Likewise.
10211         (NEXT_CODE): Uppercase macro parameter.
10212         (ident_fndecl): Delete unused.
10213         (GLOBAL_THING): Likewise.
10215 2002-01-06  Graham Stott  <grahams@redhat.com>
10217         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
10218         (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
10219         (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
10220         (RECORD_OR_UNION_TYPE_CHECK): Likewise.
10221         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
10222         (C_IS_RESERVED_WORD): Uppercase macro parameter.
10223         (C_RID_YYCODE) Likewise.
10224         (ptrmem_cst): Use rtx.
10225         (LOCAL_BINDING_P): Add whitespace.
10226         (INHERITED_VALUE_BINDING_P): Likewise.
10227         (BINDING_SCOPE): Wrap long line.
10228         (BINDING_HAS_LEVEL_P): Remove parenthesis.
10229         (BINDING_VALUE): Wrap long line.
10230         (BINDING_TYPE): Whitespace.
10231         (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
10232         (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
10233         (IDENTIFIER_NAMESPACE_VALUE): Likewise.
10234         (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
10235         (same_type_p): Uppercase macro parameters.
10236         (same_type_ignoring_top_level_qualifiers_p): Likewise.
10237         (OVL_FUNCTION): Wrap long line.
10238         (OVL_CHAIN): Whitespace.
10239         (OVL_CURRENT): Add parenthesis and whitespace.
10240         (OVL_NEXT): Whitespace.
10241         (OVL_USED): Likewise.
10242         (IDENTIFIER_TYPE_VALUE): Likewise.
10243         (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
10244         (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
10245         (LANG_ID_FIELD): Whitespace.
10246         (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
10247         (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
10248         (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
10249         (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
10250         (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
10251         (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
10252         (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
10253         (IDENTIFIER_VIRTUAL_P): Likewise.
10254         (IDENTIFIER_OPNAME_P): Likewise.
10255         (IDENTIFIER_TYPENAME_P): Remove parenthesis.
10256         (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
10257         (C_SET_EXP_ORIGINAL_CODE): Likewise.
10258         (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
10259         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
10260         (IS_AGGR_TYPE): Uppercase macro parameter.
10261         (CLASS_TYPE_P): Likewise.
10262         (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
10263         (IS_AGGR_TYPE_2): Whitespace.
10264         (TAGGED_TYPE_P): Uppercase macro parameter.
10265         (TYPE_BUILT_IN): Whitespace.
10266         (TYPE_FOR_JAVA): Likewise.
10267         (FUNCTION_ARG_CHAIN): Remove parenthesis.
10268         (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
10269         (FUNCTION_FIRST_USER_PARAM): Likewise.
10270         (PROMOTES_TO_AGGR_TYPE): Whitespace.
10271         (DERIVED_FROM_P): Add parenthesis and wrap.
10272         (UNIQUELY_DERIVED_FROM_P): Likewise.
10273         (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
10274         (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
10275         (CLASSTYPE_USE_TEMPLATE): Whitespace.
10276         (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
10277         (TYPE_GETS_DELETE): Add parenthesis.
10278         (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
10279         (TYPE_HAS_ASSIGN_REF): Likewise,
10280         (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
10281         (TYPE_HAS_INIT_REF): Likewise.
10282         (TYPE_HAS_CONST_INIT_REF): Likewise.
10283         (TYPE_BEING_DEFINED): Likewise.
10284         (TYPE_LANG_SPECIFIC): Likewise.
10285         (CLASSTYPE_RTTI): Likewise.
10286         (TYPE_OVERLOADS_CALL_EXPR): Likewise.
10287         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
10288         (TYPE_OVERLOADS_ARROW): Likewise.
10289         (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
10290         (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
10291         (CLASSTYPE_METHOD_VEC): Likewise.
10292         (CLASSTYPE_MARKED_N): Likewise.
10293         (CLASSTYPE_MARKED): Likewise.
10294         (CLASSTYPE_MARKED2): Likewise.
10295         (CLASSTYPE_MARKED3): Likewise.
10296         (CLASSTYPE_MARKED4): Likewise.
10297         (CLASSTYPE_MARKED5): Likewise.
10298         (CLASSTYPE_MARKED6): Likewise.
10299         (SET_CLASSTYPE_MARKED): Whitespace.
10300         (CLEAR_CLASSTYPE_MARKED): Likewise.
10301         (SET_CLASSTYPE_MARKED2): Likewise.
10302         (CLEAR_CLASSTYPE_MARKED2): Likewise.
10303         (SET_CLASSTYPE_MARKED3): Likewise.
10304         (CLEAR_CLASSTYPE_MARKED3): Likewise.
10305         (SET_CLASSTYPE_MARKED4): Likewise.
10306         (CLEAR_CLASSTYPE_MARKED4): Likewise.
10307         (SET_CLASSTYPE_MARKED5): Likewise.
10308         (CLEAR_CLASSTYPE_MARKED5): Likewise.
10309         (SET_CLASSTYPE_MARKED6): Likewise.
10310         (CLEAR_CLASSTYPE_MARKED6): Likewise.
10311         (CLASSTYPE_TAGS): Likewise.
10312         (CLASSTYPE_VSIZE): Likewise.
10313         (CLASSTYPE_VBASECLASSES): Likewise.
10314         (CANONICAL_BINFO): Add parenthesis.
10315         (CLASSTYPE_SIZE(NODE): Likewise.
10316         (CLASSTYPE_SIZE_UNIT): Likewise.
10317         (CLASSTYPE_ALIGN(NODE): Likewise.
10318         (CLASSTYPE_USER_ALIGN): Likewise.
10319         (TYPE_JAVA_INTERFACE): Likewise.
10320         (CLASSTYPE_PURE_VIRTUALS): Likewise.
10321         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
10322         (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
10323         (CLASSTYPE_HAS_MUTABLE): Likewise.
10324         (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
10325         (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
10326         (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
10327         (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
10328         (CLASSTYPE_INTERFACE_ONLY): Likewise.
10329         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
10330         (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
10331         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
10332         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
10333         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
10334         (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
10335         (BINFO_UNSHARED_MARKED): Whitespace.
10336         (BINFO_MARKED): Whitespace and wrap.
10337         (SET_BINFO_MARKED): Likewise.
10338         (CLEAR_BINFO_MARKED): Likewise.
10339         (BINFO_VTABLE_PATH_MARKED): Likewise.
10340         (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
10341         (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
10342         (BINFO_SUBVTT_INDEX): Remove parenthesis.
10343         (BINFO_VPTR_INDEX): Likewise.
10344         (BINFO_PRIMARY_BASE_OF): Likewise,
10345         (CLASSTYPE_VFIELDS): Whitespace.
10346         (VF_DERIVED_VALUE): Wrap long line.
10347         (NAMESPACE_LEVEL): Whitespace.
10348         (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
10349         (DEFARG_POINTER): Whitespace.
10350         (DECL_NEEDED_P): Remove parenthesis.
10351         (DECL_LANGUAGE): Whitespace.
10352         (SET_DECL_LANGUAGE): Add parenthesis.
10353         (DECL_CONSTRUCTOR_P): Whitespace and wrap.
10354         (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
10355         (DECL_IN_AGGR_P): Whitespace.
10356         (DECL_FRIEND_P): Likewise.
10357         (DECL_BEFRIENDING_CLASSES): Likewise.
10358         (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
10359         (DECL_NONCONVERTING_P): Whitespace.
10360         (DECL_PURE_VIRTUAL_P): Likewise.
10361         (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
10362         (DECL_PENDING_INLINE_INFO): Whitespace.
10363         (DECL_SORTED_FIELDS): Likewise.
10364         (DECL_DEFERRED_FN): Likewise.
10365         (DECL_TEMPLATE_INFO): Likewise.
10366         (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
10367         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
10368         (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
10369         (TMPL_ARGS_LEVEL): Likewise.
10370         (SET_TMPL_ARGS_LEVEL): Likewise.
10371         (INNERMOST_TEMPLATE_PARMS): Whitespace.
10372         (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
10373         (INTEGRAL_CODE_P(CODE): Add parenthesis.
10374         (CP_INTEGRAL_TYPE_P): Remove parenthesis.
10375         (TYPE_HAS_CONSTRUCTOR): Whitespace.
10376         (TREE_HAS_CONSTRUCTOR): Likewise.
10377         (TYPE_HAS_DESTRUCTOR): Likewise.
10378         (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
10379         (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
10380         (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
10381         (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
10382         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
10383         (TYPE_PTRMEMFUNC_P): Likewise.
10384         (TYPE_PTRMEMFUNC_FLAG): Likewise.
10385         (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
10386         (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
10387         (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
10388         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
10389         (DECL_ACCESS): Whitespace.
10390         (DECL_GLOBAL_CTOR_P): Remove parenthesis.
10391         (DECL_GLOBAL_DTOR_P): Likewise.
10392         (GLOBAL_INIT_PRIORITY): Likewise.
10393         (DECL_TEMPLATE_PARMS): Likewise.
10394         (DECL_TEMPLATE_RESULT): Likewise.
10395         (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
10396         (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
10397         (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
10398         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
10399         (PRIMARY_TEMPLATE_P): Add parenthesis.
10400         (DECL_USE_TEMPLATE): Whitespace.
10401         (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
10402         (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
10403         (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
10404         (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
10405         (CALL_DECLARATOR_PARMS): Remove parenthesis.
10406         (CALL_DECLARATOR_QUALS): Likewise.
10407         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
10408         (TEMP_NAME_P): Wrap.
10409         (VFIELD_NAME_P): Likewise.
10410         (B_SET): Uppercase macro parameters and add parenthesis.
10411         (B_CLR): Likewise.
10412         (B_TST): Likewise.
10413         (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
10414         (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
10415         (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
10416         (same_or_base_type_p): Likewise.
10417         (cp_deprecated): Likewise.
10419 2002-01-05  Richard Henderson  <rth@redhat.com>
10421         * semantics.c (expand_body): Revert last change.
10423 2002-01-04  Jason Merrill  <jason@redhat.com>
10425         PR c++/4122
10426         * class.c (update_vtable_entry_for_fn): Set delta to zero for a
10427         lost primary.
10429         * class.c (build_vtbl_initializer): Check for a lost primary
10430         before calculating the vtable entry to throw away.
10432 2002-01-02  Jason Merrill  <jason@redhat.com>
10434         * semantics.c (expand_body): Call outlining_inline_function when
10435         emitting an inline function out of line.
10437 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10439         PR c++/5116, c++/764 reversion
10440         * call.c (build_new_op): Revert the instantiations. They are
10441         incorrect.
10443 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10445         PR c++/5089
10446         * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
10448 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10450         PR c++/3716
10451         * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
10452         (tsubst, case POINTER_TYPE): Handle pmfs here.
10453         (tsubst, case OFFSET_TYPE): Check it is not an offset to
10454         reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
10456 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10458         PR c++/35
10459         * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
10460         (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
10461         * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
10462         PARM_DECL.
10463         (tsubst_template_parms): Break up loop statements.
10464         (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
10465         parm PARM_DECLs don't get promoted.
10467 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10469         PR c++/5123
10470         * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
10471         (build_x_function_call): Cope with a COMPONENT_REF containing a
10472         TEMPLATE_ID_EXPR.
10474 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10476         PR c++/5213
10477         * pt.c (convert_template_argument): Be more careful determining
10478         when RECORD_TYPE templates are or are not templates.
10480 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10482         PR c++/775
10483         * cp-tree.h (handle_class_head): Adjust prototype.
10484         * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
10485         parameters. Use for all class heads.
10486         * parse.y (named_class_head_sans_basetype, named_class_head,
10487         named_complex_class_head_sans_basetype,
10488         named_class_head_sans_basetype_defn,
10489         unnamed_class_head): Remove.
10490         (class_head, class_head_apparent_template): Recognize class heads
10491         (class_head_decl, class_head_defn): New reductions. Process class
10492         heads.
10493         (structsp): Adjust class definition and class declaration
10494         reductions.
10495         (maybe_base_class_list): Give diagnostic on empty list.
10497 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10499         PR c++/4379
10500         * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
10501         single non-static member.
10502         (unary_complex_lvalue): If it cannot be a pointer to member, don't
10503         make it so. Check it is not pointer to reference.
10505 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10507         PR c++/5132
10508         * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
10509         are processing a template decl.
10511 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10513         PR c++/5116, c++/764
10514         * call.c (build_new_op): Make sure template class operands are
10515         instantiated. Simplify arglist construction.
10517 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
10519         * call.c (build_user_type_conversion_1): Use my_friendly_assert
10520         rather than if ... abort.
10521         * cvt.c (convert_to_reference): Likewise.
10522         * semantics.c (setup_vtbl_ptr): Likewise.
10523         * pt.c (lookup_template_class): Comment typo.
10525 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
10527         PR c++/5125
10528         * pt.c (push_template_decl_real): Make sure DECL has
10529         DECL_LANG_SPECIFIC.
10531 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
10533         PR c++/335
10534         * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
10535         for non-reference fields.
10536         * typeck.c (require_complete_type): Use resolve_offset_ref).
10538 2001-12-26  Nathan Sidwell  <nathan@codesourcery.com>
10540         PR c++/196
10541         * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
10543 2001-12-24  Nathan Sidwell  <nathan@codesourcery.com>
10545         PR c++/160
10546         * typeck.c (build_modify_expr): Remove old unreachable code & tidy
10547         up. Don't stabilize_references when initializing a reference.
10549 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10551         * decl2.c (lang_f_options): Const-ify.
10553 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
10555         * config-lang.in (diff_excludes): Remove.
10557 2001-12-19  Nathan Sidwell  <nathan@codesourcery.com>
10559         PR c++/90
10560         * typeck.c (build_function_call_real): Use original function
10561         expression for errors.
10563 2001-12-18  Jason Merrill  <jason@redhat.com>
10565         PR c++/3242
10566         * class.c (add_method): Do compare 'this' quals when trying to match a
10567         used function.  Don't defer to another used function.
10569 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
10571         * pt.c (instantiate_clone): Remove, fold into ...
10572         (instantiate_template): ... here. Simplify by removing mutual
10573         recursion.
10574         * typeck2.c (build_m_component_ref): Don't cv qualify the function
10575         pointed to by a pointer to function.
10576         * class.c (delete_duplicate_fields_1): Typo.
10578 2001-12-18  Jason Merrill  <jason@redhat.com>
10580         C++ ABI change: destroy value arguments in caller.
10581         * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
10582         create an extra binding level for the parameters.
10583         * decl.c (store_parm_decls): Don't do parameter cleanups.
10585 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
10587         * call.c (build_new_method_call): Use '%#V'.
10588         * error.c (cv_to_string): Use V parameter to determine padding.
10590 2001-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
10592         * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
10593         spellings in messages.
10595 2001-12-17  Zack Weinberg  <zack@codesourcery.com>
10597         * cp-tree.h: Delete #defines for cp_error, cp_warning,
10598         cp_pedwarn, and cp_compiler_error.
10599         * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
10600         except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
10601         rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
10602         typeck2.c: Change calls to the above macros to use their
10603         language-independent equivalents: error, warning, pedwarn, and
10604         internal_error respectively.
10606 2001-12-16  Neil Booth  <neil@daikokuya.demon.co.uk>
10608         * decl2.c (finish_file): Remove back_end_hook.
10610 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
10612         * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
10613         cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
10614         pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
10616 2001-12-15  Joseph S. Myers  <jsm28@cam.ac.uk>
10618         * lang-options.h: Use American spelling in messages.
10620 2001-12-13  Jason Merrill  <jason@redhat.com>
10622         * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
10624         Use cleanups to run base and member destructors.
10625         * init.c (push_base_cleanups): New function, split out from...
10626         (build_delete): ...here.  Lose !TYPE_HAS_DESTRUCTOR code.
10627         * decl.c (finish_destructor_body): Move vbase destruction code to
10628         push_base_cleanups.
10629         (begin_function_body, finish_function_body): New fns.
10630         (finish_function): Move [cd]tor handling and call_poplevel to
10631         finish_function_body.
10632         (pushdecl): Skip the new level.
10633         * semantics.c (genrtl_try_block): Don't call end_protect_partials.
10634         (setup_vtbl_ptr): Call push_base_cleanups.
10635         * method.c (synthesize_method): Call {begin,end}_function_body.
10636         * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
10637         * cp-tree.h: Declare new fns.
10638         * parse.y (function_body, .begin_function_body): New nonterminals.
10639         (fndef, pending_inline, function_try_block): Use function_body.
10640         (ctor_initializer_opt, function_try_block): No longer has a value.
10641         (base_init): Remove .set_base_init token.
10642         (.set_base_init, compstmt_or_error): Remove.
10643         * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
10645         * optimize.c (maybe_clone_body): Fix parameter updating.
10647 2001-12-12  Jason Merrill  <jason@redhat.com>
10649         * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
10650         * semantics.c (genrtl_start_function): Don't pass
10651         parms_have_cleanups or push an extra binding level.
10652         (genrtl_finish_function): Lose cleanup_label cruft.
10654         * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
10655         (ctor_label): Remove.
10656         * semantics.c (finish_return_stmt): Lose ctor_label support.
10657         * decl.c (finish_constructor_body, mark_lang_function): Likewise.
10658         * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
10659         dtor_label.
10661         * call.c (build_new_method_call): Let resolves_to_fixed_type_p
10662         check for [cd]tors.
10663         * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
10665         * decl.c (finish_function): Check VMS_TARGET, not VMS.
10667         * decl.c (start_cleanup_fn): Remove redundant pushlevel.
10668         (end_cleanup_fn): And poplevel.
10670         * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
10671         if we're in a template.
10673 2001-12-12  Jakub Jelinek  <jakub@redhat.com>
10675         * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
10676         ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
10677         THIS_NAME_P): Delete.
10678         * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
10679         THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
10680         with internal naming scheme.
10681         * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
10683 2001-12-12  Nathan Sidwell  <nathan@codesourcery.com>
10685         * decl.c (grokdeclarator): Deprecated implicit typename use.
10687 2001-12-11  Nathan Sidwell  <nathan@codesourcery.com>
10689         PR g++/51
10690         * parse.y (frob_specs): Indicate it is a language linkage which
10691         contained the extern.
10692         * decl.c (grokdeclarator): Allow extern language linkage with
10693         other specifiers.
10695 2001-12-10  Nathan Sidwell  <nathan@codesourcery.com>
10697         PR g++/72
10698         * decl.c (add_binding): Don't reject duplicate typedefs involving
10699         template parameters.
10701 2001-12-10  Neil Booth  <neil@daikokuya.demon.co.uk>
10703         * parse.y, semantics.c: Similarly.
10705 2001-12-09  Nathan Sidwell  <nathan@codesourcery.com>
10707         PR g++/87
10708         * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
10709         (copy_args_p): Rename to ...
10710         (copy_fn_p): ... here.
10711         (grok_special_member_properties): New function.
10712         (grok_op_properties): Lose VIRTUALP parameter.
10713         (copy_assignment_arg_p): Remove.
10714         * call.c (build_over_call): Use copy_fn_p.
10715         * decl.c (grokfndecl): Reformat. Adjust call to
10716         grok_op_properties.
10717         (copy_args_p): Rename to ...
10718         (copy_fn_p): ... here. Reject template functions. Check for pass
10719         by value.
10720         (grok_special_member_properties): Remember special functions.
10721         (grok_ctor_properties): Don't remember them here, just check.
10722         (grok_op_properties): Likewise.
10723         (start_method): Call grok_special_member_properties.
10724         * decl2.c (grokfield): Likewise.
10725         (copy_assignment_arg_p): Remove.
10726         (grok_function_init): Don't remember abstract assignment here.
10727         * pt.c (instantiate_class_template): Call
10728         grok_special_member_properties.
10729         (tsubst_decl): Adjust grok_op_properties call.
10731 2001-12-08  Aldy Hernandez  <aldyh@redhat.com>
10733         * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
10734         RID_TYPES_COMPATIBLE_P.
10736 2001-12-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
10738         * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
10739         call to build_aggr_init.
10740         * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
10742 2001-12-08  Neil Booth  <neil@daikokuya.demon.co.uk>
10744         * parse.y: Replace uses of the string non-terminal with STRING.
10745         Don't perform string concatentaion here.
10746         (string): Remove non-terminal.
10747         * semantics.c (finish_asm_stmt): Don't concatenate strings here.
10749 2001-12-05  Jason Merrill  <jason@redhat.com>
10751         * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
10752         (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
10753         * tree.c (cp_start_inlining, cp_end_inlining): New fns.
10754         * pt.c (push_tinst_level): No longer static.
10755         * cp-tree.h: Declare them.
10757         * init.c (resolve_offset_ref): Don't check access for the base
10758         conversion to access a FIELD_DECL.
10760         * cp-tree.h (TYPE_REFFN_P): New macro.
10761         * decl.c (bad_specifiers): Check it, too.
10763         * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
10764         on the __*_type_info type if we haven't seen a definition.
10766 2001-12-05  Neil Booth  <neil@daikokuya.demon.co.uk>
10768         * decl.c: Include c-common.h.
10769         (shadow_warning): Move to c-common.c.
10771 2001-12-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10773         * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
10775 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
10777         * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
10779 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
10781         PR g++/164
10782         * init.c (sort_base_init): Allow binfos to be directly specified.
10783         * method.c (do_build_copy_constructor): Explicitly convert to the
10784         base instance.
10785         (do_build_assign_ref): Likewise.
10787 2001-12-03  Hans-Peter Nilsson  <hp@bitrange.com>
10789         * decl.c (xref_basetypes): Don't use C99 construct in tag_code
10790         declaration and initialization.
10792 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
10794         * typeck2.c: Remove leading capital from diagnostic messages, as
10795         per GNU coding standards.
10797 2001-12-03  Mumit Khan  <khan@nanotech.wisc.edu>
10799         PR c++/3394
10800         * decl.c (xref_basetypes): Handle attributes between
10801         'class' and name.
10803 2001-12-03  Nathan Sidwell  <nathan@codesourcery.com>
10805         PR g++/3381
10806         * parse.y (named_complex_class_head_sans_basetype): Add new
10807         reduction.
10808         * Make-lang.in (parse.c): Adjust expected conflict count.
10810 2001-12-03  Jason Merrill  <jason@redhat.com>
10812         * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
10813         immediate binfos for our virtual bases.
10815 2001-12-02  Neil Booth  <neil@daikokuya.demon.co.uk>
10817         * call.c (build_java_interface_fn_ref): Similarly.
10818         * except.c (is_admissible_throw_operand): Similarly.
10819         * init.c (build_java_class_ref): Similarly.
10820         * xref.c (open_xref_file): Similarly.
10822 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
10824         * class.c (finish_struct): Remove trailing periods from messages.
10825         * decl.c (check_tag_decl): Similarly.
10826         * lex.c (cxx_set_yydebug): Similarly.
10827         * typeck2.c (friendly_abort): Similarly.
10829 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
10831         PR c++/3048
10832         * cp-tree.h (ovl_member): Remove.
10833         * decl2.c (merge_functions): Handle extern "C" functions
10834         specially.
10835         * tree.c (ovl_member): Remove.
10837 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
10839         PR c++/4842
10840         * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
10841         FUNCTION_DECL, as input.
10842         (mark_overriders): Remove.
10843         (warn_hidden): Rework for the new ABI.
10845 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
10847         PR c++/3471
10848         * call.c (convert_like_real): Do not build additional temporaries
10849         for rvalues of class type.
10851 2001-11-28  Nathan Sidwell  <nathan@codesourcery.com>
10853         * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
10854         (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
10855         (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
10856         (DERIVED_FROM_P): Likewise.
10857         (enum base_access): Renumber, add ba_quiet bit mask.
10858         (get_binfo): Remove.
10859         (get_base_distance): Remove.
10860         (binfo_value): Remove.
10861         (ACCESSIBLY_DERIVED_FROM_P): Remove.
10862         * call.c (standard_conversion): Use lookup_base.
10863         * class.c (strictly_overrides): Likewise.
10864         (layout_virtual_bases): Likewise.
10865         (warn_about_ambiguous_direct_bases): Likewise.
10866         (is_base_of_enclosing_class): Likewise.
10867         (add_vcall_offset_vtbl_entries_1): Likewise.
10868         * cvt.c (build_up_reference): Adjust comment.
10869         * init.c (build_member_call): Reformat.
10870         * search.c (get_binfo): Remove.
10871         (get_base_distance_recursive): Remove.
10872         (get_base_distance): Remove.
10873         (lookup_base_r): Tweak.
10874         (lookup_base): Add ba_quiet control. Complete the types here.
10875         (covariant_return_p): Use lookup_base.
10876         * tree.c (binfo_value): Remove.
10877         (maybe_dummy_object): Use lookup_base.
10878         * typeck.c (build_static_cast): Use lookup_base.
10879         (get_delta_difference): Likewise.
10880         * typeck2.c (binfo_or_else): Use lookup_base.
10881         (build_scoped_ref): Add back error_mark_check.
10882         (build_m_component_ref): Use lookup_base.
10884 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
10886         * Make-lang.in (c++.generated-manpages): New dummy target.
10888 2001-11-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10890         * Make-lang.in (cp-lang.o): Depends on c-common.h.
10891         * cp-lang.c (c-common.h): Include.
10892         (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
10893         * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
10894         * expr.c (init_cplus_expand): Don't set lang_expand_constant.
10896 2001-11-26  Neil Booth  <neil@daikokuya.demon.co.uk>
10898         * decl2.c (c_language): Move to c-common.c.
10899         * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
10900         functions.
10901         (cxx_init): Update.
10903 2001-11-26  Jason Merrill  <jason@redhat.com>
10905         * call.c (joust): Remove COND_EXPR hack.
10907 2001-11-25  Aldy Hernandez  <aldyh@redhat.com>
10909         * search.c (lookup_base_r): Declare bk in variable declaration
10910         space.
10912 2001-11-25  Nathan Sidwell  <nathan@codesourcery.com>
10914         PR g++/3145
10915         * class.c (build_vbase_pointer): Remove.
10916         (build_vbase_path): Remove.
10917         (build_base_path): New function.
10918         * cp-tree.h (base_access, base_kind): New enumerations.
10919         (build_base_path): Declare.
10920         (convert_pointer_to_real): Remove.
10921         (convert_pointer_to): Remove.
10922         (lookup_base): Declare.
10923         (convert_pointer_to_vbase): Remove.
10924         * call.c (build_scoped_method_call): Use lookup_base &
10925         build_base_path instead of convert_pointer_to_real,
10926         get_base_distance & get_binfo.
10927         (build_over_call): Likewise.
10928         * cvt.c (cp_convert_to_pointer): Likewise.
10929         (convert_to_pointer_force): Likewise.
10930         (build_up_reference): Likewise.
10931         (convert_pointer_to_real): Remove.
10932         (convert_pointer_to): Remove.
10933         * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
10934         instead of convert_pointer_to_vbase & build_vbase_path.
10935         (emit_base_init): Use build_base_path instead of
10936         convert_pointer_to_real.
10937         (expand_virtual_init): Lose unrequired conversions.
10938         (resolve_offset_ref): Use lookup_base and build_base_path
10939         instead of convert_pointer_to.
10940         * rtti.c (build_dynamic_cast_1): Use lookup_base &
10941         build_base_path instead of get_base_distance & build_vbase_path.
10942         * search.c (get_vbase_1): Remove.
10943         (get_vbase): Remove.
10944         (convert_pointer_to_vbase): Remove.
10945         (lookup_base_r): New function.
10946         (lookup_base): New function.
10947         * typeck.c (require_complete_type): Use lookup_base &
10948         build_base_path instead of convert_pointer_to.
10949         (build_component_ref): Likewise.
10950         (build_x_function_call): Likewise.
10951         (get_member_function_from_ptrfunc): Likewise.
10952         (build_component_addr): Likewise.
10953         * typeck2.c (build_scoped_ref): Likewise.
10955 2001-11-22  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
10957         * cp-tree.h (CP_TYPE_QUALS): Removed.
10958         * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
10959         * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
10960         LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
10961         * dump.c (cp_dump_tree): Use void* dump_info argument to match
10962         lang-hooks prototype.
10963         * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
10964         rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
10965         CP_TYPE_QUALS changed to cp_type_quals.
10966         * Make-lang.in: References to c-dump.h changed to tree-dump.h.
10967         (CXX_C_OBJS): Remove c-dump.o.
10969 2001-11-21  Mark Mitchell  <mark@codesourcery.com>
10971         PR c++/3637
10972         * pt.c (lookup_template_class): Ensure that all specializations
10973         are registered on the list corresponding to the most general
10974         template.
10976 2001-11-20  Mark Mitchell  <mark@codesourcery.com>
10978         * call.c (non_reference): Add documentation.
10979         (convert_class_to_reference): Do not strip reference types
10980         from conversion operators.
10981         (maybe_handle_ref_bind): Simplify.
10982         (compare_ics): Correct handling of references.
10984 2001-11-19  John Wilkinson <johnw@research.att.com>
10986         * dump.c (dump_op): New function.
10987         (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION.  Use
10988         dump_op.  Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
10989         DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
10991 2001-11-19  Mark Mitchell  <mark@codesourcery.com>
10993         PR4629
10994         * semantics.c (finish_sizeof): Make sure that expression created
10995         while processing a template do not have a type.
10996         (finish_alignof): Likewise.
10997         * typeck.c (c_sizeof): Likewise.
10998         (expr_sizeof): Likewise.
11000 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
11002         * lex.c (cxx_finish): Call c_common_finish.
11003         (finish_parse): Remove.
11005 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11007         * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
11008         when displaying error message about missing array bounds.
11010 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11012         * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
11013         CONST_CAST_EXPR.
11014         * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
11016 2001-11-16  Neil Booth  <neil@daikokuya.demon.co.uk>
11018         * cp-tree.h (print_class_statistics): Restore.
11020 2001-11-15  Jason Merrill  <jason@redhat.com>
11022         * method.c (use_thunk): Don't emit debugging information for thunks.
11024         * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
11025         * decl.c (make_typename_type): Handle getting a class template.
11026         * search.c (lookup_field_r): A class template is good enough for
11027         want_type.
11029         * call.c (convert_like_real): Only use cp_convert for the bad part.
11030         (standard_conversion): Also allow bad int->enum.
11031         * typeck.c (ptr_reasonably_similar): Also allow functions to
11032         interconvert.  Pointers to same-size integers are reasonably
11033         similar.
11035         * cvt.c (convert_to_void): If we build a new COND_EXPR, always
11036         give it void type.
11038 2001-11-15  Nathan Sidwell  <nathan@codesourcery.com>
11040         PR g++/3154
11041         * init.c (sort_base_init): Remove unreachable code.
11042         (expand_member_init): Adjust comment to reflect reality. Simplify
11043         and remove unreachable code.
11045 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
11047         * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
11048         (cxx_init): Update prototype.
11049         * decl.c (init_decl_processing): Rename.  Move null node init
11050         to its creation time.
11051         * lex.c (cxx_init_options): Update.
11052         (cxx_init): Combine with old init_parse; also call
11053         cxx_init_decl_processing.
11055 2001-11-14  Richard Sandiford  <rsandifo@redhat.com>
11057         * decl.c (check_initializer): Try to complete the type of an
11058         array element before checking whether it's complete.  Don't
11059         complain about arrays with complete element types but an
11060         unknown size.
11061         (cp_finish_decl): Build the hierarchical constructor before
11062         calling maybe_deduce_size_from_array_init.
11064 2001-11-14  Joseph S. Myers  <jsm28@cam.ac.uk>
11066         * Make-lang.in: Change all uses of $(manext) to $(man1ext).
11068 2001-11-13  Nathan Sidwell  <nathan@codesourcery.com>
11070         PR g++/4206
11071         * parse.y (already_scoped_stmt): Remove.
11072         (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
11074 2001-11-12  H.J. Lu <hjl@gnu.org>
11076         * cvt.c (ocp_convert): Don't warn the address of a weak
11077         function is always `true'.
11079 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
11081         * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
11082         LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
11083         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
11084         * cp-tree.h (print_class_statistics): Remove.
11085         (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
11086         cxx_print_identifier, cxx_set_yydebug): New.
11087         * lex.c (set_yydebug): Rename c_set_yydebug.
11088         * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
11089         lang_print_xnode): Rename.
11090         * tree.c (print_lang_statistics): Rename.
11092 2001-11-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11094         * class.c (dump_array): Fix format specifier warning.
11096 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
11098         * cp-lang.c (LANG_HOOKS_NAME): Override.
11099         (struct lang_hooks): Constify.
11100         * lex.c (cxx_init_options): Update.
11101         (lang_identify): Remove.
11102         * parse.y (language_string): Remove.
11104 2001-11-08  Andreas Franck  <afranck@gmx.de>
11106         * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
11107         DEMANGLER_CROSS_NAME): Handle program_transform_name the way
11108         suggested by autoconf.
11109         (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
11110         (c++.install-common): Use the transformed target alias names.
11112 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
11114         * Make-lang.in: Update.
11115         * cp-lang.c: Include langhooks-def.h.
11117 2001-11-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11119         * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
11121 2001-11-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11123         * lex.c (copy_lang_type): Add static prototype.
11125 2001-11-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11127         * pt.c (unify): Handle SCOPE_REF.
11129 2001-11-01  Jakub Jelinek  <jakub@redhat.com>
11131         * tree.c (cp_copy_res_decl_for_inlining): Adjust
11132         DECL_ABSTRACT_ORIGIN for the return variable.
11134 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
11136         *  Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
11138 2001-10-28  Joseph S. Myers  <jsm28@cam.ac.uk>
11140         * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
11141         semantics.c, spew.c: Fix spelling errors.
11143 2001-10-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11145         * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
11147 2001-10-25  Zack Weinberg  <zack@codesourcery.com>
11149         * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
11150         pop_everything.
11152 2001-10-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11154         * cp-lang.c (cxx_get_alias_set): New function.
11155         Point LANG_HOOKS_GET_ALIAS_SET to it.
11157 2001-10-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11159         * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
11160         * cp-tree.h (make_unbound_class_template): Prototype new function.
11161         * decl.c (make_unbound_class_template): New function.
11162         * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
11163         * error.c (dump_type): Likewise.
11164         * mangle.c (write_type): Likewise.
11165         * parse.y (template_parm): Likewise.
11166         (template_argument): Use make_unbound_class_template.
11167         * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
11168         (tsubst): Likewise.
11169         (tsubst_copy): Likewise.
11170         (unify): Likewise.
11171         * tree.c (walk_tree): Likewise.
11172         * typeck.c (comptypes): Likewise.
11174 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11176         * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
11177         extra calls into fewer ones.
11179 2001-10-18  Alexandre Oliva  <aoliva@redhat.com>
11181         * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
11182         Warn when merging inline with attribute noinline.
11183         (start_decl, start_function): Warn if inline and attribute
11184         noinline appear in the same declaration.
11186 2001-10-16  H.J. Lu <hjl@gnu.org>
11188         * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
11189         for tree checking disabled.
11191 2001-10-16  Hans-Peter Nilsson  <hp@axis.com>
11193         * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
11194         NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
11196 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
11198         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
11199         (unify): Only handle MINUS_EXPR specially if the above flag is set
11200         and the subtracted constant is 1.  Clear the flag on recursive calls.
11201         Set it when unifying the maximum value in an INTEGER_TYPE's range.
11203 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
11205         * decl.c (bad_specifiers): Don't allow exception specifications
11206         on any typedefs.
11208 2001-10-14  Neil Booth  <neil@daikokuya.demon.co.uk>
11210         * cp/lex.c (init_cp_pragma): Similarly.
11212 2001-10-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11214         * pt.c (lookup_template_class): Build complete template arguments
11215         for BOUND_TEMPLATE_TEMPLATE_PARM.
11217 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11219         * cp-tree.h (TYPE_BINFO): Update comment.
11220         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
11221         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
11222         (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
11223         (copy_type): Prototype new function.
11224         * lex.c (copy_lang_decl): Gather tree node statistics.
11225         (copy_lang_type): New function.
11226         (copy_type): Likewise.
11227         (cp_make_lang_type): Create lang_type for
11228         BOUND_TEMPLATE_TEMPLATE_PARM.  Set TYPE_BINFO for TYPENAME_TYPE
11229         and BOUND_TEMPLATE_TEMPLATE_PARM.
11230         * pt.c (tsubst): Use copy_type instead of copy_node.
11231         * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
11233 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11235         * pt.c (determine_specialization): Ignore functions without
11236         DECL_TEMPLATE_INFO.
11238 2001-10-12  Nathan Sidwell  <nathan@codesourcery.com>
11240         PR g++/4476
11241         * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
11243 2001-10-11  Jason Merrill  <jason_merrill@redhat.com>
11245         * typeck2.c (store_init_value): Don't re-digest a bracketed
11246         initializer.
11248         * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
11249         ANON_AGGR_TYPE_P.
11251 2001-10-11  Richard Henderson  <rth@redhat.com>
11253         * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
11254         of an asm statement.
11255         (build_vtbl_ref_1): Split out from build_vtbl_ref.
11256         (build_vfn_ref): Use it to handle vtable descriptors before
11257         calling build_vtable_entry_ref.
11258         * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
11260 2001-10-10  Richard Henderson  <rth@redhat.com>
11262         * parse.y (asm_operand): Allow named operands.
11263         * semantics.c (finish_asm_stmt): Tweek for changed location
11264         of the operand constraint.
11266 2001-10-09  Jason Merrill  <jason_merrill@redhat.com>
11268         * call.c (standard_conversion): Add bad conversion between
11269         integers and pointers.
11270         (convert_like_real): Don't use convert_for_initialization for bad
11271         conversions; complain here and use cp_convert.
11272         (build_over_call): Don't handle bad conversions specially.
11273         (perform_implicit_conversion): Allow bad conversions.
11274         (can_convert_arg_bad): New fn.
11275         * cp-tree.h: Declare it.
11276         * typeck.c (convert_for_assignment): Use it.
11277         (ptr_reasonably_similar): Any target type is similar to void.
11279 2001-10-08  Alexandre Oliva  <aoliva@redhat.com>
11281         * Make-lang.in (CXX_OBJS): Added cp-lang.o.
11282         (cp/cp-lang.o): New rule.
11283         * cp-tree.h: Declare hooks.
11284         * tree.c: Make hooks non-static.
11285         (init_tree): Don't initialize hooks here.
11286         * lex.c: Likewise.  Move definition of lang_hooks to...
11287         * cp-lang.c: ... new file.
11289 2001-10-08  Richard Henderson  <rth@redhat.com>
11291         * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
11292         (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
11294 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11296         * class.c (build_vtable_entry_ref): Const-ify.
11297         * decl.c (predefined_identifier,
11298         initialize_predefined_identifiers): Likewise.
11299         * init.c (build_new_1): Likewise.
11300         * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
11301         Likewise.
11303 2001-10-05  Alexandre Oliva  <aoliva@redhat.com>
11305         * optimize.c (struct inline_data): Moved to ../tree-inline.c.
11306         (INSNS_PER_STMT): Likewise.
11307         (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
11308         (copy_body, initialize_inlined_parameters): Likewise.
11309         (declare_return_variable, inlinable_function_p): Likewise.
11310         (expand_call_inline, expand_calls_inline): Likewise.
11311         (optimize_inline_calls, clone_body): Likewise.
11312         * tree.c (walk_tree): Moved to ../tree-inline.c.
11313         (walk_tree_without_duplicates): Likewise.
11314         (copy_tree_r, remap_save_expr): Likewise.
11316 2001-10-04  Alexandre Oliva  <aoliva@redhat.com>
11318         * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
11319         (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
11320         * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
11321         (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
11322         (flag_inline_trees): Moved declaration to ../tree-inline.h.
11323         (walk_tree): Moved declaration to ../tree-inline.h.
11324         (walk_tree_without_duplicates, copy_tree_r): Likewise.
11325         (remap_save_expr): Likewise.
11326         * decl.c: Include tree-inline.h.
11327         (lang_mark_tree): Don't mark inlined_fns.
11328         * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
11329         * optimize.c: Include tree-inline.h.
11330         (optimize_inline_calls): Move declaration to ../tree.h, as
11331         non-static.
11332         (remap_decl): Use language-independent constructs and hooks.
11333         (remap_block, copy_body_r, declare_return_variable): Likewise.
11334         (inlinable_function_p): Likewise.  Don't test for
11335         DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
11336         no longer language-specific.
11337         (optimize_inline_calls): Likewise.  Make it non-static.  Moved
11338         call of dump_function to...
11339         (optimize_function): Here...
11340         (clone_body): New function, extracted from...
11341         (maybe_clone_body): ... here.  Build decl_map locally and pass
11342         it on to clone_body.
11343         * pt.c, semantics.c: Include tree-inline.h.
11344         * tree.c: Likewise.
11345         (cp_walk_subtrees): New language-specific hook for tree inlining.
11346         (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
11347         cp_is_overload_p, cp_auto_var_in_fn_p,
11348         cp_copy_res_decl_for_inlining): Likewise.
11349         (walk_tree): Move language-specific constructs into...
11350         (cp_walk_subtrees): this new function.
11351         (copy_tree_r): Use language-independent constructs and hooks.
11352         (init_tree): Initialize tree inlining hooks.
11353         (remap_save_expr): Adjust prototype so that the declaration
11354         does not require the definition of splay_tree.
11356 2001-10-03  John David Anglin  <dave@hiauly1.hia.nrc.ca>
11358         * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
11359         to build the declaration instead of the declaration itself.
11361 2001-10-02  Jason Merrill  <jason_merrill@redhat.com>
11363         * decl2.c (cxx_decode_option): Add 'else'.
11365         * spew.c (end_input): No longer static.
11366         * cp-tree.h: Declare it.
11367         * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
11369 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
11371         * call.c (build_over_call), typeck.c (build_function_call_real):
11372         Pass type attributes to check_function_format rather than name or
11373         assembler name.  Don't require there to be a name or assembler
11374         name to check formats.
11376 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
11378         * decl.c (init_decl_processing): Don't call
11379         init_function_format_info.  Initialize lang_attribute_table
11380         earlier.
11381         (builtin_function): Call decl_attributes.
11382         (insert_default_attributes): New.
11384 2001-10-01  Jason Merrill  <jason_merrill@redhat.com>
11386         * decl.c (grokdeclarator): Copy array typedef handling from C
11387         frontend.
11389         * decl.c (grokdeclarator): Copy too-large array handling from C
11390         frontend.
11392 2001-09-29  Alexandre Oliva  <aoliva@redhat.com>
11394         * config-lang.in (target_libs): Added target-gperf, so that we
11395         don't try to build it if C++ is disabled.
11397 2001-09-23  Zack Weinberg  <zack@codesourcery.com>
11399         * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
11400         (cp/errfn.o): Delete rule.
11401         (cp/error.o): Depend on flags.h.
11402         * errfn.c: Delete file.
11403         * cp-tree.h: Declare warn_deprecated.  Remove definitions of
11404         TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
11405         and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
11406         cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
11407         internal_error respectively.  Make cp_deprecated into a macro.
11408         Don't define cp_printer typedef or declare cp_printers.
11409         * error.c: Include flags.h.
11410         Delete: struct tree_formatting_info, print_function_argument_list,
11411         print_declaration, print_expression, print_function_declaration,
11412         print_function_parameter, print_type_id, print_cv_qualifier_seq,
11413         print_type_specifier_seq, print_simple_type_specifier,
11414         print_elaborated_type_specifier, print_rest_of_abstract_declarator,
11415         print_parameter_declaration_clause, print_exception_specification,
11416         print_nested_name_specifier, and definition of cp_printers.
11417         (locate_error): New function.
11418         (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
11419         rewritten in terms of locate_error and diagnostic.c.
11420         (cp_tree_printer): Rename cp_printer; wire up to *_to_string
11421         instead of deleted print_* routines.  Handle %C, %L, %O, %Q also.
11422         (init_error): Adjust to match.
11424 2001-09-22  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11426         * Make-lang.in (CXX_C_OBJS): Add attribs.o.
11428 2001-09-21  Richard Henderson  <rth@redhat.com>
11430         * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
11431         (build_vtbl_initializer): Likewise.
11432         (build_vfn_ref): New.
11433         * cp-tree.h: Declare it.
11434         * call.c (build_over_call): Use it.
11435         * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
11436         * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
11438 2001-09-21  J"orn Rennecke <amylaar@redhat.com>
11440         * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
11442 2001-09-21  Joseph S. Myers  <jsm28@cam.ac.uk>
11444         Table-driven attributes.
11445         * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
11446         * decl2.c (cplus_decl_attributes): Only take one attributes
11447         parameter.
11448         * cp-tree.c (cplus_decl_attributes): Update prototype.
11449         * class.c (finish_struct), decl.c (start_decl, start_function),
11450         decl2.c (grokfield), friend.c (do_friend), parse.y
11451         (parse_bitfield): Update calls to cplus_decl_attributes.
11452         * decl.c (grokdeclarator): Take a pointer to a single ordinary
11453         attribute list.
11454         * decl.h (grokdeclarator): Update prototype.
11455         * decl2.c (grokfield): Take a single ordinary attribute list.
11456         * friend.c (do_friend): Likewise.
11457         * decl.c (shadow_tag, groktypename, start_decl,
11458         start_handler_parms, grokdeclarator, grokparms, start_function,
11459         start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
11460         parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
11461         (process_template_parm, do_decl_instantiation): Pass single
11462         ordinary attribute lists around.
11463         * decl.c (grokdeclarator): Correct handling of nested attributes.
11464         Revert the patch
11465         1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
11466                 * decl.c (grokdeclarator): Embedded attrs bind to the right,
11467                 not the left.
11468         .
11469         * cp-tree.h (cp_valid_lang_attribute): Remove declaration
11470         (cp_attribute_table): Declare.
11471         * decl.c (valid_lang_attribute): Don't define.
11472         (lang_attribute_table): Define.
11473         (init_decl_processing): Initialize lang_attribute_table instead of
11474         valid_lang_attribute.
11475         * tree.c (cp_valid_lang_attribute): Remove.
11476         (handle_java_interface_attribute, handle_com_interface_attribute,
11477         handle_init_priority_attribute): New functions.
11478         (cp_attribute_table): New array.
11479         * decl2.c (import_export_class): Don't use
11480         targetm.valid_type_attribute.
11482 2001-09-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
11484         * Make-lang.in (cp/error.o): Depend on real.h
11485         * error.c: #include "real.h"
11487 2001-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11489         * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
11490         xmalloc/strcpy/strcat.
11492 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11494         * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
11495         Const-ification.
11496         * pt.c (tsubst_decl): Likewise.
11498 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11500         * decl2.c (lang_f_options): Const-ification.
11501         * lex.c (cplus_tree_code_name): Likewise.
11502         * spew.c (yyerror): Likewise.
11504 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
11506         PR c++/3986
11507         * class.c (force_canonical_binfo_r): Check & move an indirect
11508         primary base first.
11509         (force_canonical_binfo): Check that it's not already
11510         canonical.
11511         (mark_primary_virtual_base): Remove BINFO parameter.
11512         (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
11514 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
11516         Remove TYPE_NONCOPIED_PARTS.
11517         * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
11518         CLASSTYPE_PURE_VIRTUALS.
11519         (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
11520         * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
11521         (layout_class_type): Don't call fixup_inline_methods here ...
11522         (finish_struct_1): ... call it here.
11524 2001-09-04  Mark Mitchell  <mark@codesourcery.com>
11526         * decl.c (duplicate_decls): Remove code deadling with
11527         DECL_SAVED_INSNS.
11528         * decl2.c (finish_file): Likewise.
11529         * pt.c (instantiate_decl): Likewise.
11530         * semantics.c (expand_body): Don't defer local functions if
11531         they wouldn't be deferred for some other reason.  Don't
11532         generate RTL for functions that will not be emitted.
11533         (genrtl_start_function): Remove code deadling with
11534         DECL_SAVED_INSNS.
11535         (genrtl_finish_function): Likewise.
11537 2001-09-04  Nathan Sidwell  <nathan@codesourcery.com>
11539         PR c++/4203
11540         * call.c (build_over_call): Do not optimize any empty base
11541         construction.
11543 2001-08-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11545         * error.c (dump_template_decl): Output template parameters
11546         together with their specifiers.
11547         Output `class' prefix for template template parameter.
11548         (dump_decl): Fix formatting.
11550 2001-08-30  Kurt Garloff  <garloff@suse.de>
11552         * optimize.c (inlinable_function_p): Allow only smaller single
11553         functions. Halve inline limit after reaching recursive limit.
11555 2001-08-30  Joern Rennecke <amylaar@redhat.com>
11556             Jason Merrill  <jason_merrill@redhat.com>
11558         * class.c (build_vtable_entry_ref): Subtract in char*, not
11559         ptrdiff_t.
11561 2001-08-23  Jason Merrill  <jason_merrill@redhat.com>
11563         * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
11564         (build_cplus_array_type): Use cp_build_qualified_type, not
11565         TYPE_MAIN_VARIANT, to get an unqualified version.
11567         * decl2.c (grok_alignof): Lose.
11568         (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
11569         * typeck.c (c_alignof): Lose.
11570         * semantics.c (finish_sizeof, finish_alignof): New.
11571         * parse.y: Use them.
11572         * cp-tree.h: Declare them.
11574 2001-08-22  Jason Merrill  <jason_merrill@redhat.com>
11576         * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
11577         Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
11578         * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
11580 2001-08-19  Jakub Jelinek  <jakub@redhat.com>
11582         * typeck2.c (add_exception_specifier): Only require complete type if
11583         not in processing template declaration.
11585 2001-08-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11587         * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
11588         GNU_xref_start_scope and GNU_xref_end_scope.
11590         * tree.c (TYPE_HASH): Moved to ../tree.h.
11592 2001-08-16  Mark Mitchell  <mark@codesourcery.com>
11594         * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
11595         on COMPOUND_EXPRs.
11597 2001-08-14  Richard Henderson  <rth@redhat.com>
11599         * class.c, cp-tree.h (build_vfn_ref): Remove.
11600         * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
11602 2001-08-13  Mark Mitchell  <mark@codesourcery.com>
11604         * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
11605         empty class assignment as having side-effects to avoid
11606         spurious warnings.
11608 2001-08-13  Zack Weinberg  <zackw@panix.com>
11610         * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
11611         * except.c: Include libfuncs.h.
11613 2001-08-11  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
11615         * decl.c (grokdeclarator): Clarify diagnostic message.
11617 2001-08-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11619         * decl2.c (do_nonmember_using_decl): Replace using directive
11620         with using declaration in the error message.
11622 2001-08-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11624         * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
11625         criterion to avoid rebuilding expression tree instead of
11626         processing_template_decl.
11628 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
11630         Support named return value optimization for inlines, too.
11631         * decl.c (finish_function): Nullify returns here.
11632         * semantics.c (genrtl_start_function): Not here.
11633         (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
11634         (nullify_returns_r): No longer static.  Just clear RETURN_EXPR.
11635         Also nullify the CLEANUP_STMT for the nrv.
11636         * cp-tree.h: Declare it.
11637         * optimize.c (declare_return_variable): Replace the nrv with the
11638         return variable.
11639         * typeck.c (check_return_expr): Be more flexible on alignment check.
11640         Ignore cv-quals when checking for a matching type.
11642 2001-08-09  Richard Henderson  <rth@redhat.com>
11644         * decl2.c (finish_objects): Use target hooks instead of
11645         assemble_constructor and assemble_destructor.
11647 2001-08-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
11649         * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
11651 2001-08-07  Nathan Sidwell  <nathan@codesourcery.com>
11653         PR c++/3820
11654         Stop using TYPE_NONCOPIED_PARTS.
11655         * call.c (build_over_call): Be careful when copy constructing
11656         or assigning to an empty class.
11657         * class.c (check_bases_and_members): It has a
11658         COMPLEX_ASSIGN_REF if it has a vptr.
11659         (layout_class_type): Don't add empty class padding to
11660         TYPE_NONCOPIED_PARTS.
11661         (finish_struct_1): Don't add the VFIELD either.
11662         * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
11663         initialization.
11665 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
11667         * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
11669 2001-08-06  Richard Henderson  <rth@redhat.com>
11671         * decl2.c (finish_objects): Pass a symbol_ref and priority to
11672         assemble_{constructor,destructor}.  Remove priority handling.
11674 2001-08-05  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
11676         Don't allow template-id in using-declaration.
11677         * decl2.c (validate_nonmember_using_decl): Handle template-ids.
11678         (do_class_using_decl): Likewise.
11680 2001-08-04  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
11682         * cp/spew.c (read_token): No need to pop buffers.
11684 2001-08-02  Stan Shebs  <shebs@apple.com>
11686         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
11687         (fnaddr_from_vtable_entry): Remove decl.
11688         * method.c (use_thunk): Update comment.
11690 2001-08-01  Andrew Cagney  <ac131313@redhat.com>
11692         * repo.c (get_base_filename): Change return value to const char
11693         pointer.
11695 2001-08-02  Nathan Sidwell  <nathan@codesourcery.com>
11697         Kill -fhonor-std.
11698         * NEWS: Document.
11699         * cp-tree.h (flag_honor_std): Remove.
11700         (CPTI_FAKE_STD): Remove.
11701         (std_node): Remove comment about it being NULL.
11702         (fake_std_node): Remove.
11703         * decl.c (in_fake_std): Remove.
11704         (walk_namespaces_r): Remove fake_std_node check.
11705         (push_namespace): Remove in_fake_std code.
11706         (pop_namespace): Likewise.
11707         (lookup_name_real): Remove fake_std_node check.
11708         (init_decl_processing): Always create std_node. Always add
11709         std:: things there.
11710         (builtin_function): Always put non '_' fns in std.
11711         * decl2.c (flag_honor_std): Remove.
11712         (lang_f_options): Remove honor-std.
11713         (unsupported_options): Add honor-std.
11714         (set_decl_namespace): Remove fake_std_node check.
11715         (validate_nonmember_using_decl): Likewise.
11716         (do_using_directive): Likewise.
11717         (handle_class_head): Likewise.
11718         * dump.c (cp_dump_tree): Likewise.
11719         * except.c (init_exception_processing): Adjust.
11720         * init.c (build_member_call): Remove fake_std_node check.
11721         (build_offset_ref): Likewise.
11722         * lang-options.h: Remove -fhonor-std, -fno-honor-std.
11723         * rtti.c (init_rtti_processing): Adjust.
11725 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
11727         * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
11728         operand while calling cp_tree_equal.
11730 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
11732         The 3.0 ABI no longer has vbase pointer fields.
11733         * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
11734         FORMAT_VBASE_NAME): Remove.
11735         * method.c (do_build_copy_constructor): Adjust.
11736         (do_build_assign_ref): Adjust.
11737         * search.c (lookup_field_r): Adjust.
11738         * typeck.c (build_component_ref): Adjust.
11740         The 3.0 ABI always has a vtable pointer at the start of every
11741         polymorphic class.
11742         * rtti.c (build_headof_sub): Remove.
11743         (build_headof): Adjust.
11744         (get_tinfo_decl_dynamic): No need to check flag_rtti
11745         here. Adjust.
11746         (create_real_tinfo_var): Explain why we need a hidden name.
11748 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
11750         PR c++/3631
11751         * class.c (update_vtable_entry_for_fn): The fixed adjustment
11752         of a virtual thunk should be from declaring base.
11754 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
11756         * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
11757         the shared virtual base, so preserving inheritance graph order.
11759 2001-07-30  Andreas Jaeger  <aj@suse.de>
11761         * decl2.c: Remove unused var global_temp_name_counter.
11763 2001-07-28  Richard Henderson  <rth@redhat.com>
11765         * method.c (pending_inlines): Remove.
11767 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
11769         * class.c (mark_primary_virtual_base): Don't adjust base
11770         offsets here.
11771         (dfs_unshared_virtual_bases): Adjust them here.
11772         (mark_primary_bases): Explain why we adjust at the end.
11774 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
11776         * class.c (finish_struct_1): When copying the primary base's
11777         VFIELD, make sure we find it is at offset zero.
11779 2001-07-26  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11781         * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
11782         tsubst_expr for default template arguments.
11784 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
11786         PR c++/3621
11787         * spew.c (yylex): Only copy the token's lineno, if it is
11788         nonzero.
11790 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
11792         PR c++/3624
11793         * call.c (resolve_args): Simplify, call
11794         convert_from_reference.
11795         (build_new_op): Resolve and convert from reference ARG1
11796         earlier. Adjust ARG2 & ARG3 resolve and conversion.
11798 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
11800         * decl.c (last_function_parm_tags): Remove.
11801         (current_function_parm_tags): Remove.
11802         (init_decl_processing): Adjust.
11803         (start_function): Adjust.
11804         (store_parm_decls): Adjust.
11806         PR c++/3152
11807         * decl.c (grokdeclarator): Detect when a function typedef is
11808         declaring a function, and create last_function_parms correctly.
11810 2001-07-25  Jason Merrill  <jason_merrill@redhat.com>
11812         * call.c (joust): Only prefer a non-builtin candidate to a builtin
11813         one if they have the same signature.
11815         * cvt.c (build_up_reference): Take DECL parm.  Check TREE_STATIC on
11816         it rather than toplevel_bindings_p.  Give it a mangled name if static.
11817         (convert_to_reference): Adjust.
11818         * decl2.c (get_temp_name): Lose.
11819         * mangle.c (mangle_ref_init_variable): New fn.
11820         (mangle_guard_variable): Strip the ref-init header.
11821         * cp-tree.h: Adjust.
11822         * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
11823         initializer.
11824         (grok_reference_init): Always use DECL_INITIAL.
11826 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
11828         PR c++/3416
11829         * call.c (build_conditional_expr): Recheck args after
11830         conversions.
11831         * cp-tree.h (build_conditional_expr): Move to correct file.
11832         * typeck.c (decay_conversion): Diagnose any unknown types
11833         reaching here.
11834         (build_binary_op): Don't do initial decay or default
11835         conversions on overloaded functions.
11836         (build_static_cast): Don't do a decay conversion here.
11838 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
11840         PR c++/3543
11841         * typeck.c (condition_conversion): Resolve an OFFSET_REF.
11842         * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
11844 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
11846         * class.c (build_vtbl_or_vbase_field): Remove, move into ...
11847         (create_vtbl_ptr): ... here.
11849 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
11851         * class.c (build_vbase_offset_vbtl_entries): Look for
11852         non-primary base of which we are a sub vtable.
11854 2001-07-24  Phil Edwards  <pme@sources.redhat.com>
11856         * semantics.c (finish_this_expr):  Remove unused code.
11858 2001-07-24  Nathan Sidwell  <nathan@codesourcery.com>
11860         Simplify rtti, now we've only one ABI.
11861         * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
11862         CPTI_TINFO_VAR_ID.
11863         (tinfo_decl_id, tinfo_var_id): Remove.
11864         (get_typeid_1): Remove.
11865         * rtti.c
11866         (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
11867         (typeid_ok_p): New function.
11868         (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
11869         (get_tinfo_decl): Remove old abi documentation.
11870         (tinfo_from_decl): Remove.
11871         (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
11872         (get_typeid_1): Remove.
11873         (get_base_offset): Remove.
11874         (synthesize_tinfo_var): Absorb get_base_offset.
11875         (create_real_tinfo_var): Don't use tinfo_decl_id.
11877 2001-07-23  Graham Stott  <grahams@redhat.com>
11879         * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
11880         variable has_two_argument_delete_p.
11882 2001-07-21  Nathan Sidwell  <nathan@codesourcery.com>
11884         Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
11885         * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
11886         (CPTI_INDEX_IDENTIFIER): Remove.
11887         (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
11888         (delta2_identifier): Remove.
11889         (index_identifier): Remove.
11890         (pfn_or_delta2_identifier): Remove.
11891         (flag_vtable_thunks): Remove.
11892         (VTABLE_DELTA2_NAME): Remove.
11893         (VTABLE_INDEX_NAME): Remove.
11894         (FNADDR_FROM_VTABLE_ENTRY): Adjust.
11895         (vfunc_ptr_type_node): Adjust.
11896         (VTABLE_NAME_PREFIX): Adjust.
11897         (build_vfn_ref): Lose first parameter.
11898         (fixup_all_virtual_upcast_offsets): Remove.
11899         * decl.c (initialize_predefined_identifiers): Remove
11900         delta2_identifier, index_identifier, pfn_or_delta2_identifier.
11901         (init_decl_processing): Remove no-vtable-thunk code.
11902         * decl2.c (flag_vtable_thunks): Remove.
11903         (mark_vtable_entries): Remove no-vtable-thunk code.
11904         * error.c (dump_decl): Remove no-vtable-thunk code.
11905         (dump_expr): Adjust ptr to member function code.
11906         * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
11907         code.
11908         * rtti.c (build_headof): Remove no-vtable-thunk code.
11909         (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
11910         * search.c (get_base_distance): Remove expand_upcast_fixups case.
11911         (virtual_context) Remove.
11912         (expand_upcast_fixups): Remove.
11913         (fixup_virtual_upcast_offsets): Remove.
11914         (fixup_all_virtual_upcast_offsets): Remove.
11915         * typeck.c (get_member_function_from_ptrfunc): Remove
11916         no-vtable-thunk code.
11917         * call.c (build_over_call): Adjust call to build_vfn_ref.
11918         * class.c (build_vfn_ref): Lose first parameter. Remove
11919         no-vtable-thunk code.
11920         (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
11921         (build_vtable_entry): Remove no-vtable-thunk code.
11923 2001-07-20  Nathan Sidwell  <nathan@codesourcery.com>
11925         Remove old-abi remnants. Remove comments about old abi
11926         behavior. Remove references to 'new-abi' in comments.
11927         * cp-tree.h: Adjust comments.
11928         (vbase_offsets_in_vtable_p): Delete.
11929         (vcall_offsets_in_vtable_p): Delete.
11930         (vptrs_present_everywhere_p): Delete.
11931         (all_overridden_vfuns_in_vtables_p): Delete.
11932         (merge_primary_and_secondary_vtables_p): Delete.
11933         (TYPE_CONTAINS_VPTR_P): Adjust.
11934         (VTT_NAME_PREFIX): Remove.
11935         (CTOR_VTBL_NAME_PREFIX): Remove.
11936         (init_vbase_pointers): Remove.
11937         * class.c: Adjust coments.
11938         (build_vbase_pointer_fields): Delete.
11939         (build_vbase_pointer): Remove old-abi code.
11940         (build_secondary_vtable): Likewise.
11941         (modify_all_vtables): Likewise.
11942         (create_vtable_ptr): Likewise.
11943         (layout_class_type): Likewise.
11944         (finish_struct_1): Likewise.
11945         (finish_vtbls): Likewise.
11946         (dfs_finish_vtbls): Delete.
11947         (build_vbase_offset_vtbl_entries): Remove old-abi code.
11948         * cvt.c: Adjust comments.
11949         * decl.c: Adjust comments.
11950         * decl2.c: Adjust comments.
11951         * init.c: Adjust comments.
11952         (construct_virtual_bases): Remove old-abi code.
11953         * lang-specs.h: Remove -fno-new-abi.
11954         * mangle.c: Adjust comments.
11955         * rtti.c: Adjust comments.
11956         (get_base_offset): Remove old-abi-code.
11957         * search.c: Adjust comments.
11958         (dfs_init_vbase_pointers): Remove.
11959         (dfs_vtable_path_unmark): Remove.
11960         (init_vbase_pointers): Remove.
11961         * semantics.c: Adjust comments.
11962         (emit_associated_thunks): Remove old-abi code.
11963         * typeck.c: Adjust comments.
11965 2001-07-20  Daniel Berlin  <dan@cgsoftware.com>
11967         * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
11968         params.h.
11970 2001-07-19  Mark Mitchell  <mark@codesourcery.com>
11972         * class.c (finish_struct_anon): Forbid nested classes.
11974 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
11976         * decl2.c: Don't include dwarfout.h and dwarf2out.h.
11977         * optimize.c: Include debug.h.
11978         (maybe_clone_body): Use debug hook.
11979         * semantics.c: Include debug.h.
11980         (expand_body): Use debug hook.
11982 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
11984         * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
11986 2001-07-18  Mark Mitchell  <mark@codesourcery.com>
11988         * class.c (type_requires_array_cookie): New function.
11989         (check_methods): Don't try to figure out whether the type needs a
11990         cookie here.
11991         (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
11992         * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
11993         (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
11994         * pt.c (instantiate_class_template): Don't set
11995         TYPE_VEC_DELETE_TAKES_SIZE.
11996         * NEWS: Document ABI changes from GCC 3.0.
11998 2001-07-18  Xavier Delacour <xavier@fmaudio.net>,
11999             Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
12001         * NEWS (Changes in GCC 3.0): Fix typo.
12003 2001-07-13  Joseph S. Myers  <jsm28@cam.ac.uk>
12005         * decl2.c (cplus_decl_attributes): Take a pointer to the node to
12006         which attributes are to be attached, and a flags argument.  Update
12007         call to decl_attributes.
12008         (grokfield): Update call to decl_attributes.
12009         * class.c (finish_struct): Update call to cplus_decl_attributes.
12010         * cp-tree.h (cplus_decl_attributes): Update prototype.
12011         * decl.c (start_decl, grokdeclarator, start_function): Update
12012         calls to decl_attributes and cplus_decl_attributes.
12013         * friend.c (do_friend): Update call to cplus_decl_attributes.
12014         * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
12016 2001-07-12  Mark Mitchell  <mark@codesourcery.com>
12018         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
12019         for `register' variables with an asm-specification.
12021 2001-07-11  Mark Mitchell  <mark@codesourcery.com>
12023         * semantics.c (finish_asm_stmt): Mark the output operands
12024         to an asm addressable, if necessary.
12026 2001-07-11  Ben Elliston  <bje@redhat.com>
12028         * Revert this change -- there is a subtle bug.
12030         PR c++/80
12031         * decl.c (finish_enum): New "attributes" argument; pass it to
12032         cplus_decl_attributes.  Use a narrower type if the enum is packed.
12033         * cp-tree.h (finish_enum): Adjust prototype.
12034         * parse.y (enum_head): New non-terminal.
12035         (structsp): Use it. Enums now may be preceded or followed by
12036         optional attributes -- pass their chained tree to finish_enum().
12037         * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
12039 2001-07-10  Mark Mitchell  <mark@codesourcery.com>
12041         * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
12042         variables.
12044 2001-07-10  Jason Merrill  <jason_merrill@redhat.com>
12046         * semantics.c (cp_expand_stmt): Fix for null
12047         current_function_return_value.
12049 2001-07-10  Jan van Male  <jan.vanmale@fenk.wau.nl>
12051         * call.c (build_op_delete_call): Initialize fn.
12052         (convert_like_real): Delete conditional.
12053         (joust): Initialize *w and *l.
12054         * class.c: Add prototype for binfo_ctor_vtable.
12055         (get_primary_binfo): Initialize result.
12056         * init.c (build_java_class_ref): Initialize name.
12058 2001-07-09  Erik Rozendaal  <dlr@acm.org>
12060         * typeck.c (unary_complex_lvalue): Do not duplicate the
12061         argument to modify, pre-, or post-increment when used as an
12062         lvalue and when the argument has side-effects.
12064 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
12066         * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
12067         (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES.  Call
12068         cplus_decl_attributes even if attrs is NULL.
12069         * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
12071 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
12073         * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
12074         calls to decl_attributes.
12076 2001-07-06  Ira Ruben   <ira@apple.com>
12078         * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
12079         be DECL_TEMPLATE_RESULT.
12081 2001-07-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12083         * cp-tree.h (copy_template_template_parm): Rename to ...
12084         (bind_template_template_parm): ... here.
12085         * tree.c (copy_template_template_parm): Rename to ...
12086         (bind_template_template_parm): ... here.  Remove the case when
12087         NEWARGS is NULL_TREE.
12088         (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
12089         BOUND_TEMPLATE_TEMPLATE_PARM.
12090         * pt.c (lookup_template_class): Adjust.
12092 2001-07-05  Jason Merrill  <jason_merrill@redhat.com>
12094         * cvt.c (convert_lvalue): New fn.
12095         * cp-tree.h: Declare it.
12096         * method.c (do_build_assign_ref): Use it.
12097         (do_build_copy_constructor): Convert parm to base types
12098         before calling base constructors.
12100         * typeck.c (check_return_expr): Check DECL_ALIGN instead of
12101         DECL_USER_ALIGN.  Check flag_elide_constructors instead of
12102         optimize.
12103         * semantics.c (cp_expand_stmt): Don't destroy the named return value.
12105 2001-07-02  Nathan Sidwell  <nathan@codesourcery.com>
12107         * optimize.c (optimize_inline_calls): New function, broken out
12108         of ...
12109         (optimize_function): ... here. Call it. Don't inline if it is
12110         a thunk.
12111         (dump_function): Print name of dump flag causing this dump.
12112         * semantics.c (expand_body): Move thunk inline check to
12113         optimize_function.
12115 2001-06-29  Joseph S. Myers  <jsm28@cam.ac.uk>
12117         * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
12118         (comptypes): Use target.comp_type_attributes.
12120 2001-06-29  Nathan Sidwell  <nathan@codesourcery.com>
12122         * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
12124 2001-06-28  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
12126         * error.c (lang_print_error_function): Add a `diagnostic_context *'
12127         parameter. Tweak.
12129 2001-06-27  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
12131         * decl2.c (import_export_class): Update.
12133 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
12135         * error.c (init_error): Adjust settings.
12137 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
12139         * error.c (init_error): Adjust settings.
12141 2001-06-19  Richard Sandiford  <rsandifo@redhat.com>
12143         * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
12144         return pointers to data members by reference rather than by value.
12146 2001-06-18  Jason Merrill  <jason_merrill@redhat.com>
12148         Implement the Named Return Value optimization.
12149         * cp-tree.h (struct cp_language_function): Add x_return_value.
12150         (current_function_return_value): Now a macro.
12151         * decl.c: Don't define it.
12152         (define_label, finish_case_label): Don't clear it.
12153         (init_decl_processing): Don't register it with GC.
12154         * semantics.c (genrtl_finish_function): Don't check it for
12155         no_return_label.  Copy the RTL from the return value to
12156         current_function_return_value and walk, calling...
12157         (nullify_returns_r): ...this new fn.
12158         * typeck.c (check_return_expr): Set current_function_return_value.
12160 2001-06-15  Jason Merrill  <jason_merrill@redhat.com>
12162         * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
12163         sharing a ctor vtable with.  Merge code for cases 1 and 2.
12164         (binfo_ctor_vtable): New fn.
12165         (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
12167 2001-06-14  Jason Merrill  <jason_merrill@redhat.com>
12169         * class.c (dfs_find_final_overrider): Fix logic.
12171         * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
12172         virtual thunk instead of non-virtual.
12173         (get_matching_virtual): Uncomment.
12175         * pt.c (unify): Don't recurse between the POINTER_TYPE and the
12176         OFFSET_TYPE.  If we're adding cv-quals, the extra ones would be on
12177         PARM, not ARG.
12179 2001-06-14  Nathan Sidwell  <nathan@codesourcery.com>
12181         * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
12182         we've not emerged from the hierarchy of RTTI_BINFO on reaching
12183         a non-virtual base.
12185 2001-06-13  Mark Mitchell  <mark@codesourcery.com>
12187         * NEWS: Update release number.
12189 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
12191         PR c++/3130, c++/3131, c++/3132
12192         * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
12193         * class.c (force_canonical_binfo_r): Move
12194         BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
12195         virtual bases unless they're primary and what they're primary
12196         too has been moved.
12197         (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
12198         with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
12199         BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
12200         derived binfo.
12201         (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
12202         (layout_nonempty_base_or_field): Add most derived type
12203         parameter. Adjust.
12204         (layout_empty_base): Likewise.
12205         (build_base_field): Likewise.
12206         (build_base_fields): Likewise.
12207         (propagate_binfo_offsets): Add most derived type
12208         parameter. Skip non canonical virtual bases too.
12209         (dfs_set_offset_for_unshared_vbases): Don't skip primary
12210         bases. Do skip canonical bases.
12211         (layout_virtual_bases): Adjust.
12212         (layout_class_type): Adjust.
12213         (dfs_get_primary_binfo): Build list of virtual primary base
12214         candidates.
12215         (get_primary_binfo): Check that the shared virtual primary
12216         base candidate was found first.
12217         (accumulate_vtbl_inits): Don't do anything for non-vptr
12218         containing binfos. For case 1 primary virtual bases, keep
12219         checking that we've not emerged from the hierarchy of RTTI_BINFO.
12221 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
12223         PR c++/3089
12224         * class.c (dfs_accumulate_vtbl_inits): Always walk down the
12225         hierarchy looking for primary bases for a ctor
12226         vtable. Recursively call oneself, if we meet our primary via
12227         this route and haven't met it yet via inheritance graph order.
12229 2001-06-11  Mark Mitchell  <mark@codesourcery.com>
12231         * lang-options.h: Emit documentation for -fno-honor-std, not
12232         -fhonor-std.
12234 2001-06-10  Alexandre Oliva  <aoliva@redhat.com>
12236         * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
12237         Don't clobber delta.
12238         (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
12240 2001-06-10  Mark Mitchell <mark@codesourcery.com>
12241             Gabriel Dos Reis  <gdr@codesourcery.com>
12243         * Make-lang.in (cp/call.o): Depend on diagnostic.h
12244         (cp/typeck.o): Depend on diagnostic.h
12245         (cp/typeck2.o): Depend on diagnostic.h
12246         (cp/repo.o): Depend on dignostic.h
12247         * typeck.c: #include diagnostic.h
12248         (convert_for_initialization): Remove extern declaration for
12249         warningcount and errorcount.
12251         * call.c: #include diagnostic.h
12252         (convert_like_real): Remove extern declaration for warnincount and
12253         errorcount.
12255         * repo.c: #include diagnostic.h
12256         * typeck2.c: #include diagnostic.h
12258 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
12260         * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
12261         in previous change.
12263 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
12265         PR c++/2929
12266         * friend.c (do_friend): Use push_decl_namespace for classes at
12267         namespace scope.
12269 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
12270             Jason Merrill <jason_merrill@redhat.com>
12272         PR c++/3061
12273         * class.c (build_secondary_vtable): Use assert, rather than an error
12274         message.
12275         (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
12276         (dfs_accumulate_vtbl_inits): A lost primary virtual base may
12277         be between ORIG_BINFO and RTTI_BINFO, but neither of them.
12278         Don't set BINFO_VTABLE for a primary virtual base.
12280 2001-06-07  Mark Mitchell  <mark@codesourcery.com>
12282         * decl.c (duplicate_decls): Update source position information
12283         when a template function is defined.
12285 2001-06-07  Phil Edwards  <pme@sources.redhat.com>
12287         * lang-specs.h:  Move -D_GNU_SOURCE to config/linux.h.
12289 2001-06-07  Nathan Sidwell  <nathan@codesourcery.com>
12291         PR c++/2914
12292         * decl.c (pushtag): Don't push into a complete type's scope.
12294 2001-06-06  Jason Merrill  <jason_merrill@redhat.com>
12296         * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
12297         (struct lang_decl_flags): Lose generate_with_vtable_p.
12298         (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
12299         * class.c (copy_virtuals): Adjust.
12300         * decl2.c (mark_vtable_entries): Adjust.
12301         * method.c (make_thunk, build_vtable_entry): Adjust.
12302         * class.c (update_vtable_entry_for_fn): Only look as far as the
12303         first defining class.
12304         (build_vtbl_initializer): Put nothing in the slot for a function only
12305         defined in a lost primary virtual base.
12306         (add_vcall_offset_vtbl_entries_1): Use the same code for
12307         the lost primary case and the normal case.
12308         (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
12309         (get_vfield_offset, get_derived_offset): Lose.
12310         (dfs_find_final_overrider): Use look_for_overrides_here.
12311         (get_matching_virtual): New fn.
12312         * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
12313         not BV_VCALL_INDEX.
12314         * search.c (look_for_overrides_here): Split out from...
12315         (look_for_overrides_r): Here.
12317         * class.c (find_final_overrider): Return error_mark_node on error.
12319         * decl2.c (key_method): #if 0 accidental change.
12321 2001-06-06  John David Anglin  <dave@hiauly1.hia.nrc.ca>
12323         * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
12324         (build_over_call): Likewise.
12325         * decl.c (grokparms): Likewise.
12326         * pt.c (tsubst_decl): Likewise.
12327         * typeck.c (convert_arguments): Likewise.
12329 2001-06-05  Mark Mitchell  <mark@codesourcery.com>
12331         * semantics.c (begin_class_definition): Robustify.
12333         * pt.c (instantiate_decl): Tell the repository code about the
12334         clones, not the cloned functions.
12335         * repo.c (repo_template_used): Explicitly instantiate the cloned
12336         function, not the clones.
12338 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
12340         * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
12341         ICS_BAD_FLAG on created conversion.
12342         (compare_ics): Break out rank.
12344 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
12346         * decl.c (xref_tag): Remove extraneous %s on dependent name
12347         lookup warning.
12349 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
12351         * class.c (layout_vtable_decl): Fix off by one error on
12352         build_index_type.
12353         (build_vtt): Likewise.
12354         (build_ctor_vtbl_group): Likewise.
12356 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
12358         * class.c (maybe_indent_hierarchy): New function.
12359         (dump_class_hierarchy_r): Add flags. Dump extra binfo
12360         information, if enabled. Use maybe_indent_hierarchy. Adjust
12361         output format.
12362         (dump_class_hierarchy): Adjust prototype. Adjust output format.
12363         (dump_array, dump_vtable, dump_vtt): New functions.
12364         (finish_struct_1): Adjust hierarchy dumping.
12365         (initialize_vtable): Call dump_vtable.
12366         (build_vtt): Call dump_vtt.
12367         (build_ctor_vtbl_group): Call dump_vtable.
12368         * decl2.c (flag_dump_class_layout): Remove.
12369         (cxx_decode_option): Remove dump translation unit
12370         and dump class hierarchy check. Call dump_switch_p.
12371         (finish_file): Adjust dumping.
12372         (dump.c): Only dump base classes if not TDF_SLIM.
12373         Only dump namespace members if not TDF_SLIM.
12374         * optimize.c (dump_function): New function.
12375         (optimize_function): Call dump_function.
12376         * semantics.c (expand_body): Use dump_enabled_p.
12378 2001-06-01  Nathan Sidwell  <nathan@codesourcery.com>
12380         PR g++/2936
12381         Part missed from first commit
12382         * decl2.c (finish_anon_union): Copy context.
12384 2001-05-30  Nathan Sidwell  <nathan@codesourcery.com>
12386         PR g++/2936
12387         * optimize.c (remap_decl): Remap anonymous aggregate members too.
12389 2001-05-26  Nathan Sidwell  <nathan@codesourcery.com>
12391         PR g++/2823
12392         * semantics.c (expand_body): Don't optimize thunks.
12394 2001-05-25  Sam TH  <sam@uchicago.edu>
12396         * cp-tree.h lex.h: Fix header include guards.
12398 2001-05-25  Mark Mitchell <mark@codesourcery.com>
12400         * decl.c (init_decl_processing): Tweak.
12402 2001-05-24  Mark Mitchell  <mark@codesourcery.com>
12404         * decl.c (duplicate_decls): Tidy.
12405         (init_decl_processing): Always set flag_no_builtin.
12407 2001-05-24  Nathan Sidwell  <nathan@codesourcery.com>
12409         PR c++/2184
12410         * decl2.c (do_local_using_decl): Push the decls, even in a
12411         template.
12413 2001-05-22  Mark Mitchell  <mark@codesourcery.com>
12415         * optimize.c (initialize_inlined_parameters): Don't set
12416         TREE_READONLY for a VAR_DECL taking the place of an inlined
12417         PARM_DECL.
12419 2001-05-22  Jason Merrill  <jason_merrill@redhat.com>
12421         * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
12422         * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
12423         attribute.
12425 2001-05-22  Joseph S. Myers  <jsm28@cam.ac.uk>
12427         * parse.y: Refer to compound literals as such, not as
12428         constructor-expressions.
12430 2001-05-21  Mark Mitchell  <mark@codesourcery.com>
12432         * call.c (build_op_delete_call): Ignore exception-specifications
12433         when looking for matching delete operators.
12434         * init.c (build_new_1): Compute whether or not the allocation
12435         function used is a placement allocation function or not, and
12436         communicate this information to build_op_delete_call.
12438 2001-05-21  Jason Merrill  <jason_merrill@redhat.com>
12440         * class.c (build_vtable_entry_ref): Lose vtbl parm.  Fix for new abi.
12441         (build_vtbl_ref): Adjust.
12442         (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
12443         * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
12444         Re-add vtable-gc.
12445         (unsupported_options): Correspondingly.
12447         * decl2.c (maybe_make_one_only): Check flag_weak, not
12448         supports_one_only().
12450         * cp-tree.def (START_CATCH_STMT): Lose.
12451         * dump.c (cp_dump_tree): Don't dump it.  Do dump HANDLER_PARMS.
12452         * tree.c (cp_statement_code_p): Don't case it.
12453         * semantics.c (cp_expand_stmt): Likewise.
12454         * cp-tree.h (START_CATCH_TYPE): Lose.
12455         (HANDLER_TYPE): New.
12456         * except.c (expand_start_catch_block): Don't start any blocks.
12457         Return the type.
12458         (expand_end_catch_block): Don't end any blocks.
12459         * parse.y (handler): Don't pass anything from finish_handler_parms
12460         to finish_handler.
12461         * pt.c (tsubst_expr): Likewise.
12462         * semantics.c (begin_handler): Call note_level_for_catch here.
12463         (finish_handler_parms): Don't return anything.
12464         (genrtl_catch_block, begin_catch_block): Lose.
12465         (genrtl_handler): Call expand_start_catch here.
12467 2001-05-18  Jason Merrill  <jason_merrill@redhat.com>
12469         * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
12470         (get_vtable_decl, build_vtt): Not here.
12472 2001-05-20  Nathan Sidwell  <nathan@codesourcery.com>
12474         PR c++/2781
12475         * optimize.c (update_cloned_parm): Copy addressability and other
12476         flags.
12478 2001-05-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12480         * pt.c (determine_specialization): Ignore artificial functions.
12482 2001-05-20  Neil Booth  <neil@daikokuya.demon.co.uk>
12484         * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
12485         (C_RID_CODE): Remove.
12486         * lex.c (cxx_init_options): Call set_identifier_size.  Update.
12487         (init_parse): Don't do it here.
12489 2001-05-18  Diego Novillo  <dnovillo@redhat.com>
12491         * decl2.c (finish_objects): Use the original SYMBOL_REF from the
12492         function declaration to avoid stripping the symbol's attributes.
12494 2001-05-18  Nathan Sidwell  <nathan@codesourcery.com>
12496         * decl.c (pushdecl): Adjust error string.
12497         (xref_tag): Adjust friend class injection warning. Remove the
12498         inherited name from the class shadowed scope.
12500 2001-05-17  Mark Mitchell  <mark@codesourcery.com>
12502         * except.c (cp_protect_cleanup_actions): New function.
12503         (init_exception_processing): Don't set protect_cleanup_actions
12504         here.  Do set lang_protect_cleanup_actions.
12506 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
12508         * spew.c (read_token): Call yyerror on all unexpected tokens.
12510 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
12512         * init.c (member_init_ok_or_else): Take a tree rather than
12513         string for name.
12514         (expand_member_init): Adjust.
12516 2001-05-14  Nick Clifton  <nickc@cambridge.redhat.com>
12518         * decl.c (duplicate_decls): Suppress warning about duplicate
12519         decls if the first decl is a friend.
12521 2001-05-12  Zack Weinberg  <zackw@stanford.edu>
12523         * except.c (choose_personality_routine): Export.  Add
12524         explanatory comment.  Take an enum languages, not a boolean.
12525         (initialize_handler_parm): Adjust to match.
12526         * cp-tree.h: Prototype choose_personality_routine.
12527         * lex.c (handle_pragma_java_exceptions): New function.
12528         (init_cp_pragma): Register #pragma GCC java_exceptions.
12530 2001-05-12  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
12532         * method.c (build_mangled_C99_name): Remove unused prototype.
12534 2001-05-12  Alexandre Oliva  <aoliva@redhat.com>
12536         * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
12537         * typeck.c (get_member_function_from_ptrfunc,
12538         build_ptrmemfunc, expand_ptrmemfunc_cst): Take
12539         TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
12541         Reverted Geoff Keating's 2001-05-03's patch.
12543 2001-05-11  Ira Ruben   <ira@apple.com>
12545         * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
12547 2001-05-11  Neil Booth  <neil@daikokuya.demon.co.uk>
12549         * cp-tree.h (finish_label_expr, lookup_label): Delete.
12550         * parse.y: Update for '&&'; don't issue warning here.
12551         * semantics.c (finish_label_expr): Delete.
12553 2001-05-07  Mark Mitchell  <mark@codesourcery.com>
12555         * splay-tree.h (splay_tree_max): New function.
12556         (splay_tree_min): Likewise.
12558 2001-05-03  Geoffrey Keating  <geoffk@redhat.com>
12560         * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
12561         (pfn_vflag_identifier): Define.
12562         Update comment about layout of pointer functions.
12563         (build_ptrmemfunc1): Update prototype.
12564         (expand_ptrmemfunc_cst): Update prototype.
12565         * decl.c (initialize_predefined_identifiers): Initialize
12566         pfn_vflag_identifier.
12567         (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
12568         an extra field to the type.
12569         * expr.c (cplus_expand_constant): Pass 'flag' between
12570         expand_ptrmemfunc_cst and build_ptrmemfunc1.
12571         * typeck.c (get_member_function_from_ptrfunc): When
12572         FUNCTION_BOUNDARY < 16, look at additional field to determine
12573         if a pointer-to-member is a real pointer or a vtable offset.
12574         (build_ptrmemfunc1): Add new parameter to contain extra field.
12575         (build_ptrmemfunc): Pass the extra field around.
12576         (expand_ptrmemfunc_cst): Add new parameter to return extra field.
12577         (pfn_from_ptrmemfunc): Ignore the extra field.
12579 2001-05-03  Mark Mitchell  <mark@codesourcery.com>
12581         * cp-tree.h (flag_inline_trees): Update documentation.
12582         * decl.c (init_decl_processing): Adjust handling of
12583         flag_inline_functions and flag_inline_trees to support -O3.
12584         (grokfndecl): Set DECL_INLINE on all functions if that's what
12585         the user requested.
12586         (save_function_data): Clear DECL_INLINE in
12587         current_function_cannot_inline is non-NULL.
12588         * decl2.c (flag_inline_trees): Update documentation.
12590 2001-05-03  Nathan Sidwell  <nathan@codesourcery.com>
12592         * dump.c (cp_dump_tree, USING_STMT case): New case.
12593         * tree.c (cp_statement_code_p): Add USING_STMT.
12594         * decl2.c (do_using_directive): Add the using directive statement.
12596         * tree.c (walk_tree): Reformat an if block.
12598 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
12600         * decl.c (compute_array_index_type): Don't try to do anything with
12601         the indices when processing a template.
12603 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12605         * call.c: NULL_PTR -> NULL.
12606         * class.c: Likewise.
12607         * cvt.c: Likewise.
12608         * decl.c: Likewise.
12609         * decl2.c: Likewise.
12610         * except.c: Likewise.
12611         * init.c: Likewise.
12612         * rtti.c: Likewise.
12613         * search.c: Likewise.
12614         * tree.c: Likewise.
12615         * typeck.c: Likewise.
12616         * typeck2.c: Likewise.
12618 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
12620         * decl2.c (do_using_directive): Revert previous patch.
12622 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
12624         * cp-tree.def (USING_STMT): New statement node.
12625         * cp-tree.h (USING_STMT_NAMESPACE): New macro.
12626         * decl2.c (do_using_directive): Add USING_STMT to statement
12627         tree. Don't emit errors when processing template decl.
12628         * pt.c (tsubst_expr, USING_STMT case): New case.
12629         * semantics.c (cp_expand_stmt, USING_STMT case): New case.
12631 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
12633         * call.c (build_new_op): Convert args from reference here.
12634         (build_conditional_expr): Don't convert here.
12636 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
12638         * spew.c (last_token_id): New static variable.
12639         (read_token): Set it here.
12640         (yyerror): Use it here.
12642 2001-04-30  Richard Henderson  <rth@redhat.com>
12644         * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
12645         * decl.c: Likewise.
12647 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
12649         * gxxint.texi: Remove.
12650         * Make-lang.in: Remove all traces of gxxint.texi.
12652 2001-04-30  Mark P Mitchell  <mark@codesourcery.com>
12654         * decl2.c (start_static_initialization_or_destruction): Correct
12655         logic to handle the -fno-use-cxa-atexit case.
12657 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
12659         * optimize.c (update_cloned_parm): New function.
12660         (maybe_clone_body): Use it.  Update the `this' parameter too.
12662 2001-04-29  Joseph S. Myers  <jsm28@cam.ac.uk>
12664         * decl2.c (unsupported_options): Add new-abi.
12665         * lang-options.h: Remove no longer supported options.
12667 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
12669         * except.c (can_convert_eh): Don't check template parms,
12670         typename types etc.
12672 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
12674         * optimize.c (maybe_clone_body): Copy parameter names and locations.
12676 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
12678         * cp-tree.h (adjust_clone_args): Prototype new function.
12679         * class.c (adjust_clone_args): New function.
12680         * decl.c (start_function): Call it for in charge ctors.
12682 2001-04-26  Mark Mitchell  <mark@codesourcery.com>
12684         * method.c (use_thunk): Make sure that thunks really are emitted
12685         when requested.
12687 2001-04-26  Nathan Sidwell <nathan@codesourcery.com>
12689         * mangle.c (write_chars): New macro.
12690         (hwint_to_ascii): New function
12691         (write_number): Use it.
12692         (write_integer_cst): Deal with really big numbers.
12694 2001-04-25  Mark Mitchell  <mark@codesourcery.com>
12696         * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
12697         the clone.
12699 2001-04-25  Nathan Sidwell  <nathan@codesourcery.com>
12701         * decl.c (grokdeclarator): Set context of namespace scope
12702         TYPE_DECLS.
12704 2001-04-24  Zack Weinberg  <zackw@stanford.edu>
12706         * cp/optimize.c: Include hashtab.h.
12707         (struct inline_data): Add tree_pruner.
12708         (expand_call_inline, expand_calls_inline): Use it when calling
12709         walk_tree.
12710         (optimize_function): Initialize and free tree_pruner.
12712 2001-04-24  Nathan Sidwell <nathan@codesourcery.com>
12714         Lazy __FUNCTION__ generation.
12715         * cp-tree.def (FUNCTION_NAME): Remove.
12716         * cp-tree.h (function_name_declared_p): Remove.
12717         (cp_fname_init): Prototype.
12718         * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
12719         don't call declare_function_name. Call start_fname_decls.
12720         (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
12721         clobber the line number.
12722         (cp_fname_init): New function.
12723         (start_function): Call start_fname_decls.
12724         (finish_function): Call finish_fname_decls.
12725         * lex.c (reswords): Add slots for __FUNCTION__ et al.
12726         (rid_to_yy): Add mappings for __FUNCTION__ et al.
12727         * optimize.c (maybe_clone_body): Remove function_name_declared_p.
12728         * parse.y (VAR_FUNC_NAME): New token.
12729         (primary): Add VAR_FUNC_NAME.
12730         * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
12731         generation.
12732         (tsubst, FUNCTION_NAME case): Remove.
12733         (tsubst_copy, FUNCTION_NAME case): Remove.
12734         (tsubst_expr, DECL_STMT case): Be careful with a
12735         DECL_PRETTY_FUNCTION_P.
12736         (instantiate_decl): Remove function_name_declared_p.
12737         * semantics.c (begin_compound_statement): Don't call
12738         declare_function_name here.
12739         (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
12740         (finish_translation_unit): Call finish_fname_decls.
12741         (expand_body): Remove function_name_declared_p.
12742         * typeck2.c (digest_init): Allow any ERROR_MARK.
12744 2001-04-24  Nathan Sidwell  <nathan@codesourcery.com>
12746         * pt.c (tsubst_decl): Use VOID_TYPE_P.
12747         * semantics.c: Fix some typos.
12749 2001-04-23  Phil Edwards  <pme@sources.redhat.com>
12751         * cp/decl2.c (flag_honor_std):  Always initialize to 1.
12753 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12755         * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
12757 2001-04-23  Jason Merrill  <jason_merrill@redhat.com>
12759         * except.c (build_throw): Wrap the initialization of the exception
12760         object in a MUST_NOT_THROW_EXPR.
12761         (do_free_exception): #if 0.
12763 2001-04-20  Mark Mitchell  <mark@codesourcery.com>
12765         * cp-tree.h (finish_enum): Change prototype.
12766         * decl.c (finish_enum): Reorganize.
12767         * parse.y (structsp): Adjust calls to finish_enum.
12769 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
12771         * tree.c (cp_tree_equal): Adjust final switch formatting. Add
12772         't' case.
12774 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
12776         * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
12777         (layout_empty_base): Return at end flag.
12778         (build_base_field): Likewise.
12779         (build_base_fields): Likewise.
12780         (layout_virtual_bases): Don't add 1 to eoc value.
12781         (end_of_class): Use full size for empty bases.
12782         (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
12783         empty bases. Don't add 1 to eoc value. Only add trailing padding
12784         if we're an empty class with no empty bases.
12785         (dump_class_hierarchy): Dump size and alignment.
12787 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
12789         * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
12790         ICS_BAD_FLAG.
12792 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
12794         * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
12795         is found, look first if name does not match the structure name.
12797 2001-04-19  Mark Mitchell  <mark@codesourcery.com>
12799         * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
12800         set.
12801         (SET_DECL_LANGUAGE): New macro.
12802         * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
12803         (pushdecl): Likewise.
12804         (build_library_fn_1): Likewise.
12805         (build_cp_library_fn): Likewise.
12806         (grokfndecl): Likewise.
12807         (grokvardecl): Mark `extern "C"' variables as having C linkage.
12808         * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
12809         * lex.c (retrofit_lang_decl): Likewise.
12810         * mangle.c (mangle_decl_string): Don't mangle the names of
12811         variables declared with C language linkage.
12812         * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
12814 2001-04-18  John David Anglin  <dave@hiauly1.hia.nrc.ca>
12816         * semantics.c (simplify_aggr_init_exprs_r): Don't restore
12817         flag_access_control from uninitialized storage.
12819 2001-04-15  Mark Mitchell  <mark@codesourcery.com>
12821         * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
12822         * mangle.c (write_pointer_to_member_type): Fix mangling of
12823         pointers to cv-qualified member function types.
12825         * init.c (build_delete): Create a SAVE_EXPR for the address if
12826         we're going to use it more than once.
12828 2001-04-13  Mark Mitchell  <mark@codesourcery.com>
12830         * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
12831         (expand_ptremfunc_cst): Change prototype.
12832         (delta2_from_ptrmemfunc): Remove.
12833         * expr.c (cplus_expand_constant): Adjust call to
12834         expand_ptrmemfunc_cst.
12835         * typeck.c (build_ptrmemfunc1): Simplify.
12836         (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
12837         results in a constant.
12838         (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
12839         (delta2_from_ptrmemfunc): Remove.
12840         (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
12842 2001-04-12  Jason Merrill  <jason_merrill@redhat.com>
12844         * cp-tree.h (decl_namespace_list): New macro.
12845         (struct saved_scope): Add decl_ns_list.
12846         * decl.c (mark_saved_scope): Mark it.
12847         * decl2.c: Lose static decl_namespace_list.
12848         (init_decl2): Don't save it.
12850 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12852         * cp-tree.h (warn_return_type, yylex): Delete redundant
12853         declarations.
12855         * decl.c (current_class_depth, global_namespace): Likewise.
12857         * decl2.c (current_class_depth, flag_gnu_xref): Likewise
12859         * repo.c (flag_use_repository): Likewise.
12861 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12863         * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
12864         set_block, pushdecl, getdecls, gettags, init_decl_processing,
12865         maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
12866         lvalue_or_else, print_lang_statistics, comp_target_types,
12867         unsigned_type, signed_type, signed_or_unsigned_type,
12868         build_function_call, mark_addressable, incomplete_type_error):
12869         Delete redundant declarations.
12871 2001-04-11  Jason Merrill  <jason_merrill@redhat.com>
12873         * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
12874         (TYPE_ANONYMOUS_P): New macro.
12875         (TAGGED_TYPE_P): New macro.
12876         * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
12877         (grokfndecl, grokvardecl, grokdeclarator): Likewise.
12878         * tree.c (no_linkage_helper): Likewise.
12879         * semantics.c (begin_class_definition): Likewise.
12880         * pt.c (convert_template_argument): Likewise.
12881         * lex.c (check_for_missing_semicolon): Likewise.
12883 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
12885         * class.c (dfs_unshared_virtual_bases): New function.
12886         (mark_primary_bases): Call it.
12887         (check_bases): Ignore virtual bases when determining
12888         nearly-emptiness.
12890 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
12892         * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
12894 2001-04-11  Mark Mitchell  <mark@codesourcery.com>
12896         * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
12897         cloned function to the clone.
12899 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12901         * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
12903         * semantics.c: Include expr.h.
12905 2001-04-11  Nathan Sidwell  <nathan@codesourcery.com>
12907         * method.c (implicitly_declare_fn): Commonize code for copy ctor
12908         and assignment op. Set TREE_USED for parameter.
12910 2001-04-10  Mark Mitchell  <mark@codesourcery.com>
12912         * class.c (find_final_overrider_data): Add `candidates'.
12913         (dfs_find_final_overrider): Don't issue error messages
12914         prematurely.
12915         (find_final_overrider): Issue error messages here.
12916         (build_base_field): Don't warn about amgibuous direct bases here.
12917         (warn_about_ambiguous_direct_bases): New function.
12918         (layout_class_type): Use it.
12920 2001-04-10  Richard Henderson  <rth@redhat.com>
12922         * typeck.c (build_array_ref): Push the array reference inside
12923         COMPOUND_EXPR and COND_EXPR.
12925 2001-04-05  Mark Mitchell  <mark@codesourcery.com>
12927         * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
12928         * decl.c (duplicate_decls): Adjust accordingly.
12929         (maybe_commonize_var): Likewise.
12930         (grokfndecl): Likewise.
12931         (start_function): Likewise.
12932         (start_method): Likewise.
12933         * decl2.c (key_method): Likewise.
12934         (import_export_decl): Likewise.
12935         * method.c (implicitly_declare_fn): Likewise.
12936         * optimize.c (maybe_clone_body): Likewise.
12938 2001-04-05  Benjamin Kosnik  <bkoz@redhat.com>
12940         * lang-specs.h: Add __DEPRECATED.
12942 2001-04-05  J"orn Rennecke <amylaar@redhat.com>
12944         * search.c (get_dynamic_cast_base_type): When building a new
12945         constant, set its type to ssizetype.
12947 2001-04-04  Jakub Jelinek  <jakub@redhat.com>
12949         * optimize.c (expand_call_inline): Only add newly inlined statements
12950         into inlined_stmts.
12952 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
12954         * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
12955         (OPERATOR_FORMAT): Likewise.
12956         (OPERATOR_TYPENAME_FORMAT): Likewise.
12957         * operators.def: Remove old name-mangling information.
12958         * decl.c (grok_op_properties): Adjust accordingly.
12959         * lex.c (init_operators): Likewise.
12960         * rtti.c (get_tinfo_decl): Issue error messages about types that
12961         have variable size.
12963 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
12965         * decl2.c (import_export_decl): Don't call import_export_class
12966         when processing an inline member function.
12967         * semantics.c (expand_body): Call import_export_decl before
12968         emitting inline functions.
12970 2001-03-28  Richard Henderson  <rth@redhat.com>
12972         IA-64 ABI Exception Handling:
12973         * cp-tree.def (EH_SPEC_BLOCK): New.
12974         (MUST_NOT_THROW_EXPR): New.
12975         * cp-tree.h: Update changed function declarations.
12976         (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
12977         (CPTI_CALL_UNEXPECTED): New.
12978         (struct cp_language_function): Rename x_eh_spec_try_block
12979         to x_eh_spec_block.
12980         (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
12981         * decl.c (current_binding_level): If no current function
12982         bindings, revert to scope_chain.
12983         (initialize_predefined_identifiers): Remove __cp_push_exception.
12984         (store_parm_decls): Use begin_eh_spec_block.
12985         (finish_function): Use finish_eh_spec_block.
12986         (mark_lang_function): Update for name changes.
12987         * decl2.c (finish_file): No mark_all_runtime_matches.
12988         * dump.c (cp_dump_tree): Handle new tree codes.
12989         * error.c (dump_expr) [BIND_EXPR]: Fix typo.
12990         * except.c (catch_language_init, catch_language): Remove.
12991         (init_exception_processing): Don't set language code.
12992         Initialize call_unexpected_node, protect_cleanup_actions,
12993         eh_personality_libfunc, lang_eh_runtime_type.
12994         (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
12995         (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
12996         (prepare_eh_type): Split out type canonicalizations ...
12997         (build_eh_type_type): ... from here.
12998         (build_eh_type_type_ref): Remove.
12999         (mark_all_runtime_matches): Remove.
13000         (build_exc_ptr): New.
13001         (do_begin_catch, do_end_catch): New.
13002         (do_pop_exception): Remove.
13003         (build_terminate_handler): Remove.
13004         (choose_personality_routine): Split out language choice from ...
13005         (initialize_handler_parm): ... here.
13006         Use MUST_NOT_THROW_EXPR.
13007         (expand_start_catch_block): Use do_begin_catch.  Simplify Java
13008         exception object handling.
13009         (expand_start_eh_spec, expand_end_eh_spec): Remove.
13010         (expand_exception_blocks, alloc_eh_object): Remove.
13011         (begin_eh_spec_block, finish_eh_spec_block): New.
13012         (do_allocate_exception, do_free_exception): New.
13013         (expand_throw): Merge into ...
13014         (build_throw): ... here.  Update for abi.
13015         * expr.c (cplus_expand_expr): No expand_internal_throw.
13016         Handle MUST_NOT_THROW_EXPR.
13017         * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
13018         * semantics.c (*) Update for except.h name changes.
13019         (genrtl_try_block): No protect_with_terminate.
13020         (genrtl_eh_spec_block): New.
13021         (genrtl_handler): Don't emit the goto here.
13022         (cp_expand_stmt): Handle EH_SPEC_BLOCK.
13023         (genrtl_finish_function): Don't expand_exception_blocks.
13024         * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
13026 2001-03-28  Richard Henderson  <rth@redhat.com>
13028         * decl.c (struct named_label_list): Rename eh_region to
13029         in_try_scope, add in_catch_scope.
13030         (struct binding_level): Rename eh_region to is_try_scope,
13031         add is_catch_scope.
13032         (note_level_for_try): Rename from note_level_for_eh.
13033         (note_level_for_catch): New.
13034         (poplevel): Copy both is_try_scope and is_catch_scope to
13035         the named_label_list struct.
13036         (check_previous_goto_1): Don't check for catch block via
13037         DECL_ARTIFICIAL; use in_try_scope instead.
13038         (check_goto): Likewise.
13039         * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
13040         * except.c (expand_start_catch_block): Call note_level_for_catch.
13041         * semantics.c (begin_compound_stmt): Update for note_level_for_try.
13043 2001-03-27  Richard Henderson  <rth@redhat.com>
13045         * except.c: Use USING_SJLJ_EXCEPTIONS instead of
13046         exceptions_via_longjmp.
13048 2001-03-27  Phil Edwards  <pme@sources.redhat.com>
13050         * pt.c (check_default_tmpl_args):  Make error messages clearer.
13052 2001-03-26  Phil Edwards  <pme@sources.redhat.com>
13054         * error.c:  Also undefine 'A' macro used for cp_printers definition.
13056 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13058         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
13060 2001-03-26  Mike Yang <yang@research.att.com>
13061             Mark Mitchell  <mark@codesourcery.com>
13063         * dump.c (dump_access): New function.
13064         (cp_dump_tree): Use it.  Dump basetype information for class
13065         types.
13067 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
13069         * Makefile.in (optimize.o): Depend on params.h.
13070         (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
13071         (init_decl_processing): Set flag_no_inline when doing
13072         inlining-on-trees.
13073         * optimize.c: Include params.h.
13074         (struct inline_data): Improve documentation of FNS.  Add
13075         FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
13076         (INSNS_PER_STMT): New macro.
13077         (remap_block): Use CLONING_P.
13078         (inlinable_function_p): Don't inline big functions.
13079         (expand_call_inline): Keep track of how much inlining we've done.
13080         (optimize_function): Set FIRST_INLINED_FN.
13081         (maybe_clone_body): Set CLONING_P.
13082         * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
13083         tree nodes.
13084         (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
13085         rest_of_compilation.  Clear DECL_RTL for local variables
13086         afterwards.
13087         (clear_decl_rtl): New function.
13089 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>
13091         Implement DR 209
13092         * cp-tree.h (skip_type_access_control,
13093         reset_type_access_control): Prototype.
13094         * decl.c (grokdeclarator): Access of friends is not checked.
13095         * parse.y (component_decl_list): Reset type access control.
13096         * semantics.c (decl_type_access_control): Clear
13097         current_type_lookups.
13098         (save_type_access_control): Don't save if not deferring.
13099         (skip_type_access_control, reset_type_access_control): New
13100         functions.
13101         (begin_class_definition): Do type access control for basetypes.
13102         Start deferred access control.
13103         (finish_class_definition): Resume immediate access control if
13104         this is a local class.
13106 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13108         * class.c (add_method): Use memcpy/memmove, not bcopy.
13110         * decl.c (duplicate_decls): Likewise.
13112 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
13114         * mangle.c (write_discriminator): Use `_0' for discriminator 1,
13115         not `_'.
13117 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
13119         * decl.c (local_names): Define.
13120         (push_local_name): New.
13121         (grok_reference_init): Return init if initializing static reference
13122         variable with non-constant instead of emitting it.
13123         Move expand_static_init call to cp_finish_decl.
13124         (layout_var_decl): Call push_local_name.
13125         (maybe_commonize_var): Allow inlining functions even if they have
13126         static local variables, use comdat_linkage for them if flag_weak.
13127         (check_initializer): Call obscure_complex_init if
13128         grok_reference_init returned nonzero.
13129         (save_function_data): Clear x_local_names.
13130         (pop_cp_function_context): Free x_local_names.
13131         (mark_inlined_fns): Remove.
13132         (mark_lang_function): Mark x_local_names.
13133         (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
13134         Mark inlined_fns as tree, remove call to mark_inlined_fns.
13135         * class.c (alter_access): Ensure DECL_ACCESS is never set if
13136         DECL_DISCRIMINATOR_P.
13137         * cp-tree.h (cp_language_function): Add x_local_names.
13138         (lang_decl_flags): Add discriminator into u2.
13139         (lang_decl_inlined_fns): Remove.
13140         (lang_decl): inlined_fns is now a TREE_VEC.
13141         (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
13142         * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
13143         TREE_VEC, not a custom structure.
13144         (optimize_function): Likewise.
13145         * mangle.c (discriminator_for_local_entity): Discriminate among
13146         VAR_DECL local entities.
13147         * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
13148         is not valid.
13150 2001-03-22  Bryce McKinlay  <bryce@albatross.co.nz>
13152         Add support for Java interface method calls.
13153         * cp-tree.h (struct lang_type): Add java_interface flag.
13154         (TYPE_JAVA_INTERFACE): New macro.
13155         * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
13156         by setting TYPE_JAVA_INTERFACE.
13157         * call.c (java_iface_lookup_fn): New static.
13158         (build_over_call): If calling a method declared in a
13159         TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
13160         expression which resolves the function address.
13161         (build_java_interface_fn_ref): New function.
13163 2001-03-22  Richard Henderson  <rth@redhat.com>
13165         * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
13166         * except.c: Don't include it.
13168 2001-03-22  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
13169             based on an idea from Joe Buck <jbuck@synopsys.com>
13171         * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
13172         New nonterminals.
13173         (data_def, component_decl): Add reductions to bad_decl.
13175 2001-03-22  Jakub Jelinek  <jakub@redhat.com>
13177         * method.c (do_build_assign_ref): Don't use build_modify_expr for
13178         anonymous aggregates, since they don't have assignment operator
13179         method.
13180         * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
13181         assignment operators for anonymous structure fields.
13183 2001-03-21  Jason Merrill  <jason@redhat.com>
13185         * pt.c (instantiate_decl): Abort if we see a member constant
13186         instantiation that doesn't already have its initializer.
13187         Downgrade explicit instantiation without definition to pedwarn.
13189         * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
13190         * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
13191         (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
13193         * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
13194         (pending_vtables): Remove.
13195         * decl2.c (pending_vtables): Remove.
13196         (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
13197         CLASSTYPE_VTABLE_NEEDS_WRITING.
13198         (import_export_class): Likewise.
13199         (init_decl2): Don't mark pending_vtables.
13200         * lex.c (handle_pragma_vtable): Just sorry.
13201         * pt.c (instantiate_class_template): Don't mess with
13202         CLASSTYPE_VTABLE_NEEDS_WRITING.
13203         (mark_class_instantiated): Likewise.
13204         * ptree.c (print_lang_type): Don't print it.
13205         * semantics.c (begin_class_definition): Don't set it.
13207         * pt.c (template_tail): Replace with last_pending_template.
13208         (maybe_templates, maybe_template_tail): Remove.
13209         (add_pending_template): Adjust.
13210         (instantiate_pending_templates): Adjust.
13212         * cp-tree.h (struct saved_scope): Remove lang_stack field.
13213         (current_lang_stack): Remove.
13214         * decl.c (maybe_push_to_top_level): Don't initialize it.
13215         (duplicate_decls): Use current_lang_depth.
13216         (xref_basetypes): Likewise.
13217         * class.c (current_lang_depth): New fn.
13218         (push_lang_context): Use more varray functionality.
13219         (pop_lang_context): Likewise.
13221         * error.c (GLOBAL_THING): Always use '__'.
13223 2001-03-21  Mark Mitchell  <mark@codesourcery.com>
13225         * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
13227         * mangle.c (mangle_decl_string): Mangle the names of overloaded
13228         operators, even when they have `extern "C"' linkage.
13230 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
13232         * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
13233         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
13234         where it's not necessary.
13235         (add_method): Remove optimization involving comparison of
13236         DECL_ASSEMBLER_NAME.
13237         (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
13238         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
13239         where it's not necessary.
13240         (check_methods): Likewise.
13241         (build_clone): Likewise.
13242         (built_vtt): Likewise.
13243         * cp-tree.h (DECL_NEEDED_P): Likewise.
13244         * decl.c (pushtag): Likewise.
13245         (duplicate_decls): Likewise.
13246         (pushdecl): Likewise.
13247         (builtin_function): Likewise.
13248         (build_library_fn_1): Set DECL_LANGUAGE for library functions.
13249         (build_cp_library_fn): Likewise.
13250         (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
13251         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
13252         where it's not necessary.
13253         (make_rtl_for_nonlocal_decl): Likewise.
13254         (cp_finish_decl): Likewise.
13255         (grokfndecl): Likewise.
13256         (grokvardecl): Likewise.
13257         (grokdeclarator): Likewise.
13258         (start_function): Likewise.
13259         (cp_missing_return_ok_p): Likewise.
13260         * decl2.c (grokclassfn): Likewise.
13261         (check_classfn): Likewise.
13262         (finish_static_data_member_decl): Likewise.
13263         (grokfield): Likewise.
13264         * error.c (GLOBAL_IORD_P): Remove.
13265         (dump_global_iord): Improve output.
13266         (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
13267         * except.c (nothrow_libfn_p): Summarily reject any function not in
13268         namespace-scope.
13269         * init.c (build_java_class_ref): Don't explicitly set
13270         DECL_ASSEMBLER_NAME after calling mangle_decl.
13271         * mangle.c (mangle_decl_string): Handle extern "C" functions.
13272         (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
13273         * method.c (set_mangled_name_for_decl): Don't explicitly set
13274         DECL_ASSEMBLER_NAME after calling mangle_decl.
13275         (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
13276         IDENTIFIER_GLOBAL_VALUE for the thunk.
13277         * pt.c (set_mangled_name_for_template_decl): Remove.
13278         (check_explicit_specialization): Don't use it.
13279         (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
13280         (tsubst_friend_function): Likewise.
13281         (tsubst_decl): Likewise.
13282         (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
13283         * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
13284         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
13285         where it's not necessary.
13286         (tinfo_base_init): Likewise.
13287         (create_real_tinfo_var): Likewise.
13288         * search.c (looup_field_1): Likewise.
13289         * semantics.c (finish_named_return_value): Likewise.
13290         * tree.c (init_tree): Set lang_set_decl_assembler_name.
13292 2001-03-15  Gabriel Dos Reis  <gdr@codesourcery.com>
13294         Correct semantics restrictions checking in throw-expression.
13295         * except.c (is_admissible_throw_operand): New function.
13296         (build_throw): Use it.
13298 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
13300         * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
13301         and its ilk.
13303 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
13305         * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
13306         * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
13307         * decl.c (duplicate_decls): Likewise.
13308         (builtin_function): Likewise.
13309         (build_library_fn): Likewise.
13310         (build_cp_library_fn): Likewise.
13311         (check_initializer): Likewise.
13312         (cp_finish_decl): Likewise.
13313         * decl2.c (grokfield): Likewise.
13314         (grok_function_init): Remove #if 0'd code.
13315         (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
13316         * friend.c (do_friend): Likewise.
13317         * init.c (get_temp_regvar): Likewise.
13318         * method.c (make_thunk): Likewise.
13319         * pt.c (tsubst_friend_function): Likewise.
13320         (tsubst_decl): Likewise.
13321         (regenerate_decl_from_template): Likewise.
13322         * semantics.c (genrtl_named_return_value): Likewise.
13323         (expand_body): Likewise.
13324         (genrtl_finish_function): Likewise.
13325         * tree.c (cp_tree_equal): Likewise.
13327 2001-03-12  Nathan Sidwell  <nathan@codesourcery.com>
13329         * call.c (convert_like_real): Add extra semantics to INNER
13330         parameter. Don't convert to temporary if a user conversion
13331         gives us an lvalue that we're about to bind to a reference.
13332         Set INNER to indicate pending reference binding on recursive
13333         calls.
13335 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
13337         * cp/lex.c: Delete duplicate pending_lang_change.
13339 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
13341         * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
13342         Similarly.
13343         * cp/repo.c (get_base_filename, open_repo_file): Similarly.
13344         * cp/cp-tree.h: Remove file_name_nondirectory prototype.
13346 2001-03-09  Zack Weinberg  <zackw@stanford.edu>
13348         * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
13350 2001-03-08  Stan Shebs  <shebs@apple.com>
13352         * cp-tree.h (set_identifier_local_value): Remove unused decl.
13354 2001-03-06  Zack Weinberg  <zackw@stanford.edu>
13356         * spew.c: Remove references to CPP_OSTRING.
13358 2001-03-06  Andrew Haley  <aph@redhat.com>
13360         * typeck.c (convert_arguments): Check that we have an fndecl.
13362 2001-03-05  Andrew Haley  <aph@redhat.com>
13364         * typeck.c (convert_arguments): Don't do ellipsis conversion for
13365         __built_in_constant_p.
13367 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
13369         * typeck.c (build_static_cast): Allow enum to enum conversions
13370         as per DR 128.
13372 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
13374         * class.c (check_field_decls): Pointers to member do not a
13375         non-pod struct make, as per DR 148.
13377 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
13379         * call.c (joust): cp_pedwarn when using gnu extension concerning
13380         worst conversion sequences.
13382 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
13384         * decl.c: Replace all uses of 'boolean' with 'bool'.
13386 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
13388         * lang-specs.h: Add zero initializer for cpp_spec field to
13389         all array elements that need one.  Don't put an #ifdef inside
13390         the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
13391         use it.
13393 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
13395         Implement using decls inside template functions.
13396         * decl2.c (validate_nonmember_using_decl): Don't special case
13397         fake_std_node in the global namespace. Don't reject early when
13398         processing a template.
13399         (do_local_using_decl): Add to statement tree. Don't do further
13400         processing when building a template.
13401         * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
13403 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
13405         * decl2.c (do_nonmember_using_decl): Don't complain if we find
13406         same function. Do complain about ambiguating extern "C"
13407         declarations.
13409 2001-02-28  Nathan Sidwell  <nathan@codesourcery.com>
13411         Remove floating point and complex type template constant parms.
13412         * pt.c (convert_nontype_argument): Remove REAL_TYPE and
13413         COMPLEX_TYPE extensions.
13414         (invalid_nontype_parm_type_p): Likewise.
13416 2001-02-27  Jeffrey Oldham  <oldham@codesourcery.com>
13418         * except.c (call_eh_info): Revert "match_function"'s type.
13420 2001-02-27  Nathan Sidwell  <nathan@codesourcery.com>
13422         Fix ctor vtable vcall offsets.
13423         * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
13424         (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
13425         (get_matching_base): Remove.
13426         (get_original_base): New function.
13427         (build_vtbl_initializer): Initialize vid.rtti_binfo.
13428         Use a virtual thunk for a ctor vtable with an index
13429         (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
13430         primary base within a constructor vtable. Only set
13431         BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
13432         when primary base has been lost.
13433         * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
13435 2001-02-26  Jeffrey Oldham  <oldham@codesourcery.com>
13437         * call.c (joust): Ensure more_specialized()'s argument length
13438         parameter has correct value for constructors.
13440 2001-02-26  Nathan Sidwell  <nathan@codesourcery.com>
13442         * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
13444         * decl.c (mark_inlined_fns): Prototype.
13446 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
13448         * spew.c (yylex): Correct handling of friends.
13450 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
13452         * mangle.c (write_encoding): Pass write_function_type the
13453         FUNCTION_DECL for the function being encoded.
13454         (write_function_type): Pass it along to write_bare_function_type.
13455         (write_bare_function_type): Pass it along to write_method_parms.
13456         (write_method_parms): Don't mangle the compiler-generated
13457         parameters to a constructor or destructor.
13459 2001-02-22  Andreas Jaeger  <aj@suse.de>
13461         * optimize.c: Include toplev.h for
13462         note_deferral_of_defined_inline_function prototype.
13464 2001-02-22  Jakub Jelinek  <jakub@redhat.com>
13466         * cp-tree.h (struct lang_decl_inlined_fns): New.
13467         (struct lang_decls): Add inlined_fns.
13468         (DECL_INLINED_FNS): New macro.
13469         * optimize.c (struct inline_data): Add inlined_fns.
13470         (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
13471         (inlinable_function_p): Likewise, fix typo in comment,
13472         function is not inlinable if it already inlined function currently
13473         being optimized.
13474         (expand_call_inline): Add fn to inlined_fns if necessary.
13475         (optimize_function): Initialize inlined_fns.
13476         Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
13477         * decl.c (mark_inlined_fns): New function.
13478         (lang_mark_tree): Call it.
13480 2001-02-21  Jason Merrill  <jason@redhat.com>
13482         * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
13483         (DECL_UNINLINABLE): Move to middle-end.
13485         * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
13486         * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
13487         * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
13488         * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
13489         parms and outer BLOCK.  note_deferral_of_defined_inline_function.
13491         * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
13492         second parm of op=.
13494 2001-02-19  Mark Mitchell  <mark@codesourcery.com>
13496         * decl2.c (set_decl_namespace): Allow explicit instantiations in
13497         any namespace.
13499 2001-02-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
13501         * optimize.c (expand_call_inline): Don't walk subtrees of type
13502         nodes.
13504 2001-02-18  Mark Mitchell  <mark@codesourcery.com>
13506         * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
13507         for a destructor.
13509 2001-02-18  Jason Merrill  <jason@redhat.com>
13511         Do put the VTT parameter in DECL_ARGUMENTS.
13512         * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
13513         (current_vtt_parm): New macro.
13514         (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
13515         (DECL_HAS_VTT_PARM_P): New macro.
13516         (DECL_VTT_PARM): Remove.
13517         (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
13518         * decl.c (duplicate_decls): Only copy the operator code if
13519         appropriate.
13520         (start_function): Set current_vtt_parm.
13521         (lang_mark_tree): Don't mark vtt_parm.
13522         * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
13523         DECL_ARGUMENTS.  Set DECL_HAS_VTT_PARM_P.
13524         * class.c (build_clone): Maybe remove the VTT parm.
13525         * optimize.c (maybe_clone_body): Set up the VTT parm.
13526         * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
13527         * call.c (build_over_call): Just allow the VTT arg.
13528         * method.c (make_thunk): Don't set DECL_VTT_PARM.
13529         (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
13530         (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
13531         * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
13532         * error.c (dump_function_decl): Likewise.
13533         * call.c (build_user_type_conversion_1, convert_like_real): Abort
13534         if we try to call a constructor with in-charge or VTT parms.
13535         * method.c (skip_artificial_parms_for): New fn.
13536         * call.c (add_function_candidate, build_over_call): Call it.
13537         * call.c (build_new_method_call): Use current_vtt_parm.
13538         * init.c (expand_virtual_init): Likewise.
13539         * class.c (same_signature_p): No longer static.
13540         * cp-tree.h: Declare it.
13541         * search.c (look_for_overrides_r): Use it.
13543 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
13545         * cp-tree.h (new_abi_rtti_p): Remove.
13546         (name_mangling_version): Likewise.
13547         (flag_do_squangling): Likewise.
13548         * class.c (build_rtti_vtbl_entries): Remove old ABI support.
13549         * decl.c (grokfndecl): Likewise.
13550         * decl2.c (name_mangling_version): Remove.
13551         (flag_do_squangling): Likewise.
13552         (lang_f_options): Remove `squangle'.
13553         (unsupported_options): Add `squangle'.
13554         (cxx_decode_option): Issue a warning about uses of
13555         -fname-mangling-version.
13556         (finish_file): Remove old ABI support.
13557         * pt.c (check_explicit_specialization): Likewise.
13558         (tsubst_decl): Likewise.
13559         * rtti.c (init_rtti_processing): Likewise.
13560         (build_headof): Likewise.
13561         (get_tinfo_decl_dynamic): Likewise.
13562         (tinfo_from_decl): Likewise.
13563         (build_dynamic_cast_1): Likewise.
13564         (synthesize_tinfo_var): Likewise.
13565         * init.c (build_new): Allow enumeration types for the array-bounds
13566         in a direct-new-declarator.
13568         * semantics.c (finish_typeof): Resolve OFFSET_REFs.
13570         * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
13571         TREE_PROTECTED from the template being specialized.
13573 2001-02-17  Jason Merrill  <jason@redhat.com>
13575         * decl2.c (build_artificial_parm): Set TREE_READONLY.
13577         * decl.c (bad_specifiers): Allow throw specs on things with
13578         pointer-to-function or -member-function type.
13579         * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
13580         a pmf.
13582 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
13584         * call.c (check_dtor_name): Handle template names correctly.
13586 2001-02-16  Jason Merrill  <jason@redhat.com>
13588         * cp-tree.h (DECL_USE_VTT_PARM): Remove.
13589         * decl2.c (maybe_retrofit_in_chrg): Don't create it.
13590         * optimize.c (maybe_clone_body): Don't substitute it.
13591         * call.c (build_new_method_call): Check in_chrg instead.
13592         * init.c (expand_virtual_init): Likewise.
13594 2001-02-16  Gabriel Dos Reis  <gdr@codesourcery.com>
13596         * decl.c (check_tag_decl): Make sure a typedef for an anonymous
13597         class-type introduces at least a type-name.
13599 2001-02-16  Jakub Jelinek  <jakub@redhat.com>
13601         * call.c (convert_like_real): Create a temporary for non-lvalue.
13603 2001-02-16  Jeffrey Oldham  <oldham@codesourcery.com>
13605         * cp-tree.h: Fix typos in comments.
13607 2001-02-16  Jason Merrill  <jason@redhat.com>
13609         * optimize.c (remap_block): If we're compiling a clone, pass the
13610         new block to insert_block.
13612 2001-02-16  Mark Mitchell  <mark@codesourcery.com>
13614         * semantics.c (finish_asm_stmt): Robustify.
13616 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
13618         * pt.c (push_template_decl_real): Don't remangle the name of a
13619         class template.
13621 2001-02-15  Jim Meyering  <meyering@lucent.com>
13623         * Make-lang.in (c++.install-common): Depend on installdirs.
13624         (c++.install-info): Likewise.
13625         (c++.install-man): Likewise.
13627 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
13629         * typeck2.c (build_m_component_ref): Robustify.
13631 2001-02-15  Alexandre Oliva  <aoliva@redhat.com>
13633         * friend.c (do_friend): Don't take the nested [template] class
13634         into account when deciding whether to warn about the friend
13635         function not referring to a template function.
13637 2001-02-14  Jakub Jelinek  <jakub@redhat.com>
13639         * typeck.c (build_unary_op): Clarify error message.
13641 2001-02-08  Aldy Hernandez  <aldyh@redhat.com>
13643         * parse.y (component_constructor_declarator): allow optional
13644         parentheses around constructor class name.
13646 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
13648         * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
13649         section.
13650         * init.c (emit_base_init): Remove incorrect comment about
13651         virtual bases.
13652         * method.c (make_thunk): Fix comment alignment.
13654 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
13656         Kill remnants of this is variable.
13657         * cp-tree.h (flag_this_is_variable): Remove.
13658         * decl2.c (flag_this_is_variable): Remove.
13659         * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
13660         (build_vbase_path): The path is non-static, even in a cdtor.
13661         (resolves_to_fixed_type_p): Add additional return value.
13662         * search.c (init_vbase_pointers): Adjust.
13663         * tree.c (lvalue_p_1): Adjust.
13664         * typeck.c (mark_addressable): Adjust.
13666 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
13668         * pt.c (unify): Don't check cv quals of array types.
13670 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
13672         * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
13673         check whether we already have the type.
13675 2001-02-13  Mark Mitchell  <mark@codesourcery.com>
13677         * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
13678         * call.c (build_op_delete_call): Simplify to remove duplicate
13679         code.
13680         * class.c (clone_function_decl): Don't build the deleting variant
13681         of a non-virtual destructor.
13682         * decl.c (finish_destructor_body): Don't call delete if this is a
13683         non-virtual destructor.
13684         * init.c (build_delete): Explicitly call `operator delete' when
13685         deleting an object with a non-virtual destructor.
13687 2001-02-13  Jason Merrill  <jason@redhat.com>
13689         * lang-specs.h: Add more __EXCEPTIONS.
13691 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
13693         * typeck2.c (process_init_constructor): Check
13694         TREE_HAS_CONSTRUCTOR before issuing missing init warning.
13696 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
13698         * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
13699         Remove spurious information in comment. Allow further
13700         adjustments of REFERENCE_TYPE args.
13702 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
13704         * errfn.c (cp_deprecated): Tweak diagnostic text.
13705         * parse.y (new_initializer): Deprecate initializer lists
13706         extension.
13708 2001-02-12  Mark Mitchell  <mark@codesourcery.com>
13710         Remove old ABI support.
13712 2001-02-11  Mark Mitchell  <mark@codesourcery.com>
13714         * decl2.c (flag_vtable_thunks): Always set it to 1.
13715         (flag_new_abi): Likewise.
13716         * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
13718         * Makefile.in (g++spec.o): Fix typo.
13720 2001-02-09  Jason Merrill  <jason@redhat.com>
13722         * lang-specs.h: Restore definition of __EXCEPTIONS.
13724 2001-02-08  Jason Merrill  <jason@redhat.com>
13726         * search.c (shared_member_p): New function.
13727         (lookup_field_r): Use it.
13728         * cp-tree.h (SHARED_MEMBER_P): Remove.
13730         * method.c (process_overload_item): Handle template-dependent array
13731         bounds.
13732         * pt.c (type_unification_real): If we end up with undeduced nontype
13733         parms, try again.
13735         * decl.c (lookup_name_real): Tweak warning to refer to decls, not
13736         types.
13738         * typeck2.c (friendly_abort): Don't say anything if we have
13739         earlier errors or sorries.
13741         * decl.c (check_tag_decl): Notice attempts to redefine bool and
13742         wchar_t.  Ignore if in_system_header.
13744         * decl.c (maybe_push_cleanup_level): New fn...
13745         (start_decl_1): ...split out from here.
13746         * cvt.c (build_up_reference): Use it.
13747         * cp-tree.h: Declare it.
13749 2001-02-07  Mark Mitchell  <mark@codesourcery.com>
13751         * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
13752         spec.
13754 2001-02-06  Nathan Sidwell  <nathan@codesourcery.com>
13756         * pt.c (lookup_template_class): Make sure it's a primary
13757         template or template_template_parm when called from the parser.
13758         (instantiate_template_class): Add assertion.
13760 2001-02-05  Alexandre Oliva  <aoliva@redhat.com>
13762         * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
13763         from error_mark_node.
13765 2001-02-05  Nathan Sidwell  <nathan@codesourcery.com>
13767         Fix specification and implementation bugs in V3 ABI
13768         construction vtables.
13769         * cp-tree.h (flag_dump_class_layout): New flag.
13770         (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
13771         (BINFO_LOST_PRIMARY_P): New flag.
13772         (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
13773         (BINFO_PRIMARY_MARKED_P): Rename to ...
13774         (BINFO_PRIMARY_P): ... here.
13775         (binfo_via_virtual): New prototype.
13776         * decl2.c (flag_dump_class_layout): New flag.
13777         (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
13778         use `=' as a file name separator.
13779         * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
13780         bases.
13781         (build_vtbl_address): If this is a virtual primary base, then
13782         get the vtbl of what it is ultimately primary for.
13783         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
13784         for BINFO_PRIMARY_P.
13785         (dfs_skip_nonprimary_vbases_markedp): Likewise.
13786         (get_shared_vbase_if_not_primary): Likewise.
13787         (dfs_get_pure_virtuals): Likewise.
13788         (expand_upcast_fixups): Likewise.
13789         (fixup_virtual_upcast_offsets): Likewise.
13790         (dfs_find_vbase_instance): Likewise.
13791         (find_vbase_instance): Likewise.
13792         (binfo_from_vbase): Adjust comment to reflect reality.
13793         (binfo_via_virtual): New function.
13794         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
13795         for binfo walking during VTT construction.
13796         (dfs_mark_primary_bases): Remove.
13797         (force_canonical_binfo_r): New function.
13798         (force_canonical_binfo): New function.
13799         (mark_primary_virtual_base): New function.
13800         (mark_primary_bases): Walk in inheritance graph order, use
13801         mark_primary_virtual_base.
13802         (determine_primary_base): Use some more intermediate variables.
13803         (dfs_find_final_overrider): Don't check for overriding along a
13804         virtual path.
13805         (dfs_modify_vtables): Walk into primary virtual bases too.
13806         (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
13807         (build_base_fields): Likewise.
13808         (dfs_set_offset_for_unshared_vbases): Likewise.
13809         (layout_virtual_bases): Likewise.
13810         (end_of_class): Likewise.
13811         (finish_struct_1): Call dump_class_hierarchy, if requested.
13812         (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
13813         (dump_class_hierarchy_r): Add stream parameter. Emit more information.
13814         (dump_class_hierarchy): Add file parameter. Append to file, if
13815         required.
13816         (finish_vtbls): Adjust accumulate_vtbl_inits call.
13817         Use canonical base for virtual bases.
13818         (build_vtt): Add more comments. Adjust build_vtt_inits call.
13819         (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
13820         Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
13821         VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
13822         virtual VTTs.
13823         (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
13824         from DATA.  We want virtual primary bases and all bases via virtual.
13825         Only set BINFO_VPTR_INDEX for top level. Look up from a primary
13826         virtual base when not a construction vtable.
13827         (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
13828         (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
13829         Use canonical bases when processing virtual bases.
13830         (accumulate_vtbl_inits): We're interested in any base via a
13831         virtual path.
13832         (dfs_accumulate_vtbl_inits): If this is a primary virtual base
13833         within a construction vtable, determine what is being overridden.
13834         (build_vtbl_initializer): Add more comments
13835         (add_vcall_offset_vtbl_entries_1): Adjust comment.
13836         (build_rtti_vtbl_entries): Check if the base has lost its
13837         primary.
13839 2001-02-05  Mark Mitchell  <mark@codesourcery.com>
13841         * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
13843 2001-02-04  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13845         * decl.c (pushdecl): Call abort instead of fatal.
13846         * except.c (decl_is_java_type): Call fatal_error instead of fatal.
13847         * init.c (build_new_1): Likewise.
13848         (build_java_class_ref): Call internal_error and fatal_error, not fatal.
13849         * decl.c (build_typename_type): hash_table_init now returns void.
13850         decl.c (init_decl_processing): Make an error non-fatal.
13852 2001-02-04  Mark Mitchell  <mark@codesourcery.com>
13854         * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
13855         Document.
13856         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
13857         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
13858         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
13859         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
13860         * decl.c (maybe_commonize_var): Use the new name-mangling where
13861         appropriate.
13862         * decl2.c (comdat_linkage): Enhance comments.  Make all
13863         compiler-generated things static, if COMDAT is not available.
13864         (get_tinfo_decl): Do not make typeinfo objects that belong in the
13865         library COMDAT.
13866         (tinfo_base_init): Use the correct mangled name for typeinfo
13867         strings, and push them into the global scope.
13868         (typeinfo_in_lib_p): New function.
13869         (synthesize_tinfo_var): Use it.
13870         (create_real_tinfo_var): Likewise.
13872 2001-02-03  Jakub Jelinek  <jakub@redhat.com>
13874         * decl.c (push_class_binding): Use context_for_name_lookup instead
13875         of CP_DECL_CONTEXT.
13876         * search.c (context_for_name_lookup): Remove static.  Check for NULL
13877         context in the loop.
13878         * cp-tree.h (context_for_name_lookup): Add prototype.
13880 2001-02-02  Jakub Jelinek  <jakub@redhat.com>
13882         * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
13883         * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
13884         Remove.
13885         * call.c (convert_class_to_reference, build_user_type_conversion_1,
13886         add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
13888 2001-02-02  Mark Mitchell  <mark@codesourcery.com>
13890         * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
13891         of macros used when compiling g++spec.c.
13892         * g++spec.c (lang_specific_driver): Link with the shared
13893         libgcc by default.
13895 2001-01-29  Joseph S. Myers  <jsm28@cam.ac.uk>
13897         * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
13898         make_reference_declarator, make_call_declarator), method.c
13899         (implicitly_declare_fn), parse.y (namespace_using_decl,
13900         notype_unqualified_id, expr_or_declarator, new_type_id,
13901         after_type_declarator, direct_after_type_declarator,
13902         notype_declarator, complex_notype_declarator,
13903         complex_direct_notype_declarator, qualified_id,
13904         notype_qualified_id, overqualified_id, direct_new_declarator,
13905         absdcl, direct_abstract_declarator, conversion_declarator), pt.c
13906         (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
13907         instead of build_parse_node.
13909 2001-01-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13911         * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
13912         (minus_one_node): Moved to top level gcc directory.  Renamed
13913         to integer_minus_one_node.
13915         * init.c (init_init_processing): Don't set minus_one_node.
13916         (build_vec_init): Use integer_minus_one_node.
13918         * rtti.c (get_tinfo_decl_dynamic): Likewise.
13920 2001-01-28  Jakub Jelinek  <jakub@redhat.com>
13922         * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
13923         identical and they would be replaced with constant, remove
13924         MODIFY_EXPR from the tree.
13926 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13928         * Make-lang.in: Remove all dependencies on defaults.h.
13929         * call.c: Don't include defaults.h.
13930         * decl.c: Likewise.
13931         * decl2.c: Likewise.
13932         * except.c: Likewise.
13933         * pt.c: Likewise.
13934         * rtti.c: Likewise.
13935         * tree.c: Likewise.
13936         * typeck.c: Likewise.
13938 2001-01-25  Jakub Jelinek  <jakub@redhat.com>
13940         * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
13941         operators even in "C" linkage.
13942         * method.c (set_mangled_name_for_decl): Likewise.
13943         * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
13944         overloaded operators in "C" linkage.
13946 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
13948         * pt.c (tsubst_decl): Remove IN_DECL parameter.
13949         (tsubst_arg_types): Check parameter is not void.
13950         (tsubst): Adjust tsubst_decl call.
13952 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
13954         * call.c (add_builtin_candidate): Quote std properly, from
13955         previous change.
13957 2001-01-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
13959         * pt.c (check_explicit_specialization): Clone constructors and
13960         destructors.
13962 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
13964         * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
13965         indicates anything special about template depth. Make sure we
13966         only count the user visible template classes.
13968 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
13970         * call.c (build_conv): Typo in comment.
13971         (add_builtin_candidate): Add more explanation.
13972         Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
13973         Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
13974         when we have enumeral types.
13975         (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
13976         candidates for relops and eqops.
13977         (joust): Simplify control flow. Allow a non-template user
13978         function to hide a builtin.
13980 2001-01-22  Nathan Sidwell  <nathan@codesourcery.com>
13982         * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
13983         (more_specialized): Add deduction parameter.
13984         * call.c (joust): Adjust more_specialized call.
13985         * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
13986         UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
13987         (get_bindings_order): Remove.
13988         (get_bindings_real): Add DEDUCE parameter.
13989         (maybe_adjust_types_for_deduction): Return extra unify flags. Do
13990         REFERENCE_TYPE jig for DEDUCE_ORDER.
13991         (type_unification_real): Deal with DEDUCE_ORDER. Use result of
13992         maybe_adjust_types_for_deduction.
13993         (more_specialized): Add DEDUCE parameter. Call get_bindings_real
13994         directly.
13995         (try_one_overload): Use result of maybe_adjust_types_for_deduction.
13996         (check_cv_quals_for_unify): Use new unify qualifier flags.
13997         (unify): Clear new unify qualifier flags.
13998         (get_bindings_real): Add DEDUCE parameter.
13999         (get_bindings): Adjust call to get_bindings_real.
14000         (get_bindings_overload): Likewise.
14001         (most_specialized_instantiation): Adjust call to
14002         more_specialized.
14004 2001-01-19  Jason Merrill  <jason@redhat.com>
14006         * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
14008         * decl.c (init_decl_processing): Just force -fvtable-thunks on if
14009         -fnew-abi.
14011 2001-01-19  Ute Pelkmann  <scope.muc@t-online.de>
14013         * decl2.c (arg_assoc_class): Fix double iteration logic.
14015 2001-01-19  Jason Merrill  <jason@redhat.com>
14017         * init.c (build_delete): Always call convert_force to strip cv-quals.
14019         * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
14020         * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
14021         * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
14023 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
14025         * search.c (get_vbase_1): Count only virtual bases.
14027 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
14029         * class.c (duplicate_tag_error): Robustify flag clearing.
14031 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
14033         * cp-tree.h (lookup_template_class): Add complain parm.
14034         * decl.c (lookup_namespace_name): Adjust call to
14035         lookup_template_class.
14036         (make_typename_type): Likewise.
14037         * semantics.c (finish_template_type): Likewise.
14038         * pt.c (lookup_template_class): Add complain parm. Adjust.
14039         (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
14040         (tsubst): Likewise.
14042 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
14044         * pt.c (copy_default_args_to_explicit_spec): Preserve
14045         object's CV quals. Reorganize.
14047 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
14049         * typeck.c (build_modify_expr): Say `initialization' for
14050         INIT_EXPRs.
14051         * init.c (build_default_init): Convert to enumeral type, if
14052         needed.
14054 2001-01-18  Jakub Jelinek  <jakub@redhat.com>
14056         * parse.y (nomods_initdcl0): Properly set things up for
14057         initdcl0_innards.
14059 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
14061         * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
14062         (type_unification_real): Set it.
14063         (unify): Use it.
14065 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
14067         * decl.c (finish_destructor_body): Convert to vbase pointer here.
14069 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
14071         * semantics.c (begin_class_definition): Check we're not inside a
14072         template parm list.
14074 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
14076         * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
14077         BASELINK_P.
14079 2001-01-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14081         * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
14082         * call.c (build_over_call): Add comment.
14084 2001-01-16 Daniel Berlin <dberlin@redhat.com>
14086         * cvt.c (ocp_convert): Handle vector type conversion
14087         * typeck2.c (digest_init): Handle vector type initializations
14089 2001-01-16  Phil Edwards  <pme@sources.redhat.com>
14091         * g++spec.c:  Don't add libraries needlessly if -fsyntax-only
14092           was given.
14094 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
14096         * pt.c (check_nontype_parm): Rename to ...
14097         (invalid_nontype_parm_type_p): ... here.
14098         (process_template_parm): Adjust.
14099         (convert_template_argument): Adjust.
14101 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
14103         * pt.c (check_nontype_parm): New function.
14104         (process_template_parm): Use it.
14105         (convert_template_argument): Use it.
14106         (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
14107         member.
14109 2001-01-14  Jeffrey Oldham  <oldham@codesourcery.com>
14111         * tree.c: Add defaults.h
14112         (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
14113         * Make-lang.in (cp/tree.o): Add defaults.h.
14115 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
14117         * Make-lang.in (CXX_C_OBJS): Add c-format.o.
14119 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
14121         * g++.1: Change to be ".so man1/gcc.1".
14123 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
14125         * Make-lang.in (c++.info, c++.install-info): Build and install g++
14126         internals info.
14127         (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
14128         ($(srcdir)/cp/g++int.info): New target.
14129         * gxxint.texi: Add info directory entry.  Use @@ in email address.
14130         * .cvsignore: Update.
14132 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
14134         * typeck.c (build_c_cast): Do template processing earlier.
14135         Always pedwarn on array casts.
14137 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
14139         * friend.c (make_friend_class): Make sure a templated class is
14140         actually a template.
14142 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
14144         * decl2.c (get_guard): Set linkage from guarded decl.
14146 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
14148         * call.c (convert_default_arg): Check for unprocessed
14149         DEFAULT_ARG.
14150         * cp-tree.h (replace_defarg): Move to spew.c.
14151         (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
14152         spew.c, which is where they really are.
14153         (done_pending_defargs): Declare.
14154         (unprocessed_defarg_fn): Declare.
14155         * decl.c (replace_defarg): Move to spew.c
14156         * parse.y (structsp): Call done_pending_defargs.
14157         * spew.c (defarg_fns): Rearrange list structure.
14158         (defarg_fnsdone): New static variable.
14159         (defarg_depfns): New static variable.
14160         (init_spew): Adjust.
14161         (add_defarg_fn): Store the type in TREE_TYPE.
14162         (do_pending_defargs): Detect and deal with ordering constraints
14163         and circularity.
14164         (done_pending_defargs): New function.
14165         (unprocessed_defarg_fn): New function.
14166         (replace_defarg): Moved from decl.c. Robustify. Don't save
14167         if circularity detected.
14169 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
14171         * pt.c (unify): Check array has a domain, before checking
14172         whether it is variable sized.
14174 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
14176         * decl.c (grokparms): Unobfuscate and get correct diagnostic for
14177         parameters with pointers to arrays of unknown bound.
14179 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
14181         * parse.y (template_parm_header, template_spec_header): New
14182         reductions. Split out from ...
14183         (template_header): ... here. Use them.
14184         (template_template_parm): Use template_parm_header.
14185         * semantics.c (finish_template_template_parm): Add assert.
14187 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
14189         * mangle.c (write_builtin_type): Fix thinko.
14191         * pt.c (copy_default_args_to_explicit_spec_1): New function.
14192         (copy_default_args_to_explicit_spec): Likewise.
14193         (check_explicit_specialization): Use it.
14195         * class.c (finish_struct_1):  Remove last argument in call to
14196         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
14197         * decl.c (builtin_function): Likewise.
14198         (build_cp_library_fn): Likewise.
14199         (check_initializer): Likewise.
14200         (make_rtl_for_nonlocal_decl): Likewise.
14201         (cp_finish_decl): Likewise.
14202         (start_function): Likewise.
14203         * decl2.c (finish_anon_union): Likewise.
14204         * friend.c (do_friend): Likewise.
14205         * init.c (build_java_class_ref): Likewise.
14206         * method.c (make_thunk): Likewise.
14207         * pt.c (tsubst_friend_function): Likewise.
14208         * semantics.c (expand_body): Likewise.
14210 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
14212         * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
14213         looking at DECL_CLONED_FUNCTION for non-functions.
14215 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
14217         * error.c (dump_template_parameter): Use parm to determine how
14218         to print default value.
14220 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
14222         * class.c (duplicate_tag_error): Clear more flags.
14224 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
14226         * call.c (build_new_method_call): Use binfo_for_vbase.
14228 2001-01-10  Joseph S. Myers  <jsm28@cam.ac.uk>
14230         * cp-tree.h (flag_cond_mismatch): Don't declare.
14231         * decl2.c (flag_cond_mismatch): Don't define.
14232         (lang_f_options): Remove cond-mismatch.
14233         (unsupported_options): Add cond-mismatch.
14235 2001-01-09  Nathan Sidwell  <nathan@codesourcery.com>
14237         * class.c (handle_using_decl): Reject using of constructor name
14238         of sourcing class. Allow injecting of a method with same name as
14239         nested class. Fixup error messages.
14241 2001-01-09  Joseph S. Myers  <jsm28@cam.ac.uk>
14243         * decl2.c (lang_decode_option): Handle -Wformat=2.
14245 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
14247         * cp-tree.h (lang_decl_flags): Rename defined_in_class to
14248         initialized_in_class.
14249         (DECL_DEFINED_IN_CLASS_P): Rename to ...
14250         (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
14251         * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
14252         (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
14253         * pt.c (check_default_tmpl_args): Adjust for
14254         DECL_INITIALIZED_IN_CLASS_P.
14255         (instantiate_class_template): Likewise.
14256         (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
14258         * class.c (finish_struct): Constify saved_filename.
14260 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
14262         * class.c (duplicate_tag_error): Adjust diagnostic.
14263         (finish_struct): Locally set location to start of struct.
14264         * decl.c (fixup_anonymous_aggr): Use cp_error_at.
14266 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
14268         * decl.c (struct binding_level): Adjust class_shadowed comments
14269         to reflect reality.
14270         (push_class_level_binding): Adjust comments to reflect reality.
14271         Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
14272         Don't set TREE_VALUE on the class_shadowed list.
14274 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14276         * decl2.c (acceptable_java_type): Allow references too.
14277         * init.c (build_java_class_ref): When using the new ABI, search
14278         `class$' and have it mangled with `mangle_decl.'
14279         * mangle.c (write_java_integer_type_codes): New function.
14280         (write_builtin_type): Detect and mangle Java integer and real
14281         types.
14283 2001-01-07  Mark Mitchell  <mark@codesourcery.com>
14285         * decl2.c (grokfield): Don't accept `asm' specifiers for
14286         non-static data members.
14288 2001-01-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14290         * expr.c (cplus_expand_expr): Don't reset `target'.
14292 2001-01-07  Neil Booth  <neil@daikokuya.demon.co.uk>
14294         * cp/decl2.c (cxx_post_options): Call cpp_post_options.
14296 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
14298         * parse.y (template_datadef): Check for error_mark_node.
14300 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
14302         * cp-tree.def (DEFAULT_ARG): Make `x' class.
14304 2001-01-04  Joseph S. Myers  <jsm28@cam.ac.uk>
14306         * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
14307         (record_builtin_type): Make non-static.
14308         (flag_short_double): Don't declare.
14309         (init_decl_processing): Remove the creation of many tree nodes now
14310         in c_common_nodes_and_builtins.
14311         (build_void_list_node): New function.
14312         * decl2.c (flag_short_double, flag_short_wchar): Don't define.
14313         * cp-tree.h (flag_short_wchar): Don't declare.
14315 2001-01-04  Mark Mitchell  <mark@codesourcery.com>
14317         * call.c (build_conv): Don't use build1 for USER_CONV.
14318         * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
14320 2001-01-03  Joseph S. Myers  <jsm28@cam.ac.uk>
14322         * lex.c (lang_init): Call c_common_lang_init.
14324 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
14326         * search.c (lookup_fnfields_here): Remove.
14327         (look_for_overrides_r): Use lookup_fnfields_1.
14328         Ignore functions from using declarations.
14330 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
14332         Implement exceptions specifiers for implicit member functions.
14333         * cp-tree.h (merge_exceptions_specifiers): Declare new function.
14334         * method.c (synthesize_exception_spec): New function.
14335         (locate_dtor, locate_ctor, locate_copy): New functions.
14336         (implicitly_declare_fn): Generate the exception spec too.
14337         * search.c (check_final_overrider): Check artificial functions
14338         too.
14339         * typeck2.c (merge_exception_specifiers): New function.
14341 2001-01-03  Jason Merrill  <jason@redhat.com>
14343         * init.c (build_default_init): New fn.
14344         (perform_member_init): Split out from here.
14345         (build_new_1): Use it.  Simplify initialization logic.
14346         (build_vec_init): Take an array, rather than a pointer and maxindex.
14347         Speed up simple initializations.  Don't clean up if we're assigning.
14348         * cp-tree.h: Adjust.
14349         * decl2.c (do_static_initialization): Remove TREE_VEC case.
14350         * parse.y (new_initializer): Return void_zero_node for ().
14351         * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
14352         * typeck2.c (digest_init): Only complain about user-written
14353         CONSTRUCTORs.
14355 2000-12-22  Mike Stump  <mrs@wrs.com>
14357         * decl2.c: (max_tinst_depth): Increase to 50.
14359 2001-01-02  Mark Mitchell  <mark@codesourcery.com>
14361         * class.c (invalidate_class_lookup_cache): Zero the
14362         previous_class_values.
14363         * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
14364         TREE_INT_CST_HIGH.
14365         (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
14366         * decl.c (free_bindings): New variable.
14367         (push_binding): Don't create a new binding if we have one on the
14368         free list.
14369         (pop_binding): Put old bindings on the free list.
14370         (init_decl_processing): Use size_int, not build_int_2.
14371         Register free_bindings as a GC root.
14372         (cp_make_fname_decl): Use size_int, not build_int_2.
14373         (push_inline_template_parms_recursive): Likewise.
14374         (end_template_parm_list): Likewise.
14375         (for_each_template_parm): Do not use walk_tree_without_duplicates.
14376         (tsubst_template_parms): Use size_int, not build_int_2.
14377         (tsubst): Likewise.
14378         * rtti.c (get_vmi_pseudo_type_info): Likewise.
14380 2001-01-02  Richard Henderson  <rth@redhat.com>
14382         * parse.y (asm): Set ASM_INPUT_P.
14384 2001-01-02  Jason Merrill  <jason@redhat.com>
14386         * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
14387         for v3 ABI.
14389         * typeck.c (cp_truthvalue_conversion): New fn.
14390         * cvt.c (ocp_convert): Use it.
14392         * cp-tree.h: Lose c-common.c decls.
14394         * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
14395         * cvt.c (convert_to_void): Use type_unknown_p.
14397         * typeck.c (strip_all_pointer_quals): Also strip quals from
14398         pointer-to-member types.
14400         * Make-lang.in (cp/TAGS): Use --no-globals.  Ignore parse.c, and treat
14401         parse.y as C.
14403         * call.c (build_new_method_call): Do evaluate the object parameter
14404         when accessing a static member.
14405         * typeck.c (build_component_ref): Likewise.
14407 2001-01-02  Andreas Jaeger  <aj@suse.de>
14409         * decl.c (cp_missing_noreturn_ok_p): New.
14410         (init_decl_processing): Set lang_missing_noreturn_ok_p.
14412 2000-12-29  Jakub Jelinek  <jakub@redhat.com>
14414         * decl.c (init_decl_processing): Fix sign of wchar_type_node.
14416 2000-12-29  Mark Mitchell  <mark@codesourcery.com>
14418         * class.c (pushclass): Remove #if 0'd code.
14419         * cp-tree.h (overload_template_name): Remove.
14420         * decl.c (store_bindings): Simplify.
14421         (pop_from_top_level): Likewise.
14422         * pt.c (overload_template_name): Remove.
14423         (instantiate_decl): Don't call push_to_top_level if it's not
14424         needed.
14426 2000-12-28  Mark Mitchell  <mark@codesourcery.com>
14428         * pt.c (register_local_specialization): Don't return a value.
14429         (lookup_template_class): Use move-to-front heuristic when looking
14430         up template instantiations.
14431         (instantiate_decl): Only push_to_top_level when we're actually
14432         going to instantiate the template.
14434 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
14436         * search.c (binfo_for_vtable): Return least derived class, not
14437         most.  Handle secondary vtables.
14439 2000-12-22  Jason Merrill  <jason@redhat.com>
14441         * pt.c (more_specialized): Don't optimize len==0.
14442         (fn_type_unification): If we're adding the return type, increase len.
14444         * typeck.c (build_binary_op): Fix pmf comparison logic.
14446         * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
14447         DECL_STATIC_FUNCTION_P.
14449         * semantics.c (genrtl_finish_function): Don't try to jump to
14450         return_label unless it exists.
14452         In partial ordering for a call, ignore parms for which we don't have
14453         a real argument.
14454         * call.c (joust): Pass len to more_specialized.
14455         (add_template_candidate_real): Strip 'this', pass len.
14456         * pt.c (more_specialized): Pass len down.  Lose explicit_args parm.
14457         (get_bindings_order): New fn.  Pass len down.
14458         (get_bindings_real): Strip 'this', pass len.
14459         (fn_type_unification): Likewise.
14460         (type_unification_real): Succeed after checking 'len' args.
14461         (most_specialized_instantiation): Lose explicit_args parm.
14462         * class.c (resolve_address_of_overloaded_function): Strip 'this',
14463         pass len.
14465 2000-12-21  Jason Merrill  <jason@redhat.com>
14467         * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
14468         DECL_TEMPLATE_RESULT.
14470         * search.c (lookup_field_r): Call lookup_fnfields_1, not
14471         lookup_fnfields_here.
14473         * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
14475         * call.c (build_object_call): Also allow conversions that return
14476         reference to pointer to function.
14477         (add_conv_candidate): Handle totype being ref to ptr to fn.
14478         (build_field_call): Also allow members of type reference to function.
14479         Lose support for calling pointer to METHOD_TYPE fields.
14481         * error.c (dump_expr): Handle *_CAST_EXPR.
14483         * typeck2.c (build_scoped_ref): Always convert to the naming class.
14485         * tree.c (break_out_cleanups): Lose.
14486         * cp-tree.h: Remove prototype.
14487         * typeck.c (build_component_ref): Don't break_out_cleanups.
14488         (build_compound_expr): Likewise.
14489         * semantics.c (finish_expr_stmt): Likewise.
14491 2000-12-20  Richard Henderson  <rth@redhat.com>
14493         * cp-tree.h: Update declarations.
14494         * decl.c (finish_case_label): Return the new stmt node.
14495         * semantics.c (finish_goto_stmt): Likewise.
14496         (finish_expr_stmt, finish_return_stmt): Likewise.
14497         (finish_break_stmt, finish_continue_stmt): Likewise.
14498         (finish_asm_stmt): Likewise.
14499         * parse.y (already_scoped_stmt): Set STMT_LINENO.
14500         (compstmt, implicitly_scoped_stmt, stmt): Likewise.
14501         (simple_if, simple_stmt): Return the new stmt node.
14502         (save_lineno): New.
14504 2000-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
14506         * cp-tree.h: Don't declare warn_long_long.
14508 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14510         * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
14511         IS_AGGR_TYPE.
14513 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14515         * pt.c (unify): Handle when both ARG and PARM are
14516         BOUND_TEMPLATE_TEMPLATE_PARM.
14518 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14520         * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
14521         DECL_TEMPLATE_PARM_P.
14523 2000-12-15  Jason Merrill  <jason@redhat.com>
14525         * init.c (build_new_1): Reorganize.  Now with 100% fewer SAVE_EXPRs!
14527         * init.c (build_new_1): Don't strip quals from type.
14529         * decl.c (pushdecl): Don't check for linkage on a non-decl.
14531         * call.c (build_op_delete_call): See through ARRAY_TYPEs.
14533         * call.c (build_new_function_call): Lose space before paren in
14534         error message.
14535         (build_new_method_call): Likewise.
14537         * typeck2.c (build_m_component_ref): Propagate quals from datum.
14539 2000-12-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14541         * pt.c (check_explicit_specialization): Propagate default
14542         function arguments to explicit specializations.
14544 2000-12-13  DJ Delorie  <dj@redhat.com>
14546         * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
14547         and <? operators.
14549 2000-12-08  Jason Merrill  <jason@redhat.com>
14551         * error.c (dump_function_name): Don't let the user see __comp_ctor.
14553         Clean up copy-initialization in overloading code.
14554         * call.c (build_user_type_conversion_1): Die if we are asked to
14555         convert to the same or a base type.
14556         (implicit_conversion): Avoid doing so.  Lose reference binding code.
14557         (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
14558         direct-initialization.  Also do direct-init part of copy-init.
14559         (build_user_type_conversion): Don't provide context to convert_like.
14560         * cvt.c (ocp_convert): build_user_type_conversion will now provide
14561         the constructor call for copy-init.
14563         * pt.c (tsubst_decl): Call clone_function_decl here if this is an
14564         instantiation of a member template.
14565         (do_decl_instantiation): Not here.
14567 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
14569         * class.c (check_field_decls): Don't special case anonymous
14570         fields in error messages.
14571         (note_name_declared_in_class): Use %D on diagnostic.
14573         * tree.c (pod_type_p): Use strip_array_types.
14574         (cp_valid_lang_attribute): Likewise.
14575         * typeck.c (cp_type_quals): Strip arrays separately, to avoid
14576         multiple evaluations.
14577         (cp_has_mutable_p): Use strip_array_types.
14579 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
14581         * cp-tree.h (sufficient_parms_p): Declare new function.
14582         * call.c (sufficient_parms_p): New function, broken out of ...
14583         (add_function_candidate): ... here. Use it.
14584         (add_conv_candidate): Use it.
14585         * decl.c (grok_ctor_properties): Use it.
14587 2000-12-07  Jakub Jelinek  <jakub@redhat.com>
14589         * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
14591 2000-12-07  Joseph S. Myers  <jsm28@cam.ac.uk>
14593         * decl2.c (lang_decode_option): Handle -Wformat-security.
14595 2000-12-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14597         * pt.c (verify_class_unification): New function.
14598         (get_class_bindings): Use it.
14599         (try_class_unification): Tidy.
14600         (unify): Handle when argument of a template-id is not
14601         template parameter dependent.
14602         (template_args_equal): Handle when TREE_CODE's do not match.
14604 2000-12-06  Alexandre Oliva  <aoliva@redhat.com>
14606         * lang-specs.h (c++): When invoking the stand-alone preprocessor
14607         for -save-temps, pass all relevant -Defines to it, and then don't
14608         pass them to cc1plus.
14610 2000-12-05  Will Cohen  <wcohen@redhat.com>
14612         * decl.c (finish_case_label): Cleared
14613         more_cleanups_ok in surrounding function scopes.
14614         (define_label): Likewise.
14616 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
14618         * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
14619         (get_matching_virtual): Remove.
14620         (look_for_overrides): Declare new function.
14621         * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
14622         DECL_VINDEX here.
14623         * class.c (check_for_override): Move base class iteration code
14624         to look_for_overrides.
14625         * search.c (next_baselink): Remove.
14626         (get_virtuals_named_this): Remove.
14627         (get_virtual_destructor): Remove.
14628         (tree_has_any_destructors_p): Remove.
14629         (struct gvnt_info): Remove.
14630         (check_final_overrider): Remove `virtual' from error messages.
14631         (get_matching_virtuals): Remove. Move functionality to ...
14632         (look_for_overrides): ... here, and ...
14633         (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
14634         to be overriding.
14636 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
14638         * typeck.c (get_delta_difference): If via a virtual base,
14639         return zero.
14640         * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
14641         adjustment.
14643 2000-12-04  Richard Henderson  <rth@redhat.com>
14645         * error.c (dump_tree): Use output_add_string not OB_PUTS.
14647 2000-12-04  Jason Merrill  <jason@redhat.com>
14649         * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
14650         (write_builtin_type): Pass intSI_type_node and the like through
14651         type_for_mode.
14652         * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
14653         Pass intSI_type_node and the like through type_for_mode.
14654         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
14655         * pt.c (tsubst, unify): Likewise.
14656         * tree.c (walk_tree): Likewise.
14657         * error.c (dump_type): Likewise.
14658         (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
14660         * Make-lang.in: Tweak top comment for emacs.
14661         (cp/TAGS): Restore.
14663         * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
14665         * class.c (clone_function_decl): Robustify.
14667 2000-12-04  Michael Matz  <matzmich@cs.tu-berlin.de>
14669         * decl.c (store_bindings): Only search in the non modified
14670         old_bindings for duplicates.
14672 2000-12-04  Nathan Sidwell  <nathan@codesourcery.com>
14674         * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
14675         TYPE_POLYMORPHIC_P.
14677         * typeck.c (build_static_cast): Remove unused variable.
14679 2000-12-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14681         * pt.c: Fix typo in comment.
14683 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
14685         * decl2.c (warn_format): Remove definition.
14686         (lang_decode_option): Handle -Wformat-nonliteral,
14687         -Wno-format-extra-args and -Wno-format-y2k.  Use set_Wformat.
14689 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
14691         * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
14692         (init_decl_processing): Don't create string_type_node,
14693         const_string_type_node, wint_type_node, intmax_type_node,
14694         uintmax_type_node, default_function_type, ptrdiff_type_node and
14695         unsigned_ptrdiff_type_node.  Adjust position of call to
14696         c_common_nodes_and_builtins.
14697         (identifier_global_value): New function.
14699 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>
14701         * call.c (standard_conversion): Reject pointer to member
14702         conversions from ambiguous, inaccessible or virtual bases.
14703         * typeck.c (build_static_cast): Don't check pointers to members
14704         specially.
14706 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
14708         * method.c (do_build_copy_constructor): Preserve cv
14709         qualifications when accessing source object members.
14710         (do_build_assign_ref): Likewise. Remove separate diagnostics for
14711         unnamed fields.
14713 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
14715         * method.c (do_build_assign_ref): Construct appropriately
14716         CV-qualified base reference. Don't allow const casts in base
14717         conversion.
14719 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
14721         * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
14722         incomplete return type.
14724 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
14726         * parse.y (base_class.1): Produce a _TYPE not a _DECL.
14727         * semantics.c (finish_base_specifier): Accept a _TYPE not a
14728         _DECL.
14730 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
14732         * spew.c (yyerror): Cope if yylval.ttype is NULL.
14734 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
14736         * decl.c (grokdeclarator): Diagnose undefined template contexts.
14738 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
14740         * decl.c (grokdeclarator): Do type access control on friend
14741         class.
14743 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
14745         * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
14746         bison parser ickiness.
14747         * pt.c (tsubst_friend_function): Enter namespace scope when
14748         tsubsting the function name.
14749         * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
14751 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
14753         * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
14754         * cvt.c (cp_convert_to_pointer): Add force parameter.
14755         Allow conversions via virtual base if forced.
14756         (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
14757         (ocp_convert): Likewise.
14758         * search.c (binfo_from_vbase): Return the virtual base's binfo.
14759         * typeck.c (get_delta_difference): Adjust handling of virtual
14760         bases.
14762 2000-11-26  Mark Mitchell  <mark@codesourcery.com>
14764         * tree.c (struct list_hash): Remove.
14765         (list_hash_table): Make it be an htab.
14766         (struct list_proxy): New type.
14767         (list_hash_eq): New function.
14768         (list_hash_pieces): Renamed from ...
14769         (list_hash): ... this.
14770         (list_hash_lookup): Remove.
14771         (list_hash_add): Remove.
14772         (hash_tree_cons): Use the generic hashtable.
14773         (mark_list_hash): Remove.
14774         (init_tree): Create the hashtable.
14776 2000-11-25  Joseph S. Myers  <jsm28@cam.ac.uk>
14778         * method.c (build_mangled_C9x_name): Rename to
14779         build_mangled_C99_name.  Change C9X references in comments to
14780         refer to C99.
14782 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
14784         * parse.y (unary_expr): Move VA_ARG from here ...
14785         (primary): ... to here.
14787 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
14789         * semantics.c (finish_id_expr): If type is error_mark, return
14790         error_mark.
14792 2000-11-23  Nathan Sidwell  <nathan@codesourcery.com>
14794         * pt.c (lookup_template_class): Simplify loop exit constructs.
14795         Cope when there is no partial instantiation of a template
14796         template member.
14798 2000-11-23  J"orn Rennecke <amylaar@redhat.com>
14800         * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
14802 2000-11-22  Mark Mitchell  <mark@codesourcery.com>
14804         * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
14805         prefix.
14807         * pt.c (do_decl_instantiate): Explicitly clone constructors and
14808         destructors that haven't already been cloned.
14810 2000-11-20  Richard Henderson  <rth@redhat.com>
14812         * parse.y (yyparse_1): Rename the parser entry point.
14814 2000-11-20  Alex Samuel  <samuel@codesourcery.com>
14816         * mangle.c (write_name): Use <unscoped-name> for names directly in
14817         function scope.
14818         (write_unscoped_name): Accept names directly in function scope.
14820 2000-11-20  Nathan Sidwell  <nathan@codesourcery.com>
14822         * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
14823         * parse.y (extdef): Add EXPORT reduction.
14824         * spew.c (yylex): Don't skip export here.
14826 2000-11-19  Mark Mitchell  <mark@codesourcery.com>
14828         * decl.c (init_decl_processing): Correct name of pure virtual
14829         function under the new ABI.
14830         * rtti.c (throw_bad_cast): Likewise, for bad cast function.
14831         (throw_bad_typeid): Likewise for bad typeid function.
14833 2000-11-18  Mark Mitchell  <mark@codesourcery.com>
14835         * decl.c (grokparms): Don't even function types of `void' type,
14836         either.
14837         * mangle.c (write_type): Don't crash when confronted with the
14838         error_mark_node.
14840         * decl.c (grokparms): Don't create parameters of `void' type.
14842 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
14844         * lex.c (mark_impl_file_chain): Delete.
14845         (init_parse): Remove call to ggc_add_string_root.  No need to
14846         ggc_strdup a string constant.  Do not add impl_file_chain to GC
14847         roots.
14848         (handle_pragma_implementation): No need to ggc_strdup main_filename.
14850 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
14852         * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
14854 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
14856         * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
14857         * decl.c (grokdeclarator): Don't reject void parms here.
14858         (require_complete_types_for_parms): Simplify, use
14859         complete_type_or_else.
14860         (grokparms): Remove bitrot. Remove funcdef parm.
14861         Deal with ellipsis parm lists here.
14862         * semantics.c (finish_parmlist): Don't append void_list_node
14863         here. Set PARMLIST_ELLIPSIS_P.
14865 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
14867         * typeck2.c (incomplete_type_error): Reorganize to avoid
14868         excessive diagnostics.
14870 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
14872         * lex.c (struct impl_files, internal_filename): Constify a char *.
14874 2000-11-16  Mark Mitchell  <mark@codesourcery.com>
14876         * mangle.c (write_special_name_constructor): Don't generate
14877         assembler junk when confronted with an old-style constructor.
14878         (write_special_name_destructor): Likewise.
14879         (mangle_decl_string): Do it here instead.
14881 2000-11-16  Nathan Sidwell  <nathan@codesourcery.com>
14883         * call.c (op_error): Make error messages clearer.
14885 2000-11-15  Mark Mitchell  <mark@codesourcery.com>
14887         * decl.c (wrapup_globals_for_namespace): Don't mark things
14888         TREE_ASM_WRITTEN when they're not.
14890 2000-11-15  Jason Merrill  <jason@redhat.com>
14892         * typeck2.c (friendly_abort): Uncount the error before handing
14893         off to fancy_abort.
14895 2000-11-15  Nathan Sidwell  <nathan@codesourcery.com>
14897         * typeck.c (lookup_anon_field): Cope with qv qualifiers.
14899 2000-11-14  Mark Mitchell  <mark@codesourcery.com>
14901         * class.c (build_vtbl_initializer): Fix typo in comment.
14902         * typeck.c (expr_sizeof): Don't crash on errors.
14904 2000-11-14  Jim Wilson  <wilson@redhat.com>
14906         * lang-specs.h: Add %2 after %(cc1_options).
14908 2000-11-14  Richard Henderson  <rth@redhat.com>
14910         * typeck.c (c_sizeof): Be strict about casting result value
14911         back to c_size_type_node.
14912         (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
14914 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
14916         * typeck.c (build_unary_op): Use boolean_increment from
14917         c-common.c, moving the relevant code there.
14919 2000-11-11  Jason Merrill  <jason@redhat.com>
14921         * typeck.c (mark_addressable): Don't call put_var_into_stack.
14923         * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
14924         in inlines.
14926 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14928         * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
14929         * lex.c (copy_lang_decl): Likewise.
14931 2000-11-09  Mark Mitchell  <mark@codesourcery.com>
14933         * dump.c (cp_dump_tree): Don't dump function bodies here.
14935         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
14936         (dump.o): Update dependency list.
14937         * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
14938         (flag_dump_translation_unit): Likewise.
14939         (CP_TYPE_QUALS): Adjust definition.
14940         (DECL_C_BIT_FIELD): Remove.
14941         (SET_DECL_C_BIT_FIELD): Likewise.
14942         (CLEAR_DECL_C_BIT_FIELD): Likewise.
14943         (add_maybe_template): Likewise.
14944         (strip_array_types): Likewise.
14945         (dump_node_to_file): Likewise.
14946         (cp_dump_tree): New function.
14947         * decl.c (init_decl_processing): Set lang_dump_tree.
14948         * decl2.c (flag_dump_translation_unit): Remove.
14949         * dump.c: Move most of it to ../c-dump.c.
14950         (cp_dump_tree): New function.
14951         * pt.c (add_maybe_template): Remove.
14952         * typeck.c (strip_array_types): Likewise.
14954 2000-11-07  Eric Christopher  <echristo@redhat.com>
14956         * decl.c (init_decl_processing): Change definition of
14957         __wchar_t to wchar_t.  Remove artificial declaration of
14958         wchar_t.
14959         * lex.c: Change instances of __wchar_t to wchar_t.
14961 2000-11-09  Nathan Sidwell  <nathan@codesourcery.com>
14963         * lex.c (do_identifier): Don't lookup_name for operators.
14964         * parse.y (operator): Save looking_for_typename.
14965         (unoperator): Restore it.
14966         * spew.c (frob_opname): Use nth_token for lookahead.
14968 2000-11-08  Nathan Sidwell  <nathan@codesourcery.com>
14970         * decl.c (grok_op_properties): Always use coerce_new_type and
14971         coerce_delete_type.
14972         * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
14973         exception specification. Tidy up.
14974         (coerce_delete_type): Preserve exception specification. Tidy up.
14976 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
14978         * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
14979         (push_binding_level), error.c (cp_tree_printer), pt.c
14980         (process_partial_specialization, tsubst_template_arg_vector),
14981         search.c (lookup_member): Use memset () instead of bzero ().
14983 2000-11-07  Nathan Sidwell  <nathan@codesourcery.com>
14985         * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
14987 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
14989         * Make-lang.in (c++.distdir): Remove.
14991 2000-11-04  Mark Mitchell  <mark@codesourcery.com>
14993         * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
14994         declarations from different namespaces to be combined.
14996 2000-11-03  Zack Weinberg  <zack@wolery.stanford.edu>
14998         * decl.c: Include tm_p.h.
15000 2000-11-03  Joseph S. Myers  <jsm28@cam.ac.uk>
15002         * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
15004 2000-11-02  Joseph S. Myers  <jsm28@cam.ac.uk>
15006         * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
15007         (build_overload_value), repo.c (open_repo_file), xref.c
15008         (open_xref_file): Use strchr () and strrchr () instead of index ()
15009         and rindex ().
15011 2000-11-01  Bernd Schmidt  <bernds@redhat.co.uk>
15013         * call.c (build_over_call): Call fold on the CALL_EXPR.
15015 2000-11-01  Gabriel Dos Reis  <gdr@codesourcery.com>
15017         * error.c (dump_template_decl): Separate template hearders with
15018         space not comma.
15020 2000-10-31  Gabriel Dos Reis  <gdr@codesourcery.com>
15022         * error.c: Move TFF_ macros into cp-tree.h.  Throughout, replace
15023         TS_* flags with corresponding TFF_*.  Adjust prototypes of
15024         functions (which used to take a tree_string_flags) to take an int.
15026         * cp-tree.h (enum tree_string_flags): Remove
15027         (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
15028         TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
15029         TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
15030         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
15031         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
15032         TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
15033         (type_as_string, decl_as_string, expr_as_string,
15034         context_as_string): Adjust prototype.
15036         * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
15037         instead of TS_PLAIN.
15039         * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
15040         instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
15041         plain `0'.
15043 2000-10-30  Mark Mitchell  <mark@codesourcery.com>
15045         * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
15046         (linkage_kind): New enumeration.
15047         (decl_linkage): New function.
15048         * decl2.c (comdat_linkage): Extend comment.
15049         * error.c (dump_function_decl): Print the arguments used to
15050         instantiate a template, even when not printing the type of the
15051         function.
15052         * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
15053         not TREE_PUBLIC, to test for external linkage.
15054         * tree.c (decl_linkage): New function.
15056 2000-10-28  Mark Mitchell  <mark@codesourcery.com>
15058         * pt.c (instantiate_decl): Always instantiate static data members
15059         initialized in-class.
15061 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
15063         * Make-lang.in: Move all build rules here from Makefile.in,
15064         adapt to new context.  Wrap all rules that change the current
15065         directory in parentheses.  Expunge all references to $(P).
15066         When one command depends on another and they're run all at
15067         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
15068         all object-file generation rules.  Delete obsolete variables.
15070         * Makefile.in: Delete.
15071         * config-lang.in: Delete outputs= line.
15073 2000-10-26  Gabriel Dos Reis  <gdr@codesourcery.com>
15075         * error.c (dump_function_decl): Print no space between
15076         `ptr-operator' the `type-specifier' of the return type.
15077         (dump_type_prefix): Make sure we put space at the appropriate
15078         place.
15080 2000-10-23  Jason Merrill  <jason@redhat.com>
15082         * call.c (equal_functions): Also call decls_match for extern "C" fns.
15084 2000-10-22  Jason Merrill  <jason@redhat.com>
15086         * call.c (build_conditional_expr): Use ocp_convert to force
15087         rvalue conversion.
15089 2000-10-22  Mark Mitchell  <mark@codesourcery.com>
15091         * call.c (standard_conversion): Use RVALUE_CONVs for all
15092         expressions that satisfy lvalue_p, not just those that satisfy
15093         real_lvalue_p.
15095         * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
15097         * typeck.c (c_sizeof): Return an expression of `size_t' type,
15098         not one with TYPE_IS_SIZETYPE set.
15099         (dubious_conversion_warnings): Remove special-case code.
15101 2000-10-21  Geoffrey Keating  <geoffk@cygnus.com>
15103         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
15104         * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
15105         (dump_type_prefix): Print vector-of-int as 'int vector'.
15106         (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
15107         * tree.c (walk_tree): Handle VECTOR_TYPE.
15109         * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
15111 2000-10-21  Jason Merrill  <jason@redhat.com>
15113         * parse.y (operator): Set got_object from got_scope.
15114         Set looking_for_typename.
15115         * decl.c (lookup_name_real): Clear val after setting from_obj.
15116         Reorganize diagnostic.
15118 2000-10-20  Jason Merrill  <jason@redhat.com>
15120         * tree.c (walk_tree): Don't walk into default args.
15122         * error.c (dump_expr): Use host_integerp.
15124 2000-10-20  David Edelsohn  <edelsohn@gnu.org>
15126         * typeck2.c (abstract_virtuals_error): Use "because" instead of
15127         "since" in error message.
15129 2000-10-20  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15131         * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
15133 2000-10-20  Jeffrey Oldham  <oldham@codesourcery.com>
15135         * decl.c (revert_static_member_fn): Fixed typo.
15137 2000-10-19  Mark Mitchell  <mark@codesourcery.com>
15139         * class.c (subobject_offset_fn): New type.
15140         (dfs_record_base_offsets): Remove.
15141         (record_base_offsets): Likewise.
15142         (dfs_search_base_offsets): Likewise.
15143         (record_subobject_offset): New function.
15144         (check_subobject_offset): Likewise.
15145         (walk_subobject_offsets): Likewise.
15146         (record_subobject_offsets): Likewise.
15147         (layout_conflict_p): Reimplement.
15148         (layout_nonempty_base_or_field): Correct handling of type
15149         conflicts during layout.
15150         (layout_empty_base): Likewise.
15151         (build_base_field): Adjust to handle new representation of empty
15152         base offset table.
15153         (build_base_fields): Likewise.
15154         (layout_virtual_bases): Likewise.
15155         (splay_tree_compare_integer_csts): New function.
15156         (layout_class_type): Use a splay_tree, rather than a varray, to
15157         represent the offsets of empty bases.
15159         * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
15160         * decl.c (select_decl): Don't return declarations that are
15161         DECL_ANTICIPATED.
15163 2000-10-18  Mark Mitchell  <mark@codesourcery.com>
15165         * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
15166         (fake_std_node): New macro.
15167         * decl.c (in_std): Rename to ...
15168         (in_fake_std): ... this.
15169         (flag_no_builtin): Remove.
15170         (flag_no_nonansi_builtin): Likewise.
15171         (walk_namespaces_r): Use fake_std_node.
15172         (push_namespace): Use std_identifier.
15173         (pop_namespace): Use in_fake_std.
15174         (lookup_name_real): Use fake_std_node.
15175         (init_decl_processing): When -fhonor-std, create the `std'
15176         namespace.  Don't create a dummy fake_std_node in that case.
15177         Adjust call to c_common_nodes_and_builtins.  Use std_identifier.
15178         (builtin_function): Put builtins whose names don't begin
15179         with `_' in the std namespace.
15180         * decl2.c (flag_no_builtin): Remove.
15181         (flag_no_nonansi_builtin): Likewise.
15182         (set_decl_namespace): Use fake_std_node.
15183         (validate_nonmember_using_decl): Likewise.
15184         (do_using_directive): Likewise.
15185         (handle_class_head): Likewise.
15186         * dump.c (dequeue_and_dump): Likewise.
15187         * except.c (init_exception_processing): Use std_identifier.
15188         * init.c (build_member_call): Use fake_std_node.
15189         * rtti.c (init_rtti_processing): Use std_identifier.
15191 2000-10-17  Mark Mitchell  <mark@codesourcery.com>
15193         * cp-tree.h (back_end_hook): Remove declaration.
15194         * decl2.c (back_end_hook): Remove definition.
15196         * dump.c (dequeue_and_dump): Dump TREE_USED.
15198 2000-10-17  Brad Lucier <lucier@math.purdue.edu>
15200         * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
15202 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
15204         * decl.c (WINT_TYPE): Define.
15205         (init_decl_processing): Create types unsigned_ptrdiff_type_node,
15206         c_size_type_node, signed_size_type_node and wint_type_node.
15208 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
15210         * decl2.c (warn_missing_format_attribute): New variable.
15211         (lang_decode_option): Decode -Wmissing-format-attribute.
15213 2000-10-16  Mark Mitchell  <mark@codesourcery.com>
15215         * typeck.c (qualify_type): Remove.
15216         (composite_pointer_type): Fix handling of conversions to `cv void*'.
15218 2000-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15220         * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
15222 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15224         * Makefile.in (parse.c, parse.h): Create atomically.
15226 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
15228         * class.c (current_obstack): Remove.
15229         * decl.c (ggc_p): Remove.
15230         (start_decl): Don't use decl_tree_cons.
15231         (grokdeclarator): Don't use build_decl_list.
15232         (start_function): Don't use decl_tree_cons.
15233         (finish_function): Don't mess with obstacks.
15234         * decl2.c (grok_x_components): Don't use build_decl_list.
15235         * lex.c (make_call_declarator): Don't call decl_tree_cons.
15236         (implicitly_declare_fn): Don't call build_decl_list.
15237         * parse.y (frob_specs): Don't call build_decl_list or
15238         decl_tree_cons.
15239         (expr_or_declarator_intern): Don't call decl_tree_cons.
15240         (primary): Don't call build_decl_list.
15241         (fcast_or_absdcl): Likewise.
15242         (typed_declspecs): Don't call decl_tree_cons.
15243         (reserved_declspecs): Don't call build_decl_list.
15244         (declmods): Likewise.
15245         (reserved_typespecquals): Likewise.
15246         (aggr): Likewise.
15247         (new_type_id): Likewise.
15248         (cv_qualifiers): Likewise.
15249         (after_type_declarator_intern): Likewise.
15250         (notype_declarator_intern): Likewise.
15251         (absdcl_intern): Likewise.
15252         (named_parm): Likewise.
15253         * pt.c (most_specialized_class): Likewise.
15254         * repo.c (temporary_obstack): Make it a structure, not a pointer.
15255         (init_repo): Initialize it.
15256         * search.c (current_obstack): Remove.
15257         * typeck2.c (add_exception_specifier): Don't call build_decl_list.
15259 2000-10-09  Richard Henderson  <rth@cygnus.com>
15261         * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
15262         (c++ language support bits for libgcc): Remove.
15263         (c++.clean): Remove cplib2.txt cleanup.
15264         * config-lang.in (headers, lib2funcs): Remove.
15266         * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
15267         * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
15268         * inc/cxxabi.h, inc/exception, inc/new: Remove files.
15269         * inc/new.h, inc/typeinfo: Remove files.
15271 2000-10-08  Joseph S. Myers  <jsm28@cam.ac.uk>
15273         * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
15274         defined.
15275         (init_decl_processing): Initialize intmax_type_node and
15276         uintmax_type_node.
15278 2000-10-06  Richard Henderson  <rth@cygnus.com>
15280         * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
15281         (original_result_rtx): Remove.
15282         * decl.c (save_function_data): Don't clear x_result_rtx.
15283         (mark_lang_function): Don't mark it either.
15284         * expr.c (fixup_result_decl): Remove.
15285         * semantics.c (genrtl_named_return_value): Frob the return decl
15286         before calling emit_local_var.
15287         (genrtl_finish_function): Don't call fixup_result_decl.
15288         Always emit the jump to return_label.
15290 2000-10-06  Nathan Sidwell  <nathan@codesourcery.com>
15292         * pt.c (lookup_template_class): Set current access for enum.
15293         (tsubst_enum): Set file & line for enum decl.
15295         * spew.c (yylex): Remove unused variable.
15297 2000-10-05  Richard Henderson  <rth@cygnus.com>
15299         * semantics.c (genrtl_finish_function): Don't init or check
15300         can_reach_end; remove noreturn and return value checks.
15302 2000-10-05  Tom Tromey  <tromey@cygnus.com>
15304         * init.c (build_java_class_ref): Use `build_static_name' with a
15305         suffix, not a prefix, to build the class object's name.
15307 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
15309         * cp-tree.h (access_kind): Fix comment typo.
15310         * decl2.c (grokfield): Fix diagnostic typo.
15311         * semantics.c (finish_template_type): Fix comment typo.
15312         (finish_qualified_object_call_expr): Likewise.
15314 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
15316         * pt.c (tsubst_expr, DECL_STMT case): Don't process if
15317         tsubsting fails.
15319 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
15321         * spew.c (frob_id): New static function.
15322         (frob_opname): Use it.
15323         (yylex): Use it.
15325 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
15327         * decl.c (lang_mark_false_label_stack): Remove.
15328         * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
15330 2000-09-30  Joseph S. Myers  <jsm28@cam.ac.uk>
15332         * gxxint.texi: Use @email for formatting email addresses.
15334 2000-09-29  Gabriel Dos Reis  <gdr@codesourcery.com>
15336         * error.c: Remove direct obstack manipulation.  Replace with
15337         output_buffer-based formatting.  Adjust calls to removed macros.
15338         (obstack_chunk_alloc, obstack_chunk_free): Remove.
15339         (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
15340         OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
15342 2000-09-24  Mark Mitchell  <mark@codesourcery.com>
15344         * ir.texi: Move to ../c-tree.texi.
15346 2000-09-20  Jason Merrill  <jason@redhat.com>
15348         * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
15350 2000-09-21  Andreas Jaeger  <aj@suse.de>
15352         * errfn.c: Move declaration of cp_printer and cp_printers to ...
15353         * cp-tree.h: ... here.
15355         * error.c: Remove declaration of cp_printer.
15357 2000-09-20  Mark Mitchell  <mark@codesourcery.com>
15359         * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
15361 2000-09-20  Hans-Peter Nilsson  <hp@axis.com>
15363         * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
15364         users.
15366 2000-09-18  Mark Mitchell  <mark@codesourcery.com>
15368         * decl.c (start_function): Robustify.
15370 2000-09-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15372         * cp-tree.h (check_function_format): Accept a `status' parameter.
15374         * call.c, typeck.c: Updates calls to `check_function_format'.
15376 2000-09-17  Geoffrey Keating  <geoffk@cygnus.com>
15378         * decl2.c (handle_class_head): Always push some scope even
15379         in the error case.
15381 2000-09-16  Mark Mitchell  <mark@codesourcery.com>
15383         * cp-tree.h (struct cp_language_function): Remove
15384         x_scope_stmt_stack and name_declared.
15385         (current_scope_stmt_stack): Remove.
15386         (function_name_declared_p): New macro.
15387         (struct lang_decl_flags): Use c_lang_decl as a base class.
15388         (context): Remove.
15389         (struct lang_decl): Replace saved_tree with context.
15390         (DECL_FRIEND_CONTEXT): Adjust accordingly.
15391         (SET_DECL_FRIEND_CONTEXT): Likewise.
15392         (DECL_VIRTUAL_CONTEXT): Likewise.
15393         (DECL_SAVED_TREE): Remove.
15394         (C_DECLARED_LABEL_FLAG): Likewise.
15395         (cplus_expand_expr_stmt): Don't declare.
15396         (add_decl_stmt): Likewise.
15397         (add_scope_stmt): Likewise.
15398         * decl.c (mark_stmt_tree): Remove.
15399         (case_compare): Likewise.
15400         (finish_case_label): Use c_add_case_label.
15401         (init_decl_processing): Set more language-specific hooks.
15402         (build_enumerator): Fix typo in comment.
15403         (cplus_expand_expr_stmt): Remove.
15404         (mark_lang_function): Use mark_c_language_function.
15405         (lang_mark_tree): Use c_mark_lang_decl.
15406         * decl2.c: Change order of inclusion.
15407         * except.c: Likewise.
15408         * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR.  Fall
15409         back on c_expand_expr.
15410         * friend.c: Include expr.h.
15411         * init.c: Change order of inclusion.
15412         * Makefile.in: Update dependencies.
15413         * lex.h (free_lang_decl_chain): Remove.
15414         * optimize.c (maybe_clone_body): Use function_name_declared_p.
15415         * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
15416         it doesn't exist.
15417         (instantiate_decl): Use function_name_declared_p.
15418         * semantics.c (lang_expand_expr_stmt): Remove.
15419         (set_current_function_name_declared): Likewise.
15420         (current_function_name_declared): Likewise.
15421         (begin_compound_stmt): Use function_name_declared_p.
15422         (add_decl_stmt): Remove.
15423         (setup_vtbl_ptr): Use function_name_declared_p.
15424         (add_scope_stmt): Remove.
15425         (current_scope_stmt_stack): New function.
15426         (cp_expand_stmt): Don't handle SCOPE_STMTs.
15427         (expand_body): Use function_name_declared_p.
15428         * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
15429         * typeck.c: Change order of includes.
15430         (convert_sequence): Remove.
15432 2000-09-14  Joseph S. Myers  <jsm28@cam.ac.uk>
15434         * lex.c (reswords): Add _Complex.
15436 2000-09-14  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15438         * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
15440 2000-09-13  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
15442         * init.c (begin_init_stmts): Don't use // comments.
15444 2000-09-12  Jason Merrill  <jason@redhat.com>
15446         * decl.c (maybe_deduce_size_from_array_init): Set do_default for
15447         all non-extern arrays.
15449         * decl.c (grokdeclarator): Complain about 'friend T' for implicit
15450         typenames, too.  Downgrade complaint to pedwarn.
15451         (xref_tag): Warn about surprising behavior of 'friend struct T'.
15452         * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
15453         'class This::Inherited'.
15455 2000-09-12  Mark Mitchell  <mark@codesourcery.com>
15457         * decl.c (finish_case_label): Given the LABEL_DECL a
15458         DECL_CONTEXT.
15460 2000-09-12  Gabriel Dos Reis  <gdr@codesourcery.com>
15462         * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
15463         TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
15464         TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
15465         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
15466         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
15467         New macros.
15468         (sorry_for_unsupported_tree, print_scope_operator,
15469         print_left_paren, print_right_paren, print_left_bracket,
15470         print_right_bracket, print_whitespace): Likewise.
15471         (aggr_variety): Rename to class_key_or_enum.
15472         (print_type): Rename to print_type_id.
15473         (print_type_specifier_seq, print_simple_type_specifier,
15474         print_elaborated_type_specifier,
15475         print_rest_of_abstract_declarator,
15476         print_parameter_declaration_clause, print_exception_specification,
15477         print_nested_name_specifier, print_template_id,
15478         typedef_original_name,  print_template_argument_list_start,
15479         print_template_argument_list_end): New functions.
15481 2000-09-11  Gabriel Dos Reis  <gdr@codesourcery.com>
15483         * ir.texi: Add more documentation.
15485 2000-09-11  Mark Mitchell  <mark@codesourcery.com>
15487         * cp-tree.h (struct saved_scope): Remove x_function_parms.
15488         (current_function_parms): Don't define.
15489         (struct cp_language_function): Remove parms_stored.
15490         (current_function_just_assigned_this): Don't define.
15491         (current_function_parms_stored): Likewise.
15492         (static_ctors): Declare.
15493         (static_dtors): Likewise.
15494         (SF_EXPAND): Don't define.
15495         (expand_start_early_try_stmts): Remove declaration.
15496         (store_parm_decls): Likewise.
15497         * decl.c (static_ctors): Don't declare.
15498         (static_dtors): Likewise.
15499         (struct binding_level): Remove this_block.
15500         (poplevel): Remove dead code.
15501         (set_block): Likewise.
15502         (mark_binding_level): Don't mark this_block.
15503         (mark_saved_scope): Don't mark x_function_parms.
15504         (init_decl_processing): Don't add current_function_parms as a GC
15505         root.
15506         (check_function_type): Change prototype.
15507         (start_function): Remove RTL-generation code.
15508         (expand_start_early_try_stmts): Remove.
15509         (store_parm_decls): Give it internal linkage.  Remove
15510         RTL-generation code.
15511         (finish_function): Remove RTL-generation code.
15512         * decl2.c (static_ctors): Fix formatting.
15513         (static_dtors): Likewise.
15514         * method.c (use_thunk): Don't call store_parm_decls.
15515         (synthesize_method): Likewise.
15516         * optimize.c (maybe_clone_body): Likewise.
15517         * parse.y (fn.def2): Likewise.
15518         (.set_base_init): Likewise.
15519         (nodecls): Likewise.
15520         * pt.c (instantiate_decl): Likewise.
15521         * rtti.c (synthesize_tinfo_fn): Likewise.
15522         * semantics.c (genrtl_try_block): Simplify.
15523         (expand_body): Use genrtl_start_function and
15524         genrtl_finish_function.
15525         (genrtl_start_function): New function.
15526         (genrtl_finish_function): Likewise.
15528 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
15530         * error.c (cp_tree_printer, case 'P'): Append break.
15532 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
15534         * cp-tree.h (frob_opname): Declare.
15535         * parse.y (saved_scopes): New static variable.
15536         (cp_parse_init): Adjust.
15537         (do_id): If lastiddecl is NULL, do do_identifier.
15538         (operator): Save scope information.
15539         (unoperator): New reduction. Restore scope information.
15540         (operator_name): Append unoperator. Call frob_opname.
15541         * spew.c (frob_opname): Define.
15543 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
15545         * decl.c, rtti.c: Include defaults.h if not already included.
15546         Don't define the *_TYPE_SIZE macros.
15548 2000-09-09  Mark Mitchell  <mark@codesourcery.com>
15550         * cp-tree.h (push_switch): Change prototype.
15551         (check_cp_case_value): Remove declaration.
15552         (decl_constant_value): Likewise.
15553         * decl.c (struct cp_switch): Add switch_stmt and cases.
15554         (case_compare): New function.
15555         (push_switch): Set switch_stmt.  Initialize cases.
15556         (pop_switch): Clean up cases.
15557         (define_case_label): Rename to ...
15558         (finish_case_label): ... this.  Do semantic analysis for case
15559         labels here.
15560         (start_function): Correct comment.
15561         * decl2.c (check_cp_case_value): Remove.
15562         * expr.c (do_case): Remove.
15563         * pt.c (tsubst_expr): Adjust call to finish_case_label.
15564         * semantics.c (genrtl_do_poplevel): Remove declaration.
15565         (RECHAIN_STMTS): Remove.
15566         (finish_break_stmt): Use build_break_stmt.
15567         (finish_continue_stmt): Use build_continue_stmt.
15568         (finish_switch_cond): Adjust condition here, rater than in
15569         c_expand_start_case.
15570         (finish_case_label): Remove.
15571         * typeck.c (c_expand_return): Remove.
15572         (c_expand_start_case): Likewise.
15574 2000-09-07  Gabriel Dos Reis  <gdr@codesourcery.com>
15576         * ir.texi: Document type nodes.
15578 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
15580         * cp-tree.h (init_cp_semantics): Declare.
15581         (genrtl_try_block): Don't declare.
15582         (genrtl_handler): Likewise.
15583         (genrtl_catch_block): Likewise.
15584         (genrtl_ctor_stmt): Likewise.
15585         (genrtl_subobject): Likewise.
15586         (genrtl_do_poplevel): Likewise.
15587         (genrtl_named_return_value): Likewise.
15588         * lex.c (init_parse): Call init_cp_semantics.
15589         * semantics.c (genrtl_try_block): Give it internal linkage.
15590         (genrtl_handler): Likewise.
15591         (genrtl_catch_block): Likewise.
15592         (genrtl_ctor_stmt): Likewise.
15593         (genrtl_subobject): Likewise.
15594         (genrtl_do_poplevel): Likewise.
15595         (genrtl_named_return_value): Likewise.
15596         (lang_expand_stmt): Rename to ...
15597         (cp_expand_stmt): ... this.  Only handle C++-specific nodes.
15598         (init_cp_semantics): Define.
15600         * decl.c (initialize_local_var): Remove RTL-generating code.
15601         * semantics.c (genrtl_try_block): Fix formatting.
15603         Move statement-tree facilities from C++ to C front-end.
15604         * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
15605         (void_zero_node): Remove.
15606         (stmt_tree): Likewise.
15607         (scope_chain): Adjust.
15608         (language_function): Rename to cp_language_function.
15609         (cp_function_chain): Adjust.
15610         (current_stmt_tree): Remove.
15611         (last_tree): Likewise.
15612         (last_expr_type): Likewise.
15613         (struct lang_decl): Adjust.
15614         (STMT_IS_FULL_EXPR_P): Remove.
15615         (add_tree): Remove.
15616         (begin_stmt_tree): Likewise.
15617         (finish_stmt_tree): Likewise.
15618         (walk_tree_fn): Likewise.
15619         (walk_stmt_tree): Likewise.
15620         * class.c (finish_struct): Replace use of add_tree with add_stmt.
15621         * decl.c (mark_stmt_tree): Adjust type.
15622         (init_decl_processing): Don't build void_zero_node.
15623         (initialize_local_var): Adjust usage of current_stmt_tree.
15624         (finish_enum): Use add_stmt, not add_tree.
15625         (save_function_data): Adjust use of language_function.
15626         (finish_constructor_body): Use add_stmt, not add_tree.
15627         (finish_destructor_body): Likewise.
15628         (push_cp_function_context): Adjust use of language_function.
15629         (pop_cp_function_context): Likewise.
15630         (mark_lang_function): Likewise.
15631         (mark_cp_function_context): Likewise.
15632         * init.c (build_aggr_init): Adjust use of current_stmt_tree.
15633         (build_vec_init): Likewise.
15634         * semantics.c (SET_LAST_STMT): Remove.
15635         (RECHAIN_STMTS): Don't use it.
15636         (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
15637         (current_stmt_tree): Define.
15638         (add_tree): Remove.
15639         (finish_goto_stmt): Use add_stmt, not add_tree.
15640         (finish_expr_stmt): Likewise.
15641         (begin_if_stmt): Likewise.
15642         (finish_then_clause): Likewise.
15643         (begin_while_stmt): Likewise.
15644         (begin_do_stmt): Likewise.
15645         (finish_return_stmt): Likewise.
15646         (begin_for_stmt): Likewise.
15647         (finish_break_stmt): Likewise.
15648         (finish_continue_stmt): Likewise.
15649         (begin_switch_stmt): Likewise.
15650         (finish_case_label): Likewise.
15651         (begin_try_block): Likewise.
15652         (begin_function_try_block): Likewise.
15653         (begin_handler): Likewise.
15654         (begin_catch_block): Likewise.
15655         (begin_compound_stmt): Likewise.
15656         (begin_asm_stmt): Likewise.
15657         (finish_asm_stmt): Likewise.
15658         (finish_label_stmt): Likewise.
15659         (add_decl_stmt): Likewise.
15660         (finish_subobject): Likewise.
15661         (finish_decl_cleanup): Likewise.
15662         (finish_named_return_value): Likewise.
15663         (setup_vtbl_ptr): Likewise.
15664         (add_scope_stmt): Likewise.
15665         (finish_stmt_expr): Likewise.
15666         (prune_unused_decls): Remove.
15667         (begin_stmt_tree): Likewise.
15668         (finish_stmt_tree): Likewise.
15669         (prep_stmt): Adjust use of current_stmt_tree.
15670         (lang_expand_stmt): Likewise.
15671         * tree.c (statement_code_p): Remove.
15672         (cp_statement_code_p): New function.
15673         (walk_stmt_tree): Remove.
15674         (init_tree): Set lang_statement_code_p.
15676 2000-09-06  Zack Weinberg  <zack@wolery.cumb.org>
15678         Integrated preprocessor.
15680         * Make-lang.in, Makefile.in: Remove all references to input.c,
15681         gxx.gperf, and hash.h.  Add ../c-lex.o to C_OBJS.
15682         * gxx.gperf, hash.h, input.c: Delete.
15683         * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
15684         initialized properly.
15686         * class.c (fixup_pending_inline): Take a tree, not a
15687         struct pending_inline *.  All callers changed.
15688         (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
15689         RID_PROTECTED entries in ridpointers[] array here.
15690         * decl.c (duplicate_decls): Do not refer to struct
15691         pending_inline.
15692         (record_builtin_type, init_decl_processing): Use RID_MAX not
15693         CP_RID_MAX.
15694         (grokdeclarator): Use C_IS_RESERVED_WORD.
15695         * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
15696         cpplib.
15697         (grok_x_components): Do not inspect pending_inlines chain.
15699         * cp-tree.h (struct lang_identifier): Add rid_code entry.
15700         (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
15701         (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
15702         (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
15703         TIME_IDENTIFIER_FILEINFO): Kill.
15704         Update prototypes.
15705         * lex.h: Expunge cp_rid.  Rewrite RIDBIT macros to use just a
15706         single 32-bit word.
15707         * parse.y: Call do_pending_inlines unconditionally.
15708         reinit_parse_for_method is now snarf_method.  fn.defpen is no
15709         longer necessary.  Remove unnecessary <itype> annotation on
15710         SCOPE.  Do not refer to end_of_file or struct pending_inline.
15711         * semantics.c (begin_inline_definitions): Call
15712         do_pending_inlines unconditionally.
15714         * lex.c: Remove all code now shared with C front end.
15715         Initialize cpplib properly if USE_CPPLIB.  Put reserved words
15716         into the get_identifier table.  Rewrite pragma handling to
15717         work with the registry.  Move code to save tokens for later
15718         processing to spew.c.
15720         * spew.c: Rewrite everything in terms of token streams instead
15721         of text.  Move routines here from lex.c / input.c as
15722         appropriate.  GC-mark trees hanging off the pending inlines
15723         chain.
15725 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
15727         * NEWS: Mention that the named return value extension has been
15728         deprecated.
15729         * cp-tree.h (original_result_rtx): Define.
15730         (TREE_REFERENCE_EXPR): Remove.
15731         (DECL_VPARENT): Likewise.
15732         (pushdecl_nonclass_level): Likewise.
15733         (store_return_init): Likewise.
15734         (reinit_lang_specific): Likewise.
15735         (genrtl_named_return_value): Change prototype.
15736         * decl.c (original_result_rtx): Remove.
15737         (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
15738         Do not generate RTL for local variables here.
15739         (store_return_init): Remove.
15740         * semantics.c (genrtl_named_return_value): Simplify.  Fold in
15741         store_return_init.
15742         (finish_named_return_value): Adjust accordingly.  Warn that this
15743         extension is deprecated.
15744         (lang_expand_stmt): Adjust call to genrtl_named_return_value.
15746 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
15748         * pt.c (type_unification_real): Replace switch with if.
15749         (unify): Tsubst non-type parms before comparing.
15751 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
15753         * error.c (dump_typename): New function, broken out of ...
15754         (dump_type): ... here. Use it.
15755         * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
15757 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
15759         * init.c (build_offset_ref): Deal with namespace scoped
15760         TEMPLATE_ID_EXPRs.
15762 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
15764         * class.c (resolve_address_of_overloaded_function): Add
15765         explanation message.
15766         * decl.c (define_case_label): Reformat explanation.
15767         * decl2.c (finish_static_data_member_decl): Likewise.
15768         (grokfield): Likewise.
15769         * friend.c (do_friend): Likewise.
15771 2000-09-05  Zack Weinberg  <zack@wolery.cumb.org>
15773         * tree.c (walk_tree): Expose tail recursion.
15774         (walk_stmt_tree): New function.
15775         * cp-tree.h: Prototype walk_stmt_tree.
15776         * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
15777         the BLOCKs directly.  If a BLOCK has no variables after
15778         pruning, discard it.
15779         (finish_stmt_tree): Use walk_stmt_tree.  No need to save and
15780         restore the line number.
15782 2000-09-05  Mark Mitchell  <mark@codesourcery.com>
15784         * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
15785         (pt.o): Remove dependency on HTAB_H.
15786         * cp-tree.h: Include hashtab.h.
15787         (walk_tree): Change prototype.
15788         (walk_tree_without_duplicates): New function.
15789         * decl.c (check_default_argument): Use it.
15790         * optimize.c (remap_decl): Adjust calls to walk_tree.
15791         (copy_body): Likewise.
15792         (expand_calls_inline): Likewise.
15793         (calls_setjmp_p): Use walk_tree_without_duplicates.
15794         * pt.c: Don't include hashtab.h.
15795         (for_each_template_parm): Use walk_tree_without_duplicates.
15796         * semantics.c (finish-stmt_tree): Likewise.
15797         (expand_body): Likewise.
15798         * tree.c (walk_tree): Add additional parameter.
15799         (walk_tree_without_duplicates): New function.
15800         (count_trees): Use it.
15801         (verify_stmt_tree): Adjust call to walk_tree.
15802         (find_tree): Use walk_tree_without_duplicates.
15803         (no_linkage_check): Likewise.
15804         (break_out_target_exprs): Adjust call to walk_tree.
15805         (cp_unsave): Likewise.
15807 2000-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
15809         * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
15810         (TEMPLATE_TEMPLATE_PARM): Adjust comment.
15811         * cp-tree.h (TYPE_BINFO): Adjust comment.
15812         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
15813         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
15814         (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
15815         (TYPE_TEMPLATE_INFO): Likewise.
15816         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
15817         * class.c (push_nested_class): Likewise.
15818         * decl.c (lookup_name_real): Likewise.
15819         (grokdeclarator): Likewise.
15820         (grok_op_properties): Likewise.
15821         (xref_tag): Likewise.
15822         (xref_basetypes): Likewise.
15823         * decl2.c (constructor_name_full): Likewise.
15824         (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
15825         (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
15826         * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
15827         (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15828         (dump_type_suffix): Likewise.
15829         * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
15830         instead.
15831         (get_aggr_from_typedef): Likewise.
15832         * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
15833         (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15834         (write_template_parm): Likewise.
15835         (write_template_template_parm): Check tree code instead of
15836         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
15837         * method.c (build_overload_nested_name): Add
15838         BOUND_TEMPLATE_TEMPLATE_PARM.
15839         (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
15840         * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15841         * pt.c (convert_template_argument): Check tree code instead of
15842         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
15843         (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
15844         (for_each_template_parm): Adjust comment.
15845         (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.
15846         (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15847         (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.  Use
15848         template_args_equal to compare template template parameter cases.
15849         * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15850         * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
15851         instead.
15852         * tree.c (copy_template_template_parm): Decide whether to create
15853         a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
15854         (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15855         (copy_tree_r): Likewise.
15856         * typeck.c (comptypes): Likewise.  Check tree code instead of
15857         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
15859 2000-09-04  Mark Elbrecht  <snowball3@bigfoot.com>
15861         * decl.c (finish_function): Move the code for handling functions
15862         marked with the constructor and destructor attributes inside the
15863         expand_p block.
15865 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
15867         * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
15869 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
15871         * pt.c (lookup_template_class): Remove abort.
15872         * tree.c (get_type_decl): Allow error_mark_node.
15874 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
15876         * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
15877         TEMPLATE_ID_EXPRs.
15879 2000-09-03  Mark Mitchell  <mark@codesourcery.com>
15881         * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
15882         new ABI mangling.
15884 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
15886         * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
15887         union tag mismatch error reporting.
15889 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
15891         * call.c (build_scoped_method_call): Check it is not a namespace.
15893 2000-08-30  Jason Merrill  <jason@redhat.com>
15895         * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
15897         * tree.c (bot_manip): Check TREE_CONSTANT rather than
15898         !TREE_SIDE_EFFECTS.  Call break_out_target_exprs and
15899         build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
15901         * decl.c (start_function): Always call make_function_rtl.
15903 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
15905         * semantics.c (prune_unused_decls): New function.
15906         (finish_stmt_tree): Call it via walk_tree.
15908 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
15910         * class.c (build_secondary_vtable): Constify a char *.
15911         * decl.c (init_decl_processing): Initialize function_id_node,
15912         pretty_function_id_node, and func_id_node.
15913         * input.c (struct input_source): Constify 'str'.
15914         (feed_input): Constify first argument.
15915         * mangle.c (write_identifier): Constify argument.
15916         * pt.c (mangle_class_name_for_template): Constify argument.
15918 2000-08-29  Mark Mitchell  <mark@codesourcery.com>
15920         * typeck.c (mark_addressable): Remove code that pokes around in
15921         RTL.
15923 2000-08-28  Jason Merrill  <jason@redhat.com>
15925         * lex.c (file_name_nondirectory): Move to toplev.c.
15927         * cp-tree.h (LOCAL_CLASS_P): New macro.
15928         * class.c (finish_struct_1): Use it.
15930 2000-08-27  Alex Samuel  <samuel@codesourcery.com>
15932         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
15933         (write_encoding): Pass another argument to write_name.
15934         (write_name): Add ignore_local_scope parameter.  Fix handling of
15935         local names.
15936         (write_nested_name): Use write_unqualified_name.
15937         (write_prefix): Likewise.  Skip out on FUNCTION_DECLs.
15938         (write_template_prefix): Use write_unqualified_name.
15939         (write_component): Remove.
15940         (write_local_name): Add parameter.  Use direct local entity to
15941         discriminator calculation.
15942         (write_class_enum_type): Pass another argument to write_name.
15943         (write_template_template_arg): Likewise.
15944         (make_guard_variable): Likewise.
15946 2000-08-27  Jason Merrill  <jason@redhat.com>
15948         * decl.c (pushdecl): Matching decls for local externs are found in
15949         the current level.  Propagate linkage information from previous
15950         declarations.
15952 2000-08-26  Gabriel Dos Reis  <gdr@codesourcery.com>
15954         * ir.texi (Expressions): Fix typo.
15956 2000-08-25  Greg McGary  <greg@mcgary.org>
15958         * tree.c (init_tree): Use ARRAY_SIZE.
15960 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
15962         * error.c (cp_tree_printer): Rework.
15964 2000-08-25  Mark Mitchell  <mark@codesourcery.com>
15966         * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
15967         dyn-string.o.
15968         (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
15969         (cp-demangle.o): Remove target.
15970         (dyn-string.o): Likewise.
15972         * decl.c (grokfndecl): Require that `main' return an `int'.
15973         * mangle.c (write_encoding): Don't mangle return types for
15974         conversion functions.
15976 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
15978         * error.c (tree_formatting_info): New data type.
15979         (tree_being_formatted): New macro.
15980         (tree_formatting_flags): Likewise.
15981         (put_whitespace): Likewise.
15982         (print_tree_identifier): Likewise.
15983         (print_identifier): Likewise.
15984         (cp_tree_printer, print_function_argument_list, print_declaration,
15985         print_expression, print_function_declaration,
15986         print_function_parameter, print_type, print_cv_qualifier): New
15987         functions.
15988         (init_error): Initialize lang_printer.
15990 2000-08-24  Jason Merrill  <jason@redhat.com>
15992         * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
15993         adjustment necessary.
15995 2000-08-24  Greg McGary  <greg@mcgary.org>
15997         * cp-tree.h (MAIN_NAME_P): Remove macro.
15999 2000-08-24  Gabriel Dos Reis  <gdr@codesourcery.com>
16001         * error.c (print_instantiation_context): Don't forget to flush the
16002         buffer.
16004 2000-08-23  Jason Merrill  <jason@redhat.com>
16006         * typeck.c (build_ptrmemfunc): Save the input pmf.
16008         * method.c (process_modifiers): Use same_type_p.
16010 2000-08-23  Mark Mitchell  <mark@codesourcery.com>
16012         * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
16013         * mangle.c (write_function_type): Change prototype.
16014         (write_encoding): Don't mangle return types for
16015         constructors or destructors.
16016         (write_type): Adjust call to write_function_type.
16017         * pt.c (instantiate_template): Instantiate alternate entry points
16018         when instantiating the main function.
16020 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
16022         * error.c (cp_print_error_function): Don't use embedded '\n' in
16023         output_printf.
16025 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
16027         * decl.c (init_decl_processing): Remove bogus initialization.
16028         * error.c (lang_print_error_function): Restore here.
16029         (init_error): Initialize print_error_function.
16031 2000-08-22  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
16033         * decl2.c (arg_assoc): Revert my 2000-08-11 change.
16035 2000-08-22  Gabriel Dos Reis  <gdr@codesourcery.com>
16037         * Makefile.in (error.o): Depends on diagnostic.h
16039         * cp-tree.h (problematic_instantiation_changed,
16040         record_last_problematic_instantiation, current_instantiation,
16041         print_instantiation_context): Declare.
16042         (maybe_print_template_context): Remove.
16044         * decl.c (init_decl_processing): Set print_error_function to NULL.
16045         (lang_print_error_function): Remove, since we're using a new
16046         machinery.
16048         * error.c: #include diagnostic.h
16049         (function_category): New function.
16050         (cp_diagnostic_starter): Likewise.
16051         (cp_diagnostic_finalizer): Likewise.
16052         (cp_print_error_function): Likewise.
16053         (maybe_print_instantiation_context): Likewise.
16054         (print_instantiation_full_context): Likewise.
16055         (print_instantiation_partial_context): Likewise.
16056         (print_instantiation_context): Define.
16057         (init_error): Initialize diagnostic pager and finalizer.
16059         * pt.c (problematic_instantiation_changed): Define.
16060         (record_last_problematic_instantiation): Likewise.
16061         (current_instantiation): Likewise.
16062         (maybe_print_template_context): Remove.
16063         (print_template_context): Likewise.
16064         (current_tinst_level): Make static to reflect Brendan Kehoe's
16065         change of 1995-04-13.
16066         (push_tinst_level): Call print_instantiation_context.
16068 2000-08-21  Nix  <nix@esperi.demon.co.uk>
16070         * lang-specs.h: Do not process -o or run the assembler if
16071         -fsyntax-only.
16073 2000-08-21  Joseph S. Myers  <jsm28@cam.ac.uk>
16075         * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
16076         variables.
16077         * decl2.c (lang_decode_option): Disable gettext attributes for
16078         -ansi.
16080 2000-08-21  Gabriel Dos Reis  <gdr@codesourcery.com>
16082         * lex.c (lang_init_options): Default diagnostic message maximum
16083         length to 80, when line-wrapping.
16085 2000-08-20  Mark Mitchell  <mark@codesourcery.com>
16087         * class.c (build_vtbl_initializer): Clear the entire
16088         vtbl_init_data.  Start keeping track of the functions for which we
16089         have created vcall offsets here.
16090         (dfs_build_vcall_offset_vtbl_entries): Remove.
16091         (build_vcall_offset_vtbl_entries): Reimplement.
16092         (add_vcall_offset_vtbl_entries_r): New function.
16093         (add_vcall_offset_vtbl_entries_1): Likewise.  Tweak logic for
16094         computing when vcall offsets are necessary.
16096 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
16098         * decl.c (member_function_or_else): Use cp_error ... %T.
16099         (grokdeclarator): Likewise.
16100         (start_method): Likewise.
16101         * friend.c (make_friend_class): Use cp_pedwarn ... %T.
16103 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
16105         * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
16106         TYPE_DECLs.
16108 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
16110         * cp-tree.h (PTRMEM_OK_P): New macro.
16111         (itf_ptrmem_ok): New enumeration value.
16112         * class.c (resolve_address_of_overloaded_function): Add PTRMEM
16113         argument. Diagnose implicit pointer to member.
16114         (instantiate_type): Don't diagnose implicit pointer to member
16115         here. Pass itf_ptrmem_ok if ok. Adjust calls to
16116         resolve_address_of_overloaded_function.
16117         * init.c (build_offset_ref): Set PTRMEM_OK_P.
16118         (resolve_offset_ref): Don't diagnose implicit pointer to member here.
16119         * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
16120         * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
16121         (build_unary_op): Deal with single non-static member in
16122         microsoft-land.
16124 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
16126         * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
16128 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
16130         * cp-tree.h (enum_name_string): Remove prototype.
16131         (report_case_error): Remove prototype.
16132         * cp/typeck2.c (enum_name_string): Remove.
16133         (report_case_error): Remove.
16134         * error.c (dump_expr): Deal with enum values directly.
16135         Correctly negate integer constant.
16137 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
16139         * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
16140         (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
16141         * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
16142         (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
16143         (__cxa_vec_new): Use __cxa_vec_new2.
16144         (__cxa_vec_delete): Use __cxa_vec_delete2.
16146 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
16148         * vec.cc (__cxa_vec_new): Set "C" linkage.
16149         (__cxa_vec_ctor): Likewise.
16150         (__cxa_vec_cctor): Likewise.
16151         (__cxa_vec_dtor): Likewise.
16152         (__cxa_vec_delete): Likewise.
16153         * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
16154         (__cxa_vec_ctor): Likewise.
16155         (__cxa_vec_cctor): Likewise.
16156         (__cxa_vec_dtor): Likewise.
16157         (__cxa_vec_delete): Likewise.
16159 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
16161         * class.c (instantiate_type): Reinstate local variable
16162         deleted in previous change.
16164         * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
16165         itf_no_attributes.
16167 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
16169         * cp-tree.h (instantiate_type_flags): New enumeration.
16170         (instantiate_type): Change parameter.
16171         * class.c (instantiate_type): Adjust prototype. Adjust.
16172         * call.c (standard_conversion): Adjust instantiate_type call.
16173         (reference_binding): Likewise.
16174         (build_op_delete_call): Likewise.
16175         (convert_like_real): Likewise.
16176         * cvt.c (cp_convert_to_pointer): Likewise.
16177         (convert_to_reference): Likewise.
16178         * pt.c (convert_nontype_argument): Likewise.
16179         * typeck.c (build_binary_op): Likewise.
16180         (build_ptrmemfunc): Likewise.
16181         (convert_for_assignment): Likewise.
16183 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
16185         * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
16186         (current_aggr): Define.
16187         * decl.c (grokdeclarator): Make sure a friend class is an
16188         elaborated type specifier.
16189         * parse.y (current_aggr): Remove static definition.
16190         (cp_parse_init): Adjust.
16191         (structsp): Clear and restore current_aggr.
16192         (component_decl_list): Clear current_aggr.
16194         * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
16195         aggregate tag on the typename's context.
16197         * pt.c (tsubst_friend_class): Return error_mark_node, if
16198         parms becomes NULL.
16199         (instantiate_class_template): Ignore error_mark_node friend types.
16201 2000-08-14  Nathan Sidwell  <nathan@codesourcery.com>
16203         * cvt.c (warn_ref_binding): New static function, broken out of ...
16204         (convert_to_reference): ... here. Use it.
16206 2000-08-11  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
16208         * parse.y (template_arg): Add rule for template qualified with
16209         global scope.
16211 2000-08-11  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
16213         * decl2.c (add_function): Reorganize.
16214         (arg_assoc): Do not consider function template decls.
16216 2000-08-11  Jason Merrill  <jason@redhat.com>
16218         * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
16219         looking inside.
16221 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
16223         * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
16224         (lookup_nested_tag): Likewise.
16226         * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
16227         can be produced.
16229 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
16231         * parse.y (named_complex_class_head_sans_basetype): Remove
16232         always true if.
16234 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
16236         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
16237         explicit TEMPLATE_ID_EXPR args.
16238         (build_expr_from_tree, case CALL_EXPR): Likewise.
16240 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
16242         * decl.c (check_tag_decl): Diagnose typename's which don't
16243         declare anything.
16245 2000-08-10  Nathan Sidwell  <nathan@codesourcery.com>
16247         * init.c (build_aggr_init): Reject bogus array initializers
16248         early.
16250 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
16252         * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
16253         runtime.
16254         * cp/tinfo.cc (__dynamic_cast): Likewise.
16255         * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
16257 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
16259         * cvt.c (convert_to_pointer_force): Fix error message when
16260         attempting to cast from ambiguous base.
16262 2000-08-08  Jason Merrill  <jason@redhat.com>
16264         * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
16265         (tsubst_template_arg_vector): Likewise.
16267         * decl2.c (build_anon_union_vars): Choose the largest field; don't
16268         assume that one will be as large as the union.
16270 2000-08-07  Kazu Hirata  <kazu@hxi.com>
16272         * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
16273         * decl.c (pop_labels): Likewise.
16275 2000-08-04  Jeffrey Oldham  <oldham@codesourcery.com>
16277         * inc/cxxabi.h (__pbase_type_info): Changed member names to match
16278         specifications.
16279         (__pointer_to_member_type_info): Likewise.
16280         (__base_class_info): Likewise.
16281         (__class_type_info): Likewise.
16282         (__si_class_type_info): Likewise.
16283         (__vmi_class_type_info): Likewise.
16284         * tinfo.cc (__si_class_type_info::__do_find_public_src):
16285         Changed member names to match specifications.
16286         (__vmi_class_type_info::__do_find_public_src): Likewise.
16287         (__si_class_type_info::__do_dyncast): Likewise.
16288         (__vmi_class_type_info::__do_dyncast): Likewise.
16289         (__si_class_type_info::__do_upcast): Likewise.
16290         (__vmi_class_type_info::__do_upcast): Likewise.
16291         * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
16292         (__pbase_type_info::__pointer_catch): Likewise.
16293         (__pointer_type_info::__pointer_catch): Likewise.
16294         (__pointer_to_member_type_info::__pointer_catch): Likewise.
16296 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
16298         * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
16299         * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
16300         (cc1plus): Link with $(BACKEND) and $(C_OBJS).
16302 2000-08-04  Mark Mitchell  <mark@codesourcery.com>
16304         * cp-tree.h (add_method): Change prototype.
16305         * class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
16306         Don't double the size of the method vector in the error case.
16307         (handle_using_decl): Adjust call to add_method.
16308         (add_implicitly_declared_members): Likewise.
16309         (clone_function_decl): Likewise.
16310         * decl2.c (check_classfn): Likewise.
16311         * semantics.c (finish_member_declaration): Likewise.
16313 2000-08-04  Joseph S. Myers  <jsm28@cam.ac.uk>
16315         * decl.c (flag_isoc94): New variable.
16317 2000-08-02  Jason Merrill  <jason@redhat.com>
16319         * pt.c (do_type_instantiation): Add complain parm; don't complain
16320         if called recursively.
16321         * cp-tree.h, parse.y: Adjust.
16323 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
16325         * decl2.c: Silently ignore -Wstrict-prototypes; warn about
16326         -Wno-strict-prototypes.
16328         * g++spec.c: Adjust type of second argument to
16329         lang_specific_driver, and update code as necessary.
16331         * cp-tree.h: Don't prototype min_precision here.
16332         (my_friendly_assert): Cast expression to void.
16333         * semantics.c (do_poplevel): Initialize scope_stmts.
16335 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
16337         * cp-tree.h (DECL_NEEDED_P): Tweak.
16339 2000-07-28  Jason Merrill  <jason@redhat.com>
16341         * lang-specs.h: Use %i in rule for .ii files.
16343 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
16345         * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
16347 2000-07-30  Mark Mitchell  <mark@codesourcery.com>
16349         Allow indirect primary bases.
16350         * cp-tree.h (struct lang_type): Remove vfield_parent.  Add
16351         primary_base.
16352         (CLASSTYPE_VFIELD_PARENT): Remove.
16353         (CLASSTYPE_PRIMARY_BINFO): Reimplement.
16354         (BINFO_PRIMARY_BINFO): Remove.
16355         (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
16356         (BINFO_VBASE_PRIMARY_P): Likewise.
16357         (BINFO_PRIMARY_BASE_OF): New macro.
16358         (BINFO_INDIRECT_PRIMARY_P): Likewise.
16359         (get_primary_binfo): New function.
16360         * decl.c (lang_mark_tree): Make lang_type::primary_base.
16361         * class.c (vcall_offset_data_s): Rename to ...
16362         (vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
16363         and add ctor_vtbl_p.
16364         (get_derived_offset): Use get_primary_binfo.
16365         (dfs_mark_primary_bases): Adjust handling of virtual primary
16366         bases.
16367         (mark_primary_bases): Likewise.
16368         (set_primary_base): Take a binfo, not an integer, as a
16369         representation of the primary base.
16370         (indirect_primary_base_p): Remove.
16371         (determine_primary_base): Adjust for indirect primary bases.
16372         (dfs_find_final_overrider): Fix typo in coment.
16373         (update_vtable_entry_for_fn): Use get_primary_binfo.
16374         (layout_nonempty_base_or_field): Tweak.
16375         (build_base_fields): Adjust for new primary base semantics.
16376         (dfs_propagate_binfo_offsets): Remove.
16377         (propagate_binfo_offsets): Rewrite.
16378         (dfs_set_offset_for_shared_vbases): Remove.
16379         (layout_virtual_bases): Don't use it.
16380         (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
16381         ABI.
16382         (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
16383         CLASSTYPE_VFIELD_PARENT.
16384         (dfs_get_primary_binfo): New function.
16385         (get_primary_binfo): Likewise.
16386         (dump_class_hierarchy_r): Tweak printing of primary bases.
16387         (build_vtbl_initializer): Fix typo in comments.  Use
16388         vtbl_init_data.
16389         (build_vcall_and_vbase_vtbl_entries): Likewise.
16390         (build_vbaes_offset_vtbl_entries): Likewise.
16391         (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
16392         BV_VCALL_INDEX to handle indirect primary bases.
16393         (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
16394         (build_rtti_vtbl_entries): Likewise.
16395         * search.c (get_shared_vbase_if_not_primary): Tweak.
16396         (find_vbase_instance): Likewise.
16397         (binfo_for_vtable): Simplify.
16398         * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
16399         (make_binfo): Make it have 11 entries.
16401 2000-07-30  Alex Samuel  <samuel@codesourcery.com>
16403         * mangle.c (DECL_TEMPLATE_ID_P): Remove.
16404         (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
16405         ascertaining primaryness.
16406         (G): Remove template_args.
16407         (decl_is_template_id): New function.
16408         (write_encoding): Use decl_is_template_id.
16409         (write_name): Likewise.  Handle type_decls.  Get main variant of
16410         type decls.
16411         (write_nested_name): Likewise.
16412         (write_prefix): Likewise.
16413         (write_template_prefix): Likewise.
16414         (write_special_name_constructor): Remove defunct production from
16415         comment.
16416         (write_bare_function_type): Remove comment about absent parameter.
16417         (write_template_template_arg): Add missing grammar production to
16418         comment.
16420 2000-07-27  Jason Merrill  <jason@redhat.com>
16422         * decl.c (duplicate_decls): If common_type produces a non-typedef
16423         type for a typedef, just use the old type.
16425 2000-07-27  Mark Mitchell  <mark@codesourcery.com>
16427         * cp-tree.h (function_depth): Declare.
16428         (verify_stmt_tree): Likewise.
16429         (find_tree): Likewise.
16430         * decl.c (function_depth): Give it external linkage.
16431         * optimize.c (optimize_function): Increment and decrement it.
16432         * tree.c (verify_stmt_tree_r): New function.
16433         (verify_stmt_tree): Likewise.
16434         (find_tree_r): Likewise.
16435         (find_tree): Likewise.
16437 2000-07-27  Jason Merrill  <jason@redhat.com>
16439         * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
16440         TYPE_PTRMEMFUNC_P.
16441         * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
16443 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
16445         * decl.c (start_cleanup_fn): Mark the function as `inline'.
16446         * decl2.c (get_guard): Call cp_finish_decl, not
16447         rest_of_decl_compilation, for local guards.
16448         * lex.c (do_identifier): Remove unused variable.
16450 2000-07-26      Marc Espie <espie@cvs.openbsd.org>
16452         * parse.y:  Add missing ';'.
16454 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
16456         * parse.y (empty_parms): Use `()', not `(...)', when in the scope
16457         of `extern "C++"'.
16459 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
16461         Kill strict_prototype. Backwards compatibility only for
16462         non NO_IMPLICIT_EXTERN_C systems.
16463         * cp-tree.h (flag_strict_prototype): Remove.
16464         (strict_prototype): Remove.
16465         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
16466         * decl.c (maybe_push_to_top_level): Adjust.
16467         (pop_from_top_level): Adjust.
16468         (decls_match): Only allow sloppy parm matching for ancient
16469         system headers.
16470         (init_decl_processing): Adjust.
16471         (grokdeclarator): Adjust.
16472         * decl2.c (flag_strict_prototype): Remove.
16473         (strict_prototype): Remove.
16474         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
16475         (lang_f_options): Remove "strict-prototype".
16476         (unsupported-options): Add "strict-prototype".
16477         * lex.c (do_identifier): Adjust.
16478         (do_scoped_id): Adjust.
16479         * parse.y (empty_parms): Adjust.
16480         * class.c (push_lang_context): Adjust.
16481         (pop_lang_context): Adjust.
16482         * typeck.c (comp_target_parms): Adjust.
16484 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
16486         * decl.c (poplevel): Deal with anonymous variables at for scope.
16487         (maybe_inject_for_scope_var): Likewise.
16489 2000-07-25  Zack Weinberg  <zack@wolery.cumb.org>
16491         * decl.c: Remove all signal handling code, now done in toplev.c.
16493 2000-07-23  Mark Mitchell  <mark@codesourcery.com>
16495         * decl.c (make_rtl_for_nonlocal_decl): Rework.
16497         * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
16498         correctly.
16500 2000-07-20  Zack Weinberg  <zack@wolery.cumb.org>
16502         * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
16503         Define my_friendly_assert and my_friendly_abort as macros
16504         which may call friendly_abort.  Prototype friendly abort, not
16505         my_friendly_abort or my_friendly_assert.
16506         * decl.c (signal_catch): Report the signal caught in the error
16507         message.  Call fatal directly.
16508         * typeck2.c (ack, my_friendly_assert): Delete.
16509         (my_friendly_abort): Rename to friendly_abort.  Expect file,
16510         line, and function parameters.  Report the abort code, then
16511         call fancy_abort.  Do not mask an abort if errors have
16512         already occurred.
16514 2000-07-18  Nathan Sidwell  <nathan@codesourcery.com>
16516         * typeck.c (comp_target_parms): Remove obsolete parameter.
16517         (comp_target_types): Adjust.
16519 2000-07-17  Jason Merrill  <jason@redhat.com>
16521         * typeck.c (mark_addressable): Never set TREE_USED.
16522         * call.c (build_call): Don't abort on calls to library functions
16523         that have been declared normally.
16525         * typeck.c (build_binary_op): Fix grammar in warning.
16527         * exception.cc (__eh_free): Fix prototype.
16529         * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
16531         * decl.c (pushdecl): Handle seeing an OVERLOAD in
16532         IDENTIFIER_NAMESPACE_VALUE.
16534 2000-07-16  Mark Mitchell  <mark@codesourcery.com>
16536         * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
16537         * method.c (use_thunk): Correct handling of vcall offsets.
16539 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
16541         * .cvsignore: parse.h and parse.c have no cp- prefix.
16543 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
16545         * .cvsignore: New file.
16547 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
16549         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
16551 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
16553         * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
16554         * parse.c: Remove.
16555         * parse.h: Likewise.
16557 2000-07-11  Mark Mitchell  <mark@codesourcery.com>
16559         * class.c (layout_class_type): Add pointers to virtual bases after
16560         base classes under the old ABI.
16562 2000-07-10  Benjamin Chelf  <chelf@codesourcery.com>
16564         * semantics.c (finish_for_stmt): Remove call to emit_line_note.
16565         (finish_continue_stmt): Likewise.
16566         (begin_for_stmt): Remove call to note_level_for_for.
16567         (finish_goto_stmt): Change call from build_min_nt
16568         to build_stmt.
16569         (finish_expr_stmt): Likewise.
16570         (begin_if_stmt): Likewise.
16571         (begin_while_stmt): Likewise.
16572         (finish_while_stmt): Likewise.
16573         (finish_return_stmt): Likewise.
16574         (begin_for_stmt): Likewise.
16575         (finish_for_stmt): Likewise.
16576         (finish_break_stmt): Likewise.
16577         (begin_switch_stmt): Likewise.
16578         (finish_case_label): Likewise.
16579         (genrtl_try_block): Likewise.
16580         (begin_try_block): Likewise.
16581         (begin_handler): Likewise.
16582         (begin_compound_stmt): Likewise.
16583         (finish_asm_stmt): Likewise.
16584         (finish_label_stmt): Likewise.
16585         (add_decl_stmt): Likewise.
16586         (finish_subobject): Likewise.
16587         (finish_decl_cleanup): Likewise.
16588         (finish_named_return_value): Likewise.
16589         (setup_vtbl_ptr): Likewise.
16590         (add_scope_stmt): Likewise.
16591         * decl.c (finish_constructor_body): Likewise.
16592         (finish_destructor_body): Likewise.
16593         * optimize.c (copy_body_r): Likewise.
16594         (initialize_inlined_parameters): Likewise.
16595         (declare_return_variable): Likewise.
16596         (expand_call_inline): Likewise.
16598 2000-07-10  Jakub Jelinek  <jakub@redhat.com>
16600         * semantics.c (expand_body): Sync interface information
16601         at the end of function body expansion.
16603 2000-07-09  Jason Merrill  <jason@redhat.com>
16605         * init.c (build_new_1): Bail early if the call to new fails.
16607         * decl.c (compute_array_index_type): Check specifically for
16608         an INTEGER_CST, not just TREE_CONSTANT.
16610         * decl.c (duplicate_decls): Don't call duplicate_decls on
16611         the DECL_TEMPLATE_RESULT.
16612         (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
16613         codes.
16615         * error.c (dump_template_bindings): Don't crash if we had an
16616         invalid argument list.
16618         * typeck.c (c_expand_start_case): Do narrowing here.
16619         * semantics.c (finish_switch_cond): Not here.
16621 2000-07-09  Hidvegi Zoli  <hzoli@austin.ibm.com>
16623         * parse.y (asm_clobbers): Do string concatenation.
16625 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
16627         * decl.c (pushtag): Don't put local classes in template functions
16628         on the local_classes list.
16630 2000-07-04  Scott Snyder  <snyder@fnal.gov>
16632         * decl2.c (get_guard): Add missing return for old ABI local
16633         variable case.
16635 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
16637         * cp-tree.h (char_type_p): New function.
16638         * decl.c (init_decl_processing): Don't initialize
16639         signed_wchar_type_node or unsigned_wchar_type_node.
16640         (complete_array_type): Handle brace-enclosed string-constants.
16641         * rtti.c (emit_support_tinfos): Remove #if 0'd code.
16642         * tree.c (char_type_p): New function.
16643         * typeck2.c (digest_init): Use char_type_p.
16645 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
16647         * pt.c (tsubst): Don't layout type, if it's error_mark.
16649 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
16651         * pt.c (instantiate_pending_templates): Reset template level.
16653 2000-07-05  Jason Merrill  <jason@redhat.com>
16655         * call.c (joust): Don't complain about `operator char *()' beating
16656         `operator const char *() const'.
16658 2000-07-04  scott snyder  <snyder@fnal.gov>
16659             Jason Merrill  <jason@redhat.com>
16661         * repo.c (repo_get_id): Handle the case where a class with virtual
16662         bases has a null TYPE_BINFO_VTABLE.
16664 2000-07-04  Kevin Buhr  <buhr@stat.wisc.edu>
16665             Jason Merrill  <jason@redhat.com>
16667         * parse.y (member_init): Just pass in the type.
16668         * init.c (expand_member_init): Handle getting a type.
16670 2000-07-04  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
16671             Jason Merrill  <jason@redhat.com>
16673         * decl.c (finish_function): Warn if a function has no return
16674         statement.
16675         Suggested by Andrew Koenig.
16676         * typeck.c (check_return_expr): Do set current_function_returns_value
16677         if we got an error_mark_node.
16679 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
16681         * decl2.c (push_decl_namespace): Push the original namespace.
16683 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
16685         * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
16686         * semantics.c (begin_class_definition): Clear it.
16688 2000-07-02  Benjamin Chelf  <chelf@codesourcery.com>
16690         * cp-tree.h (genrtl_goto_stmt): Remove declaration.
16691         (genrtl_expr_stmt): Likewise.
16692         (genrtl_decl_stmt): Likewise.
16693         (genrtl_if_stmt): Likewise.
16694         (genrtl_while_stmt): Likewise.
16695         (genrtl_do_stmt): Likewise.
16696         (genrtl_return_stmt): Likewise.
16697         (genrtl_for_stmt): Likewise.
16698         (genrtl_break_stmt): Likewise.
16699         (genrtl_continue_stmt): Likewise.
16700         (genrtl_scope_stmt): Likewise.
16701         (genrtl_switch_stmt): Likewise.
16702         (genrtl_case_label): Likewise.
16703         (genrtl_begin_compound_stmt): Likewise.
16704         (genrtl_finish_compound_stmt): Likewise.
16705         (genrtl_compound_stmt): Likewise.
16706         (genrtl_asm_stmt): Likewise.
16708         * init.c (begin_init_stmts): Remove call to
16709         genrtl_begin_compound_stmt.
16710         (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
16712         * semantics.c (lang_expand_stmt): Changed call to
16713         genrtl_compound_stmt to ignore return value.
16715 2000-07-02  Mark Mitchell  <mark@codesourcery.com>
16717         * mangle.c (canonicalize_for_substitution): Return the canonical
16718         variant of a type.
16720         * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
16721         TYPE_DECL.
16722         * typeck.c (commonparms): Remove obstack manipulations.
16724 2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>
16726         * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
16728         * Makefile.in (OBJS): Added ../c-semantics.o.
16729         (OBJDEPS): Likewise.
16731         * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
16732         ../c-common.h.
16733         (struct stmt_tree): Added comment.
16734         (current_function_name_declared): Removed.
16735         (stmts_are_full_exprs_p): Likewise.
16736         (genrtl_do_pushlevel): Likewise.
16737         (genrtl_clear_out_block): Likewise.
16738         (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
16739         (DECL_ANON_UNION_ELEMS): Likewise.
16740         (emit_local_var): Likewise.
16741         (make_rtl_for_local_static): Likewise.
16742         (do_case): Likewise.
16743         (expand_stmt): Likewise.
16744         (genrtl_decl_cleanup): Likewise.
16745         (c_expand_asm_operands): Likewise.
16746         (c_expand_return): Likewise.
16747         (c_expand_start_case): Likewise.
16749         * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
16750         (emit_local_var): Likewise.
16751         (initialize_local_var): Change reference to
16752         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
16753         Change reference to stmts_are_full_exprs_p to
16754         current_stmt_tree->stmts_are_full_exprs_p.
16755         (push_cp_function_context): Likewise.
16757         * expect.c (expand_throw): Change reference to
16758         stmts_are_full_exprs_p.
16760         * init.c (build_aggr_init): Change reference to
16761         stmts_are_full_exprs_p.
16762         (build_vec_init): Likewise.
16764         * optimize.c (maybe_clone_body): Change reference to
16765         current_function_name_declared to
16766         cp_function_chain->name_declared.
16768         * pt.c (instantiate_decl): Change reference to
16769         current_function_name_declared to
16770         cp_function_chain->name_declared.
16772         * semantics.c (expand_cond): Moved declaration to c-common.h.
16773         (genrtl_do_pushlevel): Moved to c-semantics.c.
16774         (genrtl_clear_out_block): Likewise.
16775         (genrtl_goto_stmt): Likewise.
16776         (genrtl_expr_stmt): Likewise.
16777         (genrtl_decl_stmt): Likewise.
16778         (gerntl_if_stmt): Likewise.
16779         (genrtl_while_stmt): Likewise.
16780         (genrtl_do_stmt): Likewise.
16781         (genrtl_return_stmt): Likewise.
16782         (genrtl_for_stmt): Likewise.
16783         (genrtl_break_stmt): Likewise.
16784         (genrtl_continue_stmt): Likewise.
16785         (genrtl_scope_stmt): Likewise.
16786         (genrtl_switch_stmt): Likewise.
16787         (genrtl_case_label): Likewise.
16788         (genrtl_begin_compound_stmt): Likewise.
16789         (genrtl_finish_compound_stmt): Likewise.
16790         (genrtl_compound_stmt): Likewise.
16791         (genrtl_asm_stmt): Likewise.
16792         (genrtl_decl_cleanup): Likewise.
16793         (expand_cond): Likewise.
16794         (expand_stmt): Renamed to ...
16795         (lang_expand_stmt): ... this.
16796         (lang_expand_expr_stmt): Initialize.
16797         (set_current_function_name_declared): Likewise.
16798         (stmts_are_full_exprs_p): Likewise.
16799         (current_function_name_declared): Likewise.
16800         (anon_aggr_type_p): Likewise.
16801         (do_poplevel): Change reference to
16802         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
16803         Change reference to stmts_are_full_exprs_p to
16804         current_stmt_tree->stmts_are_full_exprs_p.
16805         (add_tree): Likewise.
16806         (finish_expr_stmt): Likewise.
16807         (prep_stmt): Likewise.
16808         (lang_expand_stmt): Likewise.
16809         (begin_compound_stmt): Change reference to
16810         current_function_name_declared to
16811         cp_function_chain->name_declared and call to
16812         current_function_name_declared().
16813         (setup_vtbl_ptr): Likewise.
16814         (genrtl_do_poplevel): Removed.
16816 2000-06-30  Jason Merrill  <jason@redhat.com>
16818         * init.c (init_init_processing): Go back to aligning like
16819         double_type_node for old ABI.
16820         (get_cookie_size): Make cookie larger if we get a type that needs
16821         more alignment.
16822         (build_vec_delete): Call it.
16824         * typeck.c (qualify_type_recursive): New fn.
16825         (composite_pointer_type): Use it.
16826         (build_binary_op): Use composite_pointer_type.
16828 2000-06-24  Carlos O'Ryan  <coryan@cs.wustl.edu>
16829             Jason Merrill  <jason@redhat.com>
16831         * typeck.c (check_return_expr): Don't complain about returning
16832         NULL from operator new if -fcheck-new.
16833         * cp-tree.h: Declare flag_check_new here.
16834         * init.c: Not here.
16836 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
16838         * mangle.c (find_substitution): Use same_type_p.
16839         (write_encoding): Don't check for substitutions.
16841 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
16843         * parse.y (expr_no_comma_rangle): New non-terminal.
16844         (template_parm): Use it for default parameter case.
16845         (template_arg): Use it.
16846         (expr_no_commas): Remove commented out undefined extensions.
16847         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
16848         * parse.h, parse.c: Rebuilt.
16850 2000-06-30  Mark Mitchell  <mark@codesourcery.com>
16852         * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
16853         (finish_asm_stmt): Do it here, instead.
16855         * cp-tree.h (ridpointers): Don't declare.
16856         * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
16857         (record_builtin_java_type): Likewise.
16858         (init_decl_processing): Likewise.
16859         * lex.c: Move inclusion of lex.h.
16860         (ridpointers): Don't define.
16861         (init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
16862         RID_MAX.
16863         * lex.h (enum rid): Rename to ...
16864         (enum cp_rid): ... this.
16865         (ridpointers): Don't declare.
16866         * parse.y: Move inclusion of lex.h.
16867         * parse.c: Regenerated.
16868         * spew.c: Move inclusion of lex.h.
16870         * cp-tree.h (struct language_function): Remove temp_name_counter.
16871         (temp_name_counter): Remove.
16872         (get_temp_name): Change prototype.
16873         (get_guard): New function.
16874         (get_guard_cond): Likewise.
16875         (set_guard): Likewise.
16876         * cvt.c (build_up_reference): Adjust call to get_temp_name.
16877         * decl.c (expand_static_init): Use get_guard and friends to
16878         implement guard variables.
16879         * decl2.c (get_temp_name): Assume that the variables created are
16880         always static.
16881         (get_sentry): Rename to ...
16882         (get_guard): ... this.  Implement new ABI guard variables.
16883         (get_guard_bits): New function.
16884         (get_guard_cond): Likewise.
16885         (set_guard): Likewise.
16886         (start_static_initialization_or_destruction): Use them.
16887         (do_static_initialization): Replace sentry with guard throughout.
16888         (do_static_destruction): Likewise.
16889         * init.c (create_temporary_var): Add comment.
16891 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
16893         * mangle.c (find_substitution): Use same_type_p.
16894         (write_encoding): Don't check for substitutions.
16896 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
16898         * parse.y (expr_no_comma_rangle): New non-terminal.
16899         (template_parm): Use it for default parameter case.
16900         (template_arg): Use it.
16901         (expr_no_commas): Remove commented out undefined extensions.
16902         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
16903         * parse.h, parse.c: Rebuilt.
16905 2000-06-29  Mark Mitchell  <mark@codesourcery.com>
16907         * cp-tree.h (flag_const_strings): Remove.
16908         (warn_parentheses): Likewise.
16909         (warn_format): Likewise.
16910         (common_type): Likewise.
16911         (default_conversion): Likewise.
16912         (build_binary_op): Likewise.
16913         (cp_build_binary_op): New macro.
16914         * call.c (build_new_op): Use cp_build_binary_op instead of
16915         build_binary_op.
16916         * class.c (build_vtable_entry_ref): Likewise.
16917         * decl.c (expand_static_init): Likewise.
16918         (compute_array_index_type): Likewise.
16919         (build_enumerator): Likewise.
16920         * decl2.c (delete_sanity): Likewise.
16921         (start_static_initialization_or_destruction): Likewise.
16922         * error.c (dump_type_suffix): Likewise.
16923         * init.c (resolve_offset_ref): Likewise.
16924         (build_new): Likewise.
16925         (build_new_1): Likewise.
16926         (build_vec_delete_1): Likewise.
16927         (build_vec_init): Likewise.
16928         (build_delete): Likewise.
16929         * rtti.c (synthesize_tinfo_fn): Likewise.
16930         (synthesize_tinfo_var): Likewise.
16931         * search.c (expand_upcast_fixups): Likewise.
16932         (fixup_all_virtual_upcast_offsets): Likewise.
16933         * typeck.c (build_array_ref): Likewise.
16934         (get_member_function_from_ptrfunc): Likewise.
16935         (build_binary_op): Add parameter.
16936         (pointer_int_sum): Use cp_build_binary_op.
16937         (pointer_diff): Likewise.
16938         (build_modify_expr): Likewise.
16939         (get_delta_difference): Likewise.
16940         (build_ptrmemfunc): Likewise.
16942 2000-06-29  Nathan Sidwell  <nathan@codesourcery.com>
16944         * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
16945         * decl.c (create_implicit_typedef): Adjust.
16946         * decl2.c (build_artificial_parm): Adjust.
16947         * method.c (implicitly_declare_fn): Adjust.
16948         * pt.c (push_inline_template_parms_recursive): Adjust.
16949         (process_template_parm): Adjust.
16950         (overloaded_template_name): Adjust.
16951         * semantics.c (finish_template_template_parm): Adjust.
16953 2000-06-28  Mark Mitchell  <mark@codesourcery.com>
16955         * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
16956         * class.c (update_vtable_entry_for_fn): Correct logic for deciding
16957         where to emit thunks.
16958         (build_vtt): Adjust call to build_vtt_inits.
16959         (build_vtt_inits): Add parameter to indicate whether or not
16960         sub-VTTs for virtual bases should be included.  Adjust handling of
16961         construction vtables.
16962         (get_matching_base): New function.
16963         (dfs_build_vtt_inits): Rename to ...
16964         (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
16965         construction vtables.
16966         (dfs_fixup_binfo_vtbls): Likewise.
16967         (build_ctor_vtbl_groups): Build construction vtables for virtual
16968         bases, too.
16969         (accumulate_vtbl_inits): Tweak logic for deciding whether or not
16970         to build construction vtbls.
16971         (dfs_accumulate_vtbl_inits): Adjust handling of
16972         construction vtables.
16974         * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
16975         types correctly.
16977 2000-06-27  Mark Mitchell  <mark@codesourcery.com>
16979         * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
16981 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
16983         * search.c (hides): Remove.
16984         (is_subobject_of_p): Add most_derived parameter. Use
16985         CANONICAL_BINFO.
16986         (lookup_field_queue_p): Adjust.
16987         (lookup_field_r): Adjust.
16989 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
16991         * decl2.c (handle_class_head): Bash typedefs to the type's main
16992         decl.
16994 2000-06-25  Mark Mitchell  <mark@codesourcery.com>
16996         * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
16997         (begin_global_stmt_expr): ... this.
16998         (genrtl_finish_stmt_expr): Rename to ...
16999         (finish_global_stmt_expr): ... this.
17000         * init.c (begin_init_stmts): Adjust calls.
17001         (finish_init_stmts): Likewise.
17002         * semantics.c (genrtl_begin_stmt_expr): Rename to ...
17003         (begin_global_stmt_expr): ... this.
17004         (genrtl_finish_stmt_expr): Rename to ...
17005         (finish_global_stmt_expr): ... this.
17007 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
17009         * search.c (lookup_member): Fix typo in comment.
17011 2000-06-24  Jason Merrill  <jason@redhat.com>
17013         * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
17014         (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
17016 2000-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
17018         * parse.y (complex_direct_notype_declarator): Support global_scope.
17019         * Makefile.in: Adjust conflict count.
17021 2000-06-23  Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
17023         * parse.y (template_arg): Convert TEMPLATE_DECL
17024         that is a template template parameter to
17025         TEMPLATE_TEMPLATE_PARM here.
17027         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
17028         * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
17029         (copy_template_template_parm): Adjust prototype.
17030         * decl.c (grokdeclarator): Remove dead code.
17031         * pt.c (process_template_parm): Tidy.
17032         (lookup_template_class): Construct nodes in
17033         copy_template_template_parm.
17034         (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
17035         lookup_template_class.  Use TYPE_TI_TEMPLATE.
17036         * tree.c (copy_template_template_parm): Add NEWARGS
17037         parameter.
17038         (mapcar): Adjust call to copy_template_template_parm.
17039         * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
17040         * method.c (build_template_template_parm_names): Change error
17041         code to avoid compilation warning.
17043         * gxxint.texi: Document template template parameter
17044         name mangling.
17046 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
17048         * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
17049         (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
17050         (cp-demangle.o): New rule.
17051         (dyn-string.o): Likewise.
17052         * inc/cxxabi.h (__cxa_demangle): New declaration.
17054 2000-06-22  Mark Mitchell  <mark@codesourcery.com>
17056         * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
17057         (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
17058         (lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
17059         a tree, not an int.
17060         (THUNK_GENERATE_WITH_VTABLE_P): New macro.
17061         (make_thunk): Change prototype.
17062         (emit_thunk): Rename to use_thunk.
17063         (mangle_thunk): Change prototype.
17064         * class.c (get_derived_offset): Simplify.
17065         (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
17066         BV_GENERATE_THUNK_WITH_VTABLE_P.
17067         (build_primary_vtable): Simplify.
17068         (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
17069         (dfs_find_base): Remove.
17070         (update_vtable_entry_for_fn): Correct bug in finding the base
17071         where a virtual function was first declared.  Figure out whether
17072         or not to emit a vcall-thunk with the vtables in which it appears.
17073         Correct logic for deciding whether to use an ordinary thunk, or a
17074         vcall thunk.
17075         (finish_struct_1): Remove unnecssary code.
17076         (build_vtbl_initializer): Use ssize_int for the running counter of
17077         negative indices.
17078         (build_vtbl_initializer): Only use vcall thunks where necessary.
17079         Mark thunks as needing to be emitted with their vtables, or not.
17080         (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
17081         indices.  Use size_binop.
17082         (dfs_build_vcall_offset_vtbl_entries): Don't rely on
17083         BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
17084         size_binop.
17085         (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
17086         (build_vtable_entry): Mark thunks as needing to be emitted with
17087         their vtables, or not.
17088         * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
17089         * decl2.c (mark_vtable_entries): Use use_thunk instead of
17090         emit_thunk.
17091         * dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
17092         information.
17093         * error.c (dump_expr): Use BV_FN.
17094         * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
17095         not an int.
17096         * method.c (make_thunk): Likewise.
17097         (emit_thunk): Rename to use_thunk.  Allow callers to decide
17098         whether or not to actually emit the thunk.  Adjust for changes in
17099         representation of vcall offsets.
17100         * search.c (dfs_get_pure_virtuals): Use BV_FN.
17101         * semantics.c (emit_associated_thunks): New function.
17102         (expand_body): Use it.
17103         * ir.texi: Adjust decriptions of thunks.
17105 2000-06-22  Jason Merrill  <jason@redhat.com>
17107         * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
17108         (tsubst_friend_function): Copy it here.
17110         * decl.c (grok_op_properties): Fix typo.
17112         * decl2.c (delete_sanity): Clarify warning, avoid failure on
17113         deleting void*.
17115         * pt.c (check_explicit_specialization): Clarify error.
17117         * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
17118         an old OVERLOAD when we're declaring a non-function.
17119         (pushdecl, destroy_local_var): Check for error_mark_node.
17120         (warn_extern_redeclared_static): Also bail early if
17121         we're a CONST_DECL.
17122         (push_overloaded_decl): Ignore an old error_mark_node.
17124 2000-06-22  Nathan Sidwell  <nathan@codesourcery.com>
17126         * call.c (build_x_va_arg): Check if in a template decl.
17127         * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
17129 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17131         * class.c (push_lang_context): TYPE_NAME gets you to the Java
17132         types DECLs.
17133         * decl.c (check_goto): Computed gotos assumed OK.
17135 2000-06-20  Jason Merrill  <jason@redhat.com>
17137         * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
17138         for which we don't need to look for instantiations.
17140 2000-06-21  Nathan Sidwell  <nathan@codesourcery.com>
17142         * parse.y (program): Always call finish_translation_unit.
17143         * parse.c, parse.h: Rebuilt.
17145 2000-06-20  Zack Weinberg  <zack@wolery.cumb.org>
17147         * method.c: Don't include hard-reg-set.h.
17149 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
17151         * rtti.c (get_base_offset): Cope when vbase field is in a base.
17153 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
17155         * call.c (build_conditional_expr): Use VOID_TYPE_P.
17156         * cvt.c (cp_convert_to_pointer): Likewise.
17157         (convert_to_void): Likewise.
17158         * error.c (dump_expr): Likewise.
17159         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
17160         * init.c (build_delete): Likewise.
17161         * method.c (emit_thunk): Likewise.
17162         * optmize.c (declare_return_variable): Likewise.
17163         * rtti.c (get_tinfo_decl_dynamic): Likewise.
17164         (get_typeid): Likewise.
17165         (build_dynamic_cast_1): Likewise.
17166         * typeck.c (composite_pointer_type): Likewise.
17167         (common_type): Likewise.
17168         (build_indirect_ref): Likewise.
17169         (build_binary_op): Likewise.
17170         (build_x_compound_expr): Likewise.
17171         (check_return_expr): Likewise.
17172         * typeck2.c (add_exception_specifier): Likewise.
17174         * mangle.c (write_method_parms): Use direct comparison for end
17175         of parmlist.
17177 2000-06-19  Benjamin Chelf  <chelf@codesourcery.com>
17179         * cp-tree.h (genrtl_try_block): Declare function.
17180         (genrtl_handler): Likewise.
17181         (genrtl_catch_block): Likewise.
17182         (genrtl_ctor_stmt): Likewise.
17183         (genrtl_subobject): Likewise.
17184         (genrtl_decl_cleanup): Likewise.
17185         (genrtl_do_poplevel): Likewise.
17186         (genrtl_do_pushlevel): Likewise.
17187         (genrtl_clear_out_block): Likewise.
17188         (genrtl_goto_stmt): Likewise.
17189         (genrtl_expr_stmt): Likewise.
17190         (genrtl_decl_stmt): Likewise.
17191         (genrtl_if_stmt): Likewise.
17192         (genrtl_while_stmt): Likewise.
17193         (genrtl_do_stmt): Likewise.
17194         (genrtl_return_stmt): Likewise.
17195         (genrtl_for_stmt): Likewise.
17196         (genrtl_break_stmt): Likewise.
17197         (genrtl_continue_stmt): Likewise.
17198         (genrtl_scope_stmt): Likewise.
17199         (genrtl_switch_stmt): Likewise.
17200         (genrtl_case_label): Likewise.
17201         (genrtl_begin_compound_stmt): Likewise.
17202         (genrtl_finish_compound_stmt): Likewise.
17203         (genrtl_compound_stmt): Likewise.
17204         (genrtl_asm_stmt): Likewise.
17205         (genrtl_named_return_value): Likewise.
17206         (genrtl_begin_stmt_expr): Likewise.
17207         (genrtl_finish_stmt_expr): Likewise.
17208         (finish_for_stmt): Removed first argument.
17209         (finish_switch_stmt): Likewise.
17211         * semantics.c (genrtl_try_block): Define function.
17212         (genrtl_handler): Likewise.
17213         (genrtl_catch_block): Likewise.
17214         (genrtl_ctor_stmt): Likewise.
17215         (genrtl_subobject): Likewise.
17216         (genrtl_decl_cleanup): Likewise.
17217         (genrtl_do_poplevel): Likewise.
17218         (genrtl_do_pushlevel): Likewise.
17219         (genrtl_clear_out_block): Likewise.
17220         (genrtl_goto_stmt): Likewise.
17221         (genrtl_expr_stmt): Likewise.
17222         (genrtl_decl_stmt): Likewise.
17223         (genrtl_if_stmt): Likewise.
17224         (genrtl_while_stmt): Likewise.
17225         (genrtl_do_stmt): Likewise.
17226         (genrtl_return_stmt): Likewise.
17227         (genrtl_for_stmt): Likewise.
17228         (genrtl_break_stmt): Likewise.
17229         (genrtl_continue_stmt): Likewise.
17230         (genrtl_scope_stmt): Likewise.
17231         (genrtl_switch_stmt): Likewise.
17232         (genrtl_case_label): Likewise.
17233         (genrtl_begin_compound_stmt): Likewise.
17234         (genrtl_finish_compound_stmt): Likewise.
17235         (genrtl_compound_stmt): Likewise.
17236         (genrtl_asm_stmt): Likewise.
17237         (genrtl_named_return_value): Likewise.
17238         (genrtl_begin_stmt_expr): Likewise.
17239         (genrtl_finish_stmt_expr): Likewise.
17240         (finish_for_stmt): Removed first argument and generate rtl
17241         specific code.
17242         (finish_switch_stmt): Likewise.
17243         (do_poplevel): Removed generate rtl specific code.
17244         (do_pushlevel): Likewise.
17245         (add_tree): Likewise.
17246         (finish_goto_stmt): Likewise.
17247         (finish_expr_stmt): Likewise.
17248         (begin_if_stmt): Likewise.
17249         (finish_if_stmt_cond): Likewise.
17250         (finish_then_clause): Likewise.
17251         (begin_else_clause): Likewise.
17252         (finish_else_clause): Likewise.
17253         (finish_if_stmt): Likewise.
17254         (clear_out_block): Likewise.
17255         (begin_while_stmt): Likewise.
17256         (finish_while_stmt_cond): Likewise.
17257         (finish_while_stmt): Likewise.
17258         (begin_do_stmt): Likewise.
17259         (finish_do_body): Likewise.
17260         (finish_do_stmt): Likewise.
17261         (finish_return_stmt): Likewise.
17262         (begin_for_stmt): Likewise.
17263         (finish_for_init_stmt): Likewise.
17264         (finish_for_cond): Likewise.
17265         (finish_for_expr): Likewise.
17266         (finish_break_stmt): Likewise.
17267         (finish_continue_stmt): Likewise.
17268         (begin_switch_stmt): Likewise.
17269         (finish_switch_cond): Likewise.
17270         (finish_case_label): Likewise.
17271         (begin_try_block): Likewise.
17272         (begin_function_try_block): Likewise.
17273         (finish_try_block): Likewise.
17274         (finish_cleanup_try_block): Likewise.
17275         (finish_cleanup): Likewise.
17276         (finish_function_try_block): Likewise.
17277         (finish_handler_sequence): Likewise.
17278         (finish_function_handler_sequence): Likewise.
17279         (begin_handler): Likewise.
17280         (finish_handler_parms): Likewise.
17281         (begin_catch_block): Likewise.
17282         (finish_handler): Likewise.
17283         (begin_compound_stmt): Likewise.
17284         (finish_compound_stmt): Likewise.
17285         (finish_asm_stmt): Likewise.
17286         (finish_label_stmt): Likewise.
17287         (finish_label_decl): Likewise.
17288         (finish_subobject): Likewise.
17289         (finish_decl_cleanup): Likewise.
17290         (finish_named_return_value): Likewise.
17291         (begin_stmt_expr): Likewise.
17292         (finish_stmt_expr): Likewise.
17294         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
17295         to call genrtl_expr_stmt when appropriate.
17297         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
17298         begin_compound_expr to call genrtl_begin_stmt_expr and
17299         genrtl_begin_compound_expr when appropriate.
17300         (finish_init_stmts): Changed calls to finish_compound_expr and
17301         finish_stmt_expr to call genrtl_finish_compound_expr and
17302         genrtl_finish_stmt_expr when appropriate.
17303         (expand_default_init): Changed call to finish_expr_stmt to call
17304         genrtl_expr_stmt when appropriate.
17305         (build_vec_init): Likewise.
17307         * parse.y (simple_stmt): Removed first argument from call to
17308         finish_for_stmt. Removed first argument from call to
17309         finish_switch_stmt.
17311         * parse.c: Regenerated.
17313         * pt.c (tsubst_expr): Removed first argument from call to
17314         finish_for_stmt. Removed first argument from call to
17315         finish_switch_stmt.
17317 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
17319         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
17320         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
17322         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
17323         (cplus_tree_code_length[]): Likewise.
17324         (cplus_tree_code_name[]): Likewise.
17325         (init_parse): Added call to add_c_tree_codes. Changed
17326         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
17328 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
17330         * cp-tree.h (finish_mem_initializers): Declare.
17331         (count_trees): Likewise.
17332         * parse.y (base_init): Use finish_mem_initializers.
17333         * semantics.c (finish_mem_initializers): New function.
17335         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
17336         the number of trees.
17337         (n_trees): Remove.
17338         (count_trees): Don't use it.
17340 2000-06-15  Jason Merrill  <jason@redhat.com>
17342         * tree.c (count_trees): New debugging function.
17344         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
17345         * init.c (build_member_call): Pull out the name of a DECL.
17347         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
17348         * semantics.c (expand_body): Push to TV_INTEGRATION here.
17349         * optimize.c (optimize_function): Not here.
17350         * pt.c (instantiate_decl): Push to TV_PARSE.
17352 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
17354         * cp-tree.h (struct language_function): Remove x_base_init_list
17355         and x_member_init_list.
17356         (current_base_init_list): Remove.
17357         (current_member_init_list): Likewise.
17358         (setup_vtbl_ptr): Change prototype.
17359         (emit_base_init): Likewise.
17360         (expand_member_init): Likewise.
17361         (reinit_parse_for_function): Remove.
17362         * decl.c (save_function_data): Don't clear x_base_init_list and
17363         x_member_init_list.
17364         (mark_language_function): Don't mark them.
17365         * init.c (perform_member_init): Tweak comment.
17366         (sort_member_init): Take the list of initializers as an argument.
17367         (sort_base_init): Likewise.
17368         (emit_base_init): Likewise.
17369         (expand_member_init): Return the initializer.  Don't use global
17370         variables.
17371         * lex.c (reinit_parse_for_function): Remove.
17372         * method.c (build_template_parm_names): Correct substitution.
17373         (do_build_copy_constructor): Don't use current_member_init_list
17374         and current_base_init_list.
17375         (synthesize_method): Likewise.
17376         * parse.y (base_init): Split mem-initializers into
17377         base-initializers and field-initializers.
17378         (member_init_list): Build up the list here.
17379         (member_init): Return the initializer.
17380         (fn.depfn): Don't use reinit_parse_for_function.
17381         * parse.c: Regenerated.
17382         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
17383         ERROR_MARK.
17384         (tsubst_expr): Don't use current_member_init_list
17385         and current_base_init_list.
17386         (tsubst_expr_values): Rename to ...
17387         (tsubst_initializer_list): ... this.  Use convert_from_reference.
17388         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
17389         and current_base_init_list.
17390         (begin_function_definition): Don't call reinit_parse_for_function.
17392         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
17394         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
17395         correctly.
17397         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
17399 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
17401         * cp-tree.h (IF_COND): Move to c-common.h.
17402         (THEN_CLAUSE): Likewise.
17403         (ELSE_CLAUSE): Likewise.
17404         (WHILE_COND): Likewise.
17405         (WHILE_BODY): Likewise.
17406         (DO_COND): Likewise.
17407         (DO_BODY): Likewise.
17408         (RETURN_EXPR): Likewise.
17409         (EXPR_STMT_EXPR): Likewise.
17410         (FOR_INIT_STMT): Likewise.
17411         (FOR_COND): Likewise.
17412         (FOR_EXPR): Likewise.
17413         (FOR_BODY): Likewise.
17414         (SWITCH_COND): Likewise.
17415         (SWITCH_BODY): Likewise.
17416         (CASE_LOW): Likewise.
17417         (CASE_HIGH): Likewise.
17418         (GOTO_DESTINATION): Likewise.
17419         (COMPOUND_BODY): Likewise.
17420         (ASM_CV_QUAL): Likewise.
17421         (ASM_STRING): Likewise.
17422         (ASM_OUTPUTS): Likewise.
17423         (ASM_INPUTS): Likewise.
17424         (ASM_CLOBBERS): Likewise.
17425         (DECL_STMT_DECL): Likewise.
17426         (STMT_EXPR_STMT): Likewise.
17427         (LABEL_STMT_LABEL): Likewise.
17428         (SCOPE_BEGIN_P): Likewise.
17429         (SCOPE_END_P): Likewise.
17430         (SCOPE_STMT_BLOCK): Likewise.
17431         (SCOPE_NULLIFIED_P): Likewise.
17432         (SCOPE_NO_CLEANUPS_P): Likewise.
17433         (SCOPE_PARTIAL_P): Likewise.
17434         (ASM_VOLATILE_P): Likewise.
17435         (STMT_LINENO): Likewise.
17436         (STMT_LINENO_FOR_FN_P): Likewise.
17438         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
17439         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
17440         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
17441         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
17442         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
17444         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
17446         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
17447         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
17449         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
17450         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
17451         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
17453 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
17455         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
17456         * class.c (dfs_find_final_overrider): Set it appropriately.
17457         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
17458         avoid unneeded secondary vptrs.
17460 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
17462         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
17463         (check_bitfield_decl, check_field_decl): Likewise.
17464         (build_vtbl_or_vbase_field, build_base_field): Likewise.
17465         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
17466         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
17467         (xfer_tag, finish_enum): Likewise.
17468         * decl2.c (finish_builtin_type): Likewise.
17469         * init.c (init_init_processing): Likewise.
17470         * pt.c (instantiate_class_template): Likewise.
17471         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
17472         * cp-tree.h (struct lang_type): Add user_align member.
17473         (CLASSTYPE_USER_ALIGN): Define.
17475 2000-06-13  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
17477         * Make-lang.in (c++.install-common): Install g++-cross in
17478         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
17479         $(target_alias)-g++ and $(target_alias)-c++.
17481 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
17483         * class.c (vcall_offset_data_s): Add last_init and fns.
17484         (overrides): Rename to same_signature_p.
17485         (dfs_find_final_overrider): Adjust accordingly.
17486         (mark_overriders): Likewise.
17487         (warn_hidden): Likewise.
17488         (build_vtbl_initializer): Reorganize machinery for building things
17489         at negative offsets.
17490         (build_vcall_and_vbase_vtbl_entries): Likewise.
17491         (build_vbase_offset_vtbl_entries): Likewise.
17492         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
17493         offset entries.  Do not create two entries for functions with the
17494         same signature.
17495         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
17496         (build_rtti_vtbl_entries): Reorganize machinery for building things
17497         at negative offsets.
17499         * optimize.c (expand_call_inline): Don't recurse into the code
17500         used to initialize the parameters more than once.
17502 2000-06-11  Mark Mitchell <mark@codesourcery.com>
17504         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
17505         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
17506         (find_substitution): Only use the `Sa' substitution for
17507         std::allocator, not instantiations of it.
17508         (write_template_prefix): Move comment.  Only use a TREE_LIST to
17509         represent substitutions for a member template.
17510         (write_array_type): Mangle array dimensions correctly.
17511         * optimize.c (maybe_clone_body): Copy more information from the
17512         cloned function.
17513         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
17514         on the regenerated declaration.
17516 2000-06-11  Chip Salzenberg  <chip@valinux.com>
17517             Mark Mitchell <mark@codesourcery.com>
17519         * class.c (build_vtable): Clarify comment.
17520         (build_ctor_vtbl_group): Pass the most derived type to
17521         build_vtable.
17523 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17525         * decl2.c (compare_options): Don't needlessly cast away const-ness.
17527 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
17529         * decl.c (add_binding): Handle duplicate declarations of external
17530         variables.
17532 2000-06-09  Chip Salzenberg  <chip@valinux.com>
17533             Mark Mitchell <mark@codesourcery.com>
17535         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
17536         argument.
17537         (write_signed_number): New macro.
17538         (write_unsigned_number): Likewise.
17539         (write_source_name): Use them.
17540         (write_number): Handle signed and unsigned values.
17541         (write_integer_cst): Use tree_int_cst_sgn, and use
17542         write_unsigned_number or write_signed_number as appropriate.
17543         (write_discriminator): Use write_unsigned_number or
17544         write_signed_number as appropriate.
17545         (write_template_arg_literal): Likewise.
17546         (write_array_type): Use tree_low_cst.
17547         (write_template_parm):  Use write_unsigned_number or
17548         write_signed_number as appropriate.
17549         (write_substitution): Adjust call to write_number.
17550         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
17551         (write_expression): Handle non-type template arguments of
17552         reference type correctly.
17553         (mangle_thunk): Use write_signed_number.
17555 2000-06-09  Chip Salzenberg  <chip@valinux.com>
17557         * mangle.c (find_substition): Don't mangle objects with typename
17558         substitutions (e.g. "cin" as "Si").
17560 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
17562         * call.c (add_candidate): Use ggc_alloc_cleared.
17563         * decl.c (lookup_label): Likewise.
17564         * lex.c (retrofit_lang_decl): Likewise.
17566 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
17568         * semantics.c (expand_body): Push to TV_EXPAND.
17569         * optimize.c (optimize_function): Push to TV_INTEGRATION.
17570         * decl.c (start_function): Always call announce_function.
17572         * tinfo2.cc: Just declare abort.
17574 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
17576         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
17577         whenever @ is a symbolic name.
17579 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
17581         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
17583 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
17585         * decl.c (pushdecl): Look up functions by DECL_NAME, not
17586         DECL_ASSEMBLER_NAME.
17588 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
17590         * decl2.c (c_language): Define.
17592 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
17594         * lex.c (lang_init_options): Tweak.
17596         * decl2.c: Remove #inclusion of diagnostic.h
17597         (lang_decode_option): Move diagnostic formatting options to
17598         toplevel.
17600         * lang-options.h: Remove documentation for diagnostic options.
17602         * Makefile.in (lex.o): Depends upon diagnostic.h
17604 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
17606         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
17607         the same DECL_RESULT, it's not a redefinition.
17608         * pt.c (tsubst_decl): Remove code to handle illegal
17609         specializations.
17611 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
17613         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
17615 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
17617         * search.c (maybe_suppress_debug_info): Don't check
17618         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
17620         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
17621         here if extern_p.
17623         Remember instantiation context in deferred instantiations.
17624         * cp-tree.h (struct tinst_level): Remove.
17625         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
17626         * pt.c (current_tinst_level): Now a tree.
17627         (print_template_context, push_tinst_level, pop_tinst_level,
17628         tinst_for_decl): Adjust.
17629         (reopen_tinst_level): New fn.
17630         (init_pt): Register current_tinst_level as a root.
17631         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
17632         of the pending templates list.
17633         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
17634         * lex.c (extract_interface_info): Adjust.
17635         * decl2.c (warn_if_unknown_interface): Adjust.
17637 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
17639         * class.c (indirect_primary_base_p): New function.
17640         (determine_primary_base): Use it.
17642 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
17644         Update new-abi dynamic cast algorithm.
17645         * tinfo.cc (__class_type_info::__dyncast_result): Add
17646         whole_details. Adjust constructor.
17647         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
17648         Avoid unnecessary searching.
17649         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
17651 2000-06-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
17653         * decl.c (init_decl_processing): Don't call record_component_aliases.
17654         * tree.c (build_cplus_array_type_1): Likewise.
17656 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
17658         * ir.texi: Correct typo.
17659         * mangle.c (write_expression): Handle non-type template arguments
17660         with reference type.
17661         * method.c (build_overload_value): Likewise.
17662         * pt.c (convert_nontype_argument): Explicitly represent conversion
17663         to a reference with an ADDR_EXPR.
17664         (unify): Always unify arguments in left-to-right order.
17666 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
17667             Mark Mitchell  <mark@codesourcery.com>
17669         * Make-lang.in (CXX_SRCS): Add mangle.c.
17670         * Makefile.in (CXX_OBJS): Add mangle.o.
17671         (mangle.o): New rule.
17673         * class.c (local_classes): New variable.
17674         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
17675         (get_vtt_name): Use mangle_vtt_name for new ABI.
17676         (init_class_processing): Initialize local_classes.
17677         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
17678         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
17679         (std_identifier): New macro.
17680         (DECL_VOLATILE_MEMFUNC_P): New macro.
17681         (DECL_NAMESPACE_STD_P): Likewise.
17682         (local_classes): Declare.
17683         (get_mostly_instantiated_function_type): Declare.
17684         (init_mangle): Declare.
17685         (mangle_decl): Likewise.
17686         (mangle_type_string): Likewise.
17687         (mangle_type): Likewise.
17688         (mangle_typeinfo_for_type): Likewise.
17689         (mangle_typeinfo_string_for_type): Likewise.
17690         (mangle_vtbl_for_type): Likewise.
17691         (mangle_vtt_for_type): Likewise.
17692         (mangle_ctor_vtbl_for_type): Likewise.
17693         (mangle_thunk): Likewise.
17694         (mangle_conv_op_name_for_type): Likewise.
17695         (mangle_guard_variable): Likewise.
17696         * decl.c (pushtag): Keep track of local classes.
17697         (initialize_predefined_identifiers): Initialize std_identifier.
17698         (init_decl_processing): Use std_identifier.
17699         (start_decl): Don't treat instantiations as specializations.
17700         (grokdeclarator): Likewise.
17701         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
17702         name for fully-instantiated templates.
17703         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
17704         destructors with the new ABI.
17705         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
17706         (grokfield): Use mangle_type for new ABI.
17707         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
17708         (get_sentry): Use mangle_guard_variable for new ABI.
17709         (start_static_initialization_or_destruction): Likewise.
17710         * expr.c (extract_aggr_init): Remove.
17711         (extract_scalar_init): Likewise.
17712         (extract_init): Remove #if 0'd code.
17713         * mangle.c: New function.
17714         * method.c (build_mangled_name): Assert not flag_new_abi.
17715         (build_static_name): Likewise.
17716         (build_decl_overload_real): Likewise.
17717         (build_typename_overload): Likewise.
17718         (build_overload_with_type): Likewise.
17719         (build_overload_name): Likewise.
17720         (get_ctor_vtbl_name): Likewise.
17721         (start_squangling): Likewise.
17722         (get_id_2): Likewise.
17723         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
17724         (init_method): Call init_mangle for new ABI.
17725         (make_thunk): Call mangle_thunk for new ABI.
17726         * operators.def: Correct new ABI manglings for the `%' operator.
17727         Add `::' operator.
17728         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
17729         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
17730         (lookup_template_class): Call mangle_decl for new ABI.
17731         (get_mostly_instantiated_function_type): New function.
17732         (set_mangled_name_for_template_decl): Use it.
17733         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
17734         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
17735         conversion op names.
17736         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
17737         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
17738         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
17739         mangle_typeinfo_string_for_type.
17741 2000-06-03  Mark Mitchell  <mark@codesourcery.com>
17743         * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
17744         (INNERMOST_TEMPLATE_ARGS): New macro.
17745         (innermost_args): Remove.
17746         (get_innermost_template_args): New function.
17747         * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
17748         * error.c (dump_function_decl): Be caution when using
17749         most_general_template.
17750         * method.c (build_template_parm_names):  Use
17751         INNERMOST_TEMPLATE_ARGS.
17752         * pt.c (add_to_template_args): Tidy comment
17753         (get_innermost_template_args): New function.
17754         (check_explicit_specialization): Clear DECL_INITIAL for a new
17755         specialization.
17756         (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
17757         Tidy.
17758         (push_template_decl): Always register specializations of the most
17759         general template.
17760         (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
17761         (coerce_template_parms): Likewise.
17762         (lookup_template_class): Likewise.
17763         (innermost_args): Remove.
17764         (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
17765         (tsubst_decl): Handle tricky specializations.  Use
17766         get_innermost_template_args.
17767         (instantiate_template): Simplify handling of partial
17768         instantiations.
17769         (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
17770         (most_general_template): Reimplement, in a more straightforward
17771         manner.
17772         (regenerate_decl_from_template): Tweak formatting.  Use
17773         TMPL_ARGS_DEPTH for clarity.
17774         (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
17776         * dump.c (dequeue_and_dump): Dump information about thunks.
17778 2000-06-01  Richard Henderson  <rth@cygnus.com>
17780         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
17782 2000-06-01  Richard Henderson  <rth@cygnus.com>
17784         * decl2.c (unsupported_options): Fix typo, make const.
17785         (lang_decode_option): Fix bsearch argument order.
17787 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
17789         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
17790         on FIELD_DECLs.
17792 2000-05-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
17794         * cp-tree.h (c_get_alias_set): Deleted.
17795         * Makefile.in (decl.o): Include ../expr.h.
17796         * decl.c (expr.h): Include.
17797         (init_decl_processing): Call record_component_aliases for arrays.
17798         (grokdeclarator): Likewise.
17799         Set TREE_ADDRESSABLE for fields that aren't bitfields.
17800         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
17802 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
17804         Remove guiding declaration support.
17805         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
17806         (flag_guiding_decls): Remove.
17807         * call.c (build_user_type_conversion_1): Remove support for
17808         guiding decls.
17809         (build_new_function_call): Likewise.
17810         (build_new_op): Likewise.
17811         (build_new_method_call): Likewise.
17812         * decl.c (start_function): Likewise.
17813         * friend.c (is_friend): Likewise.
17814         (do_friend): Likewise.
17815         * decl2.c ((flag_dump_translation_unit): Make it const.
17816         (flag_guiding_decls): Remove.
17817         (unsupported_options): New variable
17818         (compare_options): New function.
17819         (lang_decode_option): Use them.
17821         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
17823         * method.c (mangle_expression): Adjust test for legal expression
17824         operators.
17826         * pt.c (instantiate_decl): Save and restore the local
17827         specializations list.
17829 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
17831         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
17833 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
17835         * call.c (add_template_candidate_real): Handle member template
17836         constructors for classes with virtual bases.
17837         (build_user_type_conversion_1): Use in_charge_arg_for_name.
17838         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
17840         * ir.texi: Update thunk documentation.
17842         * call.c (joust): Fix handling of overloaded builtin operators.
17844 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
17846         * cp-tree.h (DECL_ANTICIPATED): New macro.
17847         Document new use of DECL_LANG_FLAG_7.
17848         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
17849         in the user namespace.
17850         * lex.c (do_identifier): If the identifier's declaration has
17851         DECL_ANTICIPATED on, it has not yet been declared.  But do not
17852         replace it with an ordinary implicit declaration.
17854         * tinfo2.cc: Include stdlib.h.
17856 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
17858         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
17859         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
17860         CLASSTYPE_ALIGN.
17862 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
17864         * decl2.c (lang_decode_option): Use skip_leading_substring instead
17865         of plain strncmp.
17867 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
17869         * operators.def (<?): Duplicated, should have been...
17870         (>?): this.  Fixed.
17872 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
17873             Mark Mitchell  <mark@codesourcery.com>
17875         * cp-tree.h (ansi_opname): Make it a macro.
17876         (ansi_assopname): Likewise.
17877         (struct lang_decl_flags): Add assignment_operator_p.
17878         (struct lang_decl): Add operator_code.
17879         (DECL_VTT_PARM): Adjust.
17880         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
17881         overloaded operator.
17882         (SET_OVERLOADED_OPERATOR_CODE): New macro.
17883         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
17884         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
17885         (opname_tab): Remove.
17886         (assignop_tab): Likewise.
17887         (operator_name_info_t): New type.
17888         (operator_name_info): New variable.
17889         (assignment_operator_name_info): Likewise.
17890         (build_cp_library_fn): Remove declaration.
17891         (push_cp_library_fn): Likewise.
17892         (operator_name_string): Likewise.
17893         (build_decl_overload): Likewise.
17894         * call.c (print_z_candidates): Simplify.
17895         (build_object_call): Adjust usage of ansi_opname.  Use
17896         DECL_OVERLOADED_OPERATOR_P.
17897         (op_error): Adjust operator name lookup.
17898         (build_conditional_expr): Adjust usage of ansi_opname.
17899         (build_new_op): Likewise.
17900         (build_op_delete_call): Likewise.
17901         (build_over_call): Likewise.
17902         (joust): Use DECL_OVERLOADED_OPERATOR_P.
17903         * decl.c (duplicate_decls): Copy operator_code.
17904         (init_decl_processing): Adjust parameters to push_cp_library_fn.
17905         (builtin_function): Adjust parameters to build_library_fn_1.
17906         (build_library_fn_1): Accept an overloaded operator code.
17907         (build_library_fn): Pass ERROR_MARK.
17908         (build_cp_library_fn): Accept an overloaded operator code.
17909         (push_cp_library_fn): Likewise.
17910         (grokfndecl): Tweak.
17911         (grokdeclarator): Simplify code to compute names of overloaded
17912         operators.  Adjust use of ansi_opname.
17913         (ambi_op_p): Work on tree_codes, not identifiers.
17914         (unary_op_p): Likewise.
17915         (grok_op_properties): Likewise.
17916         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
17917         (lang_mark_tree): Don't try to mark the operator_code.
17918         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
17919         * error.c (dump_decl): Remove special handling for operator
17920         names.
17921         (dump_function_name): Likewise.
17922         (dump_expr): Adjust name lookup of operators.
17923         (op_to_string): Simplify.
17924         (assop_to_string): Likewise.
17925         * init.c (build_new_1): Adjust use of ansi_opname.
17926         * lex.c (opname_tab): Remove.
17927         (assignop_tab): Likewise.
17928         (ansi_opname): Likewise.
17929         (ansi_assopname): Likewise.
17930         (operator_name_string): Likewise.
17931         (reinit_lang_specific): Likewise.
17932         (operator_name_info): New variable.
17933         (assignment_operator_name_info): Likewise.
17934         (init_operators): New function.
17935         (init_parse): Use it.
17936         (do_identifier): Adjust use of ansi_opname.
17937         * method.c (mangle_expression): Don't use ansi_opname for
17938         mangling.
17939         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
17940         (build_decl_overload): Remove.
17941         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
17942         (do_build_assign_ref): Adjust use of ansi_opname.
17943         (synthesize_method): Likewise.
17944         (implicitly_declare_fn): Likewise.
17945         * operators.def: New file.
17946         * parse.y (operator): Adjust use of ansi_opname.
17947         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
17948         (set_mangled_name_for_template_decl): Don't play games with
17949         current_namespace.
17950         (special_function_p): Adjust use of ansi_opname.
17951         * typeck.c (check_return_expr): Likewise.
17952         * Make-lang.in (cc1plus): Depend on operators.def.
17953         * Makefile.in (lex.o): Likewise.
17954         (decl.o): Likewise.
17956 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
17958         * Make-lang.in (cplib2.ready): Eradicate.
17960 2000-05-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
17962         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
17963         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
17964         (built_min, cp_tree_equal): Likewise.
17966 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
17968         * class.c (layout_nonempty_base_or_field): Replace
17969         `record_layout_info' with `record_layout_info_s'.
17971 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
17973         Fix goto checking.
17974         * cp-tree.h (struct language_function): x_named_labels is now
17975         a struct named_label_list*.
17976         * decl.c (struct named_label_use_list): Renamed from...
17977         (struct named_label_list): ...this.  New struct.
17978         (push_binding_level): Don't set eh_region.
17979         (note_level_for_eh): New fn.
17980         (pop_label): Take label and old value directly.
17981         (pop_labels): Adjust for new named_labels format.
17982         (lookup_label): Likewise.
17983         (poplevel): Note characteristics of a binding level containing a
17984         named label.  Mess with named label lists earlier.
17985         (mark_named_label_lists): New fn.
17986         (mark_lang_function): Call it.
17987         (use_label): New fn, split out from...
17988         (make_label_decl): ...here.  Don't call it.
17989         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
17990         check_previous_gotos): New fns, split out from...
17991         (define_label): ...here.
17992         (check_switch_goto): New fn.
17993         (define_case_label): Call it.
17994         (check_goto): New fn.
17995         * semantics.c (finish_goto_stmt): Call it and use_label.
17996         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
17997         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
17999 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
18001         * class.c (build_vtable_entry_ref): Correct usage of
18002         get_vtbl_decl_for_binfo.
18004         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
18005         * method.c (implicitly_declare_fn): Not here.
18007 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
18009         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
18010         (CPTI_PTMD_DESC_TYPE): ... here.
18011         (ptmd_desc_type_node): Rename to ...
18012         (ptm_desc_type_node): ... here.
18013         * decl.c: Likewise.
18014         * rtti.c (ptmd_initializer): Rename to ...
18015         (ptm_initializer): ... here.
18016         (sythesize_tinfo_var): Adjust. Deal with pointer to member
18017         function.
18018         (create_tinfo_types): Adjust.
18020 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
18022         Finish implementation of VTTs.
18023         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
18024         CPTI_VTT_PARM_IDENTIFIER.
18025         (vtt_parm_identifier): New macro.
18026         (vtt_parm_type): Likewise.
18027         (BINFO_SUBVTT_INDEX): Likewise.
18028         (BINFO_VPTR_INDEX): Likewise.
18029         (struct lang_decl): Add vtt_parm.
18030         (DECL_VTT_PARM): New macro.
18031         (DECL_USE_VTT_PARM): Likewise.
18032         (DECL_NEEDS_VTT_PARM_P): Likewise.
18033         (get_vtt_name): Declare.
18034         (build_artificial_parm): Likewise.
18035         (fixup_all_virtual_upcast_offsets): Likewise.
18036         (expand_indirect_vtbls_init): Remove.
18037         * call.c (build_new_method_call): Pass the vtt to subobject
18038         constructors and destructors.
18039         * class.c (get_vtt_name): Give it external linkage.
18040         (build_clone): Handle the magic VTT parameters for clones.
18041         (clone_function_decl): Fix typo in comment.
18042         (build_vtt): Keep track of the indices in the VTTs where various
18043         entities are stored.
18044         (build_vtt_inits): Likewise.
18045         (dfs_build_vtt_inits): Likewise.
18046         (build_ctor_vtbl_group): Tweak type of construction vtables.
18047         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
18048         primary bases, when building construction vtables.
18049         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
18050         (initialize_predefined_identifiers): Add vtt_parm_identifier.
18051         (init_decl_processing): Initialize vtt_parm_type.
18052         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
18053         (lang_mark_tree): Make vtt_parm.
18054         * decl2.c (build_artificial_parm): New function.
18055         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
18056         (grokclassfn): Use build_artificial_parm.
18057         * init.c (initialize_vtbl_ptrs): Call
18058         fixup_all_virtual_upcast_offsets directly.
18059         (perform_member_init): Use the complete subobject destructor for
18060         member cleanups.
18061         (build_vtbl_address): New function.
18062         (expand_virtual_init): Handle VTTs.
18063         * optimize (maybe_clone_body): Likewise.
18064         * search.c (fixup_all_virtual_upcast_offsets): Give it external
18065         linkage.
18066         (expand_indirect_vtbls_init): Remove.
18067         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
18068         * tree.c (make_binfo): Make them bigger.
18070 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
18072         * inc/cxxabi.h (__pbase_type_info): Define, based on
18073         __pointer_type_info.
18074         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
18075         (__pointer_to_member_type_info): Likewise.
18076         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
18077         (__pointer_to_member_type_info::__is_pointer_p): Remove.
18078         (__pointer_type_info::__do_catch): Rename to ...
18079         (__pbase_type_info::__do_catch): ... here. Adjust.
18080         (__pbase_type_info::__pointer_catch): Implement.
18081         (__pointer_type_info::__pointer_catch): Adjust.
18082         (__pointer_to_member_type_info::__pointer_catch): Adjust.
18084 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
18086         * tinfo.h (__user_type_info::contained_virtual_p): New
18087         predicate.
18088         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
18089         shaped hierarchy.
18090         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
18091         diamond shaped hierarchy. Add early out for mixed diamond and
18092         duplicate shaped hierarchy.
18094 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
18096         * cp-tree.h (build_delete): Change prototype.
18097         (build_vec_delete): Likewise.
18098         * call.c (build_scoped_method_call): Use special_function_kind
18099         values to indicate the kind of destruction to be done.
18100         (build_method_call): Likewise.
18101         * decl.c (finish_destructor_body): Likewise.
18102         (maybe_build_cleanup_1): Likewise.  Rename to ...
18103         (maybe_build_cleanup): ... this.
18104         * decl2.c (delete_sanity): Use special_function_kind
18105         values to indicate the kind of destruction to be done.
18106         (build_cleanup): Likewise.
18107         * init.c (perform_member_init): Likewise.
18108         (build_vec_delete_1): Likewise.
18109         (build_dtor_call): Simplify.
18110         (build_delete): Use special_function_kind
18111         values to indicate the kind of destruction to be done.
18112         (build_vbase_delete): Likewise.
18113         (build_vec_delete): Likewise.
18115         * init.c (sort_member_init): Fix typo in error message generation
18116         code.
18118 2000-05-15  Donald Lindsay  <dlindsay@cygnus.com>
18120         * semantics.c (begin_class_definition): make the packed
18121         attribute be sensitive to the "-fpack-struct" command line flag
18123 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
18125         Update new-abi upcast algorithm.
18126         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
18127         prototype and meaning of return value.
18128         (__si_class_type_info::__do_upcast): Likewise.
18129         (__vmi_class_type_info::__do_upcast): Likewise.
18130         * tinfo.cc (__class_type_info::__upcast_result): Replace
18131         whole2dst with part2dst. Adjust ctor.
18132         (__class_type_info::__do_upcast): Adjust call of worker function.
18133         (__class_type_info::__do_upcast): Adjust.
18134         (__si_class_type_info::__do_upcast): Adjust. Use parent's
18135         __do_upcast.
18136         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
18137         virtual base in diamond hierarchy bug.
18139 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
18141         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
18142         and bitfield to tinfo_fn_p.
18143         (DECL_TINFO_FN_P): Adjust.
18144         (SET_DECL_TINFO_FN_P): Likewise.
18145         (DECL_MUTABLE_P): Likewise.
18146         (DECL_C_BIT_FIELD): Likewise.
18147         (SET_DECL_C_BIT_FIELD): Likewise.
18148         (CLEAR_DECL_C_BIT_FIELD): Likewise.
18149         (DECL_UNINLINABLE): Likewise.
18150         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
18151         (handle_using_decl): Remove assertion.
18152         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
18153         to build FIELD_DECLs.
18154         (build_base_field): Likewise.
18155         (layout_class_type): Likewise.
18156         * decl.c (init_decl_processing): Likewise.
18157         (build_ptrmemfunc_type): Likewise.
18158         (grokdeclarator): Likewise.
18159         * decl2.c (grok_x_components): Likewise.
18160         * except.c (call_eh_info): Likewise.
18161         * init.c (init_init_processing): Likewise.
18162         * rtti.c (expand_class_desc): Likewise.
18163         (create_pseudo_type_info): Likewise.
18164         (get_vmi_pseudo_type_info): Likewise.
18165         (create_tinfo_types): Likewise.
18166         * ptree.c (print_lang_decl): Adjust.
18167         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
18168         before checking DECL_MUTABLE_P.
18170         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
18171         parameters for template functions.
18172         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
18173         destructors as well as constructors.
18175 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
18177         * class.c (build_ctor_vtbl_group): Set inits.
18178         * optimize.c (maybe_clone_body): Set DECL_INLINE and
18179         DECL_THIS_INLINE appropriately for clones.
18181         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
18182         (DECL_CONV_FN_P): Simplify.
18183         (DECL_OPERATOR): Remove.
18184         (language_to_string): Declare.
18185         * decl.c (duplicate_decls): Fix typo in comment.
18186         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
18187         (grok_op_properties): Use DECL_CONV_FN_P instead of
18188         IDENTIFIER_TYPENAME_P.
18189         * dump.c (dequeue_and_dump): Dump the language linkage of
18190         declarations.
18191         * error.c (language_to_string): Give it external linkage.
18192         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
18193         (implicitly_declare_fn): Set DECL_LANGUAGE.
18194         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
18195         IDENTIFIER_TYPENAME_P.
18196         (tsubst_decl): Likewise.
18197         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
18198         * semantics.c (finish_member_declaration): Don't mark members of
18199         classes declared in an extern "C" region as extern "C".
18201 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
18203         * decl2.c (qualified_lookup_using_namespace): Look through
18204         namespace aliases.
18206         * decl.c (push_using_decl): Return the old decl on namespace level.
18208 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
18210         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
18211         (VTT_NAME_PREFIX): New macro.
18212         (CTOR_VTBL_NAME_PREFIX): Likewise.
18213         (get_ctor_vtbl_name): New function.
18214         * class.c (get_vtable_name): Simplify.
18215         (get_vtt_name): New function.
18216         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
18217         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
18218         when a virtual base becomes primary.
18219         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
18220         VTTs.
18221         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
18222         additional parameters.
18223         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
18224         (initialize_array): New function.
18225         (build_vtt): Likewise.
18226         (build_vtt_inits): Likewise.
18227         (dfs_build_vtt_inits): Likewise.
18228         (dfs_fixup_binfo_vtbls): Likewise.
18229         (build_ctor_vtbl_group): Likewise.
18230         (initialize_vtable): Use initialize_array.
18231         (accumulate_vtbl_inits): Reimplement to handle construction
18232         vtables.
18233         (dfs_accumulate_vtbl_inits): Likewise.
18234         (bulid_vtbl_initializer): Adjust parameter name.
18235         * method.c (build_typename_overload): Remove #if 0'd code.
18236         (get_ctor_vtbl_name): New function.
18237         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
18238         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
18240         * cp-tree.h (struct lang_type): Remove search_slot.
18241         (CLASSTYPE_SEARCH_SLOT): Remove.
18242         (emit_base_init): Change prototype.
18243         (initialize_vtbl_ptrs): Likewise.
18244         (expand_indirect_vtbls_init): Likewise.
18245         (clear_search_slots): Remove.
18246         * decl.c (lang_mark_tree): Don't mark search_slot.
18247         * init.c (initialize_vtbl_ptrs): Simplify.
18248         (emit_base_init): Likewise.
18249         * search.c (struct vbase_info): Document decl_ptr.
18250         (convert_pointer_to_single_level): Remove.
18251         (dfs_find_vbases): Remove.
18252         (dfs_init_base_pointers): Simplify.
18253         (dfs_clear_vbase_slots): Remove.
18254         (dfs_vtable_path_unmark): New function.
18255         (init_vbase_pointers): Simplify.
18256         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
18257         (expand_indirect_vtbls_init): Simplify.  Don't call
18258         mark_all_temps_used.
18259         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
18260         initialize_vtbl_ptrs.
18262 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
18264         * except.c: Add static prototypes.
18266 2000-05-20  H.J. Lu  <hjl@gnu.org>
18268         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
18270 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
18272         Don't create a separate copy of virtual bases for the
18273         CLASSTYPE_VBASECLASSES list.
18274         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
18275         (BINFO_FOR_VBASE): Remove.
18276         (CANONICAL_BINFO): Adjust.
18277         (binfo_for_vbase): New function.
18278         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
18279         instead of BINFO_FOR_VBASE.
18280         (build_vbase_pointer): Likewise.
18281         (build_secondary_vtable): Likewise.
18282         (dfs_mark_primary_bases): Likewise.
18283         (mark_primary_bases): Likewise.
18284         (layout_nonempty_base_or_field): Likewise.
18285         (dfs_set_offset_for_shared_vbases): Likewise.
18286         (dfs_set_offset_for_unshared_vbases): Likewise.
18287         (layout_virtual_bases): Likewise.  Adjust for changes to the
18288         CLASSTYPE_VBASECLASSES list.
18289         (dump_class_hierarchy_r): Use binfo_for_vbase
18290         instead of BINFO_FOR_VBASE.
18291         (dump_class_hierarchy): Likewise.
18292         (finish_vtbls): Likewise.
18293         (build_vtbl_initializer): Adjust for changes to the
18294         CLASSTYPE_VBASECLASSES list.
18295         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
18296         * decl.c (finish_destructor_body): Adjust for changes to the
18297         CLASSTYPE_VBASECLASSES list.
18298         * init.c (sort_base_init): Use binfo_for_vbase.
18299         (construct_virtual_bases): Adjust for changes to the
18300         CLASSTYPE_VBASECLASSES list.
18301         (expand_member_init): Use binfo_for_vbase.
18302         (build_vbase_delete):  Adjust for changes to the
18303         CLASSTYPE_VBASECLASSES list.
18304         * method.c (do_build_copy_constructor): Likewise.
18305         * rtti.c (get_base_offset): Use binfo_for_vbase.
18306         (expand_class_desc): Remove #if 0'd code.
18307         * search.c (struct vbase_info): Remove vbase_types.
18308         (get_base_distance):  Use binfo_for_vbase.
18309         (lookup_field_queue_p): Use CANONICAL_BINFO.
18310         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
18311         (get_pure_virtuals): Adjust for changes to the
18312         CLASSTYPE_VBASECLASSES list.
18313         (dfs_find_vbases): Use binfo_for_vbase.
18314         (dfs_init_vbase_pointers): Likewise.
18315         (init_vbase_pointers): Don't initialize vi.vbase_types.
18316         (virtual_context): Use binfo_for_vbase.
18317         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
18318         CLASSTYPE_VBASECLASSES list.
18319         (expand_indirect_vtbls_init): Simplify.
18320         (dfs_get_vbase_types): Don't replicate virtual bases.
18321         (find_vbase_instance): Use binfo_for_vbase.
18322         (binfo_for_vbase): New function.
18323         * typeck.c (get_delta_difference): Use binfo_for_vbase.
18325 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
18327         * decl2.c (finish_anon_union): Generalize error messages to handle
18328         anonymous structures.
18329         * init.c (perform_member_init): Remove `name' parameter.
18330         (build_field_list): New function.
18331         (sort_member_init): Handle anonymous union initialization order
18332         correctly.  Check for multiple initializations of the same union.
18333         (emit_base_init): Don't look up fields by name here.
18334         (expand_member_init): Record the result of name lookup for future
18335         reference.
18336         * typeck.c (build_component_ref): Fix formatting.
18338 2000-05-17  Andrew Cagney  <cagney@b1.cygnus.com>
18340         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
18341         * typeck.c (build_x_compound_expr): Replace warn_unused with
18342         warn_unused_value.
18344         * decl2.c (lang_decode_option): Update -Wall unused flags by
18345         calling set_Wunused.
18347 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
18349         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
18350         * init.c (dfs_vtable_path_unmark): Remove.
18351         * search.c (marked_new_vtable_p): Likewise.
18352         (unmarked_new_vtable_p): Likewise.
18353         (dfs_search_slot_nonempty_p): Likewise.
18354         (dfs_mark): Likewise.
18355         (dfs_vtable_path_unmark): Likewise.
18356         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
18357         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
18358         (dfs_init_vbase_pointers): Remove special-case new ABI code.
18359         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
18360         (init_vbase_pointers): Simplify.
18361         (expand_indirect_vtbls_init): Likewise.
18363         * class.c (copy_virtuals): New function.
18364         (build_primary_table): Use it.
18365         (build_secondary_vtable): Likewise.
18366         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
18367         indicate that no vcall offset is required.
18368         (add_virtual_function): Likewise.
18369         (modify_all_vtables): Likewise.
18370         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
18371         (dfs_accumulate_vtbl_inits): Likewise.
18372         (build_vtbl_initializer): Make changes to handle construction
18373         vtables.
18374         (dfs_build_vcall_offset_vtbl_entries): Likewise.
18375         (build_rtti_vtbl_entries): Likewise.
18376         (build_vtable_entries): Handle a NULL vcall_index.
18378 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
18380         * decl2.c (lang_decode_option): Fix thinko.
18382 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
18384         * except.c (check_handlers): New fn.
18385         * cp-tree.h: Declare it.
18386         * semantics.c (finish_handler_sequence): Call it.
18387         (finish_function_handler_sequence): Likewise.
18388         (finish_handler_parms): Set TREE_TYPE on the handler.
18389         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
18390         * search.c (get_base_distance_recursive): If protect>1, ignore
18391         special access.
18392         (get_base_distance): Don't reduce watch_access.
18394 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
18396         * lex.c: #include diagnostic.h.
18397         (lang_init_options): Set default prefixing rules.
18399         * lang-options.h: Add -fdiagnostics-show-location=.
18401         * decl2.c: #include diagnostic.h.
18402         (lang_decode_option): Handle -fdiagnostics-show-location=.
18404 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
18406         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
18407         * vec.cc: Revert my 2000-05-07 change.
18409 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
18411         * class.c (check_field_decls): Complain about non-static data
18412         members with same name as class in class with constructor.
18414 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
18416         * decl.c (grokdeclarator): Allow non-static data members with
18417         same name as class.
18419 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
18421         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
18422         and pending_inline.filename.  Update prototypes.
18423         * decl.c (define_label): Constify filename parameter.
18424         * decl2.c (warn_if_unknown_interface): Constify local char *.
18425         * input.c Constify input_source.filename. Don't declare
18426         input_filename or lineno.  Constify filename parameter to feed_input.
18427         * lex.c (init_parse): Constify parameter and return value.
18428         (cp_pragma_interface, cp_pragma_implementation): Constify
18429         filename argument.
18430         (reinit_parse_for_method, reinit_parse_for_block,
18431         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
18432         Constify local char *.
18433         * pt.c: Don't declare lineno or input_filename.
18434         (print_template_context, tsubst_friend_function, tsubst_decl,
18435         tsubst, instantiate_decl): Constify local char *.
18436         * semantics.c (expand_body): Constify local char *.
18437         * tree.c (build_srcloc): Constify filename parameter.
18438         * typeck.c (c_expand_asm_operands): Constify filename
18439         parameter.
18441 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
18443         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
18444         offsetof expansion.
18446 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
18448         * inc/cxxabi.h:  Fix typos in comment.
18449         (__base_class_info::__offset): Use a static_cast.
18451 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
18453         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
18454         of std::size_t and std::ptrdiff_t respectively.
18455         * tinfo.cc: Likewise.
18456         * vec.cc: Likewise.
18458 2000-05-06  Richard Henderson  <rth@cygnus.com>
18460         * typeck.c (build_c_cast): Don't warn integer->pointer size
18461         mismatch for constants.
18463 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
18465         * rtti.c (ptmd_initializer): Set non-public, if class is
18466         incomplete.
18468         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
18469         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
18470         __cxa_vec_delete): Likewise.
18471         * tinfo.cc (__dynamic_cast): Likewise.
18472         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
18473         __cxa_vec_delete): Likewise.
18475 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
18477         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
18478         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
18479         (lang_decl_flags): Add vcall_offset.
18480         (THUNK_VCALL_OFFSET): Use it.
18481         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
18482         * method.c (make_thunk): Create the lang_decl here, not in
18483         emit_thunk.
18484         (emit_thunk): Make generic thunks into ordinary functions once
18485         they have been fed to expand_body.
18486         * semantics.c (expand_body): Set current_function_is_thunk here.
18488 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18490         * class.c (update_vtable_entry_for_fn): Prototype.
18492         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
18493         and `tmpl'.
18495         * search.c (dfs_build_inheritance_graph_order): Prototype.
18497 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
18499         * cp-tree.h (special_function_kind): Add various kinds of
18500         destructors.
18501         (special_function_p): New function.
18502         * class.c (overrides): Don't let one kind of destructor override
18503         another.
18504         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
18505         whether or not to instantiate a template.
18506         * tree.c (special_function_p): Define.
18508 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
18510         * cp-tree.def (THUNK_DECL): Remove.
18511         * cp-tree.h (DECL_THUNK_P): New macro.
18512         (DECL_NON_THUNK_FUNCTION_P): Likewise.
18513         (DECL_EXTERN_C_FUNCTION_P): Likewise.
18514         (SET_DECL_THUNK_P): Likewise.
18515         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
18516         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
18517         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
18518         * decl.c (decls_match): Use DECL_EXTERN_C_P.
18519         (duplicate_decls): Likewise.
18520         (pushdecl): Likewise.  Adjust thunk handling.
18521         (grokfndecl): Use DECL_EXTERN_C_P.
18522         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
18523         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
18524         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
18525         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
18526         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
18527         DECL_NO_STATIC_CHAIN.
18528         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
18529         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
18530         * search.c (covariant_return_p): Remove THUNK_DECL handling.
18531         * ir.texi: Update.
18533 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
18535         * tree.c (walk_tree): Set lineno.
18537 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
18539         * exception.cc: Update license notice.
18540         * new.cc: Likewise.
18541         * new1.cc: Likewise.
18542         * new2.cc: Likewise.
18543         * tinfo.cc: Likewise.
18544         * tinfo2.cc: Likewise.
18545         * vec.cc: Likewise.
18546         * inc/cxxabi.h: Likewise.
18547         * inc/exception: Likewise.
18548         * inc/new: Likewise.
18549         * inc/new.h: Likewise.
18550         * inc/typeinfo: Likewise.
18552 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
18554         * tree.c (build_target_expr_with_type): If we already have a
18555         TARGET_EXPR, just return it.
18557         * optimize.c (initialize_inlined_parameters): Don't generate an
18558         EXPR_STMT if we can just use DECL_INITIAL.
18559         * decl.c (emit_local_var): Only make the initialization a
18560         full-expression if stmts_are_full_exprs_p.
18562 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
18564         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
18565         macro.
18566         * call.c (standard_conversion): Use it.
18567         (direct_reference_binding): Likewise.
18568         (build_over_call): Likewise.
18569         (is_properly_derived_from): Likewise.
18570         (compare_ics): Likewise.
18571         * class.c (resolves_to_fixed_type_p): Likewise.
18572         * optimize.c (declare_return_variable): Likewise.
18573         * pt.c (is_specialization_of): Likewise.
18574         (unify): Likewise.
18575         * typeck.c (comp_target_parms): Likeiwse.
18576         (build_static_cast): Likewise.
18577         (build_reinterpret_cast): Likewise.
18578         (build_const_cast): Likewise.
18579         (comp_ptr_ttypes_real): Likewise.
18580         (comp_ptr_ttypes_const): Likewise.
18581         * typeck2.c (process_init_constructor): Likewise.
18583 2000-04-30  Scott Snyder <snyder@fnal.gov>
18585         * decl.c (finish_destructor_body): Use the base destructor when
18586         destroying virtual bases.
18588 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
18590         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
18591         STMT_EXPRs.
18592         * optimize.c (struct inline_data): Add target_exprs field.
18593         (declare_return_variable): When a function returns an aggregate,
18594         use the variable declared in the TARGET_EXPR as the remapped
18595         DECL_RESULT.
18596         (expand_call_inline): Update the pending target_exprs stack.
18597         (optimize_function): Initialize the stack.
18599         * decl2.c (finish_file): Fix typo in comment.
18601         * method.c (emit_thunk): Don't try to return a `void' value.
18603         * optimize.c (initialize_inlined_parameters): If the parameter is
18604         addressable, we need to make a new VAR_DECL, even if the
18605         initializer is constant.
18607 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
18609         * decl.c (grok_op_properties): Add an extra check of argtypes.
18611 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
18613         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
18614         variables.
18615         (initialize_inlined_parameters): Try to avoid creating new
18616         VAR_DECLs.
18618 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
18620         * lex.c (my_get_run_time): Remove.
18621         (init_filename_times): Use get_run_time instead of my_get_run_time.
18622         (check_newline): Likewise.
18623         (dump_time_statistics): Likewise.
18624         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
18625         of computing elapsed time explicitly.
18627 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
18629         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
18630         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
18631         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
18632         before calling decl_constant_value.
18633         * class.c (check_bitfield_decl): Likewise.
18634         * cvt.c (ocp_convert): Likewise.
18635         (convert): Likewise.
18636         * decl.c (compute_array_index_type): Likewise.
18637         (build_enumerator): Likewise.
18638         * decl2.c (check_cp_case_value): Likewise.
18639         * pt.c (convert_nontype_argument): Likewise.
18640         (tsubst): Likewise.
18641         * typeck.c (decay_conversion): Likewise.
18642         (build_compound_expr): Likewise.
18643         (build_reinterpret_cast): Likewise.
18644         (build_c_cast): Likewise.
18645         (convert_for_assignment): Likewise.
18647 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
18649         * decl.c (finish_function): Don't play games with DECL_INLINE.
18651 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
18653         * ir.texi: Correct typo.
18655 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
18657         * decl.c (grokdeclarator): Reject VLAs as members.
18659 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
18661         * call.c (standard_conversion): Accept conversion between
18662         COMPLEX_TYPEs.
18664         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
18666 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
18668         * decl2.c (finish_file): Remove double setup for accounting
18669         compile time.
18671 2000-04-24  Robert Lipe <robertlipe@usa.net>
18673         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
18675 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
18677         * new.cc (set_new_handler): Needs to be in std::.
18679 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
18681         * cp-tree.h (lang_decl): Remove pretty_function_p.
18682         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
18683         language-specific node.
18684         * decl.c (cp_make_fname_decl): Use build_decl, not
18685         build_lang_decl, to build the variables.
18686         (grokvardecl): Don't call build_lang_decl for local variables in
18687         templates.
18688         (grokdeclarator): Don't call build_lang_decl for local type
18689         declarations in templates.
18690         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
18691         zero'd memory, rather than calling memset.
18692         * pt.c: Include hashtab.h.
18693         (local_specializations): New variable.
18694         (retrieve_local_specialization): Use it.
18695         (register_local_specialization): Likewise.
18696         (tsubst_decl): Don't assume local variables have
18697         DECL_LANG_SPECIFIC.
18698         (instantiate_decl): Set up local_specializations.
18699         * Makefile.in (HTAB_H): New variable.
18701 2000-04-23  Richard Henderson  <rth@cygnus.com>
18703         * typeck.c (c_expand_asm_operands): Restore the original
18704         contents of the output list.
18706 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
18708         * ir.texi:  Document complex number representation.
18710 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
18712         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
18713         (target_incomplete_p): New function.
18714         (tinfo_base_init): Create comdat NTBS name variable.
18715         (ptr_initializer): Add non_public parameter. Calculate it.
18716         (ptmd_initializer): Likewise.
18717         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
18718         (create_real_tinfo_var): Add non_public parameter. Use it.
18719         Push proxy into global namespace.
18720         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
18721         New enumeration.
18722         * inc/typeinfo (type_info::before, type_info::operator==):
18723         Compare __name addresses.
18725         * tinfo2.cc: Remove new-abi builtins comment.
18727 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
18729         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
18731         * call.c (joust): Exit early if we get the same function, too.
18733         * decl2.c (key_method): Return NULL_TREE for template classes.
18734         (import_export_class): Don't need to check for template classes.
18736 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
18738         * lex.c: Remove references to cccp.c.
18740 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
18742         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
18743         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
18744         (DECL_DESTRUCTOR_P): Use destructor_attr.
18745         (DECL_CONST_MEMFUNC_P): Reimplement.
18746         (DECL_VOLATILE_MEMFUNC_P): Remove.
18747         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
18748         (overrides): Use DECL_DESTRUCTOR_P.
18749         (check_for_override): Likewise.
18750         * decl.c (start_function): Likewise.
18751         * decl2.c (grokfclassfn): Likewise.
18752         (check_classfn): Likewise.
18753         (grok_function_init): Likewise.
18755 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
18757         * decl2.c (grokfield): Issue error on illegal data member
18758         declaration.
18760 2000-04-17  Mark P Mitchell  <mark@codesourcery.com>
18762         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
18764 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
18766         * class.c (build_vtable_entry): Don't build thunks for type-info
18767         functions.
18769 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
18771         * decl.c (decls_match): Allow a redeclaration of a builtin to
18772         specify args while the builtin did not.
18774 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
18776         * cp-tree.def (THUNK_DECL): Add to documentation.
18777         * cp-tree.h (flag_huge_objects): Declare.
18778         * class.c (modify_vtable_entry): Tidy.
18779         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
18780         Calculate delta appropriately for the new ABI.
18781         (dfs_modify_vtables): Use it.
18782         (modify_all_vtables): Fix thinko in code to add overriding copies
18783         of functions to primary vtables.
18784         (build_clone): Fix typo in comment.
18785         (clone_function_decl): Correct order of destructors in vtable.
18786         (build_vbase_offset_vtbl_entries): Adjust comment.
18787         (dfs_vcall_offset_queue_p): Remove.
18788         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
18789         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
18790         (build_vtable_entry): Correct check for pure virtual functions.
18791         Don't declare flag_huge_objects.
18792         * decl.c (flag_huge_objects): Remove declaration.
18793         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
18794         Use int_size_in_bytes.
18795         (emit_thunk): Handle vcall offset thunks.
18797 2000-04-15  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
18799         * decl2.c (parse_time, varconst_time): Delete declarations.
18800         (finish_file): Delete LINENO declaration.
18801         START_TIME and THIS_TIME now long.
18803 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
18805         * class.c (build_base_field): Reformat comment.
18807         * inc/cxxabi.h (stddef.h): Comment inclusion.
18808         (__base_class_info::__offset): Comment shift.
18810 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
18812         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
18813         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
18814         (cp_push_exception_identifier): New macro.
18815         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
18816         (DECL_BASE_DESTRUCTOR_P): Likewise.
18817         (DECL_DELETING_DESTRUCTOR_P): Likewise.
18818         (get_vtbl_decl_for_binfo): Fix formatting.
18819         (in_charge_arg_for_name): New macro.
18820         (maybe_build_cleanup_and_delete): Remove declaration.
18821         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
18822         (in_charge_arg_for_name): New function.
18823         (build_new_method_call): Use it.  Handle cloned destructors.
18824         (build_clone): Don't make the base constructor virtual.
18825         Automatically defer generated functions.
18826         (clone_function_decl): Handle destructors, too.
18827         (clone_constructors_and_destructors): Likewise.
18828         (create_vtable_ptr): Don't create a vtable entry for a cloned
18829         function.
18830         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
18831         (initialize_predefined_identifiers): Update appropriately.
18832         (finish_destructor_body): Simplify.
18833         (maybe_build_cleanup_and_delete): Remove.
18834         * except.c (expand_throw): Handle new-ABI destructors.
18835         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
18836         (build_dtor_call): New function.
18837         (build_delete): Use it.  Simplify.
18838         * optimize.c (maybe_clone_body): Handle destructors.
18839         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
18841         * exception.cc (cleanup_fn): New typedef.
18842         (CALL_CLEANUP): New macro.
18843         (cp_eh_info): Use them.
18844         (__cp_push_exception): Likewise.
18845         (__cp_pop_exception): Likewise.
18847 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
18849         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
18850         (complete_dtor_identifier): New macro.
18851         (CLASSTYPE_FIRST_CONVERSION): Remove.
18852         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
18853         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
18854         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
18855         (CLASSTYPE_CONSTRUCTORS): Likewise.
18856         (CLASSTYPE_DESTRUCTORS): Likewise.
18857         (lang_decl): Add cloned_function.
18858         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
18859         (DECL_BASE_CONSTRUCTOR_P): Likewise.
18860         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
18861         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
18862         (DECL_CLONED_FUNCTION_P): Likewise.
18863         (DECL_CLONED_FUNCTION): Likewise.
18864         (clone_function_decl): Declare.
18865         (maybe_clone_body): Likewise.
18866         * call.c (build_user_type_conversion_1): Call complete object
18867         constructors in the new ABI.
18868         (build_new_method_call): Don't add in-charge parameters under the
18869         new ABI.
18870         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
18871         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
18872         CLASSTYPE_DESTRUCTOR_SLOT.
18873         (build_clone): New function.
18874         (clone_function_decl): Likewise.
18875         (clone_constructors_and_destructors): Likewise.
18876         (check_bases_and_members): Use it.
18877         * decl.c (iniitialize_predefined_identifiers): Initialize
18878         complete_dtor_identifier.
18879         (finish_function): Don't add extra code to a clone.
18880         (lang_mark_tree): Mark cloned_function.
18881         * decl2.c (mark_used): Don't bother trying to instantiate things
18882         we synthesized.
18883         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
18884         * method.c (set_mangled_name_for_decl): Don't treat clones as
18885         constructors.
18886         (synthesize_method): Sythesize cloned functions, not the clones.
18887         * optimize.c (inline_data): Update comment on ret_label.
18888         (remap_block): Don't assume DECL_INITIAL exists.
18889         (copy_body_r): Allow ret_label to be NULL.
18890         (maybe_clone_body): Define.
18891         * pt.c (tsubst_decl): Handle clones.
18892         (instantiate_clone): New function.
18893         (instantiate_template): Use it.
18894         (set_mangled_name_for_template_decl): Don't treat clones as
18895         constructors.
18896         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
18897         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
18898         * semantics.c (expand_body): Clone function bodies as necessary.
18900         * optimize.c (remap_decl): Avoid sharing structure for arrays
18901         whose size is only known at run-time.
18902         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
18904         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
18905         to has_in_charge_parm_p.
18906         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
18907         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
18908         (DECL_COPY_CONSTRUCTOR_P): New macro.
18909         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
18910         (build_user_type_conversion_1): Likewise.
18911         (convert_like_real): Likewise.
18912         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
18913         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
18914         (copy_args_p): Likewise.
18915         (grok_ctor_properties): Likewise.
18916         (start_function): Likewise.
18917         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
18918         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
18919         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
18920         * method.c (do_build_copy_constructor): Use
18921         DECL_HAS_IN_CHARGE_PARM_P.
18922         (synthesize_method): Likewise.
18923         * pt.c (instantiate_template): Remove goto.
18924         * tree.c (build_cplus_method_type): Remove mention of obstacks in
18925         comment.
18927         * cp-tre.h (finish_function): Change prototype.
18928         * decl.c (end_cleanup_fn): Adjust caller.
18929         (finish_function): Take only one parameter.
18930         * decl2.c (finish_objects): Adjust caller.
18931         (finish_static_storage_duration_function): Likewise.
18932         * method.c (emit_thunk): Likewise.
18933         * parse.y: Likewise.
18934         * parse.c: Regenerated.
18935         * pt.c (instantiate_decl): Likewise.
18936         * rtti.c (synthesize_tinfo_fn): Likewise.
18937         * semantics.c (expand_body): Likewise.
18939         * cp-tree.h (copy_decl): New function.
18940         * class.c (finish_struct_1): Use it.
18941         * lex.c (copy_decl): Define it.
18942         * pt.c (tsubst_decl): Likewise.
18943         * tree.c (copy_template_template_parm): Likewise.
18945         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
18946         has_nonpublic_assign_ref.
18947         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
18948         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
18949         * class.c (finish_struct_methods): Don't set
18950         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
18951         (interface_only): Don't declare.
18952         (interface_unknown): Likewise.
18954 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
18956         * tree.h (HAVE_TEMPLATES): Remove definition.
18957         * lang-options.h (-fthis-is-variable): Remove documentation.
18959 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
18961         * class.c (instantiate_type): Handle object-relative template-id.
18963         * semantics.c (finish_expr_stmt): Call convert_to_void here.
18964         * decl.c (cplus_expand_expr_stmt): Not here.
18966         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
18967         Initialize exprtype earlier.
18969         * parse.y (fn.def1): Check for defining types in return types.
18971         * decl.c (check_tag_decl): Notice extra fundamental types.
18972         Diagnose empty decls in classes, too.
18974         * decl.c (grokdeclarator): Don't override an anonymous name if no
18975         declarator was given.
18977         * cvt.c (convert_to_void): Call resolve_offset_ref.
18979         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
18981         * decl2.c (decl_namespace): Handle getting a type.
18983         * typeck.c (build_c_cast): Re-enable warning for cast between
18984         pointer and integer of different size.
18986 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
18988         * inc/cxxabi.h (__pointer_type_info): Add restrict and
18989         incomplete flags.
18990         (__pointer_type_info::__pointer_catch): New virtual function.
18991         (__pointer_to_member_type_info): Derive from
18992         __pointer_type_info. Adjust.
18993         (__pointer_to_member_type_info::__do_catch): Remove.
18994         (__pointer_to_member_type_info::__is_pointer_p): Declare.
18995         (__pointer_to_member_type_info::__pointer_catch): Declare.
18996         * rtti.c (qualifier_flags): Add restrict flag.
18997         (ptmd_initializer): Reorder members.
18998         (create_tinfo_types): Expand comments. Reorder
18999         ptmd_desc_type_node members.
19000         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
19001         Implement.
19002         (__pointer_type_info::__do_catch): Move specific code into
19003         __pointer_catch. Call it.
19004         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
19005         specific catch checking. Fix void conversion check.
19006         (__pointer_to_member_type_info::__do_catch): Remove.
19007         (__pointer_to_member_type_info::__pointer_catch): Implement.
19009 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
19011         * lex.c (init_parse): Remove traces of classof and headof.
19012         * decl2.c (flag_operator_names): Default to 1.
19013         (lang_decode_option): Do not set it for -ansi.
19015 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
19017         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
19018         (DECL_MAIN_VARIANT): Remove.
19019         * decl.c (duplicate_decls): Don't set it.
19020         (start_function): Likewise.
19021         (lang_mark_tree): Don't mark it.
19022         * decl2.c (defer_fn): Don't use it.
19023         * lex.c (retrofit_lang_decl): Don't set it.
19024         * pt.c (tsubst_decl): Likewise.
19025         * ptree.c (print_lang_decl): Don't print it.
19026         * typeck.c (mark_addressable): Don't use it.
19028 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
19030         * vec.cc: Include <new> and <exception>.
19031         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
19032         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
19033         terminate.
19034         (__cxa_vec_delete): Catch dtor exceptions.
19036 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
19038         Prepend __ to implementation defined names.
19039         * inc/typeinfo (type_info): Rename _name to __name.
19040         (type_info::type_info): Rename parameter.
19041         (type_info::operator==, type_info::operator!=,
19042         type_info::before): Likewise.
19043         (type_info::is_pointer_p, type_info::is_function_p,
19044         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
19045         parameters.
19046         * inc/cxxabi.h
19047         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
19048         (__pointer_type_info::__pointer_type_info): Likewise.
19049         (__pointer_type_info::is_pointer_p,
19050         __pointer_type_info::do_catch): Prepend __. Rename parameters.
19051         (__array_type_info::__array_type_info): Rename parameters.
19052         (__function_type_info::__function_type_info): Likewise.
19053         (__function_type_info::is_function_p): Prepend __.
19054         (__enum_type_info::__enum_type_info): Rename parameters.
19055         (__pointer_to_member_type_info::__pointer_to_member_type_info):
19056         Likewise.
19057         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
19058         parameters.
19059         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
19060         (__class_type_info::__class_type_info): Rename parameters.
19061         (__class_type_info::sub_kind): Prepend __. Adjust member names.
19062         (__class_type_info::upcast_result,
19063         __class_type_info::dyncast_result): Prepend __. Move definition
19064         into tinfo.cc.
19065         (__class_type_info::do_upcast, __class_type_info::do_catch,
19066         __class_type_info::find_public_src,
19067         __class_type_info::do_dyncast,
19068         __class_type_info::do_find_public_src): Prepend __. Rename
19069         parameters.
19070         (__si_class_type_info::__si_class_type_info): Rename parameters.
19071         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
19072         __si_class_type_info::do_find_public_src): Prepent __. Rename
19073         parameters.
19074         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
19075         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
19076         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
19077         parameters.
19078         (__dynamic_cast): Rename parameters.
19079         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
19080         type_info::do_catch, type_info::do_upcast): Prepend __.
19081         (contained_p, public_p, virtual_p, contained_public_p,
19082         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
19083         (__class_type_info::do_catch,
19084         __class_type_info::do_upcast): Prepend __. Adjust.
19085         (__class_type_info::__upcast_result,
19086         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
19087         Adjust.
19088         (__class_type_info::find_public_src): Prepend __. Adjust.
19089         (__class_type_info::do_find_public_src,
19090         __si_class_type_info::do_find_public_src,
19091         __vmi_class_type_info::do_find_public_src): Likewise.
19092         (__class_type_info::do_dyncast,
19093         __si_class_type_info::do_dyncast,
19094         __vmi_class_type_info::do_dyncast): Likewise.
19095         (__class_type_info::do_upcast,
19096         __si_class_type_info::do_upcast,
19097         __vmi_class_type_info::do_upcast): Likewise.
19098         (__dynamic_cast): Adjust.
19099         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
19100         (__function_type_info::is_function_p): Likewise.
19101         (__pointer_type_info::do_catch): Likewise. Adjust.
19102         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
19103         (__throw_type_match_rtti_2): Adjust.
19104         (__is_pointer): Adjust.
19106 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
19108         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
19109         (complete_ctor_identifier): New macro.
19110         (special_function_kind): Add sfk_copy_constructor and
19111         sfk_assignment_operator.
19112         (LOOKUP_HAS_IN_CHARGE): Remove.
19113         (cons_up_default_function): Rename to ...
19114         (implicitly_declare_fn): ... this.
19115         * call.c (build_new_method_call): Add in-charge parameters for
19116         constructors here.
19117         * class.c (add_implicitly_declared_members): Change parameter name
19118         from cant_have_assignment to cant_have_const_assignment.
19119         Replace calls to cons_up_default_function to implicitly_declare_fn.
19120         * cvt.c (ocp_convert): Use complete_ctor_identifier.
19121         * decl.c (initialize_predefined_identifiers): Initialize it.
19122         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
19123         complex expression.
19124         * init.c (expand_default_init): Don't calculate the in-charge
19125         parameter here.
19126         (build_new_1): Likewise.
19127         * lex.c (cons_up_default_function): Move to method.c.
19128         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
19129         (implicitly_declare_fn): New function.
19130         * typeck.c (build_static_cast): Use complete_ctor_identifier.
19131         (build_modify_expr): Likewise.
19132         * typeck2.c (build_functional_cast): Likewise.
19134         Under the new ABI, constructors don't return `this'.
19135         * cp-tree.h (warn_reorder): Declare.
19136         (special_function_kind): New enum.
19137         (global_base_init_list): Remove declaration.
19138         (emit_base_init): Don't return a value.
19139         (check_base_init): Don't declare.
19140         (is_aggr_typedef): Likewise.
19141         * decl.c (check_special_function_return_type): New function.
19142         (return_types): Remove.
19143         (grokdeclarator): Use check_special_function_return_type.
19144         (start_function): Don't initialize ctor_label under the new ABI.
19145         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
19146         * init.c (begin_init_stmts): Move to top of file.
19147         (finish_init_stmts): Likewise.
19148         (warn_reorder): Don't declare.
19149         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
19150         value.
19151         (check_base_init): Remove.
19152         (is_aggr_typedef): Likewise.
19153         (build_new_1): Don't use the return value of a constructor.
19154         * semantics.c (setup_vtbl_ptr): Don't use the return value
19155         of emit_base_init.
19156         * typeck.c (check_return_expr): Don't magically convert return
19157         statements into `return this' in constructors under the new ABI.
19159         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
19160         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
19161         (base_ctor_identifier): New macro.
19162         (base_dtor_identifier): Likewise.
19163         (deleting_dtor_identifier): Likewise.
19164         * decl.c: Don't include obstack.h.
19165         (obstack_chunk_alloc): Don't define.
19166         (obstack_chunk_free): Likewise.
19167         (struct predefined_identifier): New type.
19168         (initialize_predefined_identifiers): New function.
19169         (init_decl_processing): Use it.
19170         (debug_temp_inits): Remove.
19171         (start_method): Don't call preserve_data.
19172         (hack_incomplete_structures): Update comment.
19173         * init.c (init_init_processing): Don't initialize
19174         nelts_identifier.
19175         (build_offset_rf): Remove dead code.
19176         (build_delete): Use CLASSTYPE_N_BASECLASSES.
19177         * search.c (init_search_processing): Don't initialize
19178         vptr_identifier.
19180 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
19182         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
19183         some sign_compare warnings.
19185 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
19187         Rename abi::__vmi_class_type_info members.
19188         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
19189         base_list, detail_masks members to vmi_flags, vmi_base_count,
19190         vmi_bases and vmi_flags_masks respectively.
19191         (__vmi_class_type_info::vmi_flags_masks): Rename
19192         details_unknown_mask to flags_unknown_mask.
19193         * tinfo.cc (__class_type_info::do_upcast): Adjust.
19194         (__vmi_class_type_info::do_find_public_src): Adjust.
19195         (__vmi_class_type_info::do_dyncast): Adjust.
19196         (__vmi_class_type_info::do_upcast): Adjust.
19198 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
19200         * tinfo.cc (convert_to_base): New function.
19201         (get_vbase_offset): Remove. Move into convert_to_base.
19202         (__vmi_class_type_info::do_find_public_src): Adjust.
19203         (__vmi_class_type_info::do_dyncast): Adjust.
19204         (__vmi_class_type_info::do_upcast): Adjust.
19206 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
19208         * tinfo.cc (operator=): Use __builtin_strcmp.
19209         * tinfo2.cc (before): Likewise.
19211 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
19213         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
19214         (DECL_SAVED_INLINE): Rename to ...
19215         (DECL_DEFERRED_FN): ... this.
19216         (in_function_p): Remove declaration.
19217         (mark_inline_for_output): Rename to ...
19218         (defer_fn): ... this.
19219         * decl.c (finish_function): Adjust call to mark_inline_for_output.
19220         (in_function_p): Remove definition.
19221         * decl2.c (saved_inlines): Rename to ...
19222         (deferred_fns): ... this.
19223         (saved_inlines_used): Rename to ...
19224         (deferred_fns_used): ... this.
19225         (mark_inline_for_output): Rename to ...
19226         (defer_fn): ... this.
19227         (finish_file): Adjust accordingly.
19228         (init_decl2): Likewise.
19229         * lex.c (cons_up_default_function): Likewise.
19230         * pt.c (mark_decl_instantiated): Likewise.
19231         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
19232         circumstances.
19233         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
19234         * semantics.c (expand_body): Defer more functions.
19236 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
19238         * vec.cc: New file.
19239         * Make-lang.in (CXX_LIB2FUNCS): Add it.
19240         (vec.o): Build it.
19241         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
19242         __cxa_vec_delete): Declare.
19244 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
19246         * rtti.c (dfs_class_hint_mark): New static function.
19247         (dfs_class_hint_unmark): New static function.
19248         (class_hint_flags): Use them.
19250 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
19252         * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
19254 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
19256         * cp-tree.h (instantiate_decl): Change prototype.
19257         * decl2.c (mark_used): Adjust call.
19258         * optimize.c (inlinable_function_p): Adjust handling of templates.
19259         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
19260         (do_type_instantiation): Likewise.
19261         (instantiate_decl): Defer more templates.
19262         (instantiate_pending_templates): Adjust logic to handle inline
19263         friend functions.
19265         * Makefile.in (GGC_H): New variable.  Use it throughout in place
19266         of ggc.h.
19268         * call.c: Don't include obstack.h.  Include ggc.h.
19269         (obstack_chunk_alloc): Don't define.
19270         (obstack_chunk_free): Likewise.
19271         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
19272         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
19273         (pop_switch): Free it.
19275         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
19277         * dump.c (dequeue_and_dump): Don't try to print the bit_position
19278         if we don't have a DECL_FIELD_OFFSET.
19280 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
19282         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
19283         special_function_p.
19285 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
19287         * cfns.gperf (hash, libc_name_p): Prototype.
19289         * rtti.c (build_dynamic_cast_1): Constification.
19291         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
19293         * semantics.c (deferred_type_access_control): Prototype.
19295 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
19297         Correct many new ABI issues regarding vbase and vcall offset
19298         layout.
19299         * cp-tree.h (BINFO_VTABLE): Document.
19300         (struct lang_type): Tweak formatting.
19301         (BINFO_PRIMARY_BINFO): Add to documentation.
19302         (CLASSTYPE_VSIZE): Fix typo in comment.
19303         (CLASSTYPE_VBASECLASSES): Update documentation.
19304         (BINFO_VBASE_MARKED): Remove.
19305         (SET_BINFO_VBASE_MARKED): Likewise.
19306         (CLEAR_BINFO_VBASE_MARKED): Likewise.
19307         (BINFO_FIELDS_MARKED): Remove.
19308         (SET_BINFO_FIELDS_MARKED): Likewise.
19309         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
19310         (enum access_kind): New enumeration.
19311         (num_extra_vtbl_entries): Remove declaration.
19312         (size_extra_vtbl_entries): Likewise.
19313         (get_vtbl_decl_for_binfo): New function.
19314         (dfs_vbase_unmark): Remove declaration.
19315         (mark_primary_bases): Likewise.
19316         * class.c (SAME_FN): Remove.
19317         (struct vcall_offset_data_s): Move definition.
19318         (build_vbase_pointer): Use `build', not `build_binary_op', to
19319         access the vbase pointer under the new ABI.
19320         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
19321         (build_primary_vtable): Likewise.
19322         (dfs_mark_primary_bases): Move here from search.c.
19323         (mark_primary_bases): Likewise.
19324         (determine_primary_bases): Under the new ABI, don't make a base
19325         class a primary base just because we don't yet have any virtual
19326         functions.
19327         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
19328         (num_vfun_entries): Remove.
19329         (dfs_count_virtuals): Likewise.
19330         (num_extra_vtbl_entries): Likewise.
19331         (size_extra_vtbl_entries): Likewise.
19332         (layout_virtual_bases): Iterate in inheritance graph order under
19333         the new ABI.
19334         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
19335         indicate that a vfield is present.
19336         (init_class_processing): Initialize access_public_node, etc., from
19337         ak_public, etc.
19338         (get_vtbl_decl_for_binfo): New function.
19339         (dump_class_hierarchy_r): Likewise.
19340         (dump_class_hierarchy): Use it.
19341         (finish_vtbls): Build the vtbls in inheritance graph order.
19342         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
19343         (initialize_vtable): Use get_vtbl_decl_for_binfo.
19344         (accumulate_vtbl_inits): Add comments explaining why a pre-order
19345         walk is required.
19346         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
19347         where the vptr points, even for primary vtables.
19348         (build_vtbl_initializer): Adjust handling of vbase and vcall
19349         offsets.
19350         (build_vcall_and_vbase_vtable_entries): New function.
19351         (dfs_build_vbase_offset_vtbl_entries): Remove.
19352         (build_vbase_offset_vtbl_entries): Reimplement.
19353         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
19354         were already handled in a primary base class vtable.
19355         (build_vcall_offset_vtbl_entries): Adjust.
19356         (build_rtti_vtbl_entries): Adjust.
19357         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
19358         * init.c (expand_virtual_init): Simplify.
19359         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
19360         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
19361         * search.c (BINFO_ACCESS): New macro.
19362         (SET_BINFO_ACCESS): Likewise.
19363         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
19364         (access_in_type): Likewise.
19365         (dfs_accessible_p): Likewise.
19366         (protected_accessible_p): Likewise.
19367         (lookup_fnfields_1): Adjust documentation.
19368         (dfs_mark_primary_bases): Move to class.c
19369         (mark_primary_bases): Likewise.
19370         (dfs_vbase_unmark): Remove.
19371         (virtual_context): Use BINFO_FOR_VBASE.
19372         (dfs_get_vbase_types): Simplify.
19373         (dfs_build_inheritance_graph_order): New function.
19374         (get_vbase_types): Use it.
19375         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
19377         * tinfo.cc (get_vbase_offset): New function.
19378         (__vmi_class_type_info::do_find_public_src): Use it.
19379         (__vmi_class_type_info::do_dyncast): Likewise.
19380         (__vmi_class_type_info::do_upcast): Likewise.
19382 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
19384         * lang-specs.h: Pass -fno-show-column to the preprocessor.
19386 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
19388         * rtti.c (class_hint_flags): Rename flags.
19389         (class_initializer): Remove flags.
19390         (synthesize_tinfo_var): Combine offset and flags. Add flags
19391         for __vmi_class_type_info.
19392         (create_tinfo_types): Remove flags from __class_type_info and
19393         __si_class_type_info. Merge flags and offset from
19394         base_class_type_info.
19395         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
19396         (__base_class_info::is_virtual_p): Adjust.
19397         (__base_class_info::is_public_p): Adjust.
19398         (__base_class_info::offset): New accessor.
19399         (__class_type_info::details): Remove member.
19400         (__class_type_info::__class_type_info): Lose details.
19401         (__class_type_info::detail_masks): Remove.
19402         (__si_class_type_info::__si_class_type_info): Lose details.
19403         (__vmi_class_type_info::details): New member.
19404         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
19405         (__vmi_class_type_info::detail_masks): New member.
19406         * tinfo.cc (__class_type_info::do_upcast): Initialize result
19407         with unknown_details_mask.
19408         (__vmi_class_type_info::do_find_public_src): Adjust
19409         (__vmi_class_type_info::do_dyncast): Adjust.
19410         (__vmi_class_type_info::do_upcast): Set result details, if
19411         needed. Adjust.
19412         (__dynamic_cast): Temporarily #if out optimization.
19414 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
19416         * rtti.c (get_tinfo_decl): Mark used.
19417         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
19418         mark as dealt with, if we output it.
19420 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
19422         * class.c: Reorganize to put virtual function table initialization
19423         machinery at the end of the file.
19425 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
19427         * class.c (finish_struct): Use bitsize_zero_node.
19428         * pt.c (instantiate_class_template): Likewise.
19430 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
19432         Put RTTI entries at negative offsets in new ABI.
19433         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
19434         vbase offset at index -3, not -1.
19435         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
19436         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
19437         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
19438         (build_rtti_vtbl_entries): New function.
19439         (set_rtti_entry): Remove.
19440         (build_primary_vtable): Don't use it.
19441         (build_secondary_vtable): Likewise.
19442         (start_vtable): Remove.
19443         (first_vfun_index): New function.
19444         (set_vindex): Likewise.
19445         (add_virtual_function): Don't call start_vtable.  Do call
19446         set_vindex.
19447         (set_primary_base): Rename parameter.
19448         (determine_primary_base): Likewise.
19449         (num_vfun_entries): Don't use skip_rtti_stuff.
19450         (num_extra_vtbl_entries): Include RTTI information.
19451         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
19452         (skip_rtti_stuff): Remove.
19453         (dfs_modify_vtables): Don't use it.
19454         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
19455         (layout_nonempty_base_or_field): Update size handling.
19456         (create_vtable_ptr): Tweak.
19457         (layout_class_type): Adjust parameter names.
19458         (finish_struct_1): Simplify.
19459         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
19460         (skip_rtti_stuff): Remove.
19461         (first_vfun_index): New function.
19462         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
19463         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
19464         (marked_vtable_pathp): Declare.
19465         (unmarked_vtable_pathp): Likewise.
19466         * error.c (dump_expr): Use first_vfun_index to calculate vtable
19467         offsets.
19468         * rtti.c (build_headof): Look for RTTI at negative offsets.
19469         (get_tinfo_decl_dynamic): Likewise.
19470         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
19471         here.
19472         (create_pseudo_type_info): Do it here instead.  Adjust so that
19473         vptr points at first virtual function.
19474         * search.c (marked_vtable_pathp): Make it global.
19475         (unmarked_vtable_pathp): Likewise.
19476         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
19477         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
19478         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
19479         (get_pure_virtuals): Likewise.
19480         (expand_upcast_fixups): Likewise.
19481         * tree.c (debug_binfo): Likewise.
19482         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
19483         negative offset.
19485 2000-03-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19487         * class.c (check_field_decl): Fix typo.
19488         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
19489         (check_methods): Likewise.
19490         (check_field_decls): Likewise.
19491         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
19492         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
19493         Use DECL_RESULT_FLD, not DECL_RESULT.
19494         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
19495         * lex.c (identifier_type): Likewise.
19496         * pt.c (determine_specialization, lookup_template_class): Likewise.
19497         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
19498         (resolve_overloaded_unification, more_specialized): Likewise.
19499         * semantics.c (finish_member_declaration): Likewise.
19500         * typeck.c (build_x_function_call): Likewise.
19502 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
19504         * class.c (layout_empty_base): Handle empty bases with non-byte
19505         alignment.
19506         (build_base_field): Likewise.
19507         (layout_virtual_bases): Likewise.
19509         * class.c (finish_struct_1): Fix typo in this change:
19511         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19513 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
19515         * decl.c (grokdeclarator): Count partial specializations when
19516         keeping track of how many template classes have been seen.
19518         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
19520 2000-03-25  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19522         * class.c (build_vbase_pointer_fields): layout_field now place_field.
19523         (get_vfield_offset): Use byte_position.
19524         (set_rtti_entry): Set OFFSET to ssizetype zero.
19525         (get_binfo_offset_as_int): Deleted.
19526         (dfs_record_base_offsets): Use tree_low_cst.
19527         (dfs_search_base_offsets): Likewise.
19528         (layout_nonempty_base_or_field): Reflect changes in RLI format
19529         and call byte_position.
19530         (layout_empty_base): Convert offset to ssizetype.
19531         (build_base_field): use rli_size_unit_so_far.
19532         (dfs_propagate_binfo_offsets): Do computation in proper type.
19533         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
19534         (layout_class_type): Reflect changes in RLI names and fields.
19535         (finish_struct_1): Set DECL_FIELD_OFFSET.
19536         * dump.c (dequeue_and_dump): Call bit_position.
19537         * expr.c (cplus_expand_constant): Use byte_position.
19538         * rtti.c (expand_class_desc): Use bitsize_one_node.
19539         * typeck.c (build_component_addr): Use byte_position and don't
19540         special case for zero offset.
19542 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
19544         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
19546         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
19547         tinfo object.
19548         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
19549         vtable.
19551 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
19553         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
19554         DECL_P macros.
19555         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
19556         make_typename_type, check_initializer, cp_finish_decl,
19557         xref_tag): Likewise.
19558         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
19559         decl_namespace, arg_assoc_template_arg, arg_assoc,
19560         validate_nonmember_using_decl, do_class_using_decl): Likewise.
19561         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
19562         args_to_string): Likewise.
19563         * friend.c (is_friend): Likewise.
19564         * lex.c (note_got_semicolon, note_list_got_semicolon,
19565         is_global): Likewise.
19566         * method.c (build_overload_nested_name, build_overload_value,
19567         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
19568         * parse.y (typename_sub, typename_sub1): Likewise.
19569         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
19570         process_partial_specialization, convert_template_argument,
19571         template_args_equal, add_pending_template, lookup_template_class,
19572         for_each_template_parm_r, maybe_fold_nontype_arg,
19573         tsubst, instantiate_template, type_unification_real, unify,
19574         instantiate_pending_templates, set_mangled_name_for_template_decl):
19575         Likewise.
19576         * repo.c (repo_get_id, repo_template_used): Likewise.
19577         * search.c (lookup_field_1): Likewise.
19578         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
19579         * xref.c (classname): Likewise.
19581 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
19583         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
19584         (CANONICAL_BINFO): New macro.
19585         (BINFO_NEW_VTABLE_MARKED): Use it.
19586         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
19587         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
19588         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
19589         not TREE_TYPE.
19590         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
19591         (build_secondary_vtable): Likewise.
19592         (dfs_finish_vtbls): Likewise.
19593         (dfs_accumulate_vtbl_inits): Likewise.
19594         (accumulate_vtbl_inits): New function.
19595         (finish_vtbls): Make sure that virtual bases come after
19596         non-virtual bases in the vtable group.
19597         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
19598         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
19599         * search.c (struct vbase_info): Move definition.
19600         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
19601         (unmarked_new_vtable_p): Likewise.
19602         (dfs_mark_vtable_path): Remove.
19603         (dfs_mark_new_vtable): Remove.
19604         (dfs_unmark_new_vtable): Likewise.
19605         (dfs_clear_search_slot): Likewise.
19606         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
19607         (dfs_clear_vbase_slots): Likewise.
19608         (init_vbase_pointers): LIkewise.
19610 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
19612         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
19613         SIZETYPE to a non-SIZETYPE.
19615 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
19617         * class.c (layout_virtual_bases): Adjust names in conditionally
19618         compiled code.
19620         * class.c (record_base_offsets): New function.
19621         (layout_conflict_p): Likewise.
19622         (layout_nonempty_base_or_field): Use it.
19623         (layout_empty_base): New function.
19624         (build_base_field): Use it.
19625         (build_base_fields): Update comment.
19626         (layout_virtual_bases): Fold in a little code form
19627         layout_basetypes.  Use layout_empty_base.
19628         (layout_basetypes): Remove.
19629         (end_of_class): New function.
19630         (layout_class_type): Use it.  Adjust.
19632         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
19633         (fntype_p): Remove.
19634         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
19635         comment.
19636         (dfs_skip_nonprimary_vbases_markedp): Likewise.
19637         * typeck.c (fntype_p): Remove.
19639         * cp-tree.h (TI_SPEC_INFO): Remove.
19640         (CLASSTYPE_TI_SPEC_INFO): Likewise.
19641         * pt.c (process_partial_specialization): Likewise.
19643         * class.c (build_base_field): Fix thinko in computation of binfo
19644         offsets.
19646         * tree.c (mark_local_for_remap_p): Mark variables declared in
19647         TARGET_EXPRs as well.
19649 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
19651         * typeck.c (require_complete_type, complete_type,
19652         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
19653         build_array_ref, convert_arguments, pointer_diff,
19654         build_x_unary_op, build_unary_op, build_c_cast,
19655         build_modify_expr): Use COMPLETE_TYPE_P etc.
19656         * call.c (is_complete, convert_like_real,
19657         build_new_method_call): Likewise.
19658         * class.c (build_vbase_pointer_fields, check_bases,
19659         build_base_field, finish_struct_1, pushclass): Likewise.
19660         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
19661         * decl.c (maybe_process_template_type_declaration, pushtag,
19662         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
19663         layout_var_decl, check_initializer, cp_finish_decl,
19664         grokdeclarator, require_complete_types_for_parms,
19665         grok_op_properties, xref_tag, xref_basetypes,
19666         check_function_type): Likewise.
19667         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
19668         * friend.c (do_friend): Likewise.
19669         * init.c (build_offset_ref): Likewise.
19670         * parse.y (structsp): Likewise.
19671         * pt.c (maybe_process_partial_specialization,
19672         tsubst_friend_function, instantiate_class_template, tsubst,
19673         do_type_instantiation, instantiate_pending_templates): Likewise.
19674         * repo.c (repo_get_id): Likewise.
19675         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
19676         synthesize_tinfo_var, emit_support_tinfos): Likewise.
19677         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
19678         * semantics.c (begin_class_definition): Likewise.
19679         * tree.c (build_cplus_method_type): Likewise.
19680         * typeck2.c (digest_init, build_functional_cast,
19681         add_exception_specifier): Likewise.
19682         * parse.h, parse.c: Regenerated.
19684 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
19686         * inc/cxxabi.h: New header file. Define new-abi entry points.
19687         (__pointer_type_info::target): Rename member to ...
19688         (__pointer_type_info::type): ... here.
19689         (__base_class_info::type): Rename member to ...
19690         (__base_class_info::base): ... here.
19691         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
19692         * cp-tree.h (CPTI_ABI): New global tree enumeration.
19693         (abi_node): New global tree node.
19694         * decl.c (abi_node): Document.
19695         (init_decl_processing): Initialize abi_node.
19696         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
19697         (get_vmi_pseudo_type_info): Likewise.
19698         (create_tinfo_types): Likewise.
19699         (emit_support_tinfos): Likewise.
19700         * tinfo.h (cxxabi.h): Include for new-abi.
19701         Move rtti class definitions to new header file.
19702         * tinfo.cc (abi): Use the namespace.
19703         (std): Move new abi rtti classes from here ...
19704         (__cxxabiv1): ... to here.
19705         * tinfo2.cc (cxxabi.h): Include for new-abi.
19706         Move rtti class definitions to new header file.
19707         (std): Move new abi rtti classes from here ...
19708         (__cxxabiv1): ... to here.
19709         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
19710         namespace.
19712 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
19713             Jason Merrill  <jason@casey.cygnus.com>
19715         * method.c (build_overload_int): Use host_integerp.
19717 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
19719         * init.c (build_offset_ref): Handle the case of a templated member
19720         function.
19722 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
19724         * except.c (expand_exception_blocks): Clear catch_clauses_last.
19726 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
19728         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
19729         * class.c (check_bitfield_decl): Turn illegal bitfields into
19730         non-bitfields.
19731         (dfs_propagate_binfo_offsets): Adjust for new size_binop
19732         semantics.
19733         (dfs_offset_for_unshared_vbases): Likewise.
19734         * cvt.c (cp_convert_to_pointer): Convert NULL to a
19735         pointer-to-member correctly under the new ABI.
19736         * expr.c (cplus_expand_constant): Don't use cp_convert when
19737         turning an offset into a pointer-to-member.
19738         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
19739         when dereferencing them under the new ABI.
19740         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
19741         of pointers-to-members under the new ABI.
19743         * class.c (check_bitfield_decl): Remove restriction on really long
19744         bitfields.
19745         (layout_class_type): Implement new ABI handling of bitfields
19746         longer than their types.
19748 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
19750         * parse.y (extdefs): Call ggc_collect.
19751         * parse.c: Regenerated.
19753 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
19755         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
19756         (note_name_declared_in_class): Use OVL_CURRENT to get at a
19757         potential overload.
19759 2000-03-17  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19761         * class.c (build_vbase_path): Use integer_zerop.
19762         (build_vtable_entry): Use tree_low_cst.
19763         (get_vfield_offset): Use bit_position.
19764         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
19765         Use tree_low_cst.
19766         (check_bitfield_decl): Set DECL_SIZE using convert.
19767         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
19768         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
19769         Use tree_low_cst.
19770         (finish_struct_1): Use bit_position.
19771         (dump_class_hierarchy): Use tree_low_cst.
19772         * cp-tree.h (min_precision): Add declaration.
19773         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
19774         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
19775         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
19776         * expr.c (cplus_expand_constant): Use bit_position.
19777         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
19778         * rtti.c (get_base_offset): Use bit_position.
19779         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
19780         host_integerp, and tree_low_cst.
19781         (pointer_int_sum): Use integer_zerop.
19782         (build_component_addr): Use bit_position.
19784 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
19786         * typeck.c (require_complete_type): Don't assume size_zero_node.
19787         (complete_type_or_else): Likewise.
19789 2000-03-16  Steven Grady <grady@digitaldeck.com>
19790             Jason Merrill  <jason@casey.cygnus.com>
19792         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
19794 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
19796         * decl2.c (grokfield): Bail out if type is error_mark_node.
19798 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
19800         * tinfo2.cc (__ptr_to_member_data): Rename to ...
19801         (__pointer_to_member_data): ... here. Adjust.
19802         * rtti.c (create_tinfo_types): Adjust.
19804 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
19806         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
19807         * decl.c (ref_desc_type_node): Undocument.
19808         * rtti.c (ptr_ref_initializer): Rename to ...
19809         (ptr_initializer): ... here. Adjust comments.
19810         (ptmd_initializer): Fix comment thinko.
19811         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
19812         (create_tinfo_types): Remove ref_desc_type_node init.
19813         * tinfo2.cc (__reference_type_info): Remove.
19815 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
19817         * decl.c (cp_finish_decl): Remove obsolete comment.
19819         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
19821 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
19823         * cp-tree.h: Tweak documentation.
19824         * class.c (build_vbase_pointer_fields): Layout the fields, too.
19825         (avoid_overlap): Remove.
19826         (get_binfo_offset_as_int): New function.
19827         (dfs_serach_base_offsets): Likewise.
19828         (layout_nonempty_base_or_field): Likewise.
19829         (build_base_field): Layout fields here.  Avoid placing two objects
19830         of the same type at the same address, under the new ABI.
19831         (build_base_fields): Adjust accordingly.
19832         (create_vtable_ptr): Return the new field, but don't attach it to
19833         TYPE_FIELDS.
19834         (remove_base_field): Remove.
19835         (remove_base_fields): Remove.
19836         (layout_basetypes): Adjust accordingly.
19837         (layout_class_type): Call layout_field for each field, rather than
19838         just making a wholesale call to layout_type.
19840 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
19842         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
19844 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
19846         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
19848         * except.c (dtor_nothrow): New fn.
19849         (do_pop_exception): Use it.  Take type parm.
19850         (push_eh_cleanup): Take type parm.
19851         (expand_start_catch_block): Pass it.
19852         (build_eh_type_type_ref): Accept null type.
19854 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
19856         * cp-tree.h (revert_static_member_fn): Change prototype.
19857         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
19858         (grok_op_properties): Likewise.
19859         (start_function): Likewise.
19860         (revert_static_member_fn): Simplify.
19861         * pt.c (check_explicit_specialization): Adjust call to
19862         revert_static_member_fn.
19864 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
19866         * cp-tree.h (scope_kind): New type.
19867         (tmpl_spec_kind): Likewise.
19868         (declare_pseudo_global_level): Remove.
19869         (pseudo_global_level_p): Rename to template_parm_scope_p.
19870         (pushlevel): Remove declaration.
19871         (begin_scope): New function.
19872         (finish_scope): Likewise.
19873         (current_tmpl_spec_kind): Likewise.
19874         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
19875         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
19876         Add template_spec_p.
19877         (toplevel_bindings_p): Adjust.
19878         (declare_pseudo_global_level): Remove.
19879         (pseudo_global_level_p): Rename to template_parm_scope_p.
19880         (current_tmpl_spec_kind): New function.
19881         (begin_scope): Likewise.
19882         (finish_scope): Likewise.
19883         (maybe_push_to_top_level): Adjust.
19884         (maybe_process_template_type_declaration): Likewise.
19885         (pushtag): Likewise.
19886         (pushdecl_nonclass_level): Likewise.
19887         (lookup_tag): Likewise.
19888         (grokfndecl): Handle member template specializations.  Share
19889         constructor and non-constructor code.
19890         * decl2.c (check_classfn): Handle member template specializations.
19891         * pt.c (begin_template_parm_list): Use begin_scope.
19892         (begin_specialization): Likewise.
19893         (end_specialization): Likewise.
19894         (check_explicit_specialization): Use current_tmpl_spec_kind.
19895         Handle member template specializations.
19896         (end_template_decl): Use finish_scope.  Remove call to
19897         get_pending_sizes.
19898         (push_template_decl_real): Remove bogus error message.
19899         (tsubst_decl): Fix typo in code contained in comment.
19900         (instantiate_template): Handle member template specializations.
19901         (most_general_template): Likewise.
19903 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
19905         * lex.c (whitespace_cr): Compress consecutive calls to warning().
19906         (do_identifier): Ditto for error().
19908         * pt.c (convert_nontype_argument): Ditto for cp_error().
19909         (convert_template_argument): Ditto for cp_pedwarn().
19911 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
19913         * exception.cc (__check_null_eh_spec): New fn.
19914         * except.c (expand_end_eh_spec): Call it if the spec is throw().
19916 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
19918         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
19919         * except.c (expand_end_eh_spec): Add the return type.
19920         * rtti.c (throw_bad_cast): Add the parmtypes.
19921         (throw_bad_typeid): Likewise.
19923         * semantics.c (expand_stmt): Only leave out rtl for unused
19924         artificials, and set DECL_IGNORED_P on them as well.
19925         * decl.c (wrapup_globals_for_namespace): Likewise.
19927 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
19929         * decl.c (maybe_commonize_var): Skip all artificial decls.
19930         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
19932 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
19934         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
19935         * cp-tree.h: Declare flag_enforce_eh_specs.
19936         * decl.c (store_parm_decls, finish_function): Check it.
19938         C library functions don't throw.
19939         * Makefile.in (cfns.h): New target.
19940         (except.o): Depend on it.
19941         * Make-lang.in (cc1plus): Depend on cfns.gperf.
19942         * cfns.gperf: New file.
19943         * cfns.h: Generated.
19944         * except.c: Include it.
19945         (nothrow_libfn_p): New fn.
19946         * decl.c (grokfndecl): Use it.
19947         * cp-tree.h: Declare it.
19949         * decl.c (push_overloaded_decl_1, auto_function,
19950         define_function): Lose.
19951         (build_library_fn_1): New static fn.
19952         (builtin_function): Use it.
19953         (get_atexit_node): Use build_library_fn_ptr.
19954         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
19955         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
19956         push_void_library_fn, push_throw_library_fn): New fns.
19957         * cp-tree.h: Declare them.
19958         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
19959         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
19960         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
19961         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
19962         * rtti.c (build_runtime_decl): Lose.
19963         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
19964         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
19965         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
19967         * call.c (build_call): Remove result_type parm.
19968         Call mark_used on unused artificial fns.
19969         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
19971 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
19973         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
19974         appropriate.
19975         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
19976         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
19977         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
19978         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
19979         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
19980         expand_generic_desc): Likewise.
19982 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
19984         * exception.cc (__cp_pop_exception): Cleanup the original object.
19986 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
19988         * decl.c (grok_op_properties): Merge conversion to void warning
19989         with other silly op warnings.
19991 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
19993         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
19994         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
19996 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
19998         * decl.c (cp_make_fname_decl): New function.
19999         (wrapup_globals_for_namespace): Don't emit unused static vars.
20000         (init_decl_processing): Remove comment about use of
20001         array_domain_type. Set make_fname_decl.
20002         (cp_finish_decl): Remove __FUNCTION__ nadgering.
20003         * semantics.c (begin_compound_stmt): Remove
20004         current_function_name_declared flagging.
20005         (expand_stmt): Don't emit unused local statics.
20006         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
20007         specially.
20009 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
20011         * typeck.c (convert_for_assignment): Don't look at array
20012         initializer.
20013         * call.c (convert_like_real): Likewise.
20015 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
20017         Add initial support for '\uNNNN' specifier.
20018         * lex.c (read_ucs): New fn.
20019         (readescape, skip_white_space): Call it.
20020         (is_extended_char, is_extended_char_1): New fns.
20021         (utf8_extend_token): New fn, #if 0'd out.
20022         (real_yylex): Treat extended chars like letters.
20024         * search.c (note_debug_info_needed): Walk the bases even if we
20025         weren't deferring the type itself.
20027 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
20029         * decl2.c (finish_objects): Constify a char*.
20031         * method.c (emit_thunk): Likewise.
20033 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
20035         * typeck.c (dubious_conversion_warnings): Look through
20036         REFERENCE_TYPE.
20038 2000-03-06  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
20040         * class.c (dfs_modify_vtables): I is now unsigned.
20041         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
20042         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
20043         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
20044         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
20045         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
20046         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
20047         Call integer_all_onesp.
20048         * typeck2.c (process_init_constructor): Use compare_tree_int.
20050         * lang-specs.h (as): Don't call if -syntax-only.
20052 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
20054         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
20055         RTL_EXPR_HAS_NO_SCOPE after all.
20057 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
20059         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
20060         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
20061         RTL_EXPR_HAS_NO_SCOPE.
20063         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
20064         later.
20066         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
20068 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
20070         * call.c (convert_like): Macrofy.
20071         (convert_like_with_context): New macro.
20072         (convert_like_real): Renamed from convert_like.  Add calling
20073         context parameters, for diagnostics. Add recursive flag.  Call
20074         dubious_conversion_warnings for outer conversion.
20075         (build_user_type_conversion): Use convert_like_with_context.
20076         (build_over_call): Likewise. Don't warn about dubious
20077         conversions here. Adjust convert_default_arg calls.
20078         (convert_default_arg): Add context parameters for diagnostics.
20079         Pass through to convert_like_with_context.
20080         * cp-tree.h (convert_default_arg): Add context parameters.
20081         (dubious_conversion_warnings): Prototype new function.
20082         * typeck.c (convert_arguments): Adjust convert_default_arg call.
20083         (dubious_conversion_warnings): New function, broken
20084         out of convert_for_assignment.
20085         (convert_for_assignment): Adjust.
20087 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
20089         * decl2.c (key_method): Break out from...
20090         (import_export_vtable, import_export_class): ...here.
20092         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
20093         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
20095         * search.c (note_debug_info_needed, dfs_debug_mark,
20096         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
20097         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
20099 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
20101         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
20102         typos.
20104 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
20106         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
20107         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
20108         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
20109         (lang_type): Split gets_new into has_new and has_array_new.
20110         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20111         (TYPE_GETS_NEW): Split into ...
20112         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
20113         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
20114         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
20115         (build_op_new_call): Don't declare.
20116         (build_new_1): Likewise.
20117         * call.c (build_op_new_call): Remove.
20118         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
20119         instead of TYPE_NEEDS_DESTRUCTOR.
20120         (finish_struct_bits): Likewise.
20121         (add_implicitly_declared_members): Likewise.
20122         (check_field_decl): Likewise.
20123         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
20124         correctly under the new ABI.
20125         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
20126         instead of TYPE_NEEDS_DESTRUCTOR.
20127         (initialize_local_var): Likewise.
20128         (destroy_local_var): Likewise.
20129         (cp_finish_decl): Likewise.
20130         (register_dtor_fn): Likewise.
20131         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
20132         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
20133         TYPE_VEC_DELETE_TAKES_SIZE here.
20134         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
20135         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
20136         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20137         (finish_destructor_body): Likewise.
20138         (maybe_build_cleanup_1): Likewise.
20139         * decl2.c (do_static_destruction): Likewise.
20140         * init.c (build_new_1): Make it static.
20141         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20142         (expand_cleanup_for_base): Likewise.
20143         (get_cookie_size): New function.
20144         (build_new_1): Handle array-new cookies correctly under the new
20145         ABI.
20146         (build_vec_delete_1): Likewise.
20147         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20148         (build_delete): Likewise.
20149         (build_vec_delete): Handle array-new cookies correctly under the new
20150         ABI.
20151         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20152         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
20153         TYPE_HAS_ARRAY_NEW_OPERATOR.
20154         * ptree.c (print_lang_type): Check them.
20155         * search.c (context_for_name_lookup): Fix typo in comment.
20156         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20157         * tree.c (break_out_cleanups): Likewise.
20158         (build_cplus_array_test_1): Likewise.
20159         (cp_build_qualified_type_real): Likewise.
20160         * typeck.c (complete_type): Likewise.
20162         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
20163         the command-line, not the end.
20165 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
20167         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
20169 2000-03-02  Tom Tromey  <tromey@cygnus.com>
20171         * cp-tree.h (build_java_class_ref): Declare.
20172         * init.c (build_java_class_ref): No longer static.
20173         * except.c (expand_throw): Generate a Java-style `throw' if the
20174         thrown object is a "Java" object.
20175         (initialize_handler_parm): Generate a Java-style lookup of
20176         exception info if the caught object is a "Java" object.
20177         (catch_language, catch_language_init): New globals.
20178         (decl_is_java_type): New function.
20179         (expand_start_catch_block): Don't call push_eh_info() or
20180         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
20181         class reference to build_catch_block.
20183 2000-03-02  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
20185         * typeck.c (comptypes): Treat sizetype like its language equivalent.
20187 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
20189         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
20190         to merge reference/pointer code and fix incorrect warnings.
20192 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
20194         * search.c (protected_accessible_p): Use context_for_name_lookup.
20196         * init.c (construct_virtual_bases): Fix thinko.
20197         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
20199 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
20201         * decl.c (current_function_decl): Move to toplev.c.
20203 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
20205         * pt.c (fn_type_unification): Unify return type, whenever
20206         provided.
20207         (get_bindings_real): Only pass return type when necessary.
20208         Remove explicit return type check.
20209         * class.c (resolve_address_of_overloaded_function): Pass desired
20210         return type to fn_type_unification.
20212 2000-02-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
20214         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
20215         DECL_FIELD_SIZE.
20216         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
20217         DECL_FIELD_SIZE.
20218         * rtti.c (expand_class_desc): Likewise.
20219         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
20220         (THUNK_VCALL_OFFSET): Likewise.
20221         (THUNK_DELTA): Reflect changes in ../tree.h.
20223 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
20225         * search.c (protected_accessible_p): Also allow the access if
20226         the member is public in DERIVED.  Lose TYPE parm.
20227         (friend_accessible_p): Lose TYPE parm.
20228         (accessible_p): Adjust.
20230 2000-02-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
20232         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
20233         on things that are not sizes; ssize_binop deleted.
20234         Call size_diffop when appropriate.
20235         (dfs_build_vcall_offset_vtbl_entries): Likewise.
20236         (build_primary_vtable, build_secondary_vtable): Likewise.
20237         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
20238         Variable I is HOST_WIDE_INT.
20239         (get_vfield_offset): Pass proper types to size_binop.
20240         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
20241         (finish_struct_1): Likewise.
20242         (skip_rtti_stuff): Arg N is now pointer to signed.
20243         (layout_class_type): Use size_zero_node.
20244         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
20245         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
20246         * decl.c (complete_arry_type): Pass proper types to size_binop.
20247         (xref_basetypes): BINFO_OFFSET is sizetype.
20248         * error.c (dump_expr): Don't use size_binop non-sizes.
20249         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
20250         * init.c (construct_virtual_bases): Fix type error.
20251         (build_vec_delete_1): Pass proper type to size_binop and don't
20252         fold result.
20253         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
20254         * rtti.c (get_base_offset): Pass proper type to size_binop.
20255         * search.c (dfs_find_vbases): Fix type error.
20256         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
20257         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
20258         * tree.c (debug_binfo): Variable N is signed.
20259         Use HOST_WIDE_INT_PRINT_DEC.
20260         * typeck.c (comptypes): sizetype is same as equivalent integer type.
20261         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
20262         size_one_node and size_zero_node.
20263         (c_alignof): Use size_one_node.
20264         (build_component_addr): Pass proper types to size_binop.
20265         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
20267 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
20269         Implement class scope using-declarations for functions.
20270         * class.c (handle_using_decl): Call add_method for used functions.
20271         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
20272         (add_method): Used functions are hidden by local functions.
20273         (check_bases_and_members): Handle using-decls before finalizing
20274         CLASSTYPE_METHOD_VEC.
20275         * call.c (add_function_candidate): Add ctype parm; if nonzero,
20276         override the type of 'this' accordingly.
20277         (add_template_candidate, add_template_candidate_real): Add ctype parm.
20278         (convert_class_to_reference, build_user_type_conversion_1,
20279         build_new_function_call, build_object_call, build_new_op,
20280         build_new_method_call): Pass ctype parm.
20282         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
20283         the baselink.
20284         * call.c (convert_class_to_reference, build_user_type_conversion_1,
20285         build_new_function_call, build_object_call, build_new_op,
20286         build_new_method_call, build_op_delete_call): Don't get basetype_path
20287         from a baselink.
20288         * typeck.c (build_component_ref): Likewise.
20289         * init.c (build_offset_ref): Likewise.
20290         (resolve_offset_ref): Don't call enforce_access.
20291         Call build_scoped_ref.
20292         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
20293         would cause an error or if -pedantic.
20294         * class.c (alter_access): Lose binfo parm.
20296 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
20298         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
20299         types.
20301 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
20303         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
20304         pseudo_type_info creation into the std namespace
20306 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
20308         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
20309         (import_export_class): Remove declaration.
20310         * decl2.c (import_export_class): Make it static.
20311         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
20312         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
20313         EXPR_WITH_FILE_LOCATION.
20314         * lex.c (check_newline): Tweak filename/lineno setting.
20315         * semantics.c (begin_while_stmt): Fix typo in comment.
20317 2000-02-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
20319         * lang-options.h (-fmessage-length=): Add missing option.
20321         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
20323 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
20325         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
20327 2000-02-25  Jim Wilson  <wilson@cygnus.com>
20329         * optimize.c (expand_call_inline): Emit the return label before
20330         evaluating the return value.
20332 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
20334         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
20335         than duplicating functionality here.
20336         * optimize.c: Include input.h.
20337         (expand_call_inline): Use push_srcloc and pop_srcloc.
20338         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
20339         * parse.c: Regenerated.
20340         * Makefile.in (lex.o): Depend on input.h.
20341         (optimize.o): Likewise.
20343 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
20345         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
20346         function type, rather than ICE.
20348 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
20350         * decl.c (grokdeclarator): Call decl_type_access_control.
20351         * parse.y (parse_end_decl): Don't call decl_type_access_control if
20352         decl is null.
20354 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
20356         * decl.c (decls_match): Remove obsolete static member nadgering.
20358 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
20360         * decl.c (grokdeclarator): Change ANSI to ISO.
20361         * lex.c (consume_string, readescape, do_identifier): Likewise.
20362         (parse_float, real_yylex): Likewise.
20363         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
20364         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
20365         new_type_id, maybe_label_decls, simple_stmt,
20366         for.init.statement): Likewise.
20367         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
20368         * semantics.c (finish_named_return_value): Likewise.
20369         * parse.c: Regenerate.
20371 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
20373         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
20374         (CPTI_CLASS_STAR_TYPE): Remove.
20375         (vtable_index_type): Likewise.
20376         (class_star_type_node): Remove.
20377         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
20378         (build_binary_op_nodefault): Remove.
20379         * call.c (build_new_op): Use build_binary_op instead of
20380         build_binary_op_nodefault.
20381         * decl.c (init_decl_processing): Remove class_star_type_node
20382         initialization.  Make delta_type_node ptrdiff_type_node under the
20383         new ABI.  Initialize vtable_index_type.
20384         (build_ptrmemfunc_type): Build different structures for the new
20385         ABI.
20386         (build_enumerator): Use build_binary_op instead of
20387         build_binary_op_nodefault.
20388         * method.c (build_overload_value): Mangle pointers-to-members
20389         appropriately under the new ABI.
20390         * typeck.c (build_array_ref): Use build_binary_op instead of
20391         build_binary_op_nodefault.
20392         (get_member_function_from_ptrfunc): Adjust for the new ABI.
20393         (build_binary_op_nodefault): Rename to ...
20394         (build_binary_op): ... this.  Remove old version.  Adjust for
20395         pointer-to-member comparisons under the new ABI.
20396         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
20397         (build_ptrmemfunc): Adjust for the new ABI.
20398         (expand_ptrmemfunc_cst): Likewise.
20399         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
20400         (pfn_from_ptrmemfunc): Adjust for the new ABI.
20402 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
20404         * call.c (build_object_call): Compress consecutive calls to
20405         cp_error.
20406         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
20407         (build_op_delete_call): Adjust message formatting.
20409         * class.c (check_bases): Compress consecutive calls to
20410         cp_pedwarn.
20411         (finish_struct_anon): Say 'ISO C++'.
20413         * decl.c (start_decl): Same here.
20414         (grok_reference_init): Likewise.
20415         (grokfndecl): Correct message formatting.
20416         (grokfndecl): Improve diagnostic.
20417         (check_static_variable_definition): Likewise. Say 'ISO C++'
20418         (compute_array_index_type): Say 'ISO C++'
20419         (create_array_type_for_decl): Compress consecutive calls to
20420         cp_error.
20421         (grokdeclarator): Say 'ISO C++'
20422         (grok_op_properties): Likewise.
20424         * decl2.c (delete_sanity): Clairify diagnostic.
20425         (check_member_template): Same here.
20426         (grok_function_init): Use consistent terminology.
20428         * expr.c (do_case): Say 'ISO C++'
20430         * friend.c (do_friend): Compress consecutive calls to warning.
20432 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
20434         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
20435         * class.c (build_secondary_vtable): Reorganize.  Don't create a
20436         new vtable under the new ABI.
20437         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
20438         computing the size.
20439         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
20440         the initializing elements.
20441         (initialize_vtable): New function.
20442         (dfs_finish_vtbls): Use it.
20443         (dfs_accumulate_vtbl_inits): New function.
20444         (finish_vtbls): Merge primary and secondary vtables under the new
20445         ABI.
20446         (finish_struct_1): Remove redundant call to layout_vtable_decl.
20447         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
20448         aren't VAR_DECLs.
20450         * class.c (build_vtable): New function, split out from ...
20451         (get_vtable_decl): ... here, and ...
20452         (build_secondary_vtable): ... here.
20454         * pt.c (tsubst_decl): Fix formatting.
20456 2000-02-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
20458         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
20459         (avoid_overlap, build_base_field): Likewise.
20460         (build_base_field, build_base_fields, is_empty_class):
20461         Test DECL_SIZE with integer_zero.
20462         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
20463         * cp-tree.h (struct lang_type): New field size_unit.
20464         (CLASSTYPE_SIZE_UNIT): New macro.
20465         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
20466         (cp_finish_decl): Delete -Wlarger-than processing.
20467         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
20468         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
20469         * tree.c (make_binfo): binfo vector is one entry longer.
20470         (walk_tree): Walk DECL_SIZE_UNIT.
20472 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
20474         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
20475         comment.
20476         (build_vtable_entry): Don't assume all vtable entries are
20477         functions.
20478         (build_vtbl_initializer): Adjust accordingly.
20479         (get_vtable_decl): Fix formatting.
20481 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
20483         * semantics.c (deferred_type_access_control): Walk the entire
20484         type_lookups list.
20485         (save_type_access_control): Rename from
20486         initial_deferred_type_access_control.  Just remember the value.
20487         (decl_type_access_control): New fn.
20488         (begin_function_definition): Use deferred_type_access_control, after
20489         we've started the function.  Set type_lookups to error_mark_node.
20490         * parse.y (frob_specs, fn.def1): Adjust.
20491         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
20492         (parse_end_decl, parse_bitfield0, parse_method): New fns.
20493         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
20494         (after_type_component_declarator0): Likewise.
20495         (after_type_component_declarator): Likewise.
20496         (notype_component_declarator): Likewise.
20497         * cp-tree.h: Adjust.
20499         * decl.c (redeclaration_error_message): Allow redeclaration of
20500         namespace-scope decls.
20502 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
20504         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
20506 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
20508         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
20509         * decl2.c (grokclassfn): Likewise.
20511         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
20513         * decl2.c (lang_decode_option): Don't set default message length
20514         here.
20515         * lex.c (lang_init_options): Set it here.
20517 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
20519         Make DECL_CONTEXT mean the class in which a member function was
20520         declared, even for a virtual function.
20521         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
20522         (DECL_FRIEND_CONTEXT): New macro.
20523         (DECL_REAL_CONTEXT): Remove.
20524         (SET_DECL_FRIEND_CONTEXT): Likewise.
20525         (DECL_VIRTUAL_CONTEXT): Adjust.
20526         (DECL_CLASS_SCOPE_P): Use TYPE_P.
20527         (add_friends): Remove.
20528         (hack_decl_function_context): Likewise.
20529         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
20530         CP_DECL_CONTEXT.
20531         (build_over_call): Fix indentation.  Use DECL_CONTEXT
20532         instead of DECL_CLASS_CONTEXT.
20533         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
20534         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
20535         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20536         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
20537         (build_base_field): Likewise.
20538         (finish_struct_1): Likewise.
20539         (build_self_reference): Likewise.
20540         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
20541         DECL_REAL_CONTEXT.
20542         (pushtag): Use decl_function_context, not
20543         hack_decl_function_context.
20544         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
20545         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
20546         (pushdecl): Remove bogus code.
20547         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
20548         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
20549         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20550         Use decl_function_context, nothack_decl_function_context.
20551         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
20552         (grokdeclarator): Likewise.  Use decl_function_context, not
20553         hack_decl_function_context.
20554         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
20555         (start_function): Use DECL_FRIEND_CONTEXT, not
20556         DECL_CLASS_CONTEXT.  Use decl_function_context, not
20557         hack_decl_function_context.
20558         (finish_function): Use decl_function_context, not
20559         hack_decl_function_context.
20560         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
20561         DECL_CLASS_CONTEXT.
20562         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
20563         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
20564         (grokfield): Likewise.
20565         (finish_builtin_type): Likewise.
20566         (finish_vtable_vardec): Use decl_function_context, not
20567         hack_decl_function_context.
20568         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20569         (start_static_initialization_or_destruction): Likewise.
20570         (finish_static_initialization_or_destruction): Likewise.
20571         (mark_used): Adjust logic for deciding when to synthesize methods.
20572         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
20573         DECL_REAL_CONTEXT.
20574         * error.c (dump_function_decl): Use DECL_CONTEXT, not
20575         DECL_CLASS_CONTEXT.
20576         * friend.c (is_friend): Likewise.
20577         (add_friends): Remove.
20578         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
20579         * lex.c (begin_definition_of_inclass_inline): Use
20580         decl_function_context, not hack_decl_function_context.
20581         (process_next_inline): Likewise.
20582         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
20583         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
20584         DECL_CLASSS_CONTEXT.
20585         (hack_identifier): Likewise.
20586         (synthesize_method):  Use decl_function_context, not
20587         hack_decl_function_context.
20588         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
20589         DECL_REAL_CONTEXT.
20590         (is_member_template): Use decl_function_context, not
20591         hack_decl_function_context.  Use DECL_CONTEXT, not
20592         DECL_CLASS_CONTEXT.
20593         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
20594         DECL_CLASS_CONTEXT.
20595         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
20596         DECL_REAL_CONTEXT.
20597         (push_template_decl_real): Likewise.
20598         (instantiate_class_template): Don't call add_friends.
20599         (tsubst_default_argument): Use DECL_CONTEXT, not
20600         DECL_REAL_CONTEXT.
20601         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
20602         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20603         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
20604         DECL_CLASS_CONTEXT.
20605         * repo.c (repo_inline_used): Likewise.
20606         * search.c (current_scope): Adjust for new _CONTEXT macros.
20607         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
20608         DECL_REAL_CONTEXT.
20609         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20610         (lookup_fnfields_here):Likewise.
20611         (check_final_overrider): Likewise.
20612         (init_vbase_pointers): Likewise.
20613         (virtual_context): Likewise.
20614         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
20615         (expand_body): Use decl_function_context, not
20616         hack_decl_function_context.
20617         * tree.c (hack_decl_function_context): Remove.
20618         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
20619         DECL_CLASS_CONTEXT.
20620         * typeck2.c (error_not_base_type): Likewise.
20622 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
20624         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
20626 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
20628         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
20630 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
20632         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
20634 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
20636         * decl2.c (lang_decode_option): Enable automatic line wrapping.
20638 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
20640         * parse.y (frob_specs): Split out...
20641         (parse_decl): From here.
20642         (fn.def2): Call initial_deferred_type_access_control.
20643         (after_type_component_declarator0): Call frob_specs.
20644         (notype_component_declarator0): Likewise.
20645         * search.c (friend_accessible_p): Nested classes are friends of their
20646         enclosing classes.
20648 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
20650         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
20651         used to create an implicit temporary.
20653         * class.c (dfs_modify_vtables): Tweak calculation of functions to
20654         override.
20656 2000-02-08  Nathan Sidwell  <nathan@acm.org>
20658         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
20659         strip array element qualifiers too.
20661 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
20663         * decl.c (store_parm_decls): Don't build cleanups for parameters
20664         while processing_template_decl.
20666 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
20668         * cp-tree.h (struct saved_scope): Add incomplete field.
20669         (namespace_scope_incomplete): New macro.
20670         * decl.c (pushdecl): Use it.
20671         (hack_incomplete_structures): Use it.  See through artificial
20672         binding levels.
20673         (mark_saved_scope): Mark it.
20675         Implement access control for nested types.
20676         * search.c (type_access_control): New fn.
20677         (accessible_p): Now we do perform access control for types.
20678         * semantics.c (deferred_type_access_control): New fn.
20679         (initial_deferred_type_access_control): New fn.
20680         (begin_function_definition): Call it.  Add lookups parm.
20681         * decl.c (struct binding_level): Add this_class field.
20682         (pushlevel_class): Set it.
20683         (mark_binding_level): Mark it.
20684         (lookup_name_real): Use it.  Call type_access_control.
20685         (mark_saved_scope): Mark lookups field.
20686         * cp-tree.h (flagged_type_tree): Add lookups field.
20687         (struct saved_scope): Add lookups field.
20688         (type_lookups): New macro.
20689         * parse.y (declmods): Now <ftype>.
20690         (parse_decl): Add lookups parm.  Call
20691         initial_deferred_type_access_control.
20692         (lang_extdef): Clear type_lookups.
20693         (typed_declspecs, declmods, typespec): Set lookups field.
20694         (initdcl): Call deferred_type_access_control.
20695         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
20696         component_decl_1, named_parm): Adjust.
20697         * friend.c (is_friend): Nested classes are friends of their
20698         enclosing classes.
20700         * class.c (currently_open_derived_class): New fn.
20701         * method.c (hack_identifier): Use it.
20703         * lex.c (do_identifier): Remove obsolete code.
20705         * parse.y (typed_typespecs): Propagate new_type_flag properly.
20707 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
20709         * tinfo.h: Remove apostrophes from C++ comment (xgettext
20710         thinks this file is plain C).
20712 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
20714         * Makefile.in (call.o): Depend on $(EXPR_H).
20716         * call.c: Include "expr.h".
20718         * class.c (dump_class_hierarchy): Add prototype.
20720         * search.c (dfs_get_pure_virtuals): Likewise.
20722 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
20724         * parse.y (simple_stmt): Allow :: token in asm parameter list.
20725         * parse.c: Rebuilt.
20727 2000-01-31  Jim Wilson  <wilson@cygnus.com>
20729         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
20730         Store it in DECL_FCONTEXT.
20731         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
20733 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
20735         * tinfo.h (old abi): #include "tconfig.h".
20736         * tinfo.cc (convert_to_base): Move into old abi section.
20738 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
20740         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
20741         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
20742         (BINFO_PRIMARY_BINFO): New macro.
20743         (BF_DELTA): Rename to ...
20744         (BV_DELTA): ... this.
20745         (BF_VCALL_INDEX): Rename to ...
20746         (BV_VCALL_INDEX): ... this.
20747         (BF_FN): Rename to ...
20748         (BV_FN): ... this.
20749         * class.c (build_vbase_path): Adjust for changes to reverse_path.
20750         (set_rtti_entry): Rename BF_ macros to BV_ variants.
20751         (modify_vtable_entry): Simplify.
20752         (add_virtual_function): Rename BF_ macros to BV_ variants.
20753         (build_vtable_initializer): Likewise.
20754         (get_class_offset_1): Remove.
20755         (dfs_get_class_offset): Likewise.
20756         (get_class_offset): Likewise.
20757         (dfs_find_final_overrider): New function.
20758         (find_final_overrider): Likewise.
20759         (modify_one_vtable): Remove.
20760         (dfs_find_base): New function.
20761         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
20762         find_final_overrider.
20763         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
20764         virtuals.
20765         (dfs_fixup_vtable_deltas): Remove.
20766         (override_one_vtable): Remove.
20767         (merge_overrides): Likewise.
20768         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
20769         unreal chilren of virtual bases.
20770         (finish_struct_1): Don't use merge_overrides.  Don't use
20771         dfs_fixup_vtable_deltas.
20772         * tree.c (reverse_path): Return a TREE_LIST, not a chain of
20773         BINFOs.
20775 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
20776             Jason Merrill  <jason@yorick.cygnus.com>
20778         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
20780 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
20782         * exception.cc (__throw_bad_typeid): Add missing std::.
20784 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
20786         * cp-tree.h (make_thunk): PROTO -> PARAMS.
20788 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
20790         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
20792         Runtime support for new-abi rtti.
20793         * inc/typeinfo (type_info::operator!=): Define in class.
20794         (type_info::before, type_info::name, type_info::operator==,
20795         type_info::operator!=): Define new ABI implementations.
20796         (type_info::is_pointer_p, type_info::is_function_p): Declare
20797         new virtual functions.
20798         (type_info::do_catch, type_info::do_upcast): Likewise.
20800         * tinfo.h (__base_class_info): Define new class.
20801         (__class_type_info): Likewise.
20802         (__si_class_type_info): Likewise.
20803         (__vmi_class_type_info): Likewise.
20804         (__dynamic_cast): Prototype.
20806         * tinfo.cc: Conditionalize old and new rtti mechanisms.
20807         (type_info::is_pointer_p): Define new function.
20808         (type_info::is_function_p): Likewise.
20809         (type_info::do_catch): Likewise.
20810         (type_info::do_upcast): Likewise.
20811         (vtable_prefix): New structure for vtable access.
20812         (adjust_pointer): Define new template function.
20813         (contained_p, public_p, virtual_p, contained_public_p,
20814         contained_nonpublic_p, contained_nonvirtual_p): Define new
20815         functions.
20816         (nonvirtual_base_type): New local variable.
20817         (__class_type_info::~__class_type_info): Define.
20818         (__si_class_type_info::~__si_class_type_info): Likewise.
20819         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
20820         (__class_type_info::do_catch): Define new function.
20821         (__class_type_info::do_upcast): Likewise.
20822         (__class_type_info::find_public_src): Likewise.
20823         (__class_type_info::do_find_public_src): Likewise.
20824         (__si_class_type_info::do_find_public_src): Likewise.
20825         (__vmi_class_type_info::do_find_public_src): Likewise.
20826         (__class_type_info::do_dyncast): Likewise.
20827         (__si_class_type_info::do_dyncast): Likewise.
20828         (__vmi_class_type_info::do_dyncast): Likewise.
20829         (__class_type_info::do_upcast): Likewise.
20830         (__si_class_type_info::do_upcast): Likewise.
20831         (__vmi_class_type_info::do_upcast): Likewise.
20832         (__dynamic_cast): Likewise.
20834         * tinfo2.cc (__fundamental_type_info): Define new class.
20835         (__pointer_type_info): Likewise.
20836         (__reference_type_info): Likewise.
20837         (__array_type_info): Likewise.
20838         (__function_type_info): Likewise.
20839         (__enum_type_info): Likewise.
20840         (__ptr_to_member_type_info): Likewise.
20841         (__fundamental_type_info::~__fundamental_type_info): Define.
20842         (__pointer_type_info::~__pointer_type_info): Likewise.
20843         (__reference_type_info::~__reference_type_info): Likewise.
20844         (__array_type_info::~__array_type_info): Likewise.
20845         (__function_type_info::~__function_type_info): Likewise.
20846         (__enum_type_info::~__enum_type_info): Likewise.
20847         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
20848         (__pointer_type_info::do_catch): Define new function.
20849         (__ptr_to_member_type_info::do_catch): Define new function.
20851         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
20852         (__is_pointer): Likewise.
20854         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
20856 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
20858         * cp/class.c (build_vtable): Rename to build_primary_vtable.
20859         (prepare_fresh_vtable): Rename to build_secondary_vtable.
20860         (make_new_vtable): New function.
20861         (modify_vtable_entry): Handle generation of new vtables correctly.
20862         (modify_one_vtable): Remove unused parameter.
20863         (dfs_fixup_vtable_deltas): Likewise.
20864         (override_one_vtable): Use build_secondary_vtable.
20865         (finish_struct_1): Use build_primary_vtable and
20866         build_secondary_vtable.
20868 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
20870         * cp/decl.c: Adjust variable names, comments, help strings.
20872 2000-01-29  Nathan Sidwell  <nathan@acm.org>
20874         * new2.cc (operator delete[]): Use operator delete, don't assume
20875         implementation.
20877 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
20879         * class.c (build_vtbl_initializer): Add argument to
20880         build_vtable_entry call.
20882 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
20884         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
20885         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
20886         (BF_DELTA): New macro.
20887         (BF_VCALL_INDEX): Likewise.
20888         (BF_FN): Likewise.
20889         (THUNK_VCALL_OFFSET): Likewise.
20890         (make_thunk): Change prototype.
20891         * class.c (build_vtable_entry): Integrate
20892         build_vtable_entry_for_fn.  Handle vcall indices.
20893         (build_vtable_entry_for_fn): Remove.
20894         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
20895         BF_VCALL_INDEX, BF_FN.
20896         (modify_vtable_entry): Integrate common code from
20897         modify_one_vtable and dfs_fixup_vtable_deltas.
20898         (add_virtual_function): Set BF_VCALL_INDEX.
20899         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
20900         and BF_FN.
20901         (modify_one_vtable): Simplify.
20902         (dfs_fixup_vtable_deltas): Likewise.
20903         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
20904         * method.c (make_thunk): Handle vcall indices.
20906 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
20908         Compiler side new abi rtti (not enabled).
20909         * cp-tree.h (new_abi_rtti_p): New macro.
20910         (emit_support_tinfos): Prototype new function.
20911         (tinfo_decl_p): Likewise.
20912         (emit_tinfo_decl): Likwise.
20913         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
20914         macros.
20915         (doing_runtime): New local static.
20916         (init_rtti_processing): Add new-abi initializer.
20917         (get_tinfo_decl): Add new-abi logic.
20918         (tinfo_from_decl): Likewise.
20919         (build_dynamic_cast_1): Likewise.
20920         (qualifier_flags): New static function.
20921         (tinfo_base_init): Likewise.
20922         (generic_initializer): Likewise.
20923         (ptr_ref_initializer): Likewise.
20924         (ptmd_initializer): Likewise.
20925         (class_hint_flags): Likewise.
20926         (class_initializer): Likewise.
20927         (synthesize_tinfo_var): Likewise.
20928         (create_real_tinfo_var): Likewise.
20929         (create_pseudo_type_info): Likewise.
20930         (get_vmi_pseudo_type_info): Likewise.
20931         (create_tinfo_types): Likewise.
20932         (emit_support_tinfos): New global function.
20933         (tinfo_decl_p): New global predicate.
20934         (emit_tinfo_decl): New global function.
20935         * class.c (set_rtti_entry): Generalize for old and new rtti.
20936         (build_vtbl_initializer): Likewise.
20937         * decl2.c (finish_file): Likewise.
20939 2000-01-27  Jim Wilson  <wilson@cygnus.com>
20941         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
20942         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
20944 2000-01-27  Mike Stump  <mrs@wrs.com>
20946         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
20947         for scopes.
20949 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
20951         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
20953 2000-01-26  J"orn Rennecke <amylaar@cygnus.co.uk>
20955         * optimize.c (calls_setjmp_r): Supply new argument
20956         to special_function_p.
20958 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
20960         * call.c: PROTO -> PARAMS.
20961         * class.c: Likewise.
20962         * cp-tree.h: Likewise.
20963         * cvt.c: Likewise.
20964         * decl.c: Likewise.
20965         * decl.h: Likewise.
20966         * decl2.c: Likewise.
20967         * dump.c: Likewise.
20968         * errfn.c: Likewise.
20969         * error.c: Likewise.
20970         * except.c: Likewise.
20971         * expr.c: Likewise.
20972         * init.c: Likewise.
20973         * input.c: Likewise.
20974         * lex.c: Likewise.
20975         * lex.h: Likewise.
20976         * method.c: Likewise.
20977         * optimize.c: Likewise.
20978         * parse.y: Likewise.
20979         * pt.c: Likewise.
20980         * repo.c: Likewise.
20981         * rtti.c: Likewise.
20982         * search.c: Likewise.
20983         * semantics.c: Likewise.
20984         * spew.c: Likewise.
20985         * tree.c: Likewise.
20986         * typeck.c: Likewise.
20987         * typeck2.c: Likewise.
20988         * xref.c: Likewise.
20990 2000-01-25  Richard Henderson  <rth@cygnus.com>
20992         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
20994 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
20996         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
20997         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
20998         (struct vcall_offset_data_s): New type.
20999         (dfs_vcall_offset_queue_p): New function.
21000         (dfs_build_vcall_offset_vtbl_entries): Likewise.
21001         (build_vcall_offset_vtbl_entries): Likewise.
21002         (layout_vtable_decl): Likewise.
21003         (num_vfun_entries): Likewise.
21004         (num_extra_vtbl_entries): Add the entries for vcall offsets.
21005         (build_vtbl_initializer): Likewise.
21006         (dfs_finish_vtabls): Use layout_vtable_decl.
21007         (modify_one_vtables): Always duplicate vtables under the new ABI.
21008         (finish_struct_1): Use layout_vtable_decl.
21010 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
21012         * decl.c (member_function_or_else): Change third arg from a format
21013         specifier to an `enum overload_flags'.  Callers changed.
21015 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
21017         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
21018         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
21019         build_const_cast, get_delta_difference, check_return_expr): Avoid
21020         ANSI string concatenation usage.
21022 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
21024         * class.c (layout_class_type): Put the fields required to make a
21025         class non-empty at the end, not the beginning, of the TYPE_FIELDs
21026         list.
21028 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
21030         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
21031         template.
21033         * decl2.c (mark_used): Do instantiate inlines that have been
21034         explicitly instantiated.
21036 2000-01-24  Richard Henderson  <rth@cygnus.com>
21038         * call.c (build_over_call): Use expand_tree_builtin.
21039         * typeck.c (build_function_call_real): Likewise.
21040         (build_binary_op_nodefault): Handle unordered compares.
21042 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
21044         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
21045         cp_tree_index values.
21046         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
21047         New global node #defines for them.
21048         * rtti.c (call_void_fn): Replace with ...
21049         (build_runtime_decl): ... new static function.
21050         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
21051         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
21052         (build_dynamic_cast_1): Always produce correctly typed result.
21053         Explicitly produce type_info addresses. Use dynamic_cast_node.
21054         * exception.cc (__throw_bad_cast): Return `void *'.
21055         (__throw_bad_typeid): Return `const type_info &'.
21057 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
21059         * cp-tree.h (get_vtable_decl): Prototype new function.
21060         * class.c (get_vtable_decl): New function. Broken out from ...
21061         (build_vtable): ... here. Use it.
21062         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
21063         by get_vtable_decl.
21065 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
21067         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
21068         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
21069         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
21070         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
21071         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
21072         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
21073         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
21074         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
21075         (CPTI_TINFO_VAR_ID): New enumeration.
21076         (__tp_desc_type_node, __access_mode_type_node,
21077         __bltn_desc_type_node, __user_desc_type_node,
21078         __class_desc_type_node, __ptr_desc_type_node,
21079         __attr_desc_type_node, __func_desc_type_node,
21080         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
21081         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
21082         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
21083         enum_desc_type_node, class_desc_type_node,
21084         si_class_desc_type_node, vmi_class_desc_type_node,
21085         ptmd_desc_type_node, base_desc_type_node): New #defines.
21086         (tinfo_fn_id, tinfo_fn_type): Rename to ...
21087         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
21088         (tinfo_var_id): New enumeration.
21089         (DECL_TINFO_FN_P): Augment comment.
21090         * decl.c (cp_global_trees): Adjust documentation.
21091         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
21092         tinfo_decl_type and tinfo_var_id.
21093         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
21094         (build_typeid): Remove unused variable.
21095         (get_tinfo_var): Use tinfo_var_id.
21096         (tinfo_name): New static function.
21097         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
21098         (tinfo_from_decl): Likewise.
21099         (get_base_offset): New static function, broken out of
21100         expand_class_desc.
21101         (expand_si_desc): Use tinfo_name.
21102         (expand_class_desc): Likewise. Lose local static variable.
21103         Use base_desc_type_node. Use get_base_offset.
21104         (expand_ptr_desc): Use tinfo_name.
21105         (expand_attr_desc): Likewise.
21106         (expand_generic_desc): Likewise.
21108         * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
21109         * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
21111 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
21113         * cp-tree.h (__eprintf): Remove declaration.
21114         * tree.c (__eprintf): Remove definition.
21116 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
21117             Mark Mitchell  <mark@codesourcery.com>
21119         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
21120         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
21122 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
21124         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
21126 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
21128         * cp-tree.h (register_dtor_fn): New function.
21129         * decl.c (destroy_local_static): Rename to ...
21130         (register_dtor_fn): ... this.  Give it external linkage.
21131         (expand_static_init): Use it.
21132         * decl2.c (do_static_initialization): Likewise, if using
21133         __cxa_atexit.
21134         (do_static_destruction): Check that __cxa_atexit is not in use.
21135         (finish_file): Don't call do_static_destruction if using
21136         __cxa_atexit.
21138         * typeck.c (convert_arguments): Restore two-message error
21139         reporting.
21141 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
21143         Remap dynamic cast hint values to be consistent across ABIs.
21144         * search.c (dynamic_cast_base_recurse): Remap generated value.
21145         (get_dynamic_cast_base_type): Adjust documentation.
21146         * tinfo.h (__user_type_info::dyncast): Likewise.
21147         (__user_type_info::find_public_subobj): Remap BOFF meaning.
21148         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
21149         (__class_type_info::do_dyncast): Likewise.
21150         (__class_type_info::do_find_public_subobj): Likewise.
21151         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
21153 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
21155         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
21157         * typeck2.c (incomplete_type_error): Restore previous
21158         cp_error and cp_error_at call sequence.
21160 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
21162         * class.c (dump_class_hierarchy): Make format agree with argument;
21163         cast pointer to unsigned long and print with %lx.
21165 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
21167         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
21169         * typeck.c (composite_pointer_type, common_type,
21170         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
21171         build_function_call_real, convert_arguments,
21172         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
21173         build_unary_op, mark_addressable, build_compound_expr,
21174         build_static_cast, build_reinterpret_cast, build_const_cast,
21175         build_c_cast, build_modify_expr, get_delta_difference,
21176         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
21177         'ISO C++'.  Fusion consecutive calls to diagnostic message routines
21178         into a single one.
21179         * typeck2.c (readonly_error, abstract_virtuals_error,
21180         process_init_constructor, check_for_new_type): Likewise.
21182 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
21184         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
21185         VAR_DECLs.
21187 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
21189         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
21190         (build_x_typeid): Likewise.
21191         (get_tinfo_fn): Likewise.
21192         (get_tinfo_fn_unused): Rename to ...
21193         (get_tinfo_decl): ... here.
21194         * rtti.c (build_headof): Replace logic error with assertion.
21195         (get_tinfo_fn_dynamic): Rename to ...
21196         (get_tinfo_decl_dynamic): ... here. Make static. Use
21197         complete_type_or_else.
21198         (build_x_typeid): Move into ...
21199         (build_typeid): ... here. Adjust call to
21200         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
21201         throw_bad_typeid expression.
21202         (get_tinfo_fn_unused): Rename to ...
21203         (get_tinfo_decl): ... here. Adjust comment.
21204         (get_tinfo_fn): Delete.
21205         (tinfo_from_decl): New static function.
21206         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
21207         (get_typeid): Use complete_type_or_else.
21208         (build_dynamic_cast_1): Adjust calls to
21209         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
21210         * parse.y (primary): Adjust call to build_typeid.
21211         * except.c (build_eh_type_type_ref): Adjust call to
21212         get_tinfo_decl. Mark as used.
21213         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
21214         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
21215         * parse.c: Regenerated.
21217 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
21219         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
21220         calling convention.
21221         (resolves_to_fixed_type_p): Document calling convention.
21222         * rtti.c (build_x_typeid): Initialize NONNULL.
21224         * cp-tree.h (build_shared_int_cst): New function.
21225         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
21226         * class.c (modify_vtable_entry): Likewise.
21227         (add_virtual_function): Split out code to generated shared
21228         INTEGER_CSTs to build_share_int_cst.
21229         (modify_all_vtables): Handle all the overridden functions here.
21230         Add overridden functions from non-primary virtual bases to the
21231         primary vtable.
21232         (finish_struct_1): Adjust call to modify_all_vtables.  Add
21233         overridden functions from non-primary bases to the vtable.
21234         * tree.c (build_shared_int_cst): New function.
21236         * cp-tree.h (scratchalloc): Remove.
21237         (build_scratch_list): Likewise.
21238         * call.c (convert_class_to_reference): Replace build_scratch_list
21239         and build_expr_list with build_tree_list.
21240         (add_candidate): Replace scratchalloc with expralloc.  Note memory
21241         leak.
21242         (build_user_type_conversion_1):  Replace build_scratch_list
21243         and build_expr_list with build_tree_list.
21244         (build_new_op): Likewise.
21245         (build_op_delete_call): Likewise.
21246         (convert_like): Likewise.
21247         * cvt.c (ocp_convert): Likewise.
21248         * decl.c (start_decl): Likewise.
21249         (start_function): Likewise.
21250         (finish_destructor_body): Likewise.
21251         (maybe_build_cleanup_1): Likewise.
21252         * decl2.c (reparse_decl_as_expr): Likewise.
21253         * init.c (perform_member_init): Likewise.
21254         (expand_cleanup_for_base): Likewise.
21255         (build_builtin_delete_call): Likewise.
21256         (build_new_1): Likewise.
21257         (build_delete): Likewise.
21258         * method.c (do_build_assign_ref): Likewise.
21259         * parse.y (already_scoped_stmt): Likewise.
21260         (nontrivial_exprlist): Likewise.
21261         (net_initializer): Likewise.
21262         (initlist): Likewise.
21263         * parse.c: Regenerated.
21264         * rtti.c (build_x_typeid): Likewise.
21265         (build_dynamic_cast_1): Likewise.
21266         * typeck.c (build_x_compound_expr): Likewise.
21267         (build_static_cast): Likewise.
21268         (build_modify_expr): Likewise.
21270         * cp-tree.h (DECL_VINDEX): Add documentation.
21271         * class.c (build_vtable_entry): Likewise.
21272         (start_vtable): Add comment.
21273         (add_virtual_function): Replace pending_hard_virtuals with
21274         overridden_virtuals and pending_virtuals with new_virtuals.
21275         Replace redundant assignments with assertions.
21276         (check_for_override): Add comment.
21277         (check_bases_and_members): Replace pending_hard_virtuals with
21278         overridden_virtuals and pending_virtuals with new_virtuals.
21279         (create_vtbl_ptr): Likewise.
21280         (layout_class_type): Likewise.
21281         (finish_struct_1): Likewise.  Add comments.
21283 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
21285         * class.c (finish_struct_1): Replace redundant code with
21286         assertions.
21288         * cp-tree.h (flag_new_abi): Move.
21289         (flag_use_cxa_atexit): Likewise.
21290         (flag_honor_std): Likewise.
21291         (flag_rtti): Likewise.
21292         (vbase_offsets_in_vtable_p): Define.
21293         (vptrs_present_everywhere_p): Likewise.
21294         (TYPE_CONTAINS_VPTR_P): Likewise.
21295         (dfs_walk_real): Declare.
21296         * class.c (build_vbase_pointer_fields): Check
21297         vbase_offsets_in_vtable_p.
21298         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
21299         BINFO_VPTR_FIELD.
21300         (build_vbase_offset_vtbl_entries): Simplify.
21301         (build_vbase_offset_vtbl_entries): Adjust.
21302         (build_vbase_pointer): Add ability to look up vbase offsets in
21303         vtable.
21304         (start_vtable): New function.
21305         (add_virtual_function): Use it.
21306         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
21307         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
21308         (build_vtbl_initializer): Take the type of the complete object as
21309         input.  Use it to correctly calculate vbase offsets.
21310         (dfs_finish_vtbls): Pass the complete type to
21311         build_vtbl_initializer.
21312         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
21313         (create_vtable_ptr): Create a vtable even if there are no
21314         new virtual functions, under the new ABI.
21315         (finish_struct_1): Likewise.
21316         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
21317         * decl.c (exapnd_static_init): Remove call to
21318         preserve_initializer.
21319         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
21320         vtables.
21321         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
21322         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
21323         (construct_virtual_bases): Don't initialize virtual base pointers
21324         under the new ABI.
21325         (build_aggr_init): Clean up comment.
21326         (expand_aggr_init_1): Likewise.
21327         * rtti.c (expand_class_desc): Store the virtual function table
21328         index where the vbase offset lives in the offset field.
21329         * search.c (dfs_walk_real): Make it global.
21330         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
21331         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
21333         * tinfo.h (USItype): Make it signed under the new ABI.
21334         * tinfo.cc (convert_to_base): New function.  Encapsulate base
21335         conversion logic here.
21336         (__class_type_info::do_upcast): Use it.
21337         (__class_type_info::do_dyncast): Likewise.
21338         (__class_type_info::do_find_public_subobj): Likewise.
21340         * init.c (construct_virtual_bases): Don't look up the addresses of
21341         virtual bases at run-time.
21343         * class.c (build_vbase_pointer): Relocate.
21344         (build_vbase_pointer_fields): Likewise.
21345         (dfs_build_vbase_offset_vtbl_entries): Likewise.
21346         (build_vbase_offset_vtbl_entries): Likewise.
21348         * decl.c (init_decl_processing): Complain if -fnew-abi
21349         -fno-vtable-thunks is used.
21351         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
21352         flag_new_abi.
21354 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
21356         * cp-tree.h (num_extra_vtbl_entries): New function.
21357         (size_extra_vtbl_entries): Likewise.
21358         (dfs_vtable_path_unmark): Likewise.
21359         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
21360         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
21361         * class.c (num_extra_vtbl_entries): New function.
21362         (size_extra_vtbl_entries): Likewise.
21363         (dfs_build_vbase_offset_vtbl_entries): New function.
21364         (build_vbase_offset_vtbl_entries): Likewise.
21365         (build_vtbl_initializer): Use it.
21366         (finish_struct_1): Adjust vtable sizes (using
21367         num_extra_vtbl_entries).
21368         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
21369         THUNK_DECL is non-NULL before expanding it.
21370         * init.c (expand_virtual_init): Adjust the vtable pointer by
21371         size_extra_vtbl_entries before storing it.
21372         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
21373         Handle TREE_LIST parameters here, not in the dfs_* functions.
21374         (dfs_unmarked_real_bases_queue_p): Adjust.
21375         (dfs_marked_real_bases_queue_p): Likewise.
21376         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
21377         (dfs_vtable_path_marked_real_bases_queue_p): New function.
21378         (dfs_vtable_path_unmark): Likewise.
21380 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
21382         * optimize.c (copy_body_r): Clear the operand three of a
21383         TARGET_EXPR when copying it.
21385 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
21387         * method.c (build_decl_overload_real): Check whether we are in ::
21388         before returning __builtin_new/delete.
21390 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
21392         * pt.c (tsubst_friend_function): Improve comment.
21393         (instantiate_decl): Avoid crashing when a "nested" function is
21394         instantiated from the top level.
21396         * dump.c (dqeueue_and_dump): Dump
21397         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
21399 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
21401         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
21403 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
21405         * g++spec.c (lang_specific_driver): Add -fnew-abi if
21406         ENABLE_NEW_GXX_ABI defined.
21407         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
21408         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
21409         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
21411 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
21413         * decl.c (start_cleanup_fn): Call pushdecl.
21415         * call.c (convert_class_to_reference): Fix typos.
21416         (build_conditional_expr): Handle errors gracefully.
21417         * class.c (push_nested_class): Likewise.
21418         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
21419         (DECL_THIS_EXTERN): Use it.
21420         (DECL_THIS_STATIC): Likewise.
21421         * cvt.c (convert_to_void): Handle errors gracefully.
21422         (build_expr_type_conversion): Likewise.
21423         * decl.c (maybe_push_decl): Likewise.
21424         (start_decl_1): Likewise.
21425         (require_complete_types_for_parms): Likewise.
21426         * parse.y (structsp): Likewise.
21427         (base_class): Likewise.
21428         * parse.c: Regenerated.
21429         * pt.c (finish_member_template_decl): Likewise.
21430         * typeck.c (decay_conversion): Likewise.
21432         * cp-tree.h (dfs_skip_vbases): New function.
21433         (find_vbase_instance): Likewise.
21434         * class.c (determine_primary_base): Allow a nearly empty base to
21435         serve as a primary base class under the new ABI.
21436         (get_class_offset_1): Rename to ...
21437         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
21438         messages here.
21439         (get_class_offset): Use it.  Issue error messages here.
21440         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
21441         find the right copies of virtual bases.
21442         (fixup_vtable_deltas1): Rename to ...
21443         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
21444         bases as primary bases.
21445         (fixup_vtable_deltas): Remove.
21446         (override_one_vtable): Handle virtual bases as primary bases.
21447         (merge_overrides): Likewise.
21448         (finish_struct_1): Likewise.
21449         (dump_class_hierarchy): Dump primary-ness of bases as well.
21450         * search.c (mark_primary_bases): Use a pre-order traversal to
21451         handle primary virtual bases.
21452         (dfs_skip_vbases): New fiunction.
21453         (expand_upcast_fixups): Adjust to handle primary virtual bases.
21454         (fixup_virtual_upcast_offsets): Likewise.
21455         (fixup_all_virtual_upcast_offsets): Likewise.
21456         (dfs_find_vbase_instances): New function.
21457         (find_vbase_instance): Likewise.
21459 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
21461         * lex.c (DIR_SEPARATOR): Delete macro.
21463 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
21465        * decl2.c (lang_decode_option): Handle automatic line wrapping
21466        option.
21468 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
21470         * friend.c (do_friend): Don't resolve scopes when processing
21471         template declarations, even if the qualifying scope doesn't
21472         involve template parameters.
21474 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
21476         * class.c (dfs_modify_vtables_queue_p): Remove.
21477         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
21478         and dfs_marked_real_bases_queue_p instead of
21479         dfs_modify_vtables_queue_p.
21481         * class.c (build_vbase_path): Simplify.
21482         (dfs_propagate_binfo_offsets): New function.
21483         (propagate_binfo_offsets): Use it.
21484         (remove_base_field): Simplify.
21485         (dfs_set_offset_for_vbases): Remove.
21486         (dfs_set_offset_for_shared_vbases): New function.
21487         (dfs_set_offset_for_unshared_vbases): Likewise.
21488         (layout_virtual_bases): Use them.
21489         (layout_basetypes): Don't call propagate_binfo_offsets.
21490         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
21491         for the vbases.
21493         * class.c (build_base_field): New function, split out from ...
21494         (build_base_fields): ... here.  Use it.  Allocate primary bases
21495         first, under the new ABI.
21496         (get_vtable_entry): Remove.
21497         (remove_base_field): New function, split out from ...
21498         (remove_base_fields): ... here.  Adjust since primary bases come
21499         first under the new ABI.
21501         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
21502         (initialize_vtbl_ptrs): New function.
21503         (expand_indirect_vtbls_init): Change prototype.
21504         (convert_pointer_to_vbase): Declare.
21505         * init.c (expand_direct_vtbls_init): Remove.
21506         (dfs_initialize_vtbl_ptrs): New function.
21507         (initialize_vtbl_ptrs): Likewise.
21508         (emit_base_init): Use initialize_vtbl_ptrs.
21509         * search.c (convert_pointer_to_vbase): Make it global.
21510         (expand_indirect_vtbls_init): Remove vtable initialization code.
21511         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
21513         * class.c (dfs_finish_vtbls): New function.
21514         (finish_vtbls): Use it.
21515         (dump_class_hierarchy): New function.
21517         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
21518         (BINFO_VBASE_PRIMARY_P): New macro.
21519         (BINFO_VIRTUALS): Add to documentation.
21520         (SET_BINFO_PRIMARY_MARKED_P): Remove.
21521         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
21522         (dfs_mark_primary_bases_queue_p): Likewise.
21523         (dfs_unmarked_real_bases_queue_p): New function.
21524         (dfs_marked_real_bases_queue_p): Likewise.
21525         * search.c (dfs_mark_primary_bases): Adjust.
21526         (mark_primary_bases): Likewise.
21527         (get_shared_vbase_if_not_primary): New function.
21528         (dfs_unmarked_real_bases_queue_p): Likewise.
21529         (dfs_marked_real_bases_queue_p): Likewise.
21530         (dfs_get_pure_virtuals): Simplify.
21531         (get_pure_virtuals): Likewise.
21533 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
21535         * lex.c: Include tm_p.h.
21537 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
21539         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
21541 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
21543         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
21544         * pt.c (instantiate_decl): Defer comdat templates that might not be
21545         needed.
21547         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
21548         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
21549         (finish_file): Likewise.
21551         * decl2.c (import_export_class): Undo 12/14 change.
21553         * error.c (dump_decl): operator new, not operatornew.
21555         * class.c (field_decl_cmp): A nontype is "greater" than a type.
21556         * search.c (lookup_field_1): Look for the last field with the
21557         desired name.
21559 2000-01-05  Nathan Sidwell  <nathan@acm.org>
21561         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
21562         FUNCTION_DECL.
21564 2000-01-05  Nathan Sidwell  <nathan@acm.org>
21566         * typeck.c (build_static_cast): Don't strip target qualifiers
21567         when casting from a class.
21569 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
21571         * class.c (warn_hidden): Initialize variable `fndecl'.
21573 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
21575         * decl.c (flag_isoc9x): New variable to be able to use code in
21576         c-common.c.  For now always zero.
21578 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
21580         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
21581         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
21582         or unshare_base_binfos for virtual bases here.
21583         * search.c (dfs_get_vbase_types): Do it here.
21584         (get_vbase_types): Adjust.
21586 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
21588         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
21589         (BINFO_PRIMARY_MARKED_P): Use flag 5.
21590         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
21591         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
21592         (unmark_primary_bases): Remove declaration.
21593         (unmarkedp): Declare.
21594         (dfs_vbase_unmark): Likewise.
21595         * class.c (determine_primary_base): Return immediately if there
21596         are no base classes.  Call mark_primary_bases here.
21597         (modify_all_direct_vtables): Remove.
21598         (modify_all_indirect_vtables): Remove.
21599         (dfs_modify_vtables_queue_p): New function.
21600         (dfs_modify_vtables): New function.
21601         (modify_all_vtables): Use them.
21602         (build_base_fields): Build FIELD_DECLs for primary virtual base
21603         classes.
21604         (create_vtable_ptr): Don't call determine_primary_base here.
21605         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
21606         (dfs_set_offset_for_vbases): ... this.
21607         (layout_virtual_bases): Use it.
21608         (layout_class_type): Call determine_primary_base here.
21609         * search.c (unmarkedp): Make it global.
21610         (shared_marked_p): Simplify.
21611         (shared_unmarked_p): Likewise.
21612         (dfs_primary_bases_queue_p): Remove.
21613         (dfs_unmark_primary_bases): Likewise.
21614         (unmark_primary_bases): Likewise.
21615         (mark_primary_bases): Simplify.
21616         (get_pure_virtuals): Don't call mark_primary_bases here.
21617         (dfs_vbase_unmark): New function.
21618         (get_vbase_types): Simplify.
21620         * class.c (struct base_info): Remove.
21621         (determine_primary_base): Take has_virtual_p rather than a
21622         base_info as input.  Don't calculate max_has_virtual.
21623         (finish_struct_bits): Remove max_has_virtual argument.
21624         (create_vtable_ptr): Remove max_has_virtual_p argument.
21625         (layout_virtual_bases): Remove max argument.
21626         (layout_basetypes): Likewise.
21627         (layout_class_type): Remove max_has_virtual_p argument.
21628         (finish_struct_1): Remove max_has_virtual.
21630         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
21631         (layout_basetypes): Remove.
21632         * class.c (propagate_binfo_offsets): Moved here from tree.c.
21633         Update to handle primary virtual bases.
21634         (remove_base_fields): New function, split out from
21635         layout_basetypes.
21636         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
21637         (layout_virtual_bases): New function, split out from
21638         layout_basetypes.  Update to handle primary virtual bases.
21639         (layout_basetypes): Moved here from tree.c.  Use
21640         remove_base_fields and layout_virtual_bases.
21641         * search.c (dfs_mark_primary_bases_queue_p): New function.
21642         (mark_primary_bases): Use it.
21643         * tree.c (CEIL): Remove.
21644         (propagate_binfo_offsets): Remove.
21645         (layout_basetypes): Remove.
21647 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
21649         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
21650         (BINFO_PRIMARY_MARKED_P): New macro.
21651         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
21652         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
21653         (mark_primary_bases): New function.
21654         (unmark_primary_bases): Likewise.
21655         * search.c (get_abstract_virtuals_1): Remove.
21656         (dfs_mark_primary_bases): New function.
21657         (mark_primary_bases): Likewise.
21658         (dfs_unmark_primary_bases): Likewise.
21659         (unmark_primary_bases): Likewise.
21660         (dfs_get_pure_virtuals): Likewise.
21662 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
21664         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
21665         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
21666         (modify_one_vtable): Adjust.
21667         (fixup_vtable_deltas1): Likewise.
21668         (override_one_vtable): Likewise.
21669         * search.c (get_abstract_virtuals_1): Likewise.
21670         (get_pure_virtuals): Likewise.
21671         (expand_upcast_fixups): Likewise.
21672         * tree.c (debug_binfo): Likewise.
21674         * class.c (build_vtable): Don't return a value.  Don't rebuild
21675         vtables for bases that have already been handled.
21676         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
21677         already been handled.
21678         (modify_one_vtable): Adjust accordingly.
21679         (fixup_vtable_deltas1): Likewise.
21680         (finish_struct_1): Likewise.
21682 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
21684         * call.c (build_new_method_call): Also check destructors.