* name-lookup.h (cxx_scope_find_binding_for_name): Don't export.
[official-gcc.git] / gcc / cp / ChangeLog
blobdd25ea37ad807893461de740cda04f2a1afbe2e5
1 2003-10-13  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3         * ChangeLog: Add PR number to patch for PR c++/12370.
5 2003-10-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
7         * name-lookup.h (cxx_scope_find_binding_for_name): Don't export.
8         (binding_for_name): Likewise.
9         (cxx_binding_clear): Move to name-lookup.c.
10         * name-lookup.c (cxx_scope_find_binding_for_name): Now static.
11         (binding_for_name): Likewise.
12         * decl2.c (is_ancestor): Move to name-lookup.c
13         (namespace_ancestor): Likewise.
14         (add_using_namespace): Likewise.
15         (ambiguous_decl): Likewise.
16         (lookup_using_namespace): Likewise.
17         (qualified_lookup_using_namespace): Likewise.
18         (set_decl_namespace): Likewise.
19         (decl_namespace): Likewise.
20         (current_decl_namespace): Likewise.
21         (push_decl_namespace): Likewise.
22         (pop_decl_namespace): Likewise.
23         (push_scope): Likewise.
24         (pop_scope): Likewise.
25         (struct arg_lookup): Likewise.
26         (arg_assoc): Likewise.
27         (arg_assoc_args): Likewise.
28         (arg_assoc_type): Likewise.
29         (add_function): Likewise.
30         (arg_assoc_namespace): Likewise.
31         (arg_assoc_class): Likewise.
32         (arg_assoc_template_arg): Likewise.
33         (do_namespace_alias): Likewise.
34         (validate_nonmember_using_decl): Likewise.
35         (do_nonmember_using_decl): Likewise.
36         (do_toplevel_using_decl): Likewise.
37         (do_local_using_decl): Likewise.
38         (do_class_using_decl): Likewise.
39         (do_using_directive): Likewise.
40         (constructor_name_full): Likewise.
41         (constructor_name): Likewise.
42         (constructor_name_p): Likewise.
44 2003-10-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
46         Break out decl.c (2/n) 
47         * name-lookup.c: Include diagnostic.h
48         (cxx_binding_free): Make static.
49         (cxx_binding_make): Likewise.
50         (binding_table_new): Likewise
51         (binding_table_free): Likewise.
52         (binding_table_insert): Likewise.
53         (binding_table_find_anon_type): Likewise.
54         (binding_table_reverse_maybe_remap): Likewise.
55         (supplement_binding): Likewise.
56         * name-lookup.h (global_scope_name): Declare extern.
57         (global_type_node): Likewise.
58         (cxx_binding_free): Don't export.
59         (cxx_binding_make): Likewise.
60         (binding_table_new): Likewise.
61         (binding_table_free): Likewise.
62         (binding_table_insert): Likewise.
63         (binding_table_find_anon_type): Likewise.
64         (binding_table_reverse_maybe_remap): Likewise.
65         * Make-lang.in (cp/name-lookup.o): Depend on $(DIAGNOSTIC_H)
66         * decl.c (lookup_namespace_name): Move to name-lookup.c
67         (select_decl): Likewise.
68         (unqualified_namespace_lookup): Likewise.
69         (lookup_qualified_name): Likewise.
70         (lookup_name_real): Likewise.
71         (lookup_name_nonclass): Likewise.
72         (lookup_function_nonclass): Likewise.
73         (lookup_name): Likewise.
74         (lookup_name_current_level): Likewise.
75         (lookup_type_current_level): Likewise.
76         (lookup_flags): Likewise.
77         (qualify_lookup): Likewise.
78         (lookup_tag): Likewise.
79         (lookup_tag_reverse): Likewise.
80         (getdecls): Likewise.
81         (storedecls): Remove.
82         (cxx_remember_type_decls): Move to name-lookup.c.
83         (global_bindings_p): Likewise.
84         (innermost_nonclass_level): Likewise.
85         (toplevel_bindings_p): Likewise.
86         (namespace_bindings_p): Likewise.
87         (kept_level_p): Likewise.
88         (innermost_scope_kind): Likewise.
89         (template_parm_scope_p): Likewise.
90         (push_binding): Likewise.
91         (push_local_binding): Likewise.
92         (add_decl_to_level): Likewise.  Make extern.
93         (push_class_binding): Move to name-lookup.c.
94         (resume_level): Likewise.  Rename to resume_scope.
95         (begin_scope): Move to name-lookup.c.
96         (indent): Likewise.
97         (binding_depth): Likewise.
98         (is_class_level): Likewise.
99         (cxx_scope_descriptor): Likewise.
100         (cxx_scope_debug): Likewise.
101         (namespace_scope_ht_size): Likewise.
102         (leave_scope): Likewise.
103         (pushlevel_class): Likewise.
104         (poplevel_class): Likewise.
105         (clear_identifier_class_values): Likewise.
106         (pushdecl_with_scope): Likewise.
107         (pushdecl_namespace_level): Likewise.
108         (pushdecl_class_level): Likewise.
109         (push_class_level_binding): Likewise.
110         (push_using_directive): Likewise.
111         (identifier_global_value): Likewise.
112         (keep_next_level_flag): Likewise.
113         (keep_next_level): Likewise.
114         (free_binding_level): Likewise.
115         (set_class_shadows): Likewise.
116         (maybe_push_cleanup_level): Likewise.
117         (cp_namespace_decls): Likewise.
118         (bt_print_entry): Likewise.
119         (print_binding_level): Likewise.
120         (print_other_binding_stack): Likewise.
121         (print_binding_stack): Likewise.
122         (push_namespace): Likewise.
123         (pop_namespace): Likewise.
124         (push_nested_namespace): Likewise.
125         (pop_nested_namespace): Likewise.
126         (cxx_saved_binding_make): Likewise.
127         (struct cxx_saved_binding_make): Likewise.
128         (store_bindings): Likewise.
129         (maybe_push_to_top_level): Likewise.
130         (push_to_top_level): Likewise.
131         (pop_from_top_level): Likewise.
132         (identifier_type_value): Likewise.
133         (set_identifier_type_value): Likewise.
134         (set_identifier_type_value_with_scope): Likewise.
135         (pop_everything): Likewise.
136         (pushtag): Likewise.
137         (follow_tag_typedef): Likewise.
138         (maybe_process_template_type_declaration): Likewise.
139         (pop_binding): Likewise.
140         * cp-tree.h: Move corresponding declarations to name-lookup.h
141         
142 2003-10-12  Steven Bosscher  <steven@gcc.gnu.org>
144         * cvt.c (ocp_convert): Move warning to C common code.
146 2003-10-09  Jason Merrill  <jason@redhat.com>
148         PR c++/6392
149         * tree.c (build_cplus_array_type): Handle all quals the same.
150         (cp_build_qualified_type_real): Look through arrays first.
152         * tree.c (build_cplus_new): Use build_decl to create a VAR_DECL.
153         (build_target_expr_with_type): Likewise.
155         * pt.c (instantiate_class_template): Sanity check that our
156         enclosing class has been instantiated.
158 2003-10-08  Giovanni Bajo  <giovannibajo@libero.it>
160         * cp_tree.h: Added TFF_NO_FUNCTION_ARGUMENTS.
161         * error.c (dump_function_decl): Use it to skip the dump of the
162         arguments.
163         (dump_expr): When dumping a declaration found within an
164         expression, always set TFF_NO_FUNCTION_ARGUMENTS
165         in the flags.
167 2003-10-08  Giovanni Bajo <giovannibajo@libero.it>
169         PR c++/11097
170         * pt.c (tsubst_decl): Substitute also the DECL_NAME node of
171         USING_DECL.
173 2003-10-06  Mark Mitchell  <mark@codesourcery.com>
175         PR c++/10147
176         * call.c (initialize_reference): Tweak error message.
177         * cxx-pretty-print.h (cxx_pretty_printer_flags): Remove
178         pp_cxx_flag_qualified_id and pp_cxx_flag_global_scope.
179         * cxx-pretty-print.c (pp_cxx_id_expression): Always display
180         qualified entities using qualified names.
181         
182         PR c++/12337
183         * init.c (build_new_1): Make sure that the expression returned is
184         not an lvalue.
186         PR c++/12344, c++/12236, c++/8656
187         * decl.c (start_function): Do not ignore attributes embedded in a
188         function declarator.
190 2003-10-06  Mark Mitchell  <mark@codesourcery.com>
192         * Make-lang.in (c++.info): Remove.
193         (c++.dvi): Remove.
194         (c++.generated-manpages): Replace with ...
195         (generated-manpages): ... this.
197 2003-10-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
199         * decl.c (struct cp_binding_level): Move to name-lookup.h
200         (current_binding_level): Likewise.
201         (class_binding_level): Likewise.
202         * cp-tree.h (enum scope_kind): Likewise.
204 2003-10-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
206         * name-lookup.c (binding_entry_free): Nullify name and type
207         fields. 
209 2003-10-02  Mark Mitchell  <mark@codesourcery.com>
211         PR c++/12486
212         * typeck.c (finish_class_member_access_expr): Issue diagnostic
213         on erroneous use of qualified name.
215 2003-09-30  Richard Henderson  <rth@redhat.com>
217         PR c++/12370
218         * decl.c (duplicate_decls): Copy DECL_SAVED_INSNS too.
220 2003-09-30  Kelley Cook  <kelleycoook@wideopenwest.com>
222         * g++spec.c: Convert to ISO C90 prototypes.
223         * parser.c: Likewise.
225 2003-09-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
227         * decl.c (pop_binding): Don't mess with nullifying binding->scope
228         here. 
229         * name-lookup.c: Re-format.
230         (cxx_binding_free): Nullify binding->scope.
232 2003-09-29  Jan Hubicka  <jh@suse.cz>
234         PR C++/12047
235         * except.c (build_eh_type_type): Call mark_used on the type.
237 2003-09-28  Richard Henderson  <rth@redhat.com>
239         * typeck.c (c_expand_asm_operands): Take location_t, instead of
240         individual file and line.
242 2003-09-28  Andreas Jaeger  <aj@suse.de>
244         * decl.c (cxx_builtin_type_decls): Convert to ISO C90 function
245         definition.
246         * init.c (push_base_cleanups): Likewise.
247         * decl2.c (finish_file): Likewise.
248         * mangle.c (init_mangle): Likewise.
249         (dump_substitution_candidates): Likewise.
250         * search.c: Likewise.
252 2003-09-27  Gabriel Dos Reis  <gdr@integrable-solutions.net>
254         * name-lookup.h (get_global_value_if_present): New function.
255         (is_typename_at_global_scope): Likewise.
256         * except.c (do_begin_catch): Use get_global_value_if_present.
257         (do_end_catch): Likewise.
258         (do_allocate_exception): Likewise.
259         (do_free_exception): Likewise.
260         (build_throw): Likewise.
261         * parser.c (cp_parser_member_declaration): Likewise.
262         * rtti.c (throw_bad_cast): Likewise.
263         (throw_bad_typeid): Likewise.
264         * decl.c (check_tag_decl): Use is_typename_at_global_scope.
265         (grokdeclarator): Likewise.
266         * cp-tree.h (global_namespace): Move to name-lookup.h
267         * call.c (call_builtin_trap): Tidy.
269 2003-09-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
271         PR c++/11415
272         * parser.c (cp_parser_nested_name_specifier_opt): Issue correct
273         error message when parser->scope is global_namespace.
275 2003-09-27  Gabriel Dos Reis  <gdr@integrable-solutions.net>
277         * cp-tree.h, name-lookup.h, decl.c, decl2.c: Remove reference to
278         macros  BINDING_SCOPE, BINDING_VALUE and BINDING_TYPE.
280 2003-09-26  Gabriel Dos Reis  <gdr@integrable-solutions.net>
282         * decl.c (pop_binding_level, suspend_binding_level,
283         find_class_binding_level): Merge into leave_scope.  Remove.
284         (leave_scope):  New function.
285         (poplevel): Update.
286         (poplevel_class): Likewise.
287         (pop_namespace): Likewise.
289 2003-09-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
291         PR c++/5655
292         * parser.c (cp_parser_check_access_in_redeclaration): New function.
293         (cp_parser_member_declaration): Use it.
294         (cp_parser_template_declaration_after_export): Likewise.
296 2003-09-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
298         * cp-tree.h (scope_kind): Add new enumerator.
299         (keep_next_level): Change parameter type to bool.
300         (begin_scope):  Change prototype.
301         (pushlevel): Remove declaration.
302         * decl.c (push_binding_level): Fold in begin_scope.  Remove.
303         (struct cp_binding_level): Remove tag_tranparent field.  Make keep
304         of bitsize one.
305         (keep_next_level_flag): Make a bool.
306         (cxx_scope_descriptor): Update scope names table
307         (make_cxx_scope): Fold in begin_scope.  Remove..
308         (namespace_scope_ht_size): New function.
309         (begin_scope): Change prototype.  Return a scope.  Tidy.
310         (kept_level_p): Update.
311         (pushlevel): Remove.
312         (maybe_push_cleanup_level): Simplify.
313         (poplevel): Update for sk_cleanup and keep change.
314         (print_binding_level): Likewise.
315         (initial_push_namespace_scope): Fold in begin_scope.  Remove.
316         (push_namespace): Update.
317         (pushtag): Likewise.
318         (lookup_tag): Likewise.
319         (lookup_name_current_level): Likewise.
320         (lookup_type_current_level): Likewise.
321         (cxx_init_decl_processing): Likewise.
322         (start_function): Likewise.
323         (begin_function_body): Likewise.
324         (start_method): Likewise.
325         * pt.c (push_inline_template_parms_recursive): Likewise.
326         (begin_template_parm_list): Likewise.
327         (begin_specialization): Likewise.
328         * semantics.c (do_pushlevel): Likewise.
329         (begin_compound_stmt): Likewise.
330         (begin_stmt_expr): Likewise.
332 2003-09-21  Richard Henderson  <rth@redhat.com>
334         * class.c, cp-tree.h, decl.c, decl2.c, error.c, init.c,
335         method.c, optimize.c, pt.c, semantics.c, tree.c: Revert.
337 2003-09-21  Richard Henderson  <rth@redhat.com>
339         * class.c, cp-tree.h, decl.c, decl2.c, error.c, init.c,
340         method.c, optimize.c, pt.c, semantics.c, tree.c: Update for
341         DECL_SOURCE_LOCATION rename and change to const.
343 2003-09-20  Richard Henderson  <rth@redhat.com>
345         * decl.c, decl2.c, pt.c: Use %J in diagnostics.
347 2003-09-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
349         PR c++/157
350         * parser.c (cp_parser_direct_declarator): Clear
351         parser->num_template_parameter_lists when parsing function
352         parameters.
353         (cp_parser_constructor_declarator_p): Likewise.
355 2003-09-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
357         PR c++/495
358         * pt.c (tsubst_friend_class): Only use innermost template
359         arguments for the injected friend class template.
361 2003-09-19  Nathan Sidwell  <nathan@codesourcery.com>
363         PR c++/12332
364         * pt.c (instantiate_class_template): Increment
365         processing_template_decl around the tsubst of a template member
366         function.
368 2003-09-19  Gabriel Dos Reis  <gdr@integrable-solutions.net>
370         * decl.c (cxx_scope_descriptor): Fix thinko.
371         (struct cp_binding_level): Adjust type of binding_depth field. 
373 2003-09-18  Danny Smith  <dannysmith@users.sourceforge.net>
375         PR c++/12320
376         * call.c (type_passed_as): Check for incomplete type.
377         (convert_for_arg_passing): Likewise.
379 2003-09-18  Nathan Sidwell  <nathan@codesourcery.com>
381         PR c++/9848
382         * optimize.c (maybe_clone_body): Don't set MARK_USED on parameters
383         here.
384         * semantics.c (expand_body): Set it here on the remaining clones.
386 2003-09-18  Roger Sayle  <roger@eyesopen.com>
388         * lex.c (init_operators): Remove operator_name_info for FFS_EXPR.
389         * class.c (instantiate_type): Remove FFS_EXPR case.
391 2003-09-18  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
393         * ChangeLog: Fix recent commit.
395 2003-09-18  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
397         * ChangeLog: Add PR number to patch for PR c++/12316.
399 2003-09-18  Gabriel Dos Reis <gdr@integrable-solutions.net>
401         * error.c (dump_type): Simplify.  Use pp_type_specifier_seq for
402         "C" types. 
403         * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Fix thinko.
405 2003-09-17  Richard Henderson  <rth@redhat.com>
407         * semantics.c (expand_body): Don't save/restore input_location.
409 2003-09-17  Mark Mitchell  <mark@codesourcery.com>
411         PR c++/12266
412         * cp-tree.h (tsubst_flags_t): Add tf_conv.
413         * class.c (standard_conversion): Pass tf_conv to
414         instantiate_type.
415         (resolve_address_of_overloaded_function): Do not call mark_used
416         when just checking conversions.
418         PR debug/12066
419         * cp-lang.c (LANG_HOOKS_BUILTIN_TYPE_DECLS): Define.
420         * cp-tree.h (cxx_builtin_type_decls): Declare.
421         * decl.c (builtin_type_decls): New variables.
422         (cxx_builtin_type_decls): New function.
423         (record_builtin_type): Add to builtin_type_decls.
425 2003-09-17  Richard Henderson  <rth@redhat.com>
427         PR c++/12316
428         * semantics.c (expand_or_defer_fn): Inc/dec function_depth.
430 2003-09-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
432         PR c++/7939
433         * typeck.c (comptypes): Don't ICE when its first argument is
434         error_mark_node.
435         (compparms): Reverse the arguments of same_type_p.
437 2003-09-15  Nathan Sidwell  <nathan@codesourcery.com>
439         PR c++/12184
440         * typeck.c (convert_arguments): Return error_mark_node for an
441         incomplete parameter. Make error message more informative.
443 2003-09-12  Mark Mitchell  <mark@codesourcery.com>
445         PR c++/3907
446         * class.c (maybe_note_name_used_in_class): Refine test for whether
447         or not we are in a class scope.
449         * cp-tree.h (language_function): Remove x_expanding_p.
450         (expanding_p): Remove.
451         (doing_semantic_analysis_p): Remove.
452         (scope_kind): Add sk_function_parms, sk_class,
453         sk_namespace.
454         (innermost_scope_kind): New method.
455         * call.c (cxx_type_promotes_to): Use type_decays_to.
456         * cp-lang.c (LANG_HOOKS_PUSHLEVEL): Redefine.
457         (LANG_HOOKS_POPLEVEL): Likewise.
458         * decl.c (cp_binding_level): Remove parm_flag, template_parms_p,
459         template_spec_p, namespace_p, is_for_scope, is_try_scope, and
460         is_catch_scope.  Add kind and explicit_spec_p.
461         (cxx_scope_descriptor): Use a lookup table.
462         (find_class_binding_level): Use "kind" field in binding_level, not
463         the various flags.
464         (pop_binding_level): Likewise.
465         (innermost_nonclass_level): Likewise.
466         (toplevel_bindings_p): Likewise.
467         (namespace_bindings_p): Likewise.
468         (template_parm_scope_p): Likewise.
469         (innermost_scope_kind): New method.
470         (current_tmpl_spec_kind): Use "kind" field in binding_level, not
471         the various flags.
472         (pushlevel): Remove check for doing_semantic_analysis_p.
473         (begin_scope): Simplify.
474         (add_decl_to_level): Use "kind" field in binding_level, not
475         the various flags.
476         (push_local_binding): Likewise.
477         (pop_label): Remove check for doing_semantic_analysis_p.
478         (poplevel): Use "kind" field in binding_level, not
479         the various flags.
480         (set_block): Remove check for doing_semantic_analysis_p.
481         (pushlevel_class): Use "kind" field in binding_level, not
482         the various flags. 
483         (poplevel_class): Likewise.
484         (initial_push_namespace_scope): Likewise.
485         (maybe_push_to_top_level): Likewise.
486         (set_identifier_type_value_with_scope): Likewise.
487         (pop_everything): Likewise.
488         (maybe_process_template_type_declaration): Likewise.
489         (pushtag): Likewise.
490         (pushdecl): Likewise.
491         (pushdecl_with_scope): Likewise.
492         (check_previous_goto_1): Likewise.
493         (define_label): Likewise.
494         (finish_case_label): Likewise.
495         (lookup_tag): Likewise.
496         (unqualified_namespace_lookup): Likewise.
497         (lookup_name_real): Likewise.
498         (lookup_name_current_level): Likewise.
499         (lookup_type_current_level): Likewise.
500         (record_builtin_type): Likewise.
501         (cp_make_fname_decl): Likewise.
502         (maybe_inject_for_scope_var): Likewise.
503         (cp_finish_decl): Remove check for doing_semantic_analysis_p.
504         (start_function): Use begin_scope, not pushlevel.
505         (finish_function): Use "kind" field in binding_level, not
506         the various flags.
507         (start_method): Use begin_scope, not pushlevel.
508         (make_label_decl): Do not check expanding_p.
509         (save_function-data): Do not set expanding_p.
510         (cxx_push_function_context): Do not clear expanding_p.
511         * semantics.c (cxx_expand_function_start): Do not set expanding_p.
512         
513 2003-09-14  Mark Mitchell  <mark@codesourcery.com>
515         * class.c (layout_class_type): Make DECL_MODE match TYPE_MODE for
516         an bit-field whose width exceeds that of its type.
518 2003-09-14  Geoffrey Keating  <geoffk@apple.com>
520         * rtti.c (get_tinfo_decl): Set TREE_PUBLIC for typeinfo decls.
522 2003-09-14  Kazu Hirata  <kazu@cs.umass.edu>
524         * ChangeLog: Follow spelling conventions.
525         * parser.c: Likewise.
527 2003-09-13  Richard Henderson  <rth@redhat.com>
529         * decl2.c (finish_file): Check cgraph_assemble_pending_functions
530         during relaxation loop.
532 2003-09-11  David Edelsohn  <edelsohn@gnu.org>
534         * decl2.c (var_finalized_p): Swap arms of conditional.
536 2003-09-10  Nathan Sidwell  <nathan@codesourcery.com>
538         PR c++/11788
539         * typeck.c (build_address): If it is a function, mark it used.
540         (build_unary_op): Do not lose object's side-effects when taking
541         address of static member function.
542         * class.c (resolve_address_of_overloaded_function): Use
543         tsubst_flags_t parameter. Only expect overload sets. Adjust.
544         (instantiate_type): Adjust flags passing. Do not lose object's
545         side-effects when taking address of static member function.
547 2003-09-11  Richard Henderson  <rth@redhat.com>
549         * semantics.c (expand_or_defer_fn): Update for new
550         cgraph_finalize_function argument.
552 2003-09-10  Richard Henderson  <rth@redhat.com>
554         * decl2.c (cxx_callgraph_analyze_expr): Mark argument unused.
556 2003-09-10  Jan Hubicka  <jh@suse.cz>
558         * decl2.c (var_finalized_p): New.
559         (maybe_emit_vtables, write_out_vars, finish_file): Use it.
561 2003-09-10  Richard Henderson  <rth@redhat.com>
563         * decl2.c (cxx_callgraph_analyze_expr): New, from corpse of
564         mark_member_pointers.
565         (lower_function): Remove.
566         * cp-tree.h: Update to match.
567         * cp-lang.c (LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR): New.
568         (LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Remove.
570 2003-09-09  Richard Henderson  <rth@redhat.com>
572         * semantics.c (expand_or_defer_fn): Update call to 
573         cgraph_finalize_function.
575         * semantics.c (expand_or_defer_fn): Use cgraph_finalize_function
576         always.
578         * decl2.c (finish_file): Avoid out-of-bounds array reference
579         during memmove.
581 2003-09-09  Richard Henderson  <rth@redhat.com>
583         * decl2.c (mark_member_pointers): Rename from
584         mark_member_pointers_and_eh_handlers and don't check eh handlers.
586 2003-09-09  Christian Ehrhardt  <ehrhardt@mathematik.uni-ulm.de>
588         PR bootstrap/12168
589         * method.c (use_thunk): Clear DECL_RTL of copied nodes.
591 2003-09-08  Mark Mitchell  <mark@codesourcery.com>
593         * cp-lang.c (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define to
594         c_register_builtin_type.
596         PR c++/11786
597         * decl2.c (add_function): Do not complain about seeing the same
598         non-function twice.
599         * semantics.c (perform_koenig_lookup): Improve documentation.
601         PR c++/5296
602         * pt.c (try_one_overload): Add addr_p parameter.
603         (resolve_overloaded_unification): Pass it.
605 2003-09-08  Richard Henderson  <rth@redhat.com>
607         * optimize.c (maybe_clone_body): Inc/dec function_depth.
609 2003-09-08  Richard Henderson  <rth@redhat.com>
611         * decl.c (finish_function): Clear current_function_decl.
612         * decl2.c (mark_used): Don't push/pop gc context.
613         * optimize.c (optimize_function): Likewise.
614         * tree.c (cp_cannot_inline_tree_fn): Likewise.
615         * pt.c (instantiate_decl): Inc/dec function_depth instead.
616         * semantics.c (expand_body): Update for tree_rest_of_compilation
617         nested argument.
619 2003-09-07  Gabriel Dos Reis  <gcc@integrable-solutions.net>
621         PR c++/11762
622         * error.c (dump_decl): Handle namespace-alias-definition.
623         * decl.c (warn_extern_redeclared_static): There is no point in
624         checking changes in storage class specifier for a namespace
625         declaration. 
626         (duplicate_decls): Tidy diagnostic message.
627         * cxx-pretty-print.c (pp_cxx_left_brace): New macro.
628         (pp_cxx_right_brace): Likewise.
629         (pp_cxx_original_namespace_definition): New function.
630         (pp_cxx_namespace_alias_definition): Likewise.
631         (pp_cxx_declaration): Use them.  Handle NAMESPACE_DECLs.
633 2003-09-07  Jan Hubicka  <jh@suse.cz>
635         * decl2.c (maybe_emit_vtables, write_out_vars, finish_file):
636         Avoid re-emitting variables in unit-at-a-time mode.
638 2003-09-06  Mark Mitchell  <mark@codesourcery.com>
640         PR c++/11867
641         * call.c (standard_conversion): Improve comments.
642         (perform_direct_initialization): Make sure we return an expression
643         of the correct type.
644         * typeck.c (build_static_cast): Check for ambiguity and
645         accessibility when performing conversions.
647 2003-09-06  Gabriel Dos Reis  <gdr@integrable-solutions.net>
649         * cp-tree.h (add_binding): Remove declaration.
650         * name-lookup.h (supplement_binding): Declare.
651         * decl.c (add_binding): Move to name-lookup.c.
652         (push_local_binding): Adjust.
653         (push_class_binding): Likewise.
654         (set_identifier_type_value_with_scope): Likewise.
655         * name-lookup.c (supplement_binding): Rename from add_binding.
656         Return a bool.  Improve documentation. 
657         (set_namespace_binding): Adjust.
658         * Make-lang.in (cp/name-lookup.o): Depend on toplev.h
660 2003-09-06  Nathan Sidwell  <nathan@codesourcery.com>
662         PR c++/11794
663         * class.c (pushclass): Push dependent using decls for nested
664         classes of templates too.
666 2003-09-06  Roger Sayle  <roger@eyesopen.com>
668         PR c++/11409
669         * class.c (resolve_address_of_overloaded_function): When building
670         list of matching non-template function decls, ignore anticipated
671         declarations of undeclared or shadowed GCC builtins.
673 2003-09-06  Steven Bosscher  <steven@gcc.gnu.org>
675         PR c++/11595
676         * decl.c (define_label): Remove unreachable timevar pop.
677         Always return the decl, even if the definition is invalid.
679 2003-09-06  Nathan Sidwell  <nathan@codesourcery.com>
681         PR c++/12167
682         * parser.c (cp_parser_late_parsing_default_args): Push & pop the
683         unparsed functions queue.
685 2003-09-05  Mark Mitchell  <mark@codesourcery.com>
687         PR c++/12163
688         * call.c (perform_direct_initialization): Correct logic for
689         direct-initialization of a class type.
691         PR c++/12146
692         * pt.c (lookup_template_function): Robustify.
694 2003-09-05  Nathan Sidwell  <nathan@codesourcery.com>
696         PR c++/11922
697         * pt.c (tsubst_qualified_id): Make sure we get a non-type.
698         (tsubst_expr, tsubst_copy_and_build): Pass false, not zero, as
699         is_type_p to lookup_qualified_name.
701         * semantics.c (finish_call_expr): Refactor some code.
703         PR c++/12037
704         * cp-tree.h (COMPOUND_EXPR_OVERLOADED): New.
705         (build_min_non_dep): Declare.
706         * tree.c (build_min): Propagate TREE_SIDE_EFFECTS.
707         (build_min_non_dep): New.
708         * cvt.c (convert_to_void): Don't explicitly copy
709         TREE_SIDE_EFFECTS, TREE_NO_UNUSED_WARNING.
710         * call.c (build_new_method_call): Use build_min_non_dep.
711         * decl2.c (grok_array_decl): Likewise.
712         (build_offset_ref_call_from_tree): Likewise.
713         * typeck.c (finish_class_member_access_expr,
714         build_x_indirect_ref, build_x_binary_op, build_x_unary_op,
715         build_x_conditional_expr, build_x_compound_expr): Likewise.
716         (build_static_cast, build_reinterpret_cast,
717         build_const_cast): Propagate TREE_SIDE_EFFECTS inside a template.
718         * typeck2.c (build_x_arrow): Use build_min_non_dep.
719         (build_functional_cast): Propagate TREE_SIDE_EFFECTS inside a
720         template.
721         * rtti.c (build_dynamic_cast_1): Set DECL_IS_PURE.
722         (build_dynamic_cast): Set TREE_SIDE_EFFECTS.
723         * pt.c (build_non_dependent_expr): Check COMPOUND_EXPR_OVERLOADED.
725 2003-09-04  Richard Henderson  <rth@redhat.com>
727         * decl2.c (mark_member_pointers_and_eh_handlers): Update for
728         change in cgraph_mark_needed_node arguments.
730 2003-09-02  Geoffrey Keating  <geoffk@apple.com>
732         PR 12161
733         * decl2.c (mark_used): Use ggc_push_context/ggc_pop_context.
734         * tree.c (cp_cannot_inline_tree_fn): Likewise.
736 2003-09-04  Nathan Sidwell  <nathan@codesourcery.com>
738         * cp-tree.h (finish_sizeof, finish_alignof): Remove.
739         (expr_sizeof): Replace with ...
740         (cxx_sizeof_or_alignof_expr): ... here.
741         (cxx_sizeof_or_alignof_type): Make complain parameter a bool.
742         * parser.c (cp_parser_unary_expression): Commonize alignof and
743         sizeof handling.
744         * pt.c (tsubst_copy_and_build): Adjust alignof and sizeof
745         substitution.
746         * semantics.c (finish_sizeof, finish_alignof): Remove.
747         * typeck.c (cxx_sizeof_or_alignof_type): Complain parameter
748         becomes bool. Set TREE_READONLY.
749         (expr_sizeof): Replace with ...
750         (cxx_sizeof_or_alignof_expr): ... here. Clear TREE_SIDE_EFFECTS.
752 2003-09-04  Mark Mitchell  <mark@codesourcery.com>
754         Remove cast-as-lvalue extension.
755         * call.c (build_conditional_expr): Correct formatting.
756         (convert_like_real): Use lvalue_p, not non_cast_lvalue_p.
757         (initialize_real): Use real_lvalue_p, not real_non_cast_lvalue_p.
758         * cp-tree.h (non_cast_lvalue_p): Remove.
759         (real_non_cast_lvalue_p): Remove.
760         (non_cast_lvalue_or_else): Remove.
761         * tree.c (lvalue_p_1): Remove allow_cast_as_lvalue parameter.
762         (real_lvalue_p): Adjust call to lvalue_p_1.
763         (non_cast_lvalue_p): Remove.
764         (non_cast_lvalue_or_else): Remove.
765         (lvalue_p): Adjust call to lvalue_p_1.
766         (lvalue_or_else): Simplify.
767         * typeck.c (build_unary_op): Use lvalue_or_else, not
768         non_cast_lvalue_or_else.
769         (build_static_cast): Use real_lvalue_p, not real_non_cast_lvalue_p.
771 2003-09-03  DJ Delorie  <dj@redhat.com>
773         * decl.c (finish_function): Pass fndecl to aggregate_value_p.
775 2003-09-03  Mark Mitchell  <mark@codesourcery.com>
777         PR c++/12053
778         * class.c (include_empty_classes): Correct logic for ABI version 1.
780 2003-09-03  Richard Henderson  <rth@redhat.com>
782         * optimize.c (optimize_function): Push/pop ggc context around
783         the call to optimize_inline_calls.
785 2003-09-02  Scott Brumbaugh  <scottb.lists@verizon.net>
787         PR c++/11553
788         * parser.c (cp_parser_decl_specifier_seq): Add check for a
789         duplicate friend decl-specifier.
791 2003-09-02  Mark Mitchell  <mark@codesourcery.com>
793         PR c++/11847
794         * pt.c (convert_nontype_argument): Correct representation of
795         REFERENCE_TYPE expressions.
797         PR c++/11808
798         * cp-tree.h (KOENIG_LOOKUP_P): New macro.
799         (finish_call_expr): Change prototype.
800         * parser.c (cp_parser_postfix_expression): Adjust call to
801         finish_call_expr.
802         * pt.c (tsubst_copy_and_build): Use KOENIG_LOOKUP_P.
803         * semantics.c (finish_call_expr): Add koenig_p parameter.
805 2003-09-01  Mark Mitchell  <mark@codesourcery.com>
807         PR c++/12114
808         * cp-tree.h (initialize_reference): Change prototype.
809         * call.c (initialize_reference): Add cleanup parameter.
810         * decl.c (grok_reference_init): Likewise.
811         (check_initializer): Likewise.
812         (cp_finish_decl): Insert a CLEANUP_STMT if necessary.
813         (duplicate_decls): When replacing an anticipated builtin, do not
814         honor TREE_NOTHROW.
815         * typeck.c (convert_for_initialization): Correct call to
816         initialize_reference.
818         PR c++/11972
819         * pt.c (dependent_type_p_r): Pass only the innermost template
820         arguments to any_dependent_template_arguments_p.
822 2003-09-01  Josef Zlomek  <zlomekj@suse.cz>
824         * error.c (dump_expr): Kill BIT_ANDTC_EXPR.
825         * lex.c (init_operators): Kill BIT_ANDTC_EXPR.
826         * pt.c (tsubst_copy): Kill BIT_ANDTC_EXPR.
827         * typeck.c (build_binary_op): Kill BIT_ANDTC_EXPR.
828         (tsubst_copy_and_build): Kill BIT_ANDTC_EXPR.
830 2003-08-29  Mark Mitchell  <mark@codesourcery.com>
832         PR c++/12093
833         * pt.c (build_non_dependent_expr): Do not build a
834         NON_DEPENDENT_EXPR for a STRING_CST.
836         PR c++/11928
837         * search.c (add_conversions): Avoid adding two conversion
838         operators for the same type.
840 2003-08-29  Mark Mitchell  <mark@codesourcery.com>
842         PR c++/6196
843         * pt.c (tsubst_copy_and_build): Correct handling of
844         address-of-label extension.
845         * semantics.c (finish_goto_stmt): The address of a label must go
846         through the lvalue-to-rvalue conversion.
848 2003-08-29  Richard Henderson  <rth@redhat.com>
849             Jason Merrill <jason@redhat.com>
851         * cp-lang.c (LANG_HOOKS_RTL_EXPAND_START): New.
852         (LANG_HOOKS_RTL_EXPAND_STMT): New.
853         * cp-tree.h (cxx_expand_function_start): Declare.
854         * decl.c (start_function): Use allocate_struct_function.
855         Move stmts_are_full_exprs_p assertion from expand_body.
856         Do not free_after_parsing or free_after_compilation.
857         (cxx_push_function_context): Move code to set struct function
858         data from genrtl_start_function.
859         * optimize.c (optimize_function): Don't inc/dec function_depth.
860         * semantics.c (expand_body): Use tree_rest_of_compilation.
861         (cxx_expand_function_start): Rename from genrtl_start_function,
862         omit bits done by tree_rest_of_compilation.
863         (genrtl_finish_function): Remove.
864         (clear_decl_rtl): Move to ../tree-optimize.c.
866 2003-08-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
868         PR c++/11811
869         * cxx-pretty-print.c (pp_cxx_canonical_template_parameter): New
870         function. 
871         * cxx-pretty-print.h: Declare.
872         * error.c (dump_template_parameter): Use it.
873         (dump_type): Likewise.
875 2003-08-28  Mark Mitchell  <mark@codesourcery.com>
877         * init.c (decl_constant_value): Deal with COND_EXPR specially.
878         * call.c (build_conditional_expr): Revert previous patch.
880         PR optimization/5079
881         * call.c (build_conditional_expr): Use decl_constant_value to
882         simplify the arguments.
884 2003-08-26  Dan Nicolaescu  <dann@ics.uci.edu>
886         * parser.c (struct cp_token): Use enum bitfields.
887         (CP_TOKEN_BLOCK_NUM_TOKENS): Make sure cp_token_block fits in a
888         512B allocation unit.
889         (cp_parser_token_tree_map_node): Use enum bitfields.
891 2003-08-26  Nathan Sidwell  <nathan@codesourcery.com>
893         PR c++/11871
894         * decl.c (push_class_level_binding): Correct old_decl value from
895         my 2003-07-29 reorganization.
897         * call.c (build_call): Don't set TREE_SIDE_EFFECTS here.
898         (build_new_method_call): Add goto finish.
899         * semantics.c (simplify_aggr_init_exprs_r): Don't set
900         TREE_SIDE_EFFECTS on a call.
902 2003-08-25  Richard Henderson  <rth@redhat.com>
904         * cxx-pretty-print.c (pp_cxx_class_name): Remove unused function.
906 2003-08-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
908         * cxx-pretty-print.h (pp_cxx_flag_default_argument): New flag.
909         (cxx_pretty_printer): Adjust base type.
910         (pp_cxx_function_specifier): Declare.
911         * cxx-pretty-print.c (pp_cxx_whitespace): New macro.
912         (pp_cxx_left_paren): Likewise.
913         (pp_cxx_right_paren): Likewise.
914         (pp_cxx_dot): Likewise.
915         (pp_cxx_arrow): Likewise.
916         (pp_cxx_semicolon): Likewise.
917         (pp_cxx_identifier): Likewise.
918         (pp_cxx_cv_qualifier_seq): Likewise.
919         (pp_cxx_storage_class_specifier): Likewise.
920         (pp_cxx_expression_list): Likewise.
921         (pp_cxx_space_for_pointer_operator): Likewise.
922         (pp_cxx_init_declarator): Likewise.
923         (pp_cxx_call_argument_list): Likewise.
924         (pp_cxx_nonconsecutive_character): Tidy.
925         (pp_cxx_conversion_function_id): New function.
926         (pp_cxx_template_id): Likewise.
927         (pp_cxx_template_keyword_if_needed): Likewise.
928         (pp_cxx_nested_name_specifier): Likewise.
929         (pp_cxx_unqualified_id): Tidy
930         (pp_cxx_qualified_id): Handle more nodes.
931         (pp_cxx_primary_expression): Tidy.
932         (pp_cxx_postfix_expression): Likewise.
933         (pp_cxx_new_expression): Tidy.
934         (pp_cxx_delete_expression): Likewise.
935         (pp_cxx_cast_expression): New function.
936         (pp_cxx_pm_expression): Tidy.
937         (pp_cxx_conditional_expression): Likewise.
938         (pp_cxx_assignment_operator): New function.
939         (pp_cxx_assignment_expression): Tidy.
940         (pp_cxx_expression): New function.
941         (pp_cxx_function_specifier): Likewise.
942         (pp_cxx_decl_specifier_seq): Likewise.
943         (pp_cxx_simple_type_specifier): Tidy.
944         (pp_cxx_type_specifier_seq): Likewise.
945         (pp_cxx_ptr_operator): New function.
946         (pp_cxx_implicit_parameter_type): Likewise.
947         (pp_cxx_parameter_declaration): Tidy.
948         (pp_cxx_parameter_declaration_clause): New function.
949         (pp_cxx_exception_specification): Likewise.
950         (pp_cxx_direct_declarator): Tidy.
951         (pp_cxx_declarator): Likewise.
952         (pp_cxx_ctor_initializer): New function.
953         (pp_cxx_function_definition): Likewise.
954         (pp_cxx_abstract_declarator): Tidy.
955         (pp_cxx_direct_abstract_declarator): Likewise.
956         (pp_cxx_type_id): Likewise.
957         (pp_cxx_exception_declaration): New function.
958         (pp_cxx_statement): Likewise.
959         (pp_cxx_simple_declaration): Likewise.
960         (pp_cxx_template_parameter_list): Likewise.
961         (pp_cxx_template_parameter): Likewise.
962         (pp_cxx_template_declaration): Likewise.
963         (pp_cxx_explicit_specialization): Likewise.
964         (pp_cxx_explicit_instantiation): Likewise.
965         (pp_cxx_declaration): Tidy.
966         (pp_cxx_pretty_printer_init): Initialize more fields.
968 2003-08-25  Mark Mitchell  <mark@codesourcery.com>
970         PR c++/8795
971         * cp-tree.h (build_cplus_method_type): Remove.
972         * call.c (standard_conversion): Use build_method_type_directly
973         instead of build_cplus_method_type.
974         * class.c (build_clone): Likewise.
975         (adjust_clone_args): Likewise.
976         * decl.c (build_ptrmem_type): Likewise.
977         (grokdeclarator): Likewise.
978         (check_function_type): Likewise.
979         * decl2.c (grok_method_quals): Likewise.
980         (maybe_retrofit_in_chrg): Likewise.
981         * pt.c (copy_default_args_to_explicit_spec): Likewise.
982         (tsubst_function_type): Likewise.
983         (tsubst): Likewise.
984         * tree.c (build_cplus_method_type): Remove.
985         * typeck.c (merge_types): Use build_method_type_directly.
987 2003-08-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
989         PR c++/3765
990         * search.c (dfs_access_in_type): Fix typo in comment.
991         (dfs_accessible_queue_p): Likewise.
992         (dfs_accessible_p): Only terminate when a friend is found.
993         (accessible_p): Return immediately if access_in_type allows
994         access.
996 2003-08-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
998         PR c++/641, c++/11876
999         * friend.c (add_friend): Add complain parameter.
1000         (make_friend_class): Likewise.
1001         (do_friend): Adjust add_friend call.
1002         * decl.c (grokdeclarator): Adjust make_friend_class call.
1003         * parser.c (cp_parser_member_declaration): Likewise.
1004         (cp_parser_template_declaration_after_export): Likewise.
1005         * pt.c (instantiate_class_template): Adjust make_friend_class
1006         and add_friend call.
1007         * cp-tree.h (make_friend_class): Adjust declaration.
1008         (add_friend): Likewise.
1010 2003-08-21  Jason Merrill  <jason@redhat.com>
1012         PR c++/11283
1013         * call.c (build_conditional_expr): Ignore cv-qual differences for
1014         non-class types.
1016 2003-08-21  Mark Mitchell  <mark@codesourcery.com>
1018         PR c++/11551
1019         * parser.c (cp_parser_id_expression): Add declarator_p parameter.
1020         (cp_parser_primary_expression): Adjust call to
1021         cp_parser_id_expression.
1022         (cp_parser_unqualified_id): Complain about the use of
1023         typedef-names in a destructor declarator.
1024         (cp_parser_postfix_expression): Adjust call to
1025         cp_parser_id_expression.
1026         (cp_parser_type_parameter): Likewise.
1027         (cp_parser_template_argument): Likewise.
1028         (cp_parser_declarator_id): Likewise.
1030         PR c++/11919
1031         * call.c (standard_conversion): Use same_type_p, not pointer
1032         equality, to compare types.
1034         PR c++/10762
1035         * parser.c (cp_parser_using_declaration): Check for invalid uses
1036         of template-ids here...
1037         * decl2.c (do_class_using_decl): ... rather than here.
1039 2003-08-20  Mark Mitchell  <mark@codesourcery.com>
1041         PR c++/11834
1042         * pt.c (more_specialized): Bump processing_template_decl.
1044 2003-08-21  Jason Merrill  <jason@redhat.com>
1046         PR c++/11614
1047         * decl.c (grokdeclarator): Recognize a flexible array based on the
1048         type, not the form of the declarator.
1050 2003-08-20  Jason Merrill  <jason@redhat.com>
1052         * semantics.c (simplify_aggr_init_expr): Split out from
1053         simplify_aggr_init_exprs_r.  Convert slot address to match
1054         the return type.
1055         * cp-tree.h: Declare it.
1056         * tree.c (cp_copy_res_decl_for_inlining): Don't clobber the
1057         DECL_NAME of a user variable.
1059 2003-08-20  Nathan Sidwell  <nathan@codesourcery.com>
1061         PR c++/11945
1062         * pt.c (build_non_dependent_expr): Look inside COND_EXPR and
1063         COMPOUND_EXPR.
1064         * semantics.c (finish_expr_stmt): Always convert to void.
1065         * typeck.c (build_x_compound_exp): Always convert to void.
1067 2003-08-19  Mark Mitchell  <mark@codesourcery.com>
1069         PR c++/11684
1070         * cp-tree.h (grok_op_properties): Change prototype.
1071         * decl.c (grok_op_properties): Add complain parameter.
1072         (grokfndecl): Pass it.
1073         * pt.c (tsubst_decl): Adjust accordingly.
1075         PR c++/10926
1076         * decl.c (start_method): Return immediately if push_template_decl
1077         does not like the declaration.
1078         * pt.c (push_template_decl_real): Disallow member template
1079         destructors.
1081         PR c++/11036
1082         * cp-tree.h (add_binding): Add prototype.
1083         * class.c (add_method): Set TYPE_HAS_DESTRUCTOR if appropriate.
1084         (maybe_warn_about_overly_private_class): Use
1085         CLASSTYPE_DESTRUCTORS.
1086         (pushclass): Adjust call to set_identifier_type_value.
1087         * decl.c (add_binding): Give it external linkage.
1088         (push_local_binding): Adjust call to add_binding.
1089         (push_class_binding): Likewise.
1090         (set_identifier_type_value_with_scope): Change prototype.  Use
1091         add_binding for global bindings.
1092         (set_identifier_type_value): Adjust accordingly.
1093         (pushtag): Likewise.
1094         (pushdecl): Use set_identifier_type_value, not
1095         set_identifier_type_value_with_scope.
1096         (pushdecl_namespace_level): Adjust calls to
1097         SET_IDENTIFIER_TYPE_VALUE to pass a DECL.
1098         (pushdecl_class_level): Likewise.
1099         (lookup_tag): Use select_decl.
1100         (select_decl): Improve comment.
1101         (record_builtin_type): Do not call pushdecl.
1102         (cxx_init_decl_processing): Do not call xref_tag for bad_alloc.
1103         (cp_finish_decl): Adjust call to set_identifier_type_value.
1104         (check_elaborated_type_specifier): Improve checks for invalid uses
1105         of typedefs.
1106         (xref_tag): Adjust call to check_elaborated_type_specifier.
1107         * decl2.c (grokclassfn): Do not set TYPE_HAS_DESTRUCTOR.
1108         * name-lookup.c (set_namespace_binding): Use add_binding.
1109         * parser.c (cp_parser_simple_type_specifier): Return a TYPE_DECL,
1110         rather than an IDENTIFIER_NODE, to represent built-in types, if
1111         requested by the caller.
1112         (cp_parser_postfix_expression): Adjust call.
1113         (cp_parser_type_specifier): Likewise.
1114         (cp_parser_elaborated_type_specifier): Adjust call to
1115         check_elaborated_type_specifier.
1116         * typeck2.c (build_functional_cast): Do not perform name lookups.
1118         PR c++/10717
1119         * decl.c (expand_static_init): Remove unncessary code.
1121 2003-08-19  Andrew Pinski  <pinskia@physics.uc.edu>
1123         PR c++/10538, PR c/5582
1124         * cp/cp-lang.c (LANG_HOOKS_DECL_UNINIT): Define.
1126 2003-08-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1128         PR c++/11174
1129         * init.c (build_offset_ref): Perform access checking for
1130         pointer to member correctly.
1132 2003-08-19  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1134         * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTICS): Fix spelling.
1136 2003-08-18  Nathan Sidwell  <nathan@codesourcery.com>
1138         PR c++/11957
1139         * cp-tree.h (finish_stmt_expr): Add bool parameter.
1140         * init.c (finish_init_stmts): Pass true to finish_stmt_expr. Don't
1141         adjust the stmt_expr here.
1142         (build_vec_init): Use finish_stmt_expr_expr, convert result to
1143         array type.
1144         * parser.c (cp_parser_primar_expression): Adjust finish_stmt_expr
1145         call.
1146         * pt.c (tsubst_copy): Likewise.
1147         * semantics.c (finish_stmt_expr): Add parameter.
1149         * pt.c (instantiate_class_template): Push to class's scope before
1150         tsubsting base.
1152 2003-08-17  Jan Hubicka  <jh@suse.cz>
1154         PR C++/11702
1155         * semantics.c (finish_id_expression): Mark all functions as used.
1157 2003-08-16  Nathan Sidwell  <nathan@codesourcery.com>
1159         PR c++/11512
1160         * cvt.c (convert_to_void): Indicate which side of conditional has
1161         no effects, and rhs of comma operator. Test for no sideeffect
1162         expressions here and always build a convert expr.
1163         * init.c (expand_default_init): Convert the init to void.
1164         * typeck.c (build_x_compound_expr): Do not check for side effects
1165         here.
1166         (build_compound_expr): Do not convert lhs when building a
1167         template.
1169 2003-08-15  Nathan Sidwell  <nathan@codesourcery.com>
1171         * cp-tree.def (NON_DEPENDENT_EXPR): Add operand.
1172         * decl2.c (build_offset_ref_call_from_tree): Use
1173         build_non_dependent_expr.
1174         * error.c (dump_expr) <NON_DEPENDENT_EXPR case>: Dump the operand.
1175         * pt.c (build_non_dependent_expr): Set operand.
1177 2003-08-14  Jan Hubicka  <jh@suse.cz>
1179         * decl2.c (mark_member_pointers): Rename to...
1180         (mark_member_pointers_and_eh_tinfos): ... this one; deal with eh tinfos
1181         (lower_function): Update call.
1182         * except.c (eh_type_info): Break out from ...
1183         (build_eh_type): ... here; tinfo is already used.
1184         (finish_eh_spec_block): Mark tinfos as used.
1185         * semantics.c (finish_handler_params): Mark tinfo as used.
1186         * cp-tree.h (eh_type_info): Declare.
1188 2003-08-15  Nathan Sidwell  <nathan@codesourcery.com>
1190         * pt.c (instantiate_class_template): Set location before
1191         substuting bases.
1193         * decl.c (make_typename_type): Use my_friendly_assert.
1194         * pt.c (tsubst_aggr_type): Rearrange context substitution.
1196 2003-08-14  Jan Hubicka  <jh@suse.cz>
1198         * method.c (use_thunk): Expand body directly.
1200 2003-08-12  Mark Mitchell  <mark@codesourcery.com>
1202         PR c++/11703
1203         * call.c (type_passed_as): Use TYPE_SIZE, not TYPE_PRECISION to
1204         determine whether or not to promote types.
1205         (convert_for_arg_passing): Likewise.
1206         * decl2.c (cp_build_parm_decl): Do not set DECL_ARG_TYPE in
1207         templates.
1208         * pt.c (tsubst_decl): Do not expect it to be set.
1210         PR c++/9512
1211         PR c++/10923
1212         * cp-tree.h (check_elaborated_type_specifier): Declare.
1213         (handle_class_head): Remove.
1214         (note_got_semicolon): Likewise.
1215         (note_list_got_semicolon): Likewise.
1216         (finish_class_definition): Likewise.
1217         * decl.c (check_elaborated_type_specifier): Make it public.
1218         Robustify.
1219         (handle_class_head): Remove.
1220         * parser.c (cp_parser_elaborated_type_specifier): Use
1221         check_elaborated_type_specifier.
1222         (cp_parser_class_specifier): Do not call finish_class_definition.
1223         (cp_parser_class_head): Or handle_class_head.  Check for
1224         over-qualified names.
1225         * semantics.c (finish_class_definition): Remove.
1227         * parser.c (cp_parser_check_for_definition_in_return_type): New
1228         function.
1229         (cp_parser_simple_declaration): Adjust call to
1230         cp_parser_init_declarator.
1231         (cp_parser_decl_specifier_seq): Change type of
1232         declares_class_or_enum parameter.
1233         (cp_parser_explicit_instantiation): Adjust accordingly.
1234         (cp_parser_type_specifier): Change type of
1235         declares_class_or_enum parameter.
1236         (cp_parser_init_declarator): Add declares_class_or_enum
1237         parameter.
1238         (cp_parser_parameter_declaration): Adjust call to
1239         cp_parser_decl_specifier_seq.
1240         (cp_parser_function_definition): Likewise.
1241         (cp_parser_member_declaration): Likewise.
1242         (cp_parser_single_declaration): Likewise.
1244         * cp-tree.h (lang_type_class): Remove has_call_overloaded,
1245         has_array_ref_overloaded, has_arrow_overloaded, and got_semicolon.
1246         (TYPE_OVERLOADS_CALL_EXPR): Remove.
1247         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
1248         (TYPE_OVERLOADS_ARROW): Likewise.
1249         (CLASSTYPE_GOT_SEMICOLON): Likewise.
1250         * class.c (check_bases): Do not set them.
1251         (finish_struct_1): Likewise.
1252         * decl.c (cp_finish_decl): Do not set CLASSTYPE_GOT_SEMICOLON.
1253         (build_ptrmemfunc_type): Likewise.
1254         (grok_op_properties): Do not set TYPE_OVERLOADS_*.
1255         (start_function): Do not check CLASSTYPE_GOT_SEMICOLON.
1256         * decl2.c (grokfield): Do not set CLASSTYPE_GOT_SEMICOLON.
1257         * lex.c (note_got_semicolon): Remove.
1258         (note_list_got_semicolon): Likewise.
1259         * parser.c (cp_parser_simple_declaration): Do not call
1260         note_list_got_semicolon.
1261         * pt.c (list_eq): Remove.
1262         (lookup_template_class): Do not set CLASSTYPE_GOT_SEMICOLON.
1263         (instantiate_class_template): Do not set TYPE_OVERLOADS*.
1264         (instantiate_class_template): Do not set CLASSTYPE_GOT_SEMICOLON.
1265         * ptree.c (cxx_print_type): Do not print them.
1266         * semantics.c (finish_member_class_template): Do not call
1267         note_list_got_semicolon.
1269 2003-08-11  Aldy Hernandez  <aldyh@redhat.com>
1271         * call.c (standard_conversion): Opaque pointers interconvert.
1273         * testsuite/g++.dg/other/opaque-3.C: New.
1275 2003-08-11  Mark Mitchell  <mark@codesourcery.com>
1277         * typeck.c (merge_types): Handle cv-qualified pointer-to-member
1278         types correctly.
1280 2003-08-10  Mark Mitchell  <mark@codesourcery.com>
1282         PR c++/11789
1283         * cp-tree.h (get_vbase): Remove.
1284         (get_vbase_types): Remove.
1285         * init.c (expand_member_init): Correct logic for looking up base
1286         classes.
1288 2003-08-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1290         * error.c (dump_expr): Tidy.
1291         * cxx-pretty-print.c (pp_cxx_nonconsecutive_character): New.
1292         (pp_cxx_begin_template_argument_list): Likewise.
1293         (pp_cxx_end_template_argument_list): Likewise.
1294         (is_destructor_name): Likewise.
1295         (pp_cxx_unqualified_id): Likewise.
1296         (pp_cxx_qualified_id): Likewise.
1297         (pp_cxx_id_expression): Likewise.
1298         (pp_cxx_new_expression): Likewise.
1299         (pp_cxx_delete_expression): Likewise.
1300         (pp_cxx_pm_expression): Likewise.
1301         (pp_cxx_type_specifier): Rework.
1302         (pp_cxx_type_id): Likewise.
1303         (pp_cxx_primary_expression): Likewise.
1304         (pp_cxx_postfix_expression): Likewise.
1305         (pp_cxx_unary_expression): Likewise.
1306         (pp_cxx_multiplicative_expression): Likewise.
1307         (pp_cxx_conditional_expression): Likewise.
1308         (pp_cxx_assignment_expression): Likewise.
1309         (pp_cxx_pretty_printer_init): Tidy.
1311 2003-08-10  Nathan Sidwell  <nathan@codesourcery.com>
1313         * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): non-NULL
1314         NODE is always a TREE_VEC of nonzero size.
1315         (NUM_TMPL_ARGS): NODE is always a TREE_VEC.
1316         * decl2.c (arg_assoc): Template args will be a vec.
1317         * error.c (dump_decl) <TEMPLATE_ID_EXPR case>: Call
1318         dump_template_argument_list.
1319         (dump_template_parms): Args will be a vec.
1320         * parser.c (cp_parser_template_argument_list): Produce a
1321         vector, not a list.
1322         * pt.c (coerce_template_parms): Args are always vectors.
1323         (mangle_class_name_for_template): Likewise.
1324         (lookup_template_function): Likewise.
1325         (lookup_template_class): Likewise.
1326         (tsubst_template_args): Likewise.
1327         (tsubst_baselink): Use tsubst_template_args.
1328         (tsubst_qualified_id): Likewise.
1329         (tsubst_copy) <TEMPLATE_ID_EXPR case>: Likewise.
1330         (tsubst_copy_and_build) <TEMPLATE_ID_EXPR case>: Likewise.
1331         (any_dependent_template_args_p):  Args are always vectors.
1332         * tree.c (cp_tree_equal): Add TEMPLATE_ID_EXPR case.
1334         PR c++/11670
1335         * call.c (convert_like_real): Add rvalue binding error message.
1336         * error.c (dump_expr) <NOP_EXPR case>: Detect when the no expr is
1337         really a cast.
1339         PR c++/10530
1340         * pt.c (dependent_type_p_r): A dependent template-id is a class
1341         type with dependent template arguments, or a bound template
1342         template parameter.
1343         (type_dependent_expression_p): A template function decl cannot
1344         have a dependent context.
1346 2003-08-07  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1348         PR c++/5767
1349         * parser.c (cp_parser_class_name): Return immediately when scope
1350         is error_mark_node.
1352 2003-08-07  Aldy Hernandez  <aldyh@redhat.com>
1354         * cp/Make-lang.in (cp/call.o): Add dependency for target.h.
1356         * cp/call.c (standard_conversion): Support opaque types.
1357         Include target.h.
1358         (strip_top_quals): Use cp_build_qualified_type instead of
1359         TYPE_MAIN_VARIANT.
1361         * cp/typeck.c (convert_for_assignment): Support opaque types.
1363         * testsuite/g++.dg/other/opaque-1.C: New.
1365         * testsuite/g++.dg/other/opaque-2.C: New.
1367 2003-08-06  Aldy Hernandez  <aldyh@redhat.com>
1369         * decl.c (grokparms): Use cp_build_qualified_type instead
1370         TYPE_MAIN_VARIANT.
1372 2003-08-05  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1374         * cxx-pretty-print.h: New file.
1375         * cxx-pretty-print.c: Likewise.
1376         * error.c (scratch_pretty_printer): Change type.
1377         (init_error): Tidy.
1378         (dump_aggr_type): Likewise.
1379         (dump_global_iord): Likewise.
1380         (dump_expr): Likewise.
1381         (dump_char): Remove.
1382         * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTITCS): Define.
1383         (cxx_initialize_diagnostics): New function.
1384         * Make-lang.in (CXX_OBJS): Add cp/cxx-pretty-print.o
1385         (CXX_PRETTY_PRINT_H): New variable.
1386         (cp/cxx-pretty-print.o): New rule.
1387         (cp/cp-lang.o): Update dependence.
1388         (cp/error.o): Likewise.
1390 2003-08-05  Steven Bosscher  <steven@gcc.gnu.org>
1392         * cp-tree.h (struct lang_decl): Don't include c_lang_decl.
1393         (DECL_DECLARED_INLINE_P): Remove.
1394         * decl2.c (import_export_decl): Only look at DECL_DECLARED_INLINE_P
1395         if decl is a FUNCTION_DECL.  This never made sense, but now it is
1396         required to avoid a tree check failure.
1397         * decl.c (grokfndecl): Don't touch DID_INLINE_FUNC.
1398         * optimize.c (maybe_clone_body): Likewise.
1400 2003-08-04  Roger Sayle  <roger@eyesopen.com>
1402         * decl.c (cxx_insert_default_attributes): Delete.
1403         * cp-tree.h (cxx_insert_default_attributes): Don't prototype.
1404         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Don't define.
1406 2003-08-03  Nathan Sidwell  <nathan@codesourcery.com>
1408         PR c++/11704
1409         * pt.c (type_dependent_expression_p): Cope with COMPONENT_REF with
1410         unknown type.
1412         PR c++/11766
1413         * typeck.c (comp_ptr_ttypes_real): Don't loop on pointers to
1414         member functions.
1416 2003-08-02  Nathan Sidwell  <nathan@codesourcery.com>
1418         PR c++/9447
1419         * cp-tree.def (USING_DECL): Document its type.
1420         * class.c (pushclass): If we're entering a template, push any
1421         dependent using decls it has.
1422         * decl2.c (do_class_using_decl): Refactor. Type is NULL iff it is
1423         a dependent scope.
1424         * pt.c (tsubst_decl) <USING_DECL case>: Set type.
1425         (tsubst): Remove USING_DECL checks.
1426         (type_dependent_expression_p): Remove USING_DECL case.
1427         * semantics.c (finish_member_declaration): A USING_DECL's type
1428         indicates whether it is dependent.
1430 2003-08-02  Nathan Sidwell  <nathan@codesourcery.com>
1432         * cp-tree.h (pushclass): Remove unneeded parameter.
1433         * class.c (pushclass): Remove unneeded MODIFY parm. Adjust.
1434         (push_nested_class): Adjust pushclass call.
1435         * pt.c (instantiate_class_template): Likewise.
1436         * semantics.c (begin_class_definition): Likewise.
1438 2003-08-01  Nathanael Nerode  <neroden@gcc.gnu.org>
1440         * typeck2.c (add_exception_specifier): Use 'bool' where appropriate.
1442 2003-08-01  Mark Mitchell  <mark@codesourcery.com>
1444         PR c++/11697
1445         * decl.c (decls_match): Don't ignore the types of template
1446         classes.
1448         PR c++/11744
1449         * pt.c (tsubst_copy_and_build): Refine Koenig lookup logic.
1451 2003-08-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1453         PR c++/8442, c++/8806
1454         * decl.c (qualify_lookup): Accept TEMPLATE_DECL if types are
1455         preferred.
1456         (check_elaborated_type_specifier): Add allow_template_p
1457         parameter.  Check tag mismatch and class template.
1458         (xref_tag): Add template_header_p parameter.  Add assertion
1459         that name is an IDENTIFIER_NODE.  Remove implicit typename
1460         warning.  Simplify lookup process if globalize is true.
1461         (cxx_init_decl_processing): Adjust call to xref_tag.
1462         (xref_tag_from_type): Likewise.
1463         * decl2.c (handle_class_head): Likewise.
1464         * parser.c (cp_parser_elaborated_type_specifier,
1465         cp_parser_class_head): Likewise.
1466         * rtti.c (init_rtti_processing, build_dynamic_cast1,
1467         tinfo_base_init, emit_support_tinfos): Likewise.
1468         * class.c (is_base_of_enclosing_class): Remove.
1469         * pt.c (convert_template_argument): Don't accept RECORD_TYPE as
1470         template template argument.
1471         * cp-tree.h (xref_tag): Adjust declaration.
1472         (is_base_of_enclosing_class): Remove.
1473         * NEWS: Document template template argument change.
1475 2003-08-01  Nathan Sidwell  <nathan@codesourcery.com>
1477         * parser.c (cp_parser_init_declarator,
1478         cp_paser_member_declaration): Reformat.
1479         * pt.c (lookup_template_class, type_unification_real, unify,
1480         type_dependent_expression_p): Reformat.
1482         PR c++/11295
1483         * cp-tree.h (tubst_flags_t): Add tf_stmt_expr_cmpd,
1484         tf_stmt_expr_body.
1485         (finish_stmt_expr_expr): Declare.
1486         * parser.c (cp_parser_primary_expression): Tell
1487         cp_parser_compount_statement that it is a statement expression.
1488         (cp_parser_statement, cp_parser_labeled_statement,
1489         cp_parser_compound_statement, cp_parser_statement_seq_opt): Add
1490         in_statement_expr_p parameter.
1491         (cp_parser_expression_statement): Likewise. Call
1492         finish_stmt_expr_expr for final expression of a statement
1493         expression.
1494         (cp_parser_for_init_statement,
1495         cp_parser_implicitly_scoped_statement,
1496         cp_parser_already_scoped_statement, cp_parser_function_definition,
1497         cp_parser_try_block, cp_parser_handled): Adjust.
1498         * pt.c (tsubst_copy) <STMT_EXPR case>: Pass tf_stmt_expr.
1499         (tsubst_expr): Process tf_stmt_expr and tf_stmt_exprs flags.
1500         (tsubst_expr) <EXPR_STMT case>: Check tf_stmt_exprs flag.
1501         * semantics.c (finish_expr_stmt): Do not deal with statement
1502         expressions.
1503         (begin_stmt_expr): Clear last_expr_type.
1504         (finish_stmt_expr_expr): New.
1505         (finish_stmt_expr): Process the value expression.
1507         * typeck.c (build_compound_expr): If RHS is a TARGET_EXPR, put the
1508         compound expr inside the target's initializer.
1510         PR c++/11525
1511         * parser.c (cp_parser_primary_expression): Do not set
1512         non-constant-p merely because it is a dependent scope.
1514         PR c++/9447
1515         * decl2.c (do_class_using_decl): Set type to NULL_TREE.
1516         * semantics.c (finish_expr_stmt): Do not convert to void in a
1517         template.
1519 2003-07-31  Nathan Sidwell  <nathan@codesourcery.com>
1521         * pt.c (coerce_template_parms): Refactor.
1522         (fn_type_unification): Increment processing_template_decl when
1523         tsubsting an incomplete set of explicit args.
1525         PR c++/11347
1526         * pt.c (instantiate_class_template): Increment
1527         processing_template_decl around the tsubst of a template member
1528         class.
1529         (tsubst_qualified_id): Assert we do not have a dependent scope.
1531         * pt.c (coerce_template_template_parms, lookup_template_class,
1532         can_complete_type_without_circularity, instantiate_class_template,
1533         tsubst_decl, unify): Reformat.
1535 2003-07-31  Jan Hubicka  <jh@suse.cz>
1537         * decl2.c (maybe_make_one_only): Use mark_referenced.
1538         * method.c (use_thunk): Likewsie.
1540 2003-07-30  Jan Hubicka  <jh@suse.cz>
1542         * class.c (build_vtable_entry_ref): Kill.
1543         (build_vtbl_ref_1): Do not call build_vtable_entry_ref.
1544         (build_vfn_ref): Do not call build_vtable_entry_ref.
1545         * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Kill.
1546         * cp-tree.h (prepare_assemble_variable): Kill.
1547         * cp-decl.c (prepare_assemble_variable): Kill.
1549 2003-07-29  Geoffrey Keating  <geoffk@apple.com>
1551         * parser.c (cp_lexer_new_main): Use c_common_no_more_pch instead
1552         of setting valid_pch by hand.
1554 2003-07-29  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
1556         * decl.c (finish_enum): Initialize underlying_type.
1558 2003-07-29  Nathan Sidwell  <nathan@codesourcery.com>
1560         PR c++/9447
1561         * decl.c (add_binding): Add bval local variable.
1562         (push_class_level_binding): Likewise. Allow a USING_DECL to be
1563         pushed.
1564         * decl2.c (do_class_using_decl):  The type of a using decl is
1565         unknown.
1566         * parser.c (cp_parser_postfix_expression): Refactor unqualified-id
1567         function call lookup code.
1568         * pt.c (tsubst): A USING_DECL will have unknown type.
1569         (tsubst_copy_and_build): Allow a using decl.
1570         (type_dependent_expression_p): A USING_DECL will make it
1571         dependent.
1572         * semantics.c (finish_member_declaration): Push a dependent using
1573         declaration.
1575 2003-07-28  Mark Mitchell  <mark@codesourcery.com>
1577         PR c++/11530
1578         * parser.c (cp_parser_postfix_expression): Do not call mark_used.
1579         * semantics.c (finish_id_expression): Call mark_used for all
1580         declarations.
1582 2003-07-28  Mark Mitchell  <mark@codesourcery.com>
1584         PR c++/11667
1585         * call.c (standard_conversion): Allow all integral->enumeral
1586         conversions, after marking them as bad.
1587         * decl.c (finish_enum): Make sure that all enumerators are
1588         properly converted to the underlying type.
1589         (build_enumerator): Set DECL_CONTEXT for namespace-scope
1590         enumeration types.
1591         * pt.c (tsubst_copy): Adjust handling of CONST_DECLs accordingly.
1592         (tsubst_enum): Tidy.
1594         * Make-lang.in (typeck.o): Depend on convert.h.
1595         (class.o): Likewise.
1596         (rtti.o): Likewise.
1597         * call.c: Include convert.h.
1598         (convert_arg_to_ellipsis): Use convert_to_real.
1599         * class.c: Include convert.h.
1600         (build_base_path): Use convert_to_integer.
1601         * rtti.c: Include convert.h.
1602         (build_headof): Use convert_to_integer.
1603         * typeck.c: Include convert.h.
1604         (decay_conversion): Use convert_to_integer.
1605         (build_unary_op): Use build_nop.
1606         (get_delta_difference): Use convert_to_integer.
1607         (build_ptrmemfunc): Avoid unncessary conversions.
1609 2003-07-28  Jan Hubicka  <jh@suse.cz>
1611         * decl2.c (mark_member_pointers): Verify that member pointer points to
1612         the function.
1614 2003-07-28  Nathan Sidwell  <nathan@codesourcery.com>
1616         * cp-tree.h (begin_compound_stmt): No scope arg is a bool.
1617         (finish_compound_stmt): Remove no scope arg.
1618         * decl.c (register_dtor_fn): Adjust begin_compound_stmt and
1619         end_compound_stmt calls.
1620         (expand_static_init, begin_destructor_body, begin_function_body,
1621         finish_function_body): Likewise.
1622         * decl2.c (start_objects, finish_objects,
1623         start_static_storage_duration_function,
1624         finish_static_storage_duration_function): Likewise.
1625         * init.c (begin_init_stmts, finish_init_stmts,
1626         construct_virtual_base, build_vec_init): Likewise.
1627         * method.c (do_build_assign_ref, synthesize_method): Likewise.
1628         * parser.c (cp_parser_compound_statement,
1629         cp_parser_implicitly_scoped_statement,
1630         cp_parser_already_scoped_statement): Likewise.
1631         * pt.c (tsubst_expr): Likewise.
1632         * semantics.c (begin_compound_stmt): No scope arg is a bool.
1633         (finish_compound_stmt): Remove no scope arg.
1635         * error.c (dump_expr) <COMPOUND_EXPR case>: A compound expr is
1636         always dyadic.
1638 2003-07-27  Mark Mitchell  <mark@codesourcery.com>
1640         * call.c (standard_conversion): Tweak handling of
1641         pointer-to-member types.
1642         * pt.c (tsubst): Correctly qualify pointers-to-data member types.
1643         * typeck.c (comp_ptr_ttypes_real): Check qualifiers on
1644         pointer-to-data member types.
1646 2003-07-27  Nathan Sidwell  <nathan@codesourcery.com>
1648         * parser.c (cp_parser_type_parameter): Reformat.
1649         (cp_parser_parameter_declaration): Deprecate default args where
1650         not allowed.
1652 2003-07-26  Nathan Sidwell  <nathan@codesourcery.com>
1654         * cfns.h: Rebuilt.
1656         * cp-tree.h (begin_init_stmts, finish_init_stmts): Remove.
1657         (begin_global_stmt_expr, finish_global_stmt_expr): Remove.
1658         * init.c (begin_init_stmts): Make static. Return is_global
1659         value. Always call begin_stmt_expr.
1660         (finish_init_stmts): Make static. Add is_global parm. Always
1661         building a stmt tree.
1662         (build_aggr_init): Adjust begin_init_stmts, finish_init_stmts calls.
1663         (build_vec_init): Likewise. Always building a stmt tree.
1664         (expand_default_init): Always building a stmt tree.
1665         (get_temp_regvar): Likewise.
1666         * semantics.c (begin_global_stmt_expr,
1667         finish_global_stmt_expr): Remove.
1669 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
1671         * cp-tree.h (build_compound_expr): Take LHS & RHS args.
1672         (build_x_compound_expr_from_list): Declare.
1673         * typeck.c (build_x_compound_expr_from_list): New.
1674         (build_x_compound_expr): Adjust.
1675         (build_compound_expr): Remove unreachable code. Take two
1676         parameters, adjust.
1677         * decl.c (grok_reference_init): Use
1678         build_x_compound_expr_from_list.
1679         (expand_static_init): Adjust build_compound_expr call.
1680         (cxx_maybe_build_cleanup): Likewise.
1681         * init.c (perform_member_init): Use
1682         build_x_compound_expr_from_list.
1683         (build_new_1): Likewise.
1684         (build_vec_delete): Adjust build_compound_expr calls.
1685         (build_vbase_delete): Likewise.
1686         * typeck2.c (store_init_value): Use
1687         build_x_compound_expr_from_list.
1688         (build_functional_cast): Likewise.
1690 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
1692         * cp-tree.h (enum tsubst_flags_t): Add tf_user.
1693         * decl.c (make_typename_type): Pass it.
1694         * pt.c (lookup_template_class): Use it.
1695         (resolve_typename_type): Pass it.
1696         * semantics.c (finish_template_type): Pass it.
1698 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
1700         PR c++/11617
1701         * cp-tree.h (qualified_name_lookup_error): Declare.
1702         * pt.c (tsubst_qualified_id): Use qualified_name_lookup_error for
1703         errors.
1704         (tsubst_expr) <DECL_STMT case>: Likewise.
1705         (tsubst_copy_and_build) <COMPONENT_REF case>: Likewise.
1706         * semantics.c (qualified_name_lookup_error): New, broken out of ...
1707         (finish_id_expression): ... here. Use it.
1709 2003-07-25  Falk Hueffner  <falk.hueffner@student.uni-tuebingen.de>
1711         * cfns.gperf: Add '%%' delimiter to placate gperf 3.0.
1713 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
1715         PR c++/11596
1716         * pt.c (maybe_fold_nontype_arg, maybe_fold_nontype_args): Remove.
1717         (tsubst_template_arg): New.
1718         (tsubst_template_arg_vector): Rename to ...
1719         (tsubst_template_args): ... this. Accept a TREE_LIST form. Use
1720         tsubst_template_arg.
1721         (coerce_template_parms): Use tsubst_template_arg for default
1722         value.
1723         (tsubst_template_parms): Likewise.
1724         (tsubst_aggr_type): Adjust.
1725         (tsubst_decl): Likewise.
1726         (tsubst): Use tsubst_template_arg for a DOMAIN. Adjust.
1727         (tsubst_copy) <TEMPLATE_ID_EXPR case>: Use tsubst_template_args.
1729 2003-07-25 Gabriel Dos Reis  <gdr@integrable-solutions.net>
1731         * Make-lang.in (cp/error.o): Depend on DIAGNOSTIC_H.
1732         * error.c: Use the new pretty-printer framework.
1734 2003-07-24  Per Bothner  <pbothner@apple.com>
1736         * decl.c (pushdecl_class_level): Don't use push_srcloc/pop_srcloc
1737         which causes errors messages to incorrectly mention included files.
1739 2003-07-24  Mark Mitchell  <mark@codesourcery.com>
1741         * cp-tree.h (convert_to_base_statically): Declare.
1742         * call.c (build_special_member_call): Convert INSTANCE to the base
1743         type.
1744         * class.c (convert_to_base_statically): New method.
1745         * init.c (construct_virtual_base): Use it.
1746         * method.c (do_build_assign_ref): Fix typo in comment.
1748 2003-07-24  Jason Merrill  <jason@redhat.com>
1750         * decl.c: Just set truthvalue_* to boolean_*.
1752 2003-07-24  Nathan Sidwell  <nathan@codesourcery.com>
1754         * decl.c (reshape_init): Remove unreachable code.
1756 2003-07-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1758         PR c++/11513
1759         * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): Use current_scope.
1761 2003-07-23  Mark Mitchell  <mark@codesourcery.com>
1763         PR c++/11645
1764         * cp-tree.h (accessible_base_p): Declare.
1765         * call.c (build_over_call): Use it.
1766         * search.c (accessible_base_p): New function, split out from ...
1767         (lookup_base): ... here.
1769         PR c++/11517
1770         * call.c (build_conditional_expr): Use perform_implicit_conversion
1771         and error_operand_p.  Robustify.
1772         * typeck.c (build_unary_op): Use perform_implicit_conversion.
1774 2003-07-23  Nathan Sidwell  <nathan@codesourcery.com>
1776         PR c++/10953
1777         * parser.c (cp_parser_nested_name_specifier): Reset scope on
1778         failure.
1779         (cp_parser_elaborated_type_specifier): Likewise.
1781 2003-07-22  Mark Mitchell  <mark@codesourcery.com>
1783         Eliminate use of POINTER_TYPE for pointers-to-members.
1784         * call.c (standard_conversion): Rework pointer-to-member handling.
1785         Add comments.
1786         (add_builtin_candidate): Likewise.
1787         (resolve_scoped_fn_name): Remove.
1788         (build_conditional_expr): Rework pointer-to-member handling.
1789         (compare_ics): Likewise.
1790         * class.c (check_field_decls): Use TYPE_PTR_P.
1791         * cp-lang.c (cp_var_mod_type_p): Rework pointer-to-member
1792         handling.
1793         * cp-tree.h (SCALAR_TYPE_P): Use TYPE_PTR_TO_MEMBER_P.
1794         (TYPE_PTRMEM_P): Add comment.
1795         (TYPE_PTR_P): Simplify.
1796         (TYPE_PTROB_P): Correct definition.
1797         (TYPE_PTR_TO_MEMBER_P): New macro.
1798         (TYPE_PTRMEM_CLASS_TYPE): Adjust.
1799         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
1800         (resolved_scoped_fn_name): Remove declaration.
1801         (build_offset_ref): Change prototype.
1802         (resolve_offset_ref): Remove.
1803         (comp_target_types): Remove.
1804         * cvt.c (cp_convert_to_pointer): Rework pointer-to-member
1805         handling.
1806         (convert_to_reference): Use can_convert.
1807         (ocp_convert): Improve error handling.  Rework pointer-to-member
1808         handling.
1809         (perform_qualification_conversions): Rework pointer-to-member
1810         handling.
1811         * decl.c (build_ptrmem_type): Handle functions too.
1812         (create_array_type_for_decl): Remove OFFSET_TYPE error message.
1813         (grokdeclarator): Use OFFSET_TYPE for pointers to data members.
1814         (grokparms): Remove OFFSET_TYPE error message.
1815         * dump.c (cp_dump_tree): Rework pointer-to-member handling.
1816         * error.c (dump_type_prefix): Likewise.
1817         * expr.c (cplus_expand_constant): Use build_nop.
1818         * init.c (build_offset_ref): Add address_p parameter.  Fold in
1819         necessary bits from resolve_offset_ref.
1820         (resolve_offset_ref): Remove.
1821         * parser.c (cp_parser_postfix_expression): Remove special case
1822         code for OFFSET_TYPE.
1823         * pt.c (convert_nontype_argument): Rework pointer-to-member
1824         handling.
1825         (convert_template_argument): Likewise.
1826         (unify): Likewise.
1827         (invalid_nontype_parm_type_p): Likewise.
1828         (dependent_type_p_r): Likewise.
1829         * rtti.c (get_tinfo_decl): Remove OFFSET_TYPE special case.
1830         (target_incomplete_p_): Rework pointer-to-member
1831         handling.
1832         (get_pseudo_ti_init): Likewise.
1833         (get_pseudo_ti_desc): Likewise.
1834         * semantics.c (finish_qualified_id_expr): Adjust call to
1835         build_offset_ref.  Remove use of resolve_offset_ref.
1836         * tree.c (pod_type_p): Use TYPE_PTR_TO_MEMBER_P.
1837         * typeck.c (target_type): Use TYPE_PTRMEM_P.
1838         (type_unknown_p): Remove obsolete code about the time before
1839         non-dependent expressions were handled correctly.
1840         (qualify_type_recursive): Remove.
1841         (composite_pointer_type_r): New function.
1842         (composite_pointer_type): Use it.
1843         (merge_types): Remove dead comments.
1844         (comp_cv_target_types): Remove.
1845         (comp_target_types): Likewise.
1846         (comp_target_parms): Likewise.
1847         (cxx_sizeof_or_alignof_type): Remove OFFSET_TYPE error.
1848         (build_indirect_ref): Use TYPE_PTR_TO_MEMBER_P.
1849         (build_binary_op): Do not use of comp_target_types.
1850         (pointer_diff): Remove OFFSET_TYPE case.
1851         (build_unary_op): Adjust pointer-to-member handling.
1852         (unary_complex_lvalue): Likewise.
1853         (check_for_casting_away_constness): Add description parameter.
1854         (build_static_cast): Pass it.
1855         (build_reinterpret_cast): Use check_for_casting_away_constness.
1856         (build_const_cast): Adjust pointer-to-member handling.
1857         (build_c_cast): Likewise.
1858         (convert_for_assignment): Remove OFFSET_TYPE error message.
1859         (comp_ptr_ttypes_real): Adjust pointer-to-member handling.
1860         (comp_ptr_ttypes_reinterpret): Remove.
1861         (casts_away_constness_r): Adjust pointer-to-member handling.
1862         (casts_away_constness): Liekwise.
1863         (strip_all_pointer_quals): Remove.
1864         * typeck2.c (digest_init): Adjust pointer-to-member handling.
1865         (build_m_component_ref): Likewise.
1867 2003-07-22  Wolfgang Bangerth  <bangerth@dealii.org>
1869         * lex.c (unqualified_fn_lookup_error): Mention that the error
1870         message needs to be kept in synch with the manual.
1872 2003-07-22  Nathan Sidwell  <nathan@codesourcery.com>
1874         PR c++/11614
1875         * decl.c (grokdeclarator): An array member is only a flexible
1876         array member if the field itself is the array.
1878 2003-07-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1880         PR c++/10793
1881         * decl.c (xref_basetypes): Handle error_mark_node.
1883 2003-07-22  Nathan Sidwell  <nathan@codesourcery.com>
1885         * cp-tree.h (enum cp_lvalue_kind): Add clk_packed.
1886         * tree.c (lvalue_p_1): Set it.
1887         * class.c (check_field): Don't allow non-packed non-POD fields to
1888         be packed.
1889         * call.c (reference_binding): Need a temporary for all bitfield
1890         and packed fields.
1891         (convert_like_real): Check it is ok to make a temporary here.
1893 2003-07-21  Nathan Sidwell  <nathan@codesourcery.com>
1895         * cp-tree.h (hack_identifier): Remove.
1896         * method.c (hack_identifier): Remove.
1897         * semantics.c (finish_id_expression): Expand hack_identifier
1898         here. Simplify.
1900 2003-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1902         * call.c class.c decl.c decl2.c g++spec.c lex.c parser.c pt.c rtti.c
1903         semantics.c typeck.c: Remove unnecessary casts.
1905 2003-07-18  Nathan Sidwell  <nathan@codesourcery.com>
1907         * cp-tree.h (hack_identifier): Remove.
1908         * method.c (hack_identifier): Remove.
1909         * semantics.c (finish_id_expression): Expand hack_identifier
1910         here. Simplify.
1912 2003-07-18  Nathan Sidwell  <nathan@codesourcery.com>
1914         * cp-tree.h (finish_non_static_data_member): Add object param.
1915         * method.c (hack_identifier): Adjust.
1916         * pt.c (tsubst_copy_and_build) <COMPONENT_REF case>: Don't search
1917         again for a FIELD_DECL.
1918         * semantics.c (finish_non_static_data_member): Add object
1919         parameter. Always save the DECL in the COMPONENT_REF.
1920         * call.c (resolve_scoped_fn_name): Adjust.
1922 2003-07-17  Zack Weinberg  <zack@codesourcery.com>
1924         * pt.c (get_bindings): Make definition consistent with
1925         forward declaration.
1927 2003-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1929         PR c++/7809
1930         * friend.c (add_friend): Check access for member functions
1931         and templates.
1933 2003-07-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1935         PR c++/10668
1936         * typeck.c (build_class_member_access_expr): Improve diagnostic.
1938 2003-07-16  Mark Mitchell  <mark@codesourcery.com>
1940         PR c++/11547
1941         * cp-tree.h (DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P): New
1942         macro.
1943         (DECL_PRETTY_FUNCTION_P): Use VAR_DECL_CHECK.
1944         * decl.c (duplicate_decls): Merge
1945         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1946         * parser.c (cp_parser_postfix_expression): Adjust call to
1947         cp_parser_initializer_list and
1948         cp_parser_parenthesized_expression_list.
1949         (cp_parser_parenthesized_expression_list): Add non_constant_p.
1950         (cp_parser_new_placement): Adjust call to
1951         cp_parser_parenthesized_expression_list.
1952         (cp_parser_direct_new_declarator): Likewise.
1953         (cp_parser_conditional_expression): Remove.
1954         (cp_parser_constant_expression): Parse an assignment-expression,
1955         not a conditional-expression.
1956         (cp_parser_simple_declaration): Resolve expression/declaration
1957         ambiguity more quickly.
1958         (cp_parser_mem_initializer): Adjust call to
1959         cp_parser_parenthesized_expression_list.
1960         (cp_parser_init_declarator): Keep track of whether or not the
1961         initializer is a constant-expression.
1962         (cp_parser_initializer): Add non_constant_p parameter.
1963         (cp_parser_initializer_clause): Likewise.
1964         (cp_parser_initializer_list): Likewise.
1965         (cp_parser_attribute_list): Adjust call to
1966         cp_parser_parenthesized_expression_list.
1967         (cp_parser_functional_cast): Likewise.
1968         * pt.c (tsubst_decl): Copy
1969         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1970         (tsubst_expr): Tweak use of DECL_PRETTY_FUNCTION_P.
1971         * semantics.c (finish_id_expression): Use
1972         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1974 2003-07-16  Neil Booth  <neil@daikokuya.co.uk>
1976         * lang-options.h: Remove.
1978 2003-07-16  Andrew Pinski  <pinskia@physics.uc.edu>
1980         PR c/10962
1981         * class.c (field_decl_cmp): Remove.
1982         (resort_field_decl_cmp): Remove.
1983         (resort_sorted_fields): Remove.
1984         (add_fields_to_vec): Rename to ...
1985         (add_fields_to_record_type): this.
1986         (finish_struct_1): Change to be using
1987         sorted_fields_type's fields.
1988         * cp-tree.h (lang_decl): In lang_decl_u3
1989         change sorted_fields to be a pointer to
1990         sorted_fields_type.
1991         (resort_sorted_fields): Remove prototype.
1992         * search.c (lookup_field_1): Change to be using
1993         sorted_fields_type's fields.
1995 2003-07-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1997         PR c++/5421
1998         * decl.c (grokdeclarator): Handle TEMPLATE_ID_EXPR if friend
1999         is a member of other class.
2000         * friend.c (do_friend): Don't build TEMPLATE_DECL if friend
2001         is a specialization of function template.
2003 2003-07-16  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2005         PR c++/10903
2006         * pt.c (convert_nontype_argument): Fix thinko in diagnostic.
2007         Improve.
2009 2003-07-15  Mark Mitchell  <mark@codesourcery.com>
2011         * cp-tree.def (LOOKUP_EXPR): Remove.
2012         * cp-tree.h (cp_id_kind): Add CP_ID_KIND_UNQUALIFIED_DEPENDENT.
2013         (LOOKUP_EXPR_GLOBAL): Remove.
2014         (get_bindings): Remove.
2015         (is_aggr_type_2): Remove.
2016         * call.c (resolved_scoped_fn_name): Remove support for
2017         LOOKUP_EXPR.
2018         * decl.c (grokfndecl): Likewise.
2019         (grokdeclarator): Likewise.
2020         * error.c (dump_decl): Likewise.
2021         (dump_expr): Likewise.
2022         * friend.c (do_friend): Likewise.
2023         * init.c (build_offset_ref): Likewise.
2024         * lex.c (unqualified_fn_lookup_error): Use pedwarn.  Do not create
2025         LOOKUP_EXPRs
2026         * mangle.c (write_expression): Remove support for LOOKUP_EXPR.
2027         * parser.c (cp_parser_postfix_expression): Modify Koenig lookup
2028         test.
2029         * pt.c (get_bindings): Give it internal linkage.
2030         (check_explicit_specialization): Remove support for LOOKUP_EXPR.
2031         (lookup_template_function): Likewise.
2032         (for_each_tempalte_parm_r): Likewise.
2033         (tsubst_decl): Likewise.
2034         (tsubst_qualified_id): Handle template template parameters.
2035         (tsubst_copy): Remove support for LOOKUP_EXPR.
2036         (tsubst_copy_and_build): Likewise.
2037         (most_general_template): Likewise.
2038         (value_dependent_expression_p): Likewise.
2039         (type_dependent_expression_p): Note that IDENTIFIER_NODEs are
2040         always dependent.
2041         * semantics.c (perform_koenig_lookup): Do not create
2042         IDENTIFIER_NODEs.
2043         (finish_fname): Likewise.
2044         (finish_id_expression): Likewise.
2045         * tree.c (is_aggr_type_2): Remove.
2047 2003-07-16  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2049         PR c++/11531
2050         * typeck.c (check_return_expr): Fix thinko in diagnostic.
2052 2003-07-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2054         PR c++/10108
2055         * pt.c (tsubst_decl) <TEMPLATE_DECL>: Add a check for
2056         error_mark_node.
2058 2003-07-14  Mark Mitchell  <mark@codesourcery.com>
2060         PR c++/11509
2061         * pt.c (dependent_scope_ref_p): New function.
2062         (value_dependent_expression_p): Use it.
2063         (type_dependent_expression_p): Likewise.
2065         * pt.c (tsubst_friend_function): Use reregister_specialization.
2067         PR c++/7019
2068         * cp-tree.h (lookup_qualified_name): Adjust prototype.
2069         * decl.c (lookup_qualified_name): Add complain parameter.  Adjust
2070         call to is_aggr_type.
2071         * parser.c (cp_parser_lookup_name): Adjust call to
2072         lookup_qualified_name.
2073         * pt.c (tsubst_qualified_id): Likewise.
2074         (tsubst_copy_and_build): Likewise.
2075         * semantics.c (finish_qualified_id_expr): Deal with erroneous
2076         expressions.
2078 2003-07-14  Gabriel Dos Reis <gdr@integrable-solutions.net>
2080         PR c++/11510
2081         * call.c (op_error): Properly format  REALPART_EXPR and
2082         IMAGPART_EXPR.
2083         * error.c (dump_expr): Likewise.
2085 2003-07-14  Gabriel Dos Reis <gdr@integrable-solutions.net>
2087         * error.c (dump_expr): Handle EMPTY_CLASS_EXPR.
2089 2003-07-14  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2091         PR c++/5293
2092         * call.c (initialize_reference): Improve diagnostic.
2094 2003-07-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2096         PR c++/11154
2097         * pt.c (more_specialized_class): Add full_args parameter.
2098         (most_specialized_class): Adjust calls to more_specialized_class.
2099         * cp-tree.h (more_specialized_class): Adjust declaration.
2101 2003-07-14  Dan Nicolaescu  <dann@ics.uci.edu>
2103         * lex.c (enum tree_node_kind): Delete.
2105 2003-07-13  Mark Mitchell  <mark@codesourcery.com>
2107         PR c++/11503
2108         * cp-tree.h (DECL_SELF_REFERENCE_P): New macro.
2109         (SET_DECL_SELF_REFERENCE_P): Likewise.
2110         * class.c (build_self_reference): Use SET_DECL_SELF_REFERENCE_P.
2111         * pt.c (tsubst_decl): Copy it.
2112         * search.c (lookup_base): Use DECL_SELF_REFERENCE_P.
2114         * pt.c (reregister_specialization): Fix thinko in previous change.
2116         * cp-tree.h (cp_id_kind): New type.
2117         (unqualified_name_lookup_error): Change prototype.
2118         (unqualified_fn_lookup_error): New function.
2119         (do_identifier): Remove.
2120         (do_scoped_id): Likewise.
2121         (tsubst_copy_and_build): Change prototype.
2122         (reregister_specialization): New function.
2123         (perform_koenig_lookup): Likewise.
2124         (finish_id_expression): Likewise.
2125         * call.c (build_method_call): Adjust call to
2126         unqualified_name_lookup_error.
2127         * decl.c (duplicate_decls): Use reregister_specialization.
2128         * lex.c (is_global): Remove.
2129         (unqualified_name_lookup_error): Return a value.
2130         (do_identifier): Remove.
2131         (do_scoped_id): Likewise.
2132         (identifier_typedecl_value): Remove.
2133         (unqualified_fn_lookup_error): New function.
2134         * parser.c (cp_parser_id_kind): Remove.
2135         (cp_parser_non_constant_id_expression): Remove.
2136         (cp_parser_primary_expression): Use finish_id_expression.
2137         (cp_parser_class_or_namespace_name): Use cp_id_kind, not
2138         cp_parser_id_kind.
2139         (cp_parser_postfix_expression): Use perform_koenig_lookup.
2140         (cp_parser_template_argument): Use cp_id_kind.
2141         (cp_parser_fold_non_dependent_expr): Adjust call to
2142         tsubst_copy_and_build.
2143         * pt.c (unregister_specialization): Rename to ...
2144         (reregister_specialization): This.
2145         (tsubst_friend_function): Use it.
2146         (maybe_fold_nontype_arg): Adjust call to tsubst_copy_and_build.
2147         (tsubst_qualified_id): Likewise.
2148         (tsubst_expr): Likewise.
2149         (tsubst_copy_and_build): Add function_p parameter.  Use
2150         finish_id_expression.  Introduce RECUR macro.
2151         (tsubst_non_call_postfix_expression): New function.
2152         (regenerate_decl_from_template): Use reregister_specialization.
2153         * semantics.c (perform_koenig_lookup): New function.
2154         (finish_id_expression): Likewise.
2156 2003-07-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2158         * pt.c (push_access_scope_real): Remove.
2159         (push_access_scope): Move code from push_access_scope_real.
2160         (pop_access_scope): Don't check for TEMPLATE_DECL.
2161         (instantiate_template): Defer access checking during template
2162         substitution.
2163         (regenerate_decl_from_template): Tidy.
2165 2003-07-11  Nathanael Nerode  <neroden@gcc.gnu.org>
2167         PR c++/11437
2168         * operators.def: Add definitions for __imag__, __real__.
2170 2003-07-11  Nathan Sidwell  <nathan@codesourcery.com>
2172         PR c++/11050
2173         * parser.c (cp_parser_expression_list): Rename to ...
2174         (cp_parser_parenthesized_expression_list): ... here. Add attribute
2175         parameter, parse the surounding parentheses.
2176         (cp_parser_skip_to_closing_parenthesis): Add recover and or_comma
2177         parameters. Return int.
2178         (cp_parser_skip_to_closing_parenthesis or comma): Remove.
2179         (cp_parser_postfix_expression): Adjust function call parsing.
2180         (cp_parser_new_placement): Adjust.
2181         (cp_parser_new_initializer): Likewise.
2182         (cp_parser_cast_expression): Likewise.
2183         (cp_parser_selection_statement): Likewise.
2184         (cp_parser_mem_initializer): Likewise.
2185         (cp_parser_asm_definition): Likewise.
2186         (cp_parser_init_declarator): Likewise.
2187         (cp_parser_declarator): Make
2188         cdtor_or_conv_p an int ptr.
2189         (cp_parser_direct_declarator): Likewise. Check for a parameter
2190         list on cdtors & conv functions.
2191         (cp_parser_initializer): Adjust.
2192         (cp_parser_member_declaration): Adjust.
2193         (cp_parser_attribute_list): Move code into
2194         cp_parser_parens_expression_list.
2195         (cp_parser_functional_cast): Adjust.
2196         * pt.c (type_dependent_expression_p): Erroneous expressions are
2197         non-dependent.
2199 2003-07-11  Geoffrey Keating  <geoffk@apple.com>
2201         * decl.c (cp_finish_decl): Handle 'used' attribute.
2203         * cp-lang.c (c_reset_state): New dummy routine.
2204         * cp-tree.h (finish_file): Move prototype to c-common.h.
2205         * parser.c (c_parse_file): Rename from yyparse; don't call finish_file.
2207 2003-07-11  Mark Mitchell  <mark@codesourcery.com>
2209         PR c++/8327
2210         * pt.c (tsubst_qualified_id): Implement suggested resolution for
2211         Core Issue 2.
2212         (type_dependent_expression_p): Likewise.
2214 2003-07-10  Mark Mitchell  <mark@codesourcery.com>
2216         * typeck.c (build_binary_op): Do not warn about signed
2217         vs. unsigned comparisons in the bodies of templates.
2219         PR c++/9411
2220         * parser.c (cp_parser_postfix_expression): Check dependency of
2221         functions.
2223 2003-07-09  Mark Mitchell  <mark@codesourcery.com>
2225         PR c++/10032
2226         * decl.c (cxx_init_decl_processing): With -pedantic, pedwarns are
2227         still errors.
2229         PR c++/10527
2230         * error.c (decl_to_string): Do not print default argument
2231         expressions.
2233         * cp-tree.h (break_out_calls): Remove declaration.
2234         * tree.c (break_out_calls): Remove.
2235         * typeck.c (build_modify_expr): Avoid invalid sharing of trees.
2237 2003-07-09  Nathan Sidwell  <nathan@codesourcery.com>
2239         PR c++ 9483
2240         * class.c (check_field_decls): Pass DECL_NAME to constructor_name_p.
2241         * decl2.c (constructor_name_p): Avoid repeated constructor_name
2242         calls.
2243         * decl.c (grokdeclarator): Refactor ctor/dtor detection.
2245 2003-07-09  Mark Mitchell  <mark@codesourcery.com>
2247         * typeck.c (build_x_unary_op): Take note of the fact that
2248         PREINCREMENT_EXPR and POSTINCREMENT_EXPR are binary operations on
2249         trees.
2251         * parser.c (cp_parser_primary_expression): Preserve the form of
2252         qualified expressions in templates, even if they are not
2253         dependent.
2254         * pt.c (convert_nontype_argument): Handle non-dependent SCOPE_REFs.
2255         (tsubst_qualified_id): Likewise.
2256         * search.c (accessible_p): Treat everything in the body of a
2257         template as accessible.
2259 2003-07-08  Mark Mitchell  <mark@codesourcery.com>
2261         * cp-tree.def (NON_DEPENDENT_EXPR): New node.
2262         * cp-tree.h (build_call_from_tree): Remove.
2263         (build_member_call): Likewise.
2264         (dependent_template_arg_p): Remove.
2265         (any_dependent_template_arguments_p): New function.
2266         (dependent_template_id_p): Likewise.
2267         (any_type_dependent_arguments_p): Likewise.
2268         (build_non_dependent_expr): Likewise.
2269         (build_non_dependent_args): Likewise.
2270         (build_x_compound_expr): Adjust prototype.
2271         * call.c (build_new_method_call): Handle non-dependent expressions
2272         correctly.
2273         * decl2.c (grok_array_decl): Likewise.
2274         (build_offset_ref_call_from_tree): Likewise.
2275         (build_call_from_tree): Remove.
2276         * error.c (dump_decl): Handle NON_DEPENDENT_EXPR.
2277         (dump_expr): Likewise.
2278         * init.c (build_member_call): Remove.
2279         * mangle.c (write_expression): Update handling for template-ids.
2280         * parser.c (cp_parser_primary_expression): Use
2281         any_dependent_template_arguments_p.  Update constant-expression
2282         handling.
2283         (cp_parser_postfix_expression): Use
2284         any_type_dependent_arguments_p.  Simplify call processing.
2285         (cp_parser_unary_expression): Simplify.
2286         (cp_parser_expression): Adjust for changes to
2287         build_x_compound_expr.
2288         (cp_parser_template_argument): Implement standard-conforming
2289         parsing of non-type template arguments.
2290         (cp_parser_direct_declarator): Use
2291         cp_parser_fold_non_dependent_expr.
2292         (cp_parser_fold_non_dependent_expr): New function.
2293         (cp_parser_next_token_ends_template_argument_p): Likewise.
2294         * pt.c (convert_template_argument): Do not call
2295         maybe_fold_nontype_arg.
2296         (tsubst_baselink): Likewise.
2297         (tsubst_copy_and_build): Share common code.  Make sizeof/alignof
2298         processing work correctly for non-dependent expressions.  Adjust
2299         handling of COMPOUND_EXPR.  Simplify call processing.
2300         (value_dependent_expression_p): Deal with functional casts and
2301         sizeof/alignof correctly.
2302         (type_dependent_expression_p): Handle overloaded functions.
2303         (any_type_dependent_arguments_p): New function.
2304         (any_dependent_template_arguments_p): Likewise.
2305         (dependent_template_p): Treat SCOPE_REFs as dependent.
2306         (dependent_template_id_p): Simplify.
2307         (build_non_dependent_expr): New function.
2308         (build_non_dependent_args): Likewise.
2309         * semantics.c (finish_stmt_expr): Don't make dependent
2310         statement-expresions have void type.
2311         (finish_call_expr): Handle non-dependent expressions
2312         correctly.
2313         * tree.c (lvalue_p_1): Treat NON_DEPENDENT_EXPRs as lvalues.
2314         * typeck.c (cxx_sizeof_or_alignof_type): Give the expression
2315         type size_t, even in templates.
2316         (expr_sizeof): Likewise.
2317         (finish_class_member_access_expr): Handle non-dependent expressions
2318         correctly.
2319         (build_x_indirect_ref): Likewise.
2320         (build_x_binary_op): Likewise.
2321         (build_x_unary_op): Likewise.
2322         (build_x_conditional_expr): Likewise.
2323         (build_x_compound_expr): Likewise.
2324         * typeck2.c (build_x_arrow): Likewise.
2326 2003-07-09  Jan Hubicka  <jh@suse.cz>
2328         * cp-lang.c (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): New.
2329         * decl.c (duplicate_decls): Use DECL_ESTIMATED_INSNS.
2330         (start_function): Use DECL_ESTIMATED_INSNS.
2331         * optimize.c (maybe_clone_body): Use DECL_ESTIMATED_INSNS.
2333         * decl2.c (maybe_emit_vtables): Fix marking vtables as needed in
2334         unit-at-a-time
2336 2003-07-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2338         PR c++/11030
2339         * pt.c (instantiate_class_template): Don't call xref_tag to
2340         inject name when the friend class is a specialization.
2342 2003-07-07  Mark Mitchell  <mark@codesourcery.com>
2344         * cp-tree.h (build_scoped_method_call): Remove.
2345         (lookup_qualified_name): Remove parameter.
2346         (tsubst_copy_and_build): Declare.
2347         (finish_qualified_object_call_expr): Remove.
2348         (check_accessibility_of_qualified_id): New function.
2349         (finish_qualified_id_expr): Likewise.
2350         (non_reference): Likewise.
2351         (build_expr_from-tree): Remove.
2352         * call.c (non_reference): Remove.
2353         (build_scoped_method_call): Likewise.
2354         (build_method_call): Use error_operand_p.  Assert that we are not
2355         processing a template.
2356         (standard_conversion): Use non_reference.
2357         * class.c (build_vtbl_entry_ref): Likewise.
2358         (build_vtbl_ref_1): Likewise.
2359         * cvt.c (build_expr_type_conversion): Use non_reference.
2360         * decl.c (lookup_qualified_name): Remove flags parameter.
2361         (grok_op_properties): Use non_reference.
2362         * decl2.c (grok_array_decl): Likewise.
2363         (build_expr_from_tree): Remove.
2364         (build_offset_ref_call_from_tree): Update comment.
2365         * error.c (parm_to_string): Call reinit_global_formatting_buffer.
2366         * except.c (prepare_eh_types): Use non_reference.
2367         (can_convert_eh): Likewise.
2368         * init.c (build_dtor_call): Avoid using build_method_call.
2369         * mangle.c (write_template_param): Remove misleading comment.
2370         * method.c (locate_copy): Use non_reference.
2371         * parser.c (cp_parser_scope_through_which_access_occurs): Remove.
2372         (cp_parser_primary_expression): Do not create SCOPE_REFs is
2373         non-dependent contexts.
2374         (cp_parser_postfix_expression): Use finish_qualified_id_expr.
2375         (cp_parser_direct_declarator): Use tsubst_copy_and_build, not
2376         build_expr_from_tree.
2377         (cp_parser_lookup_name): Adjust call to lookup_qualified_name.
2378         Use check_accessibility_of_qualified_id.
2379         * pt.c (maybe_fold_nontype_arg): Use tsubst_copy_and_build, not
2380         build_expr_from_tree.
2381         (tsubst_baselink): New function.
2382         (tsubst_qualified_id): Likewise.
2383         (tsubst_copy): Use them.  Remove support for METHOD_CALL_EXPR.
2384         (tsubst_expr): Adjust call to lookup_qualified_name.
2385         (tsubst_copy_and_build): Handle SCOPE_REFs specially.  Adjust
2386         handling of CALL_EXPRs.
2387         (value_dependent_expression_p): Use INTEGRAL_OR_ENUMERATION_TYPE_P.
2388         * rtti.c (get_tinfo_decl_dynamic): Use non_reference.
2389         * search.c (check_final_overrider): Likewise.
2390         * semantics.c (check_accessibility_of_qualified_id): New function.
2391         (finish_qualified_object_call_expr): Remove.
2392         * typeck.c (target_type): Use non_reference.
2393         (cxx_sizeof_or_alignof_type): Likewise.
2394         (dubious_conversion_warnings): Likewise.
2395         (convert_for_initialization): Likewise.
2396         (non_reference): New function.
2398 2003-07-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2400         * decl.c (print_binding_level, print_other_binding_stack,
2401         print_binding_stack): Merge uses of HOST_PTR_PRINTF with adjacent
2402         stdio calls.
2403         * ptree.c (cxx_print_decl, cxx_print_binding): Likewise.
2405 2003-07-07  Andreas Jaeger  <aj@suse.de>
2407         * friend.c: Convert to ISO C90 prototypes.
2409         * Make-lang.in ($(srcdir)/cp/cfns.h): Use ANSI-C as output
2410         language.
2411         * cfns.h: Regenerate.
2413         * typeck.c: Convert remaining prototypes to ISO C90.
2414         * search.c: Likewise.
2416         * decl2.c (build_expr_from_tree): Convert prototype to ISO C90.
2417         * semantics.c (expand_or_defer_fn): Likewise
2418         * mangle.c (discriminator_for_string_literal): Likewise.
2419         * g++spec.c (lang_specific_driver): Likewise.
2421         * search.c (lookup_base_r): Remove unused variable.
2423 2003-07-07  Nathan Sidwell  <nathan@codesourcery.com>
2425         * semantics.c: (genrtl_try_block) Adjust emit_line_note
2426         calls.
2428 2003-07-07  Andreas Jaeger  <aj@suse.de>
2430         * search.c (lookup_base_r): Remove unused variable.
2432 2003-07-06  Michael Chastain  <mec@shout.net>
2434         PR debug/10055
2435         * lex.c (cxx_init): Call push_srcloc and pop_srcloc rather than
2436         assigning to input_filename directly.
2438 2003-07-06  Kazu Hirata  <kazu@cs.umass.edu>
2440         * call.c: Fix comment formatting.
2441         * class.c: Likewise.
2442         * cp-tree.h: Likewise.
2443         * decl.c: Likewise.
2444         * decl2.c: Likewise.
2445         * error.c: Likewise.
2446         * method.c: Likewise.
2447         * name-lookup.c: Likewise.
2448         * parser.c: Likewise.
2449         * pt.c: Likewise.
2450         * rtti.c: Likewise.
2451         * search.c: Likewise.
2452         * typeck.c: Likewise.
2454 2003-07-06  Mark Mitchell  <mark@codesourcery.com>
2456         PR c++/11345
2457         * search.c (lookup_base_r): Remove is_non_public and
2458         within_current_scope parameters.  Remove other dead code.
2459         (lookup_base): Adjust call to lookup_base_r.
2460         (adjust_result_of_qualified_name_lookup): Improve comment.
2461         * semantics.c (finish_call_expr): Use maybe_dummy_object.
2463 2003-07-06  Neil Booth  <neil@daikokuya.co.uk>
2465         * cp-lang.c (LANG_HOOKS_HANDLE_FILENAME,
2466         LANG_HOOKS_MISSING_ARGUMENT): Override.
2468 2003-07-05  Mark Mitchell  <mark@codesourcery.com>
2470         PR c++/11431
2471         * typeck.c (build_static_cast): Check for reference conversions
2472         earlier.
2474 2003-07-04  Mark Mitchell  <mark@codesourcery.com>
2476         * cp-tree.h (perform_integral_promotions): Declare.
2477         * call.c (build_addr_func): Use decay_conversion.
2478         (convert_arg_to_ellipsis): Likewise.  Remove misleading comment.
2479         (convert_for_arg_passing): Use perform_integral_promotions.
2480         * cvt.c (build_expr_type_conversion): Use decay_conversion.
2481         (type_promotes_to): Do not return a cv-qualified type.
2482         * decl.c (grok_reference_init): Fix formatting.
2483         (get_atexit_node): Use decay_conversion.
2484         (build_enumerator): Use perform_integral_promotions.
2485         * init.c (build_vec_init): Use decay_conversion.
2486         * semantics.c (finish_expr_stmt): Likewise.
2487         (finish_switch_cond): Use perform_integral_promotions.
2488         * typeck.c (default_conversion): Likewise.
2489         (perform_integral_promotions): New function.
2490         (build_indirect_ref): Use decay_conversion.
2491         (build_array_ref): Use perform_integral_promotions.
2492         (convert_arguments): Use decay_conversion.
2493         (build_unary_op): Use perform_integral_promotions.
2494         (build_c_cast): Use decay_conversion.
2495         (build_modify_expr): Likewise.
2496         (convert_for_initialization): Likewise.
2497         * typeck2.c (build_x_arrow): Likewise.
2499 2003-07-04  Kazu Hirata  <kazu@cs.umass.edu>
2501         * call.c: Fix comment typos.
2502         * class.c: Likewise.
2503         * cp-tree.h: Likewise.
2504         * cvt.c: Likewise.
2505         * decl2.c: Likewise.
2506         * decl.c: Likewise.
2507         * init.c: Likewise.
2508         * mangle.c: Likewise.
2509         * parser.c: Likewise.
2510         * pt.c: Likewise.
2511         * search.c: Likewise.
2512         * semantics.c: Likewise.
2513         * tree.c: Likewise.
2514         * typeck.c: Likewise.
2516 2003-07-04  Zack Weinberg  <zack@codesourcery.com>
2518         * parser.c (cp_lexer_read_token): No need to handle string
2519         constant concatenation.
2521 2003-07-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2523         * cp-tree.h (GCC_DIAG_STYLE, ATTRIBUTE_GCC_CXXDIAG): Define.
2524         (cp_error_at, cp_warning_at, cp_pedwarn_at): Mark with
2525         ATTRIBUTE_GCC_CXXDIAG.
2527 2003-07-03  Mark Mitchell  <mark@codesourcery.com>
2529         * call.c (build_addr_func): Handle bound pointers-to-members.
2530         (build_method_call): Do not call resolve_offset_ref.
2531         (implicit_conversion): Likewise.
2532         (resolve_scoped_fn_name): Use finish_non_static_data_member, not
2533         resolve_offset_ref.
2534         (resolve_args): Do not call resolve_offset_ref.
2535         (build_conditional_expr): Likewise.
2536         (build_new_method_call): Likewise.
2537         * cp-tree.def (OFFSET_REF): Update documentation.
2538         * cvt.c (cp_convert_to_pointer): Update handling of conversions from
2539         pointers to members to pointers.
2540         (ocp_convert): Do not call resolve_offset_ref.
2541         (convert_to_void): Likewise.
2542         (build_expr_type_conversion): Likewise.
2543         * decl2.c (delete_sanity): Likewise.
2544         * init.c (resolve_offset_ref): Simplify greatly.
2545         (build_vec_delete): Do not call resolve_offset_ref.
2546         * parser.c (cp_parser_postfix_expression): Call resolve_offset_ref
2547         if appropriate.
2548         (cp_parser_unary_expression): Use
2549         cp_parser_simple_cast_expression.
2550         (cp_parser_delete_expression): Likewise.
2551         (cp_parser_cast_expression): Likewise.
2552         (cp_parser_pm_expression): Use cp_parser_binary_op.
2553         (cp_parser_simple_cast_expression): New function.
2554         * rtti.c (build_dynamic_cast_1): Do not call resolve_offset_ref.
2555         * semantics.c (finish_increment_expr): Likewise.
2556         (finish_typeof): Likewise.
2557         * tree.c (lvalue_p_1): Do not handle OFFSET_REF.
2558         * typeck.c (require_complete_type): Do not handle OFFSET_REFs.
2559         (decay_conversion): Do not call resolve_offset_ref.
2560         (finish_class_member_access_expr): Likewise.
2561         (convert_arguments): Likewise.
2562         (build_x_binary_op): Handle DOTSTAR_EXPR.
2563         (condition_conversion): Do not call resolve_offset_ref.
2564         (unary_complex_lvalue): Likewise.
2565         (build_static_cast): Likewise.
2566         (build_reinterpret_cast): Likewise.
2567         (build_const_cast): Likewise.
2568         (build_c_cast): Likewise.
2569         (build_modify_expr): Likewise.
2570         (convert_for_assignment): Likewise.
2571         (convert_for_initialization): Likewise.
2572         * typeck2.c (build_x_arrow): Likewise.
2573         (build_m_component_ref): Simplify.
2575         * call.c (build_scoped_method_call): Use convert_to_void.
2576         (build_method_call): Likewise.
2577         * class.c (check_field_decls): Remove dead code.
2578         * cvt.c (convert_from_reference): Remove OFFSET_TYPE handling.
2579         * decl2.c (grok_array_decl): Remove dead code.
2580         (arg_assoc_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
2581         as pointer-to-member representation.
2582         * init.c (build_offset_ref): Tidy.
2583         (build_vec_delete_1): Use convert_to_void.
2584         * mangle.c (write_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
2585         as pointer-to-member representation.
2587 2003-07-03  Nathan Sidwell  <nathan@codesourcery.com>
2589         PR c++/9162
2590         * decl.c (grokdeclarator): Return friend decls, not
2591         void_type_node.
2592         * decl2.c (grokfield): Alter friend decl check.
2593         * parser.c (struct cp_parser): Document default_arg chain on
2594         unparsed_functions_queue.
2595         (cp_parser_save_default_args): New.
2596         (cp_parser_init_declarator, cp_parser_function_definition,
2597         cp_parser_member_declaration): Call it.
2598         (cp_parser_class_specifier): Remove unused variable. Alter
2599         processing of unparsed_functions_queue.
2601 2003-07-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2603         * class.c (add_method, check_field_decl): Fix format specifier.
2604         * decl.c (duplicate_decls, pushdecl, check_goto,
2605         fixup_anonymous_aggr, maybe_commonize_var, grokdeclarator,
2606         start_enum): Likewise.
2607         * decl2.c (ambiguous_decl): Likewise.
2608         * pt.c (redeclare_class_template): Likewise.
2610 2003-07-02  Nathan Sidwell  <nathan@codesourcery.com>
2612         PR c++/10219
2613         * pt.c (type_unification_real): Don't unify exprs of error type.
2614         * tree.c (error_type): Don't die on error_type.
2616         PR c++/9779
2617         * decl2.c (arg_assoc_class): Don't die on NULL type.
2618         * typeck.c (type_unknown_p): Don't die on untyped expressions.
2620 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
2622         PR c++/6949
2623         * decl2.c (grokfield): Create TEMPLATE_DECLs for methods in local
2624         classes.
2626 2003-07-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2628         * error.c (locate_error): %P takes an `int', not a `tree'.
2630 2003-07-02  Jan Hubicka  <jh@suse.cz>
2632         * decl2.c (defer_fn): Set DECL_DEFER_OUTPUT.
2633         (finish-file): Do not process function with DECL_DEFER_OUTPUT clear;
2634         clear DECL_DEFER_OUTPUT once function is processed; avoid flags
2635         massaging.
2637         * cp-tree.h (DECL_NEEDED_P): Support unit-at-a-time
2638         (expand_or_defer_fn): Declare.
2639         (lower_function): Declare.
2640         * decl.c (start_cleanup_fn): Use expand_or_defer_fn.
2641         * decl2.c: Include cgraph.h and varpool.h
2642         (maybe_emit_vtables):  Make explicit instantations as needed.
2643         (mark_member_pointers, lower_function): New functions.
2644         (finish_file): Do unit-at-a-time.
2645         * method.c (synthesize_method): Use expand_or_defer_fn.
2646         * optimize.c (maybe_clone_body): Use expand_or_defer_fn.
2647         * parser.c (cp_parser_function_definition_after_decl): Use
2648         expand_or_defer_fn.
2649         * pt.c (instantiate_decl): Likewise.
2650         * semantics.c: Include cgraph.h
2651         (expand_or_defer_fn): Break out from ...
2652         (expand_body): ... here; deal with unit-at-a-time.
2653         * cp-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION,
2654         LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Define.
2656 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
2658         * call.c (resolve_scoped_fn_name): Return error_mark_node for
2659         erroneous cases.
2661 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
2663         PR c++/11149
2664         * call.c (resolve_scoped_fn_name): Check that the qualifying scope
2665         is a class type.
2667 2003-07-01  Giovanni Bajo  <giovannibajo@libero.it>
2669         PR c++/8046
2670         * error.c (dump_decl): Handle BIT_NOT_EXPR as
2671         pseudo destructor calls.
2673 2003-07-01  Nathan Sidwell  <nathan@codesourcery.com>
2675         * cp-tree.h (define_label): Replace filename and lineno
2676         arguments with a location_t.
2677         * decl.c (pop_label): Adjust define_label call.
2678         (define_label): Replace filename and lineno arguments with a
2679         location_t.
2680         * semantics.c (finish_label): Adjust define_label call.
2682 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
2684         PR c++/9559
2685         * decl2.c (grokfield): Do not build NOP_EXPRs around the
2686         error_mark_node.
2688 2003-06-30  Neil Booth  <neil@daikokuya.co.uk>
2690         * Make-lang.in: Update.
2691         * cp-lang.c (c_language): Define.
2692         (LANG_HOOKS_INIT_OPTIONS): Use common hook.
2693         * cp-tree.h (cxx_init_options): Remove.
2694         * lex.c: Don't include diagnostic.h.
2695         (cxx_init_options): Remove.
2697 2003-06-30  Giovanni Bajo  <giovannibajo@libero.it>
2699         PR c++/4933
2700         * error.c (dump_expr): Support correctly the COMPOUND_EXPR
2701         tree generated within a template. Use dump_expr to dump an
2702         expression sizeof.
2704 2003-06-30  Giovanni Bajo  <giovannibajo@libero.it>
2706         * mangle.c (write_expression): Exit gracefully when trying to
2707         mangle a CALL_EXPR.
2709 2003-06-30  Giovanni Bajo  <giovannibajo@libero.it>
2711         PR c++/10750
2712         * parser.c (cp_parser_primary_expression): A VAR_DECL with a
2713         (value- or type-) dependent expression as DECL_INITIAL is a
2714         valid constant-expression (at parser time).
2716 2003-06-30  Giovanni Bajo <giovannibajo@libero.it>
2718         PR c++/11106
2719         * error.c (dump_decl): Call dump_decl to dump the DECL_NAME for a
2720         USING_DECL, instead of print_tree_identifier.
2722 2003-06-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2724         * cp-tree.h (language_to_string): Adjust declaration.
2725         * dump.c (cp_dump_tree): Adjust usage.
2726         * error.c (dump_char): Use output_formatted_scalar. Tidy.
2727         (parm_to_string): Lose unused parameter.  Tidy.
2728         (expr_to_string): Likewise.
2729         (code_to_string): Likewise.
2730         (language_to_string): Likewise.
2731         (op_to_string): Likewise.
2732         (assop_to_string): Likewise.
2733         (digit_buffer): Remove.
2734         (dump_type): Format builtin vector type as __vector__.
2736 2003-06-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2738         * error.c (print_integer): Remove.
2739         (dump_type_suffix): Adjust.
2740         (dump_expr): Likewise.
2742 2003-06-28  Nathan Sidwell  <nathan@codesourcery.com>
2744         * error.c (print_instantiation_partial_context): Take a
2745         location_t.
2746         (print_instantiation_full_context): Adjust.
2747         (print_instantiation_context): Adjust.
2749         * cp-tree.h (cp_line_of, cp_file_of): Remove.
2750         * error.c (cp_line_of, cp_file_of): Merge into ...
2751         (location_of): ... here. Make static, return a location_t.
2752         (cp_error_at, cp_warning_at, cp_pedwarn_at): Adjust.
2754 2003-06-28  Nathan Sidwell  <nathan@codesourcery.com>
2756         PR c++/10784
2757         * call.c (joust): Move warn_conversion check outwards.
2759 2003-06-27  Zack Weinberg  <zack@codesourcery.com>
2761         * decl.c (build_typename_type)
2762         * mangle.c (write_template_template_arg)
2763         * parser.c (cp_parser_scope_through_which_access_occurs)
2764         * pt.c (push_access_scope_real, push_access_scope, pop_access_scope)
2765         * repo.c (get_base_filename)
2766         * semantics.c (maybe_convert_cond):
2767         Mark the definition static, matching the forward declaration.
2769 2003-06-27  Mark Mitchell  <mark@codesourcery.com>
2771         PR c++/10468
2772         * pt.c (tsubst): Handle qualified TYPEOF_TYPEs correctly.
2774 2003-06-27  Mark Mitchell  <mark@codesourcery.com>
2776         PR c++/10796
2777         * decl.c (finish_enum): Implement DR377.
2779         * decl.c (cp_finish_decl): Don't make variables with reference
2780         type readonly while they are being initialized.
2782 2003-06-26  Mark Mitchell  <mark@codesourcery.com>
2784         PR c++/11332
2785         * typeck.c (build_static_cast): Avoid returning expressions with
2786         reference type.
2788 2003-06-26  Nathan Sidwell  <nathan@codesourcery.com>
2790         * call.c (build_op_delete_call): Use strip_array_call. Correct
2791         error message to say 'delete' or 'delete[]'.
2793 2003-06-26  Giovanni Bajo  <giovannibajo@libero.it>
2795         PR c++/8266
2796         * pt.c (check_explicit_specialization): When looking up a
2797         template function from an identifier outside class-scope, bind
2798         it to CP_DECL_CONTEXT.
2800 2003-06-25  Mark Mitchell  <mark@codesourcery.com>
2802         PR c++/10990
2803         * search.c (lookup_base_r): Rely on accessible_p, rather than
2804         trying to emulate that logic here.
2806         PR c++/10931
2807         * call.c (convert_like): Pass issue_conversion_warnings.
2808         (convert_like_with_context): Likewise.
2809         (convert_like_real): Add issue_conversion_warnings parameter.
2810         (perform_direct_initialization_if_possible): New function.
2811         * cp-tree.h (perform_direct_initialization_if_possible): Declare it.
2812         * typeck.c (check_for_casting_away_constness): New function.
2813         (build_static_cast): Rewrite.
2815 2003-06-24  Nathan Sidwell  <nathan@codesourcery.com>
2817         * call.c (enforce_access): Assert we get a binfo.
2818         (build_op_delete_call): Pass a binfo to
2819         perform_or_defer_access_check.
2820         * class.c (alter_access): Likewise.
2821         * decl.c (make_typename_type): Likewise.
2822         (make_unbound_class_template): Likewise.
2823         * lex.c (do_identifier): Likewise.
2824         * method.c (hack_identifier): Likewise.
2825         * parser.c (cp_parser_lookup_name): Likewise.
2826         * search.c (lookup_member): Likewise. Move IDENTIFIER_CLASS_VALUE
2827         test.
2828         * semantics.c (finish_non_static_data_member): Likewise.
2829         (perform_or_defer_access_check): Expect a binfo.
2830         * typeck.c (comptypes): Expect types.
2832         * mangle.c (find_substitution): Don't pass a non-type to same_type_p
2833         * friend.c (make_friend_class): Likewise.
2834         * pt.c (check_default_tmpl_args): Likewise.
2835         (lookup_template_class): Likewise.
2837 2003-06-24  Jan Hubicka  <jh@suse.cz>
2839         * method.c (thunk_labelno): Move outside ifdef block to make garbage
2840         collector happy.
2842 2003-06-24  Jan Hubicka  <jh@suse.cz>
2844         * class.c (build_vtable): Make vtables.
2845         * cp-tree.h (DECL_VTABLE_OR_VTT_P): New macro.
2846         * decl2.c (output_vtable_inherit): Rename to ...
2847         (prepare_assemble_variable): ... this one; change interface.
2848         (maybe_emit_vtables): Do not call output_vtable_inherit.
2849         * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Define.
2850         * cp-tree.h (prepare_assemble_variable): New.
2852 2003-06-23  Andrew Pinski <pinskia@physics.uc.edu>
2854         * method.c: add prototype for make_alias_for_thunk.
2855         (thunk_labelno, make_alias_for_thunk): only define
2856         if ASM_OUTPUT_DEF is defined.
2858 2003-06-23  Jakub Jelinek  <jakub@redhat.com>
2860         * method.c (thunk_labelno): New variable.
2861         (make_alias_for_thunk): New function.
2862         (use_thunk): Use it if defined ASM_OUTPUT_DEF.  Put the thunk
2863         into the same section as the function it is calling.
2864         Include gt-cp-method.h.
2865         * Make-lang.in (gt-cp-method.h): Depend on s-gtype.
2866         (cp/method.o): Depend on gt-cp-method.h.
2867         * config-lang.in (gtfiles): Add $(srcdir)/cp/method.c.
2869 2003-06-23  Jan Hubicka  <jh@suse.cz>
2871         * decl.c (register_dtor_fn): Mark cleanup as used.
2872         * decl2.c (mark_vtable_entries): Skip nops.
2873         * rtti.c (get_tinfo_ptr): Mark tinfo as used.
2874         (build_dynamic_cast_1): Likewise.
2875         (tinfo_base_init): Likewise.
2876         (emit_tinfo_decl): Likewise.
2878 2003-06-23  Jakub Jelinek  <jakub@redhat.com>
2880         * mangle.c (hash_type): Val is the TREE_LIST itself, not a pointer
2881         to it.
2883 2003-06-21  Gabriel Dos Reis <gdr@integrable-solutions.net>
2885         PR c++/10784
2886         * call.c (joust): Warn about choosing conversion sequence only if
2887         -Wconversion.
2889 2003-06-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2891         PR c++/10864
2892         * call.c (op_error): Tidy.
2893         * error.c (dump_expr): Properly format 'T()' when T is an
2894         aggregate type.
2896 2003-06-21  Gabriel Dos Reis <gdr@integrable-solutions.net>
2898         PR c++/10915
2899         * decl.c (grok_op_properties): Warn possible confusing conversion
2900         only if -Wconversion.
2902 2003-06-20  Mark Mitchell  <mark@codesourcery.com>
2904         PR c++/10749
2905         * parser.c (cp_parser_class_head): See through dependent names
2906         when parsing a class-head.
2908         PR c++/10845
2909         * pt.c (try_class_unification): Correct handling of member class
2910         templates.
2912 2003-06-20  Nathan Sidwell  <nathan@codesourcery.com>
2914         * semantics.c (genrtl_finish_function): Adjust
2915         expand_function_end call.
2917 2003-06-19  Mark Mitchell  <mark@codesourcery.com>
2919         PR c++/10939
2920         * pt.c (tsubst_decl): Do not try to substitute into non-dependent
2921         functions.
2922         (value_dependent_expression_p): Correct logic for FUNCTION_DECLs.
2924         PR c++/9649
2925         * cp-tree.h (pushdecl_class_level): Change prototype.
2926         (push_class_level_binding): Likewise.
2927         * decl.c (add_binding): Reject duplicate static data members.
2928         (pushdecl_class_level): Return a value indicating whether or not
2929         the binding was valid.
2930         (push_class_level_binding): Likewise.
2931         * semantics.c (finish_member_declaration): Don't keep invalid
2932         declarations.
2934         PR c++/11041
2935         * call.c (initialize_reference): Do not use cp_finish_decl to emit
2936         temporary variables.
2937         * cp-tree.h (static_aggregates): Declare.
2938         (pushdecl_top_level_and_finish): Likewise.
2939         * decl.c (pushdecl_top_level_1): New function.
2940         (pushdecl_top_level): Use it.
2941         (pushdecl_top_level_and_finish): New function.
2942         (initialize_local_var): Remove redundant code.
2943         (cp_finish_decl): Remove support for RESULT_DECLs.  Don't check
2944         building_stmt_tree.
2945         * decl.h (static_aggregates): Remove.
2946         * decl2.c (get_guard): Use pushdecl_top_level_and_finish.
2947         * rtti.c (get_tinfo_decl): Use pushdecl_top_level_and_finish.
2948         (tinfo_base_init): Likewise.
2950 2003-06-19  Matt Austern  <austern@apple.com>
2952         PR c++/11228
2953         * init.c (build_zero_init): Assert that number of array elements
2954         is an integer constant.
2955         (build_default_init) Don't use build_zero_init for arrays with
2956         variable number of elements.
2958 2003-06-19  Andreas Jaeger  <aj@suse.de>
2960         * cp-tree.h: Remove duplicated declarations.
2962 2003-06-18  Nathanael Nerode  <neroden@gcc.gnu.org>
2964         * pt.c: Convert to ISO C.
2965         * semantics.c: Convert to ISO C.
2967 2003-06-18  Nathan Sidwell  <nathan@codesourcery.com>
2969         * cp-tree.h (comp_except_specs, compparms, cp_has_mutable_p,
2970         at_least_as_qualified_p, more_qualified_p): Return bool.
2971         * typeck.c: ANSIFY function definitions.
2972         (comp_array_types): Take redeclaration bool parameter.
2973         (comptypes): Rearrange STRICT handling.
2974         (at_least_as_qualified_p, more_qualified_p,
2975         comp_cv_qualification): Cache cv quals.
2976         (compparms): Rearrange loop.
2978 2003-06-18  Nathan Sidwell  <nathan@codesourcery.com>
2980         * cp-tree.h (COMPARE_RELAXED): Rename to ...
2981         (COMPARE_DERIVED): ... here. Adjust comment.
2982         (resolve_typename_type_in_current_instantiation): Remove.
2983         (cp_tree_equal, comptypes): Return a bool.
2984         * cvt.c (convert_to_reference): Adjust comptypes call.
2985         * pt.c (template_args_equal, unify,): Adjust cp_tree_equal call.
2986         (resolve_typename_type_in_current_instantiation): Remove.
2987         * tree.c (cp_tree_equal): Return bool. Cope with TEMPLATE_DECLs and
2988         IDENTIFIER_NODEs. Abort if undeciderable. Adjust recursive
2989         calls. Refactor code.
2990         * typeck.c (comp_array_types): Return bool. Lose callback.
2991         parameter. Adjust cp_tree_equal calls.
2992         (comptypes): Return bool. Adjust strict handling. Remove relaxed
2993         enumeration and java type handling. Deal with typename types here.
2994         Adjust recursive and cp_tree_equals calls. Adjust base and derived
2995         checking.
2996         (comp_target_types): Remove unreachable code. Adjust
2997         same_or_base_type_p calls.
2998         (ptr_reasonably_similar): Adjust base and derived check.
3000         * typeck.c (maybe_warn_about_returning_address_of_local): Remove
3001         unused calculation.
3002         (check_return_expr): Adjust error messages.
3003         * cp-tree.def (SCOPE_REF): Correct comment.
3005 2003-06-17  Mark Mitchell  <mark@codesourcery.com>
3007         * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
3008         string again.
3010 2003-06-17  Robert Abeles  <rabeles@archaelogic.com>
3012         * optimize.c (dump_function): Form complete flag name by
3013         prefixing 'fdump-' to string returned by dump_flag_name().
3015 2003-06-17  Mark Mitchell  <mark@codesourcery.com>
3017         * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
3018         string.
3020 2003-06-17  Jason Merrill  <jason@redhat.com>
3022         PR c++/10929
3023         * decl.c (grokfndecl): Don't mark a function inline for
3024         -finline-functions if it isn't defined.
3026 2003-06-17  Mark Mitchell  <mark@codesourcery.com>
3028         PR c++/10712
3029         * class.c (handle_using_decl): Robustify.
3031         PR c++/11105
3032         * cp-tree.h (DECL_CONV_FN_TYPE): New method.
3033         * mangle.c (struct globals): Remove internal_mangling_p.
3034         (write_unqualified_name): Use DECL_CONV_FN_TYPE.
3035         (write_template_parm): Don't write out the level number.
3036         (conv_type_names): New variable.
3037         (hash_type): New function.
3038         (compare_type): Likewise.
3039         (mangle_conv_op_name_for_type): Don't try to mangle conversion
3040         operator names.
3041         * search.c (lookup_conversion_operator): New function.
3042         (lookup_fnfields_1): Use it.
3044 2003-06-17  Andreas Jaeger  <aj@suse.de>
3046         * except.c: Remove duplicate declaration of push_eh_cleanup.
3048         * call.c: Remove extra declaration of inhibit_warnings.
3050 2003-06-16  Nathanael Nerode  <neroden@gcc.gnu.org>
3052         2003-06-16  Jens-Michael Hoffmann  <jensmh@gmx.de>
3053         * mangle.c: Convert to ISO C.
3055 2003-06-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3057         * cp/decl.c, cp/pt.c, cp/search.c, cp/tree.c: Don't use the PTR
3058         macro.
3060 2003-06-16  Nathanael Nerode  <neroden@gcc.gnu.org>
3062         * tree.c: Convert to ISO C.
3064 2003-06-16  Kazu Hirata  <kazu@cs.umass.edu>
3066         * cp-tree.h: Follow spelling conventions.
3067         * mangle.c: Likewise.
3068         * method.c: Likewise.
3069         * parser.c: Likewise.
3071 2003-06-14  Nathan Sidwell  <nathan@codesourcery.com>
3073         * decl.c (start_function): Adjust init_function_start call.
3074         * method.c (use_thunk): Likewise.
3075         * semantics.c (genrtl_start_function): Likewise.
3077 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
3079         * Make-lang.in: Remove c-options.o.
3081 2003-06-13  Nathanael Nerode  <neroden@gcc.gnu.org>
3083         * lex.c: Convert to ISO C.
3085         2003-05-19  Jens-Michael Hoffmann  <jensmh@gmx.de>
3086         * init.c: removes use of PARAMS macro.  Use ISO style function
3087         declarations.  (Not copyright-significant change.)
3089         * rtti.c: Remove PARAMS.
3091         * typeck2.c: Convert to ISO C.
3093 2003-06-12  Mark Mitchell  <mark@codesourcery.com>
3095         PR c++/10635
3096         * typeck.c (build_c_cast): Check that the destination type is
3097         complete.
3099 2003-06-11  Mark Mitchell  <mark@codesourcery.com>
3101         PR c++/10432
3102         * cp-tree.h (finish_declarator): Remove.
3103         * decl.c (cp_finish_decl): Make sure to pop_nested_class even for
3104         erroneous declarations.
3105         * semantics.c (finish_declarator): Remove.
3107 2003-06-11  Roger Sayle  <roger@eyesopen.com>
3109         * decl2.c (generate_ctor_or_dtor_function): Avoid expanding a
3110         global static constructor/destructor if it will be empty, i.e.
3111         either doesn't call any ctors/dtors or only calls pure or const
3112         ctors/dtors.
3114 2003-06-11  Mark Mitchell  <mark@codesourcery.com>
3116         * mangle.c (tm_p.h): Include it.
3117         * Make-lang.in (cp/mangle.o): Depend on $(TM_P_H).
3119         PR c++/11131
3120         * tree.c (cp_cannot_inline_fn): Check for "inline" before
3121         instantiation.
3123 2003-06-10  Jason Merrill  <jason@redhat.com>
3125         PR c++/10968
3126         * pt.c (mark_decl_instantiated): Clear DECL_COMDAT.
3128 2003-06-10  Andrew Pinski  <pinskia@physics.uc.edu>
3130         * decl.c (start_cleanup_fn): Move static 'counter' out, mark with GTY.
3131         (start_cleanup_cnt): New.
3133 2003-06-10  Mark Mitchell  <mark@codesourcery.com>
3135         PR c++/11131
3136         * cp-tree.h (template_for_substitution): Declare.
3137         * decl2.c (mark_used): Use it when figuring out whether or not a
3138         function is inline.
3139         * pt.c (template_for_substitution): Give it external linkage.
3140         * tree.c (cp_cannot_inline_tree_fn): Instantiate as early as
3141         possible.
3143 2003-06-09  Zack Weinberg  <zack@codesourcery.com>
3145         PR 8861
3146         * mangle.c (write_real_cst): New function.  Implement
3147         ABI-compliant mangling of floating-point literals when
3148         -fabi-version>=2; provide backward compatibility with 3.3 when
3149         -fabi-version=1 (with warning).  Clarify commentary.
3150         (write_template_arg_literal): Use write_real_cst.
3152 2003-06-07  Andreas Jaeger  <aj@suse.de>
3154         * cp/decl.c (xref_tag): Remove undefined macro NONNESTED_CLASSES.
3156 2003-06-07  Neil Booth  <neil@daikokuya.co.uk>
3158         * cp-lang.c (LANG_HOOKS_DECODE_OPTON): Drop.
3159         (LANG_HOOKS_HANDLE_OPTION): Override.
3160         * cp-tree.h (cxx_init_options): Update.
3161         * lex.c (cxx_init_options): Update.
3163 2003-06-05  Jan Hubicka  <jh@suse.cz>
3165         * Make-lang.in:  Add support for stageprofile and stagefeedback
3167 2003-06-04  J"orn Rennecke <joern.rennecke@superh.com>
3169         * decl.c (grokdeclarator): Error_mark_node in, error_mark_node out.
3171 2003-06-04  Andreas Jaeger  <aj@suse.de>
3173         * g++spec.c (lang_specific_driver): Remove ALT_LIBM usage.
3175 2003-06-03  Jason Merrill  <jason@redhat.com>
3177         * cp/cp-tree.h (CP_AGGREGATE_TYPE_P): Accept vectors.
3179         * cp/decl.c (reshape_init): Handle vectors.
3181         * testsuite/g++.dg/init/array10.C: New.
3183 2003-06-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3185         PR c++/10940
3186         * pt.c (check_explicit_specialization): Check for 'static'
3187         earlier.
3189 2003-05-31  Diego Novillo  <dnovillo@redhat.com>
3191         * class.c (dump_array): Call CONSTRUCTOR_ELTS to access
3192         the operand of a CONSTRUCTOR node.
3194 2003-05-31  Gabriel Dos Reis <gdr@integrable-solutions.net>
3196         * decl.c (cp_binding_level::this_entity): Rename from this_class.
3197         (cxx_scope_descriptor): New function.
3198         (cxx_scope_debug): Likewise.
3199         (push_binding_level): Use it.
3200         (pop_binding_level): Likewise.
3201         (suspend_binding_level): Likewise.
3202         (resume_binding_level): Likewise.
3203         (pushlevel_class): Adjust use of this_class.
3204         (pushtag): Likewise.
3205         (lookup_name_real): Likewise.
3206         (global_scope_name): New variable.
3207         (initialize_predefined_identifiers): Initialize it.
3208         (push_namespace): Use it.
3209         (make_cxx_scope): New function.
3210         (pushlevel): Use it.
3211         (pushlevel_class): Likewise.
3212         (push_binding_level): Simplify.  Loose the last two arguments.
3213         (make_binding_level): Remove.
3214         (initial_push__namespace_scope): New function.
3215         (push_namespace): Use it.  Simplify.
3216         (cxx_init_decl_processing): Likewise.
3217         (declare_namespace_level): Remove.
3219 2003-05-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3221         PR c++/10956
3222         * pt.c (instantiate_decl): Don't use full template arguments if
3223         we are dealing with specializations.
3225 2003-05-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3227         * decl.c (ENABLE_SCOPE_CHECKING): Rename from DEBUG_BINDING_LEVELS.
3228         (binding_depth): Unconditionally define.
3229         (is_class_level): Likewise.
3230         (indent): Likewise.  Take an indenting parameter.
3231         (push_binding_level): Remove conditional definittion.
3232         (pop_binding_level): Likewise.
3233         (suspend_binding_level): Likewise.
3234         (resume_binding_level): Likewise.
3235         (pushlevel): Likewise.
3236         (pushlevel_class): Likewise.
3237         (poplevel_class): Likewise.
3238         (pop_everything): Likewise.
3240 2003-05-27  Gabriel Dos Reis <gdr@integrable-solutions.net>
3242         * name-lookup.h (global_scope_p): New macro.
3243         * decl.c (pop_binding_level): Use it.  Don't refer directly to
3244         global_binding_level.
3245         (suspend_binding_level): Likewise.
3246         (global_bindings_p): Likewise.
3247         (print_other_binding_stack): Likewise.
3248         (print_binding_stack): Likewise.
3249         (maybe_push_to_top_level): Likewise.
3250         (pushdecl_namespace_level): Likewise.
3251         (cxx_init_decl_processing): Likewise.
3252         (start_decl): Likewise.
3253         (cp_finish_decl): Likewise.
3254         (start_function): Likewise.
3255         (global_binding_level): Remove.
3257 2003-05-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3259         * parser.c (cp_parser_explicit_instantiation): Restore old
3260         access before template instantiation.
3262 2003-05-23  Geoffrey Keating  <geoffk@apple.com>
3264         * lang-specs.h: Use -o to specify preprocessor's output file.
3265         Make -no-integrated-cpp work when building PCH files.
3267 2003-05-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3269         PR c++/10682
3270         * pt.c (instantiate_class_template): Use DECL_ARTIFICIAL to
3271         check for implicitly created typedef to an enum.
3273 2003-05-21  Jason Merrill  <jason@redhat.com>
3275         * init.c (build_vec_delete): Copy the address into a temporary
3276         variable before calling build_vec_delete_1.
3277         * decl2.c (delete_sanity): Don't call stabilize_reference.
3279 2003-05-21  Nathan Sidwell  <nathan@codesourcery.com>
3281         * pt.c (register_specialization): Update the decl's location,
3282         if necessary.
3283         (check_explicit_specialization): Likewise.
3285 2003-05-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3287         * error.c (dump_expr): Use HOST_WIDE_INT_PRINT_DOUBLE_HEX.
3289 2003-05-21  Danny Smith  <dannysmith@users.sourceforge.net>
3291         PR c++/9738
3292         * decl.c (duplicate_decls): Re-invoke make_decl_rtl
3293         if the old decl had instantiated DECL_RTL.
3294         (Base on Richard Henderson 2003-05-13 patch to c-decl.c).
3296 2003-05-19  Matt Austern  <austern@apple.com>
3298         * lang-options.h: Document -Wno-invalid-offsetof
3299         * typeck.c (build_class_member_access_expr): Don't complain about
3300         (Foo *)p->x for non-POD Foo if warn_invalid_offset is zero.
3302 2003-05-18 Andrew Pinski <pinskia@physics.uc.edu>
3304         * name-lookup.c (free_binding_entry): fix where the GTY markers are.
3305         (binding_entry_make): Make entry->chain NULL after getting an entry.
3306         fix the spelling of chain in a comment.
3307         (binding_table_free): speed up by having temporary variable.
3308         (binding_table_new): set table->chain to be NULL after allocating
3309         a table.
3310         (cxx_binding_make): use gcc_alloc instead of ggc_alloc_cleared and set
3311         binding->previous to NULL after getting an binding for speed.
3313 2003-05-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3315         * cp-tree.h (struct lang_type_class): Replace data member tags
3316         with hash-table nested_udts.
3317         (CLASSTYPE_NESTED_UTDS): Rename from CLASSTYPE_TAGS.
3318         * class.c (unreverse_member_declarations): Don't touch
3319         CLASSTYPE_TAGS.
3320         (pushclass): Use cxx_remember_type_decls.
3321         * decl.c (struct cp_binding_level): Replace data member tags with
3322         hash-table type_decls.
3323         (pop_binding_level): Handle level->type_decls.
3324         (kept_level_p): Adjust.
3325         (poplevel): Remove unused local variable.
3326         (bt_print_entry): New function.
3327         (print_binding_level): Use it.
3328         (push_namespace): Build current_binding_level->type_decls.
3329         (maybe_process_template_type_declaration): Adjust.
3330         (pushtag): Likewise.
3331         (clear_anon_tags): Use binding_table_remove_anonymous_types.
3332         (gettags): Remove.
3333         (cxx_remember_type_decls):  Rename from storetags.  Adjust.
3334         (lookup_tag): Use binding_table_find_anon_type.  Tidy.
3335         (lookup_tag_reverse): Use binding_table_reverse_maybe_remap.
3336         (cxx_init_decl_processing): Build global_binding_level->type_decls.
3337         (store_parm_decls): Remove pointless code.
3338         * name-lookup.c (free_binding_entry): New variable.
3339         (ENTRY_INDEX): New macro.
3340         (struct binding_table_s): New datatype.
3341         (binding_entry_make): New function.
3342         (binding_entry_free): Likewise.
3343         (binding_table_construct): Likewise.
3344         (binding_table_free): Likewise.
3345         (binding_table_new): Likewise.
3346         (binding_table_expand): Likewise.
3347         (binding_table_insert): Likewise.
3348         (binding_table_find): Likewise.
3349         (binding_table_find_anon_type): Likewise.
3350         (binding_table_reverse_maybe_remap): Likewise.
3351         (binding_table_remove_anonymous_types): Likewise.
3352         (binding_table_foreach): Likewise.
3353         * name-lookup.h (binding_table): New type.
3354         (binding_entry): Likewise.
3355         (bt_foreach_proc): Likewise.
3356         (struct binding_entry_s): New datatype.
3357         (SCOPE_DEFAULT_HT_SIZE): New macro.
3358         (CLASS_SCOPE_HT_SIZE): Likewise.
3359         (NAMESPACE_ORDINARY_HT_SIZE): Likewise.
3360         (NAMESPACE_STD_HT_SIZE): Likewise.
3361         (GLOBAL_SCOPE_HT_SIZE): Likewise.
3362         (binding_table_new): Declare.
3363         (binding_table_free): Likewise.
3364         (binding_table_insert): Likewise.
3365         (binding_table_find_anon_type): Likewise.
3366         (binding_table_reverse_maybe_remap): Likewise.
3367         (binding_table_remove_anonymous_types): Likewise.
3368         (binding_table_foreach): Likewise.
3369         (binding_table_find): Likewise.
3370         (cxx_remember_type_decls): Likewise.
3371         * pt.c (bt_instantiate_type_proc): New function.
3372         (do_type_instantiation): Use it.
3373         * search.c (lookup_field_r): Use binding_table_find.
3375 2003-05-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3377         * semantics.c (perform_deferred_access_checks): Don't discard
3378         checked access.
3380 2003-05-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3382         * error.c (cp_error_at, cp_warning_at, cp_pedwarn_at): Eliminate
3383         libiberty VA_ macros, always use stdarg.
3384         * rtti.c (create_pseudo_type_info): Likewise.
3385         * tree.c (build_min_nt, build_min): Likewise.
3387 2003-05-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3389         * ptree.c (cxx_print_type, cxx_print_xnode): Use string
3390         concatentation on HOST_WIDE_INT_PRINT_* format specifier to
3391         collapse multiple function calls into one.
3392         * tree.c (debug_binfo): Likewise.
3394 2003-05-15  Jason Merrill  <jason@redhat.com>
3396         PR c++/5388
3397         * call.c (conditional_conversion): Don't consider implicit
3398         conversions if T2 is a base of T1.
3399         * cp-tree.h (DERIVED_FROM_P, UNIQUELY_DERIVED_FROM_P): Make boolean.
3400         (ACCESSIBLY_UNIQUELY_DERIVED_P, PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
3402         * parser.c (cp_parser_primary_expression): Convert a static data
3403         member from reference.
3405 2003-05-15  Mark Mitchell  <mark@codesourcery.com>
3407         * call.c (build_op_delete_call): Avoid creating unnecessary types.
3408         * class.c (instantiate_type): Remove tests for tf_no_attributes.
3409         * cp-tree.h (tsubst_flags_t): Remove tf_no_attributes.
3410         (COMPARE_NO_ATTRIBUTES): Remove.
3411         * typeck.c (comptypes): Do not check COMPARE_NO_ATTRIBUTES.
3413         PR c++/8385
3414         * semantics.c (finish_typeof): Refine type-dependency check.
3416 2003-05-13  Jason Merrill  <jason@redhat.com>
3418         * typeck.c (build_modify_expr): Don't always stabilize the lhs and
3419         rhs.  Do stabilize the lhs of a MODIFY_EXPR used on the lhs.
3421 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3423         * method.c (synthesize_method): Call push/pop_deferring_access_checks.
3425 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3427         PR c++/10230, c++/10481
3428         * semantics.c (finish_non_static_data_member): Handle when the
3429         non-static member is not from a base of the current class type.
3431 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3433         PR c++/10552
3434         * pt.c (tsubst_copy): Handle TEMPLATE_DECL that is a member class
3435         template and has dependent context.
3437 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3439         * pt.c (instantiate_decl): Call push/pop_deferring_access_checks.
3441 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3443         PR c++/9252
3444         * cp-tree.h (saved_scope): Remove check_access field.
3445         (tsubst_flags_t): Remove tf_parsing.
3446         * decl.c (maybe_push_to_top_level): Don't initialize
3447         scope_chain->check_access.
3448         (make_typename_type, make_unbound_class_template): Don't use
3449         tf_parsing.
3450         (register_dtor_fn): Use push/pop_deferring_access_checks
3451         instead of scope_chain->check_access.
3452         * method.c (use_thunk): Likewise.
3453         * parser.c (cp_parser_explicit_instantiation
3454         (cp_parser_constructor_declarator_p): Don't call
3455         push/pop_deferring_access_checks here.
3456         (cp_parser_template_argument, cp_parser_class_name): Don't use
3457         tf_parsing.
3458         (yyparse): Check flag_access_control.
3459         * pt.c (instantiate_class_template): Call
3460         push/pop_deferring_access_checks.
3461         * semantics.c (push_deferring_access_checks): Propagate
3462         dk_no_check.
3463         (perform_or_defer_access_check): Make sure basetype_path is
3464         a type before comparison.
3465         * call.c (build_op_delete_call, build_over_call): Use
3466         perform_or_defer_access_check.
3467         * class.c (alter_access): Likewise.
3468         * init.c (build_offset_ref): Likewise.
3469         * lex.c (do_identifier): Likewise.
3470         * method.c (hack_identifier): Likewise.
3471         * search.c (lookup_member): Likewise.
3472         * semantics.c (finish_non_static_data_member): Likewise.
3473         (simplify_aggr_init_exprs_r): Use push/pop_deferring_access_checks
3474         instead of flag_access_control.
3476 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3478         PR c++/9554
3479         * parser.c (cp_parser_class_name): Remove check_access parameter.
3480         All caller adjusted.  Update declaration.
3481         (cp_parser_lookup_name): Likewise.
3482         * semantics.c (push_deferring_access_checks): Change parameter type
3483         to enum deferring_kind.  All caller adjusted.
3484         (resume_deferring_access_checks): Adjust to use new enum.
3485         (stop_deferring_access_checks): Likewise.
3486         (perform_or_defer_access_check): Likewise.
3487         * cp-tree.h (deferring_kind): New enum.
3488         (deferred_access): Adjust field type.
3489         (push_deferring_access_checks): Update declaration.
3491 2003-05-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3493         PR c++/10555, c++/10576
3494         * pt.c (lookup_template_class): Handle class template with
3495         multiple levels of parameters when one of the levels contain
3496         errors.
3498 2003-05-08  Jason Merrill  <jason@redhat.com>
3500         * init.c (build_new_1): Don't reuse a TARGET_EXPR in an
3501         expression.  Undo some of the recent reorg.
3503 2003-05-07  Richard Henderson  <rth@redhat.com>
3505         PR c++/10570
3506         * cfns.gperf: Comment out POSIX thread cancellation points,
3507         plus abort and raise.
3508         * cfns.h: Regenerate.
3510 2003-05-07  Jason Merrill  <jason@redhat.com>
3512         * call.c (build_conditional_expr): Don't assume that the folded
3513         expression has result_type.
3515 2003-05-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3517         * typeck.c (build_unary_op): Deal with const qualifier in
3518         invalid pointer-to-member earlier.
3520 2003-05-05  Jason Merrill  <jason@redhat.com>
3522         PR c++/9537
3523         * call.c (conditional_conversion): Build an RVALUE_CONV if
3524         we're just changing the cv-quals.
3525         (build_conditional_expr): Don't call convert to change
3526         cv-quals.
3528 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3530         PR c++/10496
3531         * typeck.c (build_unary_op): Don't output const qualifier when
3532         output invalid pointer-to-member diagnostics.
3534 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3536         * decl.c: Fix typos.
3538 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3540         PR c++/4494
3541         * decl.c (start_function): Use same_type_p to check return type
3542         of main.
3544 2003-05-03  Zack Weinberg  <zack@codesourcery.com>
3546         PR c/10604
3547         * cp/typeck.c (build_x_compound_expr): No need to check
3548         extra_warnings as well as warn_unused_value.
3550 2003-05-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3552         PR c++/9364, c++/10553, c++/10586
3553         * decl.c (make_typename_type): Don't crash on illegal code.
3555 2003-05-03  Nathan Sidwell  <nathan@codesourcery.com>
3557         * class.c (finish_struct): Use location_t and input_location
3558         directly.
3559         * decl.c (make_label_decl): Likewise.
3560         (use_label): Likewise.
3561         * decl2.c (warn_if_unknown_interface): Likewise.
3562         (start_static_initialization_or_destruction): Likewise.
3563         (generate_ctor_or_dtor_function): Likewise.
3564         (finish_file): Likewise.
3565         * error.c (print_instantiation_full_context): Likewise.
3566         * init.c (create_temporary_var): Likewise.
3567         * method.c (synthesize_method): Likewise.
3568         * parser.c (cp_token): Likewise.
3569         (cp_lexer_set_source_position_from_token): Likewise.
3570         (cp_lexer_get_preprocessor_token): Likewise.
3571         (cp_parser_statement): Likewise.
3572         * pt.c (tsubst_friend_function): Likewise.
3573         (instantiate_class_template): Likewise.
3574         (tsubst_decl): Likewise.
3575         (tsubst): Likewise.
3576         (instantiate_decl): Likewise.
3577         * semantics.c (begin_class_definition): Likewise.
3578         (expand_body): Likewise.
3580 2003-05-01  Nathan Sidwell  <nathan@codesourcery.com>
3582         * class.c (finish_struct): Rename lineno to input_line.
3583         * decl.c (push_binding_level, pop_binding_level,
3584         suspend_binding_level, resume_binding_level, make_label_decl,
3585         use_label, start_function): Likewise.
3586         * decl2.c (warn_if_unknown_interface,
3587         start_static_initialization_or_destruction,
3588         generate_ctor_or_dtor_function, finish_file): Likewise.
3589         * error.c (cp_line_of, print_instantiation_full_context,
3590         print_instantiation_context): Likewise.
3591         * except.c (check_handlers_1, check_handlers): Likewise.
3592         * init.c (create_temporary_var): Likewise.
3593         * method.c (use_thunk, synthesize_method): Likewise.
3594         * parser.c (cp_lexer_set_source_position_from_token,
3595         cp_lexer_get_preprocessor_token): Likewise.
3596         * pt.c (push_tinst_level, pop_tinst_level,
3597         tsubst_friend_function, instantiate_class_template, tsubst_decl,
3598         tsubst, tsubst_expr, instantiate_decl): Likewise.
3599         * semantics.c (genrtl_try_block, finish_label_stmt,
3600         begin_class_definition, expand_body,
3601         genrtl_finish_function): Likewise.
3602         * tree.c (build_min_nt, build_min): Likewise.
3604 2003-05-01  Mark Mitchell  <mark@codesourcery.com>
3606         * decl2.c (comdat_linkage): Don't externalize explicit
3607         instantiations.
3609 2003-05-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3611         PR c++/10554
3612         * decl2.c (do_class_using_decl): Check if operand 0 of SCOPE_REF
3613         is not NULL.
3615 2003-05-01  Steven Bosscher  <steven@gcc.gnu.org>
3617         * cp-tree.h (struct lang_id2): Remove.  Move fields from here...
3618         (struct lang_identifier): ... to here.
3619         (LANG_ID_FIELD): Remove.
3620         (SET_LANG_ID): Remove.
3621         (IDENTIFIER_LABEL_VALUE): Adjust for new lang_identifier.
3622         (SET_IDENTIFIER_LABEL_VALUE): Likewise.
3623         (IDENTIFIER_IMPLICIT_DECL): Likewise.
3624         (SET_IDENTIFIERL_IMPLICIT_DECL): Likewise.
3625         (IDENTIFIER_ERROR_LOCUS): Likewise.
3626         (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
3628 2003-05-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3630         PR c++/8772
3631         * pt.c (convert_template_argument): Correct diagnostic.
3633 2003-04-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3635         PR c++/9432, c++/9528
3636         * decl2.c (validate_nonmember_using_decl): Handle SCOPE_REF.
3638 2003-04-30  Garbiel Dos Reis  <gcc@integrable-solutions.net>
3640         * decl.c (check_previous_goto_1): Adjust prototype.
3641         (check_previous_goto): Adjust use.
3642         (check_switch_goto): Likewise.
3643         (use_label): Adjust.
3644         (check_previous_goto_1): Don't use pedwarn_with_file_and_line.
3645         (struct named_label_use_list): Use location_t datatype.
3647 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
3649         PR c++/10551
3650         * pt.c (mark_decl_instantiated): Defer all explicit instantiations
3651         that have not yet been written out.
3653 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
3655         PR c++/10549
3656         * class.c (layout_class_type): Mark overlong bitfields as having
3657         the maximum size permitted by their type, after layout.
3659         PR c++/10527
3660         * error.c (dump_expr): Correctly handling of NEW_EXPR.4
3662 2003-04-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3664         * call.c (build_operator_new_call): Fix typo.
3665         * lang-options.h: Likewise.
3667 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
3669         PR c++/10515
3670         * cp-tree.h (lookup_field_1): Declare it.
3671         * search.c (lookup_field_1): Make it public.
3672         * decl.c (reshape_init): Handle designated initializers.
3674         * decl.c (maybe_commonize_var): Further tweak support for systems
3675         without weak symbols.
3677 2003-04-27  Mark Mitchell  <mark@codesourcery.com>
3679         * decl.c (maybe_commonize_var): Fix thinko in last patch.
3681 2003-04-27  Mark Mitchell  <mark@codesourcery.com>
3683         PR c++/10506
3684         * method.c (use_thunk): Decrement immediate_size_expand.
3686         PR c++/10503
3687         * cp-tree.h (DECL_VAR_MARKED_P): New macro.
3688         (DECL_MAYBE_TEMPLATE): Remove.
3689         * class.c (fixed_type_or_null): Avoid infinite recursion.
3691         * decl.c (maybe_commonize_var): Make the code match the comments.
3692         * pt.c (instantiate_decl): Move call to import_export_decl.
3694 2003-04-26  Mark Mitchell  <mark@codesourcery.com>
3696         * decl2.c (finish_file): Fix merge botch.
3698 2003-04-25  Mark Mitchell  <mark@codesourcery.com>
3700         * decl2.c (finish_file): Don't call import_export_decl for
3701         functions that are not defined.
3702         (handle_class_head): Robustify.
3703         * pt.c (instantiate_decl): Do not call cp_finish_decl for
3704         variables that are not defined.
3706 2003-04-24  Sylvain Pion  <Sylvain.Pion@mpi-sb.mpg.de>
3708         * call.c (print_z_candidates): Fix off by one error.
3710 2003-04-24  Nathan Sidwell  <nathan@codesourcery.com>
3712         PR c++/10337
3713         * call.c (joust): Don't warn about conversion ops that are exact
3714         or cv-conversions. Rearrange to avoid multiple type comparisons.
3716 2003-04-23  Mark Mitchell  <mark@codesourcery.com>
3718         PR c++/10471
3719         * call.c (build_cxx_call): Robustify.
3721 2003-04-23  Neil Booth  <neil@daikokuya.co.uk>
3723         * Make-lang.in (lex.o): Remove mbchar.h.
3724         * lex.c (MULTIBYTE_CHARS): Lose.
3725         * parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled
3726         in c-lex.c.
3728 2003-04-23  Mark Mitchell  <mark@codesourcery.com>
3730         PR c++/9847
3731         * cp-tree.h (duplicate_tag_error): Remove.
3732         * class.c (duplicate_tag_error): Remove.
3733         * semantics.c (begin_class_definition): Return immediately for a
3734         duplicate class definition.
3736         PR c++/10451
3737         * decl.c (grokdeclarator): Correct logic for "mutable" errors.
3739 2003-04-22  Mark Mitchell  <mark@codesourcery.com>
3741         PR c++/10446
3742         * search.c (lookup_fnfields_1): Handle empty slots in the method
3743         vector.
3745         PR c++/10428
3746         * decl.c (check_elaborated_type_specifier): New function, split
3747         out from ...
3748         (xref_tag): ... here.  Use the new function in more places.
3750         * rtti.c (throw_bad_typeid): Use build_cxx_call.
3752 2003-04-21  Mark Mitchell  <mark@codesourcery.com>
3754         * call.c (build_over_call): Use build_cxx_call.
3755         (build_cxx_call): New method, split out of build_over_call.
3756         * cp-tree.h (language_function): Add can_throw.
3757         (build_cxx_call): Declare it.
3758         * decl.c (finish_function): If a function does not contain any
3759         calls to functions that can throw an exception, indicate that
3760         fact.
3761         * decl2.c (mark_used): Do not defer the instantiation of
3762         functions, if the current function does not throw.
3763         * optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones.
3764         * pt.c (instantiate_decl): Make sure import_export_decl is called
3765         before emitting things.
3766         * rtti.c (throw_bad_cast): Use build_cxx_call.
3767         (build_dynamic_cast_1): Likewise.
3768         * typeck.c (build_function_call): Likewise.
3770 2003-04-21  Nathan Sidwell  <nathan@codesourcery.com>
3772         PR c++/9881
3773         * typeck.c (build_unary_op): Fold all COMPONENT_REF addr
3774         expressions. Reverts my 2002-08-08 patch.
3776         * typeck.c (comp_ptr_ttypes_real): Swap final && operands for
3777         cheaper early exit.
3779 2003-04-20  Nathan Sidwell  <nathan@codesourcery.com>
3781         * cp/decl2.c (start_static_storage_duration_function): Take count
3782         arg, don't check if it wraps round.
3783         (generate_ctor_or_dtor_function): Add locus arg, use it.
3784         (generate_ctor_and_dtor_functions_for_priority): Data arg is a
3785         locus.
3786         (finish_file): Set line numbers to past EOF for synthesized
3787         functions.
3789 2003-04-20  Nathan Sidwell  <nathan@codesourcery.com>
3791         PR c++/10405
3792         * search.c (lookup_field_1): Final scan goes backwards for
3793         types, forwards for non-types.
3795 2003-04-17  Roger Sayle  <roger@eyesopen.com>
3797         PR c/10375
3798         * decl.c (duplicate_decls): Preserve "const", "noreturn" and
3799         "nothrow" function attributes.
3801 2003-04-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3803         PR c++/10347
3804         * pt.c (type_dependent_expression_p): Handle array new.
3806 2003-04-15  Mark Mitchell  <mark@codesourcery.com>
3808         PR c++/10381
3809         * parser.c (cp_parser_primary_expression): Reorganize logic for
3810         dealing with name lookup failures.
3812 2003-04-15  Jason Merrill  <jason@redhat.com>
3814         * decl2.c (mark_used): Don't instantiate anything if
3815         skip_evaluation.
3817 2003-04-14  Ziemowit Laski  <zlaski@apple.com>
3819         * tree.c (build_cplus_array_type_1): Do not call
3820         uses_template_parms() on a NULL index_type.
3822 2003-04-13  Roger Sayle  <roger@eyesopen.com>
3824         * decl.c (duplicate_decls): Preserve pure and malloc attributes.
3826 2003-04-12  Mark Mitchell  <mark@codesourcery.com>
3828         PR c++/10300
3829         * init.c (build_new_1): Reorganize.
3831 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
3833         * class.c (initialize_array)
3834         * decl.c (reshape_init)
3835         * decl2.c (build_expr_from_tree)
3836         * init.c (build_zero_init)
3837         * pt.c (tsubst_copy, tsubst_copy_and_build)
3838         * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer)
3839         (ptm_initializer, class_initializer, get_pseudo_ti_init)
3840         * semantics.c (finish_compound_literal)
3841         * typeck.c (build_ptrmemfunc1)
3842         * typeck2.c (store_init_value, process_init_constructor)
3843         (build_functional_cast): Use build_constructor.
3845 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
3847         * call.c (print_z_candidates): Use gcc_gettext_width, not
3848         strlen, to determine how much padding to use.
3850 2003-04-10  Zack Weinberg  <zack@codesourcery.com>
3852         * decl.c: Update all calls to shadow_warning.
3854 2003-04-10  Mark Mitchell  <mark@codesourcery.com>
3856         * class.c (layout_class_type): Correct handling for overlong
3857         bit-fields whose width is the same as an integer type.
3859 2003-04-06  Zack Weinberg   <zack@codesourcery.com>
3861         * cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero.
3862         * cp-lang.c (cp_tree_size): New function.
3863         (LANG_HOOKS_TREE_SIZE): Override.
3865         * cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct
3866         tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill.
3867         (union lang_tree_node): Remove common and srcloc members.
3868         (build_srcloc_here): Don't prototype.
3869         * decl.c (cp_tree_node_structure): Kill SRCLOC case.
3870         * pt.c (pending_templates): Correct comment.
3871         * tree.c (build_srcloc, build_srcloc_here): Kill.
3873 2003-04-06  Zack Weinberg   <zack@codesourcery.com>
3875         * call.c: Include intl.h.
3876         (print_z_candidate): Always use inform; get rid of errfn
3877         argument. Reorganize so that all the strings get picked up
3878         by xgettext.  Note obligation of caller to pass first argument
3879         through gettext.
3880         (print_z_candidates): Update to match.  Indent second and
3881         successive candidates by strlen() of translated message.
3882         (joust): Restructure ambiguous-conversion pedwarn so that
3883         translators see a complete sentence.  Update calls to
3884         print_z_candidate.
3886         * Make-lang.in (cp/call.o): Update dependencies.
3888 2003-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3890         * decl.c (set_current_binding_level): Delete, revert last change.
3891         (current_binding_level): Modify to allow it as as lvalue.
3893 2003-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3895         * name-lookup.c (find_binding): Pass appropriate pointer type to
3896         POP_TIMEVAR_AND_RETURN.
3898 2003-04-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3900         * Make-lang.in (cp-warn): Add $(STRICT_WARN).
3901         * cp-tree.h: Don't insist on having GNUC.
3903 2003-04-03  Jason Merrill  <jason@redhat.com>
3905         * cvt.c (ocp_convert): Only abort if we try to convert an object
3906         of TREE_ADDRESSABLE type.
3908         * class.c (build_vtable): Set DECL_ALIGN here.
3909         (get_vtable_decl): Not here.
3910         (layout_vtable_decl): Or here.
3911         (create_vtable_ptr): Or here.
3912         (layout_class_type): Or here.
3913         (check_bitfield_decl): Don't mess with field alignment.
3915 2003-04-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3917         * operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR,
3918         DEF_ASSN_OPERATOR): Delete spurious semi-colon.
3919         * rtti.c (dfs_class_hint_mark): Likewise.
3921         * decl.c (push_local_name, push_class_level_binding,
3922         maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in
3923         functions returning void.
3924         * decl2.c (add_using_namespace): Likewise.
3926         * decl.c (print_binding_level, print_other_binding_stack,
3927         print_binding_stack): Cast argument of %p specifier to void*.
3928         * ptree.c (cxx_print_decl): Likewise.
3930         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
3931         VAR_FUNCTION_OR_PARM_DECL_CHECK,
3932         VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
3933         BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK,
3934         LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__.
3936         * decl.c (set_current_binding_level): New macro.  Use throughout
3937         when setting the current binding level.
3939         * cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma
3940         in enum.
3941         * method.c (mangling_flags): Likewise.
3943         * cp-tree.h (lang_type_header): Add __extension__ and use
3944         CHAR_BITFIELD for members.
3946 2003-04-02  Geoffrey Keating  <geoffk@apple.com>
3948         PR other/9274
3949         * mangle.c: Include gt-cp-mangle.h.
3950         (subst_identifiers): Mark with GTY.
3951         * config-lang.in (gtfiles): Add cp/mangle.c.
3952         * Make-lang.in: (gt-cp-mangle.h): New rule.
3953         (cp/mangle.o): Depends on gt-cp-mangle.h.
3955 2003-04-01  Andrew Pinski  <pinskia@physics.uc.edu>
3957         * config-lang.in (gtfiles): Add \$(srcdir)/cp/name-lookup.c
3958         after \$(srcdir)/cp/name-lookup.h.
3959         * name-lookup.c: (cxx_binding_make): Use ggc_alloc_clearedinstead
3960         of ggc_alloc.  Include gt-cp-name-lookup.h at the end of the file.
3961         * Make-lang.in: (gt-cp-name-lookup.h): Is generated by gengtype.
3962         (cp/name-lookup.o): Depends on gt-cp-name-lookup.h.
3964 2003-03-31  Jason Merrill  <jason@redhat.com>
3966         PR java/10145
3967         * class.c (check_field_decl): Don't set DECL_ALIGN.
3969 2003-03-30  Mark Mitchell  <mark@codesourcery.com>
3971         PR c++/7647
3972         * decl.c (grokdeclarator): Tidy, slightly.
3973         * search.c (lookup_field_1): Add want_type parameter.
3974         (lookup_field_r): Adjust call to lookup_field_1.
3976 2003-03-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3978         * Make-lang.in (cp/name-lookup.o): Add more dependencies.
3980 2003-03-30  Gabriel Dos Reis <gdr@integrable-solutions.net>
3982         * cp-tree.h (binding_for_name: Move to name-lookup.h  Adjust
3983         prototype.
3984         (cxx_scope_find_binding_for_name): Likewise.
3985         * decl.c (find_binding: Move to name-lookup.c.
3986         (binding_for_name): Likewise.
3987         (cxx_scope_find_binding_for_name): Likewise.
3988         (BINDING_LEVEL):  Remove.
3989         (push_binding): Tidy.
3990         (push_class_binding): Likewise.
3991         (pop_binding): Likewise.
3992         (poplevel): Likewise.
3993         (poplevel_class): Likewise.
3994         (set_identifier_type_value_with_scope): Likewise.
3995         (push_overloaded_decl): Likewise.
3996         (lookup_tag): Likewise.
3997         (unqualified_namespace_lookup): Likewise.
3998         (lookup_name_current_level): Likewise.
3999         (maybe_inject_for_scope_var): Likewise.
4000         (namespace_binding): Move to name-lookup.c.
4001         (set_namespace_binding): Likewise.
4002         * decl2.c (lookup_using_namespace): Tidy.
4003         (qualified_lookup_using_namespace): Likewise.
4004         (do_toplevel_using_decl): Likewise.
4005         * name-lookup.c: Include "timevar.h"
4006         * name-lookup.h (cxx_scope):  Declare.
4007         (struct cxx_binding): Lose member "has_level".  Adjust "scope"
4008         member declaration.
4009         (BINDING_SCOPE): Adjust definition.
4010         (BINDING_HAS_LEVEL_P): Remove.
4012 2003-03-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4014         * name-lookup.c: New file.
4015         * name-lookup.h: Likewise..
4016         * decl.c (push_binding): Adjust use cxx_binding_make.
4017         (free_bindings): Move to name-lookup.c
4018         (pop_binding): Use cxx_binding_free.
4019         (binding_for_name): Tidy.
4020         * cp-tree.h: Include "name-lookup.h"
4021         (cxx_binding_make): Move to name-lookup.h
4022         (cxx_binding_clear): Likewise.
4023         (struct cxx_binding): Likewise.
4024         (LOCAL_BINDING_P): Likewise.
4025         (INHERITED_VALUE_BINDING_P): Likewise.
4026         (BINDING_SCOPE): Likewise.
4027         (BINDING_HAS_LEVEL_P): Likewise.
4028         (BINDING_VALUE): Likewise.
4029         (BINDING_TYPE): Likewise.
4030         * config-lang.in (gtfiles): Add cp/name-lookup.h
4031         * Make-lang.in (cp/name-lookup.o): New rule.
4032         (CXX_OBJS): Add cp/name-lookup.o
4033         (CXX_TREE_H): Add cp/name-lookup.h
4035 2003-03-28  Jason Merrill  <jason@redhat.com>
4037         PR c++/10245
4038         * cvt.c (force_rvalue): New fn.
4039         * call.c (build_conditional_expr): Use it.
4040         * cp-tree.h: Declare it.
4042 2003-03-28  Mike Stump  <mrs@apple.com>
4044         * error.c (dump_expr): Add 0x to printed hex numbers to make
4045         output match source code better.
4047 2003-03-28  Mark Mitchell  <mark@codesourcery.com>
4049         PR c++/10218
4050         * decl.c (grokfndecl): Return NULL_TREE for bogus out-of-class
4051         definitions.
4053         * decl2.c (generate_ctor_or_dtor_function): Tolerate a
4054         non-existant ssdf_decls array.
4055         (finish_file): Call generator_ctor_or_dtor_function when there are
4056         static constructors or destructors and no other static
4057         initializations.
4059 2003-03-28  Nathan Sidwell  <nathan@codesourcery.com>
4061         PR c++/10047
4062         * decl2.c (finish_file): Don't warn about explicitly instantiated
4063         inline decls.
4065 2003-03-27  Nathan Sidwell  <nathan@codesourcery.com>
4067         PR c++/10224
4068         * pt.c (lookup_template_class): Only check instantiated args if
4069         they do not contain template parameters.
4071 2003-03-27  Nathan Sidwell  <nathan@codesourcery.com>
4073         PR c++/10158
4074         * parser.c (cp_parser_function_definition): Set
4075         DECL_INITIALIZED_IN_CLASS for members.
4076         * pt.c (instantiate_decl): Only reduce the template args for
4077         friends that are not defined in class.
4079 2003-03-25  Jason Merrill  <jason@redhat.com>
4081         * call.c (print_z_candidate): Change name of first arg to msgid.
4082         (joust): Add comment for translators.
4084 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
4086         PR c++/9898, PR c++/383, DR 322
4087         * pt.c (maybe_adjust_types_for_deduction) <DEDUCE_CONV>: Look
4088         through reference types on both PARM and ARG.
4090 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
4092         PR c++/10119
4093         * error.c (dump_expr) <BASELINK>: Use dump_expr.
4094         * pt.c (maybe_fold_nontype_args): New function.
4095         (tsubst_copy) <SCOPE_REF>: Subst any template_id args.
4096         <TEMPLATE_ID_EXPR>: Break out folding code, call it.
4097         (tsubst_copy_and_build) <TEMPLATE_ID_EXPR>: Call
4098         maybe_fold_nontype_args.
4100 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
4102         PR c++/10026
4103         * decl2.c (arg_assoc_type) <ERROR_MARK>: Don't die.
4105 2003-03-23  Mark Mitchell  <mark@codesourcery.com>
4107         PR c++/7086
4108         * typeck.c (cxx_mark_addressable):  Adjust call to
4109         gen_mem_addressof or put_var_into_stack.
4111 2003-03-22  Nathan Sidwell  <nathan@codesourcery.com>
4113         PR c++/9978, c++/9708
4114         * cp-tree.h (instantiate_template): Add tsubst_flags parameter.
4115         * call.c (add_template_candidate_real): Adjust
4116         instantiate_template call.
4117         * class.c (resolve_address_of_overloaded_function): Likewise.
4118         * decl.c (build_enumerator): Set TREE_CONSTANT.
4119         * pt.c (check_instantiated_args): New.
4120         (push_inline_template_parms_recursive): Set TREE_CONSTANT,
4121         TREE_READONLY.
4122         (build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY.
4123         (reduce_template_parm_level): Likewise.
4124         (process_template_parm): Likewise.
4125         (check_explicit_specialization): Adjust instantiate_template call.
4126         (convert_template_argument): Don't check non-type argument here.
4127         (lookup_template_class): Check them here.
4128         (tsubst_friend_function): Adjust instantiate_template call.
4129         (instantiate_template): Add tsubst_flags parameter, use it. Check
4130         instantiated args.
4132 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
4134         * decl.c: Update calls to shadow_warning.
4136 2003-03-21  Nathan Sidwell  <nathan@codesourcery.com>
4138         PR c++/9898
4139         * error.c (dump_decl) [CONST_DECL]: Print '<enumerator>'.
4140         (dump_expr) [CONSTRUCTOR]: Print default ctor as a function call.
4142 2003-03-20  Mark Mitchell  <mark@codesourcery.com>
4144         * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope
4145         friends.
4146         * cp/pt.c (instantiate_class_template): Fix formatting.
4148 2003-03-14  Matt Austern  <austern@apple.com>
4150         * cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray.
4151         (unemitted_tinfo_decl_p): Remove.
4152         (emit_tinfo_decl): Change declaration to remove unused parameter.
4153         * decl2.c (finish_file): Change tinfo emission to loop through
4154         unemitted_tinfo_decls array instead of looping through all decls.
4155         * rtti.c (unemitted_tinfo_decl_p): Declare as static, remove
4156         unused second parameter.
4157         (init_rtti_processing): initialize unemitted_tinfo_decls varray.
4158         (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls.
4159         (emit_tinfo_decl): remove unused second parameter, add assertion
4160         that decl hasn't already been emitted.
4162 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
4164         * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
4165         type from 'int' to 'bool'. Replace 0 and 1 with true and false in
4166         return statements.
4168 2003-03-19  Jason Merrill  <jason@redhat.com>
4170         PR c++/8316, c++/9315, c++/10136
4171         * call.c (print_z_candidate): Split out from...
4172         (print_z_candidiates): ...here.
4173         (joust): Use it.
4175 2003-03-17  Roger Sayle  <roger@eyesopen.com>
4177         PR c++/10031
4178         * decl.c (duplicate_decls): Use the new type when prototyping
4179         anticipated decls, even when the types match.  This defines the
4180         exception list for the built-in function.
4182 2003-03-17  Jason Merrill  <jason@redhat.com>
4184         PR c++/10091
4185         * typeck.c (build_class_member_access_expr): Compare
4186         TYPE_MAIN_VARIANTs.
4188 2003-03-17  Mark Mitchell  <mark@codesourcery.com>
4190         PR c++/9639
4191         * parser.c (cp_parser_declarator_id): Clear parser->scope.
4193 2003-03-16  Jason Merrill  <jason@redhat.com>
4195         PR c++/9993
4196         * decl.c (finish_function): Only allow the NRVO to use variables
4197         declared at function scope.
4199 2003-03-17  Andreas Jaeger  <aj@suse.de>
4201         * Make-lang.in (cp/TAGS): Remove.
4203 2003-03-16  Nathan Sidwell  <nathan@codesourcery.com>
4205         PR c++/9629
4206         * cp-tree.h (struct language_function): Add in_base_initializer.
4207         (in_base_initializer): define it.
4208         (expand_member_init): Remove INIT param.
4209         * init.c (expand_member_init): Remove INIT param, return the member.
4210         (emit_mem_initializers): Set in_base_initializer.
4211         * class.c (build_base_path): Check in_base_initializer.
4212         * parser.c (cp_parser_mem_initializer): Set in_base_initializer.
4213         * pt.c (tsubst_initializer_list): Likewise.
4215 2003-03-16   Gabriel Dos Reis <gdr@integrable-solutions.net>
4217         * decl.c (binding_for_name): Fix initialization thinko.
4219 2003-03-15  Gabriel Dos Reis <gdr@integrable-solutions.net>
4221         Compile-time improvement: 2/n.
4222         * cp-tree.h (struct cxx_binding): New datatype;
4223         (struct lang_identifier): Use it.
4224         (LOCAL_BINDING_P): Adjust definition.
4225         (INHERITED_VALUE_BINDING_P): Likewise.
4226         (BINDING_SCOPE): Likewise.
4227         (BINDING_HAS_LEVEL_P): Likewise.
4228         (BINDING_VALUE): Likewise.
4229         (BINDING_TYPE): Likewise.
4230         (IDENTIFIER_VALUE): Likewise.
4231         (struct tree_binding): Remove.
4232         (TS_CP_BINDING): Likewise.
4233         ((union lang_tree_node): Remove field "binding".
4234         (cxx_binding_clear): New macro.
4235         (binding_for_name): Adjust return type.
4236         (qualified_lookup_using_namespace): Adjust prototype.
4237         (lookup_using_namespace): Adjust prototype.
4238         (cxx_scope_find_binding_for_name): Declare.
4239         * cp-tree.def: Remove CPLUS_BINDING definition.
4240         * decl.c (push_binding): Adjust local variable type.
4241         (add_binding): Likewise.
4242         (push_class_binding): Likewise.
4243         (pop_binding): Likewise.
4244         (poplevel): Likewise.
4245         (poplevel_class): Likewise.
4246         (free_bindings):  Adjust type.
4247         (find_binding): Adjust return type, add a third parameter. Remove
4248         non-useful assertion now that we use static typing.
4249         (cxx_scope_find_binding_for_name): New function.
4250         (binding_for_name): Use it.  Adjust local variable type. Simplify.
4251         (namespace_binding):  Simplify.
4252         (set_namespace_binding): Likewise.
4253         (set_identifier_type_value_with_scope): Adjust local variable type.
4254         (lookup_tag): Don't type-abuse of local variable 'old'.
4255         (lookup_namespace_name): Likewise.  Allocate binding on stack.
4256         (select_decl): Adjust prototype.
4257         (unqualified_namespace_lookup):  Allocate binding on stack.
4258         Don't type-abuse of local variable 'val'.
4259         (lookup_name_real): Likewise.
4260         (maybe_inject_for_scope_var): Adjust local variable type.
4261         (cp_tree_node_structure): Remove CPLUS_BINDING case label.
4262         (namespace_binding): Adjust logic, simplify.
4263         (BINDING_LEVEL): Adjust definition.
4264         (push_class_level_binding): Adjust local variable type.
4265         (struct cxx_saved_binding): Adjust field 'binding' type.
4266         * decl2.c (ambiguous_decl): Adjust prototype.
4267         (lookup_using_namespace): Adjust local variable type.
4268         (qualified_lookup_using_namespace): Catch type error and correct
4269         ensueing logic error.
4270         (do_nonmember_using_decl): Adjust local variable type.  Allocate
4271         temporary cxx_binding on stack.
4272         (do_toplevel_using_decl): Adjust local variable type.
4273         * ptree.c (cxx_print_cxx_binding): New function.
4274         (cxx_print_identifier): Use it.
4275         (cxx_print_xnode): Delete CPLUS_BINDING case label.
4277 2003-03-15  Roger Sayle  <roger@eyesopen.com>
4279         * tree.c (count_functions): Fix whitespace.
4281 2003-03-15  Neil Booth  <neil@daikokuya.co.uk>
4283         * Make-lang.in: Update.
4285 2003-03-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4287         PR c++/6440
4288         * pt.c (maybe_process_partial_specialization): Handle
4289         member class template when enclosing class template is
4290         explicit specialized.
4291         (most_general_template): Stop looking when DECL is already
4292         specialized.
4294 2003-03-13  Jason Merrill  <jason@redhat.com>
4296         PR c++/9420
4297         * search.c (lookup_conversions): Call complete_type here.
4298         * call.c (implicit_conversion): Not here.
4300 2003-03-13  Mark Mitchell  <mark@codesourcery.com>
4302         * decl2.c (do_nonmember_using_decl): Correct handling of
4303         simultaneous type/non-type bindings.
4305         * call.c (initialize_reference): Remove bogus assertion.
4306         * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
4308 2003-03-12  Andrew Lewycky  <andrew@mxc.ca>
4310         PR c++/7050
4311         * expr.c (cxx_expand_expr): Return const0_rtx for throw
4312         expressions.
4314 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
4316         PR c++/9474
4317         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
4318         to merge old and new declarations.
4320 2003-03-12  Alexandre Oliva  <aoliva@redhat.com>
4322         * g++.1: Remove.
4323         * Make-lang.in (c++.generated-manpages): Build cp/g++.1.
4324         (cp/g++.1): Build it from scratch in the build tree.
4325         (c++.install-man): Depend on it.  Install it from the build tree.
4326         (c++.mostlyclean): Clean it.
4328 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
4330         PR c++/9474
4331         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
4332         to merge old and new declarations.
4334         PR c++/9924
4335         * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
4337 2003-03-11  Jason Merrill  <jason@redhat.com>
4339         PR c++/9820
4340         * search.c (lookup_member): Fix handling of functions in a class
4341         being defined.
4343 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
4345         PR c++/8700
4346         * call.c (convert_class_to_reference): Adjust usage of
4347         splice_viable.
4348         (any_viable): Remove.
4349         (splice_viable): Combine with any_viable.
4350         (print_z_candidates): Avoid printing duplicates.
4351         (build_user_type_conversion_1): Adjust usage of splice_viable.
4352         (build_new_function_call): Likewise.
4353         (build_operator_new_call): Likewise.
4354         (build_object_call): Likewise.
4355         (build_conditional_expr): Likewise.
4356         (build_new_op): Likewise.
4357         (build_new_method_call): Likewise.
4358         (joust): Remove spurious comment.
4359         * cp-tree.h (DECL_FRIENDLIST): Correct documentation.
4360         * decl2.c (arg_assoc_class): Simplify.
4361         * friend.c (add_friend): Likewise.
4363 2003-03-11  Jason Merrill  <jason@redhat.com>
4365         PR c++/8660
4366         * decl2.c (check_classfn): A member template only matches a
4367         member template.
4369 2003-03-11  Neil Booth  <neil@daikokuya.co.uk>
4371         * Make-lang.in (CXX_C_OBJS): Update.
4372         * lang-specs.h: Don't define __GNUG__ here.
4374 2003-03-10  Mark Mitchell  <mark@codesourcery.com>
4376         * call.c (perform_overload_resolution): New function.
4377         (build_new_function_call): Use it.
4378         (build_operator_new_call): Likewise.
4379         (add_candidates): Add explicit_targs and template_only parameters.
4380         (build_new_op): Adjust accordingly.
4381         * cp-tree.h (build_operator_new_call): New function.
4382         (build_function_call_real): Remove.
4383         (build_function_call_maybe): Likewise.
4384         * init.c (build_new_1): Use build_operator_new_call.
4385         * typeck.c (build_function_call_real): Rename to ...
4386         (build_function_call): ... this.
4388 2003-03-10  Devang Patel  <dpatel@apple.com>
4390         PR c++/9394
4391         * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
4393 2003-03-10  Jason Merrill  <jason@redhat.com>
4395         PR c++/9798
4396         * decl.c (push_using_directive): Push before recursing.
4398         PR c++/9868, c++/9524
4399         * call.c (resolve_scoped_fn_name): Handle the case of a function
4400         pointer member.
4402         * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
4403         argument in the pointer-to-member case.
4405 2003-03-09  Mark Mitchell  <mark@codesourcery.com>
4407         PR c++/9373
4408         * cp-lang.c (cxx_get_alias_set): Use alias set zero for
4409         pointers to member functions.
4411         PR c++/8534
4412         * decl.c (build_ptrmemfunc_type): Do not allow default arugments
4413         in pointer-to-member-function types.
4415 2003-03-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4417         * expr.c (cplus_expand_constant): Use C90 prototype style.
4418         (cxx_expand_expr): Likewise.
4420 2003-03-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4422         PR c++/9970
4423         * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
4424         functions.
4426 2003-03-08  Geoffrey Keating  <geoffk@apple.com>
4428         * lang-specs.h (c++-header): Change .pch to .gch.
4430 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
4432         * cp-tree.h (cxx_init): Update prototype.
4433         * lex.c (cxx_init): Similarly.
4435 2003-03-08  Mark Mitchell  <mark@codesourcery.com>
4437         PR c++/9823
4438         * cp-tree.h (begin_mem_initializers): Remove.
4439         * parser.c (cp_parser_mem_initializer_list): Inline it here.
4440         Do not call finish_mem_initializers if not in a constructor.
4441         (cp_parser_class_head): Fix typo in error message.
4442         * semantics.c (begin_mem_initializers): Remove.
4443         * testsuite/g++.dg/parser/constructor1.C: New test.
4445         PR c++/9809
4446         * call.c (add_function_candidate): Skip builtin fuctions that have
4447         not yet been declared.
4449         PR c++/9982
4450         * init.c (build_new_1): Correct logic for determining whether or
4451         not to use an array cookie.
4453         PR c++/9524
4454         * parser.c (cp_parser_postfix_expression): Call
4455         finish_non_static_data_member, even when processing_template_decl.
4457         PR c++/9912
4458         * cp-tree.h (is_ancestor): New function.
4459         (handle_class_head): Change prototype.
4460         * decl2.c (is_namespace_ancestor): Rename to ...
4461         (namespace_anecestor): ... this.
4462         (set_decl_namespace): Adjust accordingly.
4463         (handle_class_head): Remove unncessary parameters.
4464         * parser.c (cp_parser_class_head): Check that
4465         nested-name-specifiers are used appropriately.
4467 2003-03-07  Mark Mitchell  <mark@codesourcery.com>
4469         * call.c (reference_binding): Remove REF_IS_VAR parameter.
4470         (implicit_conversion): Adjust call to reference_binding.
4471         (make_temporary_var_for_ref_to_type): Add TYPE parameter.
4472         (initialize_reference): Adjust handling for references bound to
4473         rvalues.
4474         * cp-tree.h (make_temporary_var_for_ref_to_temp): Change
4475         prototype.
4476         (real_non_cast_lvalue_p): New method.
4477         * cvt.c (build_up_reference): Adjust use of
4478         make_temporary_var_for_ref_to_temp.
4479         * tree.c (real_non_cast_lvalue_p): New method.
4481 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4483         * except.c (init_exception_processing): Use C90 prototype style.
4484         (cp_protect_cleanup_actions): Likewise.
4485         (prepare_eh_type): Likewise.
4486         (build_eh_type_type): Likewise.
4487         (build_exc_ptr): Likewise.
4488         (do_begin_catch): Likewise.
4489         (dtor_nothrow): Likewise.
4490         (do_end_catch): Likewise.
4491         (push_eh_cleanup): Likewise.
4492         (decl_is_java_type): Likewise.
4493         (choose_personality_routine): Likewise.
4494         (initialize_handler_parm): Likewise.
4495         (expand_start_catch_block): Likewise.
4496         (expand_end_catch_block): Likewise.
4497         (begin_eh_spec_block): Likewise.
4498         (finish_eh_spec_block): Likewise.
4499         (do_allocate_exception): Likewise.
4500         (do_free_exception): Likewise.
4501         (wrap_cleanups_r): Likewise.
4502         (stabilize_throw_expr): Likewise.
4503         (build_throw): Likewise.
4504         (complete_ptr_ref_or_void_ptr_p): Likewise.
4505         (is_admissible_throw_operand): Likewise.
4506         (nothrow_libfn_p): Likewise.
4507         (can_convert_eh): Likewise.
4508         (check_handlers_1): Likewise.
4509         (check_handlers): Likewise.
4511 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
4513         * call.c (merge_conversion_sequences): New function.
4514         (build_conv): Set ICS_USER_FLAG for USER_CONVs.
4515         (convert_class_to_reference): Correct handling of second
4516         standard conversion sequence in a user-defined conversion
4517         sequence.
4518         (build_user_type_conversion_1): Use merge_conversion_sequences.
4519         * cp-tree.def: Add comments for CONV nodes.
4520         * rtti.c (get_tinfo_decl): Use build_address/build_nop.
4522 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4524         * error.c (init_error): Use C90 prototype style.
4525         (dump_scope): Likewise.
4526         (dump_qualifiers): Likewise.
4527         (dump_template_argument): Likewise.
4528         (dump_template_argument_list): Likewise.
4529         (dump_template_parameter): Likewise.
4530         (dump_template_bindings): Likewise.
4531         (dump_type): Likewise.
4532         (dump_typename): Likewise.
4533         (class_key_or_enum): Likewise.
4534         (dump_aggr_type): Likewise.
4535         (dump_type_prefix): Likewise.
4536         (dump_type_suffix): Likewise.
4537         (dump_global_iord): Likewise.
4538         (dump_simple_decl): Likewise.
4539         (dump_decl): Likewise.
4540         (dump_template_decl): Likewise.
4541         (dump_function_decl): Likewise.
4542         (dump_parameters): Likewise.
4543         (dump_exception_spec): Likewise.
4544         (dump_function_name): Likewise.
4545         (dump_template_parms): Likewise.
4546         (dump_char): Likewise.
4547         (dump_expr_list): Likewise.
4548         (dump_expr): Likewise.
4549         (dump_binary_op): Likewise.
4550         (dump_unary_op): Likewise.
4551         (type_as_string): Likewise.
4552         (expr_as_string): Likewise.
4553         (decl_as_string): Likewise.
4554         (context_as_string): Likewise.
4555         (lang_decl_name): Likewise.
4556         (cp_file_of): Likewise.
4557         (cp_line_of): Likewise.
4558         (decl_to_string): Likewise.
4559         (expr_to_string): Likewise.
4560         (fndecl_to_string): Likewise.
4561         (code_to_string): Likewise.
4562         (language_to_string): Likewise.
4563         (parm_to_string): Likewise.
4564         (op_to_string): Likewise.
4565         (type_to_string): Likewise.
4566         (assop_to_string): Likewise.
4567         (args_to_string): Likewise.
4568         (cv_to_string): Likewise.
4569         (cxx_print_error_function): Likewise.
4570         (cp_diagnostic_starter): Likewise.
4571         (cp_diagnostic_finalizer): Likewise.
4572         (cp_print_error_function): Likewise.
4573         (function_category): Likewise.
4574         (print_instantiation_full_context): Likewise.
4575         (print_instantiation_partial_context): Likewise.
4576         (maybe_print_instantiation_context): Likewise.
4577         (print_instantiation_context): Likewise.
4578         (cp_printer): Likewise.
4579         (print_integer): Likewise.
4580         (print_non_consecutive_character): Likewise.
4581         (locate_error): Likewise.
4583 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
4585         PR c++/9965
4586         * call.c (reference_binding): Add ref_is_var parameter.
4587         (implicit_conversion): Adjust call to reference_binding.
4588         (initialize_reference): Likewise.
4590         PR c++/9400
4591         * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
4592         PARM_DECLs.
4594         PR c++/9791
4595         * class.c (get_basefndecls): Use lookup_fnfields_1.
4597 2003-03-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4599         PR c++/9188
4600         * parser.c (cp_parser_type_parameter): Remove redundant `expect'
4601         in error message.
4602         (cp_parser_single_declaration): Likewise.
4604 2003-03-05  Jason Merrill  <jason@redhat.com>
4606         PR c++/9440
4607         * call.c (build_conditional_expr): Use convert rather than an
4608         explicit NOP_EXPR.
4610 2003-03-02  Matt Austern  <austern@apple.com>
4612         * decl.c (cp_binding_level): Add static_decls varray member.
4613         (add_decl_to_level): Add static/inline namespace scope
4614         declarations to static_decls array.
4615         (wrapup_global_for_namespace): Pass static_decls only, instead of
4616         all decls, to wrapup_global_declarations/check_global_declarations.
4617         (push_namespace): Initialize static_decls for ordinary namespaces.
4618         (cxx_init_decl_processing): Initialize static_decls for global
4619         namespace.
4621 2003-03-05  Mark Mitchell  <mark@codesourcery.com>
4623         * class.c (end_of_class): Correct thinko.
4625 2003-03-04  Nathanael Nerode  <neroden@gcc.gnu.org>
4627         * config-lang.in: Replace ${libstdcxx_version} by its value.
4629 2003-03-04  Gabriel Dos Reis <gdr@integrable-solutions.net>
4631         * cp-tree.h (cxx_saved_binding): Declare.
4632         (struct saved_scope): Adjust type of field 'old_binding'.
4633         * decl.c (cxx_saved_binding_make): New macro.
4634         (struct cxx_saved_binding): Define.
4635         (store_bindings): Adjust prototype.  Use cxx_saved_binding to save
4636         C++ bindings.
4637         (maybe_push_to_top_level): Adjust local variable type.
4638         (pop_from_top_level): Likewise.
4640 2003-03-04  Tom Tromey  <tromey@redhat.com>
4642         * Make-lang.in (c++.tags): New target.
4644 2003-03-04  Neil Booth  <neil@daikokuya.co.uk>
4646         * Make-lang.in: Update.
4648 2003-03-03  Jason Merrill  <jason@redhat.com>
4650         * decl.c (finish_enum): Do set the type in a template. Simplify.
4651         * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
4653 2003-03-03  Mark Mitchell  <mark@codesourcery.com>
4655         PR c++/9878
4656         * call.c (convert_class_to_reference): Correct conversion
4657         sequences.
4658         (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
4659         (implicit_conversion): Adjust call to reference_binding.
4660         (add_candidate): Change type of candidates parameter.
4661         (add_function_candidate): Likewise.
4662         (add_conv_candidate): Likewise.
4663         (build_builtin_candidate): Likewise.
4664         (add_builtin_candidate): Likewise.
4665         (add_builtin_candidates): Likewise.
4666         (add_template_candidate_real): Likewise.
4667         (add_template_candidate): Likewise.
4668         (add_template_conv_candidate): Likewise.
4669         (build_user_type_conversion_1): Adjust accordingly.
4670         (build_object_call): Likewise.
4671         (build_conditional_expr): Likewise.
4672         (add_candidates): Likewise.
4673         (build_new_op): Likewise.
4674         (convert_like_real): Use USER_CONV_CAND.  Use build_nop.
4675         (build_new_method_call): Adjust calls to add_function_candidate.
4676         (make_temporary_var_for_ref_to_temp): New function.
4677         (initialize_reference): Add decl parameter.
4678         * class.c (build_rtti_vtbl_entries): Use build_address and
4679         build_nop.
4680         * cp-tree.h (initialize_reference): Change prototype.
4681         (make_temporary_var_for_ref_to_temp): New function.
4682         (build_type_conversion): Change prototype.
4683         (build_address): New function.
4684         (build_nop): Likewise.
4685         * cvt.c (cp_convert_to_pointer): Adjust call to
4686         build_type_conversion.  Avoid indicating redundant NOP_EXPRs.
4687         Use build_nop.
4688         (convert_to_pointer_force): Use build_nop.
4689         (build_up_reference): Use make_temporary_var_for_ref_to_temp.
4690         (convert_to_reference): Adjust call to build_type_conversion.
4691         (ocp_convert): Likewise.
4692         (build_type_conversion): Remove for_sure parameter.
4693         * decl.c (grok_reference_init): Use initialize_reference.
4694         * typeck.c (build_address): New function.
4695         (build_nop): Likewise.
4696         (build_unary_op): Use them.
4697         (build_ptrmemfunc): Tidy slightly.
4698         (convert_for_initialization): Adjust call to
4699         initialize_reference.
4700         * typeck2.c (store_init_value): Remove #if 0'd code.
4702 2003-03-03  Jason Merrill  <jason@redhat.com>
4704         * decl.c (start_function): Clear DECL_NUM_STMTS.
4706         * class.c (get_vtable_decl): Use vtbl_type_node.
4707         (build_primary_vtable): Check for it.
4709 2003-03-02  Aldy Hernandez  <aldyh@redhat.com>
4711         * decl.c (check_initializer): Check for vector_opaque_p.
4713 2003-03-02  Ashif Harji  <asharji@uwaterloo.ca>
4715         * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
4716           invoke an external cpp during compilation.
4718 2003-03-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4720         * decl.c (duplicate_decls): Convert use of warning_with_decl() to
4721         that of warning().
4722         (start_decl): Likewise.
4723         (start_function): Likewise.
4725 2003-03-01  Neil Booth  <neil@daikokuya.co.uk>
4727         * Make-lang.in (CXX_C_OBJS): Update.
4729 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
4731         PR c++/9892
4732         * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
4733         instantiating it.
4735 2003-02-28  Aldy Hernandez  <aldyh@redhat.com>
4737         * parser.c (cp_parser_init_declarator): Revert opaque
4738         vector_opaque_p change.
4739         Do not include target.h.
4741 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
4743         PR c++/9879
4744         * cp-tree.h (build_zero_init): Add parameter.
4745         * decl.c (cp_finish_decl): Adjust call.
4746         * init.c (build_zero_init): Add nelts parameter.  Adjust recursive
4747         calls.
4748         (build_default_init): Add nelts parameter.  Adjust calls to
4749         build_zero_init.
4750         (build_new_1): Adjust call to build_default_init.
4751         * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
4753 2003-02-26  Devang Patel  <dpatel@apple.com>
4755         * decl.c (finish_enum): Merge two 'for' loops. Copy value node if
4756         required.  Postpone enum setting for template decls.
4757         (build_enumerator): Delay copying value node until finish_enum
4758         (). Remove #if 0'ed code.
4759         * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
4760         (tsubst_copy): Add check for enum type.
4762 2003-02-25  Mark Mitchell  <mark@codesourcery.com>
4764         PR c++/9683
4765         * decl2.c (prune_vars_needing_no_initialization): Do not throw
4766         away initializations for DECL_EXTERNAL VAR_DECLs.
4767         (finish_file): Adjust accordingly.
4768         * pt.c (instantiate_decl): Do not defer VAR_DECLs.
4770 2003-02-24 Gabriel Dos Reis  <gdr@integrable-solutions.net>
4772         * decl.c (add_binding): Time TV_NAME_LOOKUP.
4773         (push_class_binding): Likewise.
4774         (set_namespace_binding): Likewise.
4776 2003-02-24  Mark Mitchell  <mark@codesourcery.com>
4778         PR c++/9836
4779         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
4780         specializations back to the main template.
4781         * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
4782         * pt.c (resolve_typename_type): Likewise.
4784 2003-02-24  Jeffrey D. Oldham  <oldham@codesourcery.com>
4786         PR c++/9778
4787         * pt.c (tsubst_copy_and_build): For a templated function inside a
4788         scope, process template arguments.
4790 2003-02-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4792         PR c++/9602
4793         * typeck2.c (abstract_virtuals_error): Don't check when
4794         TYPE is still template parameter dependent.
4796 2003-02-23  Mark Mitchell  <mark@codesourcery.com>
4798         PR c++/5333
4799         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
4800         * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
4801         * pt.c (instantiate_class_template): Don't try to instantiate
4802         dependent types.
4803         (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
4805 2003-02-21  Mark Mitchell  <mark@codesourcery.com>
4807         PR c++/9749
4808         * decl.c (grokdeclarator): Do not allow parameters with variably
4809         modified types.
4811 2003-02-21  Nathan Sidwell  <nathan@codesourcery.com>
4813         * search.c (grow_bfs_bases): Remove. Fold into ...
4814         (bfs_walk): ... here, fix fencepost error. Fix merge lossage
4815         in previous patch.
4817 2003-02-20  Mark Mitchell  <mark@codesourcery.com>
4819         PR c++/9729
4820         * mangle.c (mangle_conv_op_name_for_type): Issue an error message
4821         when the G++ 3.2 ABI prevents correct compilation.
4823 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
4825         Change base class access representation. Share virtual base
4826         binfos.
4827         * cp/call.c (build_special_member_call): Remove binfo_for_vbase
4828         call.
4829         * cp/class.c (build_base_path): Likewise.
4830         (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
4831         (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
4832         (make_new_vtable): Adjust.
4833         (force_canonical_binfo_r): Delete.
4834         (force_canonical_binfo): Delete.
4835         (mark_primary_virtual_base): Delete.
4836         (dfs_unshared_virtual_bases): Delete.
4837         (mark_primary_bases): Adjust.
4838         (maybe_warn_about_overly_private_class): Adjust.
4839         (dfs_base_derived_from): Delete.
4840         (base_derived_from): Follow the inheritance chain.
4841         (struct find_final_overrider_data): Add vpath member.
4842         (dfs_find_final_overrider): Adjust.
4843         (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
4844         (find_final_overrider): Adjust.
4845         (update_vtable_entry_for_fn): Adjust.
4846         (modify_all_vtables): Adjust.
4847         (walk_subobject_offsets): Adjust.
4848         (layout_nonempty_base_or_field): Adjust.
4849         (layout_empty_base): Remove last parameter. Adjust.
4850         (build_base_field): Adjust.
4851         (build_base_fields): Adjust.
4852         (propagate_binfo_offsets): Remove last parameter. Adjust.
4853         (dfs_set_offset_for_unshared_vbases): Delete.
4854         (layout_virtual_bases): Adjust.
4855         (finish_struct_1): Adjust.
4856         (init_class_processing): Don't init access nodes.
4857         (dfs_get_primary_binfo): Delete.
4858         (get_primary_binfo): Adjust.
4859         (dump_class_hierarchy_r): Remove most derived arg, add IGO
4860         parameter. Adjust.
4861         (dump_class_hierarchy): Adjust.
4862         (finish_vtbls): Adjust.
4863         (get_original_base): Delete.
4864         (build_vtt_inits): Adjust.
4865         (dfs_build_secondary_vptr_vtt_inits): Adjust.
4866         (dfs_ctor_vtable_bases_queue_p): Adjust.
4867         (build_ctor_vtbl_group): Adjust.
4868         (dfs_accumulate_vtbl_inits): Adjust.
4869         (build_vtbl_initializer): Adjust.
4870         (build_vbase_offset_vtbl_entries): Adjust.
4871         (add_vcall_offset_vtbl_entries_1): Adjust.
4872         * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
4873         (access_*_node): Remove.
4874         (CANONICAL_BINFO): Delete.
4875         (BINFO_UNSHARED_MARKED): Remove.
4876         (BINFO_MARKED): Set LANG_FLAG_0 directly.
4877         (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
4878         (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
4879         (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
4880         Delete.
4881         (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
4882         (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
4883         (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
4884         Delete.
4885         (BINFO_DEPENDENT_BASE_P): New.
4886         (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
4887         index.
4888         (markedp, unmarkedp): Adjust.
4889         (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
4890         dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
4891         find_vbase_instance, binfo_for_vbase): Delete.
4892         (copied_binfo, original_binfo): Declare.
4893         (finish_base_specifier): Add virtual_p arg.
4894         (unshare_base_binfos): Delete.
4895         (copy_base_binfos): Declare.
4896         (reverse_path): Delete.
4897         * cp/decl.c (xref_basetypes): Access and virtuality passed
4898         differently. Don't copy direct base binfos here. Call
4899         copy_base_binfos.
4900         * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
4901         (initialize_vtbl_ptrs): Adjust.
4902         (expand_member_init): Adjust.
4903         * cp/parser.c (cp_parser_base_specifier): Adjust.
4904         * cp/pt.c (instantiate_class_template): Adjust.
4905         (get_template_base_recursive): Adjust.
4906         * cp/rtti.c (get_pseudo_ti_init): Adjust.
4907         (get_pseudo_ti_desc): Adjust.
4908         * cp/tree.c (unshare_base_binfos): Rename to ...
4909         (copy_base_binfos): ... here, reimplement.
4910         (make_binfo): Set BINFO_DEPENDENT_BASE_P.
4911         (reverse_path): Remove.
4912         * cp/typeck.c (get_delta_difference): Adjust error messages.
4913         * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
4914         * cp/search.c (lookup_base_r): Adjust.
4915         (dynamic_cast_base_recurse): Adjust.
4916         (canonical_binfo): Remove.
4917         (dfs_canonical_queue): Remove.
4918         (dfs_assert_unmarked_p): Remove.
4919         (assert_canonical_unmarked): Remove.
4920         (shared_marked_p, shared_unmarked_p): Remove.
4921         (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
4922         (dfs_access_in_type): Adjust.
4923         (access_in_type): Adjust.
4924         (dfs_accessible_queue_p): Adjust.
4925         (dfs_accessible_p): Adjust.
4926         (is_subobject_of_p_1, is_subobject_of_p): Remove.
4927         (struct lookup_field_info): Remove from_dep_base_p field.
4928         (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
4929         (lookup_field_r): Remove dependent base code.
4930         (lookup_member): Likewise.
4931         (dfs_walk, dfs_walk_real): Add access arg to queue fn.
4932         (dfs_unmarked_real_bases_queue_p): Remove.
4933         (dfs_marked_real_bases_queue_p): Remove.
4934         (dfs_skip_vbases): Remove.
4935         (dfs_get_pure_virtuals): Adjust.
4936         (markedp, unmarkedp): Adjust.
4937         (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
4938         (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
4939         (dfs_unmark): Adjust.
4940         (dfs_get_vbase_types):Remove.
4941         (dfs_build_inheritance_graph_order): Remove.
4942         (get_vbase_types): Remove
4943         (dfs_find_vbase_instance): Remove.
4944         (find_vbase_instance): Remove.
4945         (dfs_debug_unmarkedp): Adjust.
4946         (dependent_base_p): Remove.
4947         (dfs_push_type_decls): Adjust.
4948         (dfs_push_decls): Adjust.
4949         (dfs_no_overlap_yet): Adjust.
4950         (copied_binfo): New function.
4951         (original_binfo): New function.
4952         (binfo_for_vbase): Remove.
4954 2003-02-18  Zack Weinberg  <zack@codesourcery.com>
4956         * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
4957         (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
4958         vectors, for speed.
4960 2003-02-18  Mark Mitchell  <mark@codesourcery.com>
4962         PR c++/9704
4963         * class.c (layout_class_type): In the 3.2 ABI, take into account
4964         trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
4966 2003-02-18  Matt Austern <austern@apple.com>
4968         * cp/cp-lang.c: Change lang hooks so that final_write_globals does
4969         nothing for C++.
4970         * cp/decl.c (wrapup_globals_for_namespace): Remove special
4971         handling of global namespace.
4973 2003-02-18  Geoffrey Keating  <geoffk@apple.com>
4975         * cp-tree.h (rid_to_yy): Delete.
4976         (C_RID_YYCODE): Delete.
4977         (finish_file): Delete redundant declaration.
4979 2003-02-18  Jason Merrill  <jason@redhat.com>
4981         PR c++/9623
4982         * decl.c (reshape_init): Don't mess with initializer labels.
4984         PR c++/9485
4985         * parser.c (cp_parser_postfix_expression): Set idk properly for
4986         object->scope::member.
4988 2003-02-18  Ben Elliston  <bje@redhat.com>
4990         PR other/7350
4991         * decl.c (duplicate_decls): Fix typo in comment.
4993 2003-02-17  Michael Elizabeth Chastain <mec@shout.net>
4995         PR debug/9717
4996         * class.c (build_base_field): Mark fields for base classes with
4997         DECL_IGNORED_P.
4999 2003-02-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5001         PR c++/9457
5002         * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
5003         CONSTRUCTOR_ELTS only once.
5005 2003-02-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5007         PR c++/9459
5008         * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
5009         (dump_type_suffix): Likewise.
5011 2003-02-14  Nathan Sidwell  <nathan@codesourcery.com>
5013         * search.c: ANSIfy function declarations and definitions.
5014         * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
5015         * call.c (build_method_call, resolve_scoped_fn_name,
5016         build_java_interface_fn_ref): Adjust lookup_field, lookup_member
5017         calls.
5018         * class.c (handle_using_decl): Likewise.
5019         * decl.c (make_typename_type, make_unmound_class_template,
5020         start_decl, compute_array_index_type): Likewise.
5021         * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
5022         * init.c (expand_member_init, build_member_call): Likewise.
5023         * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
5024         resolve_typename_type): Likewise.
5025         * typeck.c (lookup_destructor, finish_class_member_access_exprm
5026         build_prememfunc_access_expr): Likewise.
5028 2003-02-13  Gabriel Dos Reis <gdr@integrable-solutions.net>
5030         * decl2.c: Include "timevar.h".
5031         (namespace_ancestor): Time name lookup.
5032         (add_using_namespace): Likewise.
5033         (lookup_using_namespace): Likewise.
5034         (qualified_lookup_using_namespace): Likewise.
5035         (decl_namespace): Likewise.
5036         (lookup_arg_dependent): Likewise.
5037         * lex.c (do_identifier): Likewise.
5038         (do_scoped_id): Likewise.
5039         * pt.c (lookup_template_class): Likewise.
5041 2003-02-14   Andrew Pinski <pinskia@physics.uc.edu>
5043         * decl.c: (define_label): Fix warning for return 0 instead of NULL.
5045 2003-02-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5047         * decl.c: Include "timevar.h".
5048         (poplevel): Time name lookup.
5049         (find_binding): Likewise.
5050         (push_namespace): Likewise.
5051         (pop_nested_namespace): Likewise.
5052         (store_bindings): Likewise.
5053         (maybe_push_to_top_level): Likewise.
5054         (pop_from_top_level): Likewise.
5055         (push_local_name): Likewise.
5056         (pushtag): Likewise.
5057         (pushdecl): Likewise.
5058         (pushdecl_with_scope): Likewise.
5059         (pushdecl_namespace_level): Likewise.
5060         (pushdecl_top_level): Likewise.
5061         (pushdecl_class_level): Likewise.
5062         (push_class_level_binding): Likewise.
5063         (push_using_decl): Likewise.
5064         (push_using_directive): Likewise.
5065         (push_overloaded_decl): Likewise.
5066         (lookup_label): Likewise.
5067         (define_label): Likewise.
5068         (lookup_tag): Likewise.
5069         (lookup_tag_reverse): Likewise.
5070         (lookup_namespace_name): Likewise.
5071         (select_decl): Likewise.
5072         (unqualified_namespace_lookup): Likewise.
5073         (lookup_name_real): Likewise.
5074         (lookup_name_current_level): Likewise.
5075         (lookup_type_current_level): Likewise.
5076         (maybe_inject_for_scope_var): Likewise.
5077         (xref_tag): Likewise.
5079         * Make-lang.in (cp/decl.o): Add dependency on timevar.h
5081 2003-02-12  Phil Edwards  <pme@gcc.gnu.org>
5083         * decl.c (build_enumerator):  Remove unneeded test.
5085 2003-02-09  Dan Nicolaescu  <dann@ics.uci.edu>
5087         * cp-tree.h (struct lang_type_header): Make all fields unsigned
5088         char.
5090 2003-02-03  Mark Mitchell  <mark@codesourcery.com>
5092         PR c++/7129
5093         * call.c (z_candidate): Add args.
5094         (convert_class_to_reference): Set it.
5095         (implicit_conversion): Tidy.
5096         (add_candidate): Add args parameter.
5097         (add_function_candidate): Adjust call to add_candidate.
5098         (add_conv_candidate): Likewise.
5099         (build_builtin_candidate): Likewise.
5100         (build_user_type_conversion_1): Eliminate wasteful tree_cons
5101         usage.
5102         (build_new_function_call): Likewise.
5103         (build_object_call): Likewise.
5104         (add_candidates): New function.
5105         (build_new_op): Use it.
5106         (covert_like_real): Adjust call to build_over_call.
5107         (build_over_call): Remove args parameter.
5108         * operators.def: Add <?= and >?=.
5110 2003-02-01  Richard Sandiford  <rsandifo@redhat.com>
5112         * typeck.c (build_indirect_ref): Don't check flag_volatile.
5114 2003-01-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5116         PR c++/8849
5117         * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
5119 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
5121         * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
5122         BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
5123         (BINFO_LANG_ELTS): New #define.
5124         * tree.c (make_binfo): Use BINFO_LANG_ELTS.
5126 2003-01-30  Geoffrey Keating  <geoffk@apple.com>
5128         * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
5130 2003-01-30  Mark Mitchell  <mark@codesourcery.com>
5132         * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
5133         for class types.
5134         * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
5135         rather than TYPE_LANG_FLAG_0.
5136         (TYPE_BUILT_IN): Remove.
5137         (TYPE_DEPENDENT_P): New macro.
5138         (TYPE_DEPENDENT_P_VALID): Likewise.
5139         (lang_type_class): Add fields_readonly.
5140         * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
5141         * pt.c (dependent_type_p_r): New function, split out from ...
5142         (dependent_type_p): ... here.  Memoize results.
5143         * search.c (dependent_base_p): Use dependent_type_p, not
5144         uses_template_parms.
5145         * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
5146         for class types.
5148 2003-01-29  Mark Mitchell  <mark@codesourcery.com>
5150         * call.c (build_field_call): Use build_new_op, not build_opfncall.
5151         (prep_operand): New function.
5152         (build_new_op): Use it.  Remove dead code.
5153         * class.c (pushclass): Change "modify" parameter type from int to
5154         bool.
5155         (currently_open_class): Use same_type_p, not pointer equality.
5156         (push_nested_class): Adjust calls to pushclass, remove modify
5157         parameter.
5158         * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
5159         (pushclass): Change prototype.
5160         (push_nested_class): Likewise.
5161         (grokoptypename): Remove.
5162         (build_opfncall): Remove.
5163         (value_dependent_expression_p): Declare.
5164         (resolve_typename_type): Likewise.
5165         (resolve_typename_type_in_current_instantiation): Likewise.
5166         (enter_scope_of): Remove.
5167         (tsubst): Remove.
5168         (tsubst_expr): Likewise.
5169         (tsubst_copy): Likewise.
5170         (tsubst_copy_and_build): Likewise.
5171         * decl.c (warn_about_implicit_typename_lookup): Remove.
5172         (finish_case_label): Return error_mark_node for erroneous labels.
5173         (start_decl): Adjust calls to push_nested_class.
5174         (grokfndecl): Call push_scope/pop_scope around call to
5175         duplicate_decls.
5176         (grokdeclarator): Do not call tsubst.
5177         (start_function): Adjust calls to push_nested_class.
5178         * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
5179         (check_classfn): Use push_scope/pop_scope around type comparisions.
5180         (grokoptypename): Remove.
5181         (push_sscope): Adjust call to push_nested_class.
5182         * error.c (dump_type): Show cv-qualification of typename types.
5183         * init.c (build_member_call): Use build_new_op, not
5184         build_opfncall.
5185         * method.c (build_opfncall): Remove.
5186         * parser.c (cp_parser): Add allow_non_constant_expression_p and
5187         non_constant_expression_p.
5188         (cp_parser_constant_expression): Adjust prototype.
5189         (cp_parser_resolve_typename_type): Remove.
5190         (cp_parser_non_constant_expression): New function.
5191         (cp_parser_non_constant_id_expression): Likewise.
5192         (cp_parser_new): Set allow_non_constant_expression_p and
5193         non_constant_expression_p.
5194         (cp_parser_primary_expression): Reject `this' and `va_arg' in
5195         constant-expressions.  Note that dependent names aren't really
5196         constant.
5197         (cp_parser_postfix_expression): Reject conversions to non-integral
5198         types in constant-expressions.  Neither are increments or
5199         decrements.
5200         (cp_parser_unary_expression): Reject increments and decrements in
5201         constant-expressions.
5202         (cp_parser_direct_new_declarator): Adjust call to
5203         cp_parser_constant_expression.
5204         (cp_parser_cast_expression): Reject conversions to non-integral
5205         types in constant-expressions.
5206         (cp_parser_assignment_expression): Rejects assignments in
5207         constant-expressions.
5208         (cp_parser_expression): Reject commas in constant-expressions.
5209         (cp_parser_labeled_statement): Adjust call to
5210         cp_parser_constant_expression.
5211         (cp_parser_direct_declarator): Simplify array bounds, even in
5212         templates, when they are non-dependent.  Use
5213         resolve_typename_type, not cp_parser_resolve_typename_type.
5214         (cp_parser_class_head): Use resolve_typename_type, not
5215         cp_parser_resolve_typename_type.
5216         (cp_parser_member_declaration): Adjust call to
5217         cp_parser_constant_expression.
5218         (cp_parser_constant_initializer): Likewise.
5219         (cp_parser_constructor_declarator): Use resolve_typename_type, not
5220         cp_parser_resolve_typename_type.
5221         (cp_parser_late_parsing_default_args): Adjust call to
5222         push_nested_class.
5223         * pt.c (tsubst): Give it internal linkage.
5224         (tsubst_expr): Likewise.
5225         (tsubst_copy): Likewise.
5226         (tsubst_copy_and_build): Likewise.
5227         (push_access_scope_real): Likewise.
5228         (tsubst_friend_class): Likewise.
5229         (instantiate_class_template): Adjust call to pushclass.
5230         (value_dependent_expression_p): Give it external linkage.
5231         Robustify.
5232         (resolve_typename_type): New function.
5233         * semantics.c (finish_call_expr): Use build_new_op, not
5234         build_opfncall.
5235         (begin_constructor_declarator): Remove.
5236         (begin_class_definition): Adjust call to pushclass.
5237         (enter_scope_of): Remove.
5238         * typeck.c (comptypes): Resolve typename types as appropriate.
5239         (build_x_indirect_ref): Use build_new_op, not build_opfncall.
5240         (build_x_compound_expr): Likewise.
5241         (build_modify_expr): Likewise.
5242         (build_x_modify_expr): Likewise.
5243         * typeck2.c (build_x_arrow): Likewise.
5245 2003-01-29  Fariborz Jahanian  <fjahanian@apple.com>
5247         * pt.c (last_pending_template) Declare GTY().
5249 2003-01-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5251         PR c++/8591
5252         * parser.c (cp_parser_elaborated_type_specifier): Convert
5253         TEMPLATE_DECL to TYPE_DECL only when processing template friends.
5254         (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
5256 2003-01-28  Nathan Sidwell  <nathan@codesourcery.com>
5258         PR c++/9437
5259         * pt.c (unify): Don't unify '*T' with 'U C::*'.
5261         PR c++/3902
5262         * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
5263         inside a declarator.
5265 2003-01-27  Nathan Sidwell  <nathan@codesourcery.com>
5267         * class.c (update_vtable_entry_for_fn): Add index parameter.
5268         Generate vcall thunk for covariant overriding from a virtual
5269         primary base.
5270         (dfs_modify_vtables): Adjust.
5272 2003-01-25  Nathan Sidwell  <nathan@codesourcery.com>
5274         PR c++/9403
5275         * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
5276         template keyword.
5277         (cp_parser_base_specifier): Look for and consume a
5278         TEMPLATE keyword. Replace switch with array index.
5280         PR c++/795
5281         * semantics.c (finish_non_static_data_member): Remember the
5282         field's type even in a template.
5284         PR c++/9415
5285         * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
5286         already scoped.
5288         PR c++/8545
5289         * parser.c (cp_parser_cast_expression): Be more tentative.
5291 2003-01-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5293         * cp-tree.h (flagged_type_tree_s): Remove.
5294         (check_for_new_type): Likewise.
5295         * typeck2.c (check_for_new_type): Likewise.
5297 2003-01-23  Nathanael Nerode  <neroden@gcc.gnu.org>
5299         * dump.c: ANSIfy function declarations and definitions.
5301         * cp-tree.h, decl.h: Get rid of PARAMS.  Again.
5303 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
5305         PR c++/9354
5306         * init.c (build_new): Set the type of the new-expression, even
5307         when processing_templte_decl.
5309         PR c++/9216
5310         * parser.c (cp_parser_primary_expression): Improve error message
5311         for templates used in an expression context.
5313         PR c++/8696
5314         * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
5315         parse when encountering "typedef".
5317 2003-01-22  Nathanael Nerode  <neroden@gcc.gnu.org>
5319         * class.c, parser.c: ANSIfy function definitions and declarations.
5321 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
5323         PR c++/9328
5324         * error.c (dump_decl): For an OVERLOAD, just print the name of the
5325         function; it doesn't make sense to try to print its type.
5326         * semantics.c (finish_typeof): Issue errors about invalid uses.
5328         PR c++/9298
5329         * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
5330         function.
5331         (cp_parser_expression_statement): Use it.
5332         (cp_parser_explicit_instantiation): Likewise.
5333         * pt.c (do_decl_instantiation): Improve error handling logic.
5335 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
5337         PR c++/9384
5338         * parser.c (cp_parser_using_declaration): Issue error messages
5339         about name resolution failures here.
5341         PR c++/9388
5342         * class.c (currently_open_derived_class): Use dependent_type_p.
5343         * cp-tree.h (dependent_type_p): New function.
5344         (dependent_template_arg_p): Likewise.
5345         (dependent_template_p): Likewise.
5346         (type_dependent_expression_p): Likewise.
5347         * parser.c (cp_parser_dependent_type_p): Remove.
5348         (cp_parser_value_dependent_type_p): Likewise.
5349         (cp_parser_type_dependent_expression_p): Likewise.
5350         (cp_parser_dependent_template_arg_p): Likewise.
5351         (cp_parser_dependent_template_id_p): Likewise.
5352         (cp_parser_dependent_template_p): Likewise.
5353         (cp_parser_diagnose_invalid_type_name): Replace
5354         cp_parser_dependent_type_p with dependent_type_p, etc.
5355         (cp_parser_primary_expresion): Likewise.
5356         (cp_parser_nested_name_specifier_opt): Likewise.
5357         (cp_parser_postfix_expression): Likewise.
5358         (cp_parser_unary_expression): Likewise.
5359         (cp_parser_template_name): Likewise.
5360         (cp_parser_class_name): Likewise.
5361         (cp_parser_lookup_name): Likewise.
5362         * pt.c (dependent_type_p): New function.
5363         (value_dependent_expression_p): Likewise.
5364         (type_dependent_expression_p): Likewise.
5365         (dependent_template_arg_p): Likewise.
5366         (dependent_template_id_p): Likewise.
5367         (dependent_template_p): Likewise.
5369         PR c++/9285
5370         PR c++/9294
5371         * parser.c (cp_parser_simple_declaration): Return quickly when
5372         encountering errors.
5374 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5376         Make-lang.in (cp/decl.o-warn): Add -Wno-error.
5378 2003-01-17  Jason Merrill  <jason@redhat.com>
5380         PR c++/9167, c++/9358
5381         * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
5383 2003-01-17  Jason Merrill  <jason@redhat.com>
5385         PR c++/9342
5386         * call.c (build_conditional_expr): Always do lvalue-rvalue
5387         conversion.
5389 2003-01-17  Mark Mitchell  <mark@codesourcery.com>
5391         PR c++/9294
5392         * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
5393         * cp-tree.h (BASELINK_BINFO): Adjust.
5394         (BASELINK_FUNCTIONS): Likewise.
5395         (BASELINK_ACCESS_BINFO): Likewise.
5396         (tree_baselink): New structure.
5397         (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
5398         (lang_tree_node): Add baselink.
5399         * decl.c (cp_tree_node_structure): Add BASELINK case.
5400         * search.c (build_baselink): Adjust.
5401         * tree.c (cp_walk_subtrees): Add BASELINK case.  Remove BASELINK_P
5402         test from TREE_LIST case.
5404         PR c++/9272
5405         * parser.c (cp_parser_constructor_declarator_p): Do not assume
5406         that a constructor cannot be declared outside of its own class.
5408         * parser.c (cp_parser_resolve_typename_type): If the scope cannot
5409         be resolved, neither can the qualified name.
5411         * rtti.c (get_pseudo_ti_desc): Fix thinko.
5413 2003-01-16  Jason Merrill  <jason@redhat.com>
5415         PR c++/8564
5416         * init.c (build_vec_init): Re-add maxindex parm.
5417         (perform_member_init, build_aggr_init): Pass it.
5418         (build_new_1): Pass it. Use an incomplete array type for full_type.
5419         * typeck.c (build_modify_expr): Pass it.
5420         * cp-tree.h: Adjust.
5422 2003-01-16  Jeffrey D. Oldham  <oldham@codesourcery.com>
5424         * cp-tree.h (tsubst_copy_and_build): New declaration.
5425         * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
5426         (tsubst_expr): Use 'tsubst_copy_and_build'.  Update initial comment.
5427         (tsubst_copy_and_build): New function.
5429 2003-01-16  Mark Mitchell  <mark@codesourcery.com>
5431         * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
5432         (PARTIAL_INSTANTIATION_P): Remove.
5433         (IMPLICIT_TYPENAME_P): Likewise.
5434         (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
5435         (build_typename_type): Remove declaration.
5436         (parmlist_is_exprlist): Likewise.
5437         * decl.c (build_typename_type): Make it static, remove third
5438         parameter.
5439         (push_class_binding): Don't do implicit typename stuff.
5440         (make_typename_type): Likewise.
5441         (lookup_name_real): Likewise.
5442         (grokdeclarator): Don't try to convert declarations into
5443         initializations.  Don't do implicit typename stuff.
5444         (parmlist_is_exprlist): Remove.
5445         (xref_basetypes): Simplify.
5446         * decl2.c (grokfield): Don't try to convert declarations into
5447         initializations.
5448         (build_anon_union_vars): Do this while processing templates, too.
5449         (finish_anon_union): Likewise.
5450         * error.c (dump_type): Remove implicit typename handling.
5451         * parser.c (cp_parser_diagnose_invalid_type_name): New method.
5452         (cp_parser_primary_expression): Correct handling of names not
5453         found by unqualified name lookup in templates.
5454         (cp_parser_nested_name_specifier_opt): Avoid checking dependency
5455         of types when possible.
5456         (cp_parser_simple_declaration): Complain intelligently about some
5457         invalid declarations.
5458         (cp_parser_member_declaration): Likewise.
5459         (cp_parser_constructor_declarator_p): Don't check when we're in a
5460         function scope.
5461         * pt.c (instantiate_class_template): Remove
5462         PARTIAL_INSTANTIATION_P gunk.
5463         * search.c (lookup_field_r): Don't build implicit typenames.
5464         (marked_pushdecls_p): Don't enter dependent base types.
5465         (unmarked_pushdecls_p): Likewise.
5466         * semantics.c (begin_class_definition): Remove implicit typename
5467         stuff.
5469 2003-01-16  Nathan Sidwell  <nathan@codesourcery.com>
5471         PR c++/9212
5472         * parser.c (cp_parser_direct_declarator): If accepting either
5473         abstract or named, the name must be an unqualified-id.
5475 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5477         * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
5479 2003-01-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5481         * decl2.c (check_classfn): Fix uninitialized warning.
5482         (build_anon_union_vars): Likewise.
5483         * pt.c (tsubst_copy): Likewise.
5485 2003-01-14  Jeffrey D. Oldham  <oldham@codesourcery.com>
5487         Further conform g++'s __vmi_class_type_info to the C++ ABI
5488         specification.
5489         * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
5490         the specification.
5491         (class_hint_flags): Likewise.
5493 2003-01-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5495         * config-lang.in: Add semantics.c to gtfiles.
5496         * cp-tree.h (flagged_type_tree_s): Remove lookups field.
5497         (saved_scope): Likewise.
5498         (type_lookups): Remove.
5499         (deferred_access): New structure.
5500         (type_access_control): Remove.
5501         (save_type_access_control): Likewise.
5502         (reset_type_access_control): Likewise.
5503         (decl_type_access_control): Likewise.
5504         (push_deferring_access_checks): Declare.
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): Likewise.
5511         (perform_or_defer_access_check): Likewise.
5512         * decl.c (make_typename_type): Use perform_or_defer_access_check.
5513         (make_unbound_class_template): Likewise.
5514         (grokdeclarator): Don't call decl_type_access_control.
5515         * parser.c (cp_parser_context): Remove deferred_access_checks
5516         and deferring_access_checks_p fields.
5517         (cp_parser_context_new): Adjust.
5518         (cp_parser): Remove access_checks_lists.
5519         (cp_parser_defer_access_check): Remove.
5520         (cp_parser_start_deferring_access_checks): Remove.
5521         (cp_parser_stop_deferring_access_checks): Remove.
5522         (cp_parser_perform_deferred_access_checks): Remove.
5523         (cp_parser_nested_name_specifier_opt): Use new deferred access
5524         functions.
5525         (cp_parser_simple_declaration): Likewise.
5526         (cp_parser_template_id): Likewise.
5527         (cp_parser_function_definition): Likewise.
5528         (cp_parser_class_specifier): Likewise.
5529         (cp_parser_lookup_name): Likewise.
5530         (cp_parser_single_declaration): Likewise.
5531         (cp_parser_pre_parsed_nested_name_specifier): Likewise.
5532         (cp_parser_parse_tentatively): Likewise.
5533         (cp_parser_parse_definitely): Likewise.
5534         (yyparse): Likewise.
5535         (cp_parser_init_declarator): Remove access_checks parameter.
5536         Use new deferred access functions.
5537         (cp_parser_function_definition_from_specifiers_and_declarator):
5538         Likewise.
5539         (cp_parser_class_head): Remove deferring_access_checks_p and
5540         saved_access_checks parameters.  Use new deferred access functions.
5541         (cp_parser_member_specification_opt): Don't call
5542         reset_type_access_control.
5543         * search.c (type_access_control): Remove.
5544         * semantics.c: Include "gt-cp-semantics.h".
5545         (deferred_type_access_control): Remove.
5546         (deferred_access_stack): New variable.
5547         (deferred_access_free_list): Likewise.
5548         (push_deferring_access_checks): New function.
5549         (resume_deferring_access_checks): Likewise.
5550         (stop_deferring_access_checks): Likewise.
5551         (pop_deferring_access_checks): Likewise.
5552         (get_deferred_access_checks): Likewise.
5553         (pop_to_parent_deferring_access_checks): Likewise.
5554         (perform_deferred_access_checks): New function, adapted from
5555         cp_parser_perform_deferred_access_checks.
5556         (perform_or_defer_access_check): New function, adapted from
5557         cp_parser_defer_access_check.
5558         (current_type_lookups): Remove.
5559         (deferred_type_access_control): Likewise.
5560         (decl_type_access_control): Likewise.
5561         (save_type_access_control): Likewise.
5562         (reset_type_access_control): Likewise.
5563         (begin_function_definition): Adjust.
5564         (begin_class_definiton): Likewise.
5566 2003-01-13  Jason Merrill  <jason@redhat.com>
5568         PR c++/8748
5569         * class.c (build_base_path): Take the address before calling save_expr.
5571         * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
5572         all the ambiguous conversions are bad.
5574         * class.c (maybe_warn_about_overly_private_class): Don't stop
5575         searching when we find a nonprivate method.
5577         * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
5579 2003-01-12  Mark Mitchell  <mark@codesourcery.com>
5581         * cp-tree.h (get_arglist_len_in_bytes): Remove.
5583         PR c++/9264
5584         * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
5585         typeame types more robustly.
5587 2003-01-11  Phil Edwards  <pme@gcc.gnu.org>
5589         * parser.c:  Fix comment typos.
5591 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
5593         PR c++/9099
5594         * parser.c (cp_parser_scope_through_which_access_occurs): Handle
5595         an object_type which is not a class type.
5597 2003-01-10  Geoffrey Keating  <geoffk@apple.com>
5599         * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
5600         (cp_parser_late_parsing_default_args): Likewise.
5602 2003-01-10  Nathanael Nerode  <neroden@gcc.gnu.org>
5604         * cfns.gperf: ANSIfy function declarations.
5605         * cfns.h: Regenerate.
5606         * cp-tree.h: ANSIfy function declarations.
5608 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
5610         * cp-tree.h (reparse_absdcl_as_expr): Remove.
5611         (reparse_absdcl_as_casts): Likewise.
5612         (reparse_decl_as_expr): Likewise.
5613         (finish_decl_parsing): Likewise.
5614         * decl2.c (reparse_absdcl_as_expr): Remove.
5615         (reparse_absdcl_as_casts): Likewise.
5616         (repase_decl_as_expr): Likewise.
5617         (finish_decl_parsing): Likewise.
5619         PR c++/9128
5620         PR c++/9153
5621         PR c++/9171
5622         * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
5623         function.
5624         (cp_parser_nested_name_specifier_opt): Correct the
5625         check_dependency_p false.
5626         (cp_parser_postfix_expression): Fix formatting.
5627         (cp_parser_decl_specifier_seq): Avoid looking for constructor
5628         declarators when possible.
5629         (cp_parser_template_id): Avoid performing name-lookup when
5630         possible.
5631         (cp_parser_class_head): Do not count specializations when counting
5632         levels of templates.
5633         (cp_parser_constructor_declarator_p): Return immediately if
5634         there's no chance that the tokens form a constructor declarator.
5635         * rtti.c (throw_bad_typeid): Add comment.  Do not return an
5636         expression with reference type.
5637         (get_tinfo_decl_dynamic): Do not return an expression with
5638         reference type.
5639         (build_typeid): Add comment.  Do not return an expression with
5640         reference type.
5641         * typeck.c (build_class_member_access_expr): Improve handling of
5642         conditionals and comma-expressions as objects.
5644 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
5646         * cfns.gperf: ANSIfy function declarations.
5647         * cfns.h: Regenerate.
5648         * cp-tree.h: ANSIfy function declarations.
5649         * parser.c: ANSIfy function declarations & definitions.
5651         * decl.c (bad_specifiers): Fix parameter order error I introduced.
5653 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
5655         Merge from pch-branch:
5657         2003-01-09  Geoffrey Keating  <geoffk@apple.com>
5659         Merge to tag pch-merge-20030102:
5661         * semantics.c (finish_translation_unit): Don't call finish_file.
5662         * parser.c: Don't include ggc.h.
5663         (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
5664         read first token here.  Don't allow PCH files after the first
5665         token is read.
5666         (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
5667         (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
5668         (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
5669         (cp_parser_late_parsing_for_member): Don't duplicate call to
5670         cp_lexer_set_source_position_from_token.
5671         (cp_parser_late_parsing_default_args): Likewise.
5672         (yyparse): Call finish_file after clearing the_parser.
5674         2002-12-11  Geoffrey Keating  <geoffk@apple.com>
5676         * Make-lang.in: Remove $(GGC_H) from all dependencies.
5677         (CXX_TREE_H): Add $(GGC_H).
5678         * class.c: Don't include ggc.h.
5679         (field_decl_cmp): Make parameters be 'const void *' to match qsort.
5680         (method_name_cmp): Likewise.
5681         (resort_data): New variable.
5682         (resort_field_decl_cmp): New.
5683         (resort_method_name_cmp): New.
5684         (resort_sorted_fields): New.
5685         (resort_type_method_vec): New.
5686         (finish_struct_methods): Delete cast.
5687         (finish_struct_1): Delete cast.
5688         * cp-tree.h: Include ggc.h.
5689         (struct lang_type_class): Add reorder attribute to field `methods'.
5690         (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
5691         (resort_sorted_fields): New prototype.
5692         (resort_type_method_vec): New prototype.
5693         * call.c: Don't include ggc.h.
5694         * decl.c: Likewise.
5695         * decl2.c: Likewise.
5696         * init.c: Likewise.
5697         * lex.c: Likewise.
5698         * method.c: Likewise.
5699         * optimize.c: Likewise.
5700         * parse.y: Likewise.
5701         * pt.c: Likewise.
5702         * repo.c: Likewise.
5703         * search.c: Likewise.
5704         * semantics.c: Likewise.
5705         * spew.c: Likewise.
5706         * tree.c: Likewise.
5708         * lang-specs.h: Remove comment.
5710         2002-12-03  Geoffrey Keating  <geoffk@apple.com>
5712         * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
5713         (operator_name_info): Mark to be saved for PCH, specify size.
5714         (assignment_operator_name_info): Likewise.
5716         2002-11-19  Geoffrey Keating  <geoffk@apple.com>
5718         * decl.c (anon_cnt): Mark to be saved for PCH.
5720         2002-10-25  Geoffrey Keating  <geoffk@apple.com>
5722         * lex.c  (init_reswords): Delete now-untrue comment.
5723         Allocate ridpointers using GGC.
5725         2002-10-04  Geoffrey Keating  <geoffk@apple.com>
5727         * cp-tree.h (union lang_decl_u2): Add tags to all fields.
5729         * g++spec.c (lang_specific_driver): Don't include standard
5730         libraries in `added'.
5732         2002-08-27  Geoffrey Keating  <geoffk@redhat.com>
5734         * decl2.c (finish_file): Call c_common_write_pch.
5735         * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
5737         2002-08-17  Geoffrey Keating  <geoffk@redhat.com>
5739         * g++spec.c (lang_specific_driver): Treat .h files as C++ header
5740         files when using g++.
5741         * lang-specs.h: Handle compiling C++ header files.
5743 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
5745         * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
5747 2003-01-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5749         * pt.c (push_access_scope_real): Call push_to_top_level for
5750         function in namespace scope.
5751         (pop_access_scope): Call pop_from_top_level for function in
5752         namespace scope.
5754 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
5756         * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
5758 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
5760         * Make-lang.in (c++.install-common, c++.install-man,
5761         c++.uninstall): Prepend $(DESTDIR) to destination paths in
5762         all (un)installation commands.
5763         (c++.install-common): Rewrite $(LN) commands to support
5764         DESTDIR with "ln" as well as with "ln -s".
5766 2003-01-08  Jason Merrill  <jason@redhat.com>
5768         * parser.c (cp_parser_primary_expression): See through explicitly
5769         scoped ALIAS_DECLs, too.
5771 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
5773         * decl.c: Remove some #if 0 code.
5775         * decl.c: ANSIfy function declarations.
5777 2003-01-07  Mark Mitchell  <mark@codesourcery.com>
5779         * parser.c (cp_parser_asm_definition): Correct handling of omitted
5780         operands.
5782 2003-01-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5784         PR c++/9030
5785         * decl.c (make_typename_type): Check access only when tf_error.
5786         (make_unbound_class_template): Likewise.
5787         * pt.c (saved_access_scope): New variable.
5788         (push_access_scope_real): New function.
5789         (push_access_scope): Likewise.
5790         (pop_access_scope): Likewise.
5791         (tsubst_default_argument): Use them.
5792         (instantiate_template): Likewise.
5793         (regenerate_decl_from_template): Likewise.
5794         (instantiate_decl): Likewise.
5795         (get_mostly_instantiated_function_type): Likewise.
5797 2003-01-07  Nathanael Nerode <neroden@gcc.gnu.org>
5799         * tree.c: Delete bogus #if 0 code.
5801 2003-01-07  Andreas Schwab  <schwab@suse.de>
5803         * class.c (layout_class_type): Don't use
5804         PCC_BITFIELD_TYPE_MATTERS if not defined.
5806 2003-01-06  Mark Mitchell  <mark@codesourcery.com>
5808         PR c++/9165
5809         * decl2.c (build_cleanup): Mark the object as used.
5811         * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
5812         (hash_local_specialization): New function.
5813         (register_local_specialization): Revert 2003-01-05 change.
5814         (instantiate_decl): Use hash_local_specialization when creating
5815         the local_specializations table.
5817         * decl2.c (mark_used): Do not synthesize thunks.
5819         * class.c (layout_class_type): Correct handling of unnamed
5820         bitfields wider than their types.
5822         PR c++/9189
5823         * parser.c (cp_parser): Remove default_arg_types.  Update
5824         documentation for unparsed_functions_queues.
5825         (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
5826         parameter.
5827         (cp_parser_new): Don't set parser->default_arg_types.
5828         (cp_parser_function_definition): Adjust usage of
5829         unparsed_funtions_queues.
5830         (cp_parser_class_specifier): Don't mess with
5831         parser->default_arg_types.  Handle default argument processing in
5832         a separate phase from function body processing.
5833         (cp_parser_template_declaration_after_export): Adjust usage of
5834         unparsed_functions_queues.
5835         (cp_parser_late_parsing_for_member): Do not handle default
5836         arguments.
5838 2003-01-06  Nathan Sidwell  <nathan@codesourcery.com>
5840         PR c++/9109
5841         * parser.c (cp_parser_declarator_kind): New enum.
5842         (cp_parser_declarator): Adjust.
5843         (cp_parser_direct_declarator): Adjust. Allow for either named or
5844         abstract declarator. Prefer abstract, if possible. Allow
5845         parenthesized function name.
5846         (cp_parser_condition): Adjust cp_parser_declarator call.
5847         (cp_parser_explicit_instantiation): Likewise.
5848         (cp_parser_init_declarator): Likewise.
5849         (cp_parser_type_id): Likewise.
5850         (cp_parser_function_definition): Likewise.
5851         (cp_parser_member_declaration): Likewise.
5852         (cp_parser_parameter_declaration): Use cp_parser_declarator to do
5853         the tentative parsing.
5854         (cp_parser_exception_declaration): Likewise.
5856 2003-01-05  Mark Mitchell  <mark@codesourcery.com>
5858         * parser.c (cp_parser_template_parameter): Adjust call to
5859         cp_parser_parameter_declaration.
5860         (cp_parser_parameter_declaration_list): Likewise.
5861         (cp_parser_parameter_declaration): Replace
5862         greater_than_is_operator_p with template_parm_p parameter.  Do not
5863         cache tokens for template default arguments.
5865         * pt.c (retrieve_local_specialization): Use htab_find, not
5866         htab_find_with_hash.
5867         (register_local_specialization): Use htab_find_slot, not
5868         htab_find_slot_with_hash.
5869         (instantiate_decl): Pass a hash function to htab_create.
5871 2003-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5873         * parser.c (cp_parser_binary_expression,
5874         cp_parser_multiplicative_expression,
5875         cp_parser_additive_expression, cp_parser_shift_expression,
5876         cp_parser_relational_expression, cp_parser_equality_expression,
5877         cp_parser_and_expression, cp_parser_exclusive_or_expression,
5878         cp_parser_inclusive_or_expression,
5879         cp_parser_logical_and_expression, cp_parser_logical_or_expression,
5880         cp_parser_binary_expression): Const-ify.
5882 2003-01-04  Mark Mitchell  <mark@codesourcery.com>
5884         * method.c (use_thunk): Disable access control while building the
5885         body of the thunk.
5887 2003-01-03  Nathanael Nerode  <neroden@gcc.gnu.org>
5889         * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
5890         front end.
5892 2003-01-03  Matt Austern  <austern@apple.com>
5894         * cp-tree.h (struct lang_type_class): add field for key method
5895         (cp_global_trees): rename dynamic_classes to keyed_classes
5896         (key_method): add definition
5897         * class.c (finish_struct_1): compute class's key method, and add
5898         the class to keyed_classes list if there is no key method.
5899         * decl.c (finish_function): add class to keyed_classes list if we
5900         see a definition of the class's key method.
5901         * pt.c (instantiate_class_template): add template specialization
5902         of a dynamic class to keyed_classes list.
5903         * decl2.c (key_method): remove
5904         (finish_file): iterate only through keyed_classes list when
5905         deciding whether to emit vtables, remove class from its list after
5906         we do the emission.
5908 2003-01-02  Jason Merrill  <jason@redhat.com>
5910         * call.c (build_conditional_expr): Stabilize lvalues properly.
5911         * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
5912         * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
5913         Don't allow CALL_EXPR or VA_ARG_EXPR, either.
5915         * call.c (convert_like_real): Call decl_constant_value for an
5916         IDENTITY_CONV even if there are no more conversions.
5918         * cvt.c (build_up_reference): Don't push unnamed temps.
5920         * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
5922         * dump.c (cp_dump_tree): Don't try to dump class-specific fields
5923         for a backend struct.
5925         * except.c (wrap_cleanups_r, build_throw): Make
5926         MUST_NOT_THROW_EXPRs void.
5927         * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
5929         * init.c (build_vec_delete_1): Pre-evaluate the base address.
5931         * init.c (get_temp_regvar): Simplify logic.
5933         * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
5934         our replacement is a decl.
5936         * decl.c (cp_make_fname_decl): Push the decls inside the
5937         outermost scope.
5939 2003-01-03  Nathan Sidwell  <nathan@codesourcery.com>
5941         PR c++/45, c++/3784
5942         * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
5943         the same too.
5945 2003-01-03  Graham Stott  <graham.stott@btinternet.com>
5947         * parser.c (struct cp_parser): Add access_checks_lists field
5948         (cp_parser_simple_declaration): Use.
5949         (cp_parser_init_declarator): Likewise.
5951 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
5953         * parser.c (cp_parser_declaration): Accept the __extension__
5954         keyword before the declaration.
5956         PR c++/2843
5957         * parser.c (cp_parser_parameter_declaration): Allow attributes to
5958         appear after the declarator.
5960         * call.c (build_new_method_call): Fix typo in message format
5961         string.
5963 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
5965         * parser.c (cp_lexer_next_token_is): Declare it inline.
5966         (cp_lexer_set_source_position_from_token): Likewise.
5967         (cp_lexer_debugging_p): Likewise.
5968         (cp_parser_parsing_tentatively): Likewise.
5969         (cp_parser_nested_name_specifier_opt): Reduce the number of calls
5970         to the cp_lexer_peek_token.
5972         * parser.c (cp_parser_sizeof_operand): Do not evaluate the
5973         expression.
5975 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
5977         * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
5978         cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
5979         cp/repo.c: Fix copyright years.
5981 2003-01-01  Neil Booth  <neil@daikokuya.co.uk>
5983         * lex.c: Remove superfluous include of cpplib.h.
5984         (CONSTRAINT): Define without conditions.
5985         (init_cp_pragma): Use c_register_pragma.
5987 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
5989         * .cvsignore: Remove.
5991 2002-12-31  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5993         * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
5994           except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
5995           lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
5996           pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
5997           typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
5998           copyright header.
5999         * lex.h: parse.y is dead, so don't mention it.  Also replace the
6000           copyright header with the default GNU copyright header.
6002 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
6004         * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
6005         (lookup_name_namespace_only): Likewise.
6006         (begin_only_namespace_names): Likewise.
6007         (end_only_namespace_names): Likewise.
6008         * decl.c (only_namespace_names): Remove.
6009         (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
6010         (lookup_name_real): Do not check only_namespace_names.
6011         (lookup_name_namespace_only): Remove.
6012         (begin_only_namespace_names): Likewise.
6013         (end_only_namespace_names): Likewise.
6014         * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
6015         nested-name-specifiers more gracefully.
6016         (cp_parser_class_or_namespace_name): Avoid looking up namespace
6017         names when they cannot possibly appear.
6018         (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
6019         (cp_parser_elaborated_type_specifier): Likewise.
6020         (cp_parser_namespace_name): Only look for namespace names.
6021         (cp_parser_lookup_name): Add is_namespace parameter.
6022         (cp_parser_lookup_name_simple): Adjust call to
6023         cp_parser_lookup_name.
6025         * parser.c (cp_parser_dependent_type_p): Fix thinko.
6027 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
6029         * .cvsignore: Update.
6031 2002-12-31  Nathan Sidwell  <nathan@codesourcery.com>
6033         * class.c (modify_vtable_entry): Remove unused variable.
6034         (get_vcall_index): Always expect a non-thunk.
6035         (update_vtable_entry_for_fn): Combine covariant adjustments, when
6036         overriding a thunk. Pass get_vcall_index a non-thunk.
6038         * decl2.c (finish_file): Mark undefined inlines as extern.
6040 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
6042         * cp-tree.def (RETURN_INIT): Remove.
6043         * cp-tree.h (DECL_IN_MEMORY_P): Remove.
6044         (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
6045         (note_level_for_for): Remove.
6046         (note_level_for_try): Likewise.
6047         (note_level_for_catch): Likewise.
6048         (finish_named_return_value): Likewise.
6049         (do_pushlevel): Change prototype.
6050         (pending_lang_change): Remove.
6051         * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
6052         sk_for.
6053         (note_level_for_for): Remove.
6054         (note_level_for_try): Likewise.
6055         (note_level_for_catch): Likewise.
6056         (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
6057         * parser.c (cp_parser_context_free_list): Make it "deletable".
6058         (cp_parser_template_argument): Remove misleading comment.
6059         * pt.c (tsubst_expr): Remove RETURN_INIT code.
6060         * semantics.c (genrtl_named_return_value): Remove.
6061         (do_pushlevel): Take a scope kind as an argument.
6062         (begin_if_stmt): Adjust.
6063         (begin_while_stmt): Likewise.
6064         (begin_for_stmt): Likewise.
6065         (finish_for_init_stmt): Likewise.
6066         (begin_switch_stmt): Likewise.
6067         (begin_handler): Likewise.
6068         (begin_compound_stmt): Likewise.
6069         (finish_named_return_value): Remove.
6070         (cp_expand_stmt): Remove RETURN_INIT case.
6071         * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
6073 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
6075         PR c++/9112
6076         * parser.c (cp_parser_direct_declarator): Handle erroneous
6077         parenthesized declarators correctly.
6079 2002-12-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6081         * cp-tree.h (pending_lang_change): Declare.
6083 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
6085         * parser.c (cp_parser_context_free_list): New variable.
6086         (cp_parser_context_new): Use it.
6087         (cp_parser_error): Check return code from
6088         cp_parser_simulate_error.
6089         (cp_parser_simulate_error): Return a value.
6090         (cp_parser_id_expression): Optimize common case.
6091         (cp_parser_class_name): Likewise.
6092         (cp_parser_class_specifier): Adjust call to
6093         cp_parser_late_parsing_default_args.
6094         (cp_parser_lookup_name): Optimize common case.
6095         (cp_parser_late_parsing_for_member): Adjust call to
6096         cp_parser_late_parsing_default_args.
6097         (cp_parser_late_parsing_default_args): Add scope parameter.
6098         (cp_parser_require): Avoid creating the error message unless it's
6099         needed.
6100         (cp_parser_parse_definitely): Place free'd contexts on the free
6101         list.
6103         * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
6105 2002-12-30  David Edelsohn  <edelsohn@gnu.org>
6107         * parser.c (cp_parser_parameter_declaration_clause): Treat system
6108         header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
6110 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
6112         * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
6113         GCC, not GNU CC.
6115 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
6117         * parse.y: Remove.
6118         * spew.c: Likewise.
6119         * Make-lang.in (gt-cp-spew.h): Remove.
6120         * cp-tree.h (do_pending_lang_change): Remove.
6121         (do_identifier): Change prototype.
6122         (finish_id_expr): Remove.
6123         * decl.c (lookup_name_real): Remove yylex variable.
6124         * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
6125         * lex.c (init_cpp_parse): Remove.
6126         (reduce_cmp): Likewise.
6127         (token_cmp): Likewise.
6128         (yychar): Likewise.
6129         (lastiddecl): Likewise.
6130         (token_count): Likewise.
6131         (reduce_count): Likewise.
6132         (yyhook): Likewise.
6133         (print_parse_statistics): Likewise.
6134         (do_pending_lang_change): Likewise.
6135         (do_identifier): Remove parsing parameter.
6136         * lex.h (lastiddecl): Remove.
6137         (looking_for_typename): Remove.
6138         (looking_for_template): Likewise.
6139         (pending_lang_change): Likewise.
6140         (yylex): Likewise.
6141         * semantics.c (finish_id_expr): Remove.
6143         * decl.c (grokdeclarator): Diagnost "extern thread" and "static
6144         thread" correctly.
6146 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
6148         * decl.c, decl2.c, decl.h:  GCC, not GNU CC.  This is the C++ front
6149         end, not the C front end.
6151 2002-12-30  Nathan Sidwell  <nathan@codesourcery.com>
6153         * cp-tree.h (THUNK_TARGET): New macro.
6154         (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
6155         (finish_thunk): Remove offset parms.
6156         * class.c (find_final_overrider): Look through thunks.
6157         (get_vcall_index): Use THUNK_TARGET.
6158         (update_vtable_entry_for_fn): Look through thunks. Set covariant
6159         fixed offset here. Adjust finish_thunk call.
6160         (build_vtbl_initializer): Adjust finish_thunk calls.
6161         * mangle.c (mangle_call_offset): Remove superfluous if.
6162         (mangle_thunk): Adjust.
6163         * method.c (make_thunk): Adjust.
6164         (finish_thunk): Adjust.
6165         (thunk_adjust): Remove assert.
6166         (use_thunk): Use THUNK_TARGET
6167         * dump1.c (cp_dump_tree): Adjust thunk dumping.
6169         PR c++/9054
6170         * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
6171         * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
6173 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6175         Remove traditional C constructs 4/n.
6176         * decl2.c (grok_method_quals, warn_if_unknown_interface,
6177         grok_x_components, cp_build_parm_decl, build_artificial_parm,
6178         maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
6179         delete_sanity, check_member_template, check_java_method,
6180         check_classfn, finish_static_data_member_decl, grokfield,
6181         grokbitfield, grokoptypename, grok_function_init,
6182         cplus_decl_attributes, constructor_name, defer_fn,
6183         build_anon_union_vars, finish_anon_union, coerce_new_type,
6184         coerce_delete_type, comdat_linkage, maybe_make_one_only,
6185         key_method, import_export_vtable, import_export_class,
6186         output_vtable_inherit, import_export_decl, import_export_tinfo,
6187         build_cleanup, get_guard, get_guard_bits, get_guard_cond,
6188         set_guard, start_objects, finish_objects,
6189         start_static_storage_duration_function,
6190         finish_static_storage_duration_function, get_priority_info,
6191         start_static_initialization_or_destruction,
6192         finish_static_initialization_or_destruction,
6193         do_static_initialization, do_static_destruction,
6194         prune_vars_needing_no_initialization, write_out_vars,
6195         reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
6196         add_using_namespace, merge_functions, ambiguous_decl,
6197         lookup_using_namespace, lookup_using_namespace,
6198         qualified_lookup_using_namespace, set_decl_namespace,
6199         decl_namespace, current_decl_namespace, push_decl_namespace,
6200         pop_decl_namespace, push_scope, pop_scope, add_function,
6201         arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
6202         lookup_arg_dependent, do_namespace_alias,
6203         validate_nonmember_using_decl, do_nonmember_using_decl,
6204         do_toplevel_using_decl, do_local_using_decl,
6205         do_class_using_decl, do_using_directive, check_default_args,
6206         mark_used, handle_class_head): Use C90 prototypings.  Use booleans.
6207         * parser.c (cp_parser_class_head): Use booleanss.
6208         * decl.c (walk_globals, walk_vtables): Likewise.
6209         * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
6210         walk_globals): Change return type from 'int' to 'bool'.
6211         * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
6212         throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
6213         build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
6214         get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
6215         qualifier_flags, tinfo_base_init, generic_initializer,
6216         ptr_initializer, dfs_class_hint_mark, ptm_initializer,
6217         dfs_class_hint_unmark, class_hint_flags, class_initializer,
6218         typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
6219         get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
6220         unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
6221         * repo.c (repo_compile_flags, repo_template_declared,
6222         repo_template_defined, repo_class_defined, repo_get_id,
6223         repo_template_used, repo_vtable_used, repo_inline_used,
6224         repo_tinfo_used, repo_template_instantiated, extract_string,
6225         open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
6226         finish_repo): Likewise.
6227         * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
6228         cxx_print_xnode): Likewise..
6229         * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
6230         cxx_warn_unused_global_decl, cp_expr_size): Likewise.
6231         * cxxfilt.c (demangle_it, print_demangler_list, usage,
6232         standard_symbol_characters, hp_symbol_characters, main, fatal):
6233         Likewise.
6234         (strip_underscore):  Change type from 'int' to 'bool'.
6235         (main): Use boolean constants.
6237 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6239         Remove traditional C constructs 3/n.
6240         * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
6241         build_up_reference, warn_ref_binding, convert_to_reference,
6242         convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
6243         convert_to_void, convert, convert_force, build_type_conversion,
6244         build_expr_type_conversion, type_promotes_to,
6245         perform_qualification_conversions): Use C90 prototyping style.
6246         * decl2.c (grok_array_decl): Use boolean constant.
6247         (delete_sanity): Likewise.
6248         * typeck.c (build_unary_op): Likewise.
6249         * semantics.c (finish_switch_cond): Likewise.
6250         * parser.c (cp_parser_direct_new_declarator): Likewise.
6251         * init.c (build_new): Likewise.
6253 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
6255         * Make-lang.in (po-generated): Remove parse.c.
6256         (CXX_OBJS): Remove parse.o and spew.o.  Add parser.o.
6257         ($(srcdir)/cp/parse.h): Remove target.
6258         ($(srcdir)/cp/parse.c): Likewise.
6259         (gt-cp-parse.h): Likewise.
6260         (gt-cp-parser.h): New target.
6261         (c++.distclean): Do not remove parse.output.
6262         (c++.maintainer-clean): Do not remove parse.c or parse.h.
6263         (cp/spew.o): Remove target.
6264         (cp/lex.o): Adjust dependencies.
6265         (cp/pt.o): Likewise.
6266         (cp/parse.o): Likewise.
6267         (cp/TAGS): Do not mention parse.c.
6268         (cp/parser.o): New target.
6269         * NEWS: Mention the new parser.
6270         * call.c (build_scoped_method_call): Simplify.
6271         (build_method_call): Likewise.
6272         (build_new_function_call): Adjust calls to add_function_candidate
6273         and add_template_candidate.
6274         (build_new_op): Improve handling of erroroneous operands.
6275         (convert_default_arg): Remove circular argument processing.
6276         (name_as_c_string): New function.
6277         (build_new_method_call): Use it.
6278         (perform_implicit_conversion): Use error_operand_p.
6279         * class.c (finish_struct_anon): Use constructor_name_p.
6280         (check_field_decls): Likewise.
6281         (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
6282         (resolve_address_of_overloaded_function): Likewise.
6283         (instantiate_type): Tweak pointer-to-member handling.
6284         (get_primary_binfo): Remove incorrect assertion.
6285         * config-lang.in (gtfiles): Add parser.c, remove parse.c.
6286         * cp-tree.h (DEFARG_TOKENS): New macro.
6287         (default_arg): New structure.
6288         (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
6289         (lang_tree_node): Add default_arg.
6290         (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
6291         (type_info_ref_type): New macro.
6292         (saved_scope): Make processing_explicit_instantiation a boolean.
6293         (check_access): New field.
6294         (unparsed_text): Remove.
6295         (language_function): Remove unparsed_inlines.
6296         (error_operand_p): New macro.
6297         (lang_decl): Adjust pending_inline_info.
6298         (DEFARG_POINTER): Remove.
6299         (tag_types): Add typenames.
6300         (lookup_ualified_name): Declare.
6301         (lookup_name_real): Likewise.
6302         (shadow_tag): Adjust prototype.
6303         (get_scope_of_declarator): Declare it.
6304         (process_next_inline): Remove it.
6305         (check_for_missing_semicolon): Likewise.
6306         (maybe_get_template_decl_from_type_decl): Declare it.
6307         (finish_label_stmt): Adjust prototype.
6308         (finish_non_static_data_meber): Declare it.
6309         (finish_pseudo_destructor_call_expr): Rename to ...
6310         (finish_pseudo_destructor_expr): ... this.
6311         (finish_compound_literal): Declare it.
6312         (begin_inline_definitions): Remove it.
6313         (init_spew): Remove.
6314         (peekyylex): Likewise.
6315         (arbitrate_lookup): Likewise.
6316         (frob_opname): Likewise.
6317         (maybe_snarf_defarg): Likewise.
6318         (add_defarg_fn): Likewise.
6319         (do_pending_defargs): Likewise.
6320         (done_pending_defargs): Likewise.
6321         (unprocessed_defarg_fn): Likewise.
6322         (replace_defarg): Likewise.
6323         (end_input): Likewise.
6324         (get_overloaded_fn): Likewise.
6325         * cvt.c (convert_to_reference): Improve error handling.
6326         * decl.c (lookup_name_real): Do not declare it static.
6327         (maybe_push_to_top_level): Set check_access.
6328         (identifier_type_value): Adjust call to lookup_name_real.
6329         (lookup_qualified_name): New method.
6330         (lookup_name_real): Remove special-case parsing code.
6331         (lookup_name-nonclass): Adjust call to lookup_name_real.
6332         (lookup_name_namespace_only): Likewise.
6333         (lookup_name): Likewise.
6334         (check_tag_decl): Return the type declared.
6335         (shadow_tag): Likewise.
6336         (register_dtor_fn): Tweak check_access.
6337         (grokfndecl): Use constructor_name_p.
6338         (get_scope_of_declarator): New function.
6339         (grokdeclarator): Obscure tweaks for slightly different declarator
6340         representations.
6341         (start_method): Return error_mark_node to indicate failure.
6342         (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
6343         * decl2.c (constructor_name_full): Simplify.
6344         (constructor_name): Use it.
6345         (build_expr_from_tree): Adjust for changes to do new parser.
6346         (push_scope): Improve robustness.
6347         (validate_nonmember_using_decl): Process declarations, not names.
6348         (do_class_using_decl): Likewise.
6349         (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
6350         here.
6351         * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
6352         * expr.c (cxx_expand_expr): Handle BASELINKs.
6353         * init.c (member_init_ok_or_else): Issue more errors.
6354         (build_offset_ref): Tweak handling of FUNCTION_DECLs.
6355         * lex.c: Do not include parse.h.
6356         (yypring): Do not declare.
6357         (yylval): Likewise.
6358         (make_reference_declarator): Remove error-generating code.
6359         (rid_to_yy): Remove.
6360         (cxx_init): Do not call init_spew.
6361         (yypring): Remove.
6362         (check_for_missing_semicolon): Remove.
6363         * lex.h (got_scope): Remove.
6364         (got_object): Remove.
6365         * method.c (hack_identifier): Use finish_non_static_data_member.
6366         (implicitly_declare_fn): Adjust use of constructor_name.
6367         * parser.c: New file.
6368         * pt.c (parse.h): Do not include it.
6369         (maybe_get_template_decl_from_template): Do not declare it.
6370         (finish_member_template_decl): Tweak.
6371         (begin_explicit_instantiation): Adjust for
6372         processing_explicit_instantiation being boolean.
6373         (end_explicit_instantiation): Likewise.
6374         (maybe_process_partial_specialization): Tighten specialization
6375         test.
6376         (retrieve_local_specialization): Adjust ue of hash table.
6377         (eq_local_specializations): New function.
6378         (register_local_specialization): Likewise.
6379         (push_template_decl_real): Remove unnecessary test.
6380         (maybe_get_template_decl_from_type_decl): Don't make it static.
6381         (for_each_template_parm_r): Handle TYPEOF_TYPE.
6382         (tsubst_copy): Use retrieive_local_specialization to handle
6383         PARM_DECL.  Adjust handling of CONST_DECLs.  Handle BASELINKs.
6384         Handle COMPONENT_REFs with pseudo-destructor-expressions.
6385         Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
6386         (tsubst_expr): Pass decls, not names, to do_local_using_decl.
6387         (unify): Tweak handling of CONST_DECLs.
6388         (regenerate_decl_from_template): Use push_nested_class.
6389         (template_for_substitution): New funciton.
6390         (instantiate_decl): Use it.  Register parameters as local
6391         specializations.
6392         * rtti.c (init_rtti_processing): Set type_info_ref_type.
6393         (build_typeid): Use it.
6394         (get_typeid): Likeise.
6395         * search.c (accessible_p): Use check_access, not
6396         flag_access_control.
6397         (adjust_result_of_qualified_name_lookup): Pay attention to the
6398         context_class.
6399         * semantics.c (finish_asm_stmt): Adjust error handling.
6400         (finish_label_stmt): Return the statement.
6401         (finish_non_static_data_member): New function.
6402         (finish_class_expr): Handle BASELINKs.
6403         (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
6404         (finish_object_call_expr): Simplify handling during templates.
6405         (finish_pseudo_destructor_call_expr): Rename to ...
6406         (finish_pseudo_dtor_expr): ... this.
6407         (finish_compound_literal): New function.
6408         (begin_inline_definitions): Remove.
6409         (finish_sizeof): Remove special template handling.
6410         * spew.c: Do not include parse.h.
6411         * tree.c (get_overloaded_fn): Remove.
6412         * typeck.c (build_class_member_access_expr): Handle
6413         PSEUDO_DTOR_EXPR.  Adjust handling of static member functions.
6414         (lookup_destructor): New function.
6415         (finish_class_member_access_expr): Use it.
6416         (convert_arguments): Simplify.
6417         (build_unary_op): Handle BASELINKs.
6419 2002-12-26  Nathan Sidwell  <nathan@codesourcery.com>
6421         PR c++/4803
6422         * decl2.c (mark_used): Defer inline functions.
6423         (finish_file): Merge deferred_fns loops. Check all used
6424         inline functions have a definition.
6425         * method.c (make_thunk): Thunks are not inline.
6427         PR c++/5116, c++/764
6428         * call.c (build_new_op): Make sure template class operands are
6429         instantiated.
6431 2002-12-24  Nathan Sidwell  <nathan@codesourcery.com>
6433         PR C++/7964
6434         * cp-tree.h (resolve_scoped_fn_name): Prototype.
6435         * call.c (resolve_scoped_fn_name): New function. Deal with
6436         more template expansion. Broken out of ...
6437         * parse.y (parse_finish_call_expr): ... here. Call it.
6438         * decl2.c (build_expr_from_tree, CALL_EXPR): Use
6439         resolve_scoped_fn_name and build_call_from_tree.
6441         PR c++/9053
6442         * decl.c (duplicate_decls): Templates may be disambiguated by
6443         return type.
6445         PR c++/8702
6446         * decl2.c (check_classfn): Use lookup_fnfield_1. List all
6447         conversion operators on failure.
6449 2002-12-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6451         Remove traditional C constructs 2/n.
6452         * call.c (tourney, build_field_call, equal_functions, joust,
6453         compare_ics, build_over_call, build_java_interface_fn_ref,
6454         convert_like_real, op_error, build_object_call, resolve_args,
6455         build_vfield_ref, check_dtor_name, build_scoped_method_call,
6456         build_addr_func, build_call, build_method_call, null_ptr_cst_p,
6457         sufficient_parms_p, build_conv, non_reference, strip_top_quals,
6458         standard_conversion, reference_related_p,
6459         reference_compatible_p, convert_class_to_reference,
6460         direct_reference_binding, reference_binding,
6461         ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
6462         add_template_conv_candidate, any_viable, any_strictly_viable,
6463         build_this, splice_viable, print_z_candidates,
6464         build_user_type_conversion, build_new_function_call,
6465         conditional_conversion, build_conditional_expr, build_new_op,
6466         build_op_delete_call, enforce_access, call_builtin_trap,
6467         convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
6468         convert_default_arg, type_passed_as, convert_for_arg_passing,
6469         in_charge_arg_for_name, is_properly_derived_from,
6470         maybe_handle_implicit_object, maybe_handle_ref_bind,
6471         source_type, add_warning, can_convert, can_convert_arg,
6472         perform_implicit_conversion, can_convert_arg_bad,
6473         initialize_reference, add_conv_candidate,
6474         add_template_candidate_real, add_template_candidate): Ansify.
6476 2002-12-22  Nathan Sidwell  <nathan@codesourcery.com>
6478         PR c++/8572
6479         * cp-tree.h (grokoptypename): Add SCOPE parameter.
6480         * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
6481         if in a template scope.
6482         * parse.y (unoperator): Return the scope.
6483         (operator_name): Adjust grokoptypename call.
6485 2002-12-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6487         * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
6488         * decl.c (make_unbound_class_template): Adjust.  Check for tf_error.
6489         * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
6491 2002-12-20  Kazu Hirata  <kazu@cs.umass.edu>
6493         * ChangeLog: Fix a typo.
6494         * class.c: Fix comment typos.
6495         * cp-tree.h: Likewise.
6497 2002-12-18  Jason Merrill  <jason@redhat.com>
6499         Handle anonymous unions at the tree level.
6500         C++ ABI change: Mangle anonymous unions using the name of their
6501         first named field (by depth-first search).  Should not cause
6502         binary compatibility problems, though, as the compiler previously
6503         didn't emit anything for affected unions.
6504         * cp-tree.def (ALIAS_DECL): New tree code.
6505         * decl2.c (build_anon_union_vars): Build ALIAS_DECLs.  Return the
6506         first field, not the largest.
6507         (finish_anon_union): Don't mess with RTL.  Do set DECL_ASSEMBLER_NAME,
6508         push the decl, and write it out at namespace scope.
6509         * decl.c (lookup_name_real): See through an ALIAS_DECL.
6510         (pushdecl): Add namespace bindings for ALIAS_DECLs.
6511         * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
6512         of a decl which doesn't have one.
6513         * typeck.c (build_class_member_access_expr): Don't recurse if
6514         we already have the type we want.
6516 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6518         PR c++/8099
6519         * friend.c (make_friend_class): Allow partial specialization
6520         when declaration is not a template friend.
6522 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6524         PR c++/3663
6525         * pt.c (lookup_template_class): Copy TREE_PRIVATE and
6526         TREE_PROTECTED to created decl nodes.
6528 2002-12-18  Mark Mitchell  <mark@codesourcery.com>
6530         * class.c (build_base_field): Do not set DECL_PACKED on the
6531         FIELD_DECL.
6533 2002-12-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6535         * cp-tree.h (struct tree_srcloc): Use location_t.
6536         (SOURCE_LOCUS): New.
6537         (SRCLOC_FILE, SRCLOC_LINE): Adjust.
6539 2002-12-17  Jason Merrill  <jason@redhat.com>
6541         * decl.c (finish_function): Also complain about no return in
6542         templates.
6543         * semantics.c (finish_return_stmt): Also call check_return_expr in
6544         templates.
6545         * typeck.c (check_return_expr): In a template, just remember that we
6546         saw a return.
6548 2002-12-16  Jason Merrill  <jason@redhat.com>
6550         * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
6551         of the CALL_EXPR.
6553         * semantics.c (do_pushlevel): Call pushlevel after adding the
6554         SCOPE_STMT.
6555         (do_poplevel): Call poplevel before adding the SCOPE_STMT.
6556         * parse.y (function_body): Go back to using compstmt.
6557         * decl.c (pushdecl): Skip another level to get to the parms level.
6559         * call.c (build_new_method_call): Use is_dummy_object to determine
6560         whether or not to evaluate the object parameter to a static member
6561         function.
6563 2002-12-14  Jason Merrill  <jason@redhat.com>
6565         * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
6566         return slot for normal functions.  Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
6567         * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
6568         don't bother with an AGGR_INIT_EXPR.
6569         (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
6570         just generate a new decl normally.  Take return slot parm.
6571         * cp-tree.h: Adjust prototype.
6573 2002-12-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6575         PR C++/8031
6576         * cvt.c (convert_to_pointer_force): Don't try comparing against
6577         erronous type.
6579 2002-12-13  Geoffrey Keating  <geoffk@apple.com>
6581         * cp-tree.h: Have the multiple-include guards around
6582         the entire file.
6584 2002-12-10  David Edelsohn  <edelsohn@gnu.org>
6586         * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
6587         for SPEW_DEBUG.
6588         (snarf_method): Same.
6589         (snarf_defarg): Same.
6591 2002-12-10  Mark Mitchell  <mark@codesourcery.com>
6593         PR c++/8372
6594         * pt.c (tsubst_copy): Handle destructor names more correctly.
6596 2002-12-10  Matt Austern   <austern@apple.com>
6598         * cp-tree.h: get rid of needs_virtual_reinit bit.
6600 2002-12-09  Mark Mitchell  <mark@codesourcery.com>
6602         * NEWS: Document removal of in-class initialization extension for
6603         static data members of non-arithmetic, non-enumeration type.
6604         * decl.c (check_static_variable_definition): Do not allow that
6605         extension.
6606         * decl2.c (grokfield): Do not call digest_init when processing
6607         templates.
6609 2002-12-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6611         * error.c (dump_expr): Fix format specifier warning.
6613 2002-12-04  Geoffrey Keating  <geoffk@apple.com>
6615         * class.c (finish_struct_1): Correct comment.
6616         * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
6618 2002-12-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6620         PR C++/8799
6621         * error.c (dump_expr): Don't ever try to dump a non-existent
6622         expression.
6624 2002-12-03  Nathan Sidwell  <nathan@codesourcery.com>
6626         Implement covariant returns.
6627         * cp-tree.h (IS_AGGR_TYPE_2): Remove.
6628         (struct lang_decl_flags): Add this_thunk_p flag.
6629         Rename vcall_offset to virtual_offset.
6630         (struct lang_decl): Rename delta to fixed_offset.
6631         (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
6632         (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
6633         (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
6634         (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
6635         (make_thunk): Add this_adjusting arg.
6636         (finish_thunk): Declare.
6637         (mangle_thunk): Add this_adjusting arg.
6638         * class.c (get_vcall_index): Use base function for lookup.
6639         (update_vtable_entry_for_fn): Generate covariant thunk.
6640         (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
6641         (build_vtbl_initializer): Use base function for lookup.
6642         Finish covariant thunk here. Adjust thunk generation.
6643         * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
6644         Adjust thunk dumping.
6645         * mangle.c (mangle_call_offset): New function.
6646         (mangle_thunk): Adjust for covariant thunks.
6647         * method.c (make_thunk): Adjust. Do not set name here.
6648         (finish_thunk): New function. Set name here.
6649         (use_thunk): Generate covariant thunks too.
6650         (thunk_adjust): New function.
6651         * search.c (covariant_return_p): Remove. Fold into ...
6652         (check_final_overrider): ... here. Simplify.
6653         * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
6655 2002-12-03  Jason Merrill  <jason@redhat.com>
6657         PR c++/8674
6658         * call.c (build_over_call): Check specifically for TARGET_EXPR
6659         when eliding.
6661         PR c++/8461, c++/8625
6662         * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
6663         (cp_convert_parm_for_inlining): Remove.
6664         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
6665         Remove.
6666         * cp-tree.h (ADDR_IS_INVISIREF): Remove.
6667         * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
6669         * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
6670         an ambiguous conversion.
6672 2002-12-03  Mark Mitchell  <mark@codesourcery.com>
6674         PR c++/8688
6675         * decl.c (reshape_init): Handle erroneous initializers.
6677 2002-12-02  Mark Mitchell  <mark@codesourcery.com>
6679         PR c++/8720
6680         * spew.c (remove_last_token): Make sure that last_chunk is set
6681         correctly.
6683         PR c++/8615
6684         * error.c (dump_expr): Handle character constants with
6685         TREE_OVERFLOW set.
6687 2002-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6689         DR 180
6690         * decl.c (grokdeclarator): Require class-key for all friend class.
6691         Output the correct type and context in the error message.
6693 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
6695         PR c++/5919
6696         * pt.c (unify): Use variably_modified_type_p to test validity of
6697         template argument types.
6699         PR c++/8727
6700         * cp-tree.h (lang_type_class): Add typeinfo_var.
6701         (CLASSTYPE_TYPEINFO_VAR): New macro.
6702         * rtti.c (get_tinfo_decl): Use it.
6704         PR c++/8663
6705         * init.c (expand_member_init): Always get the main variant of a
6706         base class.
6708 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
6710         PR c++/8332
6711         PR c++/8493
6712         * decl.c (cxx_init_decl_processing): Use size_type_node, not
6713         c_size_type_node.
6714         * decl2.c (coerce_new_type): Likewise.
6715         * except.c (do_allocate_exception): Likewise.
6717 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
6719         * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
6720         dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
6721         lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
6722         repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
6723         typeck2.c: Include coretypes.h and tm.h.
6724         * Make-lang.in: Update dependencies.
6726 2002-11-30  Mark Mitchell  <mark@codesourcery.com>
6728         PR c++/8227
6729         * decl.c (layout_var_decl): Deal gracefully with erroneous types.
6730         (check_initializer): Validate the type of the initialized
6731         variable, even if the initializer is absent.
6732         * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
6734         PR c++/8214
6735         * typeck.c (convert_for_assignment): Do not use
6736         decl_constant_value on the operand.
6738         PR c++/8511
6739         * pt.c (instantiate_decl): Handle template friends defined outside
6740         of the class correctly.
6742 2002-11-29  Joe Buck <jbuck@synopsys.com>
6744         * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
6745         anonymous structs.
6747 2002-11-29  Mark Mitchell  <mark@codesourcery.com>
6749         * class.c (walk_subobject_offsets): Recur on binfos as well as on
6750         types.
6751         (layout_nonempty_base_or_field): Pass it a binfo when processing a
6752         base class.
6753         (layout_empty_base): Likewise.
6754         (build_base_field): Likewise.
6756 2002-11-27  Mark Mitchell  <mark@codesourcery.com>
6758         * class.c (build_base_field): Make sure we get the canonical base
6759         when descending through primary bases.
6761 2002-11-26  Geoffrey Keating  <geoffk@apple.com>
6763         * decl.c (check_initializer): Don't error on initialisation of
6764         a scalar with a brace-enclosed expression.
6766 2002-11-26  Nathan Sidwell  <nathan@codesourcery.com>
6768         * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
6769         (template_parms_equal): Remove prototype.
6770         * typeck.c (buuld_indirect_ref): Reformat.
6772 2002-11-25  Jason Merrill  <jason@redhat.com>
6774         * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
6775         and a DO_STMT.
6777 2002-11-25  Mark Mitchell  <mark@codesourcery.com>
6779         * tree.c (cp_build_qualified_type_real): Correct handling of
6780         array types.
6781         * class.c (walk_subobject_offsets): Fix thinko.
6782         (build_base_field): Record offsets of empty bases in primary
6783         virtual bases.
6784         (layout_class_type): Record offsets of empty bases in fields.
6786         * search.c (is_subobject_of_p_1): Fix thinko.
6787         (lookup_field_queue_p): Likewise.
6789 2002-11-24  Mark Mitchell  <mark@codesourcery.com>
6791         * class.c (layout_class_type): Reuse tail padding when laying out
6792         virtual bases.
6794 2002-11-22  Mark Mitchell  <mark@codesourcery.com>
6796         * rtti.c (qualifier_flags): Fix thinko.
6798 2002-11-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6800         Remove traditional C constructs 1/n.
6801         * cp-tree.h (init_method, set_mangled_name_for_decl,
6802         build_opfncall, hack_identifier, make_thunk, use_thunk,
6803         synthesize_method, implicitly_declare_fn,
6804         skip_artificial_parms_for, optimize_function, calls_setjmp_p,
6805         maybe_clone_body): Remove use of PARAMS.
6807         * method.c (do_build_assign_ref, do_build_copy_constructor,
6808         synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
6809         Likewise.
6810         (synthesize_method): Use 'bool' type and constants instead of
6811         'int'.
6812         (locate_copy): Likewise.
6813         (implicitly_declare_fn): Likewise.
6815         * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
6816         Remove old-style declaration.
6817         (maybe_clone_body): Use 'bool' type and constants.
6819 2002-11-21  Glen Nakamura  <glen@imodulo.com>
6821         PR c++/8342
6822         * typeck.c (get_member_function_from_ptrfunc): Make sure that a
6823         SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
6824         of the branches of a COND_EXPR.
6826 2002-11-19  Mark Mitchell  <mark@codesourcery.com>
6828         * pt.c (for_each_template_parm): Free allocated memory.
6829         * search.c (is_subobject_of_p_1): New function.
6830         (is_subobject_of_p): Avoid walking virtual bases multiple times.
6832 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
6834         * g++spec.c (lang_specific_spec_functions): New.
6836 2002-11-15  Kazu Hirata  <kazu@cs.umass.edu>
6838         * ChangeLog: Follow spelling conventions.
6839         * class.c: Likewise.
6840         * decl2.c: Likewise.
6842 2002-11-14  Zack Weinberg  <zack@codesourcery.com>
6844         * search.c (dfs_push_decls): Do not try to reorder elements
6845         3..n of method_vec if method_vec has only two elements.
6846         Reverse order of two tests to avoid accessing unallocated
6847         memory.
6849 2002-11-14  Mark Mitchell  <mark@codesourcery.com>
6851         * class.c (dfs_find_final_overrider): Adjust so that the most
6852         derived object is a binfo, rather than a class type.
6853         (find_final_overrider): Likewise.
6854         (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
6855         (add_vcall_offset): Likewise.
6857 2002-11-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6859         PR c++/8389
6860         * pt.c (instantiate_template): Push class scope for member
6861         functions.
6862         (get_mostly_instantiated_function_type): Likewise.  Don't call
6863         tsubst on context.  Remove CONTEXTP and TPARMSP parameters.
6864         * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
6865         * mangle.c (write_encoding, write_unqualified_name): Adjust.
6867 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
6869         * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
6870         vcall offfsets.  Split out ...
6871         (add_vcall_offset): ... new function.
6873         PR c++/8338
6874         * pt.c (for_each_template_parm): Add htab parameter.
6875         (process_partial_specialization): Adjust call.
6876         (push_template_decl_real): Likewise.
6877         (pair_fn_data): Add visited.
6878         (for_each_template_parm_r): Avoid walking duplicates more than
6879         once.
6880         (uses_template_parms): Adjust call to for_each_template_parm.
6882 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
6884         * class.c (add_implicitly_declared_members): Put implicitly
6885         declared functions at the end of TYPE_METHODs when -fabi-version
6886         is at least 2.
6888 2002-11-05  Geoffrey Keating  <geoffk@apple.com>
6890         * decl2.c (finish_file): Correct spelling.
6892 2002-11-03  Mark Mitchell  <mark@codesourcery.com>
6894         * call.c (build_special_member_call): Do not try to lookup VTTs by
6895         name.
6896         * class.c (vtbl_init_data): Add generate_vcall_entries.
6897         (get_vtable_decl): Do not look up virtual tables by name.
6898         (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
6899         (set_primary_base): Do not set CLASSTYPE_RTTI.
6900         (determine_primary_base): Likewise.
6901         (get_matching_virtual): Remove.
6902         (get_vcall_index): New function.
6903         (update_vtable_entry_for_fn): Do not try to use virtual thunks
6904         when they are not required.  Assign vcall indices at this point.
6905         (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
6906         Do update dynamic_classes.
6907         (build_vtt): Do not add VTTs to the symbol table.
6908         (build_ctor_vtbl_group): Likewise.
6909         (build_vtbl_initializer): Simplify handling of vcall indices.
6910         (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
6911         for the most derived class.
6912         (add_vcall_offset_vtbl_entries_1): But do not actually add them to
6913         the vtable.
6914         * cp-tree.h (dynamic_classes): New macro.
6915         (lang_type_class): Remove rtti.  Add vtables.  Add vcall_indices.
6916         (CLASSTYPE_RTTI): Remove.
6917         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
6918         (CLASSTYPE_VCALL_INDICES): New macro.
6919         (CLASSTYPE_VTABLES): Likewise.
6920         (BV_USE_VCALL_INDEX_P): Remove.
6921         (build_vtable_path): Remove.
6922         * decl2.c (finish_vtable_vardecl): Remove.
6923         (key_method): Remove #if 0'd code.
6924         (finish_vtable_vardecl): Rename to ...
6925         (maybe_emit_vtables): ... this.
6926         (finish_file): Use it.
6927         * search.c (look_for_overrides_here): Update comment.
6929 2002-11-01  Zack Weinberg  <zack@codesourcery.com>
6931         PR c/7353 redux
6932         * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
6934 2002-10-30  Jason Merrill  <jason@redhat.com>
6936         PR c++/8186
6937         * cp-tree.h (ADDR_IS_INVISIREF): New macro.
6938         * call.c (convert_for_arg_passing): Set it.
6939         * except.c (stabilize_throw_expr): Recurse for such an arg.
6941 2002-10-31  Mark Mitchell  <mark@codesourcery.com>
6943         * cp-tree.h (lang_decl_flags): Remove init_priority.
6944         (lang_decl): Add delta.
6945         (GLOBAL_INIT_PRIORITY): Remove.
6946         (THUNK_DELTA): Revise definition.
6947         * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
6948         * dump.c (cp_dump_tree): Don't dump it.
6950 2002-10-30  Mark Mitchell  <mark@codesourcery.com>
6952         PR c++/8160
6953         * typeck2.c (process_init_constructor): Call complete_array_type.
6955         PR c++/8149
6956         * decl.c (make_typename_type): Issue errors about invalid results.
6958 2002-10-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6960         Core issue 287, PR c++/7639
6961         * cp-tree.h (lang_type_class): Add decl_list field.
6962         (CLASSTYPE_DECL_LIST): New macro.
6963         (maybe_add_class_template_decl_list): Add declaration.
6964         * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
6965         (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
6966         (maybe_add_class_template_decl_list): New function.
6967         (add_implicitly_declared_members): Use it.
6968         * decl.c (maybe_process_template_type_declaration): Likewise.
6969         (pushtag): Likewise.
6970         * friend.c (add_friend): Likewise.
6971         (make_friend_class): Likewise.
6972         * semantics.c (finish_member_declaration): Likewise.
6973         (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
6974         * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
6975         to process members and friends in the order of declaration.
6977 2002-10-29  Mark Mitchell  <mark@codesourcery.com>
6979         PR c++/8287
6980         * decl.c (finish_destructor_body): Create the label to jump to
6981         when returning from a destructor here.
6982         (finish_function_body): Rather than here.
6984 2002-10-25  Zack Weinberg  <zack@codesourcery.com>
6986         PR c++/7266
6987         * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
6988         SCOPE_REF is not null before dereferencing it.
6990 2002-10-25  Mark Mitchell  <mark@codesourcery.com>
6992         * call.c (build_over_call): Use DECL_CONTEXT, not
6993         DECL_VIRTUAL_CONTEXT.
6994         * class.c (modify_vtable_entry): Don't mess with
6995         DECL_VIRTUAL_CONTEXT.
6996         (set_vindex): Remove.
6997         (set_primary_base): Remove vfuns_p parameter.
6998         (determine_primary_base): Likewise.
6999         (modify_all_vtables): Likewise.
7000         (layout_class_type): Likewise.  Adjust calls to other functions
7001         accordingly.
7002         (finish_struct_1): Adjust calls to modified functions.  Set
7003         DECL_VINDEX here.
7004         * cp-tree.h (lang_type_class): Remove vsize.
7005         (CLASSTYPE_VSIZE): Remove.
7006         (lang_decl): Remove thunks.
7007         (DECL_THUNKS): Adjust.
7008         (DECL_VIRTUAL_CONTEXT): Remove.
7009         (duplicate_decls): Don't copy it.
7010         * pt.c (build_template_decl): Don't set it.
7011         (tsubst_decl): Likewise.
7012         * typeck.c (expand_ptrmemfunc_cst): Don't use it.
7014         * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
7015         (build_vtable_entry): Remove.
7016         * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
7017         (lang_decl): Add thunks.
7018         (DECL_THUNKS): New macro.
7019         * decl.c (duplicate_decls): Copy it.
7020         * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
7021         * semantics.c (emit_associated_thunks): Simplify.
7023 2002-10-24  David Edelsohn  <edelsohn@gnu.org>
7025         PR c++/7228
7026         * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
7027         lang_type structure exists before accessing field.
7028         (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
7029         (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
7030         (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
7031         * class.c (check_field_decls): Use new macros.
7032         * typeck2.c (process_init_constructor): Remove redundant check for
7033         existence of lang_type structure.
7035 2002-10-24  Mark Mitchell  <mark@codesourcery.com>
7037         * class.c (end_of_base): New method.
7038         (end_of_class): Use it.  Check indirect virtual bases.
7040         * class.c (check_field_decls): Fix typo.
7042 2002-10-23  Mark Mitchell  <mark@codesourcery.com>
7044         PR c++/8067
7045         * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
7046         related variables.
7048         PR c++/7679
7049         * spew.c (next_token): Do not return an endless stream of
7050         END_OF_SAVED_INPUT tokens.
7051         (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
7052         the cached token stream.
7053         (snarf_defarg): Likewise.
7055 2002-10-23  Zack Weinberg  <zack@codesourcery.com>
7057         * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
7058         variably_modified_type_p.
7059         * cp-tree.h: Remove prototype of variably_modified_type_p.
7060         * tree.c (variably_modified_type_p): Remove; now implemented
7061         in language-independent code.
7063 2002-10-22  Mark Mitchell  <mark@codesourcery.com>
7065         PR c++/6579
7066         * spew.c (snarf_parenthesized_expression): New function.
7067         (snarf_block): Use it.
7069 2002-10-22  Richard Henderson  <rth@redhat.com>
7071         * method.c (use_thunk): Always compute vcall_value; assert that
7072         it is not zero.  Use can_output_mi_thunk; use output_mi_thunk
7073         for vcall thunks as well.
7075 2002-10-21  Mark Mitchell  <mark@codesourcery.com>
7077         * class.c (empty_base_at_nonzero_offset_p): New function.
7078         (layout_nonempty_base_or_field): Do not check for conflicts when
7079         laying out a virtual base using the GCC 3.2 ABI.
7080         (build_base_field): Correct checking for presence of empty classes
7081         at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
7083         * class.c (include_empty_classes): Use normalize_rli.
7084         (layout_class_type): Likewise.
7086         * decl.c (reshape_init): Tweak handling of character arrays.
7088         PR c++/8218
7089         * cp-tree.h (lang_type_class): Add contains_empty_class_p.
7090         (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
7091         * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
7092         (check_field_decls): Likewise.
7093         (layout_class_type): Likewise.
7094         (finish_struct_1): Initialize it.
7095         (walk_subobject_offsets): Use it to prune searches.
7097 2002-10-20  Mark Mitchell  <mark@codesourcery.com>
7099         * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
7100         * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
7101         TARGET_ASM_OUTPUT_MI_THUNK in comments.
7103 2002-10-18  Zack Weinberg  <zack@codesourcery.com>
7105         * decl.c (start_decl): Point users of the old initialized-
7106         typedef extension at __typeof__.
7108 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
7110         * Make-lang.in (method.o): Depend on TARGET_H.
7111         * method.c (target.h): Include it.
7112         (use_thunk): Use target hooks.  Use vcall thunks, if available.
7114 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
7116         * class.c (base_derived_from): Make sure return value is a bool.
7118 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
7120         * class.c (find_final_overrider_data_s): Remove overriding_fn and
7121         overriding_base.
7122         (dfs_base_derived_from): New function.
7123         (base_derived_from): Likewise.
7124         (dfs_find_final_overrider): Use base_derived_from.
7125         (find_final_overrider): Adjust.
7127 2002-10-18  Jason Merrill  <jason@redhat.com>
7129         PR c++/8080
7130         * semantics.c (finish_for_cond, finish_while_cond): Don't mess
7131         with condition decls in a template.
7133 2002-10-17  Nathan Sidwell  <nathan@codesourcery.com>
7135         * class.c (add_method): Compare template parms too.
7137 2002-10-17  Mark Mitchell  <mark@codesourcery.com>
7139         PR c++/7584
7140         * class.c (handle_using_decl): Allow the declaration used to be
7141         from an ambiguous base.
7143         * pt.c (convert_template_argument): Revert this change:
7144                 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
7145                 * pt.c (convert_template_argument): Do not fold non-type
7146                 template rguments when inside a template.
7148         * init.c (expand_default_init): Handle brace-enclosed initializers
7149         correctly.
7151 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
7153         * mangle.c (write_expression): Correct handling of enumeration
7154         constants.
7155         (write_template_arg): Likewise.
7156         * pt.c (convert_template_argument): Do not fold non-type template
7157         arguments when inside a template.
7159         PR c++/7478
7160         * cvt.c (convert_to_reference): Allow references as the incoming
7161         type.
7163 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
7165         PR c++/7524
7166         * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
7167         build_qualified_type.
7169 2002-10-15  Richard Henderson  <rth@redhat.com>
7171         * error.c (dump_expr): Use real_to_decimal directly, and with
7172         the new arguments.
7174 2002-10-15  Mark Mitchell  <mark@codesourcery.com>
7176         * decl.c (reshape_init): Fix typo.
7178         * cp-tree.h (operator_name_info_t): Add arity.
7179         * lex.c (init_operators): Initialize it.
7180         * mangle.c (write_conversion_operator_name): New function.
7181         (write_unqualified_name): Use it.
7182         (write_template_args): Accept template arguments as a TREE_LIST.
7183         (write_expression): Adjust handling of qualified names to match
7184         specification.
7186 2002-10-15  Jason Merrill  <jason@redhat.com>
7188         * call.c (call_builtin_trap): New fn.
7189         (convert_arg_to_ellipsis): Use it.  Downgrade error to warning.
7190         (build_call): Don't set current_function_returns_abnormally outside
7191         a function.
7193 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
7195         * class.c (check_field_decls): Remove empty_p parameter.  Instead,
7196         clear CLASSTYPE_EMPTY_P.
7197         (build_base_field): Likewise.
7198         (build_base_fields): Likewise.
7199         (check_bases_and_members): Likewise.
7200         (create_vtbl_ptr): Likewise.
7201         (layout_class_type): Likewise.  Ensure that empty classes have
7202         size zero when used as base classes in the 3.2 ABI.
7203         (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
7204         CLASSTYPE_NEARLY_EMPTY_P.  Adjust calls to avoid passing empty_p
7205         parameter.
7206         (is_empty_class): Correct definition when using post-3.2 ABI.
7207         * cp-tree.h (lang_type_class): Add empty_p.
7208         (CLASSTYPE_EMPTY_P): New macro.
7210 2002-10-12  Nathan Sidwell  <nathan@codesourcery.com>
7212         * init.c (build_delete): Do not apply save_expr for arrays.
7213         (build_vec_delete): Likewise.
7215 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
7217         * decl.c (layout_var_decl): Call layout_decl even for variables
7218         whose type is an array with unspecified bounds.
7220         PR c++/7176
7221         * lex.c (do_identifier): Add another option for the parsing
7222         parameter.
7223         * parse.y (do_id): Use it.
7225 2002-10-11  Gabriel Dos Reis  <gdr@integrable-solutions.net>
7227         PRs C++/6803, C++/7721 and C++/7803
7228         * decl.c (grokdeclarator): Gracefully handle template-name as
7229         decl-specifier.
7231 2002-10-11  Jason Molenda  <jmolenda@apple.com>
7233         * init.c (build_field_list): Provide uses_unions_p with a default
7234         value.
7236 2002-10-11  Mark Mitchell  <mark@codesourcery.com>
7238         PR c++/5661
7239         * cp-tree.h (variably_modified_type_p): New function.
7240         (grokdeclarator) Tighten check for variably modified types as
7241         fields.
7242         * pt.c (convert_template_argument): Do not allow variably modified
7243         types as template arguments.
7244         * tree.c (variably_modified_type_p): New function.
7246         * NEWS: Document removal of "new X = ..." extension.
7247         * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
7248         brace-enclosed initializers.
7249         * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
7250         (initialize_local_var): Remove declaration.
7251         (expand_static_init): Likewise.
7252         * decl.c (next_initializable_field): New function.
7253         (reshape_init): Likewise.
7254         (check_initializer): Use them.  Build dynamic initializer for
7255         aggregates here too.
7256         (initialize_local_var): Simplify, and incorporate cleanup
7257         insertion code as well.
7258         (destroy_local_var): Remove.
7259         (cp_finish_decl): Tidy.
7260         (expand_static_init): Fold checks for whether or not a variable
7261         needs initialization into this function.  Simplify.
7262         * decl2.c (do_static_initialization): Simplify.
7263         * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
7264         be done for us automatically.
7265         (expand_default_init): Handle brace-enclosed initializers
7266         correctly.
7267         (expand_aggr_init_1): Remove RTL-generation code.
7268         (build_vec_init): Remove "new X = ..." support.
7269         * parse.y (new_initializer): Likewise.
7270         * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
7271         brace-enclosed initializer.
7272         (create_pseudo_type_info): Likewise.
7273         * typeck2.c (store_init_value): Don't try to handle digest_init
7274         being called more than once.
7275         (digest_init): Tidy handling of brace-enclosed initializers.
7277 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7279         * decl.c (typename_hash): Use htab_hash_pointer.
7281 2002-10-10  Jim Wilson  <wilson@redhat.com>
7283         * decl.c (duplicate_decls): Don't call decl_attributes.
7285 2002-10-09  Zack Weinberg  <zack@codesourcery.com>
7287         PR c/7353
7288         * decl.c (start_decl): Unconditionally issue error for
7289         'typedef foo = bar'.
7290         (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
7291         (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
7293 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7295         * decl2.c (prune_vtable_vardecl): Delete unused function.
7297 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
7299         PR c++/7754
7300         * decl2.c (finish_anon_union): Do not expand anonymous unions when
7301         procesing template functions.
7302         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
7303         type. Call layout_decl.
7304         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
7306 2002-10-07  Richard Henderson  <rth@redhat.com>
7308         * decl2.c, pt.c: Revert c++/7754 fix.
7310 2002-10-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7312         PR c++/7804
7313         * error.c (dump_expr) [REAL_CST]: Output in decimal format.
7315 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
7317         PR c++/7931
7318         * pt.c (for_each_template_parm_r): Handle BASELINKs.
7320         PR c++/7754
7321         * decl2.c (finish_anon_union): Do not expand anonymous unions when
7322         procesing template functions.
7323         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
7324         type. Call layout_decl.
7325         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
7327 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
7329         PR c++/8006
7330         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
7331         template parameters.
7332         (globals): Add entity and need_abi_warning.
7333         (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
7334         CLASSTYPE_TEMPLATE_INFO.
7335         (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
7336         TYPE_TI_TEMPLATE.
7337         (write_prefix): Handle typename types correctly.
7338         (write_template_prefix): Handle template template parameters
7339         correctly.
7340         (start_mangling): Add entity parameter.
7341         (finish_mangling): Warn about names whose mangling will change.
7342         (mangle_decl_string): Adjust.
7343         (mangle_type_string): Likewise.
7344         (mangle_special_for_type): Likewise.
7345         (mangle_ctor_vtbl_for_type): Likewise.
7346         (mangle_thunk): Likewise.
7347         (mangle_guard_variable): Likewise.
7348         (mangle_ref_init_variable): Likewise.
7350 2002-10-02  Mark Mitchell  <mark@codesourcery.com>
7352         PR c++/7188.
7353         * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
7354         * cp-tree.h (emit_base_init): Rename to ....
7355         (emit_mem_initializers): ... this.
7356         (expand_member_init): Change prototype.
7357         * init.c (perform_member_init): Compute explicit, rather than
7358         requiring it as a parameter.
7359         (sort_member_init): Rename to ...
7360         (sort_mem_initializers): ... this.  Process bases and data members
7361         together.
7362         (sort_base_init): Remove.
7363         (emit_base_init): Rename to ...
7364         (emit_mem_initializers): ... this.
7365         (expand_aggr_vbase_init_1): Remove.
7366         (construct_virtual_bases): Rename to ...
7367         (construct_virtual_base): ... this.
7368         (expand_member_init): Rework handling of base initializers.
7369         * method.c (do_build_copy_constructor): Use
7370         finish_mem_initializers.
7371         * parse.y (member_init): Adjust calls to expand_member_init.
7372         * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
7373         (tsubst_initializer_list): Use expand_member_init.
7374         * semantics.c (finish_mem_intiailizers): Simplify.
7376 2002-10-02  Matt Austern  <austern@apple.com>
7377         * decl.c (walk_vtables_r): Fixed typo that caused result to
7378         never get a nonzero value.
7380 2002-10-02  Roger Sayle  <roger@eyesopen.com>
7382         PR optimization/6627
7383         * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
7384         from here, and move it to tree.h.
7385         * decl.c (cxx_init_decl_processing): If storing the vbit
7386         in function pointers, ensure that force_align_functions_log
7387         is atleast one.
7389 2002-10-02  Matt Austern  <austern@apple.com>
7391         * class.c (check_field_decls): Changed warning about const member
7392         variables so that it doesn't get issued for a class aggregate.
7394 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
7396         * decl.c (cp_finish_decl): Make sure array types are laid out,
7397         even if the array bounds are unknown.
7399 2002-10-01  Steve Ellcey  <sje@cup.hp.com>
7401         * class.c (build_vtbl_initializer): Change build_c_cast
7402         to build1.
7404 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
7406         * decl.c (cp_finish_decl): Make sure array types are laid out,
7407         even if the array bounds are unknown.
7409         * decl.c (cp_finish_decl): Correct check for dynamic
7410         initialization of thread-local storage.
7412 2002-09-30  Nathan Sidwell  <nathan@codesourcery.com>
7414         * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
7415         overloaded.
7417 2002-09-30  Steve Ellcey  <sje@cup.hp.com>
7419         * class.c (build_vtbl_initializer): Add cast.
7420         (add_vcall_offset_vtbl_entries_1):
7421         Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
7423 2002-09-30  Mark Mitchell  <mark@codesourcery.com>
7425         * class.c (walk_subobject_offsets): Correct the calculation of
7426         offsets for virtual bases.  Correct the counting of array
7427         elements.
7428         (layout_nonempty_base_or_field): Simplify.  Correct the
7429         calculation of offsets to be propagated through the binfo
7430         hierarchy.
7431         (build_base_field): Avoid creating a FIELD_DECL for empty bases.
7432         Add the FIELD_DECL to TYPE_FIELDS.
7433         (build_base_fields): Adjust accordingly.
7434         (layout_virtual_bases): Use build_base_field.
7435         (end_of_class): Return a tree, not an integer.
7436         (warn_about_ambiguous_direct_bases): Rename to ...
7437         (warn_about_ambiguous_bases): ... this.
7438         (include_empty_classes): New function.
7439         (layout_class_type): Create an alternative version of the type to
7440         be used when as a base class type.  Do not call
7441         finish_record_layout until we are done laying out the class.
7442         * cp-tree.h (lang_type_class): Remove size, size_unit.  Add
7443         as_base.
7444         (CLASSTYPE_SIZE): Reimplement.
7445         (CLASSTYPE_SIZE_UNIT): Likewise.
7446         (CLASSTYPE_ALIGN): Likweise.
7447         (CLASSTYPE_USER_ALIGN): Likewise.
7448         (CLASSTYPE_AS_BASE): New macro.
7449         (DECL_INITIALIZED_P): Likewise.
7450         (extract_init): Remove prototype.
7451         (build_forced_zero_init): Rename to ...
7452         (build_zero_init): ... this.
7453         (force_store_init_value): Remove.
7454         * decl.c (obscure_complex_init): Remove.
7455         (duplicate_decls): Copy DECL_INITIALIZED_P.
7456         (check_initializer): Do not leave junk in DECL_INITIAL.
7457         (cp_finish_decl): Handle zero-initialization of entities with
7458         static storage duration.
7459         * expr.c (extract_init): Remove.
7460         * init.c (build_forced_zero_init): Remove.
7461         (build_zero_init): New function.
7462         (build_default_init): Use it.
7463         (build_field_list): Skip FIELD_DECLs for base subobjects.
7464         (push_base_cleanups): Likewise.
7465         * method.c (do_build_assign_ref): Likewise.
7466         (synthesize_exception_spec): Likewise.
7467         * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
7468         (regenerate_decl_from_template): To not set DECL_INITIAL for a
7469         static data member whose initialization took place in its class.
7470         (instantiate_decl): Do not pass an initializer to cp_finish_decl
7471         in that situation.
7472         * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
7473         (dfs_unuse_fields): Likewise.
7474         * tree.c (pod_type_p): Handle error_mark_node.
7475         (zero_init_p): Likewise.
7476         * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
7477         subobjects.
7478         * typeck2.c (store_init_value): Remove #if 0'd code.
7479         (force_store_init_value): Remove.
7480         (process_init_constructor): Use build_zero_init.
7482 2002-09-29  Nathan Sidwell  <nathan@codesourcery.com>
7484         PR c++/7788
7485         * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
7487 2002-09-29  Kazu Hirata  <kazu@cs.umass.edu>
7489         * cp-tree.h: Fix comment typos.
7490         * decl.c: Likewise.
7491         * pt.c: Likewise.
7493 2002-09-25  Mark Mitchell  <mark@codesourcery.com>
7495         * cp/class.c (contains_empty_class_p): New method.
7496         (walk_subobject_offsets): Correct computation of field offset.
7497         (layout_empty_base): Correct placement of emtpy base classes.
7498         (layout_class_type): Warn about ABI changes.
7500 2002-09-23  Mark Mitchell  <mark@codesourcery.com>
7502         * cp/class.c (layout_virtual_bases): Do not round the size of the
7503         type to a multiple of the alignment before laying out virtual bases.
7504         (layout_class_type): Correct handling of bit-fields that are wider
7505         than their type inside unions.  Round the size of the type to a
7506         even number of bytes when computing the size without virtual
7507         bases.
7508         * cp/cp-tree.h (abi_version_at_least): New macro.
7510 2002-09-21  Kazu Hirata  <kazu@cs.umass.edu>
7512         * ChangeLog: Follow spelling conventions.
7513         * ChangeLog.2: Likewise.
7514         * call.c: Likewise.
7515         * class.c: Likewise.
7516         * cp-tree.h: Likewise.
7517         * cvt.c: Likewise.
7518         * decl.c: Likewise.
7519         * decl2.c: Likewise.
7520         * except.c: Likewise.
7521         * friend.c: Likewise.
7522         * g++spec.c: Likewise.
7523         * init.c: Likewise.
7524         * lex.c: Likewise.
7525         * mangle.c: Likewise.
7526         * method.c: Likewise.
7527         * operators.def: Likewise.
7528         * optimize.c: Likewise.
7529         * pt.c: Likewise.
7530         * rtti.c: Likewise.
7531         * search.c: Likewise.
7532         * semantics.c: Likewise.
7533         * spew.c: Likewise.
7534         * tree.c: Likewise.
7535         * typeck.c: Likewise.
7537 2002-09-18  Devang Patel  <dpatel@apple.com>
7539         * cp/cp-tree.h: New prototype for walk_vtabls().
7540         * cp/decl.c (walk_vtables_r): New function.
7541         (struct cp_binding_level): Add new members, namespaces,
7542         names_size and vtables.
7543         (add_decl_to_level): Add decl in namespaces or vtables
7544         chain, if conditions match.
7545         (walk_vtables): New function.
7546         (walk_namespaces_r): Travers separate namespace chain
7547         for namespace decls.
7548         (wrapup_globals_for_namespace): Use names_size instead
7549         of list_length().
7550         * cp/decl2.c (finish_file): Use walk_vtables() instead of
7551         walk_globals() to walk vtable decls.
7553 2002-09-18  Nathan Sidwell  <nathan@codesourcery.com>
7555         * decl.c (grokdeclarator): Use assert, not internal_error. Don't
7556         ICE with invalid pointers & references.
7558 2002-09-17  Zack Weinberg  <zack@codesourcery.com>
7560         * Make-lang.in: Remove all references to the demangler.
7561         * cxxfilt.c: Moved to binutils.
7563 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
7565         PR c++/7718
7566         * pt.c (tsubst_decl): Remove assert.
7568         Remove DR 295 implementation.
7569         * pt.c (check_cv_quals_for_unify): Disable function & method cases.
7570         * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
7571         about ignoring volatile qualifiers.
7573         * search.c (lookup_member): Correct documentation.
7575 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
7577         * cp-tree.h (union lang_tree_node): Add chain_next option.
7579 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
7581         * parse.y (parse_finish_call_expr): Check lookup_member result.
7583         PR c++/7015
7584         * semantic.c (finish_asm_stmt): Fix operand/output_operands
7585         thinko.
7586         * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
7588 2002-09-15  Nathan Sidwell  <nathan@codesourcery.com>
7590         PR c++/7919
7591         * call.c (build_over_call): Convert this pointer for fns found by
7592         using decls.
7594 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
7596         * ChangeLog: Follow spelling conventions.
7597         * ChangeLog.1: Likewise.
7599 2002-09-14  Nathan Sidwell  <nathan@codesourcery.com>
7601         PR c++/7768
7602         * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
7604 2002-09-14  Kazu Hirata  <kazu@cs.umass.edu>
7606         * error.c: Fix comment formatting.
7607         * except.c: Likewise.
7608         * expr.c: Likewise.
7609         * friend.c: Likewise.
7610         * g++spec.c: Likewise.
7611         * init.c: Likewise.
7612         * lex.c: Likewise.
7613         * mangle.c: Likewise.
7614         * method.c: Likewise.
7615         * optimize.c: Likewise.
7616         * pt.c: Likewise.
7617         * rtti.c: Likewise.
7618         * search.c: Likewise.
7619         * semantics.c: Likewise.
7620         * spew.c: Likewise.
7621         * tree.c: Likewise.
7622         * typeck.c: Likewise.
7623         * typeck2.c: Likewise.
7625 2002-09-13  Matt Austern  <austern@apple.com>
7627         PR C++/7828
7628         * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
7629         * cp/call.c: Change call-by-const-reference mechanism to use
7630         non_cast_lvalue_p when deciding whether the create a temporary.
7631         We need a temporary when passing, e.g. (long) x by const ref.
7633 2002-09-13  Nathan Sidwell  <nathan@codesourcery.com>
7635         * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
7637 2002-09-13  Kazu Hirata  <kazu@cs.umass.edu>
7639         * decl.c: Fix comment formatting.
7640         * decl2.c: Likewise.
7642 2002-09-12  Kazu Hirata  <kazu@cs.umass.edu>
7644         * call.c: Fix comment formatting.
7645         * class.c: Likewise.
7646         * cp-lang.c: Likewise.
7647         * cp-tree.h: Likewise.
7648         * cvt.c: Likewise.
7650 2002-09-11  Zack Weinberg  <zack@codesourcery.com>
7652         * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
7653         and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
7654         * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
7655         minor adjustments (use version_string, eliminate yet another
7656         duplicate of xmalloc)
7658 2002-09-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7660         * cp-tree.h (require_complete_eh_spec_types): Add prototype.
7662 2002-09-05  Jason Merrill  <jason@redhat.com>
7664         * typeck2.c (add_exception_specifier): Only pedwarn for an
7665         incomplete type.
7666         (require_complete_eh_spec_types): New fn.
7667         (cxx_incomplete_type_diagnostic): Also support pedwarning.
7668         * typeck.c (complete_type_or_diagnostic): Likewise.
7669         * call.c (build_call): Call require_complete_eh_spec_types.
7670         * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
7671         on an incomplete type.
7673 2002-09-04  Jakub Jelinek  <jakub@redhat.com>
7675         * decl.c (start_cleanup_fn): Clear interface_only before
7676         start_function, restore it afterwards.
7678 2002-09-02  Nathan Sidwell  <nathan@codesourcery.com>
7680         * cp-tree.h (finish_builtin_type): Remove.
7681         * decl2.c (finish_builtin_type): Move to common code.
7682         * decl.c (build_ptrmemfunc_type): Adjust.
7683         * rtti.c (create_pseudo_type_info): Adjust.
7684         (create_tinfo_types): Adjust.
7686 2002-08-31  Jason Merrill  <jason@redhat.com>
7688         * cp-lang.c (cp_expr_size): Allow initialization from a
7689         CONSTRUCTOR.
7691 2002-08-30  Richard Henderson  <rth@redhat.com>
7693         PR opt/7515
7694         * tree.c: Include target.h.
7695         (cp_cannot_inline_tree_fn): Don't auto-inline functions that
7696         don't bind locally.
7697         * Makefile.in (tree.o): Update.
7699 2002-08-27  Mark Mitchell  <mark@codesourcery.com>
7701         * class.c (layout_virtual_bases): Warn about bugs in G++ that
7702         result in incorrect object layouts.
7703         (layout_class_type): Likewise.
7705 2002-08-24  Matt Austern  <austern@apple.com>
7707         * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
7708         are allowable.
7709         (real_lvalue_p): Update caller.
7710         (lvalue_p): Ditto.
7711         (non_cast_lvalue_or_else): New.
7712         * tree.h: Declare it.
7713         * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
7715 2002-08-22  Mark Mitchell  <mark@codesourcery.com>
7717         * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
7718         and COND_EXPR specially; fix error message output.
7720 2002-08-22  Jason Merrill  <jason@redhat.com>
7722         * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
7723         * semantics.c (nullify_returns_r): Likewise.
7725 2002-08-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
7727         Fix PR/7621
7728         * typeck.c (finish_class_member_access_expr): Diagnose cases where
7729         name lookup finds nothing.
7731 2002-08-15  Jason Merrill  <jason@redhat.com>
7733         * semantics.c (finish_then_clause): Remove redundant assignment.
7734         (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
7735         extra binding level outside the if/switch statement.
7736         (finish_while_cond, finish_for_cond): Rewrite complex condition
7737         into the loop body.
7739 2002-08-15  Alexandre Oliva  <aoliva@redhat.com>
7741         * parse.y (sizeof, alignof, typeof): New non-terminals to
7742         increment skip_evaluation.  Replace terminals with them and
7743         decrement skip_evaluation at the end of rules using them.
7744         * decl2.c (mark_used): Don't assemble_external if
7745         skipping evaluation.
7747 2002-08-15  Gabriel Dos Reis  <gdr@nerim.net>
7749         Fix PR/7504
7750         * parse.y (parse_finish_call_expr): Handle incomplete
7751         type used to name a scope.
7753 2002-08-15  Nathan Sidwell  <nathan@codesourcery.com>
7755         PR c++/7598
7756         * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
7757         regression caused by my 2002-08-08 patch.
7759 2002-08-13  Mark Mitchell  <mark@codesourcery.com>
7761         * decl.c (pushdecl_class_level): Honor requests to bind names to
7762         OVERLOADs.
7764 2002-08-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7766         * decl2.c (build_call_from_tree): Fix uninitialized variable.
7767         * parse.y (parse_finish_call_expr): Likewise.
7768         * repo.c (old_args, old_dir, old_main): Const-ify.
7770 2002-08-11  Gabriel Dos Reis  <gdr@nerim.net>
7772         * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE
7773         DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
7774         * optimize.c (maybe_clone_body): Likewise.
7775         * pt.c (tsubst_enum): Likewise.
7776         (lookup_template_class): Likewise.
7777         * tree.c (cp_copy_res_decl_for_inlining): Likewise.
7779 2002-08-10  Neil Booth  <neil@daikokuya.co.uk>
7781         * lang-specs.h: Remove -ansi.
7783 2002-08-10  Nathan Sidwell  <nathan@codesourcery.com>
7785         * tree.c (maybe_dummy_object): Replace // with /* */
7787 2002-08-09  Mark Mitchell  <mark@codesourcery.com>
7789         * call.c (standard_conversion): Use build_ptrmem_type.
7790         * cp-tree.h (build_ptrmem_type): New function.
7791         (adjust_result_of_qualified_name_lookup): Likewise.
7792         * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
7793         static data members.
7794         (build_ptrmem_type): New function.
7795         (grokdeclarator): Do not use build_offset_type when encountering a
7796         qualified name.
7797         * parse.y (parse_finish_call_expr): Use
7798         adjust_result_of_qualified_name_lookup.
7799         * search.c (adjust_result_of_qualified_name_lookup): New function.
7800         * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
7801         accessing OFFSET_TYPEs directly.
7803 2002-08-08  Mike Stump  <mrs@apple.com>
7805         * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
7806         (type_decays_to): Likewise.
7807         * class.c (find_final_overrider): Likewise.
7808         (maybe_note_name_used_in_class): Likewise.
7809         * decl.c (current_tmpl_spec_kind): Likewise.
7810         (add_binding): Likewise.
7811         (push_class_binding): Likewise.
7812         (duplicate_decls): Likewise.
7813         (layout_var_decl): Likewise.
7814         (grokfndecl): Likewise.
7815         (grokdeclarator): Likewise.
7816         (check_default_argument): Likewise.
7817         * decl2.c (handle_class_head): Likewise.
7818         * error.c (dump_template_decl): Likewise.
7819         * init.c (build_offset_ref): Likewise.
7820         * pt.c (check_specialization_scope): Likewise.
7821         (determine_specialization): Likewise.
7822         (check_explicit_specialization): Likewise.
7823         (maybe_check_template_type): Likewise.
7824         (process_partial_specialization): Likewise.
7825         (check_default_tmpl_args): Likewise.
7826         (push_template_decl_real): Likewise.
7827         (convert_template_argument): Likewise.
7828         (try_class_unification): Likewise.
7829         (get_bindings_real): Likewise.
7830         (do_decl_instantiation): Likewise.
7831         * semantics.c (begin_function_definition): Likewise.
7832         (finish_member_declaration): Likewise.
7833         (check_multiple_declarators): Likewise.
7834         * typeck.c (comp_array_types): Likewise.
7835         (comptypes): Likewise.
7836         (expr_sizeof): Likewise.
7837         (build_binary_op): Likewise.
7838         (dubious_conversion_warnings): Likewise.
7839         (check_return_expr): Likewise.
7841 2002-08-08  Mark Mitchell  <mark@codesourcery.com>
7843         * typeck.c (build_class_member_access_expr): Do not return
7844         error_mark_node when no error has occurred.
7846 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
7848         * typeck.c (build_component_addr): Remove.
7849         (build_unary_op): Just check it's not a bitfield, and then build
7850         an ADDR_EXPR.
7852 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
7854         * class.c (convert_to_base): Correct check for error_mark_node.
7855         (create_vtable_ptr): Remove unused VFUNS_P parm.
7857 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
7859         * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
7861 2002-08-07  Mark Mitchell  <mark@codesourcery.com>
7863         Rework build_component_ref.
7864         * call.c (build_vfield_ref): Do not go through build_component_ref.
7865         (build_field_call): Use build_class_member_access_expr.
7866         (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
7867         (build_object_call): Likewise.
7868         * class.c (convert_to_base): New function.
7869         (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
7870         (instantiate_type): Handle BASELINKs.
7871         * cp-tree.def (BASELINK): New tree code.
7872         * cp-tree.h (BASELINK_P): Reimplement.
7873         (SET_BASELINK_P): Remove.
7874         (BASELINK_BINFO): Reimplement.
7875         (BASELINK_FUNCTIONS): Likewise.
7876         (BASELINK_ACCESS_BINFO): Likewise.
7877         (BASELINK_OPTYPE): Likewise.
7878         (convert_to_base): New function.
7879         (name_p): Likewise.
7880         (build_object_ref): Remove.
7881         (build_component_ref_1): Likewise.
7882         (build_component_ref): Likewise.
7883         (build_x_component_ref): Likewise.
7884         (build_class_member_access_expr): New function.
7885         (finish_class_member_access_expr): Likewise.
7886         (build_ptrmemfunc_access_expr): Likewise.
7887         * decl.c (grokdeclarator): Handle BASELINKs.
7888         * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
7889         finish_class_member_access_expr.
7890         (arg_assoc): Handle BASELINKs.
7891         (do_class_using_decl): Likewise.
7892         * error.c (dump_decl): Likewise.
7893         (dump_expr): Use build_ptrmemfunc_access_expr.
7894         * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
7895         destructors.
7896         (build_throw): Use BASELINK_FUNCTIONS.
7897         * init.c (perform_member_init): Use
7898         build_class_member_access_expr.
7899         (build_offset_ref): Handle BASELINKs.  Use
7900         build_class_member_access_expr.
7901         * method.c (hack_identifier): Likewise.
7902         * parse.y (do_id): Use BASELINK, not TREE_LIST.
7903         (primary): Remove uses of build_object_ref.
7904         * pt.c (lookup_template_function): Handle BASELINKs.
7905         (resolve_overloaded_unification): Likewise.
7906         * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
7907         (lookup_field): Use BASELINK, not TREE_LIST.
7908         (lookup_fnfiels): Likewise.
7909         (setup_class_bindings): Likewise.
7910         * semantics.c (finish_object_call_expr): Do not use
7911         build_method_call when we already know what function is being
7912         called.
7913         * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
7914         * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
7915         TREE_CHAIN.
7916         (name_p): New function.
7917         * typeck.c (build_object_ref): Remove.
7918         (build_component_ref_1): Likewise.
7919         (build_x_component_ref): Likewise.
7920         (build_class_member_access_expr): New function.
7921         (finish_class_member_access_expr): Likewise.
7922         (build_ptrmemfunc_access_expr): Likewise.
7923         (get_member_function_from_ptrfunc): Use
7924         build_ptrmemfunc_access_expr.
7925         (build_binary_op): Likewise.
7926         (build_unary_op): Likewise.
7927         (build_ptrmemfunc): Likewise.
7928         (pfn_from_ptrmemfunc): Likewise.
7929         * typeck2.c (build_m_component_ref): Adjust comment.
7931 2002-08-07  Neil Booth  <neil@daikokuya.co.uk>
7933         * Make-lang.in (CXX_C_OBJS): Update.
7934         * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
7935         * cp-tree.h (cxx_decode_option): Remove.
7936         * decl2.c (compare_options, lang_f_options, unsupported_options,
7937         cxx_decode_option): Remove.
7939 2002-08-06  Gabriel Dos Reis  <gdr@nerim.net>
7941         * typeck.c (build_x_unary_op): Handle pointer-to-member.
7943 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
7945         * class.c: Don't include obstack.h.
7946         (popclass):
7947         * decl2.c: Delete bogus comment.
7948         * error.c: Don't include obstack.h.
7949         * except.c: Likewise.
7950         (dump_type): Correct comment.
7951         * method.c: Don't include obstack.h.
7952         * tree.c: Likewise.
7954 2002-08-04  Gabriel Dos Reis  <gdr@nerim.net>
7956         Fix PR/2213
7957         * cvt.c (cp_convert_to_pointer): Reject conversions from integral
7958         expressions to pointer-to-data-member of pointer-to-member-functions.
7960 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
7962         * cvt.c (ocp_convert): Delete obsolete code.
7963         * parse.y (permanent_obstack): Delete declaration.
7964         * pt.c (permanent_obstack): Delete declaration.
7965         * repo.c (permanent_obstack): Delete declaration.
7966         (open_repo_file): Use xmalloc instead of permanent_obstack.
7967         (init_repo): Use xstrdup instead of permanent_obstack.
7969 2002-08-04  Nathan Sidwell  <nathan@codesourcery.com>
7971         * cp-tree.h (VF_DERIVED_VALUE): Remove.
7972         * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
7974 2002-08-03  Nathan Sidwell  <nathan@codesourcery.com>
7976         PR 7470.
7977         C++ ABI change - vfunc ordering.
7978         * class.c (add_virtual_function): Remove.
7979         (dfs_modify_all_vtables): Take list of all declared
7980         virtuals. Assign all that are not in primary base.
7981         (check_for_override): Adjust comments.
7982         (create_vtable_ptr): Take single list of virtuals. Build chain
7983         of declared virtuals here.
7984         (layout_class_type): Take single list of virtuals. Adjust.
7985         (finish_struct_1): Keep virtuals on single list. Adjust.
7987 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
7989         * init.c (build_member_call): Use build_new_method_call, not
7990         build_method_call.
7992 2002-08-02  Krister Walfridsson  <cato@df.lth.se>
7994         * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
7996 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
7998         * call.c (build_method_call): Issue a more helpful error message
7999         about ambiguous method names.
8001 2002-08-02  Nathan Sidwell  <nathan@codesourcery.com>
8003         * tree.c (build_shared_int_cst): Make cache file scope, and
8004         GTY it.
8006 2002-08-02  Jason Merrill  <jason@redhat.com>
8008         * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
8009         (cp_expr_size): New fn.
8010         * call.c (build_over_call): Lose empty class hackery.
8011         (convert_arg_to_ellipsis): Promote non-POD warning to error.
8012         * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
8014         * semantics.c (expand_body): Do tree optimization in the function
8015         context, too.
8017 2002-08-01  Neil Booth  <neil@daikokuya.co.uk>
8019         * cp-tree.h: Move all warning and flag declarations to c-common.h.
8020         * decl.c: Move all warning and flag variables to c-common.c.
8021         * decl2.c: Move all warning and flag variables to c-common.c.
8022         * lex.c (flag_digraphs): Remove.
8023         (warn_traditional): Now in c-common.c.
8025 2002-07-31  Mark Mitchell  <mark@codesourcery.com>
8027         * call.c (build_field_call): Do not look up the field by name.
8028         (build_method_call): Simplify.
8029         (struct z_candidate): Add access_path and conversion_path.  Remove
8030         basetype_path.
8031         (convert_class_to_reference): Adjust use of
8032         add_function_candidate.
8033         (add_candidate): Add conversion_path argument.
8034         (add_function_candidate): Use it.
8035         (add_conv_dndidate): Likewise.
8036         (build_builtin_candidate): Likewise.
8037         (add_template_candidate_real): Add conversion_path argument.
8038         (add_template_conv_candidate): Likewise.
8039         (add_template_candidate): Likewise.
8040         (build_user_type_conversion_1): Use it.
8041         (build_new_function_call): Remove name lookup code.  Adjust use of
8042         add_template_candidate and add_function_candidate.
8043         (build_new_op): Likewise.
8044         (convert_like_real): Use build_special_member_call.
8045         (build_over_call): Use cand->conversion_path.
8046         (build_special_member_call): New method.
8047         (build_new_method_call): Remove name lookup code.
8048         * cp-tree.def (OFFSET_REF): Update documentation.
8049         (TEMPLATE_ID_EXPR): Likewise.
8050         * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
8051         (BASELINK_OPTYPE): Likewise.
8052         (build_new_method_call): Adjust prototype.
8053         (build_special_member_call): New method.
8054         (build_baselink): New method.
8055         (build_offset_ref_call_from_tree): Likewise.
8056         (build_call_from_tree): Likewise.
8057         (finish_qualified_call_expr): Remove.
8058         (finish_call_expr): Adjust prototype.
8059         (build_x_function_call): Remove.
8060         * cvt.c (ocp_convert): Use build_special_member_call.
8061         * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
8062         (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
8063         CALL_EXPR.
8064         (build_offset_ref_call_from_tree): New function.
8065         (build_call_from_tree): Likewise.
8066         * init.c (expand_cleanup): Use build_special_member_call.
8067         (expand_default_init): Likewise.
8068         (build_member_call): Use finish_call_expr.
8069         (build_new_1): Use build_special_member_call.
8070         (push_base_cleanups): Likewise.
8071         * method.c (do_build_assign_ref): Likewise.
8072         * parse.y (template_id): Do not pass a COMPONENT_REF to
8073         lookup_template_function.
8074         (primary): Use parse_finish_call_epxr, not finish_call_expr.
8075         (parse_finish_call_expr): New function.
8076         * pt.c (lookup_template_function): Add assertions.
8077         * search.c (lookup_base): Allow T to be a binfo.
8078         (build_baselink): New function.
8079         (lookup_member): Use it.
8080         * semantics.c (finish_call_expr): Do not do name lookup.
8081         (finish_object_call_expr): Remove #if 0'd code.
8082         (finish_qualified_call_expr): Remove.
8083         * typeck.c (build_x_function_call): Remove.
8084         (build_static_case): Use build_special_member_call.
8085         * typeck2.c (build_functional_cast): Likewise.
8087 2002-07-30  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
8089         * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
8091 2002-07-30  Gabriel Dos Reis  <gdr@nerim.net>
8093         * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
8095 2002-07-30  Nathan Sidwell  <nathan@codesourcery.com>
8097         * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
8098         documentation.
8100 2002-07-29  Alan Modra  <amodra@bigpond.net.au>
8102         * cp-tree.h: Comment typo fix.
8104 2002-07-29  Richard Earnshaw  <rearnsha@arm.com>
8106         * spew.c (space_for_token): Allocate zeroed memory for a new token
8107         chunk.
8109 2002-07-27  Roger Sayle  <roger@eyesopen.com>
8111         * decl.c (builtin_function_1): No need to explicitly mark
8112         BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
8114 2002-07-27  Roger Sayle  <roger@eyesopen.com>
8116         * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
8118 2002-07-26  Jason Merrill  <jason@redhat.com>
8120         * call.c (build_over_call): Likewise.
8121         (cp_convert_parm_for_inlining): New fn.
8122         (convert_for_arg_passing): New fn.
8123         (convert_default_arg, build_over_call): Use it.
8124         (type_passed_as): New fn.
8125         * pt.c (tsubst_decl): Use it.
8126         * decl2.c (cp_build_parm_decl): New fn.
8127         (build_artificial_parm): Use it.
8128         (start_static_storage_duration_function): Likewise.
8129         * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
8130         (grokparms): Don't mess with DECL_ARG_TYPE.
8131         * typeck.c (convert_arguments): Use convert_for_arg_passing.
8132         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
8133         Define.
8134         * cp-tree.h: Declare new fns.
8136 2002-07-26  Neil Booth  <neil@daikokuya.co.uk>
8138         * cp-tree.h (flag_operator_names): Remove.
8139         * decl2.c (flag_operator_names): Remove.
8140         (lang_f_options): Remove operator-names.
8141         * lex.c (D_OPNAME): Remove.
8142         (reswords): Remove operator names.
8143         (rid_to_yy): Remove operator names.
8144         (init_reswords): No need to handle D_OPNAME.
8145         * spew.c (read_process_identifier): There are no operator
8146         names.
8148 2002-07-26  Jason Merrill  <jason@redhat.com>
8150         * dump.c (cp_dump_tree): Call c_dump_tree.
8151         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
8153 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
8155         * error.c (print_whitespace): Remove.
8156         * g++spec.c (LIBUNWIND): Move.
8157         * mangle.c (mangled_position, write_signed_number): Remove.
8159 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
8161         * decl2.c (cxx_decode_option): Similarly.
8163 2002-07-25  Gabriel Dos Reis  <gdr@nerim.net>
8165         * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
8166         (cxx_sizeof_or_alignof_type): Take a third argument.
8167         (cxx_sizeof): Adjust definition.
8168         (cxx_alignof): Likewise.
8169         * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
8170         * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
8171         complaining.
8172         (c_sizeof_nowarn): Remove definition.
8173         (build_unary_op): Use cxx_sizeof_nowarn.
8175 2002-07-24  Geoffrey Keating  <geoffk@redhat.com>
8177         * tree.c (cp_build_qualified_type_real): When copying
8178         pointer-to-method types, unshare the record that holds
8179         the cached pointer-to-member-function type.
8181 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
8183         * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
8185 2002-07-23  Gabriel Dos Reis  <gdr@nerim.net>
8187         Fix PR/7363:
8188         * typeck.c (cxx_sizeof_or_alignof_type): New function.
8189         (c_sizeof): Remove definition.
8190         (expr_sizeof): Use cxx_sizeof.
8191         * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
8192         * decl.c (finish_destructor_body): Use cxx_sizeof.
8193         * semantics.c (finish_alignof): Likewise.
8194         (finish_alignof): Use cxx_alignof.
8195         * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
8196         (cxx_sizeof_or_alignof_type): Declare.
8197         (my_friendly_assert): Move to ../c-common.h.
8199 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
8201         * class.c, method.c, pt.c, search.c: Don't define obstack macros.
8203 2002-07-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8205         PR c++/7347, c++/7348
8206         * cp-tree.h (tsubst_flags_t): Add tf_parsing.
8207         * decl.c (make_typename_type): Use it.
8208         (make_unbound_class_template): Likewise.
8209         (lookup_name_real): Don't call type_access_control if scope is
8210         template parameter dependent.
8211         * parse.y (template_arg): Call make_unbound_class_template with
8212         tf_parsing set.
8213         (nest_name_specifier): Call make_typename_type with tf_parsing set.
8214         (typename_sub0): Likewise.
8215         (typename_sub1): Likewise.
8216         (instantiate_decl): Push class scope.
8217         * pt.c (regenerate_decl_from_template): Call pushclass and popclass
8218         for both static variable and member function template.
8219         (instantiate_decl) Call pushclass and popclass when tsubst'ing type
8220         and arguments.
8221         * search.c (type_access_control): Do type access for TEMPLATE_DECL
8222         too.
8224 2002-07-20  Roger Sayle  <roger@eyesopen.com>
8226         * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
8227         test by using positive_option.  Make whitespace consistent.
8229 2002-07-20  Gabriel Dos Reis  <gdr@nerim.net>
8231         * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
8232         members with 'locus'.  Adjust use throughout.
8233         (struct feed):  Likewise.
8234         (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
8235         Adjust use.
8236         (snarf_defarg): Use error(), not error_with_file_and_line().
8238 2002-07-19  Chris Demetriou  <cgd@broadcom.com>
8240         * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
8241         cpp_options is included.
8243 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8245         PR c++/2862, c++/2863
8246         * pt.c (determine_specialization): Compare the length of
8247         TYPE_ARG_TYPES.  Tidy.
8249 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8251         PR c++/3797
8252         * decl.c (duplicate_decls): Don't propagate inlining parameters from
8253         olddecl to newdecl when newdecl is a specialization of the
8254         instantiation olddecl.
8256 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8258         PR c++/4802, c++/5387
8259         * decl.c (make_typename_type): Use enforce_access.
8261 2002-07-17  Scott Snyder <snyder@fnal.gov>
8263         PR c++/7320
8264         * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
8266 2002-07-12  Mark Mitchell  <mark@codesourcery.com>
8268         * class.c (add_method): Correct handling of conversion operators.
8270 2002-07-11  Mark Mitchell  <mark@codesourcery.com>
8272         PR c++/7224
8273         * class.c (add_method): Simplify.
8275 2002-07-11  Jason Merrill  <jason@redhat.com>
8277         PR c++/7279
8278         * tree.c (cp_copy_res_decl_for_inlining): Also copy
8279         TREE_ADDRESSABLE.
8281 2002-07-10  Graham Stott  <graham.stott@btinternet.com>
8283         * pt.c (template_parm_this_level_p, push_template_decl_real):
8284         Pass depth as int pointer.
8286 2002-07-11  Tim Josling  <tej@melbpc.org.au>
8288         Remove front end hard coding from gengtype.c.
8290         * config-lang.in (gtfiles): Add files needed for this front end.
8292 2002-07-10  Mark Mitchell  <mark@codesourcery.com>
8294         * cp-tree.h (unqualified_name_lookup_error): Declare it.
8295         (begin_function_definition): Adjust prototype.
8296         * lex.c (unqualified_name_lookup_error): New function, split out
8297         from ...
8298         (do_identifier): ... here.
8299         * parse.y (parse_begin_function_definition): New function.
8300         (fn.def1): Use it.
8301         * semantics.c (begin_function_definition): Accept decl-specifiers
8302         and attributes as separate parameters.
8304 2002-07-10  Jason Merrill  <jason@redhat.com>
8306         PR c++/6255
8307         * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
8308         modifying the old one.
8310 2002-07-09  Mark Mitchell  <mark@codesourcery.com>
8312         * cp-tree.h (constructor_name_p): Declare it.
8313         (check_template_template_default_arg): Likewise.
8314         * class.c (handle_using_decl): Use constructor_name_p.
8315         * decl.c (grokdeclarator): Likewise.
8316         * decl2.c (constructor_name_p): Define it.
8317         * init.c (build_member_call): Use constructor_name_p.
8318         * parse.y (template_parm): Use check_template_template_default_arg.
8319         * pt.c (check_explicit_specialization): Use constructor_name_p.
8320         * semantics.c (check_template_template_default_arg): New function.
8322 2002-07-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8324         * pt.c (can_complete_type_without_circularity): Add static to
8325         function definition.
8327 2002-07-08  Mark Mitchell  <mark@codesourcery.com>
8329         * cp-tree.h (have_extern_spec): Declare it
8330         * decl.c (have_extern_spec): Define it.
8331         (start_decl): Eliminate use of used_extern_spec.
8332         (start_function): Likewise.
8333         * parse.y (have_extern_spec): Remove declaration.
8334         (used_extern_spec): Likewise.
8335         (frob_specs): Eliminate use of used_extern_spec.
8336         (.hush_warning): Likewise.
8338 2002-07-07  Mark Mitchell  <mark@codesourcery.com>
8340         * Make-lang.in (cp/parse.o): Depend on decl.h.
8341         * cp-tree.h (do_decl_instantiation): Change prototype.
8342         * parse.y: Include decl.h.
8343         (parse_decl_instantiation): New function.
8344         (explicit_instantiation): Use it.
8345         * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
8346         and DECLSPECS.
8348 2002-07-07  Roger Sayle  <roger@eyesopen.com>
8350         * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
8351         constructor and destructor tests when passed a TEMPLATE_DECL.
8353 2002-07-05  Jason Merrill  <jason@redhat.com>
8355         * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
8356         pointers.
8358         PR optimization/7145
8359         * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
8361 2002-07-05  Nathan Sidwell  <nathan@codesourcery.com>
8363         Repair damage on weak-impared targets caused by my previous patch.
8364         * cp-tree.h (import_export_tinfo): Add parameter.
8365         * decl2.c (import_export_tinfo): Add parameter, post adjust
8366         DECL_COMDAT.
8367         * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
8368         import_export_tinfo.
8370 2002-07-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8372         PR c++/6944
8373         * init.c (build_aggr_init): Remove qualifiers of init before calling
8374         build_vec_init.
8375         (build_vec_init): Flatten multi-dimensional array during cleanup.
8376         (build_vec_delete_1): Abort if the type of each element is array.
8378 2002-07-03  Graham Stott  <graham.stott@btinternet.com>
8380         * pt.c (instantiate_class_template): Fix typo.
8382 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8384         * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
8385         by CVS conflict in my last patch.
8387 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8389         PR c++/6716
8390         * pt.c (can_complete_type_without_circularity): New function.
8391         (instantiate_class_template): Use it.
8392         * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
8393         message due to incomplete fields.
8395 2002-07-01  Mark Mitchell  <mark@codesourcery.com>
8397         PR c++/7112
8398         * mangle.c (write_expression): Add mangling for sizeof when
8399         applied to a type.
8400         * operators.def: Remove stale comment.
8402 2002-06-30  Nathan Sidwell  <nathan@codesourcery.com>
8404         * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
8405         (CPTI_TYPE_INFO_PTR_TYPE): ... this.
8406         (tinfo_decl_type): Replace with ...
8407         (type_info_ptr_type): ... this.
8408         (import_export_tinfo): Declare.
8409         (tinfo_decl_p): Rename to ...
8410         (unemitted_tinfo_decl_p): ... this.
8411         * decl2.c (import_export_decl): Break out tinfo handling into ...
8412         (import_export_tinfo): ... here. New function.
8413         (finish_file): Adjust.
8414         * rtti.c (TINFO_REAL_NAME): New macro.
8415         (init_rtti_processing): Create the tinfo types.
8416         (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
8417         (get_tinfo_decl): Adjust.
8418         (get_tinfo_ptr): New function.
8419         (get_type_id): Use it.
8420         (tinfo_base_init): Create vtable decl here, if it doesn't exist.
8421         (ptr_initializer): Use get_tinfo_ptr.
8422         (ptm_initializer): Likewise.
8423         (synthesize_tinfo_var): Break into ...
8424         (get_pseudo_ti_init): ... this. Just create the initializer.
8425         (get_pseudo_ti_desc): .. and this.
8426         (create_real_tinfo_var): Remove.
8427         (create_pseudo_type_info): Don't create the vtable decl here.
8428         (get_vmi_pseudo_type_info): Remove.
8429         (create_tinfo_types): Adjust.
8430         (tinfo_decl_p): Rename to ...
8431         (unemitted_tinfo_decl_p): ... here. Adjust.
8432         (emit_tinfo_decl): Adjust. Create the initializer.
8434 2002-06-27  Mark Mitchell  <mark@codesourcery.com>
8436         PR c++/6695
8437         * pt.c (tsubst_friend_class): Substitute into the context of the
8438         friend before using it.
8440 2002-06-26  Mark Mitchell  <mark@codesourcery.com>
8442         * cp-tree.h (xref_tag): Change prototype.
8443         (handle_class_head): Likewise.
8444         (build_x_component_ref): Likewise.
8445         * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
8446         (xref_tag): Take attributes as a separate parameter.
8447         (xref_tag_from_type): Adjust call to xref_tag.
8448         * decl2.c (build_expr_from_tree): Adjust call to
8449         build_x_component_ref.
8450         (handle_class_head): Take attributes as a separate parameter.
8451         * parse.y (parse_xref_tag): New function.
8452         (parse_handle_class_head): Likewise.
8453         (primary): Use parse_xref_tag.
8454         (class_head_decl): Use parse_handle_class_head.
8455         (class_head_defn): Likewise.
8456         * rtti.c (init_rtti_processing): Adjust call to xref_tag.
8457         (build_dynamic_cast_1): Likewise.
8458         (create_pseudo_type_info): Likewise.
8459         (emit_support_tinfos): Likewise.
8460         * typeck.c (build_object_ref): Adjust call to
8461         build_x_component_ref.
8462         (build_x_component_ref): Remove protect parameter.
8464 2002-06-25  Mark Mitchell  <mark@codesourcery.com>
8466         * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
8467         * class.c (handle_using_decl): Likewise.
8468         (instantiate_type): Likewise.
8469         * cp-tree.h (BASELINK_FUNCTIONS): New macro.
8470         (xref_basetypes): Change prototype.
8471         (begin_mem_initializers): New function.
8472         (get_overloaded_fn): Likewise.
8473         * decl.c (xref_basetypes): Simplify.
8474         * error.c (dump_expr): Use BASELINK_FUNCTIONS.
8475         * init.c (build_offset_ref): Likewise.
8476         * parse.y (base_init): Use begin_mem_initializers().
8477         (structsp): Adjust call to xref_basetypes.
8478         * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
8479         (instantiate_class_template): Adjust call to xref_basetypes.
8480         * semantics.c (begin_mem_initializers): New function.
8481         * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
8482         (really_overlaoded_fn): Likewise.
8483         (get_overloaded_fn): New function.'
8484         (get_first_fn): USe BASELINK_FUNCTIONS.
8486 2002-06-24  Mark Mitchell  <mark@codesourcery.com>
8488         * cp-tree.h (SCALAR_TYPE_P): New macro.
8489         (check_for_out_of_scope_variable): New function.
8490         (at_class_scope_p): Likewise.
8491         (finish_fname): Likewise.
8492         * class.c (finish_struct): Use at_function_scope_p.
8493         * decl.c (check_for_out_of_scope_variable): New function, split
8494         out from do_identifier.
8495         (finish_enum): Use at_function_scope_p.
8496         * lex.c (do_identifier): Use check_for_out_of_scope_variable.
8497         * parse.y (VAR_FUNC_NAME): Give it <ttype>.  Use finish_fname.
8498         (primary): Use at_function_scope_p.
8499         * search.c (at_class_scope_p): New function.
8500         * semantics.c (finish_fname): Likewise.
8501         (check_multiple_declarators): Use at_function_scope_p.
8503 2002-06-23  Mark Mitchell  <mark@codesourcery.com>
8505         * parse.y (parse_scoped_id): New function.
8506         (primary): Use it.
8507         * cp-tree.h (do_scoped_id): Adjust declaration.
8508         * lex.c (do_scoped_id): Remove call to yylex.
8509         * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
8510         * typeck2.c (add_exception_specifier): Use tree_cons, rather than
8511         expanding it inline.
8513 2002-06-23  Matt Thomas  <matt@3am-software.com>
8515         * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
8516         "#if VMS_TARGET".
8518 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8520         * mangle.c (integer_type_codes): Const-ify.
8522 2002-06-20  Richard Henderson  <rth@redhat.com>
8524         PR c++/6747
8525         * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
8526         Call put_var_into_stack.
8528 2002-06-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8530         * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
8531         array size calculation.
8533 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8535         PR c++/6892
8536         * pt.c (tsubst_expr): Handle FILE_STMT.
8538 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8540         PR c++/6723
8541         * pt.c (lookup_template_class): Don't build complete argument of
8542         BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
8543         argument.
8545 2002-06-19  Akim Demaille  <akim@epita.fr>
8547         * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
8548         decl.h's TYPENAME.
8549         * spew.c, lex.c: Adjust.
8550         * parse.y (explicit_instantiation): Add empty action to override
8551         the default $$ = $1 where it introduces a type clash.
8553 2002-06-14  Jason Merrill  <jason@redhat.com>
8555         * semantics.c (begin_for_stmt): Push the 'for' scope before
8556         adding the FOR_STMT.
8558         C++ ABI changes.
8559         * class.c (build_base_field): Set DECL_PACKED.
8560         (layout_class_type): Don't use tail padding of PODs.
8561         * mangle.c (write_unqualified_name): Fix template conversion op
8562         mangling.
8564 2002-06-16  Richard Henderson  <rth@redhat.com>
8566         PR opt/6793
8567         * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
8568         after template instantiation.
8570 2002-06-16  Richard Henderson  <rth@redhat.com>
8572         * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
8574 2002-06-15  Gabriel Dos Reis  <gdr@codesourcery.com>
8576         * cp-tree.h (compiler_error): Remove declaration.
8577         * lex.c (compiler_error): Remove definition.
8579 2002-06-14  Steve Ellcey  <sje@cup.hp.com>
8581         * g++spec.c (LIBUNWIND): New.
8582         (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
8584 2002-06-13  Jessica Han  <jessica@cup.hp.com>
8586         * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
8587         (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
8588         (build_vbase_offset_vtbl_entries): Likewise.
8589         * rtti.c (build_headof): Likewise.
8590         (get_tinfo_decl_dynamic): Likewise.
8591         (create_pseudo_type_info): Likewise.
8593 2002-06-12  Stan Shebs  <shebs@apple.com>
8595         * mpw-config.in: Remove file, no longer used.
8596         * mpw-make.sed: Ditto.
8598 2002-06-07  Zack Weinberg  <zack@codesourcery.com>
8600         * decl2.c: Update call to cpp_handle_option.
8602 2002-06-07  H.J. Lu  (hjl@gnu.org)
8604         * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
8606 2002-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
8608         * error.c (cp_error_at): Fix typo.
8610 2002-06-04  Gabriel Dos Reis  <gdr@codesourcery.com>
8612         * error.c (cp_diagnostic_starter): Adjust call.
8613         (maybe_print_instantiation_context): Change prototype to take a
8614         'diagnostic_info *'.
8615         (print_instantiation_full_context): Likewise.
8616         (print_instantiation_partial_context): Likewise.
8617         (cp_diagnostic_starter): Likewise.
8618         (cp_diagnostic_finalizer): Likewise.
8619         (cp_print_error_function): Likewise.
8620         (cp_printer): Take a secondary parameter as a 'text_info *'.
8621         Remove output_state savings.  Adjust calls.
8623 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
8625         * pt.c (inline_parm_levels): Mark for GC.
8627         * mangle.c (start_mangling): Allocate G.substitutions here...
8628         (init_mangle): ... rather than here.
8629         (finish_mangling): Clear the varray pointer when done with it.
8630         * spew.c (yylexstring): Don't use VARRAY_FREE.
8631         * search.c (bfs_walk): Don't use VARRAY_FREE.
8632         * decl2.c (pending_statics): Use gengtype to mark.
8633         (deferred_fns): Likewise.
8634         (ssdf_decls): Likewise.
8635         (init_decl2): Delete.
8636         * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
8637         (cxx_init_decl_processing): Don't call init_decl2.
8638         (cxx_pop_function_context): Don't use VARRAY_FREE.
8639         * cp-tree.h (struct saved_scope): No need for special marking
8640         of varrays.
8641         (struct language_function): Likewise.
8642         (local_classes): Use gengtype to mark.
8643         (init_decl2): Delete prototype.
8644         * class.c (init_class_processing): Don't use
8645         ggc_add_tree_varray_root.
8646         (build_vtbl_initializer): Don't use VARRAY_FREE.
8648         * decl.c (typename_compare): Don't use same_type_p.
8650         * decl.c: Include hashtab.h instead of hash.h.
8651         (typename_hash): Update to use htab_h.
8652         (typename_compare): Likewise.
8653         (typename_htab): Use gengtype to mark.
8654         (build_typename_type): Update to use htab_h.
8655         * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
8657         * Make-lang.in (gt-cp-tree.h): New rule.
8658         (cp/tree.o): Depend on gt-cp-tree.h.
8659         * config-lang.in (gtfiles): Add cp/tree.c.
8660         * tree.c: Include gt-cp-tree.h.
8661         (list_hash_table): Use gengtype to mark.
8662         (init_tree): Use gengtype to mark trees.
8664         * Make-lang.in (cp/decl.o): Add debug.h dependency.
8665         * call.c (struct z_candidate): Use gengtype.
8666         (USER_CONV_CAND): Use WRAPPER_ZC.
8667         (convert_class_to_reference): Use build_zc_wrapper.
8668         (build_type_conversion_1): Likewise.
8669         (build_over_call): Use WRAPPER_ZC.
8670         (add_warning): Use build_zc_wrapper.
8671         * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
8672         * cp-tree.h (struct lang_identifier): Use gengtype.
8673         (struct template_parm_index_s): Likewise.
8674         (struct ptrmem_cst): Likewise.
8675         (struct tree_binding): Likewise.
8676         (struct tree_overload): Likewise.
8677         (struct tree_srcloc): Likewise.
8678         (struct tree_wrapper): Likewise.  Also modify to have a pointer
8679         to struct z_candidate rather than void.
8680         (enum cp_tree_node_structure_enum): New.
8681         (union lang_tree_node): New.
8682         (cxx_mark_tree): Delete prototype.
8683         (cp_tree_node_structure): New prototype.
8684         (build_ptr_wrapper): Delete prototype.
8685         (build_int_wrapper): Delete prototype.
8686         (build_zc_wrapper): New prototype.
8687         * decl.c: Include debug.h
8688         (cxx_mark_tree): Delete.
8689         (cp_tree_node_structure): New.
8690         * tree.c (build_ptr_wrapper): Delete.
8691         (build_int_wrapper): Delete.
8692         (build_zc_wrapper): New.
8694         * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
8695         Correct typo.  Patch from k_fukui@highway.ne.jp.
8697         * semantics.c (current_stmt_tree): Update for change to
8698         struct language_function.
8699         (finish_mem_initializers): Likewise.
8700         * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
8701         * cp-tree.h (struct language_function): Rename from
8702         cp_language_function.  Change all uses.
8703         (cp_function_chain): Don't need to cast.
8705         * class.c (duplicate_tag_error): Reset discriminator.
8706         (check_bases_and_members): Update for data structure changes.
8707         * cp-tree.h (struct lang_id2): Use gengtype.
8708         (flagged_type_tree): Likewise.
8709         (SET_LANG_ID): Use GGC on struct lang_id2.
8710         (struct cp_language_function): Use gengtype.  Remove field
8711         'x_vcalls_possible_p'.
8712         (current_vcalls_possible_p): Delete.
8713         (struct lang_type_header): New.
8714         (struct lang_type_class): Rename from struct lang_type.  Include
8715         struct lang_type_header.
8716         (struct lang_type_ptrmem): New.
8717         (struct lang_type): New.
8718         (LANG_TYPE_CLASS_CHECK): New.  Use it in all the appropriate macros.
8719         (LANG_TYPE_PTRMEM_CHECK): New.  Use it in all the appropriate macros.
8720         (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
8721         (struct lang_decl_flags): Use gengtype.  Add discriminators.
8722         (struct lang_decl): Use gengtype.  Add and use discriminators.
8723         Update the macros that reference moved fields.
8724         (LANG_DECL_U2_CHECK): New function.  Use it when appropriate.
8725         (SET_DECL_THUNK_P): Set discriminator too.
8726         (clear_inline_text_obstack): Delete prototype.
8727         (finish_inline_definitions): Delete prototype.
8728         (mark_pending_inlines): Delete prototype.
8729         (lang_check_failed): New prototype.
8730         * decl.c (struct named_label_use_list): Use gengtype.
8731         (struct named_label_list): Likewise.
8732         (mark_binding_level): Delete.
8733         (mark_named_label_lists): Delete.
8734         (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
8735         (cxx_init_decl_processing): Use generated marker routine.
8736         (begin_destructor_body): Delete dead set to
8737         current_vcalls_possible_p.
8738         (mark_lang_function): Delete.
8739         (mark_cp_function_context): Delete.
8740         (lang_mark_tree): Use generated marker routines.
8741         * decl2.c (start_objects): Set discriminator when setting
8742         GLOBAL_INIT_PRIORITY.
8743         * lex.c (retrofit_lang_decl): Set discriminators.
8744         (copy_lang_type): Update for changes to lang_type structure.
8745         (cp_make_lang_type): Set discriminator.
8746         * parse.y: Use gengtype on YYLVAL.  Don't use dots in identifiers.
8747         * search.c: Include ggc.h.
8748         * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
8749         (finish_inline_definitions): Delete.
8750         * spew.c (struct token): Use gengtype.
8751         (struct token_chunk): New.
8752         (struct unparsed_text): Use gengtype.  Store tokens in chunks.
8753         (struct feed): Use gengtype.
8754         (feed_obstack): Delete.
8755         (feed): Mark as GC root.
8756         (pending_inlines): Mark as GC root.
8757         (pending_inlines_tail): Likewise.
8758         (processing_these_inlines): Likewise.
8759         (token_obstack): Make static.
8760         (first_token): Likewise.
8761         (init_spew): Don't initialize deleted things; use gengtype for roots.
8762         (clear_inline_text_obstack): Delete.
8763         (feed_input): Use GC for struct feed.  Update for changes to
8764         struct unparsed_text.
8765         (mark_pending_inlines): Delete.
8766         (next_token): Rename from add_token.  Change all callers.  Update
8767         for changes to struct unparsed_text.
8768         (space_for_token): New.
8769         (remove_last_token): New.
8770         (alloc_unparsed_text): New.
8771         (snarf_block): Take an unparsed_text.  Update for changes to struct
8772         unparsed_text.
8773         (snarf_method): Update for changes to struct unparsed_text.
8774         (snarf_defarg): Update for changes to struct unparsed_text.
8775         * tree.c (lang_check_failed): New.
8777         * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
8778         gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
8779         (cp/spew.o): Add dependency on gt-<filename>.h.
8780         (cp/decl2.o): Add dependency on gt-<filename>.h.
8781         (cp/call.o): Add dependency on gt-<filename>.h.
8782         (cp/pt.o): Add dependency on gt-<filename>.h.
8783         (cp/repo.o): Add dependency on gt-<filename>.h.
8784         (cp/parse.o): Add dependency on gt-<filename>.h.
8785         * call.c: Use gengtype for roots.
8786         * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
8787         decl2.c parse.y pt.c repo.c spew.c.
8788         * cp-tree.h: Use gengtype for roots.
8789         (struct saved_scope): Use GGC, gengtype.
8790         (cp_parse_init): Delete prototype.
8791         (init_pt): Delete prototype.
8792         * decl.c: Use gengtype for roots.
8793         (mark_saved_scope): Delete.
8794         (cxx_init_decl_processing): Don't call deleted initilisation
8795         routines.
8796         (signed_size_zero_node): Delete, unused.
8797         * decl.h: Use gengtype for roots.
8798         * decl2.c: Use gengtype for roots.
8799         * lex.h: Use gengtype for roots.
8800         * parse.y: Use gengtype for roots.
8801         (cp_parse_init): Delete.
8802         * pt.c: Use gengtype for roots.
8803         (init_pt): Delete.
8804         * repo.c: Use gengtype for roots.
8805         * spew.c: Use gengtype for roots.
8807         * Make-lang.in: Allow for filename changes.  Add gtype-cp.h.
8808         (cp/decl.o): Add dependency on gtype-cp.h.
8809         * decl.c: Remove use of add_deletable_root, use GTY marker instead.
8810         Include gtype-cp.h.  Allow for filename changes.
8812         * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
8813         (cp/decl.o): Add cp/gt-decl.h dependency.
8814         * config-lang.in (gtfiles): New.
8815         * tree.h: Rename struct binding_level to struct cp_binding_level.
8816         * decl.c: Rename struct binding_level to struct cp_binding_level.
8817         Include cp/gt-decl.h.
8818         (struct cp_binding_level): Use gengtype.
8819         (make_binding_level): Use GGC on struct cp_binding_level.
8820         (mark_binding_level): Use gt_ggc_m_cp_binding_level.
8821         (cxx_init_decl_processing): Mark free_binding_level as
8822         deletable.
8824         * decl.c (mark_cp_function_context): Update calling sequence.
8826         * decl.c (start_function): Don't free 'struct
8827         cp_language_function'.
8828         (pop_cp_function_context): Likewise.
8829         (save_function_data): Allocate it using GC.
8830         * semantics.c (genrtl_start_function): Don't free 'struct
8831         cp_language_function'.
8833 2002-05-31  Matthew Woodcraft  <mattheww@chiark.greenend.org.uk>
8835         * lang-specs.h: Use cpp_debug_options.
8837 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
8839         * mangle.c, tree.c: Include real.h.
8840         * Make-lang.in: Update dependency lists.
8842 2002-05-25  Neil Booth  <neil@daikokuya.demon.co.uk>
8844         * lex.c: Don't include c-lex.h.
8845         * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
8847 2002-05-23  Neil Booth  <neil@daikokuya.demon.co.uk>
8849         * spew.c (yyungetc, snarf_block): Remove indent_level handling.
8851 2002-05-22  Richard Henderson  <rth@redhat.com>
8853         * decl.c (obscure_complex_init): Check for VAR_DECL
8854         before using DECL_THREAD_LOCAL.
8856 2002-05-22  Richard Henderson  <rth@redhat.com>
8858         * decl.c (check_tag_decl): Handle RID_THREAD.
8859         (obscure_complex_init): Reject run-time init of tls.
8860         (grokvardecl, grokdeclarator): Handle RID_THREAD.
8861         * lex.c (reswords): Add __thread.
8862         (rid_to_yy): Map RID_THREAD to SCSPEC.
8864 2002-05-22  Neil Booth  <neil@daikokuya.demon.co.uk>
8866         * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
8867         * cp-tree.h (cxx_post_options): Kill.
8868         * cp-lex.c (cxx_post_options): Kill.
8870 2002-05-21  Richard Henderson  <rth@redhat.com>
8872         * lex.c (rid_to_yy): Add RID_THREAD.
8874 2002-05-21  Alexandre Oliva  <aoliva@redhat.com>
8876         * init.c (build_vec_init): Test for trivial copy-assignment when
8877         copy-assigning arrays.
8879 2002-05-20  Andreas Jaeger  <aj@suse.de>
8881         * init.c (build_default_init): Remove unused variable.
8883 2002-05-20  Alexandre Oliva  <aoliva@redhat.com>
8885         * call.c (any_strictly_viable): New.
8886         (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
8888 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8890         * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
8892 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8894         PR c++/186, DR 259
8895         * pt.c (do_decl_instantiation): Don't complain explicit
8896         instantiation after explicit specialization.
8897         (do_type_instantiation): Likewise.
8899 2002-05-19  Alexandre Oliva  <aoliva@redhat.com>
8901         * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
8902         renamed from...
8903         (complete_type_or_else): ... this.  Redefined as macro.
8904         (cxx_incomplete_type_diagnostic): Declare.
8905         (cxx_incomplete_type_error): Define as macro.
8906         * init.c (build_delete): Warn about incomplete types other than
8907         void, and use the built-in operator delete for them.
8908         * typeck.c (complete_type_or_diagnostic): Renamed from
8909         complete_type_or_else.  Added warn_only argument, passed to...
8910         * typeck2.c (cxx_incomplete_type_diagnostic): ... this.  Print
8911         warnings or errors depending on new warn_only argument.  Renamed
8912         from...
8913         (cxx_incomplete_type_error): ... this.  New implementation in
8914         terms of cxx_incomplete_type_diagnostic.
8916 2002-05-18  Jason Merrill  <jason@redhat.com>
8918         PR c++/6611
8919         * decl2.c (import_export_decl): If we clear
8920         DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
8922 2002-05-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8924         PR c++/6620
8925         * pt.c (verify_class_unification): Don't check if PARM is template
8926         parameter dependent.  Simplify.
8927         (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
8928         parameter dependent expression.
8930 2002-05-14  Jason Merrill  <jason@redhat.com>
8932         * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
8933         Do set DECL_COMDAT.
8934         (synthesize_tinfo_var): Take the public decl.
8935         (create_real_tinfo_var): Likewise.  Check DECL_COMDAT.
8936         (emit_tinfo_decl): Adjust.  Call import_export_decl.
8937         * decl2.c (import_export_decl): Simplify tinfo decl handling.
8939 2002-05-14  Alexandre Oliva  <aoliva@redhat.com>
8941         * cp-tree.h (struct lang_type): Added non_zero_init.
8942         (CLASSTYPE_NON_ZERO_INIT_P): New macro.
8943         (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
8944         * class.c (check_field_decls): Test non_zero_init.
8945         * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
8946         zero-to-NULL conversions.
8947         * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
8948         type that needs zero-initialization without zeros.
8949         (check_initializer_decl): Compute zero-initializer for types
8950         that require a non-trivial one.
8951         * init.c (build_forced_zero_init): New function.
8952         (build_default_init): Use it.
8953         * tree.c (zero_init_p): New function.
8954         * typeck2.c (force_store_init_value): New function.
8955         (process_init_constructor): Create non-trivial zero-initializers
8956         for array members and class fields.
8958 2002-05-14  Neil Booth  <neil@daikokuya.demon.co.uk>
8960         * lang-specs.h: Remove redundant -lang-c++.
8962 2002-05-13  Jason Merrill  <jason@redhat.com>
8964         * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
8965         (fixed_type_or_null): See through reference vars.
8966         (build_base_path): Vtable contents are constant.
8967         * typeck.c (get_member_function_from_ptrfunc): Likewise.
8969 2002-05-12  Jason Merrill  <jason@redhat.com>
8971         * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
8972         structs are safe.
8974 2002-05-09  Neil Booth  <neil@daikokuya.demon.co.uk>
8976         * cp-tree.h (flag_ansi): Remove.
8977         * decl2.c (flag_ansi): Remove.
8978         (cxx_decode_option): Set flag_iso and flag_undef.
8980 2002-05-09  Jason Merrill  <jason@redhat.com>
8982         * typeck.c (get_member_function_from_ptrfunc): Reorganize.
8983         Use subtraction rather than a bitmask to get the index.
8984         * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
8986         * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
8988 2002-05-07  Neil Booth  <neil@daikokuya.demon.co.uk>
8990         * Make-lang.in (decl2.o): Update.
8991         * cp-tree.h (warn_multichar): Remove.
8992         * decl2.c: Include c-common.h.
8993         (warn_multichar): Remove.
8995 2002-05-03  Jason Merrill  <jason@redhat.com>
8997         * tree.c (build_cplus_array_type): Only const and volatile get
8998         special handling.
9000         * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
9002 2002-04-30  Mark Mitchell  <mark@codesourcery.com>
9004         ABI change, returning simple classes from functions.
9005         * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
9006         TYPE_HAS_TRIVIAL_INIT_REF is false or
9007         TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
9009 2002-04-30  Jason Merrill  <jason@redhat.com>
9011         PR debug/6436
9012         * decl.c (grokdeclarator): Don't override TYPE_NAME of an
9013         anonymous class with a typedef if there are attributes.
9015 2002-04-29  Paul Eggert  <eggert@twinsun.com>
9017         * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
9019 2002-04-29  Jakub Jelinek  <jakub@redhat.com>
9021         PR c++/6477
9022         * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
9023         non-NULL first.
9025 2002-04-29  Mark Mitchell  <mark@codesourcery.com>
9027         PR c++/6492
9028         * pt.c (tsubst_friend_class): If the friend has an explicit scope,
9029         enter that scope before name lookup.
9031         PR c++/6486
9032         * method.c (do_build_copy_constructor): Avoid building
9033         cv-qualified reference types.
9035 2002-04-29  Nathan Sidwell  <nathan@codesourcery.com>
9037         PR c++/5719
9038         * decl.c (grok_op_properties): Assignment ops don't have to return
9039         by value. operator% should.
9041 2002-04-28  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
9043         PR c/6343
9044         * decl.c (duplicate_decls): Call merge_weak.
9046 2002-04-26  Richard Henderson  <rth@redhat.com>
9048         * parse.y (malloced_yyss, malloced_yyvs): New.
9049         (yyoverflow): Re-add.  Set them.
9050         (free_parser_stacks): New.
9052 2002-04-26  Mark Mitchell  <mark@codesourcery.com>
9054         PR c++/6497
9055         * method.c (do_build_assign_ref): Pass a derivation to
9056         build_method_call when calling base class assignment operators.
9058 2002-04-26  Richard Henderson  <rth@redhat.com>
9060         * parse.y (yyoverflow): Revert.
9062 2002-04-26  Richard Henderson  <rth@redhat.com>
9064         PR c/3581
9065         * parse.y (string): Remove.  Update all uses to use STRING
9066         instead, and not call combine_strings.
9067         * rtti.c (tinfo_name): Use fix_string_type.
9068         * semantics.c (finish_asm_stmt): Don't call combine_strings.
9069         * spew.c (yylexstring): New.
9070         (read_token): Use it.
9072 2002-04-25  Richard Henderson  <rth@redhat.com>
9074         PR c/2161
9075         * parse.y (yyoverflow): New.
9077 2002-04-25  Jason Merrill  <jason@redhat.com>
9079         PR c++/5607
9080         * search.c (check_final_overrider): No longer static.
9081         * class.c (update_vtable_entry_for_fn): Call it.
9082         * cp-tree.h: Adjust.
9084 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
9086         * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
9087         * cp-tree.h (cxx_set_yydebug): Die.
9088         * lex.c (YYDEBUG): Get from c-lex.h.
9089         (cxx_set_yydebug): Remove.
9090         * parse.y: Include c-lex.h.
9091         (YYDEBUG): Get from c-lex.h.
9093 2002-04-24  Mark Mitchell  <mark@codesourcery.com>
9095         PR c++/6438.
9096         * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
9097         void.
9099 2002-04-24  Neil Booth  <neil@daikokuya.demon.co.uk>
9101         * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
9102         LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
9103         Redefine.
9104         * cp-tree.h (cp_attribute_table): Rename.
9105         * decl.c (lang_attribute_table): Remove declaration.
9106         (cxx_init_decl_processing): Don't set it.
9107         * tree.c (cp_attribute_table): Rename.
9109 2002-04-24  Jason Merrill  <jason@redhat.com>
9111         PR c++/6331
9112         * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
9113         * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
9114         The pedwarn for array assignment is now unconditional.
9115         * tree.c (build_cplus_array_type_1): Still process simple array types
9116         normally in templates.
9118         PR c++/6395
9119         * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
9120         stuff for comdats.
9122 2002-04-23  Jakub Jelinek  <jakub@redhat.com>
9124         * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
9125         node with attributes.
9127 2002-2-23  David O'Brien  <obrien@FreeBSD.org>
9129         * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
9130         Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
9132 2002-04-23  Mark Mitchell  <mark@codesourcery.com>
9134         PR c++/6256:
9135         * pt.c (tsubst_friend_class): Handle templates with explicit
9136         nested names.
9138         PR c++/6331:
9139         * typeck.c (merge_types): Remember the cv-qualification of pointer
9140         types when merging them.
9142 2002-04-20  Neil Booth  <neil@daikokuya.demon.co.uk>
9144         * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
9145         LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
9146         * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
9147         cxx_mark_function_context): New.
9148         * decl.c (push_cp_function_context, pop_cp_function_context,
9149         mark_cp_function_context): Rename for consistency.
9150         (cxx_init_decl_processing): Don't set old hooks.
9152 2002-04-19  Neil Booth  <neil@daikokuya.demon.co.uk>
9154         * call.c (convert_type_from_ellipsis): Rename, update.
9155         * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
9156         * cp-tree.h (convert_type_from_ellipsis): Rename.
9157         * decl.c (cxx_init_decl_processing): Don't set hook.
9159 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
9161         * call.c (build_new_method_call): Update.
9162         * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
9163         * cp-tree.h (cxx_incomplete_type_error): New.
9164         * decl.c (grokdeclarator, grokparms): Update.
9165         * decl2.c (check_classfn): Update.
9166         * pt.c (tsubst): Update.
9167         * typeck.c (complete_type_or_else, expr_sizeof,
9168         decay_conversion): Update.
9169         * typeck2.c (incomplete_type_error): Rename.
9170         (add_exception_specifier): Update.
9172 2002-04-18  Jason Merrill  <jason@redhat.com>
9174         PR c++/5658
9175         * search.c (setup_class_bindings): A class template qualifies as a
9176         type binding.
9178 2002-04-17  Jakub Jelinek  <jakub@redhat.com>
9180         PR c++/6316
9181         * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
9182         before expanding.
9184 2002-04-16  Mark Mitchell  <mark@codesourcery.com>
9186         * init.c (begin_init_stmts): Remove commented out code.
9187         (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
9188         * semantics.c (begin_gobal_stmt_expr): Adjust call to
9189         expand_start_stmt_expr.
9191 2002-04-15  Mark Mitchell  <mark@codesourcery.com>
9193         * decl.c (register_dtor_fn): Pass the address of dso_handle, not
9194         dso_handle itself, to __cxa_atexit.
9196 2002-04-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
9198         * error.c (cxx_print_error_function): Adjust call to macros.
9200 2002-04-14  Jakub Jelinek  <jakub@redhat.com>
9202         * class.c (layout_virtual_bases): Do all dsize computation on trees.
9204 2002-04-14  Jason Merrill  <jason@redhat.com>
9206         * typeck.c (get_member_function_from_ptrfunc): Don't do
9207         gratuitious division and multiplication on
9208         ptrmemfunc_vbit_in_delta targets.
9210 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
9212         PR c++/5373.
9213         * semantics.c (finish_expr_stmt): Remember the type of the
9214         expression before any conversions are performed.
9216 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
9218         PR c++/5189.
9219         * call.c (add_template_candidate_real): Do not treat member
9220         templates as copy constructors.
9222 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
9224         * decl.c (duplicate_decls): Do not copy the RTL for a variable
9225         declaration if the old variable had an incomplete type and the new
9226         variable does not.
9227         (complete_vars): Do not call layout_decl for completed variables.
9229 2002-04-12  Richard Sandiford  <rsandifo@redhat.com>
9231         * decl.c (duplicate_decls): Don't try to unify an implicit typedef
9232         with an explicit one.
9233         (follow_tag_typedef): New.
9234         (lookup_tag): Use it to extract the tag of an explicit typedef.
9235         (xref_tag): Likewise.
9237 2002-04-11  Andrew Haley  <aph@redhat.com>
9239         * typeck.c (type_after_usual_arithmetic_conversions):
9240         If two types have the same variant, return immediately.
9241         When two floating-point operands are the same precision:
9242           convert to float if one of the operands is float;
9243           if neither operand is one of the standard types, return the type
9244           of the first operand.
9246 2002-04-10  Nathan Sidwell  <nathan@codesourcery.com>
9248         PR c++/5507
9249         * decl.c (make_typename_type): Remove implicit typenameness.
9251 2002-04-09  Jason Merrill  <jason@redhat.com>
9253         PR optimization/6189
9254         * semantics.c (genrtl_start_function): Don't free
9255         DECL_SAVED_FUNCTION_DATA for inline functions.
9257         * init.c (build_member_call): For now, don't convert to
9258         intermediate base if it would cause an error.
9260 2002-04-08  Paolo Carlini  <pcarlini@unitus.it>
9262         * parse.y (namespace_qualifier, maybe_identifier,
9263         begin_explicit_instantiation, end_explicit_instantiation,
9264         apparent_template_type, .finish_template_type,
9265         do_id, maybe_init, defarg_again, component_decl_1):
9266         Add ending ';', in accordance with POSIX.
9268 2002-04-06  Mark Mitchell  <mark@codesourcery.com>
9270         PR c++/5571
9271         * class.c (layout_class_type): Remember incomplete static
9272         variables.
9273         (finish_struct_1): Call complete_vars, not
9274         hack_incomplete_structures.
9275         * cp-tree.h (hack_incomplete_structures): Rename to ...
9276         (complete_vars): ... this.
9277         (struct saved_scope): Remove incomplete.
9278         (namespace_scope_incomplete): Remove.
9279         * decl.c (struct binding_level): Remove incomplete.
9280         (incomplete_vars): New variable.
9281         (mark_binding_level): Don't mark incomplete.
9282         (print_binding_level): Don't print it.
9283         (mark_saved_scope): Don't mark incomplete.
9284         (pushdecl): Use maybe_register_incopmlete_var.
9285         (cxx_init_decl_processing): Register incomplete_vars for GC.
9286         (start_decl_1): Clarify error message.
9287         (hack_incomplete_vars): Remove.
9288         (maybe_register_incomplete_var): New function.
9289         (complete_vars): Likewise.
9291 2002-04-06  Jason Merrill  <jason@redhat.com>
9293         PR c++/4934
9294         * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
9295         set before checking it.
9297         PR c++/525
9298         * init.c (build_member_call): Use build_scoped_ref.
9299         (resolve_offset_ref): Likewise.
9300         * call.c (build_scoped_method_call): Likewise.
9301         * tree.c (maybe_dummy_object): Kludge around current_class_type being
9302         wrong.
9303         * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
9304         * cp-tree.h: Adjust.
9306         * init.c (push_base_cleanups): Just use build_scoped_method_call.
9308         PR c++/6179
9309         * method.c (implicitly_declare_fn): Pass unqualified type to
9310         synthesize_exception_spec.
9312 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
9314         * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
9315         * cvt.c: Update comment.
9316         * init.c (expand_cleanup_for_base): Update.
9317         * semantics.c (finish_parenthesized_expr): Update.
9318         * typeck.c (cp_truthvalue_conversion): Update.
9320 2002-04-04  Jason Merrill  <jason@redhat.com>
9322         * semantics.c (finish_eh_cleanup): New fn.
9323         * cp-tree.h: Add prototype.
9324         * init.c (perform_member_init, expand_cleanup_for_base): Use
9325         finish_eh_cleanup.
9326         * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
9327         * cp-tree.h: Remove references.
9328         * decl.c (begin_constructor_body, end_constructor_body): Likewise.
9329         * dump.c (cp_dump_tree): Likewise.
9330         * pt.c (tsubst_expr): Likewise.
9331         * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
9332         (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
9333         * tree.c (cp_statement_code_p): Likewise.
9335         * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
9337         PR c++/5636
9338         * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
9339         cleanup for nrv.
9341         PR c++/5104
9342         * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
9343         specifiers.
9344         [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
9346 2002-04-03  Richard Henderson  <rth@redhat.com>
9348         * cp-lang.c (cxx_warn_unused_global_decl): New.
9349         (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
9351 2002-04-03  Neil Booth  <neil@daikokuya.demon.co.uk>
9353         * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
9354         * tree.c (init_tree): Don't set hook.
9356 2002-04-03  Roger Sayle  <roger@eyesopen.com>
9358         PR c++/5998:
9359         * decl.c (duplicate_decls): Don't mess with assembler names when
9360         redeclaring builtin functions as static.
9362 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
9364         * call.c (build_addr_func): Update.
9365         * class.c (resolve_address_of_overloaded_function): Update.
9366         * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
9367         * cp-tree.h (cxx_mark_addressable): New.
9368         * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
9369         * decl2.c (build_cleanup): Update.
9370         * except.c (build_throw): Update.
9371         * init.c (resolve_offset_ref): Update.
9372         * pt.c (convert_nontype_argument): Update.
9373         * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
9374         * typeck.c (decay_conversion, build_array_ref, build_unary_op,
9375         unary_complex_lvalue): Update.
9376         (mark_addressable): Rename.
9378 2002-04-01  Roger Sayle  <roger@eyesopen.com>
9380         PR c++/5998:
9381         * decl.c (duplicate_decls):  Overwrite the RTL when (and only
9382         when) overwriting a built-in function.  Don't use COPY_DECL_RTL,
9383         but follow the SET_DECL_RTL idiom used elsewhere in the function.
9385 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
9387         * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
9388         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
9389         * decl.c (grokdeclarator): Update.
9390         * mangle.c (write_integer_cst): Update.
9391         * typeck.c (build_binary_op): Update.
9393 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
9395         * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
9396         * lex.c (cxx_init): Don't set hook.
9398 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
9400         * Make-lang.in (error.o): Update.
9401         * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
9402         * cp-tree.h (struct diagnostic_context): Predeclare.
9403         (cxx_print_error_function): New.
9404         * error.c: Include langhooks-def.h.
9405         (lang_print_error_function): Rename.  Update.
9406         (init_error): Don't set hook.
9408 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
9410         * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
9411         Redefine.
9412         * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
9413         * decl.c (finish_enum): Similarly.
9414         * error.c (dump_type): Similarly.
9415         * lex.c (cxx_init): Similarly.
9416         * mangle.c (write_builtin_type): Similarly.
9417         * typeck.c (comptypes): Similarly.
9419 2002-03-28  Roger Sayle  <roger@eyesopen.com>
9421         PR c++/5998:
9422         * decl.c (cxx_init_decl_processing): Re-enable built-in functions
9423         in the g++ front-end.
9424         (duplicate_decl): Allow redefinition of anticipated built-ins.
9425         Fix inlining problem by over-writing the old DECL_RTL.
9426         (lookup_namespace_name): Fail to find an identifier in the
9427         specified namespace if its still anticipated.
9428         (builtin_function_1): New function split out from builtin_function
9429         to create a builtin in the current namespace with given context.
9430         (builtin_function): Call builtin_function_1 to define the
9431         appropriate builtins in both the std and global namespaces.
9432         (select_decl): Don't test for anticipated decls here.
9433         (unqualified_namespace_lookup): Instead ignore them whilst
9434         searching through scopes and namespaces.
9435         * decl2.c (do_nonmember_using_decl): If a using declaration
9436         specifies an anticipated built-in function, mark it as no longer
9437         anticipated in that scope.
9438         (ambiguous_decl):  Avoid resolving to an anticipated decl.
9439         * lex.c (do_scoped_id): Fail to find an identifier in the global
9440         namespace if its still anticipated.
9442 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
9444         * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
9445         * cp-tree.h (cp_make_lang_type): Rename.
9446         * lex.c (cp_make_lang_type): Rename.
9447         (make_aggr_type): Update.
9448         * tree.c (init_tree): Don't set make_lang_type_fn.
9450 2002-03-29  Jakub Jelinek  <jakub@redhat.com>
9452         PR c++/6073
9453         * class.c (finish_struct_1): Update static field's DECL_MODE even
9454         if its type is a variant of t.
9456 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
9458         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
9459         * cp-tree.h (cxx_insert_default_attributes): New.
9460         * decl.c (insert_default_attributes): Rename.
9462 2002-03-27  Mark Mitchell  <mark@codesourcery.com>
9464         PR c++/4884
9465         * call.c (build_op_delete_call): Allow for the fact the placement
9466         may be a COMPOUND_EXPR.
9468 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
9470         * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
9471         * cp-tree.h (init_cplus_expand): Remove.
9472         (cxx_expand_expr): New.
9473         * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
9474         fix prototype.
9475         (init_cplus_expand): Remove.
9476         * lex.c (cxx_init): Don't call init_cplus_expand.
9478 2002-03-26  Mark Mitchell  <mark@codesourcery.com>
9480         PR c++/4884.
9481         * init.c (build_new_1): Allow for the fact the result of
9482         build_function_call may be a COMPOUND_EXPR.
9484 2002-03-26  Nathan Sidwell  <nathan@codesourcery.com>
9486         PR c++/5682
9487         * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
9488         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
9489         (dfs_skip_nonprimary_vbases_markedp): Remove.
9490         * search.c (get_shared_vbase_if_not_primary): Remove.
9491         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
9492         (dfs_skip_nonprimary_vbases_markedp): Remove.
9493         (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
9494         (dfs_marked_real_bases_queue_p): Likewise.
9496 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
9498         * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
9499         * cp-tree.h (cxx_mark_tree): New.
9500         * decl.c (lang_mark_tree): Rename cxx_mark_tree.
9502 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
9504         * cp-tree.h (cxx_maybe_build_cleanup): New.
9505         * decl.c (destroy_local_var, hack_incomplete_structures): Update.
9506         (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
9507         * tree.c (build_target_expr): Update.
9508         * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
9510 2002-03-24  Neil Booth  <neil@daikokuya.demon.co.uk>
9512         * decl2.c (cxx_decode_option): Handle -E.
9513         * lang-specs.h (default_compilers): Preprocess with cc1plus.
9514         * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
9516 2002-03-23  Jakub Jelinek  <jakub@redhat.com>
9518         PR c++/6037
9519         * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
9521 2002-03-23  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
9523         * error.c (dump_type): Be careful about implicit typenames.
9525 2002-03-21  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
9527         PR C++/3656
9528         * semantics.c (finish_base_specifier): Handle erronous base
9529         classes.
9531 2002-03-22  Zack Weinberg  <zack@codesourcery.com>
9533         * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
9534         REAL_IS_NOT_DOUBLE.
9536 2002-03-22  Jeff Knaggs  <jknaggs@redhat.com>
9538         * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
9539         an index into the vtable_entry array regardless of
9540         TARGET_PTRMEMFUNC_VBIT_LOCATION.
9542 2002-03-21  Aldy Hernandez  <aldyh@redhat.com>
9544         * tree.c (cp_cannot_inline_tree_fn): Same.
9546 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
9548         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
9549         insert_block, getdecls, global_bindings_p): New.
9551 2002-03-20  Nathan Sidwell  <nathan@codesourcery.com>
9553         PR c++/4361
9554         * mangle.c (struct globals) Add internal_mangling_p member.
9555         (write_template_param): Do internal mangling, if needed.
9556         (mangle_conv_op_name_for_type): Request internal mangling.
9558 2002-03-20  Jason Merrill  <jason@redhat.com>
9560         PR c++/2136
9561         * init.c (build_delete): Check access for a member op delete here.
9562         * decl2.c (delete_sanity): Not here.
9564 2002-03-19  Jason Merrill  <jason@redhat.com>
9566         PR c++/5118
9567         * class.c (get_vfield_name): Use the constructor_name.
9569 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
9571         * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
9572         * cp-tree.h (lang_printable_name): Rename.
9573         * error.c (lang_decl_name): Use new hook.
9574         * lex.c (cxx_init): Remove old hook.
9575         * pt.c (tsubst_decl): Use new hook.
9576         * tree.c (lang_printable_name): Rename.
9578 2002-03-18  Eric Botcazou  <ebotcazou@multimania.com>
9580         PR c++/3882
9581         * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
9582         (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
9583         only after recording the declaration.
9585 2002-03-18  Jason Merrill  <jason@redhat.com>
9587         PR c++/2039
9588         * init.c (resolve_offset_ref): Hand off to build_component_ref.
9590         PR c++/4222, c++/5995
9591         * call.c (build_over_call): Fix empty class logic.
9593         PR c++/3870
9594         * cp-tree.h (struct saved_scope): Add last_parms field.
9595         * decl.c (maybe_push_to_top_level): Save last_function_parms.
9596         (pop_from_top_level): Restore it.
9598         PR c++/4377
9599         * mangle.c (write_expression): Strip NOP_EXPRs sooner.  Also strip
9600         NON_LVALUE_EXPRs.
9602         PR c++/4003
9603         * pt.c (tsubst_friend_function): Use decl_namespace_context.
9605         PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
9606         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
9607         type with a nontrivial destructor.
9609 2002-03-17  Jason Merrill  <jason@redhat.com>
9611         PR c++/4460
9612         * class.c (build_base_path): Virtual base layout is fixed in
9613         in-charge [cd]tors.
9615 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
9617         * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
9618         * parse.y (yyparse): Remove macro.
9620 2002-03-17  Jason Merrill  <jason@redhat.com>
9622         PR c++/5757
9623         * init.c (build_new_1): Pass the right pointer to op delete.
9625 2002-03-16  Nathan Sidwell  <nathan@codesourcery.com>
9627         PR c++/4361
9628         * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
9629         conversion operators go.
9630         (struct lang_decl_flags): Add template_conv_p and unused
9631         bitfields.
9632         (DECL_TEMPLATE_CONV_FN_P): New macro.
9633         * call.c (build_user_type_conversion_1): Don't check second type
9634         conversion of overload set first.
9635         * class.c (add_method): Make sure templated conversion operators
9636         all end up on slot 2.
9637         * lex.c (do_identifier): A conversion operator token might be
9638         satisfied by a templated conversion operator.
9639         * pt.c (check_explicit_specialization): Use
9640         CLASSTYPE_FIRST_CONVERSION_SLOT.
9641         (template_parm_this_level_p): New function.
9642         (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
9643         * search.c (lookup_fnfields_1): Template conversions will be on
9644         the first slot.
9645         * typeck.c (build_component_ref): Preserve the type of an
9646         conversion operator name on the overload type.
9647         (build_x_function_call): Retrieve the conversion operator name.
9649 2002-03-15  Richard Henderson  <rth@redhat.com>
9651         * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
9653 2002-03-15  Mark Mitchell  <mark@codesourcery.com>
9655         * cp-tree.h (CLEANUP_DECL): Remove.
9656         (CLEANUP_EXPR): Likewise.
9657         * decl.c (destroy_local_var): Simplify.
9658         (maybe_build_cleanup): Tidy.
9659         * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
9660         * semantics.c (cp_expand_stmt): Likewise.
9661         * cp/tree.c (cp_statement_code_p): Likewise.
9663 2002-03-15  Jason Merrill  <jason@redhat.com>
9665         PR c++/5857
9666         * decl.c (duplicate_decls): Use merge_types instead of common_type.
9667         * typeck.c (common_type): Just hand off to
9668         type_after_usual_arithmetic_conversions and
9669         composite_pointer_type.
9670         (merge_types): New fn.
9671         (commonparms): Use it instead of common_type.
9672         (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
9673         (composite_pointer_type): Also handle attributes.
9674         * cp-tree.h: Declare merge_types.
9676         * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
9677         variables.
9678         * decl2.c (maybe_make_one_only): Also mark the decl as needed.
9680 2002-03-14  Richard Henderson  <rth@redhat.com>
9682         * decl.c: Include c-pragma.h.
9683         (start_decl, start_function): Invoke maybe_apply_pragma_weak.
9684         * Make-lang.in: Update dependencies.
9686 2002-03-14  Jakub Jelinek  <jakub@redhat.com>
9688         PR c++/5908
9689         * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
9690         * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
9692 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
9694         * mangle.c (write_builtin_type): Handle 128-bit integers even if
9695         they are not a standard integer type.
9697 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
9699         * cp-tree.h (init_init_processing): Remove declaration.
9700         * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
9701         * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
9703 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9705         * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
9706         Define.
9707         * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
9708         tree_code_length.
9709         * lex.c (cplus_tree_code_type, cplus_tree_code_length,
9710         cplus_tree_code_name): Delete.
9711         (cxx_init): Don't call add_c_tree_codes, instead set
9712         lang_unsafe_for_reeval.  Don't try to copy into the various
9713         tree_code arrays.
9715 2002-03-12  Nathan Sidwell  <nathan@codesourcery.com>
9717         PR c++/5659
9718         * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
9719         * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
9720         definitions.
9722 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
9724         Revert 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>,
9725         DR209 is now not a defect.
9726         * cp-tree.h (skip_type_access_control): Remove.
9727         * decl.c (grokdeclarator): Do type access control for friend
9728         declarations.
9729         * semantics.c (decl_type_access_control): Don't reset
9730         current_type_lookups.
9731         (save_type_access_control): Always save the lookups.
9732         (skip_type_access_control): Remove.
9733         (finish_class_definition): Don't change type_lookups.
9735 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
9737         Revert 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>,
9738         It is incorrect.
9739         * typeck.c (build_static_cast): Compare non-qualified types
9740         with pointer to member conversions.
9742 2002-03-11  Dan Nicolaescu  <dann@ics.uci.edu>
9743             Daniel Berlin  <dan@dberlin.org>
9745         * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
9746         (cxx_get_alias_set): Use it.
9748 2002-03-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9750         * cp-tree.h (stabilize_expr): Prototype.
9752 2002-03-08  Craig Rodrigues  <rodrigc@gcc.gnu.org>
9754         * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
9755         conditional return void.
9757 2002-03-08  Neil Booth  <neil@daikokuya.demon.co.uk>
9759         * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
9760         * cp-tree.h (cxx_unsave): New.
9761         * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
9762         (init_tree): Update.
9764 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9766         * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
9767         explicit sizeof/sizeof.
9768         * decl2.c (cxx_decode_option): Likewise.
9769         * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
9771 2002-03-02  Nathan Sidwell  <nathan@codesourcery.com>
9773         PR c++/775
9774         * decl.c (lookup_tag): Only reject enum/class mismatch, not
9775         class/union mismatch.
9776         * parse.y (check_class_key): New function.
9777         (structsp): Call it.
9779 2002-03-01  Michael Matz  <matz@suse.de>
9781         * typeck.c (cp_pointer_int_sum): Complete inner type which is
9782         used later by size_in_bytes().
9784 2002-03-01  Phil Edwards  <pme@gcc.gnu.org>
9786         * cp-tree.h:  Require __GNUC__ to be #defined.
9787         (build_init):  Add missing prototype.
9789 2002-03-01  Jason Merrill  <jason@redhat.com>
9791         * except.c: Don't include decl.h or obstack.h.  Do include
9792         tree-inline.h.
9793         (build_throw): Destroy temporaries from the thrown
9794         expression before calling __cxa_throw.  Construct a thrown
9795         temporary directly into the exception object.
9796         (stabilize_throw_expr): New function.
9797         (wrap_cleanups_r): New function.
9798         * tree.c (stabilize_expr): New function.
9799         * init.c (build_init): New function.
9800         * Make-lang.in (cp/except.o): Adjust .h deps.
9802 2002-02-28  Jason Merrill  <jason@redhat.com>
9804         * search.c (lookup_base_r): Don't clear is_non_public just because
9805         we found a friendly scope.
9807         * decl.c (finish_function): Only warn about missing return
9808         statement with -Wreturn-type.
9810 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
9812         * class.c (build_clone): Update.
9813         * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
9814         * cp-tree.h (cxx_dup_lang_specific_decl): New.
9815         * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
9816         (copy_decl): Update.
9817         * method.c (make_thunk): Update.
9819 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
9821         * decl2.c: Delete traditional-mode-related code copied from
9822         the C front end but not used, or used only to permit the
9823         compiler to link.
9825 2002-02-24 Craig Rodrigues  <rodrigc@gcc.gnu.org>
9827         PR c++/4093
9828         * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
9829         to void.
9831 2002-02-22  Jakub Jelinek  <jakub@redhat.com>
9833         PR other/5746
9834         * semantics.c (finish_switch_cond): Don't call get_unwidened
9835         if error_mark_node.
9837 2002-02-22  Nathan Sidwell  <nathan@codesourcery.com>
9839         PR c++/2645, DR 295
9840         * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
9841         tf_keep_type_decl.
9842         (make_typename_type): Use tsubst_flags_t.
9843         * decl.c (make_typename_type): Adjust. Return non-artificial
9844         TYPE_DECLs, if required.
9845         (grokdeclarator): Simplify CVR qualification handling. Allow bad
9846         qualifiers on typedef types.
9847         * decl2.c (handle_class_head): Adjust make_typename_type call.
9848         * parse.y (nested_name_specifier): Likewise.
9849         (typename_sub0): Likewise.
9850         (typename_sub1): Likewise.
9851         * pt.c (convert_template_argument): Adjust make_typename_type
9852         return value.
9853         (tsubst): Adjust cp_build_qualified_type_real calls.
9854         (check_cv_quals_for_unify): Cope with allowing bad qualifications
9855         on template type parms.
9856         (instantiate_decl): Recheck substitutions to give warnings on bad
9857         qualifications.
9858         * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
9860 2002-02-21  Aldy Hernandez  <aldyh@redhat.com>
9862         * cp/decl.c (duplicate_decls): Merge always_inline attribute.
9864         * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
9865         unless DECL_ALWAYS_INLINE.
9867 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
9869         * typeck.c (cp_pointer_int_sum): Renamed from
9870         pointer_int_sum, call pointer_int_sum.
9872 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
9874         * decl.c (duplicate_decls): Return 0 if issued error about
9875         redeclaration.
9877 2002-02-19  Jason Merrill  <jason@redhat.com>
9879         ABI change: Mangle `void (A::*)() const' as
9880         M1AKFvvE, not MK1AFvvE.
9881         * mangle.c (write_function_type): Write cv-quals for member
9882         function type here.
9883         (write_pointer_to_member_type): Not here.
9885 2002-02-18  Jason Merrill  <jason@redhat.com>
9887         * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
9888         (do_decl_instantiation): Likewise.
9890 2002-02-17  Craig Rodrigues  <rodrigc@gcc.gnu.org>
9892         PR c++/5685
9893         * decl.c (duplicate_decls): Make warning unconditional
9894         if duplicate default argument declarations are present.
9896 2002-02-17  Jakub Jelinek  <jakub@redhat.com>
9898         * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
9899         shortening.
9901 2002-02-15  Nathan Sidwell  <nathan@codesourcery.com>
9903         * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
9904         remove incorrect comment. Move #if 0'd code to common path. Use
9905         IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
9907 2002-02-13  Jason Merrill  <jason@redhat.com>
9909         * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
9910         (finish_function): Don't warn if current_function_returns_null.
9912         * typeck2.c (digest_init): Do handle values of vector type.
9914         * typeck2.c (digest_init, process_init_constructor): Treat vectors
9915         like arrays.
9917 2002-02-11  Jason Merrill  <jason@redhat.com>
9919         * parse.y (reserved_declspecs): Don't handle attributes.
9920         (reserved_typespecquals): Handle them here.
9921         * Make-lang.in (parse.c): Adjust expected conflicts.
9923 2002-02-08  Jakub Jelinek  <jakub@redhat.com>
9925         * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
9926         instead of compstmt.
9927         (compstmt_or_stmtexpr): Renamed from compstmt.
9928         (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
9930 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
9932         Rename instantiate_type_flags to tsubst_flags_t & expand use.
9933         * cp-tree.h (instantiate_type_flags): Rename to ...
9934         (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
9935         add tf_warning flag.
9936         (instantiate_type): Adjust prototype.
9937         (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
9938         do_type_instantiation, cp_build_qualified_type_real): Likewise.
9939         cp_build_qualified_type: Adjust.
9940         * class.c (instantiate_type): Adjust parameter. Rename itf_* to
9941         tf_*.
9942         * call.c (standard_conversion): Rename itf_* to tf_*.
9943         (reference_binding): Likewise.
9944         (convert_like_real): Likewise.
9945         * cvt.c (cp_convert_to_pointer): Likewise.
9946         (convert_to_reference): Likewise.
9947         * decl.c (lookup_namespace_name): Use tf_* flags.
9948         (make_typename_type): Likewise.
9949         (grokdeclarator): Likewise.
9950         * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
9951         (coerce_template_template_parms, convert_template_argument,
9952         coerce_template_parms, maybe_get_template_decl_from_type_decl,
9953         lookup_template_class, tsubst_friend_function, tsubst_friend_class,
9954         instantiate_class_template, tsubst_template_arg_vector,
9955         tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
9956         tsubst_decl, tsubst_arg_types, tsubst_function_type,
9957         tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
9958         instantiate_template, fn_type_unification,
9959         resolve_overloaded_unification, verify_class_unification,
9960         unify, get_bindings_real, do_type_instantiation,
9961         regenerate_decl_from_template, instantiate_decl,
9962         tsubst_initializer_list, tsubst_enum,
9963         get_mostly_instantiated_function_type,
9964         invalid_nontype_parm_type_p): Likewise.
9965         * tree.c (cp_build_qualified_type_real): Likewise.
9966         * typeck.c (build_binary_op): Rename itf_* to tf_*.
9967         (build_ptrmemfunc): Likewise.
9968         (convert_for_assignment): Likewise.
9970 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
9972         PR c++/109
9973         * decl.c (grokdeclarator): Allow friend declarations from
9974         dependent types.
9975         * decl2.c (handle_class_head): Don't push into template parm contexts.
9976         * pt.c (push_template_decl_real): Template parm contexts are never
9977         being defined.
9979 2002-02-05  Alexandre Oliva  <aoliva@redhat.com>
9981         * class.c: Include target.h.
9982         (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
9983         BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
9984         bit-field layout.
9985         * Make-lang.in: Adjust deps.
9987 2002-02-05  Jason Merrill  <jason@redhat.com>
9989         * error.c (dump_type): Be more helpful about VECTOR_TYPE.
9991 2002-02-04  Jakub Jelinek  <jakub@redhat.com>
9993         * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
9994         (finish_switch_cond): Set SWITCH_TYPE.
9996 2002-02-04  Richard Henderson  <rth@redhat.com>
9998         * method.c (use_thunk): Always initialize the block tree.  Reindent.
9999         * semantics.c (expand_body): Emit thunks after function, not before.
10001 2002-02-04  Jason Merrill  <jason@redhat.com>
10003         * decl.c (start_function): Call cplus_decl_attributes immediately
10004         after grokdeclarator.
10006         * decl.c (start_function): Combine DECL_RESULT handling code.
10008 2002-02-03  Jason Merrill  <jason@redhat.com>
10010         * xref.c: Remove.
10011         * Make-lang.in (CXX_OBJS): Remove cp/xref.o
10012         (cp/xref.o): Remove dependencies.
10013         * class.c (finish_struct_1, check_methods): Don't call xref fns.
10014         (finish_struct_1): Likewise.
10015         * friend.c (make_friend_class): Likewise.
10016         * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
10017         * spew.c (read_process_identifier): Likewise.
10019 2002-02-01  Jason Merrill  <jason@redhat.com>
10021         PR c++/4872
10022         * decl.c (finish_function): Warn about a non-void function with
10023         no return statement and no abnormal exit.
10024         * cp-tree.h (struct cp_language_function): Add returns_abnormally.
10025         (current_function_returns_abnormally): New macro.
10026         * call.c (build_call): Set it.
10028         * typeck.c (build_component_ref): Always complain about offsetof
10029         constructs on non-PODs.  Only make it an error for members of
10030         virtual bases.
10032         * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
10033         (dump_function_decl): Always dump parms.
10035         * decl2.c (finish_static_data_member_decl): Complain about a local
10036         class with a static data member.
10038         PR c++/4286
10039         * search.c (lookup_field_1): Don't xref a static data member
10040         just because we looked it up.
10042 2002-01-31  Jason Merrill  <jason@redhat.com>
10044         * Make-lang.in (parse.c): Handle .output file.
10046         PR c++/3395
10047         * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
10048         not TREE_TYPE.
10049         * semantics.c (finish_class_definition): Adjust.
10051         Allow attributes in parms and casts.
10052         * parse.y (named_parm): Don't strip attrs.
10053         (declmods): Remove 'attributes' production.
10054         (nonempty_cv_qualifiers): Accept attributes.
10055         (ATTRIBUTE): Give precedence.
10056         * decl.c (groktypename): Handle attributes.
10057         (grokparms): Likewise.
10059 2002-01-29  Jakub Jelinek  <jakub@redhat.com>
10061         * decl2.c (cxx_decode_option): Pass 0 as last argument to
10062         cpp_handle_option.
10063         * lang-specs.h: Use cpp_unique_options instead of cpp_options
10064         when used together with cc1_options.
10066 2002-01-29  Nathan Sidwell  <nathan@codesourcery.com>
10068         PR c++/5132
10069         * typeck2.c (digest_init): Make sure non-array core type is
10070         instantiated.
10071         * decl2.c (reparse_absdcl_as_casts): Just store the type in the
10072         constructor, rather than build a new one.
10073         (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
10074         PURPOSE of constructor elts.
10076 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
10078         * Make-lang.in (parse.c): Adjust expected number of
10079         shift-reduce conflicts.
10080         (decl.o): Depend on diagnostic.h.
10081         * decl.c: Include diagnostic.h.
10082         (grokdeclarator): Check for null pointer.
10083         (finish_function): Don't abort when
10084         current_binding_level->parm_flag != 1, if errors have
10085         occurred; throw away the statement tree and extra binding
10086         levels, and continue.
10087         * lex.c (note_list_got_semicolon): Check for null pointer.
10088         * method.c (hack_identifier): Just return error_mark_node if
10089         value is error_mark_node.
10090         * parse.y (primary: TYPEID(type_id)): No need to use
10091         TYPE_MAIN_VARIANT here.
10092         (handler_seq): Accept an empty list of catch clauses and
10093         generate a fake handler block to avoid later crashes.
10094         (ansi_raise_identifier): Accept the error token too.
10095         * semantics.c (begin_class_definition,
10096         finish_class_definition): Check for error_mark_node.
10098 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
10100         * typeck2.c (friendly_abort): Delete definition.
10101         * cp-tree.h (friendly_abort): Don't prototype.
10102         (my_friendly_assert): Use fancy_abort.
10104 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
10106         * cp-tree.h (my_friendly_abort): Remove.
10108 2002-01-23  Jakub Jelinek  <jakub@redhat.com>
10110         * spew.c (pending_inlines, pending_inlines_tail,
10111         processing_these_inlines): Make static.
10112         (mark_pending_inlines): Remove static.
10113         (begin_parsing_inclass_inline): If in function, save pi
10114         for GC to cp_function_chain->unparsed_inlines instead.
10115         (process_next_inline): Likewise.
10116         * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
10117         (mark_pending_inlines): Add prototype.
10118         * decl.c (spew_debug): Remove unused extern.
10119         (mark_lang_function): Call mark_pending_inlines.
10121 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
10123         * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
10124         init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
10125         semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
10126         Change my_fancy_abort() to abort().
10128 2002-01-23  Jason Merrill  <jason@redhat.com>
10130         PR c++/5453
10131         * class.c (fixed_type_or_null): Fix thinko.
10133         PR c++/3331
10134         * init.c (resolve_offset_ref): Use build_indirect_ref.
10136         * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
10138 2002-01-22  Jason Merrill  <jason@redhat.com>
10140         * parse.y (function_body): Suppress the block for the outermost
10141         curly braces.
10142         * decl.c (pushdecl): Don't try to skip it.
10143         (begin_function_body): Keep the block we create, not the next one.
10144         * init.c (emit_base_init): Don't mess with keep_next_level.
10146         * class.c (build_base_path): Tweak formatting.
10148 2002-01-19  Nathan Sidwell  <nathan@codesourcery.com>
10150         Fix regression introduced with patch for c++/775
10151         * parse.y (class_head_defn): Check for template specializations
10152         with a different class-key.
10154 2002-01-17  Jason Merrill  <jason@redhat.com>
10156         * decl.c (begin_constructor_body, begin_destructor_body): New fns.
10157         (begin_function_body): Call them and keep_next_level.
10158         * init.c (emit_base_init): Call keep_next_level.
10159         * semantics.c (setup_vtbl_ptr): Lose.
10160         * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
10161         (vtbls_set_up_p): Lose.
10162         * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
10163         * method.c (do_build_copy_constructor): Likewise.
10164         (synthesize_method): Call finish_mem_initializers.
10165         * parse.y (nodecls): Likewise.
10167         * error.c (dump_type_suffix): Print the exception specs before
10168         recursing.
10169         (dump_function_decl): Here, too.
10171         * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
10173 2002-01-10  Ira Ruben   <ira@apple.com>
10175         PR c++/907
10176         * decl.c (start_method): Handle attrlist.
10178 2002-01-10  Jakub Jelinek  <jakub@redhat.com>
10180         * decl2.c (max_tinst_depth): Increase default limit to 500.
10182 2002-01-10  Graham Stott  <grahams@redhat.com>
10184         * spew.c (YYCHAR): Uppercase macro parameter and add
10185         parenthesis.
10186         (YYCODE): Likewise.
10187         (NAME): Uppercase macro parameter.
10189 2002-01-09  Graham Stott  <grahams@redhat.com>
10191         * decl.h (grokdeclarator): Wrap long line.
10193         * semantics.c (FINISH_COND): Uppercase macro paramaters and
10194         add parenthesis.
10196 2002-01-08  Graham Stott  <grahams@redhat.com>
10198         * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
10199         (PALLOC): Uppercase macro parameter and whitespace.
10200         (SALLOC): Uppercase macro parameter.
10201         (SFREE): Uppercase macros parameter, add parenthese and
10202         whitespace.
10203         (STREQL): Uppercase macro parameter and whitespace.
10204         (STRNEQ): Likewise.
10205         (STRLSS): Likewise.
10206         (STRLEQ): Likewise.
10207         (STRGTR): Likewise.
10208         (STRGEQ): Likewise.
10210         * call.c (convert_like): Add parenthesis and wrap.
10211         (convert_like_with_context): Likewise.
10212         (ICS_RANK): Whitespace.
10213         (NEED_TEMPORARY_P): Remove parenthesis.
10215         * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
10216         whitespace.
10217         (VTT_MARKED_BINFO_P): Likewise.
10219         * decl.c (BINDING_LEVEL): Add parenthesis.
10220         (DEF_OPERATOR): Likewise.
10222         * mangle.c (MANGLE_TRACE): Add parenthesis.
10223         (MANGLE_TRACE_TREE): Likewise.
10224         (write_signed_number): Likewise.
10225         (write_unsigned_number): Likewise.
10227         * pt.c (ccat): Uppercase macro parameter.
10228         (cat): Likewise
10230         * search.c (SET_BINFO_ACCESS): Add parenthesis.
10232 2002-01-07  Jason Merrill  <jason@redhat.com>
10234         * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
10235         to pedwarn.
10237         PR c++/3536
10238         * method.c (make_thunk): If !flag_weak, give the thunk the
10239         function's linkage.
10240         (use_thunk): Here, too.
10242 2002-01-07  Graham Stott  <grahams@redhat.com>
10244         * error.c: Update copyright date.
10245         (print_scope_operator): Add parenthesis.
10246         (print_left_paren): Likewise.
10247         (print_right_paren): Likewise.
10248         (print_left_bracket): Likewise.
10249         (print_right_bracket): Likewise.
10250         (print_template_argument_list_start): Likewise.
10251         (print_template_argument_list_end): Likewise.
10252         (print_non_consecutive_character): Likewise.
10253         (print_tree_identifier): Likewise.
10254         (print_identifier): Likewise.
10255         (NEXT_CODE): Uppercase macro parameter.
10256         (ident_fndecl): Delete unused.
10257         (GLOBAL_THING): Likewise.
10259 2002-01-06  Graham Stott  <grahams@redhat.com>
10261         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
10262         (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
10263         (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
10264         (RECORD_OR_UNION_TYPE_CHECK): Likewise.
10265         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
10266         (C_IS_RESERVED_WORD): Uppercase macro parameter.
10267         (C_RID_YYCODE) Likewise.
10268         (ptrmem_cst): Use rtx.
10269         (LOCAL_BINDING_P): Add whitespace.
10270         (INHERITED_VALUE_BINDING_P): Likewise.
10271         (BINDING_SCOPE): Wrap long line.
10272         (BINDING_HAS_LEVEL_P): Remove parenthesis.
10273         (BINDING_VALUE): Wrap long line.
10274         (BINDING_TYPE): Whitespace.
10275         (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
10276         (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
10277         (IDENTIFIER_NAMESPACE_VALUE): Likewise.
10278         (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
10279         (same_type_p): Uppercase macro parameters.
10280         (same_type_ignoring_top_level_qualifiers_p): Likewise.
10281         (OVL_FUNCTION): Wrap long line.
10282         (OVL_CHAIN): Whitespace.
10283         (OVL_CURRENT): Add parenthesis and whitespace.
10284         (OVL_NEXT): Whitespace.
10285         (OVL_USED): Likewise.
10286         (IDENTIFIER_TYPE_VALUE): Likewise.
10287         (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
10288         (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
10289         (LANG_ID_FIELD): Whitespace.
10290         (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
10291         (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
10292         (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
10293         (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
10294         (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
10295         (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
10296         (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
10297         (IDENTIFIER_VIRTUAL_P): Likewise.
10298         (IDENTIFIER_OPNAME_P): Likewise.
10299         (IDENTIFIER_TYPENAME_P): Remove parenthesis.
10300         (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
10301         (C_SET_EXP_ORIGINAL_CODE): Likewise.
10302         (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
10303         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
10304         (IS_AGGR_TYPE): Uppercase macro parameter.
10305         (CLASS_TYPE_P): Likewise.
10306         (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
10307         (IS_AGGR_TYPE_2): Whitespace.
10308         (TAGGED_TYPE_P): Uppercase macro parameter.
10309         (TYPE_BUILT_IN): Whitespace.
10310         (TYPE_FOR_JAVA): Likewise.
10311         (FUNCTION_ARG_CHAIN): Remove parenthesis.
10312         (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
10313         (FUNCTION_FIRST_USER_PARAM): Likewise.
10314         (PROMOTES_TO_AGGR_TYPE): Whitespace.
10315         (DERIVED_FROM_P): Add parenthesis and wrap.
10316         (UNIQUELY_DERIVED_FROM_P): Likewise.
10317         (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
10318         (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
10319         (CLASSTYPE_USE_TEMPLATE): Whitespace.
10320         (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
10321         (TYPE_GETS_DELETE): Add parenthesis.
10322         (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
10323         (TYPE_HAS_ASSIGN_REF): Likewise,
10324         (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
10325         (TYPE_HAS_INIT_REF): Likewise.
10326         (TYPE_HAS_CONST_INIT_REF): Likewise.
10327         (TYPE_BEING_DEFINED): Likewise.
10328         (TYPE_LANG_SPECIFIC): Likewise.
10329         (CLASSTYPE_RTTI): Likewise.
10330         (TYPE_OVERLOADS_CALL_EXPR): Likewise.
10331         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
10332         (TYPE_OVERLOADS_ARROW): Likewise.
10333         (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
10334         (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
10335         (CLASSTYPE_METHOD_VEC): Likewise.
10336         (CLASSTYPE_MARKED_N): Likewise.
10337         (CLASSTYPE_MARKED): Likewise.
10338         (CLASSTYPE_MARKED2): Likewise.
10339         (CLASSTYPE_MARKED3): Likewise.
10340         (CLASSTYPE_MARKED4): Likewise.
10341         (CLASSTYPE_MARKED5): Likewise.
10342         (CLASSTYPE_MARKED6): Likewise.
10343         (SET_CLASSTYPE_MARKED): Whitespace.
10344         (CLEAR_CLASSTYPE_MARKED): Likewise.
10345         (SET_CLASSTYPE_MARKED2): Likewise.
10346         (CLEAR_CLASSTYPE_MARKED2): Likewise.
10347         (SET_CLASSTYPE_MARKED3): Likewise.
10348         (CLEAR_CLASSTYPE_MARKED3): Likewise.
10349         (SET_CLASSTYPE_MARKED4): Likewise.
10350         (CLEAR_CLASSTYPE_MARKED4): Likewise.
10351         (SET_CLASSTYPE_MARKED5): Likewise.
10352         (CLEAR_CLASSTYPE_MARKED5): Likewise.
10353         (SET_CLASSTYPE_MARKED6): Likewise.
10354         (CLEAR_CLASSTYPE_MARKED6): Likewise.
10355         (CLASSTYPE_TAGS): Likewise.
10356         (CLASSTYPE_VSIZE): Likewise.
10357         (CLASSTYPE_VBASECLASSES): Likewise.
10358         (CANONICAL_BINFO): Add parenthesis.
10359         (CLASSTYPE_SIZE(NODE): Likewise.
10360         (CLASSTYPE_SIZE_UNIT): Likewise.
10361         (CLASSTYPE_ALIGN(NODE): Likewise.
10362         (CLASSTYPE_USER_ALIGN): Likewise.
10363         (TYPE_JAVA_INTERFACE): Likewise.
10364         (CLASSTYPE_PURE_VIRTUALS): Likewise.
10365         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
10366         (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
10367         (CLASSTYPE_HAS_MUTABLE): Likewise.
10368         (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
10369         (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
10370         (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
10371         (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
10372         (CLASSTYPE_INTERFACE_ONLY): Likewise.
10373         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
10374         (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
10375         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
10376         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
10377         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
10378         (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
10379         (BINFO_UNSHARED_MARKED): Whitespace.
10380         (BINFO_MARKED): Whitespace and wrap.
10381         (SET_BINFO_MARKED): Likewise.
10382         (CLEAR_BINFO_MARKED): Likewise.
10383         (BINFO_VTABLE_PATH_MARKED): Likewise.
10384         (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
10385         (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
10386         (BINFO_SUBVTT_INDEX): Remove parenthesis.
10387         (BINFO_VPTR_INDEX): Likewise.
10388         (BINFO_PRIMARY_BASE_OF): Likewise,
10389         (CLASSTYPE_VFIELDS): Whitespace.
10390         (VF_DERIVED_VALUE): Wrap long line.
10391         (NAMESPACE_LEVEL): Whitespace.
10392         (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
10393         (DEFARG_POINTER): Whitespace.
10394         (DECL_NEEDED_P): Remove parenthesis.
10395         (DECL_LANGUAGE): Whitespace.
10396         (SET_DECL_LANGUAGE): Add parenthesis.
10397         (DECL_CONSTRUCTOR_P): Whitespace and wrap.
10398         (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
10399         (DECL_IN_AGGR_P): Whitespace.
10400         (DECL_FRIEND_P): Likewise.
10401         (DECL_BEFRIENDING_CLASSES): Likewise.
10402         (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
10403         (DECL_NONCONVERTING_P): Whitespace.
10404         (DECL_PURE_VIRTUAL_P): Likewise.
10405         (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
10406         (DECL_PENDING_INLINE_INFO): Whitespace.
10407         (DECL_SORTED_FIELDS): Likewise.
10408         (DECL_DEFERRED_FN): Likewise.
10409         (DECL_TEMPLATE_INFO): Likewise.
10410         (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
10411         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
10412         (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
10413         (TMPL_ARGS_LEVEL): Likewise.
10414         (SET_TMPL_ARGS_LEVEL): Likewise.
10415         (INNERMOST_TEMPLATE_PARMS): Whitespace.
10416         (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
10417         (INTEGRAL_CODE_P(CODE): Add parenthesis.
10418         (CP_INTEGRAL_TYPE_P): Remove parenthesis.
10419         (TYPE_HAS_CONSTRUCTOR): Whitespace.
10420         (TREE_HAS_CONSTRUCTOR): Likewise.
10421         (TYPE_HAS_DESTRUCTOR): Likewise.
10422         (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
10423         (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
10424         (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
10425         (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
10426         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
10427         (TYPE_PTRMEMFUNC_P): Likewise.
10428         (TYPE_PTRMEMFUNC_FLAG): Likewise.
10429         (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
10430         (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
10431         (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
10432         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
10433         (DECL_ACCESS): Whitespace.
10434         (DECL_GLOBAL_CTOR_P): Remove parenthesis.
10435         (DECL_GLOBAL_DTOR_P): Likewise.
10436         (GLOBAL_INIT_PRIORITY): Likewise.
10437         (DECL_TEMPLATE_PARMS): Likewise.
10438         (DECL_TEMPLATE_RESULT): Likewise.
10439         (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
10440         (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
10441         (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
10442         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
10443         (PRIMARY_TEMPLATE_P): Add parenthesis.
10444         (DECL_USE_TEMPLATE): Whitespace.
10445         (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
10446         (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
10447         (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
10448         (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
10449         (CALL_DECLARATOR_PARMS): Remove parenthesis.
10450         (CALL_DECLARATOR_QUALS): Likewise.
10451         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
10452         (TEMP_NAME_P): Wrap.
10453         (VFIELD_NAME_P): Likewise.
10454         (B_SET): Uppercase macro parameters and add parenthesis.
10455         (B_CLR): Likewise.
10456         (B_TST): Likewise.
10457         (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
10458         (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
10459         (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
10460         (same_or_base_type_p): Likewise.
10461         (cp_deprecated): Likewise.
10463 2002-01-05  Richard Henderson  <rth@redhat.com>
10465         * semantics.c (expand_body): Revert last change.
10467 2002-01-04  Jason Merrill  <jason@redhat.com>
10469         PR c++/4122
10470         * class.c (update_vtable_entry_for_fn): Set delta to zero for a
10471         lost primary.
10473         * class.c (build_vtbl_initializer): Check for a lost primary
10474         before calculating the vtable entry to throw away.
10476 2002-01-02  Jason Merrill  <jason@redhat.com>
10478         * semantics.c (expand_body): Call outlining_inline_function when
10479         emitting an inline function out of line.
10481 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10483         PR c++/5116, c++/764 reversion
10484         * call.c (build_new_op): Revert the instantiations. They are
10485         incorrect.
10487 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10489         PR c++/5089
10490         * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
10492 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10494         PR c++/3716
10495         * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
10496         (tsubst, case POINTER_TYPE): Handle pmfs here.
10497         (tsubst, case OFFSET_TYPE): Check it is not an offset to
10498         reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
10500 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10502         PR c++/35
10503         * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
10504         (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
10505         * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
10506         PARM_DECL.
10507         (tsubst_template_parms): Break up loop statements.
10508         (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
10509         parm PARM_DECLs don't get promoted.
10511 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10513         PR c++/5123
10514         * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
10515         (build_x_function_call): Cope with a COMPONENT_REF containing a
10516         TEMPLATE_ID_EXPR.
10518 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10520         PR c++/5213
10521         * pt.c (convert_template_argument): Be more careful determining
10522         when RECORD_TYPE templates are or are not templates.
10524 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10526         PR c++/775
10527         * cp-tree.h (handle_class_head): Adjust prototype.
10528         * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
10529         parameters. Use for all class heads.
10530         * parse.y (named_class_head_sans_basetype, named_class_head,
10531         named_complex_class_head_sans_basetype,
10532         named_class_head_sans_basetype_defn,
10533         unnamed_class_head): Remove.
10534         (class_head, class_head_apparent_template): Recognize class heads
10535         (class_head_decl, class_head_defn): New reductions. Process class
10536         heads.
10537         (structsp): Adjust class definition and class declaration
10538         reductions.
10539         (maybe_base_class_list): Give diagnostic on empty list.
10541 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10543         PR c++/4379
10544         * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
10545         single non-static member.
10546         (unary_complex_lvalue): If it cannot be a pointer to member, don't
10547         make it so. Check it is not pointer to reference.
10549 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10551         PR c++/5132
10552         * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
10553         are processing a template decl.
10555 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10557         PR c++/5116, c++/764
10558         * call.c (build_new_op): Make sure template class operands are
10559         instantiated. Simplify arglist construction.
10561 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
10563         * call.c (build_user_type_conversion_1): Use my_friendly_assert
10564         rather than if ... abort.
10565         * cvt.c (convert_to_reference): Likewise.
10566         * semantics.c (setup_vtbl_ptr): Likewise.
10567         * pt.c (lookup_template_class): Comment typo.
10569 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
10571         PR c++/5125
10572         * pt.c (push_template_decl_real): Make sure DECL has
10573         DECL_LANG_SPECIFIC.
10575 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
10577         PR c++/335
10578         * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
10579         for non-reference fields.
10580         * typeck.c (require_complete_type): Use resolve_offset_ref).
10582 2001-12-26  Nathan Sidwell  <nathan@codesourcery.com>
10584         PR c++/196
10585         * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
10587 2001-12-24  Nathan Sidwell  <nathan@codesourcery.com>
10589         PR c++/160
10590         * typeck.c (build_modify_expr): Remove old unreachable code & tidy
10591         up. Don't stabilize_references when initializing a reference.
10593 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10595         * decl2.c (lang_f_options): Const-ify.
10597 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
10599         * config-lang.in (diff_excludes): Remove.
10601 2001-12-19  Nathan Sidwell  <nathan@codesourcery.com>
10603         PR c++/90
10604         * typeck.c (build_function_call_real): Use original function
10605         expression for errors.
10607 2001-12-18  Jason Merrill  <jason@redhat.com>
10609         PR c++/3242
10610         * class.c (add_method): Do compare 'this' quals when trying to match a
10611         used function.  Don't defer to another used function.
10613 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
10615         * pt.c (instantiate_clone): Remove, fold into ...
10616         (instantiate_template): ... here. Simplify by removing mutual
10617         recursion.
10618         * typeck2.c (build_m_component_ref): Don't cv qualify the function
10619         pointed to by a pointer to function.
10620         * class.c (delete_duplicate_fields_1): Typo.
10622 2001-12-18  Jason Merrill  <jason@redhat.com>
10624         C++ ABI change: destroy value arguments in caller.
10625         * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
10626         create an extra binding level for the parameters.
10627         * decl.c (store_parm_decls): Don't do parameter cleanups.
10629 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
10631         * call.c (build_new_method_call): Use '%#V'.
10632         * error.c (cv_to_string): Use V parameter to determine padding.
10634 2001-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
10636         * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
10637         spellings in messages.
10639 2001-12-17  Zack Weinberg  <zack@codesourcery.com>
10641         * cp-tree.h: Delete #defines for cp_error, cp_warning,
10642         cp_pedwarn, and cp_compiler_error.
10643         * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
10644         except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
10645         rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
10646         typeck2.c: Change calls to the above macros to use their
10647         language-independent equivalents: error, warning, pedwarn, and
10648         internal_error respectively.
10650 2001-12-16  Neil Booth  <neil@daikokuya.demon.co.uk>
10652         * decl2.c (finish_file): Remove back_end_hook.
10654 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
10656         * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
10657         cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
10658         pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
10660 2001-12-15  Joseph S. Myers  <jsm28@cam.ac.uk>
10662         * lang-options.h: Use American spelling in messages.
10664 2001-12-13  Jason Merrill  <jason@redhat.com>
10666         * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
10668         Use cleanups to run base and member destructors.
10669         * init.c (push_base_cleanups): New function, split out from...
10670         (build_delete): ...here.  Lose !TYPE_HAS_DESTRUCTOR code.
10671         * decl.c (finish_destructor_body): Move vbase destruction code to
10672         push_base_cleanups.
10673         (begin_function_body, finish_function_body): New fns.
10674         (finish_function): Move [cd]tor handling and call_poplevel to
10675         finish_function_body.
10676         (pushdecl): Skip the new level.
10677         * semantics.c (genrtl_try_block): Don't call end_protect_partials.
10678         (setup_vtbl_ptr): Call push_base_cleanups.
10679         * method.c (synthesize_method): Call {begin,end}_function_body.
10680         * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
10681         * cp-tree.h: Declare new fns.
10682         * parse.y (function_body, .begin_function_body): New nonterminals.
10683         (fndef, pending_inline, function_try_block): Use function_body.
10684         (ctor_initializer_opt, function_try_block): No longer has a value.
10685         (base_init): Remove .set_base_init token.
10686         (.set_base_init, compstmt_or_error): Remove.
10687         * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
10689         * optimize.c (maybe_clone_body): Fix parameter updating.
10691 2001-12-12  Jason Merrill  <jason@redhat.com>
10693         * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
10694         * semantics.c (genrtl_start_function): Don't pass
10695         parms_have_cleanups or push an extra binding level.
10696         (genrtl_finish_function): Lose cleanup_label cruft.
10698         * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
10699         (ctor_label): Remove.
10700         * semantics.c (finish_return_stmt): Lose ctor_label support.
10701         * decl.c (finish_constructor_body, mark_lang_function): Likewise.
10702         * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
10703         dtor_label.
10705         * call.c (build_new_method_call): Let resolves_to_fixed_type_p
10706         check for [cd]tors.
10707         * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
10709         * decl.c (finish_function): Check VMS_TARGET, not VMS.
10711         * decl.c (start_cleanup_fn): Remove redundant pushlevel.
10712         (end_cleanup_fn): And poplevel.
10714         * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
10715         if we're in a template.
10717 2001-12-12  Jakub Jelinek  <jakub@redhat.com>
10719         * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
10720         ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
10721         THIS_NAME_P): Delete.
10722         * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
10723         THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
10724         with internal naming scheme.
10725         * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
10727 2001-12-12  Nathan Sidwell  <nathan@codesourcery.com>
10729         * decl.c (grokdeclarator): Deprecated implicit typename use.
10731 2001-12-11  Nathan Sidwell  <nathan@codesourcery.com>
10733         PR g++/51
10734         * parse.y (frob_specs): Indicate it is a language linkage which
10735         contained the extern.
10736         * decl.c (grokdeclarator): Allow extern language linkage with
10737         other specifiers.
10739 2001-12-10  Nathan Sidwell  <nathan@codesourcery.com>
10741         PR g++/72
10742         * decl.c (add_binding): Don't reject duplicate typedefs involving
10743         template parameters.
10745 2001-12-10  Neil Booth  <neil@daikokuya.demon.co.uk>
10747         * parse.y, semantics.c: Similarly.
10749 2001-12-09  Nathan Sidwell  <nathan@codesourcery.com>
10751         PR g++/87
10752         * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
10753         (copy_args_p): Rename to ...
10754         (copy_fn_p): ... here.
10755         (grok_special_member_properties): New function.
10756         (grok_op_properties): Lose VIRTUALP parameter.
10757         (copy_assignment_arg_p): Remove.
10758         * call.c (build_over_call): Use copy_fn_p.
10759         * decl.c (grokfndecl): Reformat. Adjust call to
10760         grok_op_properties.
10761         (copy_args_p): Rename to ...
10762         (copy_fn_p): ... here. Reject template functions. Check for pass
10763         by value.
10764         (grok_special_member_properties): Remember special functions.
10765         (grok_ctor_properties): Don't remember them here, just check.
10766         (grok_op_properties): Likewise.
10767         (start_method): Call grok_special_member_properties.
10768         * decl2.c (grokfield): Likewise.
10769         (copy_assignment_arg_p): Remove.
10770         (grok_function_init): Don't remember abstract assignment here.
10771         * pt.c (instantiate_class_template): Call
10772         grok_special_member_properties.
10773         (tsubst_decl): Adjust grok_op_properties call.
10775 2001-12-08  Aldy Hernandez  <aldyh@redhat.com>
10777         * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
10778         RID_TYPES_COMPATIBLE_P.
10780 2001-12-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
10782         * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
10783         call to build_aggr_init.
10784         * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
10786 2001-12-08  Neil Booth  <neil@daikokuya.demon.co.uk>
10788         * parse.y: Replace uses of the string non-terminal with STRING.
10789         Don't perform string concatentaion here.
10790         (string): Remove non-terminal.
10791         * semantics.c (finish_asm_stmt): Don't concatenate strings here.
10793 2001-12-05  Jason Merrill  <jason@redhat.com>
10795         * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
10796         (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
10797         * tree.c (cp_start_inlining, cp_end_inlining): New fns.
10798         * pt.c (push_tinst_level): No longer static.
10799         * cp-tree.h: Declare them.
10801         * init.c (resolve_offset_ref): Don't check access for the base
10802         conversion to access a FIELD_DECL.
10804         * cp-tree.h (TYPE_REFFN_P): New macro.
10805         * decl.c (bad_specifiers): Check it, too.
10807         * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
10808         on the __*_type_info type if we haven't seen a definition.
10810 2001-12-05  Neil Booth  <neil@daikokuya.demon.co.uk>
10812         * decl.c: Include c-common.h.
10813         (shadow_warning): Move to c-common.c.
10815 2001-12-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10817         * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
10819 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
10821         * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
10823 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
10825         PR g++/164
10826         * init.c (sort_base_init): Allow binfos to be directly specified.
10827         * method.c (do_build_copy_constructor): Explicitly convert to the
10828         base instance.
10829         (do_build_assign_ref): Likewise.
10831 2001-12-03  Hans-Peter Nilsson  <hp@bitrange.com>
10833         * decl.c (xref_basetypes): Don't use C99 construct in tag_code
10834         declaration and initialization.
10836 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
10838         * typeck2.c: Remove leading capital from diagnostic messages, as
10839         per GNU coding standards.
10841 2001-12-03  Mumit Khan  <khan@nanotech.wisc.edu>
10843         PR c++/3394
10844         * decl.c (xref_basetypes): Handle attributes between
10845         'class' and name.
10847 2001-12-03  Nathan Sidwell  <nathan@codesourcery.com>
10849         PR g++/3381
10850         * parse.y (named_complex_class_head_sans_basetype): Add new
10851         reduction.
10852         * Make-lang.in (parse.c): Adjust expected conflict count.
10854 2001-12-03  Jason Merrill  <jason@redhat.com>
10856         * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
10857         immediate binfos for our virtual bases.
10859 2001-12-02  Neil Booth  <neil@daikokuya.demon.co.uk>
10861         * call.c (build_java_interface_fn_ref): Similarly.
10862         * except.c (is_admissible_throw_operand): Similarly.
10863         * init.c (build_java_class_ref): Similarly.
10864         * xref.c (open_xref_file): Similarly.
10866 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
10868         * class.c (finish_struct): Remove trailing periods from messages.
10869         * decl.c (check_tag_decl): Similarly.
10870         * lex.c (cxx_set_yydebug): Similarly.
10871         * typeck2.c (friendly_abort): Similarly.
10873 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
10875         PR c++/3048
10876         * cp-tree.h (ovl_member): Remove.
10877         * decl2.c (merge_functions): Handle extern "C" functions
10878         specially.
10879         * tree.c (ovl_member): Remove.
10881 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
10883         PR c++/4842
10884         * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
10885         FUNCTION_DECL, as input.
10886         (mark_overriders): Remove.
10887         (warn_hidden): Rework for the new ABI.
10889 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
10891         PR c++/3471
10892         * call.c (convert_like_real): Do not build additional temporaries
10893         for rvalues of class type.
10895 2001-11-28  Nathan Sidwell  <nathan@codesourcery.com>
10897         * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
10898         (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
10899         (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
10900         (DERIVED_FROM_P): Likewise.
10901         (enum base_access): Renumber, add ba_quiet bit mask.
10902         (get_binfo): Remove.
10903         (get_base_distance): Remove.
10904         (binfo_value): Remove.
10905         (ACCESSIBLY_DERIVED_FROM_P): Remove.
10906         * call.c (standard_conversion): Use lookup_base.
10907         * class.c (strictly_overrides): Likewise.
10908         (layout_virtual_bases): Likewise.
10909         (warn_about_ambiguous_direct_bases): Likewise.
10910         (is_base_of_enclosing_class): Likewise.
10911         (add_vcall_offset_vtbl_entries_1): Likewise.
10912         * cvt.c (build_up_reference): Adjust comment.
10913         * init.c (build_member_call): Reformat.
10914         * search.c (get_binfo): Remove.
10915         (get_base_distance_recursive): Remove.
10916         (get_base_distance): Remove.
10917         (lookup_base_r): Tweak.
10918         (lookup_base): Add ba_quiet control. Complete the types here.
10919         (covariant_return_p): Use lookup_base.
10920         * tree.c (binfo_value): Remove.
10921         (maybe_dummy_object): Use lookup_base.
10922         * typeck.c (build_static_cast): Use lookup_base.
10923         (get_delta_difference): Likewise.
10924         * typeck2.c (binfo_or_else): Use lookup_base.
10925         (build_scoped_ref): Add back error_mark_check.
10926         (build_m_component_ref): Use lookup_base.
10928 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
10930         * Make-lang.in (c++.generated-manpages): New dummy target.
10932 2001-11-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10934         * Make-lang.in (cp-lang.o): Depends on c-common.h.
10935         * cp-lang.c (c-common.h): Include.
10936         (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
10937         * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
10938         * expr.c (init_cplus_expand): Don't set lang_expand_constant.
10940 2001-11-26  Neil Booth  <neil@daikokuya.demon.co.uk>
10942         * decl2.c (c_language): Move to c-common.c.
10943         * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
10944         functions.
10945         (cxx_init): Update.
10947 2001-11-26  Jason Merrill  <jason@redhat.com>
10949         * call.c (joust): Remove COND_EXPR hack.
10951 2001-11-25  Aldy Hernandez  <aldyh@redhat.com>
10953         * search.c (lookup_base_r): Declare bk in variable declaration
10954         space.
10956 2001-11-25  Nathan Sidwell  <nathan@codesourcery.com>
10958         PR g++/3145
10959         * class.c (build_vbase_pointer): Remove.
10960         (build_vbase_path): Remove.
10961         (build_base_path): New function.
10962         * cp-tree.h (base_access, base_kind): New enumerations.
10963         (build_base_path): Declare.
10964         (convert_pointer_to_real): Remove.
10965         (convert_pointer_to): Remove.
10966         (lookup_base): Declare.
10967         (convert_pointer_to_vbase): Remove.
10968         * call.c (build_scoped_method_call): Use lookup_base &
10969         build_base_path instead of convert_pointer_to_real,
10970         get_base_distance & get_binfo.
10971         (build_over_call): Likewise.
10972         * cvt.c (cp_convert_to_pointer): Likewise.
10973         (convert_to_pointer_force): Likewise.
10974         (build_up_reference): Likewise.
10975         (convert_pointer_to_real): Remove.
10976         (convert_pointer_to): Remove.
10977         * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
10978         instead of convert_pointer_to_vbase & build_vbase_path.
10979         (emit_base_init): Use build_base_path instead of
10980         convert_pointer_to_real.
10981         (expand_virtual_init): Lose unrequired conversions.
10982         (resolve_offset_ref): Use lookup_base and build_base_path
10983         instead of convert_pointer_to.
10984         * rtti.c (build_dynamic_cast_1): Use lookup_base &
10985         build_base_path instead of get_base_distance & build_vbase_path.
10986         * search.c (get_vbase_1): Remove.
10987         (get_vbase): Remove.
10988         (convert_pointer_to_vbase): Remove.
10989         (lookup_base_r): New function.
10990         (lookup_base): New function.
10991         * typeck.c (require_complete_type): Use lookup_base &
10992         build_base_path instead of convert_pointer_to.
10993         (build_component_ref): Likewise.
10994         (build_x_function_call): Likewise.
10995         (get_member_function_from_ptrfunc): Likewise.
10996         (build_component_addr): Likewise.
10997         * typeck2.c (build_scoped_ref): Likewise.
10999 2001-11-22  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
11001         * cp-tree.h (CP_TYPE_QUALS): Removed.
11002         * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
11003         * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
11004         LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
11005         * dump.c (cp_dump_tree): Use void* dump_info argument to match
11006         lang-hooks prototype.
11007         * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
11008         rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
11009         CP_TYPE_QUALS changed to cp_type_quals.
11010         * Make-lang.in: References to c-dump.h changed to tree-dump.h.
11011         (CXX_C_OBJS): Remove c-dump.o.
11013 2001-11-21  Mark Mitchell  <mark@codesourcery.com>
11015         PR c++/3637
11016         * pt.c (lookup_template_class): Ensure that all specializations
11017         are registered on the list corresponding to the most general
11018         template.
11020 2001-11-20  Mark Mitchell  <mark@codesourcery.com>
11022         * call.c (non_reference): Add documentation.
11023         (convert_class_to_reference): Do not strip reference types
11024         from conversion operators.
11025         (maybe_handle_ref_bind): Simplify.
11026         (compare_ics): Correct handling of references.
11028 2001-11-19  John Wilkinson <johnw@research.att.com>
11030         * dump.c (dump_op): New function.
11031         (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION.  Use
11032         dump_op.  Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
11033         DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
11035 2001-11-19  Mark Mitchell  <mark@codesourcery.com>
11037         PR4629
11038         * semantics.c (finish_sizeof): Make sure that expression created
11039         while processing a template do not have a type.
11040         (finish_alignof): Likewise.
11041         * typeck.c (c_sizeof): Likewise.
11042         (expr_sizeof): Likewise.
11044 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
11046         * lex.c (cxx_finish): Call c_common_finish.
11047         (finish_parse): Remove.
11049 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11051         * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
11052         when displaying error message about missing array bounds.
11054 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11056         * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
11057         CONST_CAST_EXPR.
11058         * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
11060 2001-11-16  Neil Booth  <neil@daikokuya.demon.co.uk>
11062         * cp-tree.h (print_class_statistics): Restore.
11064 2001-11-15  Jason Merrill  <jason@redhat.com>
11066         * method.c (use_thunk): Don't emit debugging information for thunks.
11068         * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
11069         * decl.c (make_typename_type): Handle getting a class template.
11070         * search.c (lookup_field_r): A class template is good enough for
11071         want_type.
11073         * call.c (convert_like_real): Only use cp_convert for the bad part.
11074         (standard_conversion): Also allow bad int->enum.
11075         * typeck.c (ptr_reasonably_similar): Also allow functions to
11076         interconvert.  Pointers to same-size integers are reasonably
11077         similar.
11079         * cvt.c (convert_to_void): If we build a new COND_EXPR, always
11080         give it void type.
11082 2001-11-15  Nathan Sidwell  <nathan@codesourcery.com>
11084         PR g++/3154
11085         * init.c (sort_base_init): Remove unreachable code.
11086         (expand_member_init): Adjust comment to reflect reality. Simplify
11087         and remove unreachable code.
11089 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
11091         * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
11092         (cxx_init): Update prototype.
11093         * decl.c (init_decl_processing): Rename.  Move null node init
11094         to its creation time.
11095         * lex.c (cxx_init_options): Update.
11096         (cxx_init): Combine with old init_parse; also call
11097         cxx_init_decl_processing.
11099 2001-11-14  Richard Sandiford  <rsandifo@redhat.com>
11101         * decl.c (check_initializer): Try to complete the type of an
11102         array element before checking whether it's complete.  Don't
11103         complain about arrays with complete element types but an
11104         unknown size.
11105         (cp_finish_decl): Build the hierarchical constructor before
11106         calling maybe_deduce_size_from_array_init.
11108 2001-11-14  Joseph S. Myers  <jsm28@cam.ac.uk>
11110         * Make-lang.in: Change all uses of $(manext) to $(man1ext).
11112 2001-11-13  Nathan Sidwell  <nathan@codesourcery.com>
11114         PR g++/4206
11115         * parse.y (already_scoped_stmt): Remove.
11116         (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
11118 2001-11-12  H.J. Lu <hjl@gnu.org>
11120         * cvt.c (ocp_convert): Don't warn the address of a weak
11121         function is always `true'.
11123 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
11125         * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
11126         LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
11127         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
11128         * cp-tree.h (print_class_statistics): Remove.
11129         (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
11130         cxx_print_identifier, cxx_set_yydebug): New.
11131         * lex.c (set_yydebug): Rename c_set_yydebug.
11132         * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
11133         lang_print_xnode): Rename.
11134         * tree.c (print_lang_statistics): Rename.
11136 2001-11-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11138         * class.c (dump_array): Fix format specifier warning.
11140 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
11142         * cp-lang.c (LANG_HOOKS_NAME): Override.
11143         (struct lang_hooks): Constify.
11144         * lex.c (cxx_init_options): Update.
11145         (lang_identify): Remove.
11146         * parse.y (language_string): Remove.
11148 2001-11-08  Andreas Franck  <afranck@gmx.de>
11150         * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
11151         DEMANGLER_CROSS_NAME): Handle program_transform_name the way
11152         suggested by autoconf.
11153         (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
11154         (c++.install-common): Use the transformed target alias names.
11156 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
11158         * Make-lang.in: Update.
11159         * cp-lang.c: Include langhooks-def.h.
11161 2001-11-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11163         * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
11165 2001-11-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11167         * lex.c (copy_lang_type): Add static prototype.
11169 2001-11-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11171         * pt.c (unify): Handle SCOPE_REF.
11173 2001-11-01  Jakub Jelinek  <jakub@redhat.com>
11175         * tree.c (cp_copy_res_decl_for_inlining): Adjust
11176         DECL_ABSTRACT_ORIGIN for the return variable.
11178 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
11180         *  Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
11182 2001-10-28  Joseph S. Myers  <jsm28@cam.ac.uk>
11184         * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
11185         semantics.c, spew.c: Fix spelling errors.
11187 2001-10-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11189         * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
11191 2001-10-25  Zack Weinberg  <zack@codesourcery.com>
11193         * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
11194         pop_everything.
11196 2001-10-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11198         * cp-lang.c (cxx_get_alias_set): New function.
11199         Point LANG_HOOKS_GET_ALIAS_SET to it.
11201 2001-10-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11203         * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
11204         * cp-tree.h (make_unbound_class_template): Prototype new function.
11205         * decl.c (make_unbound_class_template): New function.
11206         * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
11207         * error.c (dump_type): Likewise.
11208         * mangle.c (write_type): Likewise.
11209         * parse.y (template_parm): Likewise.
11210         (template_argument): Use make_unbound_class_template.
11211         * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
11212         (tsubst): Likewise.
11213         (tsubst_copy): Likewise.
11214         (unify): Likewise.
11215         * tree.c (walk_tree): Likewise.
11216         * typeck.c (comptypes): Likewise.
11218 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11220         * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
11221         extra calls into fewer ones.
11223 2001-10-18  Alexandre Oliva  <aoliva@redhat.com>
11225         * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
11226         Warn when merging inline with attribute noinline.
11227         (start_decl, start_function): Warn if inline and attribute
11228         noinline appear in the same declaration.
11230 2001-10-16  H.J. Lu <hjl@gnu.org>
11232         * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
11233         for tree checking disabled.
11235 2001-10-16  Hans-Peter Nilsson  <hp@axis.com>
11237         * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
11238         NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
11240 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
11242         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
11243         (unify): Only handle MINUS_EXPR specially if the above flag is set
11244         and the subtracted constant is 1.  Clear the flag on recursive calls.
11245         Set it when unifying the maximum value in an INTEGER_TYPE's range.
11247 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
11249         * decl.c (bad_specifiers): Don't allow exception specifications
11250         on any typedefs.
11252 2001-10-14  Neil Booth  <neil@daikokuya.demon.co.uk>
11254         * cp/lex.c (init_cp_pragma): Similarly.
11256 2001-10-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11258         * pt.c (lookup_template_class): Build complete template arguments
11259         for BOUND_TEMPLATE_TEMPLATE_PARM.
11261 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11263         * cp-tree.h (TYPE_BINFO): Update comment.
11264         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
11265         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
11266         (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
11267         (copy_type): Prototype new function.
11268         * lex.c (copy_lang_decl): Gather tree node statistics.
11269         (copy_lang_type): New function.
11270         (copy_type): Likewise.
11271         (cp_make_lang_type): Create lang_type for
11272         BOUND_TEMPLATE_TEMPLATE_PARM.  Set TYPE_BINFO for TYPENAME_TYPE
11273         and BOUND_TEMPLATE_TEMPLATE_PARM.
11274         * pt.c (tsubst): Use copy_type instead of copy_node.
11275         * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
11277 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11279         * pt.c (determine_specialization): Ignore functions without
11280         DECL_TEMPLATE_INFO.
11282 2001-10-12  Nathan Sidwell  <nathan@codesourcery.com>
11284         PR g++/4476
11285         * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
11287 2001-10-11  Jason Merrill  <jason_merrill@redhat.com>
11289         * typeck2.c (store_init_value): Don't re-digest a bracketed
11290         initializer.
11292         * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
11293         ANON_AGGR_TYPE_P.
11295 2001-10-11  Richard Henderson  <rth@redhat.com>
11297         * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
11298         of an asm statement.
11299         (build_vtbl_ref_1): Split out from build_vtbl_ref.
11300         (build_vfn_ref): Use it to handle vtable descriptors before
11301         calling build_vtable_entry_ref.
11302         * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
11304 2001-10-10  Richard Henderson  <rth@redhat.com>
11306         * parse.y (asm_operand): Allow named operands.
11307         * semantics.c (finish_asm_stmt): Tweek for changed location
11308         of the operand constraint.
11310 2001-10-09  Jason Merrill  <jason_merrill@redhat.com>
11312         * call.c (standard_conversion): Add bad conversion between
11313         integers and pointers.
11314         (convert_like_real): Don't use convert_for_initialization for bad
11315         conversions; complain here and use cp_convert.
11316         (build_over_call): Don't handle bad conversions specially.
11317         (perform_implicit_conversion): Allow bad conversions.
11318         (can_convert_arg_bad): New fn.
11319         * cp-tree.h: Declare it.
11320         * typeck.c (convert_for_assignment): Use it.
11321         (ptr_reasonably_similar): Any target type is similar to void.
11323 2001-10-08  Alexandre Oliva  <aoliva@redhat.com>
11325         * Make-lang.in (CXX_OBJS): Added cp-lang.o.
11326         (cp/cp-lang.o): New rule.
11327         * cp-tree.h: Declare hooks.
11328         * tree.c: Make hooks non-static.
11329         (init_tree): Don't initialize hooks here.
11330         * lex.c: Likewise.  Move definition of lang_hooks to...
11331         * cp-lang.c: ... new file.
11333 2001-10-08  Richard Henderson  <rth@redhat.com>
11335         * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
11336         (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
11338 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11340         * class.c (build_vtable_entry_ref): Const-ify.
11341         * decl.c (predefined_identifier,
11342         initialize_predefined_identifiers): Likewise.
11343         * init.c (build_new_1): Likewise.
11344         * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
11345         Likewise.
11347 2001-10-05  Alexandre Oliva  <aoliva@redhat.com>
11349         * optimize.c (struct inline_data): Moved to ../tree-inline.c.
11350         (INSNS_PER_STMT): Likewise.
11351         (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
11352         (copy_body, initialize_inlined_parameters): Likewise.
11353         (declare_return_variable, inlinable_function_p): Likewise.
11354         (expand_call_inline, expand_calls_inline): Likewise.
11355         (optimize_inline_calls, clone_body): Likewise.
11356         * tree.c (walk_tree): Moved to ../tree-inline.c.
11357         (walk_tree_without_duplicates): Likewise.
11358         (copy_tree_r, remap_save_expr): Likewise.
11360 2001-10-04  Alexandre Oliva  <aoliva@redhat.com>
11362         * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
11363         (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
11364         * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
11365         (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
11366         (flag_inline_trees): Moved declaration to ../tree-inline.h.
11367         (walk_tree): Moved declaration to ../tree-inline.h.
11368         (walk_tree_without_duplicates, copy_tree_r): Likewise.
11369         (remap_save_expr): Likewise.
11370         * decl.c: Include tree-inline.h.
11371         (lang_mark_tree): Don't mark inlined_fns.
11372         * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
11373         * optimize.c: Include tree-inline.h.
11374         (optimize_inline_calls): Move declaration to ../tree.h, as
11375         non-static.
11376         (remap_decl): Use language-independent constructs and hooks.
11377         (remap_block, copy_body_r, declare_return_variable): Likewise.
11378         (inlinable_function_p): Likewise.  Don't test for
11379         DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
11380         no longer language-specific.
11381         (optimize_inline_calls): Likewise.  Make it non-static.  Moved
11382         call of dump_function to...
11383         (optimize_function): Here...
11384         (clone_body): New function, extracted from...
11385         (maybe_clone_body): ... here.  Build decl_map locally and pass
11386         it on to clone_body.
11387         * pt.c, semantics.c: Include tree-inline.h.
11388         * tree.c: Likewise.
11389         (cp_walk_subtrees): New language-specific hook for tree inlining.
11390         (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
11391         cp_is_overload_p, cp_auto_var_in_fn_p,
11392         cp_copy_res_decl_for_inlining): Likewise.
11393         (walk_tree): Move language-specific constructs into...
11394         (cp_walk_subtrees): this new function.
11395         (copy_tree_r): Use language-independent constructs and hooks.
11396         (init_tree): Initialize tree inlining hooks.
11397         (remap_save_expr): Adjust prototype so that the declaration
11398         does not require the definition of splay_tree.
11400 2001-10-03  John David Anglin  <dave@hiauly1.hia.nrc.ca>
11402         * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
11403         to build the declaration instead of the declaration itself.
11405 2001-10-02  Jason Merrill  <jason_merrill@redhat.com>
11407         * decl2.c (cxx_decode_option): Add 'else'.
11409         * spew.c (end_input): No longer static.
11410         * cp-tree.h: Declare it.
11411         * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
11413 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
11415         * call.c (build_over_call), typeck.c (build_function_call_real):
11416         Pass type attributes to check_function_format rather than name or
11417         assembler name.  Don't require there to be a name or assembler
11418         name to check formats.
11420 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
11422         * decl.c (init_decl_processing): Don't call
11423         init_function_format_info.  Initialize lang_attribute_table
11424         earlier.
11425         (builtin_function): Call decl_attributes.
11426         (insert_default_attributes): New.
11428 2001-10-01  Jason Merrill  <jason_merrill@redhat.com>
11430         * decl.c (grokdeclarator): Copy array typedef handling from C
11431         frontend.
11433         * decl.c (grokdeclarator): Copy too-large array handling from C
11434         frontend.
11436 2001-09-29  Alexandre Oliva  <aoliva@redhat.com>
11438         * config-lang.in (target_libs): Added target-gperf, so that we
11439         don't try to build it if C++ is disabled.
11441 2001-09-23  Zack Weinberg  <zack@codesourcery.com>
11443         * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
11444         (cp/errfn.o): Delete rule.
11445         (cp/error.o): Depend on flags.h.
11446         * errfn.c: Delete file.
11447         * cp-tree.h: Declare warn_deprecated.  Remove definitions of
11448         TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
11449         and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
11450         cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
11451         internal_error respectively.  Make cp_deprecated into a macro.
11452         Don't define cp_printer typedef or declare cp_printers.
11453         * error.c: Include flags.h.
11454         Delete: struct tree_formatting_info, print_function_argument_list,
11455         print_declaration, print_expression, print_function_declaration,
11456         print_function_parameter, print_type_id, print_cv_qualifier_seq,
11457         print_type_specifier_seq, print_simple_type_specifier,
11458         print_elaborated_type_specifier, print_rest_of_abstract_declarator,
11459         print_parameter_declaration_clause, print_exception_specification,
11460         print_nested_name_specifier, and definition of cp_printers.
11461         (locate_error): New function.
11462         (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
11463         rewritten in terms of locate_error and diagnostic.c.
11464         (cp_tree_printer): Rename cp_printer; wire up to *_to_string
11465         instead of deleted print_* routines.  Handle %C, %L, %O, %Q also.
11466         (init_error): Adjust to match.
11468 2001-09-22  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11470         * Make-lang.in (CXX_C_OBJS): Add attribs.o.
11472 2001-09-21  Richard Henderson  <rth@redhat.com>
11474         * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
11475         (build_vtbl_initializer): Likewise.
11476         (build_vfn_ref): New.
11477         * cp-tree.h: Declare it.
11478         * call.c (build_over_call): Use it.
11479         * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
11480         * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
11482 2001-09-21  J"orn Rennecke <amylaar@redhat.com>
11484         * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
11486 2001-09-21  Joseph S. Myers  <jsm28@cam.ac.uk>
11488         Table-driven attributes.
11489         * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
11490         * decl2.c (cplus_decl_attributes): Only take one attributes
11491         parameter.
11492         * cp-tree.c (cplus_decl_attributes): Update prototype.
11493         * class.c (finish_struct), decl.c (start_decl, start_function),
11494         decl2.c (grokfield), friend.c (do_friend), parse.y
11495         (parse_bitfield): Update calls to cplus_decl_attributes.
11496         * decl.c (grokdeclarator): Take a pointer to a single ordinary
11497         attribute list.
11498         * decl.h (grokdeclarator): Update prototype.
11499         * decl2.c (grokfield): Take a single ordinary attribute list.
11500         * friend.c (do_friend): Likewise.
11501         * decl.c (shadow_tag, groktypename, start_decl,
11502         start_handler_parms, grokdeclarator, grokparms, start_function,
11503         start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
11504         parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
11505         (process_template_parm, do_decl_instantiation): Pass single
11506         ordinary attribute lists around.
11507         * decl.c (grokdeclarator): Correct handling of nested attributes.
11508         Revert the patch
11509         1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
11510                 * decl.c (grokdeclarator): Embedded attrs bind to the right,
11511                 not the left.
11512         .
11513         * cp-tree.h (cp_valid_lang_attribute): Remove declaration
11514         (cp_attribute_table): Declare.
11515         * decl.c (valid_lang_attribute): Don't define.
11516         (lang_attribute_table): Define.
11517         (init_decl_processing): Initialize lang_attribute_table instead of
11518         valid_lang_attribute.
11519         * tree.c (cp_valid_lang_attribute): Remove.
11520         (handle_java_interface_attribute, handle_com_interface_attribute,
11521         handle_init_priority_attribute): New functions.
11522         (cp_attribute_table): New array.
11523         * decl2.c (import_export_class): Don't use
11524         targetm.valid_type_attribute.
11526 2001-09-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
11528         * Make-lang.in (cp/error.o): Depend on real.h
11529         * error.c: #include "real.h"
11531 2001-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11533         * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
11534         xmalloc/strcpy/strcat.
11536 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11538         * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
11539         Const-ification.
11540         * pt.c (tsubst_decl): Likewise.
11542 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11544         * decl2.c (lang_f_options): Const-ification.
11545         * lex.c (cplus_tree_code_name): Likewise.
11546         * spew.c (yyerror): Likewise.
11548 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
11550         PR c++/3986
11551         * class.c (force_canonical_binfo_r): Check & move an indirect
11552         primary base first.
11553         (force_canonical_binfo): Check that it's not already
11554         canonical.
11555         (mark_primary_virtual_base): Remove BINFO parameter.
11556         (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
11558 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
11560         Remove TYPE_NONCOPIED_PARTS.
11561         * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
11562         CLASSTYPE_PURE_VIRTUALS.
11563         (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
11564         * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
11565         (layout_class_type): Don't call fixup_inline_methods here ...
11566         (finish_struct_1): ... call it here.
11568 2001-09-04  Mark Mitchell  <mark@codesourcery.com>
11570         * decl.c (duplicate_decls): Remove code deadling with
11571         DECL_SAVED_INSNS.
11572         * decl2.c (finish_file): Likewise.
11573         * pt.c (instantiate_decl): Likewise.
11574         * semantics.c (expand_body): Don't defer local functions if
11575         they wouldn't be deferred for some other reason.  Don't
11576         generate RTL for functions that will not be emitted.
11577         (genrtl_start_function): Remove code deadling with
11578         DECL_SAVED_INSNS.
11579         (genrtl_finish_function): Likewise.
11581 2001-09-04  Nathan Sidwell  <nathan@codesourcery.com>
11583         PR c++/4203
11584         * call.c (build_over_call): Do not optimize any empty base
11585         construction.
11587 2001-08-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11589         * error.c (dump_template_decl): Output template parameters
11590         together with their specifiers.
11591         Output `class' prefix for template template parameter.
11592         (dump_decl): Fix formatting.
11594 2001-08-30  Kurt Garloff  <garloff@suse.de>
11596         * optimize.c (inlinable_function_p): Allow only smaller single
11597         functions. Halve inline limit after reaching recursive limit.
11599 2001-08-30  Joern Rennecke <amylaar@redhat.com>
11600             Jason Merrill  <jason_merrill@redhat.com>
11602         * class.c (build_vtable_entry_ref): Subtract in char*, not
11603         ptrdiff_t.
11605 2001-08-23  Jason Merrill  <jason_merrill@redhat.com>
11607         * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
11608         (build_cplus_array_type): Use cp_build_qualified_type, not
11609         TYPE_MAIN_VARIANT, to get an unqualified version.
11611         * decl2.c (grok_alignof): Lose.
11612         (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
11613         * typeck.c (c_alignof): Lose.
11614         * semantics.c (finish_sizeof, finish_alignof): New.
11615         * parse.y: Use them.
11616         * cp-tree.h: Declare them.
11618 2001-08-22  Jason Merrill  <jason_merrill@redhat.com>
11620         * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
11621         Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
11622         * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
11624 2001-08-19  Jakub Jelinek  <jakub@redhat.com>
11626         * typeck2.c (add_exception_specifier): Only require complete type if
11627         not in processing template declaration.
11629 2001-08-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11631         * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
11632         GNU_xref_start_scope and GNU_xref_end_scope.
11634         * tree.c (TYPE_HASH): Moved to ../tree.h.
11636 2001-08-16  Mark Mitchell  <mark@codesourcery.com>
11638         * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
11639         on COMPOUND_EXPRs.
11641 2001-08-14  Richard Henderson  <rth@redhat.com>
11643         * class.c, cp-tree.h (build_vfn_ref): Remove.
11644         * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
11646 2001-08-13  Mark Mitchell  <mark@codesourcery.com>
11648         * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
11649         empty class assignment as having side-effects to avoid
11650         spurious warnings.
11652 2001-08-13  Zack Weinberg  <zackw@panix.com>
11654         * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
11655         * except.c: Include libfuncs.h.
11657 2001-08-11  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
11659         * decl.c (grokdeclarator): Clarify diagnostic message.
11661 2001-08-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11663         * decl2.c (do_nonmember_using_decl): Replace using directive
11664         with using declaration in the error message.
11666 2001-08-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11668         * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
11669         criterion to avoid rebuilding expression tree instead of
11670         processing_template_decl.
11672 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
11674         Support named return value optimization for inlines, too.
11675         * decl.c (finish_function): Nullify returns here.
11676         * semantics.c (genrtl_start_function): Not here.
11677         (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
11678         (nullify_returns_r): No longer static.  Just clear RETURN_EXPR.
11679         Also nullify the CLEANUP_STMT for the nrv.
11680         * cp-tree.h: Declare it.
11681         * optimize.c (declare_return_variable): Replace the nrv with the
11682         return variable.
11683         * typeck.c (check_return_expr): Be more flexible on alignment check.
11684         Ignore cv-quals when checking for a matching type.
11686 2001-08-09  Richard Henderson  <rth@redhat.com>
11688         * decl2.c (finish_objects): Use target hooks instead of
11689         assemble_constructor and assemble_destructor.
11691 2001-08-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
11693         * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
11695 2001-08-07  Nathan Sidwell  <nathan@codesourcery.com>
11697         PR c++/3820
11698         Stop using TYPE_NONCOPIED_PARTS.
11699         * call.c (build_over_call): Be careful when copy constructing
11700         or assigning to an empty class.
11701         * class.c (check_bases_and_members): It has a
11702         COMPLEX_ASSIGN_REF if it has a vptr.
11703         (layout_class_type): Don't add empty class padding to
11704         TYPE_NONCOPIED_PARTS.
11705         (finish_struct_1): Don't add the VFIELD either.
11706         * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
11707         initialization.
11709 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
11711         * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
11713 2001-08-06  Richard Henderson  <rth@redhat.com>
11715         * decl2.c (finish_objects): Pass a symbol_ref and priority to
11716         assemble_{constructor,destructor}.  Remove priority handling.
11718 2001-08-05  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
11720         Don't allow template-id in using-declaration.
11721         * decl2.c (validate_nonmember_using_decl): Handle template-ids.
11722         (do_class_using_decl): Likewise.
11724 2001-08-04  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
11726         * cp/spew.c (read_token): No need to pop buffers.
11728 2001-08-02  Stan Shebs  <shebs@apple.com>
11730         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
11731         (fnaddr_from_vtable_entry): Remove decl.
11732         * method.c (use_thunk): Update comment.
11734 2001-08-01  Andrew Cagney  <ac131313@redhat.com>
11736         * repo.c (get_base_filename): Change return value to const char
11737         pointer.
11739 2001-08-02  Nathan Sidwell  <nathan@codesourcery.com>
11741         Kill -fhonor-std.
11742         * NEWS: Document.
11743         * cp-tree.h (flag_honor_std): Remove.
11744         (CPTI_FAKE_STD): Remove.
11745         (std_node): Remove comment about it being NULL.
11746         (fake_std_node): Remove.
11747         * decl.c (in_fake_std): Remove.
11748         (walk_namespaces_r): Remove fake_std_node check.
11749         (push_namespace): Remove in_fake_std code.
11750         (pop_namespace): Likewise.
11751         (lookup_name_real): Remove fake_std_node check.
11752         (init_decl_processing): Always create std_node. Always add
11753         std:: things there.
11754         (builtin_function): Always put non '_' fns in std.
11755         * decl2.c (flag_honor_std): Remove.
11756         (lang_f_options): Remove honor-std.
11757         (unsupported_options): Add honor-std.
11758         (set_decl_namespace): Remove fake_std_node check.
11759         (validate_nonmember_using_decl): Likewise.
11760         (do_using_directive): Likewise.
11761         (handle_class_head): Likewise.
11762         * dump.c (cp_dump_tree): Likewise.
11763         * except.c (init_exception_processing): Adjust.
11764         * init.c (build_member_call): Remove fake_std_node check.
11765         (build_offset_ref): Likewise.
11766         * lang-options.h: Remove -fhonor-std, -fno-honor-std.
11767         * rtti.c (init_rtti_processing): Adjust.
11769 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
11771         * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
11772         operand while calling cp_tree_equal.
11774 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
11776         The 3.0 ABI no longer has vbase pointer fields.
11777         * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
11778         FORMAT_VBASE_NAME): Remove.
11779         * method.c (do_build_copy_constructor): Adjust.
11780         (do_build_assign_ref): Adjust.
11781         * search.c (lookup_field_r): Adjust.
11782         * typeck.c (build_component_ref): Adjust.
11784         The 3.0 ABI always has a vtable pointer at the start of every
11785         polymorphic class.
11786         * rtti.c (build_headof_sub): Remove.
11787         (build_headof): Adjust.
11788         (get_tinfo_decl_dynamic): No need to check flag_rtti
11789         here. Adjust.
11790         (create_real_tinfo_var): Explain why we need a hidden name.
11792 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
11794         PR c++/3631
11795         * class.c (update_vtable_entry_for_fn): The fixed adjustment
11796         of a virtual thunk should be from declaring base.
11798 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
11800         * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
11801         the shared virtual base, so preserving inheritance graph order.
11803 2001-07-30  Andreas Jaeger  <aj@suse.de>
11805         * decl2.c: Remove unused var global_temp_name_counter.
11807 2001-07-28  Richard Henderson  <rth@redhat.com>
11809         * method.c (pending_inlines): Remove.
11811 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
11813         * class.c (mark_primary_virtual_base): Don't adjust base
11814         offsets here.
11815         (dfs_unshared_virtual_bases): Adjust them here.
11816         (mark_primary_bases): Explain why we adjust at the end.
11818 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
11820         * class.c (finish_struct_1): When copying the primary base's
11821         VFIELD, make sure we find it is at offset zero.
11823 2001-07-26  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11825         * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
11826         tsubst_expr for default template arguments.
11828 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
11830         PR c++/3621
11831         * spew.c (yylex): Only copy the token's lineno, if it is
11832         nonzero.
11834 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
11836         PR c++/3624
11837         * call.c (resolve_args): Simplify, call
11838         convert_from_reference.
11839         (build_new_op): Resolve and convert from reference ARG1
11840         earlier. Adjust ARG2 & ARG3 resolve and conversion.
11842 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
11844         * decl.c (last_function_parm_tags): Remove.
11845         (current_function_parm_tags): Remove.
11846         (init_decl_processing): Adjust.
11847         (start_function): Adjust.
11848         (store_parm_decls): Adjust.
11850         PR c++/3152
11851         * decl.c (grokdeclarator): Detect when a function typedef is
11852         declaring a function, and create last_function_parms correctly.
11854 2001-07-25  Jason Merrill  <jason_merrill@redhat.com>
11856         * call.c (joust): Only prefer a non-builtin candidate to a builtin
11857         one if they have the same signature.
11859         * cvt.c (build_up_reference): Take DECL parm.  Check TREE_STATIC on
11860         it rather than toplevel_bindings_p.  Give it a mangled name if static.
11861         (convert_to_reference): Adjust.
11862         * decl2.c (get_temp_name): Lose.
11863         * mangle.c (mangle_ref_init_variable): New fn.
11864         (mangle_guard_variable): Strip the ref-init header.
11865         * cp-tree.h: Adjust.
11866         * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
11867         initializer.
11868         (grok_reference_init): Always use DECL_INITIAL.
11870 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
11872         PR c++/3416
11873         * call.c (build_conditional_expr): Recheck args after
11874         conversions.
11875         * cp-tree.h (build_conditional_expr): Move to correct file.
11876         * typeck.c (decay_conversion): Diagnose any unknown types
11877         reaching here.
11878         (build_binary_op): Don't do initial decay or default
11879         conversions on overloaded functions.
11880         (build_static_cast): Don't do a decay conversion here.
11882 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
11884         PR c++/3543
11885         * typeck.c (condition_conversion): Resolve an OFFSET_REF.
11886         * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
11888 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
11890         * class.c (build_vtbl_or_vbase_field): Remove, move into ...
11891         (create_vtbl_ptr): ... here.
11893 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
11895         * class.c (build_vbase_offset_vbtl_entries): Look for
11896         non-primary base of which we are a sub vtable.
11898 2001-07-24  Phil Edwards  <pme@sources.redhat.com>
11900         * semantics.c (finish_this_expr):  Remove unused code.
11902 2001-07-24  Nathan Sidwell  <nathan@codesourcery.com>
11904         Simplify rtti, now we've only one ABI.
11905         * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
11906         CPTI_TINFO_VAR_ID.
11907         (tinfo_decl_id, tinfo_var_id): Remove.
11908         (get_typeid_1): Remove.
11909         * rtti.c
11910         (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
11911         (typeid_ok_p): New function.
11912         (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
11913         (get_tinfo_decl): Remove old abi documentation.
11914         (tinfo_from_decl): Remove.
11915         (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
11916         (get_typeid_1): Remove.
11917         (get_base_offset): Remove.
11918         (synthesize_tinfo_var): Absorb get_base_offset.
11919         (create_real_tinfo_var): Don't use tinfo_decl_id.
11921 2001-07-23  Graham Stott  <grahams@redhat.com>
11923         * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
11924         variable has_two_argument_delete_p.
11926 2001-07-21  Nathan Sidwell  <nathan@codesourcery.com>
11928         Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
11929         * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
11930         (CPTI_INDEX_IDENTIFIER): Remove.
11931         (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
11932         (delta2_identifier): Remove.
11933         (index_identifier): Remove.
11934         (pfn_or_delta2_identifier): Remove.
11935         (flag_vtable_thunks): Remove.
11936         (VTABLE_DELTA2_NAME): Remove.
11937         (VTABLE_INDEX_NAME): Remove.
11938         (FNADDR_FROM_VTABLE_ENTRY): Adjust.
11939         (vfunc_ptr_type_node): Adjust.
11940         (VTABLE_NAME_PREFIX): Adjust.
11941         (build_vfn_ref): Lose first parameter.
11942         (fixup_all_virtual_upcast_offsets): Remove.
11943         * decl.c (initialize_predefined_identifiers): Remove
11944         delta2_identifier, index_identifier, pfn_or_delta2_identifier.
11945         (init_decl_processing): Remove no-vtable-thunk code.
11946         * decl2.c (flag_vtable_thunks): Remove.
11947         (mark_vtable_entries): Remove no-vtable-thunk code.
11948         * error.c (dump_decl): Remove no-vtable-thunk code.
11949         (dump_expr): Adjust ptr to member function code.
11950         * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
11951         code.
11952         * rtti.c (build_headof): Remove no-vtable-thunk code.
11953         (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
11954         * search.c (get_base_distance): Remove expand_upcast_fixups case.
11955         (virtual_context) Remove.
11956         (expand_upcast_fixups): Remove.
11957         (fixup_virtual_upcast_offsets): Remove.
11958         (fixup_all_virtual_upcast_offsets): Remove.
11959         * typeck.c (get_member_function_from_ptrfunc): Remove
11960         no-vtable-thunk code.
11961         * call.c (build_over_call): Adjust call to build_vfn_ref.
11962         * class.c (build_vfn_ref): Lose first parameter. Remove
11963         no-vtable-thunk code.
11964         (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
11965         (build_vtable_entry): Remove no-vtable-thunk code.
11967 2001-07-20  Nathan Sidwell  <nathan@codesourcery.com>
11969         Remove old-abi remnants. Remove comments about old abi
11970         behavior. Remove references to 'new-abi' in comments.
11971         * cp-tree.h: Adjust comments.
11972         (vbase_offsets_in_vtable_p): Delete.
11973         (vcall_offsets_in_vtable_p): Delete.
11974         (vptrs_present_everywhere_p): Delete.
11975         (all_overridden_vfuns_in_vtables_p): Delete.
11976         (merge_primary_and_secondary_vtables_p): Delete.
11977         (TYPE_CONTAINS_VPTR_P): Adjust.
11978         (VTT_NAME_PREFIX): Remove.
11979         (CTOR_VTBL_NAME_PREFIX): Remove.
11980         (init_vbase_pointers): Remove.
11981         * class.c: Adjust coments.
11982         (build_vbase_pointer_fields): Delete.
11983         (build_vbase_pointer): Remove old-abi code.
11984         (build_secondary_vtable): Likewise.
11985         (modify_all_vtables): Likewise.
11986         (create_vtable_ptr): Likewise.
11987         (layout_class_type): Likewise.
11988         (finish_struct_1): Likewise.
11989         (finish_vtbls): Likewise.
11990         (dfs_finish_vtbls): Delete.
11991         (build_vbase_offset_vtbl_entries): Remove old-abi code.
11992         * cvt.c: Adjust comments.
11993         * decl.c: Adjust comments.
11994         * decl2.c: Adjust comments.
11995         * init.c: Adjust comments.
11996         (construct_virtual_bases): Remove old-abi code.
11997         * lang-specs.h: Remove -fno-new-abi.
11998         * mangle.c: Adjust comments.
11999         * rtti.c: Adjust comments.
12000         (get_base_offset): Remove old-abi-code.
12001         * search.c: Adjust comments.
12002         (dfs_init_vbase_pointers): Remove.
12003         (dfs_vtable_path_unmark): Remove.
12004         (init_vbase_pointers): Remove.
12005         * semantics.c: Adjust comments.
12006         (emit_associated_thunks): Remove old-abi code.
12007         * typeck.c: Adjust comments.
12009 2001-07-20  Daniel Berlin  <dan@cgsoftware.com>
12011         * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
12012         params.h.
12014 2001-07-19  Mark Mitchell  <mark@codesourcery.com>
12016         * class.c (finish_struct_anon): Forbid nested classes.
12018 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
12020         * decl2.c: Don't include dwarfout.h and dwarf2out.h.
12021         * optimize.c: Include debug.h.
12022         (maybe_clone_body): Use debug hook.
12023         * semantics.c: Include debug.h.
12024         (expand_body): Use debug hook.
12026 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
12028         * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
12030 2001-07-18  Mark Mitchell  <mark@codesourcery.com>
12032         * class.c (type_requires_array_cookie): New function.
12033         (check_methods): Don't try to figure out whether the type needs a
12034         cookie here.
12035         (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
12036         * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
12037         (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
12038         * pt.c (instantiate_class_template): Don't set
12039         TYPE_VEC_DELETE_TAKES_SIZE.
12040         * NEWS: Document ABI changes from GCC 3.0.
12042 2001-07-18  Xavier Delacour <xavier@fmaudio.net>,
12043             Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
12045         * NEWS (Changes in GCC 3.0): Fix typo.
12047 2001-07-13  Joseph S. Myers  <jsm28@cam.ac.uk>
12049         * decl2.c (cplus_decl_attributes): Take a pointer to the node to
12050         which attributes are to be attached, and a flags argument.  Update
12051         call to decl_attributes.
12052         (grokfield): Update call to decl_attributes.
12053         * class.c (finish_struct): Update call to cplus_decl_attributes.
12054         * cp-tree.h (cplus_decl_attributes): Update prototype.
12055         * decl.c (start_decl, grokdeclarator, start_function): Update
12056         calls to decl_attributes and cplus_decl_attributes.
12057         * friend.c (do_friend): Update call to cplus_decl_attributes.
12058         * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
12060 2001-07-12  Mark Mitchell  <mark@codesourcery.com>
12062         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
12063         for `register' variables with an asm-specification.
12065 2001-07-11  Mark Mitchell  <mark@codesourcery.com>
12067         * semantics.c (finish_asm_stmt): Mark the output operands
12068         to an asm addressable, if necessary.
12070 2001-07-11  Ben Elliston  <bje@redhat.com>
12072         * Revert this change -- there is a subtle bug.
12074         PR c++/80
12075         * decl.c (finish_enum): New "attributes" argument; pass it to
12076         cplus_decl_attributes.  Use a narrower type if the enum is packed.
12077         * cp-tree.h (finish_enum): Adjust prototype.
12078         * parse.y (enum_head): New non-terminal.
12079         (structsp): Use it. Enums now may be preceded or followed by
12080         optional attributes -- pass their chained tree to finish_enum().
12081         * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
12083 2001-07-10  Mark Mitchell  <mark@codesourcery.com>
12085         * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
12086         variables.
12088 2001-07-10  Jason Merrill  <jason_merrill@redhat.com>
12090         * semantics.c (cp_expand_stmt): Fix for null
12091         current_function_return_value.
12093 2001-07-10  Jan van Male  <jan.vanmale@fenk.wau.nl>
12095         * call.c (build_op_delete_call): Initialize fn.
12096         (convert_like_real): Delete conditional.
12097         (joust): Initialize *w and *l.
12098         * class.c: Add prototype for binfo_ctor_vtable.
12099         (get_primary_binfo): Initialize result.
12100         * init.c (build_java_class_ref): Initialize name.
12102 2001-07-09  Erik Rozendaal  <dlr@acm.org>
12104         * typeck.c (unary_complex_lvalue): Do not duplicate the
12105         argument to modify, pre-, or post-increment when used as an
12106         lvalue and when the argument has side-effects.
12108 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
12110         * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
12111         (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES.  Call
12112         cplus_decl_attributes even if attrs is NULL.
12113         * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
12115 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
12117         * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
12118         calls to decl_attributes.
12120 2001-07-06  Ira Ruben   <ira@apple.com>
12122         * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
12123         be DECL_TEMPLATE_RESULT.
12125 2001-07-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12127         * cp-tree.h (copy_template_template_parm): Rename to ...
12128         (bind_template_template_parm): ... here.
12129         * tree.c (copy_template_template_parm): Rename to ...
12130         (bind_template_template_parm): ... here.  Remove the case when
12131         NEWARGS is NULL_TREE.
12132         (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
12133         BOUND_TEMPLATE_TEMPLATE_PARM.
12134         * pt.c (lookup_template_class): Adjust.
12136 2001-07-05  Jason Merrill  <jason_merrill@redhat.com>
12138         * cvt.c (convert_lvalue): New fn.
12139         * cp-tree.h: Declare it.
12140         * method.c (do_build_assign_ref): Use it.
12141         (do_build_copy_constructor): Convert parm to base types
12142         before calling base constructors.
12144         * typeck.c (check_return_expr): Check DECL_ALIGN instead of
12145         DECL_USER_ALIGN.  Check flag_elide_constructors instead of
12146         optimize.
12147         * semantics.c (cp_expand_stmt): Don't destroy the named return value.
12149 2001-07-02  Nathan Sidwell  <nathan@codesourcery.com>
12151         * optimize.c (optimize_inline_calls): New function, broken out
12152         of ...
12153         (optimize_function): ... here. Call it. Don't inline if it is
12154         a thunk.
12155         (dump_function): Print name of dump flag causing this dump.
12156         * semantics.c (expand_body): Move thunk inline check to
12157         optimize_function.
12159 2001-06-29  Joseph S. Myers  <jsm28@cam.ac.uk>
12161         * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
12162         (comptypes): Use target.comp_type_attributes.
12164 2001-06-29  Nathan Sidwell  <nathan@codesourcery.com>
12166         * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
12168 2001-06-28  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
12170         * error.c (lang_print_error_function): Add a `diagnostic_context *'
12171         parameter. Tweak.
12173 2001-06-27  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
12175         * decl2.c (import_export_class): Update.
12177 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
12179         * error.c (init_error): Adjust settings.
12181 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
12183         * error.c (init_error): Adjust settings.
12185 2001-06-19  Richard Sandiford  <rsandifo@redhat.com>
12187         * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
12188         return pointers to data members by reference rather than by value.
12190 2001-06-18  Jason Merrill  <jason_merrill@redhat.com>
12192         Implement the Named Return Value optimization.
12193         * cp-tree.h (struct cp_language_function): Add x_return_value.
12194         (current_function_return_value): Now a macro.
12195         * decl.c: Don't define it.
12196         (define_label, finish_case_label): Don't clear it.
12197         (init_decl_processing): Don't register it with GC.
12198         * semantics.c (genrtl_finish_function): Don't check it for
12199         no_return_label.  Copy the RTL from the return value to
12200         current_function_return_value and walk, calling...
12201         (nullify_returns_r): ...this new fn.
12202         * typeck.c (check_return_expr): Set current_function_return_value.
12204 2001-06-15  Jason Merrill  <jason_merrill@redhat.com>
12206         * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
12207         sharing a ctor vtable with.  Merge code for cases 1 and 2.
12208         (binfo_ctor_vtable): New fn.
12209         (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
12211 2001-06-14  Jason Merrill  <jason_merrill@redhat.com>
12213         * class.c (dfs_find_final_overrider): Fix logic.
12215         * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
12216         virtual thunk instead of non-virtual.
12217         (get_matching_virtual): Uncomment.
12219         * pt.c (unify): Don't recurse between the POINTER_TYPE and the
12220         OFFSET_TYPE.  If we're adding cv-quals, the extra ones would be on
12221         PARM, not ARG.
12223 2001-06-14  Nathan Sidwell  <nathan@codesourcery.com>
12225         * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
12226         we've not emerged from the hierarchy of RTTI_BINFO on reaching
12227         a non-virtual base.
12229 2001-06-13  Mark Mitchell  <mark@codesourcery.com>
12231         * NEWS: Update release number.
12233 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
12235         PR c++/3130, c++/3131, c++/3132
12236         * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
12237         * class.c (force_canonical_binfo_r): Move
12238         BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
12239         virtual bases unless they're primary and what they're primary
12240         too has been moved.
12241         (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
12242         with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
12243         BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
12244         derived binfo.
12245         (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
12246         (layout_nonempty_base_or_field): Add most derived type
12247         parameter. Adjust.
12248         (layout_empty_base): Likewise.
12249         (build_base_field): Likewise.
12250         (build_base_fields): Likewise.
12251         (propagate_binfo_offsets): Add most derived type
12252         parameter. Skip non canonical virtual bases too.
12253         (dfs_set_offset_for_unshared_vbases): Don't skip primary
12254         bases. Do skip canonical bases.
12255         (layout_virtual_bases): Adjust.
12256         (layout_class_type): Adjust.
12257         (dfs_get_primary_binfo): Build list of virtual primary base
12258         candidates.
12259         (get_primary_binfo): Check that the shared virtual primary
12260         base candidate was found first.
12261         (accumulate_vtbl_inits): Don't do anything for non-vptr
12262         containing binfos. For case 1 primary virtual bases, keep
12263         checking that we've not emerged from the hierarchy of RTTI_BINFO.
12265 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
12267         PR c++/3089
12268         * class.c (dfs_accumulate_vtbl_inits): Always walk down the
12269         hierarchy looking for primary bases for a ctor
12270         vtable. Recursively call oneself, if we meet our primary via
12271         this route and haven't met it yet via inheritance graph order.
12273 2001-06-11  Mark Mitchell  <mark@codesourcery.com>
12275         * lang-options.h: Emit documentation for -fno-honor-std, not
12276         -fhonor-std.
12278 2001-06-10  Alexandre Oliva  <aoliva@redhat.com>
12280         * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
12281         Don't clobber delta.
12282         (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
12284 2001-06-10  Mark Mitchell <mark@codesourcery.com>
12285             Gabriel Dos Reis  <gdr@codesourcery.com>
12287         * Make-lang.in (cp/call.o): Depend on diagnostic.h
12288         (cp/typeck.o): Depend on diagnostic.h
12289         (cp/typeck2.o): Depend on diagnostic.h
12290         (cp/repo.o): Depend on dignostic.h
12291         * typeck.c: #include diagnostic.h
12292         (convert_for_initialization): Remove extern declaration for
12293         warningcount and errorcount.
12295         * call.c: #include diagnostic.h
12296         (convert_like_real): Remove extern declaration for warnincount and
12297         errorcount.
12299         * repo.c: #include diagnostic.h
12300         * typeck2.c: #include diagnostic.h
12302 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
12304         * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
12305         in previous change.
12307 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
12309         PR c++/2929
12310         * friend.c (do_friend): Use push_decl_namespace for classes at
12311         namespace scope.
12313 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
12314             Jason Merrill <jason_merrill@redhat.com>
12316         PR c++/3061
12317         * class.c (build_secondary_vtable): Use assert, rather than an error
12318         message.
12319         (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
12320         (dfs_accumulate_vtbl_inits): A lost primary virtual base may
12321         be between ORIG_BINFO and RTTI_BINFO, but neither of them.
12322         Don't set BINFO_VTABLE for a primary virtual base.
12324 2001-06-07  Mark Mitchell  <mark@codesourcery.com>
12326         * decl.c (duplicate_decls): Update source position information
12327         when a template function is defined.
12329 2001-06-07  Phil Edwards  <pme@sources.redhat.com>
12331         * lang-specs.h:  Move -D_GNU_SOURCE to config/linux.h.
12333 2001-06-07  Nathan Sidwell  <nathan@codesourcery.com>
12335         PR c++/2914
12336         * decl.c (pushtag): Don't push into a complete type's scope.
12338 2001-06-06  Jason Merrill  <jason_merrill@redhat.com>
12340         * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
12341         (struct lang_decl_flags): Lose generate_with_vtable_p.
12342         (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
12343         * class.c (copy_virtuals): Adjust.
12344         * decl2.c (mark_vtable_entries): Adjust.
12345         * method.c (make_thunk, build_vtable_entry): Adjust.
12346         * class.c (update_vtable_entry_for_fn): Only look as far as the
12347         first defining class.
12348         (build_vtbl_initializer): Put nothing in the slot for a function only
12349         defined in a lost primary virtual base.
12350         (add_vcall_offset_vtbl_entries_1): Use the same code for
12351         the lost primary case and the normal case.
12352         (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
12353         (get_vfield_offset, get_derived_offset): Lose.
12354         (dfs_find_final_overrider): Use look_for_overrides_here.
12355         (get_matching_virtual): New fn.
12356         * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
12357         not BV_VCALL_INDEX.
12358         * search.c (look_for_overrides_here): Split out from...
12359         (look_for_overrides_r): Here.
12361         * class.c (find_final_overrider): Return error_mark_node on error.
12363         * decl2.c (key_method): #if 0 accidental change.
12365 2001-06-06  John David Anglin  <dave@hiauly1.hia.nrc.ca>
12367         * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
12368         (build_over_call): Likewise.
12369         * decl.c (grokparms): Likewise.
12370         * pt.c (tsubst_decl): Likewise.
12371         * typeck.c (convert_arguments): Likewise.
12373 2001-06-05  Mark Mitchell  <mark@codesourcery.com>
12375         * semantics.c (begin_class_definition): Robustify.
12377         * pt.c (instantiate_decl): Tell the repository code about the
12378         clones, not the cloned functions.
12379         * repo.c (repo_template_used): Explicitly instantiate the cloned
12380         function, not the clones.
12382 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
12384         * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
12385         ICS_BAD_FLAG on created conversion.
12386         (compare_ics): Break out rank.
12388 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
12390         * decl.c (xref_tag): Remove extraneous %s on dependent name
12391         lookup warning.
12393 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
12395         * class.c (layout_vtable_decl): Fix off by one error on
12396         build_index_type.
12397         (build_vtt): Likewise.
12398         (build_ctor_vtbl_group): Likewise.
12400 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
12402         * class.c (maybe_indent_hierarchy): New function.
12403         (dump_class_hierarchy_r): Add flags. Dump extra binfo
12404         information, if enabled. Use maybe_indent_hierarchy. Adjust
12405         output format.
12406         (dump_class_hierarchy): Adjust prototype. Adjust output format.
12407         (dump_array, dump_vtable, dump_vtt): New functions.
12408         (finish_struct_1): Adjust hierarchy dumping.
12409         (initialize_vtable): Call dump_vtable.
12410         (build_vtt): Call dump_vtt.
12411         (build_ctor_vtbl_group): Call dump_vtable.
12412         * decl2.c (flag_dump_class_layout): Remove.
12413         (cxx_decode_option): Remove dump translation unit
12414         and dump class hierarchy check. Call dump_switch_p.
12415         (finish_file): Adjust dumping.
12416         (dump.c): Only dump base classes if not TDF_SLIM.
12417         Only dump namespace members if not TDF_SLIM.
12418         * optimize.c (dump_function): New function.
12419         (optimize_function): Call dump_function.
12420         * semantics.c (expand_body): Use dump_enabled_p.
12422 2001-06-01  Nathan Sidwell  <nathan@codesourcery.com>
12424         PR g++/2936
12425         Part missed from first commit
12426         * decl2.c (finish_anon_union): Copy context.
12428 2001-05-30  Nathan Sidwell  <nathan@codesourcery.com>
12430         PR g++/2936
12431         * optimize.c (remap_decl): Remap anonymous aggregate members too.
12433 2001-05-26  Nathan Sidwell  <nathan@codesourcery.com>
12435         PR g++/2823
12436         * semantics.c (expand_body): Don't optimize thunks.
12438 2001-05-25  Sam TH  <sam@uchicago.edu>
12440         * cp-tree.h lex.h: Fix header include guards.
12442 2001-05-25  Mark Mitchell <mark@codesourcery.com>
12444         * decl.c (init_decl_processing): Tweak.
12446 2001-05-24  Mark Mitchell  <mark@codesourcery.com>
12448         * decl.c (duplicate_decls): Tidy.
12449         (init_decl_processing): Always set flag_no_builtin.
12451 2001-05-24  Nathan Sidwell  <nathan@codesourcery.com>
12453         PR c++/2184
12454         * decl2.c (do_local_using_decl): Push the decls, even in a
12455         template.
12457 2001-05-22  Mark Mitchell  <mark@codesourcery.com>
12459         * optimize.c (initialize_inlined_parameters): Don't set
12460         TREE_READONLY for a VAR_DECL taking the place of an inlined
12461         PARM_DECL.
12463 2001-05-22  Jason Merrill  <jason_merrill@redhat.com>
12465         * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
12466         * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
12467         attribute.
12469 2001-05-22  Joseph S. Myers  <jsm28@cam.ac.uk>
12471         * parse.y: Refer to compound literals as such, not as
12472         constructor-expressions.
12474 2001-05-21  Mark Mitchell  <mark@codesourcery.com>
12476         * call.c (build_op_delete_call): Ignore exception-specifications
12477         when looking for matching delete operators.
12478         * init.c (build_new_1): Compute whether or not the allocation
12479         function used is a placement allocation function or not, and
12480         communicate this information to build_op_delete_call.
12482 2001-05-21  Jason Merrill  <jason_merrill@redhat.com>
12484         * class.c (build_vtable_entry_ref): Lose vtbl parm.  Fix for new abi.
12485         (build_vtbl_ref): Adjust.
12486         (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
12487         * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
12488         Re-add vtable-gc.
12489         (unsupported_options): Correspondingly.
12491         * decl2.c (maybe_make_one_only): Check flag_weak, not
12492         supports_one_only().
12494         * cp-tree.def (START_CATCH_STMT): Lose.
12495         * dump.c (cp_dump_tree): Don't dump it.  Do dump HANDLER_PARMS.
12496         * tree.c (cp_statement_code_p): Don't case it.
12497         * semantics.c (cp_expand_stmt): Likewise.
12498         * cp-tree.h (START_CATCH_TYPE): Lose.
12499         (HANDLER_TYPE): New.
12500         * except.c (expand_start_catch_block): Don't start any blocks.
12501         Return the type.
12502         (expand_end_catch_block): Don't end any blocks.
12503         * parse.y (handler): Don't pass anything from finish_handler_parms
12504         to finish_handler.
12505         * pt.c (tsubst_expr): Likewise.
12506         * semantics.c (begin_handler): Call note_level_for_catch here.
12507         (finish_handler_parms): Don't return anything.
12508         (genrtl_catch_block, begin_catch_block): Lose.
12509         (genrtl_handler): Call expand_start_catch here.
12511 2001-05-18  Jason Merrill  <jason_merrill@redhat.com>
12513         * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
12514         (get_vtable_decl, build_vtt): Not here.
12516 2001-05-20  Nathan Sidwell  <nathan@codesourcery.com>
12518         PR c++/2781
12519         * optimize.c (update_cloned_parm): Copy addressability and other
12520         flags.
12522 2001-05-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12524         * pt.c (determine_specialization): Ignore artificial functions.
12526 2001-05-20  Neil Booth  <neil@daikokuya.demon.co.uk>
12528         * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
12529         (C_RID_CODE): Remove.
12530         * lex.c (cxx_init_options): Call set_identifier_size.  Update.
12531         (init_parse): Don't do it here.
12533 2001-05-18  Diego Novillo  <dnovillo@redhat.com>
12535         * decl2.c (finish_objects): Use the original SYMBOL_REF from the
12536         function declaration to avoid stripping the symbol's attributes.
12538 2001-05-18  Nathan Sidwell  <nathan@codesourcery.com>
12540         * decl.c (pushdecl): Adjust error string.
12541         (xref_tag): Adjust friend class injection warning. Remove the
12542         inherited name from the class shadowed scope.
12544 2001-05-17  Mark Mitchell  <mark@codesourcery.com>
12546         * except.c (cp_protect_cleanup_actions): New function.
12547         (init_exception_processing): Don't set protect_cleanup_actions
12548         here.  Do set lang_protect_cleanup_actions.
12550 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
12552         * spew.c (read_token): Call yyerror on all unexpected tokens.
12554 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
12556         * init.c (member_init_ok_or_else): Take a tree rather than
12557         string for name.
12558         (expand_member_init): Adjust.
12560 2001-05-14  Nick Clifton  <nickc@cambridge.redhat.com>
12562         * decl.c (duplicate_decls): Suppress warning about duplicate
12563         decls if the first decl is a friend.
12565 2001-05-12  Zack Weinberg  <zackw@stanford.edu>
12567         * except.c (choose_personality_routine): Export.  Add
12568         explanatory comment.  Take an enum languages, not a boolean.
12569         (initialize_handler_parm): Adjust to match.
12570         * cp-tree.h: Prototype choose_personality_routine.
12571         * lex.c (handle_pragma_java_exceptions): New function.
12572         (init_cp_pragma): Register #pragma GCC java_exceptions.
12574 2001-05-12  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
12576         * method.c (build_mangled_C99_name): Remove unused prototype.
12578 2001-05-12  Alexandre Oliva  <aoliva@redhat.com>
12580         * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
12581         * typeck.c (get_member_function_from_ptrfunc,
12582         build_ptrmemfunc, expand_ptrmemfunc_cst): Take
12583         TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
12585         Reverted Geoff Keating's 2001-05-03's patch.
12587 2001-05-11  Ira Ruben   <ira@apple.com>
12589         * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
12591 2001-05-11  Neil Booth  <neil@daikokuya.demon.co.uk>
12593         * cp-tree.h (finish_label_expr, lookup_label): Delete.
12594         * parse.y: Update for '&&'; don't issue warning here.
12595         * semantics.c (finish_label_expr): Delete.
12597 2001-05-07  Mark Mitchell  <mark@codesourcery.com>
12599         * splay-tree.h (splay_tree_max): New function.
12600         (splay_tree_min): Likewise.
12602 2001-05-03  Geoffrey Keating  <geoffk@redhat.com>
12604         * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
12605         (pfn_vflag_identifier): Define.
12606         Update comment about layout of pointer functions.
12607         (build_ptrmemfunc1): Update prototype.
12608         (expand_ptrmemfunc_cst): Update prototype.
12609         * decl.c (initialize_predefined_identifiers): Initialize
12610         pfn_vflag_identifier.
12611         (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
12612         an extra field to the type.
12613         * expr.c (cplus_expand_constant): Pass 'flag' between
12614         expand_ptrmemfunc_cst and build_ptrmemfunc1.
12615         * typeck.c (get_member_function_from_ptrfunc): When
12616         FUNCTION_BOUNDARY < 16, look at additional field to determine
12617         if a pointer-to-member is a real pointer or a vtable offset.
12618         (build_ptrmemfunc1): Add new parameter to contain extra field.
12619         (build_ptrmemfunc): Pass the extra field around.
12620         (expand_ptrmemfunc_cst): Add new parameter to return extra field.
12621         (pfn_from_ptrmemfunc): Ignore the extra field.
12623 2001-05-03  Mark Mitchell  <mark@codesourcery.com>
12625         * cp-tree.h (flag_inline_trees): Update documentation.
12626         * decl.c (init_decl_processing): Adjust handling of
12627         flag_inline_functions and flag_inline_trees to support -O3.
12628         (grokfndecl): Set DECL_INLINE on all functions if that's what
12629         the user requested.
12630         (save_function_data): Clear DECL_INLINE in
12631         current_function_cannot_inline is non-NULL.
12632         * decl2.c (flag_inline_trees): Update documentation.
12634 2001-05-03  Nathan Sidwell  <nathan@codesourcery.com>
12636         * dump.c (cp_dump_tree, USING_STMT case): New case.
12637         * tree.c (cp_statement_code_p): Add USING_STMT.
12638         * decl2.c (do_using_directive): Add the using directive statement.
12640         * tree.c (walk_tree): Reformat an if block.
12642 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
12644         * decl.c (compute_array_index_type): Don't try to do anything with
12645         the indices when processing a template.
12647 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12649         * call.c: NULL_PTR -> NULL.
12650         * class.c: Likewise.
12651         * cvt.c: Likewise.
12652         * decl.c: Likewise.
12653         * decl2.c: Likewise.
12654         * except.c: Likewise.
12655         * init.c: Likewise.
12656         * rtti.c: Likewise.
12657         * search.c: Likewise.
12658         * tree.c: Likewise.
12659         * typeck.c: Likewise.
12660         * typeck2.c: Likewise.
12662 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
12664         * decl2.c (do_using_directive): Revert previous patch.
12666 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
12668         * cp-tree.def (USING_STMT): New statement node.
12669         * cp-tree.h (USING_STMT_NAMESPACE): New macro.
12670         * decl2.c (do_using_directive): Add USING_STMT to statement
12671         tree. Don't emit errors when processing template decl.
12672         * pt.c (tsubst_expr, USING_STMT case): New case.
12673         * semantics.c (cp_expand_stmt, USING_STMT case): New case.
12675 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
12677         * call.c (build_new_op): Convert args from reference here.
12678         (build_conditional_expr): Don't convert here.
12680 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
12682         * spew.c (last_token_id): New static variable.
12683         (read_token): Set it here.
12684         (yyerror): Use it here.
12686 2001-04-30  Richard Henderson  <rth@redhat.com>
12688         * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
12689         * decl.c: Likewise.
12691 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
12693         * gxxint.texi: Remove.
12694         * Make-lang.in: Remove all traces of gxxint.texi.
12696 2001-04-30  Mark P Mitchell  <mark@codesourcery.com>
12698         * decl2.c (start_static_initialization_or_destruction): Correct
12699         logic to handle the -fno-use-cxa-atexit case.
12701 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
12703         * optimize.c (update_cloned_parm): New function.
12704         (maybe_clone_body): Use it.  Update the `this' parameter too.
12706 2001-04-29  Joseph S. Myers  <jsm28@cam.ac.uk>
12708         * decl2.c (unsupported_options): Add new-abi.
12709         * lang-options.h: Remove no longer supported options.
12711 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
12713         * except.c (can_convert_eh): Don't check template parms,
12714         typename types etc.
12716 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
12718         * optimize.c (maybe_clone_body): Copy parameter names and locations.
12720 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
12722         * cp-tree.h (adjust_clone_args): Prototype new function.
12723         * class.c (adjust_clone_args): New function.
12724         * decl.c (start_function): Call it for in charge ctors.
12726 2001-04-26  Mark Mitchell  <mark@codesourcery.com>
12728         * method.c (use_thunk): Make sure that thunks really are emitted
12729         when requested.
12731 2001-04-26  Nathan Sidwell <nathan@codesourcery.com>
12733         * mangle.c (write_chars): New macro.
12734         (hwint_to_ascii): New function
12735         (write_number): Use it.
12736         (write_integer_cst): Deal with really big numbers.
12738 2001-04-25  Mark Mitchell  <mark@codesourcery.com>
12740         * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
12741         the clone.
12743 2001-04-25  Nathan Sidwell  <nathan@codesourcery.com>
12745         * decl.c (grokdeclarator): Set context of namespace scope
12746         TYPE_DECLS.
12748 2001-04-24  Zack Weinberg  <zackw@stanford.edu>
12750         * cp/optimize.c: Include hashtab.h.
12751         (struct inline_data): Add tree_pruner.
12752         (expand_call_inline, expand_calls_inline): Use it when calling
12753         walk_tree.
12754         (optimize_function): Initialize and free tree_pruner.
12756 2001-04-24  Nathan Sidwell <nathan@codesourcery.com>
12758         Lazy __FUNCTION__ generation.
12759         * cp-tree.def (FUNCTION_NAME): Remove.
12760         * cp-tree.h (function_name_declared_p): Remove.
12761         (cp_fname_init): Prototype.
12762         * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
12763         don't call declare_function_name. Call start_fname_decls.
12764         (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
12765         clobber the line number.
12766         (cp_fname_init): New function.
12767         (start_function): Call start_fname_decls.
12768         (finish_function): Call finish_fname_decls.
12769         * lex.c (reswords): Add slots for __FUNCTION__ et al.
12770         (rid_to_yy): Add mappings for __FUNCTION__ et al.
12771         * optimize.c (maybe_clone_body): Remove function_name_declared_p.
12772         * parse.y (VAR_FUNC_NAME): New token.
12773         (primary): Add VAR_FUNC_NAME.
12774         * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
12775         generation.
12776         (tsubst, FUNCTION_NAME case): Remove.
12777         (tsubst_copy, FUNCTION_NAME case): Remove.
12778         (tsubst_expr, DECL_STMT case): Be careful with a
12779         DECL_PRETTY_FUNCTION_P.
12780         (instantiate_decl): Remove function_name_declared_p.
12781         * semantics.c (begin_compound_statement): Don't call
12782         declare_function_name here.
12783         (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
12784         (finish_translation_unit): Call finish_fname_decls.
12785         (expand_body): Remove function_name_declared_p.
12786         * typeck2.c (digest_init): Allow any ERROR_MARK.
12788 2001-04-24  Nathan Sidwell  <nathan@codesourcery.com>
12790         * pt.c (tsubst_decl): Use VOID_TYPE_P.
12791         * semantics.c: Fix some typos.
12793 2001-04-23  Phil Edwards  <pme@sources.redhat.com>
12795         * cp/decl2.c (flag_honor_std):  Always initialize to 1.
12797 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12799         * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
12801 2001-04-23  Jason Merrill  <jason_merrill@redhat.com>
12803         * except.c (build_throw): Wrap the initialization of the exception
12804         object in a MUST_NOT_THROW_EXPR.
12805         (do_free_exception): #if 0.
12807 2001-04-20  Mark Mitchell  <mark@codesourcery.com>
12809         * cp-tree.h (finish_enum): Change prototype.
12810         * decl.c (finish_enum): Reorganize.
12811         * parse.y (structsp): Adjust calls to finish_enum.
12813 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
12815         * tree.c (cp_tree_equal): Adjust final switch formatting. Add
12816         't' case.
12818 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
12820         * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
12821         (layout_empty_base): Return at end flag.
12822         (build_base_field): Likewise.
12823         (build_base_fields): Likewise.
12824         (layout_virtual_bases): Don't add 1 to eoc value.
12825         (end_of_class): Use full size for empty bases.
12826         (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
12827         empty bases. Don't add 1 to eoc value. Only add trailing padding
12828         if we're an empty class with no empty bases.
12829         (dump_class_hierarchy): Dump size and alignment.
12831 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
12833         * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
12834         ICS_BAD_FLAG.
12836 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
12838         * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
12839         is found, look first if name does not match the structure name.
12841 2001-04-19  Mark Mitchell  <mark@codesourcery.com>
12843         * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
12844         set.
12845         (SET_DECL_LANGUAGE): New macro.
12846         * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
12847         (pushdecl): Likewise.
12848         (build_library_fn_1): Likewise.
12849         (build_cp_library_fn): Likewise.
12850         (grokfndecl): Likewise.
12851         (grokvardecl): Mark `extern "C"' variables as having C linkage.
12852         * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
12853         * lex.c (retrofit_lang_decl): Likewise.
12854         * mangle.c (mangle_decl_string): Don't mangle the names of
12855         variables declared with C language linkage.
12856         * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
12858 2001-04-18  John David Anglin  <dave@hiauly1.hia.nrc.ca>
12860         * semantics.c (simplify_aggr_init_exprs_r): Don't restore
12861         flag_access_control from uninitialized storage.
12863 2001-04-15  Mark Mitchell  <mark@codesourcery.com>
12865         * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
12866         * mangle.c (write_pointer_to_member_type): Fix mangling of
12867         pointers to cv-qualified member function types.
12869         * init.c (build_delete): Create a SAVE_EXPR for the address if
12870         we're going to use it more than once.
12872 2001-04-13  Mark Mitchell  <mark@codesourcery.com>
12874         * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
12875         (expand_ptremfunc_cst): Change prototype.
12876         (delta2_from_ptrmemfunc): Remove.
12877         * expr.c (cplus_expand_constant): Adjust call to
12878         expand_ptrmemfunc_cst.
12879         * typeck.c (build_ptrmemfunc1): Simplify.
12880         (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
12881         results in a constant.
12882         (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
12883         (delta2_from_ptrmemfunc): Remove.
12884         (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
12886 2001-04-12  Jason Merrill  <jason_merrill@redhat.com>
12888         * cp-tree.h (decl_namespace_list): New macro.
12889         (struct saved_scope): Add decl_ns_list.
12890         * decl.c (mark_saved_scope): Mark it.
12891         * decl2.c: Lose static decl_namespace_list.
12892         (init_decl2): Don't save it.
12894 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12896         * cp-tree.h (warn_return_type, yylex): Delete redundant
12897         declarations.
12899         * decl.c (current_class_depth, global_namespace): Likewise.
12901         * decl2.c (current_class_depth, flag_gnu_xref): Likewise
12903         * repo.c (flag_use_repository): Likewise.
12905 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12907         * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
12908         set_block, pushdecl, getdecls, gettags, init_decl_processing,
12909         maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
12910         lvalue_or_else, print_lang_statistics, comp_target_types,
12911         unsigned_type, signed_type, signed_or_unsigned_type,
12912         build_function_call, mark_addressable, incomplete_type_error):
12913         Delete redundant declarations.
12915 2001-04-11  Jason Merrill  <jason_merrill@redhat.com>
12917         * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
12918         (TYPE_ANONYMOUS_P): New macro.
12919         (TAGGED_TYPE_P): New macro.
12920         * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
12921         (grokfndecl, grokvardecl, grokdeclarator): Likewise.
12922         * tree.c (no_linkage_helper): Likewise.
12923         * semantics.c (begin_class_definition): Likewise.
12924         * pt.c (convert_template_argument): Likewise.
12925         * lex.c (check_for_missing_semicolon): Likewise.
12927 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
12929         * class.c (dfs_unshared_virtual_bases): New function.
12930         (mark_primary_bases): Call it.
12931         (check_bases): Ignore virtual bases when determining
12932         nearly-emptiness.
12934 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
12936         * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
12938 2001-04-11  Mark Mitchell  <mark@codesourcery.com>
12940         * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
12941         cloned function to the clone.
12943 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12945         * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
12947         * semantics.c: Include expr.h.
12949 2001-04-11  Nathan Sidwell  <nathan@codesourcery.com>
12951         * method.c (implicitly_declare_fn): Commonize code for copy ctor
12952         and assignment op. Set TREE_USED for parameter.
12954 2001-04-10  Mark Mitchell  <mark@codesourcery.com>
12956         * class.c (find_final_overrider_data): Add `candidates'.
12957         (dfs_find_final_overrider): Don't issue error messages
12958         prematurely.
12959         (find_final_overrider): Issue error messages here.
12960         (build_base_field): Don't warn about amgibuous direct bases here.
12961         (warn_about_ambiguous_direct_bases): New function.
12962         (layout_class_type): Use it.
12964 2001-04-10  Richard Henderson  <rth@redhat.com>
12966         * typeck.c (build_array_ref): Push the array reference inside
12967         COMPOUND_EXPR and COND_EXPR.
12969 2001-04-05  Mark Mitchell  <mark@codesourcery.com>
12971         * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
12972         * decl.c (duplicate_decls): Adjust accordingly.
12973         (maybe_commonize_var): Likewise.
12974         (grokfndecl): Likewise.
12975         (start_function): Likewise.
12976         (start_method): Likewise.
12977         * decl2.c (key_method): Likewise.
12978         (import_export_decl): Likewise.
12979         * method.c (implicitly_declare_fn): Likewise.
12980         * optimize.c (maybe_clone_body): Likewise.
12982 2001-04-05  Benjamin Kosnik  <bkoz@redhat.com>
12984         * lang-specs.h: Add __DEPRECATED.
12986 2001-04-05  J"orn Rennecke <amylaar@redhat.com>
12988         * search.c (get_dynamic_cast_base_type): When building a new
12989         constant, set its type to ssizetype.
12991 2001-04-04  Jakub Jelinek  <jakub@redhat.com>
12993         * optimize.c (expand_call_inline): Only add newly inlined statements
12994         into inlined_stmts.
12996 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
12998         * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
12999         (OPERATOR_FORMAT): Likewise.
13000         (OPERATOR_TYPENAME_FORMAT): Likewise.
13001         * operators.def: Remove old name-mangling information.
13002         * decl.c (grok_op_properties): Adjust accordingly.
13003         * lex.c (init_operators): Likewise.
13004         * rtti.c (get_tinfo_decl): Issue error messages about types that
13005         have variable size.
13007 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
13009         * decl2.c (import_export_decl): Don't call import_export_class
13010         when processing an inline member function.
13011         * semantics.c (expand_body): Call import_export_decl before
13012         emitting inline functions.
13014 2001-03-28  Richard Henderson  <rth@redhat.com>
13016         IA-64 ABI Exception Handling:
13017         * cp-tree.def (EH_SPEC_BLOCK): New.
13018         (MUST_NOT_THROW_EXPR): New.
13019         * cp-tree.h: Update changed function declarations.
13020         (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
13021         (CPTI_CALL_UNEXPECTED): New.
13022         (struct cp_language_function): Rename x_eh_spec_try_block
13023         to x_eh_spec_block.
13024         (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
13025         * decl.c (current_binding_level): If no current function
13026         bindings, revert to scope_chain.
13027         (initialize_predefined_identifiers): Remove __cp_push_exception.
13028         (store_parm_decls): Use begin_eh_spec_block.
13029         (finish_function): Use finish_eh_spec_block.
13030         (mark_lang_function): Update for name changes.
13031         * decl2.c (finish_file): No mark_all_runtime_matches.
13032         * dump.c (cp_dump_tree): Handle new tree codes.
13033         * error.c (dump_expr) [BIND_EXPR]: Fix typo.
13034         * except.c (catch_language_init, catch_language): Remove.
13035         (init_exception_processing): Don't set language code.
13036         Initialize call_unexpected_node, protect_cleanup_actions,
13037         eh_personality_libfunc, lang_eh_runtime_type.
13038         (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
13039         (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
13040         (prepare_eh_type): Split out type canonicalizations ...
13041         (build_eh_type_type): ... from here.
13042         (build_eh_type_type_ref): Remove.
13043         (mark_all_runtime_matches): Remove.
13044         (build_exc_ptr): New.
13045         (do_begin_catch, do_end_catch): New.
13046         (do_pop_exception): Remove.
13047         (build_terminate_handler): Remove.
13048         (choose_personality_routine): Split out language choice from ...
13049         (initialize_handler_parm): ... here.
13050         Use MUST_NOT_THROW_EXPR.
13051         (expand_start_catch_block): Use do_begin_catch.  Simplify Java
13052         exception object handling.
13053         (expand_start_eh_spec, expand_end_eh_spec): Remove.
13054         (expand_exception_blocks, alloc_eh_object): Remove.
13055         (begin_eh_spec_block, finish_eh_spec_block): New.
13056         (do_allocate_exception, do_free_exception): New.
13057         (expand_throw): Merge into ...
13058         (build_throw): ... here.  Update for abi.
13059         * expr.c (cplus_expand_expr): No expand_internal_throw.
13060         Handle MUST_NOT_THROW_EXPR.
13061         * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
13062         * semantics.c (*) Update for except.h name changes.
13063         (genrtl_try_block): No protect_with_terminate.
13064         (genrtl_eh_spec_block): New.
13065         (genrtl_handler): Don't emit the goto here.
13066         (cp_expand_stmt): Handle EH_SPEC_BLOCK.
13067         (genrtl_finish_function): Don't expand_exception_blocks.
13068         * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
13070 2001-03-28  Richard Henderson  <rth@redhat.com>
13072         * decl.c (struct named_label_list): Rename eh_region to
13073         in_try_scope, add in_catch_scope.
13074         (struct binding_level): Rename eh_region to is_try_scope,
13075         add is_catch_scope.
13076         (note_level_for_try): Rename from note_level_for_eh.
13077         (note_level_for_catch): New.
13078         (poplevel): Copy both is_try_scope and is_catch_scope to
13079         the named_label_list struct.
13080         (check_previous_goto_1): Don't check for catch block via
13081         DECL_ARTIFICIAL; use in_try_scope instead.
13082         (check_goto): Likewise.
13083         * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
13084         * except.c (expand_start_catch_block): Call note_level_for_catch.
13085         * semantics.c (begin_compound_stmt): Update for note_level_for_try.
13087 2001-03-27  Richard Henderson  <rth@redhat.com>
13089         * except.c: Use USING_SJLJ_EXCEPTIONS instead of
13090         exceptions_via_longjmp.
13092 2001-03-27  Phil Edwards  <pme@sources.redhat.com>
13094         * pt.c (check_default_tmpl_args):  Make error messages clearer.
13096 2001-03-26  Phil Edwards  <pme@sources.redhat.com>
13098         * error.c:  Also undefine 'A' macro used for cp_printers definition.
13100 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13102         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
13104 2001-03-26  Mike Yang <yang@research.att.com>
13105             Mark Mitchell  <mark@codesourcery.com>
13107         * dump.c (dump_access): New function.
13108         (cp_dump_tree): Use it.  Dump basetype information for class
13109         types.
13111 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
13113         * Makefile.in (optimize.o): Depend on params.h.
13114         (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
13115         (init_decl_processing): Set flag_no_inline when doing
13116         inlining-on-trees.
13117         * optimize.c: Include params.h.
13118         (struct inline_data): Improve documentation of FNS.  Add
13119         FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
13120         (INSNS_PER_STMT): New macro.
13121         (remap_block): Use CLONING_P.
13122         (inlinable_function_p): Don't inline big functions.
13123         (expand_call_inline): Keep track of how much inlining we've done.
13124         (optimize_function): Set FIRST_INLINED_FN.
13125         (maybe_clone_body): Set CLONING_P.
13126         * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
13127         tree nodes.
13128         (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
13129         rest_of_compilation.  Clear DECL_RTL for local variables
13130         afterwards.
13131         (clear_decl_rtl): New function.
13133 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>
13135         Implement DR 209
13136         * cp-tree.h (skip_type_access_control,
13137         reset_type_access_control): Prototype.
13138         * decl.c (grokdeclarator): Access of friends is not checked.
13139         * parse.y (component_decl_list): Reset type access control.
13140         * semantics.c (decl_type_access_control): Clear
13141         current_type_lookups.
13142         (save_type_access_control): Don't save if not deferring.
13143         (skip_type_access_control, reset_type_access_control): New
13144         functions.
13145         (begin_class_definition): Do type access control for basetypes.
13146         Start deferred access control.
13147         (finish_class_definition): Resume immediate access control if
13148         this is a local class.
13150 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13152         * class.c (add_method): Use memcpy/memmove, not bcopy.
13154         * decl.c (duplicate_decls): Likewise.
13156 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
13158         * mangle.c (write_discriminator): Use `_0' for discriminator 1,
13159         not `_'.
13161 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
13163         * decl.c (local_names): Define.
13164         (push_local_name): New.
13165         (grok_reference_init): Return init if initializing static reference
13166         variable with non-constant instead of emitting it.
13167         Move expand_static_init call to cp_finish_decl.
13168         (layout_var_decl): Call push_local_name.
13169         (maybe_commonize_var): Allow inlining functions even if they have
13170         static local variables, use comdat_linkage for them if flag_weak.
13171         (check_initializer): Call obscure_complex_init if
13172         grok_reference_init returned nonzero.
13173         (save_function_data): Clear x_local_names.
13174         (pop_cp_function_context): Free x_local_names.
13175         (mark_inlined_fns): Remove.
13176         (mark_lang_function): Mark x_local_names.
13177         (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
13178         Mark inlined_fns as tree, remove call to mark_inlined_fns.
13179         * class.c (alter_access): Ensure DECL_ACCESS is never set if
13180         DECL_DISCRIMINATOR_P.
13181         * cp-tree.h (cp_language_function): Add x_local_names.
13182         (lang_decl_flags): Add discriminator into u2.
13183         (lang_decl_inlined_fns): Remove.
13184         (lang_decl): inlined_fns is now a TREE_VEC.
13185         (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
13186         * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
13187         TREE_VEC, not a custom structure.
13188         (optimize_function): Likewise.
13189         * mangle.c (discriminator_for_local_entity): Discriminate among
13190         VAR_DECL local entities.
13191         * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
13192         is not valid.
13194 2001-03-22  Bryce McKinlay  <bryce@albatross.co.nz>
13196         Add support for Java interface method calls.
13197         * cp-tree.h (struct lang_type): Add java_interface flag.
13198         (TYPE_JAVA_INTERFACE): New macro.
13199         * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
13200         by setting TYPE_JAVA_INTERFACE.
13201         * call.c (java_iface_lookup_fn): New static.
13202         (build_over_call): If calling a method declared in a
13203         TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
13204         expression which resolves the function address.
13205         (build_java_interface_fn_ref): New function.
13207 2001-03-22  Richard Henderson  <rth@redhat.com>
13209         * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
13210         * except.c: Don't include it.
13212 2001-03-22  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
13213             based on an idea from Joe Buck <jbuck@synopsys.com>
13215         * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
13216         New nonterminals.
13217         (data_def, component_decl): Add reductions to bad_decl.
13219 2001-03-22  Jakub Jelinek  <jakub@redhat.com>
13221         * method.c (do_build_assign_ref): Don't use build_modify_expr for
13222         anonymous aggregates, since they don't have assignment operator
13223         method.
13224         * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
13225         assignment operators for anonymous structure fields.
13227 2001-03-21  Jason Merrill  <jason@redhat.com>
13229         * pt.c (instantiate_decl): Abort if we see a member constant
13230         instantiation that doesn't already have its initializer.
13231         Downgrade explicit instantiation without definition to pedwarn.
13233         * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
13234         * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
13235         (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
13237         * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
13238         (pending_vtables): Remove.
13239         * decl2.c (pending_vtables): Remove.
13240         (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
13241         CLASSTYPE_VTABLE_NEEDS_WRITING.
13242         (import_export_class): Likewise.
13243         (init_decl2): Don't mark pending_vtables.
13244         * lex.c (handle_pragma_vtable): Just sorry.
13245         * pt.c (instantiate_class_template): Don't mess with
13246         CLASSTYPE_VTABLE_NEEDS_WRITING.
13247         (mark_class_instantiated): Likewise.
13248         * ptree.c (print_lang_type): Don't print it.
13249         * semantics.c (begin_class_definition): Don't set it.
13251         * pt.c (template_tail): Replace with last_pending_template.
13252         (maybe_templates, maybe_template_tail): Remove.
13253         (add_pending_template): Adjust.
13254         (instantiate_pending_templates): Adjust.
13256         * cp-tree.h (struct saved_scope): Remove lang_stack field.
13257         (current_lang_stack): Remove.
13258         * decl.c (maybe_push_to_top_level): Don't initialize it.
13259         (duplicate_decls): Use current_lang_depth.
13260         (xref_basetypes): Likewise.
13261         * class.c (current_lang_depth): New fn.
13262         (push_lang_context): Use more varray functionality.
13263         (pop_lang_context): Likewise.
13265         * error.c (GLOBAL_THING): Always use '__'.
13267 2001-03-21  Mark Mitchell  <mark@codesourcery.com>
13269         * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
13271         * mangle.c (mangle_decl_string): Mangle the names of overloaded
13272         operators, even when they have `extern "C"' linkage.
13274 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
13276         * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
13277         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
13278         where it's not necessary.
13279         (add_method): Remove optimization involving comparison of
13280         DECL_ASSEMBLER_NAME.
13281         (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
13282         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
13283         where it's not necessary.
13284         (check_methods): Likewise.
13285         (build_clone): Likewise.
13286         (built_vtt): Likewise.
13287         * cp-tree.h (DECL_NEEDED_P): Likewise.
13288         * decl.c (pushtag): Likewise.
13289         (duplicate_decls): Likewise.
13290         (pushdecl): Likewise.
13291         (builtin_function): Likewise.
13292         (build_library_fn_1): Set DECL_LANGUAGE for library functions.
13293         (build_cp_library_fn): Likewise.
13294         (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
13295         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
13296         where it's not necessary.
13297         (make_rtl_for_nonlocal_decl): Likewise.
13298         (cp_finish_decl): Likewise.
13299         (grokfndecl): Likewise.
13300         (grokvardecl): Likewise.
13301         (grokdeclarator): Likewise.
13302         (start_function): Likewise.
13303         (cp_missing_return_ok_p): Likewise.
13304         * decl2.c (grokclassfn): Likewise.
13305         (check_classfn): Likewise.
13306         (finish_static_data_member_decl): Likewise.
13307         (grokfield): Likewise.
13308         * error.c (GLOBAL_IORD_P): Remove.
13309         (dump_global_iord): Improve output.
13310         (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
13311         * except.c (nothrow_libfn_p): Summarily reject any function not in
13312         namespace-scope.
13313         * init.c (build_java_class_ref): Don't explicitly set
13314         DECL_ASSEMBLER_NAME after calling mangle_decl.
13315         * mangle.c (mangle_decl_string): Handle extern "C" functions.
13316         (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
13317         * method.c (set_mangled_name_for_decl): Don't explicitly set
13318         DECL_ASSEMBLER_NAME after calling mangle_decl.
13319         (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
13320         IDENTIFIER_GLOBAL_VALUE for the thunk.
13321         * pt.c (set_mangled_name_for_template_decl): Remove.
13322         (check_explicit_specialization): Don't use it.
13323         (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
13324         (tsubst_friend_function): Likewise.
13325         (tsubst_decl): Likewise.
13326         (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
13327         * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
13328         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
13329         where it's not necessary.
13330         (tinfo_base_init): Likewise.
13331         (create_real_tinfo_var): Likewise.
13332         * search.c (looup_field_1): Likewise.
13333         * semantics.c (finish_named_return_value): Likewise.
13334         * tree.c (init_tree): Set lang_set_decl_assembler_name.
13336 2001-03-15  Gabriel Dos Reis  <gdr@codesourcery.com>
13338         Correct semantics restrictions checking in throw-expression.
13339         * except.c (is_admissible_throw_operand): New function.
13340         (build_throw): Use it.
13342 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
13344         * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
13345         and its ilk.
13347 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
13349         * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
13350         * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
13351         * decl.c (duplicate_decls): Likewise.
13352         (builtin_function): Likewise.
13353         (build_library_fn): Likewise.
13354         (build_cp_library_fn): Likewise.
13355         (check_initializer): Likewise.
13356         (cp_finish_decl): Likewise.
13357         * decl2.c (grokfield): Likewise.
13358         (grok_function_init): Remove #if 0'd code.
13359         (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
13360         * friend.c (do_friend): Likewise.
13361         * init.c (get_temp_regvar): Likewise.
13362         * method.c (make_thunk): Likewise.
13363         * pt.c (tsubst_friend_function): Likewise.
13364         (tsubst_decl): Likewise.
13365         (regenerate_decl_from_template): Likewise.
13366         * semantics.c (genrtl_named_return_value): Likewise.
13367         (expand_body): Likewise.
13368         (genrtl_finish_function): Likewise.
13369         * tree.c (cp_tree_equal): Likewise.
13371 2001-03-12  Nathan Sidwell  <nathan@codesourcery.com>
13373         * call.c (convert_like_real): Add extra semantics to INNER
13374         parameter. Don't convert to temporary if a user conversion
13375         gives us an lvalue that we're about to bind to a reference.
13376         Set INNER to indicate pending reference binding on recursive
13377         calls.
13379 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
13381         * cp/lex.c: Delete duplicate pending_lang_change.
13383 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
13385         * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
13386         Similarly.
13387         * cp/repo.c (get_base_filename, open_repo_file): Similarly.
13388         * cp/cp-tree.h: Remove file_name_nondirectory prototype.
13390 2001-03-09  Zack Weinberg  <zackw@stanford.edu>
13392         * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
13394 2001-03-08  Stan Shebs  <shebs@apple.com>
13396         * cp-tree.h (set_identifier_local_value): Remove unused decl.
13398 2001-03-06  Zack Weinberg  <zackw@stanford.edu>
13400         * spew.c: Remove references to CPP_OSTRING.
13402 2001-03-06  Andrew Haley  <aph@redhat.com>
13404         * typeck.c (convert_arguments): Check that we have an fndecl.
13406 2001-03-05  Andrew Haley  <aph@redhat.com>
13408         * typeck.c (convert_arguments): Don't do ellipsis conversion for
13409         __built_in_constant_p.
13411 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
13413         * typeck.c (build_static_cast): Allow enum to enum conversions
13414         as per DR 128.
13416 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
13418         * class.c (check_field_decls): Pointers to member do not a
13419         non-pod struct make, as per DR 148.
13421 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
13423         * call.c (joust): cp_pedwarn when using gnu extension concerning
13424         worst conversion sequences.
13426 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
13428         * decl.c: Replace all uses of 'boolean' with 'bool'.
13430 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
13432         * lang-specs.h: Add zero initializer for cpp_spec field to
13433         all array elements that need one.  Don't put an #ifdef inside
13434         the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
13435         use it.
13437 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
13439         Implement using decls inside template functions.
13440         * decl2.c (validate_nonmember_using_decl): Don't special case
13441         fake_std_node in the global namespace. Don't reject early when
13442         processing a template.
13443         (do_local_using_decl): Add to statement tree. Don't do further
13444         processing when building a template.
13445         * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
13447 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
13449         * decl2.c (do_nonmember_using_decl): Don't complain if we find
13450         same function. Do complain about ambiguating extern "C"
13451         declarations.
13453 2001-02-28  Nathan Sidwell  <nathan@codesourcery.com>
13455         Remove floating point and complex type template constant parms.
13456         * pt.c (convert_nontype_argument): Remove REAL_TYPE and
13457         COMPLEX_TYPE extensions.
13458         (invalid_nontype_parm_type_p): Likewise.
13460 2001-02-27  Jeffrey Oldham  <oldham@codesourcery.com>
13462         * except.c (call_eh_info): Revert "match_function"'s type.
13464 2001-02-27  Nathan Sidwell  <nathan@codesourcery.com>
13466         Fix ctor vtable vcall offsets.
13467         * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
13468         (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
13469         (get_matching_base): Remove.
13470         (get_original_base): New function.
13471         (build_vtbl_initializer): Initialize vid.rtti_binfo.
13472         Use a virtual thunk for a ctor vtable with an index
13473         (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
13474         primary base within a constructor vtable. Only set
13475         BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
13476         when primary base has been lost.
13477         * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
13479 2001-02-26  Jeffrey Oldham  <oldham@codesourcery.com>
13481         * call.c (joust): Ensure more_specialized()'s argument length
13482         parameter has correct value for constructors.
13484 2001-02-26  Nathan Sidwell  <nathan@codesourcery.com>
13486         * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
13488         * decl.c (mark_inlined_fns): Prototype.
13490 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
13492         * spew.c (yylex): Correct handling of friends.
13494 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
13496         * mangle.c (write_encoding): Pass write_function_type the
13497         FUNCTION_DECL for the function being encoded.
13498         (write_function_type): Pass it along to write_bare_function_type.
13499         (write_bare_function_type): Pass it along to write_method_parms.
13500         (write_method_parms): Don't mangle the compiler-generated
13501         parameters to a constructor or destructor.
13503 2001-02-22  Andreas Jaeger  <aj@suse.de>
13505         * optimize.c: Include toplev.h for
13506         note_deferral_of_defined_inline_function prototype.
13508 2001-02-22  Jakub Jelinek  <jakub@redhat.com>
13510         * cp-tree.h (struct lang_decl_inlined_fns): New.
13511         (struct lang_decls): Add inlined_fns.
13512         (DECL_INLINED_FNS): New macro.
13513         * optimize.c (struct inline_data): Add inlined_fns.
13514         (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
13515         (inlinable_function_p): Likewise, fix typo in comment,
13516         function is not inlinable if it already inlined function currently
13517         being optimized.
13518         (expand_call_inline): Add fn to inlined_fns if necessary.
13519         (optimize_function): Initialize inlined_fns.
13520         Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
13521         * decl.c (mark_inlined_fns): New function.
13522         (lang_mark_tree): Call it.
13524 2001-02-21  Jason Merrill  <jason@redhat.com>
13526         * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
13527         (DECL_UNINLINABLE): Move to middle-end.
13529         * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
13530         * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
13531         * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
13532         * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
13533         parms and outer BLOCK.  note_deferral_of_defined_inline_function.
13535         * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
13536         second parm of op=.
13538 2001-02-19  Mark Mitchell  <mark@codesourcery.com>
13540         * decl2.c (set_decl_namespace): Allow explicit instantiations in
13541         any namespace.
13543 2001-02-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
13545         * optimize.c (expand_call_inline): Don't walk subtrees of type
13546         nodes.
13548 2001-02-18  Mark Mitchell  <mark@codesourcery.com>
13550         * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
13551         for a destructor.
13553 2001-02-18  Jason Merrill  <jason@redhat.com>
13555         Do put the VTT parameter in DECL_ARGUMENTS.
13556         * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
13557         (current_vtt_parm): New macro.
13558         (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
13559         (DECL_HAS_VTT_PARM_P): New macro.
13560         (DECL_VTT_PARM): Remove.
13561         (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
13562         * decl.c (duplicate_decls): Only copy the operator code if
13563         appropriate.
13564         (start_function): Set current_vtt_parm.
13565         (lang_mark_tree): Don't mark vtt_parm.
13566         * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
13567         DECL_ARGUMENTS.  Set DECL_HAS_VTT_PARM_P.
13568         * class.c (build_clone): Maybe remove the VTT parm.
13569         * optimize.c (maybe_clone_body): Set up the VTT parm.
13570         * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
13571         * call.c (build_over_call): Just allow the VTT arg.
13572         * method.c (make_thunk): Don't set DECL_VTT_PARM.
13573         (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
13574         (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
13575         * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
13576         * error.c (dump_function_decl): Likewise.
13577         * call.c (build_user_type_conversion_1, convert_like_real): Abort
13578         if we try to call a constructor with in-charge or VTT parms.
13579         * method.c (skip_artificial_parms_for): New fn.
13580         * call.c (add_function_candidate, build_over_call): Call it.
13581         * call.c (build_new_method_call): Use current_vtt_parm.
13582         * init.c (expand_virtual_init): Likewise.
13583         * class.c (same_signature_p): No longer static.
13584         * cp-tree.h: Declare it.
13585         * search.c (look_for_overrides_r): Use it.
13587 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
13589         * cp-tree.h (new_abi_rtti_p): Remove.
13590         (name_mangling_version): Likewise.
13591         (flag_do_squangling): Likewise.
13592         * class.c (build_rtti_vtbl_entries): Remove old ABI support.
13593         * decl.c (grokfndecl): Likewise.
13594         * decl2.c (name_mangling_version): Remove.
13595         (flag_do_squangling): Likewise.
13596         (lang_f_options): Remove `squangle'.
13597         (unsupported_options): Add `squangle'.
13598         (cxx_decode_option): Issue a warning about uses of
13599         -fname-mangling-version.
13600         (finish_file): Remove old ABI support.
13601         * pt.c (check_explicit_specialization): Likewise.
13602         (tsubst_decl): Likewise.
13603         * rtti.c (init_rtti_processing): Likewise.
13604         (build_headof): Likewise.
13605         (get_tinfo_decl_dynamic): Likewise.
13606         (tinfo_from_decl): Likewise.
13607         (build_dynamic_cast_1): Likewise.
13608         (synthesize_tinfo_var): Likewise.
13609         * init.c (build_new): Allow enumeration types for the array-bounds
13610         in a direct-new-declarator.
13612         * semantics.c (finish_typeof): Resolve OFFSET_REFs.
13614         * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
13615         TREE_PROTECTED from the template being specialized.
13617 2001-02-17  Jason Merrill  <jason@redhat.com>
13619         * decl2.c (build_artificial_parm): Set TREE_READONLY.
13621         * decl.c (bad_specifiers): Allow throw specs on things with
13622         pointer-to-function or -member-function type.
13623         * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
13624         a pmf.
13626 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
13628         * call.c (check_dtor_name): Handle template names correctly.
13630 2001-02-16  Jason Merrill  <jason@redhat.com>
13632         * cp-tree.h (DECL_USE_VTT_PARM): Remove.
13633         * decl2.c (maybe_retrofit_in_chrg): Don't create it.
13634         * optimize.c (maybe_clone_body): Don't substitute it.
13635         * call.c (build_new_method_call): Check in_chrg instead.
13636         * init.c (expand_virtual_init): Likewise.
13638 2001-02-16  Gabriel Dos Reis  <gdr@codesourcery.com>
13640         * decl.c (check_tag_decl): Make sure a typedef for an anonymous
13641         class-type introduces at least a type-name.
13643 2001-02-16  Jakub Jelinek  <jakub@redhat.com>
13645         * call.c (convert_like_real): Create a temporary for non-lvalue.
13647 2001-02-16  Jeffrey Oldham  <oldham@codesourcery.com>
13649         * cp-tree.h: Fix typos in comments.
13651 2001-02-16  Jason Merrill  <jason@redhat.com>
13653         * optimize.c (remap_block): If we're compiling a clone, pass the
13654         new block to insert_block.
13656 2001-02-16  Mark Mitchell  <mark@codesourcery.com>
13658         * semantics.c (finish_asm_stmt): Robustify.
13660 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
13662         * pt.c (push_template_decl_real): Don't remangle the name of a
13663         class template.
13665 2001-02-15  Jim Meyering  <meyering@lucent.com>
13667         * Make-lang.in (c++.install-common): Depend on installdirs.
13668         (c++.install-info): Likewise.
13669         (c++.install-man): Likewise.
13671 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
13673         * typeck2.c (build_m_component_ref): Robustify.
13675 2001-02-15  Alexandre Oliva  <aoliva@redhat.com>
13677         * friend.c (do_friend): Don't take the nested [template] class
13678         into account when deciding whether to warn about the friend
13679         function not referring to a template function.
13681 2001-02-14  Jakub Jelinek  <jakub@redhat.com>
13683         * typeck.c (build_unary_op): Clarify error message.
13685 2001-02-08  Aldy Hernandez  <aldyh@redhat.com>
13687         * parse.y (component_constructor_declarator): allow optional
13688         parentheses around constructor class name.
13690 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
13692         * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
13693         section.
13694         * init.c (emit_base_init): Remove incorrect comment about
13695         virtual bases.
13696         * method.c (make_thunk): Fix comment alignment.
13698 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
13700         Kill remnants of this is variable.
13701         * cp-tree.h (flag_this_is_variable): Remove.
13702         * decl2.c (flag_this_is_variable): Remove.
13703         * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
13704         (build_vbase_path): The path is non-static, even in a cdtor.
13705         (resolves_to_fixed_type_p): Add additional return value.
13706         * search.c (init_vbase_pointers): Adjust.
13707         * tree.c (lvalue_p_1): Adjust.
13708         * typeck.c (mark_addressable): Adjust.
13710 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
13712         * pt.c (unify): Don't check cv quals of array types.
13714 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
13716         * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
13717         check whether we already have the type.
13719 2001-02-13  Mark Mitchell  <mark@codesourcery.com>
13721         * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
13722         * call.c (build_op_delete_call): Simplify to remove duplicate
13723         code.
13724         * class.c (clone_function_decl): Don't build the deleting variant
13725         of a non-virtual destructor.
13726         * decl.c (finish_destructor_body): Don't call delete if this is a
13727         non-virtual destructor.
13728         * init.c (build_delete): Explicitly call `operator delete' when
13729         deleting an object with a non-virtual destructor.
13731 2001-02-13  Jason Merrill  <jason@redhat.com>
13733         * lang-specs.h: Add more __EXCEPTIONS.
13735 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
13737         * typeck2.c (process_init_constructor): Check
13738         TREE_HAS_CONSTRUCTOR before issuing missing init warning.
13740 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
13742         * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
13743         Remove spurious information in comment. Allow further
13744         adjustments of REFERENCE_TYPE args.
13746 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
13748         * errfn.c (cp_deprecated): Tweak diagnostic text.
13749         * parse.y (new_initializer): Deprecate initializer lists
13750         extension.
13752 2001-02-12  Mark Mitchell  <mark@codesourcery.com>
13754         Remove old ABI support.
13756 2001-02-11  Mark Mitchell  <mark@codesourcery.com>
13758         * decl2.c (flag_vtable_thunks): Always set it to 1.
13759         (flag_new_abi): Likewise.
13760         * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
13762         * Makefile.in (g++spec.o): Fix typo.
13764 2001-02-09  Jason Merrill  <jason@redhat.com>
13766         * lang-specs.h: Restore definition of __EXCEPTIONS.
13768 2001-02-08  Jason Merrill  <jason@redhat.com>
13770         * search.c (shared_member_p): New function.
13771         (lookup_field_r): Use it.
13772         * cp-tree.h (SHARED_MEMBER_P): Remove.
13774         * method.c (process_overload_item): Handle template-dependent array
13775         bounds.
13776         * pt.c (type_unification_real): If we end up with undeduced nontype
13777         parms, try again.
13779         * decl.c (lookup_name_real): Tweak warning to refer to decls, not
13780         types.
13782         * typeck2.c (friendly_abort): Don't say anything if we have
13783         earlier errors or sorries.
13785         * decl.c (check_tag_decl): Notice attempts to redefine bool and
13786         wchar_t.  Ignore if in_system_header.
13788         * decl.c (maybe_push_cleanup_level): New fn...
13789         (start_decl_1): ...split out from here.
13790         * cvt.c (build_up_reference): Use it.
13791         * cp-tree.h: Declare it.
13793 2001-02-07  Mark Mitchell  <mark@codesourcery.com>
13795         * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
13796         spec.
13798 2001-02-06  Nathan Sidwell  <nathan@codesourcery.com>
13800         * pt.c (lookup_template_class): Make sure it's a primary
13801         template or template_template_parm when called from the parser.
13802         (instantiate_template_class): Add assertion.
13804 2001-02-05  Alexandre Oliva  <aoliva@redhat.com>
13806         * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
13807         from error_mark_node.
13809 2001-02-05  Nathan Sidwell  <nathan@codesourcery.com>
13811         Fix specification and implementation bugs in V3 ABI
13812         construction vtables.
13813         * cp-tree.h (flag_dump_class_layout): New flag.
13814         (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
13815         (BINFO_LOST_PRIMARY_P): New flag.
13816         (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
13817         (BINFO_PRIMARY_MARKED_P): Rename to ...
13818         (BINFO_PRIMARY_P): ... here.
13819         (binfo_via_virtual): New prototype.
13820         * decl2.c (flag_dump_class_layout): New flag.
13821         (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
13822         use `=' as a file name separator.
13823         * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
13824         bases.
13825         (build_vtbl_address): If this is a virtual primary base, then
13826         get the vtbl of what it is ultimately primary for.
13827         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
13828         for BINFO_PRIMARY_P.
13829         (dfs_skip_nonprimary_vbases_markedp): Likewise.
13830         (get_shared_vbase_if_not_primary): Likewise.
13831         (dfs_get_pure_virtuals): Likewise.
13832         (expand_upcast_fixups): Likewise.
13833         (fixup_virtual_upcast_offsets): Likewise.
13834         (dfs_find_vbase_instance): Likewise.
13835         (find_vbase_instance): Likewise.
13836         (binfo_from_vbase): Adjust comment to reflect reality.
13837         (binfo_via_virtual): New function.
13838         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
13839         for binfo walking during VTT construction.
13840         (dfs_mark_primary_bases): Remove.
13841         (force_canonical_binfo_r): New function.
13842         (force_canonical_binfo): New function.
13843         (mark_primary_virtual_base): New function.
13844         (mark_primary_bases): Walk in inheritance graph order, use
13845         mark_primary_virtual_base.
13846         (determine_primary_base): Use some more intermediate variables.
13847         (dfs_find_final_overrider): Don't check for overriding along a
13848         virtual path.
13849         (dfs_modify_vtables): Walk into primary virtual bases too.
13850         (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
13851         (build_base_fields): Likewise.
13852         (dfs_set_offset_for_unshared_vbases): Likewise.
13853         (layout_virtual_bases): Likewise.
13854         (end_of_class): Likewise.
13855         (finish_struct_1): Call dump_class_hierarchy, if requested.
13856         (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
13857         (dump_class_hierarchy_r): Add stream parameter. Emit more information.
13858         (dump_class_hierarchy): Add file parameter. Append to file, if
13859         required.
13860         (finish_vtbls): Adjust accumulate_vtbl_inits call.
13861         Use canonical base for virtual bases.
13862         (build_vtt): Add more comments. Adjust build_vtt_inits call.
13863         (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
13864         Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
13865         VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
13866         virtual VTTs.
13867         (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
13868         from DATA.  We want virtual primary bases and all bases via virtual.
13869         Only set BINFO_VPTR_INDEX for top level. Look up from a primary
13870         virtual base when not a construction vtable.
13871         (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
13872         (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
13873         Use canonical bases when processing virtual bases.
13874         (accumulate_vtbl_inits): We're interested in any base via a
13875         virtual path.
13876         (dfs_accumulate_vtbl_inits): If this is a primary virtual base
13877         within a construction vtable, determine what is being overridden.
13878         (build_vtbl_initializer): Add more comments
13879         (add_vcall_offset_vtbl_entries_1): Adjust comment.
13880         (build_rtti_vtbl_entries): Check if the base has lost its
13881         primary.
13883 2001-02-05  Mark Mitchell  <mark@codesourcery.com>
13885         * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
13887 2001-02-04  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13889         * decl.c (pushdecl): Call abort instead of fatal.
13890         * except.c (decl_is_java_type): Call fatal_error instead of fatal.
13891         * init.c (build_new_1): Likewise.
13892         (build_java_class_ref): Call internal_error and fatal_error, not fatal.
13893         * decl.c (build_typename_type): hash_table_init now returns void.
13894         decl.c (init_decl_processing): Make an error non-fatal.
13896 2001-02-04  Mark Mitchell  <mark@codesourcery.com>
13898         * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
13899         Document.
13900         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
13901         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
13902         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
13903         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
13904         * decl.c (maybe_commonize_var): Use the new name-mangling where
13905         appropriate.
13906         * decl2.c (comdat_linkage): Enhance comments.  Make all
13907         compiler-generated things static, if COMDAT is not available.
13908         (get_tinfo_decl): Do not make typeinfo objects that belong in the
13909         library COMDAT.
13910         (tinfo_base_init): Use the correct mangled name for typeinfo
13911         strings, and push them into the global scope.
13912         (typeinfo_in_lib_p): New function.
13913         (synthesize_tinfo_var): Use it.
13914         (create_real_tinfo_var): Likewise.
13916 2001-02-03  Jakub Jelinek  <jakub@redhat.com>
13918         * decl.c (push_class_binding): Use context_for_name_lookup instead
13919         of CP_DECL_CONTEXT.
13920         * search.c (context_for_name_lookup): Remove static.  Check for NULL
13921         context in the loop.
13922         * cp-tree.h (context_for_name_lookup): Add prototype.
13924 2001-02-02  Jakub Jelinek  <jakub@redhat.com>
13926         * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
13927         * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
13928         Remove.
13929         * call.c (convert_class_to_reference, build_user_type_conversion_1,
13930         add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
13932 2001-02-02  Mark Mitchell  <mark@codesourcery.com>
13934         * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
13935         of macros used when compiling g++spec.c.
13936         * g++spec.c (lang_specific_driver): Link with the shared
13937         libgcc by default.
13939 2001-01-29  Joseph S. Myers  <jsm28@cam.ac.uk>
13941         * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
13942         make_reference_declarator, make_call_declarator), method.c
13943         (implicitly_declare_fn), parse.y (namespace_using_decl,
13944         notype_unqualified_id, expr_or_declarator, new_type_id,
13945         after_type_declarator, direct_after_type_declarator,
13946         notype_declarator, complex_notype_declarator,
13947         complex_direct_notype_declarator, qualified_id,
13948         notype_qualified_id, overqualified_id, direct_new_declarator,
13949         absdcl, direct_abstract_declarator, conversion_declarator), pt.c
13950         (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
13951         instead of build_parse_node.
13953 2001-01-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13955         * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
13956         (minus_one_node): Moved to top level gcc directory.  Renamed
13957         to integer_minus_one_node.
13959         * init.c (init_init_processing): Don't set minus_one_node.
13960         (build_vec_init): Use integer_minus_one_node.
13962         * rtti.c (get_tinfo_decl_dynamic): Likewise.
13964 2001-01-28  Jakub Jelinek  <jakub@redhat.com>
13966         * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
13967         identical and they would be replaced with constant, remove
13968         MODIFY_EXPR from the tree.
13970 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13972         * Make-lang.in: Remove all dependencies on defaults.h.
13973         * call.c: Don't include defaults.h.
13974         * decl.c: Likewise.
13975         * decl2.c: Likewise.
13976         * except.c: Likewise.
13977         * pt.c: Likewise.
13978         * rtti.c: Likewise.
13979         * tree.c: Likewise.
13980         * typeck.c: Likewise.
13982 2001-01-25  Jakub Jelinek  <jakub@redhat.com>
13984         * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
13985         operators even in "C" linkage.
13986         * method.c (set_mangled_name_for_decl): Likewise.
13987         * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
13988         overloaded operators in "C" linkage.
13990 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
13992         * pt.c (tsubst_decl): Remove IN_DECL parameter.
13993         (tsubst_arg_types): Check parameter is not void.
13994         (tsubst): Adjust tsubst_decl call.
13996 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
13998         * call.c (add_builtin_candidate): Quote std properly, from
13999         previous change.
14001 2001-01-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14003         * pt.c (check_explicit_specialization): Clone constructors and
14004         destructors.
14006 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
14008         * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
14009         indicates anything special about template depth. Make sure we
14010         only count the user visible template classes.
14012 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
14014         * call.c (build_conv): Typo in comment.
14015         (add_builtin_candidate): Add more explanation.
14016         Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
14017         Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
14018         when we have enumeral types.
14019         (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
14020         candidates for relops and eqops.
14021         (joust): Simplify control flow. Allow a non-template user
14022         function to hide a builtin.
14024 2001-01-22  Nathan Sidwell  <nathan@codesourcery.com>
14026         * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
14027         (more_specialized): Add deduction parameter.
14028         * call.c (joust): Adjust more_specialized call.
14029         * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
14030         UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
14031         (get_bindings_order): Remove.
14032         (get_bindings_real): Add DEDUCE parameter.
14033         (maybe_adjust_types_for_deduction): Return extra unify flags. Do
14034         REFERENCE_TYPE jig for DEDUCE_ORDER.
14035         (type_unification_real): Deal with DEDUCE_ORDER. Use result of
14036         maybe_adjust_types_for_deduction.
14037         (more_specialized): Add DEDUCE parameter. Call get_bindings_real
14038         directly.
14039         (try_one_overload): Use result of maybe_adjust_types_for_deduction.
14040         (check_cv_quals_for_unify): Use new unify qualifier flags.
14041         (unify): Clear new unify qualifier flags.
14042         (get_bindings_real): Add DEDUCE parameter.
14043         (get_bindings): Adjust call to get_bindings_real.
14044         (get_bindings_overload): Likewise.
14045         (most_specialized_instantiation): Adjust call to
14046         more_specialized.
14048 2001-01-19  Jason Merrill  <jason@redhat.com>
14050         * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
14052         * decl.c (init_decl_processing): Just force -fvtable-thunks on if
14053         -fnew-abi.
14055 2001-01-19  Ute Pelkmann  <scope.muc@t-online.de>
14057         * decl2.c (arg_assoc_class): Fix double iteration logic.
14059 2001-01-19  Jason Merrill  <jason@redhat.com>
14061         * init.c (build_delete): Always call convert_force to strip cv-quals.
14063         * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
14064         * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
14065         * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
14067 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
14069         * search.c (get_vbase_1): Count only virtual bases.
14071 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
14073         * class.c (duplicate_tag_error): Robustify flag clearing.
14075 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
14077         * cp-tree.h (lookup_template_class): Add complain parm.
14078         * decl.c (lookup_namespace_name): Adjust call to
14079         lookup_template_class.
14080         (make_typename_type): Likewise.
14081         * semantics.c (finish_template_type): Likewise.
14082         * pt.c (lookup_template_class): Add complain parm. Adjust.
14083         (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
14084         (tsubst): Likewise.
14086 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
14088         * pt.c (copy_default_args_to_explicit_spec): Preserve
14089         object's CV quals. Reorganize.
14091 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
14093         * typeck.c (build_modify_expr): Say `initialization' for
14094         INIT_EXPRs.
14095         * init.c (build_default_init): Convert to enumeral type, if
14096         needed.
14098 2001-01-18  Jakub Jelinek  <jakub@redhat.com>
14100         * parse.y (nomods_initdcl0): Properly set things up for
14101         initdcl0_innards.
14103 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
14105         * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
14106         (type_unification_real): Set it.
14107         (unify): Use it.
14109 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
14111         * decl.c (finish_destructor_body): Convert to vbase pointer here.
14113 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
14115         * semantics.c (begin_class_definition): Check we're not inside a
14116         template parm list.
14118 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
14120         * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
14121         BASELINK_P.
14123 2001-01-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14125         * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
14126         * call.c (build_over_call): Add comment.
14128 2001-01-16 Daniel Berlin <dberlin@redhat.com>
14130         * cvt.c (ocp_convert): Handle vector type conversion
14131         * typeck2.c (digest_init): Handle vector type initializations
14133 2001-01-16  Phil Edwards  <pme@sources.redhat.com>
14135         * g++spec.c:  Don't add libraries needlessly if -fsyntax-only
14136           was given.
14138 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
14140         * pt.c (check_nontype_parm): Rename to ...
14141         (invalid_nontype_parm_type_p): ... here.
14142         (process_template_parm): Adjust.
14143         (convert_template_argument): Adjust.
14145 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
14147         * pt.c (check_nontype_parm): New function.
14148         (process_template_parm): Use it.
14149         (convert_template_argument): Use it.
14150         (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
14151         member.
14153 2001-01-14  Jeffrey Oldham  <oldham@codesourcery.com>
14155         * tree.c: Add defaults.h
14156         (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
14157         * Make-lang.in (cp/tree.o): Add defaults.h.
14159 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
14161         * Make-lang.in (CXX_C_OBJS): Add c-format.o.
14163 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
14165         * g++.1: Change to be ".so man1/gcc.1".
14167 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
14169         * Make-lang.in (c++.info, c++.install-info): Build and install g++
14170         internals info.
14171         (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
14172         ($(srcdir)/cp/g++int.info): New target.
14173         * gxxint.texi: Add info directory entry.  Use @@ in email address.
14174         * .cvsignore: Update.
14176 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
14178         * typeck.c (build_c_cast): Do template processing earlier.
14179         Always pedwarn on array casts.
14181 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
14183         * friend.c (make_friend_class): Make sure a templated class is
14184         actually a template.
14186 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
14188         * decl2.c (get_guard): Set linkage from guarded decl.
14190 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
14192         * call.c (convert_default_arg): Check for unprocessed
14193         DEFAULT_ARG.
14194         * cp-tree.h (replace_defarg): Move to spew.c.
14195         (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
14196         spew.c, which is where they really are.
14197         (done_pending_defargs): Declare.
14198         (unprocessed_defarg_fn): Declare.
14199         * decl.c (replace_defarg): Move to spew.c
14200         * parse.y (structsp): Call done_pending_defargs.
14201         * spew.c (defarg_fns): Rearrange list structure.
14202         (defarg_fnsdone): New static variable.
14203         (defarg_depfns): New static variable.
14204         (init_spew): Adjust.
14205         (add_defarg_fn): Store the type in TREE_TYPE.
14206         (do_pending_defargs): Detect and deal with ordering constraints
14207         and circularity.
14208         (done_pending_defargs): New function.
14209         (unprocessed_defarg_fn): New function.
14210         (replace_defarg): Moved from decl.c. Robustify. Don't save
14211         if circularity detected.
14213 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
14215         * pt.c (unify): Check array has a domain, before checking
14216         whether it is variable sized.
14218 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
14220         * decl.c (grokparms): Unobfuscate and get correct diagnostic for
14221         parameters with pointers to arrays of unknown bound.
14223 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
14225         * parse.y (template_parm_header, template_spec_header): New
14226         reductions. Split out from ...
14227         (template_header): ... here. Use them.
14228         (template_template_parm): Use template_parm_header.
14229         * semantics.c (finish_template_template_parm): Add assert.
14231 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
14233         * mangle.c (write_builtin_type): Fix thinko.
14235         * pt.c (copy_default_args_to_explicit_spec_1): New function.
14236         (copy_default_args_to_explicit_spec): Likewise.
14237         (check_explicit_specialization): Use it.
14239         * class.c (finish_struct_1):  Remove last argument in call to
14240         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
14241         * decl.c (builtin_function): Likewise.
14242         (build_cp_library_fn): Likewise.
14243         (check_initializer): Likewise.
14244         (make_rtl_for_nonlocal_decl): Likewise.
14245         (cp_finish_decl): Likewise.
14246         (start_function): Likewise.
14247         * decl2.c (finish_anon_union): Likewise.
14248         * friend.c (do_friend): Likewise.
14249         * init.c (build_java_class_ref): Likewise.
14250         * method.c (make_thunk): Likewise.
14251         * pt.c (tsubst_friend_function): Likewise.
14252         * semantics.c (expand_body): Likewise.
14254 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
14256         * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
14257         looking at DECL_CLONED_FUNCTION for non-functions.
14259 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
14261         * error.c (dump_template_parameter): Use parm to determine how
14262         to print default value.
14264 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
14266         * class.c (duplicate_tag_error): Clear more flags.
14268 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
14270         * call.c (build_new_method_call): Use binfo_for_vbase.
14272 2001-01-10  Joseph S. Myers  <jsm28@cam.ac.uk>
14274         * cp-tree.h (flag_cond_mismatch): Don't declare.
14275         * decl2.c (flag_cond_mismatch): Don't define.
14276         (lang_f_options): Remove cond-mismatch.
14277         (unsupported_options): Add cond-mismatch.
14279 2001-01-09  Nathan Sidwell  <nathan@codesourcery.com>
14281         * class.c (handle_using_decl): Reject using of constructor name
14282         of sourcing class. Allow injecting of a method with same name as
14283         nested class. Fixup error messages.
14285 2001-01-09  Joseph S. Myers  <jsm28@cam.ac.uk>
14287         * decl2.c (lang_decode_option): Handle -Wformat=2.
14289 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
14291         * cp-tree.h (lang_decl_flags): Rename defined_in_class to
14292         initialized_in_class.
14293         (DECL_DEFINED_IN_CLASS_P): Rename to ...
14294         (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
14295         * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
14296         (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
14297         * pt.c (check_default_tmpl_args): Adjust for
14298         DECL_INITIALIZED_IN_CLASS_P.
14299         (instantiate_class_template): Likewise.
14300         (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
14302         * class.c (finish_struct): Constify saved_filename.
14304 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
14306         * class.c (duplicate_tag_error): Adjust diagnostic.
14307         (finish_struct): Locally set location to start of struct.
14308         * decl.c (fixup_anonymous_aggr): Use cp_error_at.
14310 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
14312         * decl.c (struct binding_level): Adjust class_shadowed comments
14313         to reflect reality.
14314         (push_class_level_binding): Adjust comments to reflect reality.
14315         Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
14316         Don't set TREE_VALUE on the class_shadowed list.
14318 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14320         * decl2.c (acceptable_java_type): Allow references too.
14321         * init.c (build_java_class_ref): When using the new ABI, search
14322         `class$' and have it mangled with `mangle_decl.'
14323         * mangle.c (write_java_integer_type_codes): New function.
14324         (write_builtin_type): Detect and mangle Java integer and real
14325         types.
14327 2001-01-07  Mark Mitchell  <mark@codesourcery.com>
14329         * decl2.c (grokfield): Don't accept `asm' specifiers for
14330         non-static data members.
14332 2001-01-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14334         * expr.c (cplus_expand_expr): Don't reset `target'.
14336 2001-01-07  Neil Booth  <neil@daikokuya.demon.co.uk>
14338         * cp/decl2.c (cxx_post_options): Call cpp_post_options.
14340 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
14342         * parse.y (template_datadef): Check for error_mark_node.
14344 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
14346         * cp-tree.def (DEFAULT_ARG): Make `x' class.
14348 2001-01-04  Joseph S. Myers  <jsm28@cam.ac.uk>
14350         * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
14351         (record_builtin_type): Make non-static.
14352         (flag_short_double): Don't declare.
14353         (init_decl_processing): Remove the creation of many tree nodes now
14354         in c_common_nodes_and_builtins.
14355         (build_void_list_node): New function.
14356         * decl2.c (flag_short_double, flag_short_wchar): Don't define.
14357         * cp-tree.h (flag_short_wchar): Don't declare.
14359 2001-01-04  Mark Mitchell  <mark@codesourcery.com>
14361         * call.c (build_conv): Don't use build1 for USER_CONV.
14362         * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
14364 2001-01-03  Joseph S. Myers  <jsm28@cam.ac.uk>
14366         * lex.c (lang_init): Call c_common_lang_init.
14368 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
14370         * search.c (lookup_fnfields_here): Remove.
14371         (look_for_overrides_r): Use lookup_fnfields_1.
14372         Ignore functions from using declarations.
14374 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
14376         Implement exceptions specifiers for implicit member functions.
14377         * cp-tree.h (merge_exceptions_specifiers): Declare new function.
14378         * method.c (synthesize_exception_spec): New function.
14379         (locate_dtor, locate_ctor, locate_copy): New functions.
14380         (implicitly_declare_fn): Generate the exception spec too.
14381         * search.c (check_final_overrider): Check artificial functions
14382         too.
14383         * typeck2.c (merge_exception_specifiers): New function.
14385 2001-01-03  Jason Merrill  <jason@redhat.com>
14387         * init.c (build_default_init): New fn.
14388         (perform_member_init): Split out from here.
14389         (build_new_1): Use it.  Simplify initialization logic.
14390         (build_vec_init): Take an array, rather than a pointer and maxindex.
14391         Speed up simple initializations.  Don't clean up if we're assigning.
14392         * cp-tree.h: Adjust.
14393         * decl2.c (do_static_initialization): Remove TREE_VEC case.
14394         * parse.y (new_initializer): Return void_zero_node for ().
14395         * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
14396         * typeck2.c (digest_init): Only complain about user-written
14397         CONSTRUCTORs.
14399 2000-12-22  Mike Stump  <mrs@wrs.com>
14401         * decl2.c: (max_tinst_depth): Increase to 50.
14403 2001-01-02  Mark Mitchell  <mark@codesourcery.com>
14405         * class.c (invalidate_class_lookup_cache): Zero the
14406         previous_class_values.
14407         * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
14408         TREE_INT_CST_HIGH.
14409         (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
14410         * decl.c (free_bindings): New variable.
14411         (push_binding): Don't create a new binding if we have one on the
14412         free list.
14413         (pop_binding): Put old bindings on the free list.
14414         (init_decl_processing): Use size_int, not build_int_2.
14415         Register free_bindings as a GC root.
14416         (cp_make_fname_decl): Use size_int, not build_int_2.
14417         (push_inline_template_parms_recursive): Likewise.
14418         (end_template_parm_list): Likewise.
14419         (for_each_template_parm): Do not use walk_tree_without_duplicates.
14420         (tsubst_template_parms): Use size_int, not build_int_2.
14421         (tsubst): Likewise.
14422         * rtti.c (get_vmi_pseudo_type_info): Likewise.
14424 2001-01-02  Richard Henderson  <rth@redhat.com>
14426         * parse.y (asm): Set ASM_INPUT_P.
14428 2001-01-02  Jason Merrill  <jason@redhat.com>
14430         * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
14431         for v3 ABI.
14433         * typeck.c (cp_truthvalue_conversion): New fn.
14434         * cvt.c (ocp_convert): Use it.
14436         * cp-tree.h: Lose c-common.c decls.
14438         * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
14439         * cvt.c (convert_to_void): Use type_unknown_p.
14441         * typeck.c (strip_all_pointer_quals): Also strip quals from
14442         pointer-to-member types.
14444         * Make-lang.in (cp/TAGS): Use --no-globals.  Ignore parse.c, and treat
14445         parse.y as C.
14447         * call.c (build_new_method_call): Do evaluate the object parameter
14448         when accessing a static member.
14449         * typeck.c (build_component_ref): Likewise.
14451 2001-01-02  Andreas Jaeger  <aj@suse.de>
14453         * decl.c (cp_missing_noreturn_ok_p): New.
14454         (init_decl_processing): Set lang_missing_noreturn_ok_p.
14456 2000-12-29  Jakub Jelinek  <jakub@redhat.com>
14458         * decl.c (init_decl_processing): Fix sign of wchar_type_node.
14460 2000-12-29  Mark Mitchell  <mark@codesourcery.com>
14462         * class.c (pushclass): Remove #if 0'd code.
14463         * cp-tree.h (overload_template_name): Remove.
14464         * decl.c (store_bindings): Simplify.
14465         (pop_from_top_level): Likewise.
14466         * pt.c (overload_template_name): Remove.
14467         (instantiate_decl): Don't call push_to_top_level if it's not
14468         needed.
14470 2000-12-28  Mark Mitchell  <mark@codesourcery.com>
14472         * pt.c (register_local_specialization): Don't return a value.
14473         (lookup_template_class): Use move-to-front heuristic when looking
14474         up template instantiations.
14475         (instantiate_decl): Only push_to_top_level when we're actually
14476         going to instantiate the template.
14478 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
14480         * search.c (binfo_for_vtable): Return least derived class, not
14481         most.  Handle secondary vtables.
14483 2000-12-22  Jason Merrill  <jason@redhat.com>
14485         * pt.c (more_specialized): Don't optimize len==0.
14486         (fn_type_unification): If we're adding the return type, increase len.
14488         * typeck.c (build_binary_op): Fix pmf comparison logic.
14490         * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
14491         DECL_STATIC_FUNCTION_P.
14493         * semantics.c (genrtl_finish_function): Don't try to jump to
14494         return_label unless it exists.
14496         In partial ordering for a call, ignore parms for which we don't have
14497         a real argument.
14498         * call.c (joust): Pass len to more_specialized.
14499         (add_template_candidate_real): Strip 'this', pass len.
14500         * pt.c (more_specialized): Pass len down.  Lose explicit_args parm.
14501         (get_bindings_order): New fn.  Pass len down.
14502         (get_bindings_real): Strip 'this', pass len.
14503         (fn_type_unification): Likewise.
14504         (type_unification_real): Succeed after checking 'len' args.
14505         (most_specialized_instantiation): Lose explicit_args parm.
14506         * class.c (resolve_address_of_overloaded_function): Strip 'this',
14507         pass len.
14509 2000-12-21  Jason Merrill  <jason@redhat.com>
14511         * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
14512         DECL_TEMPLATE_RESULT.
14514         * search.c (lookup_field_r): Call lookup_fnfields_1, not
14515         lookup_fnfields_here.
14517         * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
14519         * call.c (build_object_call): Also allow conversions that return
14520         reference to pointer to function.
14521         (add_conv_candidate): Handle totype being ref to ptr to fn.
14522         (build_field_call): Also allow members of type reference to function.
14523         Lose support for calling pointer to METHOD_TYPE fields.
14525         * error.c (dump_expr): Handle *_CAST_EXPR.
14527         * typeck2.c (build_scoped_ref): Always convert to the naming class.
14529         * tree.c (break_out_cleanups): Lose.
14530         * cp-tree.h: Remove prototype.
14531         * typeck.c (build_component_ref): Don't break_out_cleanups.
14532         (build_compound_expr): Likewise.
14533         * semantics.c (finish_expr_stmt): Likewise.
14535 2000-12-20  Richard Henderson  <rth@redhat.com>
14537         * cp-tree.h: Update declarations.
14538         * decl.c (finish_case_label): Return the new stmt node.
14539         * semantics.c (finish_goto_stmt): Likewise.
14540         (finish_expr_stmt, finish_return_stmt): Likewise.
14541         (finish_break_stmt, finish_continue_stmt): Likewise.
14542         (finish_asm_stmt): Likewise.
14543         * parse.y (already_scoped_stmt): Set STMT_LINENO.
14544         (compstmt, implicitly_scoped_stmt, stmt): Likewise.
14545         (simple_if, simple_stmt): Return the new stmt node.
14546         (save_lineno): New.
14548 2000-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
14550         * cp-tree.h: Don't declare warn_long_long.
14552 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14554         * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
14555         IS_AGGR_TYPE.
14557 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14559         * pt.c (unify): Handle when both ARG and PARM are
14560         BOUND_TEMPLATE_TEMPLATE_PARM.
14562 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14564         * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
14565         DECL_TEMPLATE_PARM_P.
14567 2000-12-15  Jason Merrill  <jason@redhat.com>
14569         * init.c (build_new_1): Reorganize.  Now with 100% fewer SAVE_EXPRs!
14571         * init.c (build_new_1): Don't strip quals from type.
14573         * decl.c (pushdecl): Don't check for linkage on a non-decl.
14575         * call.c (build_op_delete_call): See through ARRAY_TYPEs.
14577         * call.c (build_new_function_call): Lose space before paren in
14578         error message.
14579         (build_new_method_call): Likewise.
14581         * typeck2.c (build_m_component_ref): Propagate quals from datum.
14583 2000-12-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14585         * pt.c (check_explicit_specialization): Propagate default
14586         function arguments to explicit specializations.
14588 2000-12-13  DJ Delorie  <dj@redhat.com>
14590         * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
14591         and <? operators.
14593 2000-12-08  Jason Merrill  <jason@redhat.com>
14595         * error.c (dump_function_name): Don't let the user see __comp_ctor.
14597         Clean up copy-initialization in overloading code.
14598         * call.c (build_user_type_conversion_1): Die if we are asked to
14599         convert to the same or a base type.
14600         (implicit_conversion): Avoid doing so.  Lose reference binding code.
14601         (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
14602         direct-initialization.  Also do direct-init part of copy-init.
14603         (build_user_type_conversion): Don't provide context to convert_like.
14604         * cvt.c (ocp_convert): build_user_type_conversion will now provide
14605         the constructor call for copy-init.
14607         * pt.c (tsubst_decl): Call clone_function_decl here if this is an
14608         instantiation of a member template.
14609         (do_decl_instantiation): Not here.
14611 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
14613         * class.c (check_field_decls): Don't special case anonymous
14614         fields in error messages.
14615         (note_name_declared_in_class): Use %D on diagnostic.
14617         * tree.c (pod_type_p): Use strip_array_types.
14618         (cp_valid_lang_attribute): Likewise.
14619         * typeck.c (cp_type_quals): Strip arrays separately, to avoid
14620         multiple evaluations.
14621         (cp_has_mutable_p): Use strip_array_types.
14623 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
14625         * cp-tree.h (sufficient_parms_p): Declare new function.
14626         * call.c (sufficient_parms_p): New function, broken out of ...
14627         (add_function_candidate): ... here. Use it.
14628         (add_conv_candidate): Use it.
14629         * decl.c (grok_ctor_properties): Use it.
14631 2000-12-07  Jakub Jelinek  <jakub@redhat.com>
14633         * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
14635 2000-12-07  Joseph S. Myers  <jsm28@cam.ac.uk>
14637         * decl2.c (lang_decode_option): Handle -Wformat-security.
14639 2000-12-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14641         * pt.c (verify_class_unification): New function.
14642         (get_class_bindings): Use it.
14643         (try_class_unification): Tidy.
14644         (unify): Handle when argument of a template-id is not
14645         template parameter dependent.
14646         (template_args_equal): Handle when TREE_CODE's do not match.
14648 2000-12-06  Alexandre Oliva  <aoliva@redhat.com>
14650         * lang-specs.h (c++): When invoking the stand-alone preprocessor
14651         for -save-temps, pass all relevant -Defines to it, and then don't
14652         pass them to cc1plus.
14654 2000-12-05  Will Cohen  <wcohen@redhat.com>
14656         * decl.c (finish_case_label): Cleared
14657         more_cleanups_ok in surrounding function scopes.
14658         (define_label): Likewise.
14660 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
14662         * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
14663         (get_matching_virtual): Remove.
14664         (look_for_overrides): Declare new function.
14665         * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
14666         DECL_VINDEX here.
14667         * class.c (check_for_override): Move base class iteration code
14668         to look_for_overrides.
14669         * search.c (next_baselink): Remove.
14670         (get_virtuals_named_this): Remove.
14671         (get_virtual_destructor): Remove.
14672         (tree_has_any_destructors_p): Remove.
14673         (struct gvnt_info): Remove.
14674         (check_final_overrider): Remove `virtual' from error messages.
14675         (get_matching_virtuals): Remove. Move functionality to ...
14676         (look_for_overrides): ... here, and ...
14677         (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
14678         to be overriding.
14680 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
14682         * typeck.c (get_delta_difference): If via a virtual base,
14683         return zero.
14684         * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
14685         adjustment.
14687 2000-12-04  Richard Henderson  <rth@redhat.com>
14689         * error.c (dump_tree): Use output_add_string not OB_PUTS.
14691 2000-12-04  Jason Merrill  <jason@redhat.com>
14693         * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
14694         (write_builtin_type): Pass intSI_type_node and the like through
14695         type_for_mode.
14696         * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
14697         Pass intSI_type_node and the like through type_for_mode.
14698         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
14699         * pt.c (tsubst, unify): Likewise.
14700         * tree.c (walk_tree): Likewise.
14701         * error.c (dump_type): Likewise.
14702         (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
14704         * Make-lang.in: Tweak top comment for emacs.
14705         (cp/TAGS): Restore.
14707         * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
14709         * class.c (clone_function_decl): Robustify.
14711 2000-12-04  Michael Matz  <matzmich@cs.tu-berlin.de>
14713         * decl.c (store_bindings): Only search in the non modified
14714         old_bindings for duplicates.
14716 2000-12-04  Nathan Sidwell  <nathan@codesourcery.com>
14718         * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
14719         TYPE_POLYMORPHIC_P.
14721         * typeck.c (build_static_cast): Remove unused variable.
14723 2000-12-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14725         * pt.c: Fix typo in comment.
14727 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
14729         * decl2.c (warn_format): Remove definition.
14730         (lang_decode_option): Handle -Wformat-nonliteral,
14731         -Wno-format-extra-args and -Wno-format-y2k.  Use set_Wformat.
14733 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
14735         * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
14736         (init_decl_processing): Don't create string_type_node,
14737         const_string_type_node, wint_type_node, intmax_type_node,
14738         uintmax_type_node, default_function_type, ptrdiff_type_node and
14739         unsigned_ptrdiff_type_node.  Adjust position of call to
14740         c_common_nodes_and_builtins.
14741         (identifier_global_value): New function.
14743 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>
14745         * call.c (standard_conversion): Reject pointer to member
14746         conversions from ambiguous, inaccessible or virtual bases.
14747         * typeck.c (build_static_cast): Don't check pointers to members
14748         specially.
14750 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
14752         * method.c (do_build_copy_constructor): Preserve cv
14753         qualifications when accessing source object members.
14754         (do_build_assign_ref): Likewise. Remove separate diagnostics for
14755         unnamed fields.
14757 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
14759         * method.c (do_build_assign_ref): Construct appropriately
14760         CV-qualified base reference. Don't allow const casts in base
14761         conversion.
14763 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
14765         * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
14766         incomplete return type.
14768 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
14770         * parse.y (base_class.1): Produce a _TYPE not a _DECL.
14771         * semantics.c (finish_base_specifier): Accept a _TYPE not a
14772         _DECL.
14774 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
14776         * spew.c (yyerror): Cope if yylval.ttype is NULL.
14778 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
14780         * decl.c (grokdeclarator): Diagnose undefined template contexts.
14782 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
14784         * decl.c (grokdeclarator): Do type access control on friend
14785         class.
14787 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
14789         * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
14790         bison parser ickiness.
14791         * pt.c (tsubst_friend_function): Enter namespace scope when
14792         tsubsting the function name.
14793         * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
14795 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
14797         * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
14798         * cvt.c (cp_convert_to_pointer): Add force parameter.
14799         Allow conversions via virtual base if forced.
14800         (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
14801         (ocp_convert): Likewise.
14802         * search.c (binfo_from_vbase): Return the virtual base's binfo.
14803         * typeck.c (get_delta_difference): Adjust handling of virtual
14804         bases.
14806 2000-11-26  Mark Mitchell  <mark@codesourcery.com>
14808         * tree.c (struct list_hash): Remove.
14809         (list_hash_table): Make it be an htab.
14810         (struct list_proxy): New type.
14811         (list_hash_eq): New function.
14812         (list_hash_pieces): Renamed from ...
14813         (list_hash): ... this.
14814         (list_hash_lookup): Remove.
14815         (list_hash_add): Remove.
14816         (hash_tree_cons): Use the generic hashtable.
14817         (mark_list_hash): Remove.
14818         (init_tree): Create the hashtable.
14820 2000-11-25  Joseph S. Myers  <jsm28@cam.ac.uk>
14822         * method.c (build_mangled_C9x_name): Rename to
14823         build_mangled_C99_name.  Change C9X references in comments to
14824         refer to C99.
14826 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
14828         * parse.y (unary_expr): Move VA_ARG from here ...
14829         (primary): ... to here.
14831 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
14833         * semantics.c (finish_id_expr): If type is error_mark, return
14834         error_mark.
14836 2000-11-23  Nathan Sidwell  <nathan@codesourcery.com>
14838         * pt.c (lookup_template_class): Simplify loop exit constructs.
14839         Cope when there is no partial instantiation of a template
14840         template member.
14842 2000-11-23  J"orn Rennecke <amylaar@redhat.com>
14844         * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
14846 2000-11-22  Mark Mitchell  <mark@codesourcery.com>
14848         * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
14849         prefix.
14851         * pt.c (do_decl_instantiate): Explicitly clone constructors and
14852         destructors that haven't already been cloned.
14854 2000-11-20  Richard Henderson  <rth@redhat.com>
14856         * parse.y (yyparse_1): Rename the parser entry point.
14858 2000-11-20  Alex Samuel  <samuel@codesourcery.com>
14860         * mangle.c (write_name): Use <unscoped-name> for names directly in
14861         function scope.
14862         (write_unscoped_name): Accept names directly in function scope.
14864 2000-11-20  Nathan Sidwell  <nathan@codesourcery.com>
14866         * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
14867         * parse.y (extdef): Add EXPORT reduction.
14868         * spew.c (yylex): Don't skip export here.
14870 2000-11-19  Mark Mitchell  <mark@codesourcery.com>
14872         * decl.c (init_decl_processing): Correct name of pure virtual
14873         function under the new ABI.
14874         * rtti.c (throw_bad_cast): Likewise, for bad cast function.
14875         (throw_bad_typeid): Likewise for bad typeid function.
14877 2000-11-18  Mark Mitchell  <mark@codesourcery.com>
14879         * decl.c (grokparms): Don't even function types of `void' type,
14880         either.
14881         * mangle.c (write_type): Don't crash when confronted with the
14882         error_mark_node.
14884         * decl.c (grokparms): Don't create parameters of `void' type.
14886 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
14888         * lex.c (mark_impl_file_chain): Delete.
14889         (init_parse): Remove call to ggc_add_string_root.  No need to
14890         ggc_strdup a string constant.  Do not add impl_file_chain to GC
14891         roots.
14892         (handle_pragma_implementation): No need to ggc_strdup main_filename.
14894 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
14896         * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
14898 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
14900         * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
14901         * decl.c (grokdeclarator): Don't reject void parms here.
14902         (require_complete_types_for_parms): Simplify, use
14903         complete_type_or_else.
14904         (grokparms): Remove bitrot. Remove funcdef parm.
14905         Deal with ellipsis parm lists here.
14906         * semantics.c (finish_parmlist): Don't append void_list_node
14907         here. Set PARMLIST_ELLIPSIS_P.
14909 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
14911         * typeck2.c (incomplete_type_error): Reorganize to avoid
14912         excessive diagnostics.
14914 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
14916         * lex.c (struct impl_files, internal_filename): Constify a char *.
14918 2000-11-16  Mark Mitchell  <mark@codesourcery.com>
14920         * mangle.c (write_special_name_constructor): Don't generate
14921         assembler junk when confronted with an old-style constructor.
14922         (write_special_name_destructor): Likewise.
14923         (mangle_decl_string): Do it here instead.
14925 2000-11-16  Nathan Sidwell  <nathan@codesourcery.com>
14927         * call.c (op_error): Make error messages clearer.
14929 2000-11-15  Mark Mitchell  <mark@codesourcery.com>
14931         * decl.c (wrapup_globals_for_namespace): Don't mark things
14932         TREE_ASM_WRITTEN when they're not.
14934 2000-11-15  Jason Merrill  <jason@redhat.com>
14936         * typeck2.c (friendly_abort): Uncount the error before handing
14937         off to fancy_abort.
14939 2000-11-15  Nathan Sidwell  <nathan@codesourcery.com>
14941         * typeck.c (lookup_anon_field): Cope with qv qualifiers.
14943 2000-11-14  Mark Mitchell  <mark@codesourcery.com>
14945         * class.c (build_vtbl_initializer): Fix typo in comment.
14946         * typeck.c (expr_sizeof): Don't crash on errors.
14948 2000-11-14  Jim Wilson  <wilson@redhat.com>
14950         * lang-specs.h: Add %2 after %(cc1_options).
14952 2000-11-14  Richard Henderson  <rth@redhat.com>
14954         * typeck.c (c_sizeof): Be strict about casting result value
14955         back to c_size_type_node.
14956         (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
14958 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
14960         * typeck.c (build_unary_op): Use boolean_increment from
14961         c-common.c, moving the relevant code there.
14963 2000-11-11  Jason Merrill  <jason@redhat.com>
14965         * typeck.c (mark_addressable): Don't call put_var_into_stack.
14967         * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
14968         in inlines.
14970 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14972         * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
14973         * lex.c (copy_lang_decl): Likewise.
14975 2000-11-09  Mark Mitchell  <mark@codesourcery.com>
14977         * dump.c (cp_dump_tree): Don't dump function bodies here.
14979         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
14980         (dump.o): Update dependency list.
14981         * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
14982         (flag_dump_translation_unit): Likewise.
14983         (CP_TYPE_QUALS): Adjust definition.
14984         (DECL_C_BIT_FIELD): Remove.
14985         (SET_DECL_C_BIT_FIELD): Likewise.
14986         (CLEAR_DECL_C_BIT_FIELD): Likewise.
14987         (add_maybe_template): Likewise.
14988         (strip_array_types): Likewise.
14989         (dump_node_to_file): Likewise.
14990         (cp_dump_tree): New function.
14991         * decl.c (init_decl_processing): Set lang_dump_tree.
14992         * decl2.c (flag_dump_translation_unit): Remove.
14993         * dump.c: Move most of it to ../c-dump.c.
14994         (cp_dump_tree): New function.
14995         * pt.c (add_maybe_template): Remove.
14996         * typeck.c (strip_array_types): Likewise.
14998 2000-11-07  Eric Christopher  <echristo@redhat.com>
15000         * decl.c (init_decl_processing): Change definition of
15001         __wchar_t to wchar_t.  Remove artificial declaration of
15002         wchar_t.
15003         * lex.c: Change instances of __wchar_t to wchar_t.
15005 2000-11-09  Nathan Sidwell  <nathan@codesourcery.com>
15007         * lex.c (do_identifier): Don't lookup_name for operators.
15008         * parse.y (operator): Save looking_for_typename.
15009         (unoperator): Restore it.
15010         * spew.c (frob_opname): Use nth_token for lookahead.
15012 2000-11-08  Nathan Sidwell  <nathan@codesourcery.com>
15014         * decl.c (grok_op_properties): Always use coerce_new_type and
15015         coerce_delete_type.
15016         * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
15017         exception specification. Tidy up.
15018         (coerce_delete_type): Preserve exception specification. Tidy up.
15020 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
15022         * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
15023         (push_binding_level), error.c (cp_tree_printer), pt.c
15024         (process_partial_specialization, tsubst_template_arg_vector),
15025         search.c (lookup_member): Use memset () instead of bzero ().
15027 2000-11-07  Nathan Sidwell  <nathan@codesourcery.com>
15029         * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
15031 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
15033         * Make-lang.in (c++.distdir): Remove.
15035 2000-11-04  Mark Mitchell  <mark@codesourcery.com>
15037         * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
15038         declarations from different namespaces to be combined.
15040 2000-11-03  Zack Weinberg  <zack@wolery.stanford.edu>
15042         * decl.c: Include tm_p.h.
15044 2000-11-03  Joseph S. Myers  <jsm28@cam.ac.uk>
15046         * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
15048 2000-11-02  Joseph S. Myers  <jsm28@cam.ac.uk>
15050         * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
15051         (build_overload_value), repo.c (open_repo_file), xref.c
15052         (open_xref_file): Use strchr () and strrchr () instead of index ()
15053         and rindex ().
15055 2000-11-01  Bernd Schmidt  <bernds@redhat.co.uk>
15057         * call.c (build_over_call): Call fold on the CALL_EXPR.
15059 2000-11-01  Gabriel Dos Reis  <gdr@codesourcery.com>
15061         * error.c (dump_template_decl): Separate template hearders with
15062         space not comma.
15064 2000-10-31  Gabriel Dos Reis  <gdr@codesourcery.com>
15066         * error.c: Move TFF_ macros into cp-tree.h.  Throughout, replace
15067         TS_* flags with corresponding TFF_*.  Adjust prototypes of
15068         functions (which used to take a tree_string_flags) to take an int.
15070         * cp-tree.h (enum tree_string_flags): Remove
15071         (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
15072         TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
15073         TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
15074         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
15075         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
15076         TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
15077         (type_as_string, decl_as_string, expr_as_string,
15078         context_as_string): Adjust prototype.
15080         * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
15081         instead of TS_PLAIN.
15083         * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
15084         instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
15085         plain `0'.
15087 2000-10-30  Mark Mitchell  <mark@codesourcery.com>
15089         * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
15090         (linkage_kind): New enumeration.
15091         (decl_linkage): New function.
15092         * decl2.c (comdat_linkage): Extend comment.
15093         * error.c (dump_function_decl): Print the arguments used to
15094         instantiate a template, even when not printing the type of the
15095         function.
15096         * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
15097         not TREE_PUBLIC, to test for external linkage.
15098         * tree.c (decl_linkage): New function.
15100 2000-10-28  Mark Mitchell  <mark@codesourcery.com>
15102         * pt.c (instantiate_decl): Always instantiate static data members
15103         initialized in-class.
15105 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
15107         * Make-lang.in: Move all build rules here from Makefile.in,
15108         adapt to new context.  Wrap all rules that change the current
15109         directory in parentheses.  Expunge all references to $(P).
15110         When one command depends on another and they're run all at
15111         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
15112         all object-file generation rules.  Delete obsolete variables.
15114         * Makefile.in: Delete.
15115         * config-lang.in: Delete outputs= line.
15117 2000-10-26  Gabriel Dos Reis  <gdr@codesourcery.com>
15119         * error.c (dump_function_decl): Print no space between
15120         `ptr-operator' the `type-specifier' of the return type.
15121         (dump_type_prefix): Make sure we put space at the appropriate
15122         place.
15124 2000-10-23  Jason Merrill  <jason@redhat.com>
15126         * call.c (equal_functions): Also call decls_match for extern "C" fns.
15128 2000-10-22  Jason Merrill  <jason@redhat.com>
15130         * call.c (build_conditional_expr): Use ocp_convert to force
15131         rvalue conversion.
15133 2000-10-22  Mark Mitchell  <mark@codesourcery.com>
15135         * call.c (standard_conversion): Use RVALUE_CONVs for all
15136         expressions that satisfy lvalue_p, not just those that satisfy
15137         real_lvalue_p.
15139         * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
15141         * typeck.c (c_sizeof): Return an expression of `size_t' type,
15142         not one with TYPE_IS_SIZETYPE set.
15143         (dubious_conversion_warnings): Remove special-case code.
15145 2000-10-21  Geoffrey Keating  <geoffk@cygnus.com>
15147         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
15148         * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
15149         (dump_type_prefix): Print vector-of-int as 'int vector'.
15150         (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
15151         * tree.c (walk_tree): Handle VECTOR_TYPE.
15153         * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
15155 2000-10-21  Jason Merrill  <jason@redhat.com>
15157         * parse.y (operator): Set got_object from got_scope.
15158         Set looking_for_typename.
15159         * decl.c (lookup_name_real): Clear val after setting from_obj.
15160         Reorganize diagnostic.
15162 2000-10-20  Jason Merrill  <jason@redhat.com>
15164         * tree.c (walk_tree): Don't walk into default args.
15166         * error.c (dump_expr): Use host_integerp.
15168 2000-10-20  David Edelsohn  <edelsohn@gnu.org>
15170         * typeck2.c (abstract_virtuals_error): Use "because" instead of
15171         "since" in error message.
15173 2000-10-20  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15175         * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
15177 2000-10-20  Jeffrey Oldham  <oldham@codesourcery.com>
15179         * decl.c (revert_static_member_fn): Fixed typo.
15181 2000-10-19  Mark Mitchell  <mark@codesourcery.com>
15183         * class.c (subobject_offset_fn): New type.
15184         (dfs_record_base_offsets): Remove.
15185         (record_base_offsets): Likewise.
15186         (dfs_search_base_offsets): Likewise.
15187         (record_subobject_offset): New function.
15188         (check_subobject_offset): Likewise.
15189         (walk_subobject_offsets): Likewise.
15190         (record_subobject_offsets): Likewise.
15191         (layout_conflict_p): Reimplement.
15192         (layout_nonempty_base_or_field): Correct handling of type
15193         conflicts during layout.
15194         (layout_empty_base): Likewise.
15195         (build_base_field): Adjust to handle new representation of empty
15196         base offset table.
15197         (build_base_fields): Likewise.
15198         (layout_virtual_bases): Likewise.
15199         (splay_tree_compare_integer_csts): New function.
15200         (layout_class_type): Use a splay_tree, rather than a varray, to
15201         represent the offsets of empty bases.
15203         * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
15204         * decl.c (select_decl): Don't return declarations that are
15205         DECL_ANTICIPATED.
15207 2000-10-18  Mark Mitchell  <mark@codesourcery.com>
15209         * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
15210         (fake_std_node): New macro.
15211         * decl.c (in_std): Rename to ...
15212         (in_fake_std): ... this.
15213         (flag_no_builtin): Remove.
15214         (flag_no_nonansi_builtin): Likewise.
15215         (walk_namespaces_r): Use fake_std_node.
15216         (push_namespace): Use std_identifier.
15217         (pop_namespace): Use in_fake_std.
15218         (lookup_name_real): Use fake_std_node.
15219         (init_decl_processing): When -fhonor-std, create the `std'
15220         namespace.  Don't create a dummy fake_std_node in that case.
15221         Adjust call to c_common_nodes_and_builtins.  Use std_identifier.
15222         (builtin_function): Put builtins whose names don't begin
15223         with `_' in the std namespace.
15224         * decl2.c (flag_no_builtin): Remove.
15225         (flag_no_nonansi_builtin): Likewise.
15226         (set_decl_namespace): Use fake_std_node.
15227         (validate_nonmember_using_decl): Likewise.
15228         (do_using_directive): Likewise.
15229         (handle_class_head): Likewise.
15230         * dump.c (dequeue_and_dump): Likewise.
15231         * except.c (init_exception_processing): Use std_identifier.
15232         * init.c (build_member_call): Use fake_std_node.
15233         * rtti.c (init_rtti_processing): Use std_identifier.
15235 2000-10-17  Mark Mitchell  <mark@codesourcery.com>
15237         * cp-tree.h (back_end_hook): Remove declaration.
15238         * decl2.c (back_end_hook): Remove definition.
15240         * dump.c (dequeue_and_dump): Dump TREE_USED.
15242 2000-10-17  Brad Lucier <lucier@math.purdue.edu>
15244         * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
15246 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
15248         * decl.c (WINT_TYPE): Define.
15249         (init_decl_processing): Create types unsigned_ptrdiff_type_node,
15250         c_size_type_node, signed_size_type_node and wint_type_node.
15252 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
15254         * decl2.c (warn_missing_format_attribute): New variable.
15255         (lang_decode_option): Decode -Wmissing-format-attribute.
15257 2000-10-16  Mark Mitchell  <mark@codesourcery.com>
15259         * typeck.c (qualify_type): Remove.
15260         (composite_pointer_type): Fix handling of conversions to `cv void*'.
15262 2000-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15264         * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
15266 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15268         * Makefile.in (parse.c, parse.h): Create atomically.
15270 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
15272         * class.c (current_obstack): Remove.
15273         * decl.c (ggc_p): Remove.
15274         (start_decl): Don't use decl_tree_cons.
15275         (grokdeclarator): Don't use build_decl_list.
15276         (start_function): Don't use decl_tree_cons.
15277         (finish_function): Don't mess with obstacks.
15278         * decl2.c (grok_x_components): Don't use build_decl_list.
15279         * lex.c (make_call_declarator): Don't call decl_tree_cons.
15280         (implicitly_declare_fn): Don't call build_decl_list.
15281         * parse.y (frob_specs): Don't call build_decl_list or
15282         decl_tree_cons.
15283         (expr_or_declarator_intern): Don't call decl_tree_cons.
15284         (primary): Don't call build_decl_list.
15285         (fcast_or_absdcl): Likewise.
15286         (typed_declspecs): Don't call decl_tree_cons.
15287         (reserved_declspecs): Don't call build_decl_list.
15288         (declmods): Likewise.
15289         (reserved_typespecquals): Likewise.
15290         (aggr): Likewise.
15291         (new_type_id): Likewise.
15292         (cv_qualifiers): Likewise.
15293         (after_type_declarator_intern): Likewise.
15294         (notype_declarator_intern): Likewise.
15295         (absdcl_intern): Likewise.
15296         (named_parm): Likewise.
15297         * pt.c (most_specialized_class): Likewise.
15298         * repo.c (temporary_obstack): Make it a structure, not a pointer.
15299         (init_repo): Initialize it.
15300         * search.c (current_obstack): Remove.
15301         * typeck2.c (add_exception_specifier): Don't call build_decl_list.
15303 2000-10-09  Richard Henderson  <rth@cygnus.com>
15305         * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
15306         (c++ language support bits for libgcc): Remove.
15307         (c++.clean): Remove cplib2.txt cleanup.
15308         * config-lang.in (headers, lib2funcs): Remove.
15310         * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
15311         * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
15312         * inc/cxxabi.h, inc/exception, inc/new: Remove files.
15313         * inc/new.h, inc/typeinfo: Remove files.
15315 2000-10-08  Joseph S. Myers  <jsm28@cam.ac.uk>
15317         * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
15318         defined.
15319         (init_decl_processing): Initialize intmax_type_node and
15320         uintmax_type_node.
15322 2000-10-06  Richard Henderson  <rth@cygnus.com>
15324         * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
15325         (original_result_rtx): Remove.
15326         * decl.c (save_function_data): Don't clear x_result_rtx.
15327         (mark_lang_function): Don't mark it either.
15328         * expr.c (fixup_result_decl): Remove.
15329         * semantics.c (genrtl_named_return_value): Frob the return decl
15330         before calling emit_local_var.
15331         (genrtl_finish_function): Don't call fixup_result_decl.
15332         Always emit the jump to return_label.
15334 2000-10-06  Nathan Sidwell  <nathan@codesourcery.com>
15336         * pt.c (lookup_template_class): Set current access for enum.
15337         (tsubst_enum): Set file & line for enum decl.
15339         * spew.c (yylex): Remove unused variable.
15341 2000-10-05  Richard Henderson  <rth@cygnus.com>
15343         * semantics.c (genrtl_finish_function): Don't init or check
15344         can_reach_end; remove noreturn and return value checks.
15346 2000-10-05  Tom Tromey  <tromey@cygnus.com>
15348         * init.c (build_java_class_ref): Use `build_static_name' with a
15349         suffix, not a prefix, to build the class object's name.
15351 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
15353         * cp-tree.h (access_kind): Fix comment typo.
15354         * decl2.c (grokfield): Fix diagnostic typo.
15355         * semantics.c (finish_template_type): Fix comment typo.
15356         (finish_qualified_object_call_expr): Likewise.
15358 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
15360         * pt.c (tsubst_expr, DECL_STMT case): Don't process if
15361         tsubsting fails.
15363 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
15365         * spew.c (frob_id): New static function.
15366         (frob_opname): Use it.
15367         (yylex): Use it.
15369 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
15371         * decl.c (lang_mark_false_label_stack): Remove.
15372         * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
15374 2000-09-30  Joseph S. Myers  <jsm28@cam.ac.uk>
15376         * gxxint.texi: Use @email for formatting email addresses.
15378 2000-09-29  Gabriel Dos Reis  <gdr@codesourcery.com>
15380         * error.c: Remove direct obstack manipulation.  Replace with
15381         output_buffer-based formatting.  Adjust calls to removed macros.
15382         (obstack_chunk_alloc, obstack_chunk_free): Remove.
15383         (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
15384         OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
15386 2000-09-24  Mark Mitchell  <mark@codesourcery.com>
15388         * ir.texi: Move to ../c-tree.texi.
15390 2000-09-20  Jason Merrill  <jason@redhat.com>
15392         * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
15394 2000-09-21  Andreas Jaeger  <aj@suse.de>
15396         * errfn.c: Move declaration of cp_printer and cp_printers to ...
15397         * cp-tree.h: ... here.
15399         * error.c: Remove declaration of cp_printer.
15401 2000-09-20  Mark Mitchell  <mark@codesourcery.com>
15403         * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
15405 2000-09-20  Hans-Peter Nilsson  <hp@axis.com>
15407         * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
15408         users.
15410 2000-09-18  Mark Mitchell  <mark@codesourcery.com>
15412         * decl.c (start_function): Robustify.
15414 2000-09-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15416         * cp-tree.h (check_function_format): Accept a `status' parameter.
15418         * call.c, typeck.c: Updates calls to `check_function_format'.
15420 2000-09-17  Geoffrey Keating  <geoffk@cygnus.com>
15422         * decl2.c (handle_class_head): Always push some scope even
15423         in the error case.
15425 2000-09-16  Mark Mitchell  <mark@codesourcery.com>
15427         * cp-tree.h (struct cp_language_function): Remove
15428         x_scope_stmt_stack and name_declared.
15429         (current_scope_stmt_stack): Remove.
15430         (function_name_declared_p): New macro.
15431         (struct lang_decl_flags): Use c_lang_decl as a base class.
15432         (context): Remove.
15433         (struct lang_decl): Replace saved_tree with context.
15434         (DECL_FRIEND_CONTEXT): Adjust accordingly.
15435         (SET_DECL_FRIEND_CONTEXT): Likewise.
15436         (DECL_VIRTUAL_CONTEXT): Likewise.
15437         (DECL_SAVED_TREE): Remove.
15438         (C_DECLARED_LABEL_FLAG): Likewise.
15439         (cplus_expand_expr_stmt): Don't declare.
15440         (add_decl_stmt): Likewise.
15441         (add_scope_stmt): Likewise.
15442         * decl.c (mark_stmt_tree): Remove.
15443         (case_compare): Likewise.
15444         (finish_case_label): Use c_add_case_label.
15445         (init_decl_processing): Set more language-specific hooks.
15446         (build_enumerator): Fix typo in comment.
15447         (cplus_expand_expr_stmt): Remove.
15448         (mark_lang_function): Use mark_c_language_function.
15449         (lang_mark_tree): Use c_mark_lang_decl.
15450         * decl2.c: Change order of inclusion.
15451         * except.c: Likewise.
15452         * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR.  Fall
15453         back on c_expand_expr.
15454         * friend.c: Include expr.h.
15455         * init.c: Change order of inclusion.
15456         * Makefile.in: Update dependencies.
15457         * lex.h (free_lang_decl_chain): Remove.
15458         * optimize.c (maybe_clone_body): Use function_name_declared_p.
15459         * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
15460         it doesn't exist.
15461         (instantiate_decl): Use function_name_declared_p.
15462         * semantics.c (lang_expand_expr_stmt): Remove.
15463         (set_current_function_name_declared): Likewise.
15464         (current_function_name_declared): Likewise.
15465         (begin_compound_stmt): Use function_name_declared_p.
15466         (add_decl_stmt): Remove.
15467         (setup_vtbl_ptr): Use function_name_declared_p.
15468         (add_scope_stmt): Remove.
15469         (current_scope_stmt_stack): New function.
15470         (cp_expand_stmt): Don't handle SCOPE_STMTs.
15471         (expand_body): Use function_name_declared_p.
15472         * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
15473         * typeck.c: Change order of includes.
15474         (convert_sequence): Remove.
15476 2000-09-14  Joseph S. Myers  <jsm28@cam.ac.uk>
15478         * lex.c (reswords): Add _Complex.
15480 2000-09-14  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15482         * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
15484 2000-09-13  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
15486         * init.c (begin_init_stmts): Don't use // comments.
15488 2000-09-12  Jason Merrill  <jason@redhat.com>
15490         * decl.c (maybe_deduce_size_from_array_init): Set do_default for
15491         all non-extern arrays.
15493         * decl.c (grokdeclarator): Complain about 'friend T' for implicit
15494         typenames, too.  Downgrade complaint to pedwarn.
15495         (xref_tag): Warn about surprising behavior of 'friend struct T'.
15496         * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
15497         'class This::Inherited'.
15499 2000-09-12  Mark Mitchell  <mark@codesourcery.com>
15501         * decl.c (finish_case_label): Given the LABEL_DECL a
15502         DECL_CONTEXT.
15504 2000-09-12  Gabriel Dos Reis  <gdr@codesourcery.com>
15506         * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
15507         TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
15508         TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
15509         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
15510         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
15511         New macros.
15512         (sorry_for_unsupported_tree, print_scope_operator,
15513         print_left_paren, print_right_paren, print_left_bracket,
15514         print_right_bracket, print_whitespace): Likewise.
15515         (aggr_variety): Rename to class_key_or_enum.
15516         (print_type): Rename to print_type_id.
15517         (print_type_specifier_seq, print_simple_type_specifier,
15518         print_elaborated_type_specifier,
15519         print_rest_of_abstract_declarator,
15520         print_parameter_declaration_clause, print_exception_specification,
15521         print_nested_name_specifier, print_template_id,
15522         typedef_original_name,  print_template_argument_list_start,
15523         print_template_argument_list_end): New functions.
15525 2000-09-11  Gabriel Dos Reis  <gdr@codesourcery.com>
15527         * ir.texi: Add more documentation.
15529 2000-09-11  Mark Mitchell  <mark@codesourcery.com>
15531         * cp-tree.h (struct saved_scope): Remove x_function_parms.
15532         (current_function_parms): Don't define.
15533         (struct cp_language_function): Remove parms_stored.
15534         (current_function_just_assigned_this): Don't define.
15535         (current_function_parms_stored): Likewise.
15536         (static_ctors): Declare.
15537         (static_dtors): Likewise.
15538         (SF_EXPAND): Don't define.
15539         (expand_start_early_try_stmts): Remove declaration.
15540         (store_parm_decls): Likewise.
15541         * decl.c (static_ctors): Don't declare.
15542         (static_dtors): Likewise.
15543         (struct binding_level): Remove this_block.
15544         (poplevel): Remove dead code.
15545         (set_block): Likewise.
15546         (mark_binding_level): Don't mark this_block.
15547         (mark_saved_scope): Don't mark x_function_parms.
15548         (init_decl_processing): Don't add current_function_parms as a GC
15549         root.
15550         (check_function_type): Change prototype.
15551         (start_function): Remove RTL-generation code.
15552         (expand_start_early_try_stmts): Remove.
15553         (store_parm_decls): Give it internal linkage.  Remove
15554         RTL-generation code.
15555         (finish_function): Remove RTL-generation code.
15556         * decl2.c (static_ctors): Fix formatting.
15557         (static_dtors): Likewise.
15558         * method.c (use_thunk): Don't call store_parm_decls.
15559         (synthesize_method): Likewise.
15560         * optimize.c (maybe_clone_body): Likewise.
15561         * parse.y (fn.def2): Likewise.
15562         (.set_base_init): Likewise.
15563         (nodecls): Likewise.
15564         * pt.c (instantiate_decl): Likewise.
15565         * rtti.c (synthesize_tinfo_fn): Likewise.
15566         * semantics.c (genrtl_try_block): Simplify.
15567         (expand_body): Use genrtl_start_function and
15568         genrtl_finish_function.
15569         (genrtl_start_function): New function.
15570         (genrtl_finish_function): Likewise.
15572 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
15574         * error.c (cp_tree_printer, case 'P'): Append break.
15576 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
15578         * cp-tree.h (frob_opname): Declare.
15579         * parse.y (saved_scopes): New static variable.
15580         (cp_parse_init): Adjust.
15581         (do_id): If lastiddecl is NULL, do do_identifier.
15582         (operator): Save scope information.
15583         (unoperator): New reduction. Restore scope information.
15584         (operator_name): Append unoperator. Call frob_opname.
15585         * spew.c (frob_opname): Define.
15587 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
15589         * decl.c, rtti.c: Include defaults.h if not already included.
15590         Don't define the *_TYPE_SIZE macros.
15592 2000-09-09  Mark Mitchell  <mark@codesourcery.com>
15594         * cp-tree.h (push_switch): Change prototype.
15595         (check_cp_case_value): Remove declaration.
15596         (decl_constant_value): Likewise.
15597         * decl.c (struct cp_switch): Add switch_stmt and cases.
15598         (case_compare): New function.
15599         (push_switch): Set switch_stmt.  Initialize cases.
15600         (pop_switch): Clean up cases.
15601         (define_case_label): Rename to ...
15602         (finish_case_label): ... this.  Do semantic analysis for case
15603         labels here.
15604         (start_function): Correct comment.
15605         * decl2.c (check_cp_case_value): Remove.
15606         * expr.c (do_case): Remove.
15607         * pt.c (tsubst_expr): Adjust call to finish_case_label.
15608         * semantics.c (genrtl_do_poplevel): Remove declaration.
15609         (RECHAIN_STMTS): Remove.
15610         (finish_break_stmt): Use build_break_stmt.
15611         (finish_continue_stmt): Use build_continue_stmt.
15612         (finish_switch_cond): Adjust condition here, rater than in
15613         c_expand_start_case.
15614         (finish_case_label): Remove.
15615         * typeck.c (c_expand_return): Remove.
15616         (c_expand_start_case): Likewise.
15618 2000-09-07  Gabriel Dos Reis  <gdr@codesourcery.com>
15620         * ir.texi: Document type nodes.
15622 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
15624         * cp-tree.h (init_cp_semantics): Declare.
15625         (genrtl_try_block): Don't declare.
15626         (genrtl_handler): Likewise.
15627         (genrtl_catch_block): Likewise.
15628         (genrtl_ctor_stmt): Likewise.
15629         (genrtl_subobject): Likewise.
15630         (genrtl_do_poplevel): Likewise.
15631         (genrtl_named_return_value): Likewise.
15632         * lex.c (init_parse): Call init_cp_semantics.
15633         * semantics.c (genrtl_try_block): Give it internal linkage.
15634         (genrtl_handler): Likewise.
15635         (genrtl_catch_block): Likewise.
15636         (genrtl_ctor_stmt): Likewise.
15637         (genrtl_subobject): Likewise.
15638         (genrtl_do_poplevel): Likewise.
15639         (genrtl_named_return_value): Likewise.
15640         (lang_expand_stmt): Rename to ...
15641         (cp_expand_stmt): ... this.  Only handle C++-specific nodes.
15642         (init_cp_semantics): Define.
15644         * decl.c (initialize_local_var): Remove RTL-generating code.
15645         * semantics.c (genrtl_try_block): Fix formatting.
15647         Move statement-tree facilities from C++ to C front-end.
15648         * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
15649         (void_zero_node): Remove.
15650         (stmt_tree): Likewise.
15651         (scope_chain): Adjust.
15652         (language_function): Rename to cp_language_function.
15653         (cp_function_chain): Adjust.
15654         (current_stmt_tree): Remove.
15655         (last_tree): Likewise.
15656         (last_expr_type): Likewise.
15657         (struct lang_decl): Adjust.
15658         (STMT_IS_FULL_EXPR_P): Remove.
15659         (add_tree): Remove.
15660         (begin_stmt_tree): Likewise.
15661         (finish_stmt_tree): Likewise.
15662         (walk_tree_fn): Likewise.
15663         (walk_stmt_tree): Likewise.
15664         * class.c (finish_struct): Replace use of add_tree with add_stmt.
15665         * decl.c (mark_stmt_tree): Adjust type.
15666         (init_decl_processing): Don't build void_zero_node.
15667         (initialize_local_var): Adjust usage of current_stmt_tree.
15668         (finish_enum): Use add_stmt, not add_tree.
15669         (save_function_data): Adjust use of language_function.
15670         (finish_constructor_body): Use add_stmt, not add_tree.
15671         (finish_destructor_body): Likewise.
15672         (push_cp_function_context): Adjust use of language_function.
15673         (pop_cp_function_context): Likewise.
15674         (mark_lang_function): Likewise.
15675         (mark_cp_function_context): Likewise.
15676         * init.c (build_aggr_init): Adjust use of current_stmt_tree.
15677         (build_vec_init): Likewise.
15678         * semantics.c (SET_LAST_STMT): Remove.
15679         (RECHAIN_STMTS): Don't use it.
15680         (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
15681         (current_stmt_tree): Define.
15682         (add_tree): Remove.
15683         (finish_goto_stmt): Use add_stmt, not add_tree.
15684         (finish_expr_stmt): Likewise.
15685         (begin_if_stmt): Likewise.
15686         (finish_then_clause): Likewise.
15687         (begin_while_stmt): Likewise.
15688         (begin_do_stmt): Likewise.
15689         (finish_return_stmt): Likewise.
15690         (begin_for_stmt): Likewise.
15691         (finish_break_stmt): Likewise.
15692         (finish_continue_stmt): Likewise.
15693         (begin_switch_stmt): Likewise.
15694         (finish_case_label): Likewise.
15695         (begin_try_block): Likewise.
15696         (begin_function_try_block): Likewise.
15697         (begin_handler): Likewise.
15698         (begin_catch_block): Likewise.
15699         (begin_compound_stmt): Likewise.
15700         (begin_asm_stmt): Likewise.
15701         (finish_asm_stmt): Likewise.
15702         (finish_label_stmt): Likewise.
15703         (add_decl_stmt): Likewise.
15704         (finish_subobject): Likewise.
15705         (finish_decl_cleanup): Likewise.
15706         (finish_named_return_value): Likewise.
15707         (setup_vtbl_ptr): Likewise.
15708         (add_scope_stmt): Likewise.
15709         (finish_stmt_expr): Likewise.
15710         (prune_unused_decls): Remove.
15711         (begin_stmt_tree): Likewise.
15712         (finish_stmt_tree): Likewise.
15713         (prep_stmt): Adjust use of current_stmt_tree.
15714         (lang_expand_stmt): Likewise.
15715         * tree.c (statement_code_p): Remove.
15716         (cp_statement_code_p): New function.
15717         (walk_stmt_tree): Remove.
15718         (init_tree): Set lang_statement_code_p.
15720 2000-09-06  Zack Weinberg  <zack@wolery.cumb.org>
15722         Integrated preprocessor.
15724         * Make-lang.in, Makefile.in: Remove all references to input.c,
15725         gxx.gperf, and hash.h.  Add ../c-lex.o to C_OBJS.
15726         * gxx.gperf, hash.h, input.c: Delete.
15727         * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
15728         initialized properly.
15730         * class.c (fixup_pending_inline): Take a tree, not a
15731         struct pending_inline *.  All callers changed.
15732         (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
15733         RID_PROTECTED entries in ridpointers[] array here.
15734         * decl.c (duplicate_decls): Do not refer to struct
15735         pending_inline.
15736         (record_builtin_type, init_decl_processing): Use RID_MAX not
15737         CP_RID_MAX.
15738         (grokdeclarator): Use C_IS_RESERVED_WORD.
15739         * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
15740         cpplib.
15741         (grok_x_components): Do not inspect pending_inlines chain.
15743         * cp-tree.h (struct lang_identifier): Add rid_code entry.
15744         (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
15745         (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
15746         (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
15747         TIME_IDENTIFIER_FILEINFO): Kill.
15748         Update prototypes.
15749         * lex.h: Expunge cp_rid.  Rewrite RIDBIT macros to use just a
15750         single 32-bit word.
15751         * parse.y: Call do_pending_inlines unconditionally.
15752         reinit_parse_for_method is now snarf_method.  fn.defpen is no
15753         longer necessary.  Remove unnecessary <itype> annotation on
15754         SCOPE.  Do not refer to end_of_file or struct pending_inline.
15755         * semantics.c (begin_inline_definitions): Call
15756         do_pending_inlines unconditionally.
15758         * lex.c: Remove all code now shared with C front end.
15759         Initialize cpplib properly if USE_CPPLIB.  Put reserved words
15760         into the get_identifier table.  Rewrite pragma handling to
15761         work with the registry.  Move code to save tokens for later
15762         processing to spew.c.
15764         * spew.c: Rewrite everything in terms of token streams instead
15765         of text.  Move routines here from lex.c / input.c as
15766         appropriate.  GC-mark trees hanging off the pending inlines
15767         chain.
15769 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
15771         * NEWS: Mention that the named return value extension has been
15772         deprecated.
15773         * cp-tree.h (original_result_rtx): Define.
15774         (TREE_REFERENCE_EXPR): Remove.
15775         (DECL_VPARENT): Likewise.
15776         (pushdecl_nonclass_level): Likewise.
15777         (store_return_init): Likewise.
15778         (reinit_lang_specific): Likewise.
15779         (genrtl_named_return_value): Change prototype.
15780         * decl.c (original_result_rtx): Remove.
15781         (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
15782         Do not generate RTL for local variables here.
15783         (store_return_init): Remove.
15784         * semantics.c (genrtl_named_return_value): Simplify.  Fold in
15785         store_return_init.
15786         (finish_named_return_value): Adjust accordingly.  Warn that this
15787         extension is deprecated.
15788         (lang_expand_stmt): Adjust call to genrtl_named_return_value.
15790 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
15792         * pt.c (type_unification_real): Replace switch with if.
15793         (unify): Tsubst non-type parms before comparing.
15795 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
15797         * error.c (dump_typename): New function, broken out of ...
15798         (dump_type): ... here. Use it.
15799         * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
15801 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
15803         * init.c (build_offset_ref): Deal with namespace scoped
15804         TEMPLATE_ID_EXPRs.
15806 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
15808         * class.c (resolve_address_of_overloaded_function): Add
15809         explanation message.
15810         * decl.c (define_case_label): Reformat explanation.
15811         * decl2.c (finish_static_data_member_decl): Likewise.
15812         (grokfield): Likewise.
15813         * friend.c (do_friend): Likewise.
15815 2000-09-05  Zack Weinberg  <zack@wolery.cumb.org>
15817         * tree.c (walk_tree): Expose tail recursion.
15818         (walk_stmt_tree): New function.
15819         * cp-tree.h: Prototype walk_stmt_tree.
15820         * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
15821         the BLOCKs directly.  If a BLOCK has no variables after
15822         pruning, discard it.
15823         (finish_stmt_tree): Use walk_stmt_tree.  No need to save and
15824         restore the line number.
15826 2000-09-05  Mark Mitchell  <mark@codesourcery.com>
15828         * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
15829         (pt.o): Remove dependency on HTAB_H.
15830         * cp-tree.h: Include hashtab.h.
15831         (walk_tree): Change prototype.
15832         (walk_tree_without_duplicates): New function.
15833         * decl.c (check_default_argument): Use it.
15834         * optimize.c (remap_decl): Adjust calls to walk_tree.
15835         (copy_body): Likewise.
15836         (expand_calls_inline): Likewise.
15837         (calls_setjmp_p): Use walk_tree_without_duplicates.
15838         * pt.c: Don't include hashtab.h.
15839         (for_each_template_parm): Use walk_tree_without_duplicates.
15840         * semantics.c (finish-stmt_tree): Likewise.
15841         (expand_body): Likewise.
15842         * tree.c (walk_tree): Add additional parameter.
15843         (walk_tree_without_duplicates): New function.
15844         (count_trees): Use it.
15845         (verify_stmt_tree): Adjust call to walk_tree.
15846         (find_tree): Use walk_tree_without_duplicates.
15847         (no_linkage_check): Likewise.
15848         (break_out_target_exprs): Adjust call to walk_tree.
15849         (cp_unsave): Likewise.
15851 2000-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
15853         * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
15854         (TEMPLATE_TEMPLATE_PARM): Adjust comment.
15855         * cp-tree.h (TYPE_BINFO): Adjust comment.
15856         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
15857         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
15858         (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
15859         (TYPE_TEMPLATE_INFO): Likewise.
15860         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
15861         * class.c (push_nested_class): Likewise.
15862         * decl.c (lookup_name_real): Likewise.
15863         (grokdeclarator): Likewise.
15864         (grok_op_properties): Likewise.
15865         (xref_tag): Likewise.
15866         (xref_basetypes): Likewise.
15867         * decl2.c (constructor_name_full): Likewise.
15868         (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
15869         (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
15870         * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
15871         (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15872         (dump_type_suffix): Likewise.
15873         * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
15874         instead.
15875         (get_aggr_from_typedef): Likewise.
15876         * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
15877         (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15878         (write_template_parm): Likewise.
15879         (write_template_template_parm): Check tree code instead of
15880         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
15881         * method.c (build_overload_nested_name): Add
15882         BOUND_TEMPLATE_TEMPLATE_PARM.
15883         (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
15884         * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15885         * pt.c (convert_template_argument): Check tree code instead of
15886         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
15887         (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
15888         (for_each_template_parm): Adjust comment.
15889         (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.
15890         (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15891         (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.  Use
15892         template_args_equal to compare template template parameter cases.
15893         * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15894         * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
15895         instead.
15896         * tree.c (copy_template_template_parm): Decide whether to create
15897         a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
15898         (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15899         (copy_tree_r): Likewise.
15900         * typeck.c (comptypes): Likewise.  Check tree code instead of
15901         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
15903 2000-09-04  Mark Elbrecht  <snowball3@bigfoot.com>
15905         * decl.c (finish_function): Move the code for handling functions
15906         marked with the constructor and destructor attributes inside the
15907         expand_p block.
15909 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
15911         * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
15913 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
15915         * pt.c (lookup_template_class): Remove abort.
15916         * tree.c (get_type_decl): Allow error_mark_node.
15918 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
15920         * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
15921         TEMPLATE_ID_EXPRs.
15923 2000-09-03  Mark Mitchell  <mark@codesourcery.com>
15925         * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
15926         new ABI mangling.
15928 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
15930         * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
15931         union tag mismatch error reporting.
15933 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
15935         * call.c (build_scoped_method_call): Check it is not a namespace.
15937 2000-08-30  Jason Merrill  <jason@redhat.com>
15939         * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
15941         * tree.c (bot_manip): Check TREE_CONSTANT rather than
15942         !TREE_SIDE_EFFECTS.  Call break_out_target_exprs and
15943         build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
15945         * decl.c (start_function): Always call make_function_rtl.
15947 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
15949         * semantics.c (prune_unused_decls): New function.
15950         (finish_stmt_tree): Call it via walk_tree.
15952 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
15954         * class.c (build_secondary_vtable): Constify a char *.
15955         * decl.c (init_decl_processing): Initialize function_id_node,
15956         pretty_function_id_node, and func_id_node.
15957         * input.c (struct input_source): Constify 'str'.
15958         (feed_input): Constify first argument.
15959         * mangle.c (write_identifier): Constify argument.
15960         * pt.c (mangle_class_name_for_template): Constify argument.
15962 2000-08-29  Mark Mitchell  <mark@codesourcery.com>
15964         * typeck.c (mark_addressable): Remove code that pokes around in
15965         RTL.
15967 2000-08-28  Jason Merrill  <jason@redhat.com>
15969         * lex.c (file_name_nondirectory): Move to toplev.c.
15971         * cp-tree.h (LOCAL_CLASS_P): New macro.
15972         * class.c (finish_struct_1): Use it.
15974 2000-08-27  Alex Samuel  <samuel@codesourcery.com>
15976         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
15977         (write_encoding): Pass another argument to write_name.
15978         (write_name): Add ignore_local_scope parameter.  Fix handling of
15979         local names.
15980         (write_nested_name): Use write_unqualified_name.
15981         (write_prefix): Likewise.  Skip out on FUNCTION_DECLs.
15982         (write_template_prefix): Use write_unqualified_name.
15983         (write_component): Remove.
15984         (write_local_name): Add parameter.  Use direct local entity to
15985         discriminator calculation.
15986         (write_class_enum_type): Pass another argument to write_name.
15987         (write_template_template_arg): Likewise.
15988         (make_guard_variable): Likewise.
15990 2000-08-27  Jason Merrill  <jason@redhat.com>
15992         * decl.c (pushdecl): Matching decls for local externs are found in
15993         the current level.  Propagate linkage information from previous
15994         declarations.
15996 2000-08-26  Gabriel Dos Reis  <gdr@codesourcery.com>
15998         * ir.texi (Expressions): Fix typo.
16000 2000-08-25  Greg McGary  <greg@mcgary.org>
16002         * tree.c (init_tree): Use ARRAY_SIZE.
16004 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
16006         * error.c (cp_tree_printer): Rework.
16008 2000-08-25  Mark Mitchell  <mark@codesourcery.com>
16010         * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
16011         dyn-string.o.
16012         (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
16013         (cp-demangle.o): Remove target.
16014         (dyn-string.o): Likewise.
16016         * decl.c (grokfndecl): Require that `main' return an `int'.
16017         * mangle.c (write_encoding): Don't mangle return types for
16018         conversion functions.
16020 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
16022         * error.c (tree_formatting_info): New data type.
16023         (tree_being_formatted): New macro.
16024         (tree_formatting_flags): Likewise.
16025         (put_whitespace): Likewise.
16026         (print_tree_identifier): Likewise.
16027         (print_identifier): Likewise.
16028         (cp_tree_printer, print_function_argument_list, print_declaration,
16029         print_expression, print_function_declaration,
16030         print_function_parameter, print_type, print_cv_qualifier): New
16031         functions.
16032         (init_error): Initialize lang_printer.
16034 2000-08-24  Jason Merrill  <jason@redhat.com>
16036         * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
16037         adjustment necessary.
16039 2000-08-24  Greg McGary  <greg@mcgary.org>
16041         * cp-tree.h (MAIN_NAME_P): Remove macro.
16043 2000-08-24  Gabriel Dos Reis  <gdr@codesourcery.com>
16045         * error.c (print_instantiation_context): Don't forget to flush the
16046         buffer.
16048 2000-08-23  Jason Merrill  <jason@redhat.com>
16050         * typeck.c (build_ptrmemfunc): Save the input pmf.
16052         * method.c (process_modifiers): Use same_type_p.
16054 2000-08-23  Mark Mitchell  <mark@codesourcery.com>
16056         * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
16057         * mangle.c (write_function_type): Change prototype.
16058         (write_encoding): Don't mangle return types for
16059         constructors or destructors.
16060         (write_type): Adjust call to write_function_type.
16061         * pt.c (instantiate_template): Instantiate alternate entry points
16062         when instantiating the main function.
16064 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
16066         * error.c (cp_print_error_function): Don't use embedded '\n' in
16067         output_printf.
16069 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
16071         * decl.c (init_decl_processing): Remove bogus initialization.
16072         * error.c (lang_print_error_function): Restore here.
16073         (init_error): Initialize print_error_function.
16075 2000-08-22  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
16077         * decl2.c (arg_assoc): Revert my 2000-08-11 change.
16079 2000-08-22  Gabriel Dos Reis  <gdr@codesourcery.com>
16081         * Makefile.in (error.o): Depends on diagnostic.h
16083         * cp-tree.h (problematic_instantiation_changed,
16084         record_last_problematic_instantiation, current_instantiation,
16085         print_instantiation_context): Declare.
16086         (maybe_print_template_context): Remove.
16088         * decl.c (init_decl_processing): Set print_error_function to NULL.
16089         (lang_print_error_function): Remove, since we're using a new
16090         machinery.
16092         * error.c: #include diagnostic.h
16093         (function_category): New function.
16094         (cp_diagnostic_starter): Likewise.
16095         (cp_diagnostic_finalizer): Likewise.
16096         (cp_print_error_function): Likewise.
16097         (maybe_print_instantiation_context): Likewise.
16098         (print_instantiation_full_context): Likewise.
16099         (print_instantiation_partial_context): Likewise.
16100         (print_instantiation_context): Define.
16101         (init_error): Initialize diagnostic pager and finalizer.
16103         * pt.c (problematic_instantiation_changed): Define.
16104         (record_last_problematic_instantiation): Likewise.
16105         (current_instantiation): Likewise.
16106         (maybe_print_template_context): Remove.
16107         (print_template_context): Likewise.
16108         (current_tinst_level): Make static to reflect Brendan Kehoe's
16109         change of 1995-04-13.
16110         (push_tinst_level): Call print_instantiation_context.
16112 2000-08-21  Nix  <nix@esperi.demon.co.uk>
16114         * lang-specs.h: Do not process -o or run the assembler if
16115         -fsyntax-only.
16117 2000-08-21  Joseph S. Myers  <jsm28@cam.ac.uk>
16119         * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
16120         variables.
16121         * decl2.c (lang_decode_option): Disable gettext attributes for
16122         -ansi.
16124 2000-08-21  Gabriel Dos Reis  <gdr@codesourcery.com>
16126         * lex.c (lang_init_options): Default diagnostic message maximum
16127         length to 80, when line-wrapping.
16129 2000-08-20  Mark Mitchell  <mark@codesourcery.com>
16131         * class.c (build_vtbl_initializer): Clear the entire
16132         vtbl_init_data.  Start keeping track of the functions for which we
16133         have created vcall offsets here.
16134         (dfs_build_vcall_offset_vtbl_entries): Remove.
16135         (build_vcall_offset_vtbl_entries): Reimplement.
16136         (add_vcall_offset_vtbl_entries_r): New function.
16137         (add_vcall_offset_vtbl_entries_1): Likewise.  Tweak logic for
16138         computing when vcall offsets are necessary.
16140 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
16142         * decl.c (member_function_or_else): Use cp_error ... %T.
16143         (grokdeclarator): Likewise.
16144         (start_method): Likewise.
16145         * friend.c (make_friend_class): Use cp_pedwarn ... %T.
16147 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
16149         * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
16150         TYPE_DECLs.
16152 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
16154         * cp-tree.h (PTRMEM_OK_P): New macro.
16155         (itf_ptrmem_ok): New enumeration value.
16156         * class.c (resolve_address_of_overloaded_function): Add PTRMEM
16157         argument. Diagnose implicit pointer to member.
16158         (instantiate_type): Don't diagnose implicit pointer to member
16159         here. Pass itf_ptrmem_ok if ok. Adjust calls to
16160         resolve_address_of_overloaded_function.
16161         * init.c (build_offset_ref): Set PTRMEM_OK_P.
16162         (resolve_offset_ref): Don't diagnose implicit pointer to member here.
16163         * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
16164         * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
16165         (build_unary_op): Deal with single non-static member in
16166         microsoft-land.
16168 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
16170         * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
16172 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
16174         * cp-tree.h (enum_name_string): Remove prototype.
16175         (report_case_error): Remove prototype.
16176         * cp/typeck2.c (enum_name_string): Remove.
16177         (report_case_error): Remove.
16178         * error.c (dump_expr): Deal with enum values directly.
16179         Correctly negate integer constant.
16181 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
16183         * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
16184         (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
16185         * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
16186         (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
16187         (__cxa_vec_new): Use __cxa_vec_new2.
16188         (__cxa_vec_delete): Use __cxa_vec_delete2.
16190 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
16192         * vec.cc (__cxa_vec_new): Set "C" linkage.
16193         (__cxa_vec_ctor): Likewise.
16194         (__cxa_vec_cctor): Likewise.
16195         (__cxa_vec_dtor): Likewise.
16196         (__cxa_vec_delete): Likewise.
16197         * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
16198         (__cxa_vec_ctor): Likewise.
16199         (__cxa_vec_cctor): Likewise.
16200         (__cxa_vec_dtor): Likewise.
16201         (__cxa_vec_delete): Likewise.
16203 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
16205         * class.c (instantiate_type): Reinstate local variable
16206         deleted in previous change.
16208         * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
16209         itf_no_attributes.
16211 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
16213         * cp-tree.h (instantiate_type_flags): New enumeration.
16214         (instantiate_type): Change parameter.
16215         * class.c (instantiate_type): Adjust prototype. Adjust.
16216         * call.c (standard_conversion): Adjust instantiate_type call.
16217         (reference_binding): Likewise.
16218         (build_op_delete_call): Likewise.
16219         (convert_like_real): Likewise.
16220         * cvt.c (cp_convert_to_pointer): Likewise.
16221         (convert_to_reference): Likewise.
16222         * pt.c (convert_nontype_argument): Likewise.
16223         * typeck.c (build_binary_op): Likewise.
16224         (build_ptrmemfunc): Likewise.
16225         (convert_for_assignment): Likewise.
16227 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
16229         * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
16230         (current_aggr): Define.
16231         * decl.c (grokdeclarator): Make sure a friend class is an
16232         elaborated type specifier.
16233         * parse.y (current_aggr): Remove static definition.
16234         (cp_parse_init): Adjust.
16235         (structsp): Clear and restore current_aggr.
16236         (component_decl_list): Clear current_aggr.
16238         * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
16239         aggregate tag on the typename's context.
16241         * pt.c (tsubst_friend_class): Return error_mark_node, if
16242         parms becomes NULL.
16243         (instantiate_class_template): Ignore error_mark_node friend types.
16245 2000-08-14  Nathan Sidwell  <nathan@codesourcery.com>
16247         * cvt.c (warn_ref_binding): New static function, broken out of ...
16248         (convert_to_reference): ... here. Use it.
16250 2000-08-11  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
16252         * parse.y (template_arg): Add rule for template qualified with
16253         global scope.
16255 2000-08-11  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
16257         * decl2.c (add_function): Reorganize.
16258         (arg_assoc): Do not consider function template decls.
16260 2000-08-11  Jason Merrill  <jason@redhat.com>
16262         * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
16263         looking inside.
16265 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
16267         * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
16268         (lookup_nested_tag): Likewise.
16270         * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
16271         can be produced.
16273 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
16275         * parse.y (named_complex_class_head_sans_basetype): Remove
16276         always true if.
16278 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
16280         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
16281         explicit TEMPLATE_ID_EXPR args.
16282         (build_expr_from_tree, case CALL_EXPR): Likewise.
16284 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
16286         * decl.c (check_tag_decl): Diagnose typename's which don't
16287         declare anything.
16289 2000-08-10  Nathan Sidwell  <nathan@codesourcery.com>
16291         * init.c (build_aggr_init): Reject bogus array initializers
16292         early.
16294 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
16296         * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
16297         runtime.
16298         * cp/tinfo.cc (__dynamic_cast): Likewise.
16299         * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
16301 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
16303         * cvt.c (convert_to_pointer_force): Fix error message when
16304         attempting to cast from ambiguous base.
16306 2000-08-08  Jason Merrill  <jason@redhat.com>
16308         * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
16309         (tsubst_template_arg_vector): Likewise.
16311         * decl2.c (build_anon_union_vars): Choose the largest field; don't
16312         assume that one will be as large as the union.
16314 2000-08-07  Kazu Hirata  <kazu@hxi.com>
16316         * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
16317         * decl.c (pop_labels): Likewise.
16319 2000-08-04  Jeffrey Oldham  <oldham@codesourcery.com>
16321         * inc/cxxabi.h (__pbase_type_info): Changed member names to match
16322         specifications.
16323         (__pointer_to_member_type_info): Likewise.
16324         (__base_class_info): Likewise.
16325         (__class_type_info): Likewise.
16326         (__si_class_type_info): Likewise.
16327         (__vmi_class_type_info): Likewise.
16328         * tinfo.cc (__si_class_type_info::__do_find_public_src):
16329         Changed member names to match specifications.
16330         (__vmi_class_type_info::__do_find_public_src): Likewise.
16331         (__si_class_type_info::__do_dyncast): Likewise.
16332         (__vmi_class_type_info::__do_dyncast): Likewise.
16333         (__si_class_type_info::__do_upcast): Likewise.
16334         (__vmi_class_type_info::__do_upcast): Likewise.
16335         * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
16336         (__pbase_type_info::__pointer_catch): Likewise.
16337         (__pointer_type_info::__pointer_catch): Likewise.
16338         (__pointer_to_member_type_info::__pointer_catch): Likewise.
16340 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
16342         * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
16343         * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
16344         (cc1plus): Link with $(BACKEND) and $(C_OBJS).
16346 2000-08-04  Mark Mitchell  <mark@codesourcery.com>
16348         * cp-tree.h (add_method): Change prototype.
16349         * class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
16350         Don't double the size of the method vector in the error case.
16351         (handle_using_decl): Adjust call to add_method.
16352         (add_implicitly_declared_members): Likewise.
16353         (clone_function_decl): Likewise.
16354         * decl2.c (check_classfn): Likewise.
16355         * semantics.c (finish_member_declaration): Likewise.
16357 2000-08-04  Joseph S. Myers  <jsm28@cam.ac.uk>
16359         * decl.c (flag_isoc94): New variable.
16361 2000-08-02  Jason Merrill  <jason@redhat.com>
16363         * pt.c (do_type_instantiation): Add complain parm; don't complain
16364         if called recursively.
16365         * cp-tree.h, parse.y: Adjust.
16367 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
16369         * decl2.c: Silently ignore -Wstrict-prototypes; warn about
16370         -Wno-strict-prototypes.
16372         * g++spec.c: Adjust type of second argument to
16373         lang_specific_driver, and update code as necessary.
16375         * cp-tree.h: Don't prototype min_precision here.
16376         (my_friendly_assert): Cast expression to void.
16377         * semantics.c (do_poplevel): Initialize scope_stmts.
16379 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
16381         * cp-tree.h (DECL_NEEDED_P): Tweak.
16383 2000-07-28  Jason Merrill  <jason@redhat.com>
16385         * lang-specs.h: Use %i in rule for .ii files.
16387 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
16389         * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
16391 2000-07-30  Mark Mitchell  <mark@codesourcery.com>
16393         Allow indirect primary bases.
16394         * cp-tree.h (struct lang_type): Remove vfield_parent.  Add
16395         primary_base.
16396         (CLASSTYPE_VFIELD_PARENT): Remove.
16397         (CLASSTYPE_PRIMARY_BINFO): Reimplement.
16398         (BINFO_PRIMARY_BINFO): Remove.
16399         (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
16400         (BINFO_VBASE_PRIMARY_P): Likewise.
16401         (BINFO_PRIMARY_BASE_OF): New macro.
16402         (BINFO_INDIRECT_PRIMARY_P): Likewise.
16403         (get_primary_binfo): New function.
16404         * decl.c (lang_mark_tree): Make lang_type::primary_base.
16405         * class.c (vcall_offset_data_s): Rename to ...
16406         (vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
16407         and add ctor_vtbl_p.
16408         (get_derived_offset): Use get_primary_binfo.
16409         (dfs_mark_primary_bases): Adjust handling of virtual primary
16410         bases.
16411         (mark_primary_bases): Likewise.
16412         (set_primary_base): Take a binfo, not an integer, as a
16413         representation of the primary base.
16414         (indirect_primary_base_p): Remove.
16415         (determine_primary_base): Adjust for indirect primary bases.
16416         (dfs_find_final_overrider): Fix typo in coment.
16417         (update_vtable_entry_for_fn): Use get_primary_binfo.
16418         (layout_nonempty_base_or_field): Tweak.
16419         (build_base_fields): Adjust for new primary base semantics.
16420         (dfs_propagate_binfo_offsets): Remove.
16421         (propagate_binfo_offsets): Rewrite.
16422         (dfs_set_offset_for_shared_vbases): Remove.
16423         (layout_virtual_bases): Don't use it.
16424         (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
16425         ABI.
16426         (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
16427         CLASSTYPE_VFIELD_PARENT.
16428         (dfs_get_primary_binfo): New function.
16429         (get_primary_binfo): Likewise.
16430         (dump_class_hierarchy_r): Tweak printing of primary bases.
16431         (build_vtbl_initializer): Fix typo in comments.  Use
16432         vtbl_init_data.
16433         (build_vcall_and_vbase_vtbl_entries): Likewise.
16434         (build_vbaes_offset_vtbl_entries): Likewise.
16435         (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
16436         BV_VCALL_INDEX to handle indirect primary bases.
16437         (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
16438         (build_rtti_vtbl_entries): Likewise.
16439         * search.c (get_shared_vbase_if_not_primary): Tweak.
16440         (find_vbase_instance): Likewise.
16441         (binfo_for_vtable): Simplify.
16442         * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
16443         (make_binfo): Make it have 11 entries.
16445 2000-07-30  Alex Samuel  <samuel@codesourcery.com>
16447         * mangle.c (DECL_TEMPLATE_ID_P): Remove.
16448         (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
16449         ascertaining primaryness.
16450         (G): Remove template_args.
16451         (decl_is_template_id): New function.
16452         (write_encoding): Use decl_is_template_id.
16453         (write_name): Likewise.  Handle type_decls.  Get main variant of
16454         type decls.
16455         (write_nested_name): Likewise.
16456         (write_prefix): Likewise.
16457         (write_template_prefix): Likewise.
16458         (write_special_name_constructor): Remove defunct production from
16459         comment.
16460         (write_bare_function_type): Remove comment about absent parameter.
16461         (write_template_template_arg): Add missing grammar production to
16462         comment.
16464 2000-07-27  Jason Merrill  <jason@redhat.com>
16466         * decl.c (duplicate_decls): If common_type produces a non-typedef
16467         type for a typedef, just use the old type.
16469 2000-07-27  Mark Mitchell  <mark@codesourcery.com>
16471         * cp-tree.h (function_depth): Declare.
16472         (verify_stmt_tree): Likewise.
16473         (find_tree): Likewise.
16474         * decl.c (function_depth): Give it external linkage.
16475         * optimize.c (optimize_function): Increment and decrement it.
16476         * tree.c (verify_stmt_tree_r): New function.
16477         (verify_stmt_tree): Likewise.
16478         (find_tree_r): Likewise.
16479         (find_tree): Likewise.
16481 2000-07-27  Jason Merrill  <jason@redhat.com>
16483         * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
16484         TYPE_PTRMEMFUNC_P.
16485         * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
16487 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
16489         * decl.c (start_cleanup_fn): Mark the function as `inline'.
16490         * decl2.c (get_guard): Call cp_finish_decl, not
16491         rest_of_decl_compilation, for local guards.
16492         * lex.c (do_identifier): Remove unused variable.
16494 2000-07-26      Marc Espie <espie@cvs.openbsd.org>
16496         * parse.y:  Add missing ';'.
16498 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
16500         * parse.y (empty_parms): Use `()', not `(...)', when in the scope
16501         of `extern "C++"'.
16503 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
16505         Kill strict_prototype. Backwards compatibility only for
16506         non NO_IMPLICIT_EXTERN_C systems.
16507         * cp-tree.h (flag_strict_prototype): Remove.
16508         (strict_prototype): Remove.
16509         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
16510         * decl.c (maybe_push_to_top_level): Adjust.
16511         (pop_from_top_level): Adjust.
16512         (decls_match): Only allow sloppy parm matching for ancient
16513         system headers.
16514         (init_decl_processing): Adjust.
16515         (grokdeclarator): Adjust.
16516         * decl2.c (flag_strict_prototype): Remove.
16517         (strict_prototype): Remove.
16518         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
16519         (lang_f_options): Remove "strict-prototype".
16520         (unsupported-options): Add "strict-prototype".
16521         * lex.c (do_identifier): Adjust.
16522         (do_scoped_id): Adjust.
16523         * parse.y (empty_parms): Adjust.
16524         * class.c (push_lang_context): Adjust.
16525         (pop_lang_context): Adjust.
16526         * typeck.c (comp_target_parms): Adjust.
16528 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
16530         * decl.c (poplevel): Deal with anonymous variables at for scope.
16531         (maybe_inject_for_scope_var): Likewise.
16533 2000-07-25  Zack Weinberg  <zack@wolery.cumb.org>
16535         * decl.c: Remove all signal handling code, now done in toplev.c.
16537 2000-07-23  Mark Mitchell  <mark@codesourcery.com>
16539         * decl.c (make_rtl_for_nonlocal_decl): Rework.
16541         * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
16542         correctly.
16544 2000-07-20  Zack Weinberg  <zack@wolery.cumb.org>
16546         * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
16547         Define my_friendly_assert and my_friendly_abort as macros
16548         which may call friendly_abort.  Prototype friendly abort, not
16549         my_friendly_abort or my_friendly_assert.
16550         * decl.c (signal_catch): Report the signal caught in the error
16551         message.  Call fatal directly.
16552         * typeck2.c (ack, my_friendly_assert): Delete.
16553         (my_friendly_abort): Rename to friendly_abort.  Expect file,
16554         line, and function parameters.  Report the abort code, then
16555         call fancy_abort.  Do not mask an abort if errors have
16556         already occurred.
16558 2000-07-18  Nathan Sidwell  <nathan@codesourcery.com>
16560         * typeck.c (comp_target_parms): Remove obsolete parameter.
16561         (comp_target_types): Adjust.
16563 2000-07-17  Jason Merrill  <jason@redhat.com>
16565         * typeck.c (mark_addressable): Never set TREE_USED.
16566         * call.c (build_call): Don't abort on calls to library functions
16567         that have been declared normally.
16569         * typeck.c (build_binary_op): Fix grammar in warning.
16571         * exception.cc (__eh_free): Fix prototype.
16573         * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
16575         * decl.c (pushdecl): Handle seeing an OVERLOAD in
16576         IDENTIFIER_NAMESPACE_VALUE.
16578 2000-07-16  Mark Mitchell  <mark@codesourcery.com>
16580         * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
16581         * method.c (use_thunk): Correct handling of vcall offsets.
16583 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
16585         * .cvsignore: parse.h and parse.c have no cp- prefix.
16587 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
16589         * .cvsignore: New file.
16591 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
16593         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
16595 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
16597         * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
16598         * parse.c: Remove.
16599         * parse.h: Likewise.
16601 2000-07-11  Mark Mitchell  <mark@codesourcery.com>
16603         * class.c (layout_class_type): Add pointers to virtual bases after
16604         base classes under the old ABI.
16606 2000-07-10  Benjamin Chelf  <chelf@codesourcery.com>
16608         * semantics.c (finish_for_stmt): Remove call to emit_line_note.
16609         (finish_continue_stmt): Likewise.
16610         (begin_for_stmt): Remove call to note_level_for_for.
16611         (finish_goto_stmt): Change call from build_min_nt
16612         to build_stmt.
16613         (finish_expr_stmt): Likewise.
16614         (begin_if_stmt): Likewise.
16615         (begin_while_stmt): Likewise.
16616         (finish_while_stmt): Likewise.
16617         (finish_return_stmt): Likewise.
16618         (begin_for_stmt): Likewise.
16619         (finish_for_stmt): Likewise.
16620         (finish_break_stmt): Likewise.
16621         (begin_switch_stmt): Likewise.
16622         (finish_case_label): Likewise.
16623         (genrtl_try_block): Likewise.
16624         (begin_try_block): Likewise.
16625         (begin_handler): Likewise.
16626         (begin_compound_stmt): Likewise.
16627         (finish_asm_stmt): Likewise.
16628         (finish_label_stmt): Likewise.
16629         (add_decl_stmt): Likewise.
16630         (finish_subobject): Likewise.
16631         (finish_decl_cleanup): Likewise.
16632         (finish_named_return_value): Likewise.
16633         (setup_vtbl_ptr): Likewise.
16634         (add_scope_stmt): Likewise.
16635         * decl.c (finish_constructor_body): Likewise.
16636         (finish_destructor_body): Likewise.
16637         * optimize.c (copy_body_r): Likewise.
16638         (initialize_inlined_parameters): Likewise.
16639         (declare_return_variable): Likewise.
16640         (expand_call_inline): Likewise.
16642 2000-07-10  Jakub Jelinek  <jakub@redhat.com>
16644         * semantics.c (expand_body): Sync interface information
16645         at the end of function body expansion.
16647 2000-07-09  Jason Merrill  <jason@redhat.com>
16649         * init.c (build_new_1): Bail early if the call to new fails.
16651         * decl.c (compute_array_index_type): Check specifically for
16652         an INTEGER_CST, not just TREE_CONSTANT.
16654         * decl.c (duplicate_decls): Don't call duplicate_decls on
16655         the DECL_TEMPLATE_RESULT.
16656         (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
16657         codes.
16659         * error.c (dump_template_bindings): Don't crash if we had an
16660         invalid argument list.
16662         * typeck.c (c_expand_start_case): Do narrowing here.
16663         * semantics.c (finish_switch_cond): Not here.
16665 2000-07-09  Hidvegi Zoli  <hzoli@austin.ibm.com>
16667         * parse.y (asm_clobbers): Do string concatenation.
16669 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
16671         * decl.c (pushtag): Don't put local classes in template functions
16672         on the local_classes list.
16674 2000-07-04  Scott Snyder  <snyder@fnal.gov>
16676         * decl2.c (get_guard): Add missing return for old ABI local
16677         variable case.
16679 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
16681         * cp-tree.h (char_type_p): New function.
16682         * decl.c (init_decl_processing): Don't initialize
16683         signed_wchar_type_node or unsigned_wchar_type_node.
16684         (complete_array_type): Handle brace-enclosed string-constants.
16685         * rtti.c (emit_support_tinfos): Remove #if 0'd code.
16686         * tree.c (char_type_p): New function.
16687         * typeck2.c (digest_init): Use char_type_p.
16689 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
16691         * pt.c (tsubst): Don't layout type, if it's error_mark.
16693 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
16695         * pt.c (instantiate_pending_templates): Reset template level.
16697 2000-07-05  Jason Merrill  <jason@redhat.com>
16699         * call.c (joust): Don't complain about `operator char *()' beating
16700         `operator const char *() const'.
16702 2000-07-04  scott snyder  <snyder@fnal.gov>
16703             Jason Merrill  <jason@redhat.com>
16705         * repo.c (repo_get_id): Handle the case where a class with virtual
16706         bases has a null TYPE_BINFO_VTABLE.
16708 2000-07-04  Kevin Buhr  <buhr@stat.wisc.edu>
16709             Jason Merrill  <jason@redhat.com>
16711         * parse.y (member_init): Just pass in the type.
16712         * init.c (expand_member_init): Handle getting a type.
16714 2000-07-04  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
16715             Jason Merrill  <jason@redhat.com>
16717         * decl.c (finish_function): Warn if a function has no return
16718         statement.
16719         Suggested by Andrew Koenig.
16720         * typeck.c (check_return_expr): Do set current_function_returns_value
16721         if we got an error_mark_node.
16723 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
16725         * decl2.c (push_decl_namespace): Push the original namespace.
16727 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
16729         * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
16730         * semantics.c (begin_class_definition): Clear it.
16732 2000-07-02  Benjamin Chelf  <chelf@codesourcery.com>
16734         * cp-tree.h (genrtl_goto_stmt): Remove declaration.
16735         (genrtl_expr_stmt): Likewise.
16736         (genrtl_decl_stmt): Likewise.
16737         (genrtl_if_stmt): Likewise.
16738         (genrtl_while_stmt): Likewise.
16739         (genrtl_do_stmt): Likewise.
16740         (genrtl_return_stmt): Likewise.
16741         (genrtl_for_stmt): Likewise.
16742         (genrtl_break_stmt): Likewise.
16743         (genrtl_continue_stmt): Likewise.
16744         (genrtl_scope_stmt): Likewise.
16745         (genrtl_switch_stmt): Likewise.
16746         (genrtl_case_label): Likewise.
16747         (genrtl_begin_compound_stmt): Likewise.
16748         (genrtl_finish_compound_stmt): Likewise.
16749         (genrtl_compound_stmt): Likewise.
16750         (genrtl_asm_stmt): Likewise.
16752         * init.c (begin_init_stmts): Remove call to
16753         genrtl_begin_compound_stmt.
16754         (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
16756         * semantics.c (lang_expand_stmt): Changed call to
16757         genrtl_compound_stmt to ignore return value.
16759 2000-07-02  Mark Mitchell  <mark@codesourcery.com>
16761         * mangle.c (canonicalize_for_substitution): Return the canonical
16762         variant of a type.
16764         * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
16765         TYPE_DECL.
16766         * typeck.c (commonparms): Remove obstack manipulations.
16768 2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>
16770         * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
16772         * Makefile.in (OBJS): Added ../c-semantics.o.
16773         (OBJDEPS): Likewise.
16775         * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
16776         ../c-common.h.
16777         (struct stmt_tree): Added comment.
16778         (current_function_name_declared): Removed.
16779         (stmts_are_full_exprs_p): Likewise.
16780         (genrtl_do_pushlevel): Likewise.
16781         (genrtl_clear_out_block): Likewise.
16782         (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
16783         (DECL_ANON_UNION_ELEMS): Likewise.
16784         (emit_local_var): Likewise.
16785         (make_rtl_for_local_static): Likewise.
16786         (do_case): Likewise.
16787         (expand_stmt): Likewise.
16788         (genrtl_decl_cleanup): Likewise.
16789         (c_expand_asm_operands): Likewise.
16790         (c_expand_return): Likewise.
16791         (c_expand_start_case): Likewise.
16793         * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
16794         (emit_local_var): Likewise.
16795         (initialize_local_var): Change reference to
16796         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
16797         Change reference to stmts_are_full_exprs_p to
16798         current_stmt_tree->stmts_are_full_exprs_p.
16799         (push_cp_function_context): Likewise.
16801         * expect.c (expand_throw): Change reference to
16802         stmts_are_full_exprs_p.
16804         * init.c (build_aggr_init): Change reference to
16805         stmts_are_full_exprs_p.
16806         (build_vec_init): Likewise.
16808         * optimize.c (maybe_clone_body): Change reference to
16809         current_function_name_declared to
16810         cp_function_chain->name_declared.
16812         * pt.c (instantiate_decl): Change reference to
16813         current_function_name_declared to
16814         cp_function_chain->name_declared.
16816         * semantics.c (expand_cond): Moved declaration to c-common.h.
16817         (genrtl_do_pushlevel): Moved to c-semantics.c.
16818         (genrtl_clear_out_block): Likewise.
16819         (genrtl_goto_stmt): Likewise.
16820         (genrtl_expr_stmt): Likewise.
16821         (genrtl_decl_stmt): Likewise.
16822         (gerntl_if_stmt): Likewise.
16823         (genrtl_while_stmt): Likewise.
16824         (genrtl_do_stmt): Likewise.
16825         (genrtl_return_stmt): Likewise.
16826         (genrtl_for_stmt): Likewise.
16827         (genrtl_break_stmt): Likewise.
16828         (genrtl_continue_stmt): Likewise.
16829         (genrtl_scope_stmt): Likewise.
16830         (genrtl_switch_stmt): Likewise.
16831         (genrtl_case_label): Likewise.
16832         (genrtl_begin_compound_stmt): Likewise.
16833         (genrtl_finish_compound_stmt): Likewise.
16834         (genrtl_compound_stmt): Likewise.
16835         (genrtl_asm_stmt): Likewise.
16836         (genrtl_decl_cleanup): Likewise.
16837         (expand_cond): Likewise.
16838         (expand_stmt): Renamed to ...
16839         (lang_expand_stmt): ... this.
16840         (lang_expand_expr_stmt): Initialize.
16841         (set_current_function_name_declared): Likewise.
16842         (stmts_are_full_exprs_p): Likewise.
16843         (current_function_name_declared): Likewise.
16844         (anon_aggr_type_p): Likewise.
16845         (do_poplevel): Change reference to
16846         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
16847         Change reference to stmts_are_full_exprs_p to
16848         current_stmt_tree->stmts_are_full_exprs_p.
16849         (add_tree): Likewise.
16850         (finish_expr_stmt): Likewise.
16851         (prep_stmt): Likewise.
16852         (lang_expand_stmt): Likewise.
16853         (begin_compound_stmt): Change reference to
16854         current_function_name_declared to
16855         cp_function_chain->name_declared and call to
16856         current_function_name_declared().
16857         (setup_vtbl_ptr): Likewise.
16858         (genrtl_do_poplevel): Removed.
16860 2000-06-30  Jason Merrill  <jason@redhat.com>
16862         * init.c (init_init_processing): Go back to aligning like
16863         double_type_node for old ABI.
16864         (get_cookie_size): Make cookie larger if we get a type that needs
16865         more alignment.
16866         (build_vec_delete): Call it.
16868         * typeck.c (qualify_type_recursive): New fn.
16869         (composite_pointer_type): Use it.
16870         (build_binary_op): Use composite_pointer_type.
16872 2000-06-24  Carlos O'Ryan  <coryan@cs.wustl.edu>
16873             Jason Merrill  <jason@redhat.com>
16875         * typeck.c (check_return_expr): Don't complain about returning
16876         NULL from operator new if -fcheck-new.
16877         * cp-tree.h: Declare flag_check_new here.
16878         * init.c: Not here.
16880 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
16882         * mangle.c (find_substitution): Use same_type_p.
16883         (write_encoding): Don't check for substitutions.
16885 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
16887         * parse.y (expr_no_comma_rangle): New non-terminal.
16888         (template_parm): Use it for default parameter case.
16889         (template_arg): Use it.
16890         (expr_no_commas): Remove commented out undefined extensions.
16891         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
16892         * parse.h, parse.c: Rebuilt.
16894 2000-06-30  Mark Mitchell  <mark@codesourcery.com>
16896         * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
16897         (finish_asm_stmt): Do it here, instead.
16899         * cp-tree.h (ridpointers): Don't declare.
16900         * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
16901         (record_builtin_java_type): Likewise.
16902         (init_decl_processing): Likewise.
16903         * lex.c: Move inclusion of lex.h.
16904         (ridpointers): Don't define.
16905         (init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
16906         RID_MAX.
16907         * lex.h (enum rid): Rename to ...
16908         (enum cp_rid): ... this.
16909         (ridpointers): Don't declare.
16910         * parse.y: Move inclusion of lex.h.
16911         * parse.c: Regenerated.
16912         * spew.c: Move inclusion of lex.h.
16914         * cp-tree.h (struct language_function): Remove temp_name_counter.
16915         (temp_name_counter): Remove.
16916         (get_temp_name): Change prototype.
16917         (get_guard): New function.
16918         (get_guard_cond): Likewise.
16919         (set_guard): Likewise.
16920         * cvt.c (build_up_reference): Adjust call to get_temp_name.
16921         * decl.c (expand_static_init): Use get_guard and friends to
16922         implement guard variables.
16923         * decl2.c (get_temp_name): Assume that the variables created are
16924         always static.
16925         (get_sentry): Rename to ...
16926         (get_guard): ... this.  Implement new ABI guard variables.
16927         (get_guard_bits): New function.
16928         (get_guard_cond): Likewise.
16929         (set_guard): Likewise.
16930         (start_static_initialization_or_destruction): Use them.
16931         (do_static_initialization): Replace sentry with guard throughout.
16932         (do_static_destruction): Likewise.
16933         * init.c (create_temporary_var): Add comment.
16935 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
16937         * mangle.c (find_substitution): Use same_type_p.
16938         (write_encoding): Don't check for substitutions.
16940 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
16942         * parse.y (expr_no_comma_rangle): New non-terminal.
16943         (template_parm): Use it for default parameter case.
16944         (template_arg): Use it.
16945         (expr_no_commas): Remove commented out undefined extensions.
16946         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
16947         * parse.h, parse.c: Rebuilt.
16949 2000-06-29  Mark Mitchell  <mark@codesourcery.com>
16951         * cp-tree.h (flag_const_strings): Remove.
16952         (warn_parentheses): Likewise.
16953         (warn_format): Likewise.
16954         (common_type): Likewise.
16955         (default_conversion): Likewise.
16956         (build_binary_op): Likewise.
16957         (cp_build_binary_op): New macro.
16958         * call.c (build_new_op): Use cp_build_binary_op instead of
16959         build_binary_op.
16960         * class.c (build_vtable_entry_ref): Likewise.
16961         * decl.c (expand_static_init): Likewise.
16962         (compute_array_index_type): Likewise.
16963         (build_enumerator): Likewise.
16964         * decl2.c (delete_sanity): Likewise.
16965         (start_static_initialization_or_destruction): Likewise.
16966         * error.c (dump_type_suffix): Likewise.
16967         * init.c (resolve_offset_ref): Likewise.
16968         (build_new): Likewise.
16969         (build_new_1): Likewise.
16970         (build_vec_delete_1): Likewise.
16971         (build_vec_init): Likewise.
16972         (build_delete): Likewise.
16973         * rtti.c (synthesize_tinfo_fn): Likewise.
16974         (synthesize_tinfo_var): Likewise.
16975         * search.c (expand_upcast_fixups): Likewise.
16976         (fixup_all_virtual_upcast_offsets): Likewise.
16977         * typeck.c (build_array_ref): Likewise.
16978         (get_member_function_from_ptrfunc): Likewise.
16979         (build_binary_op): Add parameter.
16980         (pointer_int_sum): Use cp_build_binary_op.
16981         (pointer_diff): Likewise.
16982         (build_modify_expr): Likewise.
16983         (get_delta_difference): Likewise.
16984         (build_ptrmemfunc): Likewise.
16986 2000-06-29  Nathan Sidwell  <nathan@codesourcery.com>
16988         * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
16989         * decl.c (create_implicit_typedef): Adjust.
16990         * decl2.c (build_artificial_parm): Adjust.
16991         * method.c (implicitly_declare_fn): Adjust.
16992         * pt.c (push_inline_template_parms_recursive): Adjust.
16993         (process_template_parm): Adjust.
16994         (overloaded_template_name): Adjust.
16995         * semantics.c (finish_template_template_parm): Adjust.
16997 2000-06-28  Mark Mitchell  <mark@codesourcery.com>
16999         * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
17000         * class.c (update_vtable_entry_for_fn): Correct logic for deciding
17001         where to emit thunks.
17002         (build_vtt): Adjust call to build_vtt_inits.
17003         (build_vtt_inits): Add parameter to indicate whether or not
17004         sub-VTTs for virtual bases should be included.  Adjust handling of
17005         construction vtables.
17006         (get_matching_base): New function.
17007         (dfs_build_vtt_inits): Rename to ...
17008         (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
17009         construction vtables.
17010         (dfs_fixup_binfo_vtbls): Likewise.
17011         (build_ctor_vtbl_groups): Build construction vtables for virtual
17012         bases, too.
17013         (accumulate_vtbl_inits): Tweak logic for deciding whether or not
17014         to build construction vtbls.
17015         (dfs_accumulate_vtbl_inits): Adjust handling of
17016         construction vtables.
17018         * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
17019         types correctly.
17021 2000-06-27  Mark Mitchell  <mark@codesourcery.com>
17023         * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
17025 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
17027         * search.c (hides): Remove.
17028         (is_subobject_of_p): Add most_derived parameter. Use
17029         CANONICAL_BINFO.
17030         (lookup_field_queue_p): Adjust.
17031         (lookup_field_r): Adjust.
17033 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
17035         * decl2.c (handle_class_head): Bash typedefs to the type's main
17036         decl.
17038 2000-06-25  Mark Mitchell  <mark@codesourcery.com>
17040         * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
17041         (begin_global_stmt_expr): ... this.
17042         (genrtl_finish_stmt_expr): Rename to ...
17043         (finish_global_stmt_expr): ... this.
17044         * init.c (begin_init_stmts): Adjust calls.
17045         (finish_init_stmts): Likewise.
17046         * semantics.c (genrtl_begin_stmt_expr): Rename to ...
17047         (begin_global_stmt_expr): ... this.
17048         (genrtl_finish_stmt_expr): Rename to ...
17049         (finish_global_stmt_expr): ... this.
17051 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
17053         * search.c (lookup_member): Fix typo in comment.
17055 2000-06-24  Jason Merrill  <jason@redhat.com>
17057         * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
17058         (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
17060 2000-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
17062         * parse.y (complex_direct_notype_declarator): Support global_scope.
17063         * Makefile.in: Adjust conflict count.
17065 2000-06-23  Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
17067         * parse.y (template_arg): Convert TEMPLATE_DECL
17068         that is a template template parameter to
17069         TEMPLATE_TEMPLATE_PARM here.
17071         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
17072         * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
17073         (copy_template_template_parm): Adjust prototype.
17074         * decl.c (grokdeclarator): Remove dead code.
17075         * pt.c (process_template_parm): Tidy.
17076         (lookup_template_class): Construct nodes in
17077         copy_template_template_parm.
17078         (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
17079         lookup_template_class.  Use TYPE_TI_TEMPLATE.
17080         * tree.c (copy_template_template_parm): Add NEWARGS
17081         parameter.
17082         (mapcar): Adjust call to copy_template_template_parm.
17083         * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
17084         * method.c (build_template_template_parm_names): Change error
17085         code to avoid compilation warning.
17087         * gxxint.texi: Document template template parameter
17088         name mangling.
17090 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
17092         * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
17093         (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
17094         (cp-demangle.o): New rule.
17095         (dyn-string.o): Likewise.
17096         * inc/cxxabi.h (__cxa_demangle): New declaration.
17098 2000-06-22  Mark Mitchell  <mark@codesourcery.com>
17100         * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
17101         (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
17102         (lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
17103         a tree, not an int.
17104         (THUNK_GENERATE_WITH_VTABLE_P): New macro.
17105         (make_thunk): Change prototype.
17106         (emit_thunk): Rename to use_thunk.
17107         (mangle_thunk): Change prototype.
17108         * class.c (get_derived_offset): Simplify.
17109         (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
17110         BV_GENERATE_THUNK_WITH_VTABLE_P.
17111         (build_primary_vtable): Simplify.
17112         (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
17113         (dfs_find_base): Remove.
17114         (update_vtable_entry_for_fn): Correct bug in finding the base
17115         where a virtual function was first declared.  Figure out whether
17116         or not to emit a vcall-thunk with the vtables in which it appears.
17117         Correct logic for deciding whether to use an ordinary thunk, or a
17118         vcall thunk.
17119         (finish_struct_1): Remove unnecssary code.
17120         (build_vtbl_initializer): Use ssize_int for the running counter of
17121         negative indices.
17122         (build_vtbl_initializer): Only use vcall thunks where necessary.
17123         Mark thunks as needing to be emitted with their vtables, or not.
17124         (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
17125         indices.  Use size_binop.
17126         (dfs_build_vcall_offset_vtbl_entries): Don't rely on
17127         BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
17128         size_binop.
17129         (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
17130         (build_vtable_entry): Mark thunks as needing to be emitted with
17131         their vtables, or not.
17132         * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
17133         * decl2.c (mark_vtable_entries): Use use_thunk instead of
17134         emit_thunk.
17135         * dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
17136         information.
17137         * error.c (dump_expr): Use BV_FN.
17138         * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
17139         not an int.
17140         * method.c (make_thunk): Likewise.
17141         (emit_thunk): Rename to use_thunk.  Allow callers to decide
17142         whether or not to actually emit the thunk.  Adjust for changes in
17143         representation of vcall offsets.
17144         * search.c (dfs_get_pure_virtuals): Use BV_FN.
17145         * semantics.c (emit_associated_thunks): New function.
17146         (expand_body): Use it.
17147         * ir.texi: Adjust decriptions of thunks.
17149 2000-06-22  Jason Merrill  <jason@redhat.com>
17151         * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
17152         (tsubst_friend_function): Copy it here.
17154         * decl.c (grok_op_properties): Fix typo.
17156         * decl2.c (delete_sanity): Clarify warning, avoid failure on
17157         deleting void*.
17159         * pt.c (check_explicit_specialization): Clarify error.
17161         * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
17162         an old OVERLOAD when we're declaring a non-function.
17163         (pushdecl, destroy_local_var): Check for error_mark_node.
17164         (warn_extern_redeclared_static): Also bail early if
17165         we're a CONST_DECL.
17166         (push_overloaded_decl): Ignore an old error_mark_node.
17168 2000-06-22  Nathan Sidwell  <nathan@codesourcery.com>
17170         * call.c (build_x_va_arg): Check if in a template decl.
17171         * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
17173 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17175         * class.c (push_lang_context): TYPE_NAME gets you to the Java
17176         types DECLs.
17177         * decl.c (check_goto): Computed gotos assumed OK.
17179 2000-06-20  Jason Merrill  <jason@redhat.com>
17181         * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
17182         for which we don't need to look for instantiations.
17184 2000-06-21  Nathan Sidwell  <nathan@codesourcery.com>
17186         * parse.y (program): Always call finish_translation_unit.
17187         * parse.c, parse.h: Rebuilt.
17189 2000-06-20  Zack Weinberg  <zack@wolery.cumb.org>
17191         * method.c: Don't include hard-reg-set.h.
17193 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
17195         * rtti.c (get_base_offset): Cope when vbase field is in a base.
17197 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
17199         * call.c (build_conditional_expr): Use VOID_TYPE_P.
17200         * cvt.c (cp_convert_to_pointer): Likewise.
17201         (convert_to_void): Likewise.
17202         * error.c (dump_expr): Likewise.
17203         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
17204         * init.c (build_delete): Likewise.
17205         * method.c (emit_thunk): Likewise.
17206         * optmize.c (declare_return_variable): Likewise.
17207         * rtti.c (get_tinfo_decl_dynamic): Likewise.
17208         (get_typeid): Likewise.
17209         (build_dynamic_cast_1): Likewise.
17210         * typeck.c (composite_pointer_type): Likewise.
17211         (common_type): Likewise.
17212         (build_indirect_ref): Likewise.
17213         (build_binary_op): Likewise.
17214         (build_x_compound_expr): Likewise.
17215         (check_return_expr): Likewise.
17216         * typeck2.c (add_exception_specifier): Likewise.
17218         * mangle.c (write_method_parms): Use direct comparison for end
17219         of parmlist.
17221 2000-06-19  Benjamin Chelf  <chelf@codesourcery.com>
17223         * cp-tree.h (genrtl_try_block): Declare function.
17224         (genrtl_handler): Likewise.
17225         (genrtl_catch_block): Likewise.
17226         (genrtl_ctor_stmt): Likewise.
17227         (genrtl_subobject): Likewise.
17228         (genrtl_decl_cleanup): Likewise.
17229         (genrtl_do_poplevel): Likewise.
17230         (genrtl_do_pushlevel): Likewise.
17231         (genrtl_clear_out_block): Likewise.
17232         (genrtl_goto_stmt): Likewise.
17233         (genrtl_expr_stmt): Likewise.
17234         (genrtl_decl_stmt): Likewise.
17235         (genrtl_if_stmt): Likewise.
17236         (genrtl_while_stmt): Likewise.
17237         (genrtl_do_stmt): Likewise.
17238         (genrtl_return_stmt): Likewise.
17239         (genrtl_for_stmt): Likewise.
17240         (genrtl_break_stmt): Likewise.
17241         (genrtl_continue_stmt): Likewise.
17242         (genrtl_scope_stmt): Likewise.
17243         (genrtl_switch_stmt): Likewise.
17244         (genrtl_case_label): Likewise.
17245         (genrtl_begin_compound_stmt): Likewise.
17246         (genrtl_finish_compound_stmt): Likewise.
17247         (genrtl_compound_stmt): Likewise.
17248         (genrtl_asm_stmt): Likewise.
17249         (genrtl_named_return_value): Likewise.
17250         (genrtl_begin_stmt_expr): Likewise.
17251         (genrtl_finish_stmt_expr): Likewise.
17252         (finish_for_stmt): Removed first argument.
17253         (finish_switch_stmt): Likewise.
17255         * semantics.c (genrtl_try_block): Define function.
17256         (genrtl_handler): Likewise.
17257         (genrtl_catch_block): Likewise.
17258         (genrtl_ctor_stmt): Likewise.
17259         (genrtl_subobject): Likewise.
17260         (genrtl_decl_cleanup): Likewise.
17261         (genrtl_do_poplevel): Likewise.
17262         (genrtl_do_pushlevel): Likewise.
17263         (genrtl_clear_out_block): Likewise.
17264         (genrtl_goto_stmt): Likewise.
17265         (genrtl_expr_stmt): Likewise.
17266         (genrtl_decl_stmt): Likewise.
17267         (genrtl_if_stmt): Likewise.
17268         (genrtl_while_stmt): Likewise.
17269         (genrtl_do_stmt): Likewise.
17270         (genrtl_return_stmt): Likewise.
17271         (genrtl_for_stmt): Likewise.
17272         (genrtl_break_stmt): Likewise.
17273         (genrtl_continue_stmt): Likewise.
17274         (genrtl_scope_stmt): Likewise.
17275         (genrtl_switch_stmt): Likewise.
17276         (genrtl_case_label): Likewise.
17277         (genrtl_begin_compound_stmt): Likewise.
17278         (genrtl_finish_compound_stmt): Likewise.
17279         (genrtl_compound_stmt): Likewise.
17280         (genrtl_asm_stmt): Likewise.
17281         (genrtl_named_return_value): Likewise.
17282         (genrtl_begin_stmt_expr): Likewise.
17283         (genrtl_finish_stmt_expr): Likewise.
17284         (finish_for_stmt): Removed first argument and generate rtl
17285         specific code.
17286         (finish_switch_stmt): Likewise.
17287         (do_poplevel): Removed generate rtl specific code.
17288         (do_pushlevel): Likewise.
17289         (add_tree): Likewise.
17290         (finish_goto_stmt): Likewise.
17291         (finish_expr_stmt): Likewise.
17292         (begin_if_stmt): Likewise.
17293         (finish_if_stmt_cond): Likewise.
17294         (finish_then_clause): Likewise.
17295         (begin_else_clause): Likewise.
17296         (finish_else_clause): Likewise.
17297         (finish_if_stmt): Likewise.
17298         (clear_out_block): Likewise.
17299         (begin_while_stmt): Likewise.
17300         (finish_while_stmt_cond): Likewise.
17301         (finish_while_stmt): Likewise.
17302         (begin_do_stmt): Likewise.
17303         (finish_do_body): Likewise.
17304         (finish_do_stmt): Likewise.
17305         (finish_return_stmt): Likewise.
17306         (begin_for_stmt): Likewise.
17307         (finish_for_init_stmt): Likewise.
17308         (finish_for_cond): Likewise.
17309         (finish_for_expr): Likewise.
17310         (finish_break_stmt): Likewise.
17311         (finish_continue_stmt): Likewise.
17312         (begin_switch_stmt): Likewise.
17313         (finish_switch_cond): Likewise.
17314         (finish_case_label): Likewise.
17315         (begin_try_block): Likewise.
17316         (begin_function_try_block): Likewise.
17317         (finish_try_block): Likewise.
17318         (finish_cleanup_try_block): Likewise.
17319         (finish_cleanup): Likewise.
17320         (finish_function_try_block): Likewise.
17321         (finish_handler_sequence): Likewise.
17322         (finish_function_handler_sequence): Likewise.
17323         (begin_handler): Likewise.
17324         (finish_handler_parms): Likewise.
17325         (begin_catch_block): Likewise.
17326         (finish_handler): Likewise.
17327         (begin_compound_stmt): Likewise.
17328         (finish_compound_stmt): Likewise.
17329         (finish_asm_stmt): Likewise.
17330         (finish_label_stmt): Likewise.
17331         (finish_label_decl): Likewise.
17332         (finish_subobject): Likewise.
17333         (finish_decl_cleanup): Likewise.
17334         (finish_named_return_value): Likewise.
17335         (begin_stmt_expr): Likewise.
17336         (finish_stmt_expr): Likewise.
17338         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
17339         to call genrtl_expr_stmt when appropriate.
17341         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
17342         begin_compound_expr to call genrtl_begin_stmt_expr and
17343         genrtl_begin_compound_expr when appropriate.
17344         (finish_init_stmts): Changed calls to finish_compound_expr and
17345         finish_stmt_expr to call genrtl_finish_compound_expr and
17346         genrtl_finish_stmt_expr when appropriate.
17347         (expand_default_init): Changed call to finish_expr_stmt to call
17348         genrtl_expr_stmt when appropriate.
17349         (build_vec_init): Likewise.
17351         * parse.y (simple_stmt): Removed first argument from call to
17352         finish_for_stmt. Removed first argument from call to
17353         finish_switch_stmt.
17355         * parse.c: Regenerated.
17357         * pt.c (tsubst_expr): Removed first argument from call to
17358         finish_for_stmt. Removed first argument from call to
17359         finish_switch_stmt.
17361 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
17363         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
17364         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
17366         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
17367         (cplus_tree_code_length[]): Likewise.
17368         (cplus_tree_code_name[]): Likewise.
17369         (init_parse): Added call to add_c_tree_codes. Changed
17370         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
17372 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
17374         * cp-tree.h (finish_mem_initializers): Declare.
17375         (count_trees): Likewise.
17376         * parse.y (base_init): Use finish_mem_initializers.
17377         * semantics.c (finish_mem_initializers): New function.
17379         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
17380         the number of trees.
17381         (n_trees): Remove.
17382         (count_trees): Don't use it.
17384 2000-06-15  Jason Merrill  <jason@redhat.com>
17386         * tree.c (count_trees): New debugging function.
17388         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
17389         * init.c (build_member_call): Pull out the name of a DECL.
17391         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
17392         * semantics.c (expand_body): Push to TV_INTEGRATION here.
17393         * optimize.c (optimize_function): Not here.
17394         * pt.c (instantiate_decl): Push to TV_PARSE.
17396 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
17398         * cp-tree.h (struct language_function): Remove x_base_init_list
17399         and x_member_init_list.
17400         (current_base_init_list): Remove.
17401         (current_member_init_list): Likewise.
17402         (setup_vtbl_ptr): Change prototype.
17403         (emit_base_init): Likewise.
17404         (expand_member_init): Likewise.
17405         (reinit_parse_for_function): Remove.
17406         * decl.c (save_function_data): Don't clear x_base_init_list and
17407         x_member_init_list.
17408         (mark_language_function): Don't mark them.
17409         * init.c (perform_member_init): Tweak comment.
17410         (sort_member_init): Take the list of initializers as an argument.
17411         (sort_base_init): Likewise.
17412         (emit_base_init): Likewise.
17413         (expand_member_init): Return the initializer.  Don't use global
17414         variables.
17415         * lex.c (reinit_parse_for_function): Remove.
17416         * method.c (build_template_parm_names): Correct substitution.
17417         (do_build_copy_constructor): Don't use current_member_init_list
17418         and current_base_init_list.
17419         (synthesize_method): Likewise.
17420         * parse.y (base_init): Split mem-initializers into
17421         base-initializers and field-initializers.
17422         (member_init_list): Build up the list here.
17423         (member_init): Return the initializer.
17424         (fn.depfn): Don't use reinit_parse_for_function.
17425         * parse.c: Regenerated.
17426         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
17427         ERROR_MARK.
17428         (tsubst_expr): Don't use current_member_init_list
17429         and current_base_init_list.
17430         (tsubst_expr_values): Rename to ...
17431         (tsubst_initializer_list): ... this.  Use convert_from_reference.
17432         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
17433         and current_base_init_list.
17434         (begin_function_definition): Don't call reinit_parse_for_function.
17436         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
17438         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
17439         correctly.
17441         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
17443 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
17445         * cp-tree.h (IF_COND): Move to c-common.h.
17446         (THEN_CLAUSE): Likewise.
17447         (ELSE_CLAUSE): Likewise.
17448         (WHILE_COND): Likewise.
17449         (WHILE_BODY): Likewise.
17450         (DO_COND): Likewise.
17451         (DO_BODY): Likewise.
17452         (RETURN_EXPR): Likewise.
17453         (EXPR_STMT_EXPR): Likewise.
17454         (FOR_INIT_STMT): Likewise.
17455         (FOR_COND): Likewise.
17456         (FOR_EXPR): Likewise.
17457         (FOR_BODY): Likewise.
17458         (SWITCH_COND): Likewise.
17459         (SWITCH_BODY): Likewise.
17460         (CASE_LOW): Likewise.
17461         (CASE_HIGH): Likewise.
17462         (GOTO_DESTINATION): Likewise.
17463         (COMPOUND_BODY): Likewise.
17464         (ASM_CV_QUAL): Likewise.
17465         (ASM_STRING): Likewise.
17466         (ASM_OUTPUTS): Likewise.
17467         (ASM_INPUTS): Likewise.
17468         (ASM_CLOBBERS): Likewise.
17469         (DECL_STMT_DECL): Likewise.
17470         (STMT_EXPR_STMT): Likewise.
17471         (LABEL_STMT_LABEL): Likewise.
17472         (SCOPE_BEGIN_P): Likewise.
17473         (SCOPE_END_P): Likewise.
17474         (SCOPE_STMT_BLOCK): Likewise.
17475         (SCOPE_NULLIFIED_P): Likewise.
17476         (SCOPE_NO_CLEANUPS_P): Likewise.
17477         (SCOPE_PARTIAL_P): Likewise.
17478         (ASM_VOLATILE_P): Likewise.
17479         (STMT_LINENO): Likewise.
17480         (STMT_LINENO_FOR_FN_P): Likewise.
17482         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
17483         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
17484         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
17485         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
17486         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
17488         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
17490         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
17491         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
17493         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
17494         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
17495         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
17497 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
17499         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
17500         * class.c (dfs_find_final_overrider): Set it appropriately.
17501         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
17502         avoid unneeded secondary vptrs.
17504 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
17506         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
17507         (check_bitfield_decl, check_field_decl): Likewise.
17508         (build_vtbl_or_vbase_field, build_base_field): Likewise.
17509         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
17510         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
17511         (xfer_tag, finish_enum): Likewise.
17512         * decl2.c (finish_builtin_type): Likewise.
17513         * init.c (init_init_processing): Likewise.
17514         * pt.c (instantiate_class_template): Likewise.
17515         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
17516         * cp-tree.h (struct lang_type): Add user_align member.
17517         (CLASSTYPE_USER_ALIGN): Define.
17519 2000-06-13  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
17521         * Make-lang.in (c++.install-common): Install g++-cross in
17522         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
17523         $(target_alias)-g++ and $(target_alias)-c++.
17525 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
17527         * class.c (vcall_offset_data_s): Add last_init and fns.
17528         (overrides): Rename to same_signature_p.
17529         (dfs_find_final_overrider): Adjust accordingly.
17530         (mark_overriders): Likewise.
17531         (warn_hidden): Likewise.
17532         (build_vtbl_initializer): Reorganize machinery for building things
17533         at negative offsets.
17534         (build_vcall_and_vbase_vtbl_entries): Likewise.
17535         (build_vbase_offset_vtbl_entries): Likewise.
17536         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
17537         offset entries.  Do not create two entries for functions with the
17538         same signature.
17539         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
17540         (build_rtti_vtbl_entries): Reorganize machinery for building things
17541         at negative offsets.
17543         * optimize.c (expand_call_inline): Don't recurse into the code
17544         used to initialize the parameters more than once.
17546 2000-06-11  Mark Mitchell <mark@codesourcery.com>
17548         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
17549         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
17550         (find_substitution): Only use the `Sa' substitution for
17551         std::allocator, not instantiations of it.
17552         (write_template_prefix): Move comment.  Only use a TREE_LIST to
17553         represent substitutions for a member template.
17554         (write_array_type): Mangle array dimensions correctly.
17555         * optimize.c (maybe_clone_body): Copy more information from the
17556         cloned function.
17557         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
17558         on the regenerated declaration.
17560 2000-06-11  Chip Salzenberg  <chip@valinux.com>
17561             Mark Mitchell <mark@codesourcery.com>
17563         * class.c (build_vtable): Clarify comment.
17564         (build_ctor_vtbl_group): Pass the most derived type to
17565         build_vtable.
17567 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17569         * decl2.c (compare_options): Don't needlessly cast away const-ness.
17571 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
17573         * decl.c (add_binding): Handle duplicate declarations of external
17574         variables.
17576 2000-06-09  Chip Salzenberg  <chip@valinux.com>
17577             Mark Mitchell <mark@codesourcery.com>
17579         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
17580         argument.
17581         (write_signed_number): New macro.
17582         (write_unsigned_number): Likewise.
17583         (write_source_name): Use them.
17584         (write_number): Handle signed and unsigned values.
17585         (write_integer_cst): Use tree_int_cst_sgn, and use
17586         write_unsigned_number or write_signed_number as appropriate.
17587         (write_discriminator): Use write_unsigned_number or
17588         write_signed_number as appropriate.
17589         (write_template_arg_literal): Likewise.
17590         (write_array_type): Use tree_low_cst.
17591         (write_template_parm):  Use write_unsigned_number or
17592         write_signed_number as appropriate.
17593         (write_substitution): Adjust call to write_number.
17594         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
17595         (write_expression): Handle non-type template arguments of
17596         reference type correctly.
17597         (mangle_thunk): Use write_signed_number.
17599 2000-06-09  Chip Salzenberg  <chip@valinux.com>
17601         * mangle.c (find_substition): Don't mangle objects with typename
17602         substitutions (e.g. "cin" as "Si").
17604 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
17606         * call.c (add_candidate): Use ggc_alloc_cleared.
17607         * decl.c (lookup_label): Likewise.
17608         * lex.c (retrofit_lang_decl): Likewise.
17610 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
17612         * semantics.c (expand_body): Push to TV_EXPAND.
17613         * optimize.c (optimize_function): Push to TV_INTEGRATION.
17614         * decl.c (start_function): Always call announce_function.
17616         * tinfo2.cc: Just declare abort.
17618 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
17620         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
17621         whenever @ is a symbolic name.
17623 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
17625         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
17627 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
17629         * decl.c (pushdecl): Look up functions by DECL_NAME, not
17630         DECL_ASSEMBLER_NAME.
17632 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
17634         * decl2.c (c_language): Define.
17636 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
17638         * lex.c (lang_init_options): Tweak.
17640         * decl2.c: Remove #inclusion of diagnostic.h
17641         (lang_decode_option): Move diagnostic formatting options to
17642         toplevel.
17644         * lang-options.h: Remove documentation for diagnostic options.
17646         * Makefile.in (lex.o): Depends upon diagnostic.h
17648 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
17650         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
17651         the same DECL_RESULT, it's not a redefinition.
17652         * pt.c (tsubst_decl): Remove code to handle illegal
17653         specializations.
17655 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
17657         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
17659 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
17661         * search.c (maybe_suppress_debug_info): Don't check
17662         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
17664         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
17665         here if extern_p.
17667         Remember instantiation context in deferred instantiations.
17668         * cp-tree.h (struct tinst_level): Remove.
17669         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
17670         * pt.c (current_tinst_level): Now a tree.
17671         (print_template_context, push_tinst_level, pop_tinst_level,
17672         tinst_for_decl): Adjust.
17673         (reopen_tinst_level): New fn.
17674         (init_pt): Register current_tinst_level as a root.
17675         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
17676         of the pending templates list.
17677         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
17678         * lex.c (extract_interface_info): Adjust.
17679         * decl2.c (warn_if_unknown_interface): Adjust.
17681 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
17683         * class.c (indirect_primary_base_p): New function.
17684         (determine_primary_base): Use it.
17686 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
17688         Update new-abi dynamic cast algorithm.
17689         * tinfo.cc (__class_type_info::__dyncast_result): Add
17690         whole_details. Adjust constructor.
17691         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
17692         Avoid unnecessary searching.
17693         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
17695 2000-06-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
17697         * decl.c (init_decl_processing): Don't call record_component_aliases.
17698         * tree.c (build_cplus_array_type_1): Likewise.
17700 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
17702         * ir.texi: Correct typo.
17703         * mangle.c (write_expression): Handle non-type template arguments
17704         with reference type.
17705         * method.c (build_overload_value): Likewise.
17706         * pt.c (convert_nontype_argument): Explicitly represent conversion
17707         to a reference with an ADDR_EXPR.
17708         (unify): Always unify arguments in left-to-right order.
17710 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
17711             Mark Mitchell  <mark@codesourcery.com>
17713         * Make-lang.in (CXX_SRCS): Add mangle.c.
17714         * Makefile.in (CXX_OBJS): Add mangle.o.
17715         (mangle.o): New rule.
17717         * class.c (local_classes): New variable.
17718         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
17719         (get_vtt_name): Use mangle_vtt_name for new ABI.
17720         (init_class_processing): Initialize local_classes.
17721         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
17722         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
17723         (std_identifier): New macro.
17724         (DECL_VOLATILE_MEMFUNC_P): New macro.
17725         (DECL_NAMESPACE_STD_P): Likewise.
17726         (local_classes): Declare.
17727         (get_mostly_instantiated_function_type): Declare.
17728         (init_mangle): Declare.
17729         (mangle_decl): Likewise.
17730         (mangle_type_string): Likewise.
17731         (mangle_type): Likewise.
17732         (mangle_typeinfo_for_type): Likewise.
17733         (mangle_typeinfo_string_for_type): Likewise.
17734         (mangle_vtbl_for_type): Likewise.
17735         (mangle_vtt_for_type): Likewise.
17736         (mangle_ctor_vtbl_for_type): Likewise.
17737         (mangle_thunk): Likewise.
17738         (mangle_conv_op_name_for_type): Likewise.
17739         (mangle_guard_variable): Likewise.
17740         * decl.c (pushtag): Keep track of local classes.
17741         (initialize_predefined_identifiers): Initialize std_identifier.
17742         (init_decl_processing): Use std_identifier.
17743         (start_decl): Don't treat instantiations as specializations.
17744         (grokdeclarator): Likewise.
17745         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
17746         name for fully-instantiated templates.
17747         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
17748         destructors with the new ABI.
17749         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
17750         (grokfield): Use mangle_type for new ABI.
17751         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
17752         (get_sentry): Use mangle_guard_variable for new ABI.
17753         (start_static_initialization_or_destruction): Likewise.
17754         * expr.c (extract_aggr_init): Remove.
17755         (extract_scalar_init): Likewise.
17756         (extract_init): Remove #if 0'd code.
17757         * mangle.c: New function.
17758         * method.c (build_mangled_name): Assert not flag_new_abi.
17759         (build_static_name): Likewise.
17760         (build_decl_overload_real): Likewise.
17761         (build_typename_overload): Likewise.
17762         (build_overload_with_type): Likewise.
17763         (build_overload_name): Likewise.
17764         (get_ctor_vtbl_name): Likewise.
17765         (start_squangling): Likewise.
17766         (get_id_2): Likewise.
17767         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
17768         (init_method): Call init_mangle for new ABI.
17769         (make_thunk): Call mangle_thunk for new ABI.
17770         * operators.def: Correct new ABI manglings for the `%' operator.
17771         Add `::' operator.
17772         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
17773         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
17774         (lookup_template_class): Call mangle_decl for new ABI.
17775         (get_mostly_instantiated_function_type): New function.
17776         (set_mangled_name_for_template_decl): Use it.
17777         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
17778         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
17779         conversion op names.
17780         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
17781         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
17782         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
17783         mangle_typeinfo_string_for_type.
17785 2000-06-03  Mark Mitchell  <mark@codesourcery.com>
17787         * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
17788         (INNERMOST_TEMPLATE_ARGS): New macro.
17789         (innermost_args): Remove.
17790         (get_innermost_template_args): New function.
17791         * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
17792         * error.c (dump_function_decl): Be caution when using
17793         most_general_template.
17794         * method.c (build_template_parm_names):  Use
17795         INNERMOST_TEMPLATE_ARGS.
17796         * pt.c (add_to_template_args): Tidy comment
17797         (get_innermost_template_args): New function.
17798         (check_explicit_specialization): Clear DECL_INITIAL for a new
17799         specialization.
17800         (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
17801         Tidy.
17802         (push_template_decl): Always register specializations of the most
17803         general template.
17804         (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
17805         (coerce_template_parms): Likewise.
17806         (lookup_template_class): Likewise.
17807         (innermost_args): Remove.
17808         (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
17809         (tsubst_decl): Handle tricky specializations.  Use
17810         get_innermost_template_args.
17811         (instantiate_template): Simplify handling of partial
17812         instantiations.
17813         (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
17814         (most_general_template): Reimplement, in a more straightforward
17815         manner.
17816         (regenerate_decl_from_template): Tweak formatting.  Use
17817         TMPL_ARGS_DEPTH for clarity.
17818         (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
17820         * dump.c (dequeue_and_dump): Dump information about thunks.
17822 2000-06-01  Richard Henderson  <rth@cygnus.com>
17824         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
17826 2000-06-01  Richard Henderson  <rth@cygnus.com>
17828         * decl2.c (unsupported_options): Fix typo, make const.
17829         (lang_decode_option): Fix bsearch argument order.
17831 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
17833         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
17834         on FIELD_DECLs.
17836 2000-05-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
17838         * cp-tree.h (c_get_alias_set): Deleted.
17839         * Makefile.in (decl.o): Include ../expr.h.
17840         * decl.c (expr.h): Include.
17841         (init_decl_processing): Call record_component_aliases for arrays.
17842         (grokdeclarator): Likewise.
17843         Set TREE_ADDRESSABLE for fields that aren't bitfields.
17844         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
17846 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
17848         Remove guiding declaration support.
17849         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
17850         (flag_guiding_decls): Remove.
17851         * call.c (build_user_type_conversion_1): Remove support for
17852         guiding decls.
17853         (build_new_function_call): Likewise.
17854         (build_new_op): Likewise.
17855         (build_new_method_call): Likewise.
17856         * decl.c (start_function): Likewise.
17857         * friend.c (is_friend): Likewise.
17858         (do_friend): Likewise.
17859         * decl2.c ((flag_dump_translation_unit): Make it const.
17860         (flag_guiding_decls): Remove.
17861         (unsupported_options): New variable
17862         (compare_options): New function.
17863         (lang_decode_option): Use them.
17865         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
17867         * method.c (mangle_expression): Adjust test for legal expression
17868         operators.
17870         * pt.c (instantiate_decl): Save and restore the local
17871         specializations list.
17873 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
17875         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
17877 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
17879         * call.c (add_template_candidate_real): Handle member template
17880         constructors for classes with virtual bases.
17881         (build_user_type_conversion_1): Use in_charge_arg_for_name.
17882         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
17884         * ir.texi: Update thunk documentation.
17886         * call.c (joust): Fix handling of overloaded builtin operators.
17888 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
17890         * cp-tree.h (DECL_ANTICIPATED): New macro.
17891         Document new use of DECL_LANG_FLAG_7.
17892         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
17893         in the user namespace.
17894         * lex.c (do_identifier): If the identifier's declaration has
17895         DECL_ANTICIPATED on, it has not yet been declared.  But do not
17896         replace it with an ordinary implicit declaration.
17898         * tinfo2.cc: Include stdlib.h.
17900 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
17902         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
17903         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
17904         CLASSTYPE_ALIGN.
17906 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
17908         * decl2.c (lang_decode_option): Use skip_leading_substring instead
17909         of plain strncmp.
17911 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
17913         * operators.def (<?): Duplicated, should have been...
17914         (>?): this.  Fixed.
17916 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
17917             Mark Mitchell  <mark@codesourcery.com>
17919         * cp-tree.h (ansi_opname): Make it a macro.
17920         (ansi_assopname): Likewise.
17921         (struct lang_decl_flags): Add assignment_operator_p.
17922         (struct lang_decl): Add operator_code.
17923         (DECL_VTT_PARM): Adjust.
17924         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
17925         overloaded operator.
17926         (SET_OVERLOADED_OPERATOR_CODE): New macro.
17927         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
17928         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
17929         (opname_tab): Remove.
17930         (assignop_tab): Likewise.
17931         (operator_name_info_t): New type.
17932         (operator_name_info): New variable.
17933         (assignment_operator_name_info): Likewise.
17934         (build_cp_library_fn): Remove declaration.
17935         (push_cp_library_fn): Likewise.
17936         (operator_name_string): Likewise.
17937         (build_decl_overload): Likewise.
17938         * call.c (print_z_candidates): Simplify.
17939         (build_object_call): Adjust usage of ansi_opname.  Use
17940         DECL_OVERLOADED_OPERATOR_P.
17941         (op_error): Adjust operator name lookup.
17942         (build_conditional_expr): Adjust usage of ansi_opname.
17943         (build_new_op): Likewise.
17944         (build_op_delete_call): Likewise.
17945         (build_over_call): Likewise.
17946         (joust): Use DECL_OVERLOADED_OPERATOR_P.
17947         * decl.c (duplicate_decls): Copy operator_code.
17948         (init_decl_processing): Adjust parameters to push_cp_library_fn.
17949         (builtin_function): Adjust parameters to build_library_fn_1.
17950         (build_library_fn_1): Accept an overloaded operator code.
17951         (build_library_fn): Pass ERROR_MARK.
17952         (build_cp_library_fn): Accept an overloaded operator code.
17953         (push_cp_library_fn): Likewise.
17954         (grokfndecl): Tweak.
17955         (grokdeclarator): Simplify code to compute names of overloaded
17956         operators.  Adjust use of ansi_opname.
17957         (ambi_op_p): Work on tree_codes, not identifiers.
17958         (unary_op_p): Likewise.
17959         (grok_op_properties): Likewise.
17960         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
17961         (lang_mark_tree): Don't try to mark the operator_code.
17962         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
17963         * error.c (dump_decl): Remove special handling for operator
17964         names.
17965         (dump_function_name): Likewise.
17966         (dump_expr): Adjust name lookup of operators.
17967         (op_to_string): Simplify.
17968         (assop_to_string): Likewise.
17969         * init.c (build_new_1): Adjust use of ansi_opname.
17970         * lex.c (opname_tab): Remove.
17971         (assignop_tab): Likewise.
17972         (ansi_opname): Likewise.
17973         (ansi_assopname): Likewise.
17974         (operator_name_string): Likewise.
17975         (reinit_lang_specific): Likewise.
17976         (operator_name_info): New variable.
17977         (assignment_operator_name_info): Likewise.
17978         (init_operators): New function.
17979         (init_parse): Use it.
17980         (do_identifier): Adjust use of ansi_opname.
17981         * method.c (mangle_expression): Don't use ansi_opname for
17982         mangling.
17983         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
17984         (build_decl_overload): Remove.
17985         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
17986         (do_build_assign_ref): Adjust use of ansi_opname.
17987         (synthesize_method): Likewise.
17988         (implicitly_declare_fn): Likewise.
17989         * operators.def: New file.
17990         * parse.y (operator): Adjust use of ansi_opname.
17991         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
17992         (set_mangled_name_for_template_decl): Don't play games with
17993         current_namespace.
17994         (special_function_p): Adjust use of ansi_opname.
17995         * typeck.c (check_return_expr): Likewise.
17996         * Make-lang.in (cc1plus): Depend on operators.def.
17997         * Makefile.in (lex.o): Likewise.
17998         (decl.o): Likewise.
18000 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
18002         * Make-lang.in (cplib2.ready): Eradicate.
18004 2000-05-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
18006         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
18007         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
18008         (built_min, cp_tree_equal): Likewise.
18010 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
18012         * class.c (layout_nonempty_base_or_field): Replace
18013         `record_layout_info' with `record_layout_info_s'.
18015 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
18017         Fix goto checking.
18018         * cp-tree.h (struct language_function): x_named_labels is now
18019         a struct named_label_list*.
18020         * decl.c (struct named_label_use_list): Renamed from...
18021         (struct named_label_list): ...this.  New struct.
18022         (push_binding_level): Don't set eh_region.
18023         (note_level_for_eh): New fn.
18024         (pop_label): Take label and old value directly.
18025         (pop_labels): Adjust for new named_labels format.
18026         (lookup_label): Likewise.
18027         (poplevel): Note characteristics of a binding level containing a
18028         named label.  Mess with named label lists earlier.
18029         (mark_named_label_lists): New fn.
18030         (mark_lang_function): Call it.
18031         (use_label): New fn, split out from...
18032         (make_label_decl): ...here.  Don't call it.
18033         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
18034         check_previous_gotos): New fns, split out from...
18035         (define_label): ...here.
18036         (check_switch_goto): New fn.
18037         (define_case_label): Call it.
18038         (check_goto): New fn.
18039         * semantics.c (finish_goto_stmt): Call it and use_label.
18040         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
18041         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
18043 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
18045         * class.c (build_vtable_entry_ref): Correct usage of
18046         get_vtbl_decl_for_binfo.
18048         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
18049         * method.c (implicitly_declare_fn): Not here.
18051 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
18053         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
18054         (CPTI_PTMD_DESC_TYPE): ... here.
18055         (ptmd_desc_type_node): Rename to ...
18056         (ptm_desc_type_node): ... here.
18057         * decl.c: Likewise.
18058         * rtti.c (ptmd_initializer): Rename to ...
18059         (ptm_initializer): ... here.
18060         (sythesize_tinfo_var): Adjust. Deal with pointer to member
18061         function.
18062         (create_tinfo_types): Adjust.
18064 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
18066         Finish implementation of VTTs.
18067         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
18068         CPTI_VTT_PARM_IDENTIFIER.
18069         (vtt_parm_identifier): New macro.
18070         (vtt_parm_type): Likewise.
18071         (BINFO_SUBVTT_INDEX): Likewise.
18072         (BINFO_VPTR_INDEX): Likewise.
18073         (struct lang_decl): Add vtt_parm.
18074         (DECL_VTT_PARM): New macro.
18075         (DECL_USE_VTT_PARM): Likewise.
18076         (DECL_NEEDS_VTT_PARM_P): Likewise.
18077         (get_vtt_name): Declare.
18078         (build_artificial_parm): Likewise.
18079         (fixup_all_virtual_upcast_offsets): Likewise.
18080         (expand_indirect_vtbls_init): Remove.
18081         * call.c (build_new_method_call): Pass the vtt to subobject
18082         constructors and destructors.
18083         * class.c (get_vtt_name): Give it external linkage.
18084         (build_clone): Handle the magic VTT parameters for clones.
18085         (clone_function_decl): Fix typo in comment.
18086         (build_vtt): Keep track of the indices in the VTTs where various
18087         entities are stored.
18088         (build_vtt_inits): Likewise.
18089         (dfs_build_vtt_inits): Likewise.
18090         (build_ctor_vtbl_group): Tweak type of construction vtables.
18091         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
18092         primary bases, when building construction vtables.
18093         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
18094         (initialize_predefined_identifiers): Add vtt_parm_identifier.
18095         (init_decl_processing): Initialize vtt_parm_type.
18096         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
18097         (lang_mark_tree): Make vtt_parm.
18098         * decl2.c (build_artificial_parm): New function.
18099         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
18100         (grokclassfn): Use build_artificial_parm.
18101         * init.c (initialize_vtbl_ptrs): Call
18102         fixup_all_virtual_upcast_offsets directly.
18103         (perform_member_init): Use the complete subobject destructor for
18104         member cleanups.
18105         (build_vtbl_address): New function.
18106         (expand_virtual_init): Handle VTTs.
18107         * optimize (maybe_clone_body): Likewise.
18108         * search.c (fixup_all_virtual_upcast_offsets): Give it external
18109         linkage.
18110         (expand_indirect_vtbls_init): Remove.
18111         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
18112         * tree.c (make_binfo): Make them bigger.
18114 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
18116         * inc/cxxabi.h (__pbase_type_info): Define, based on
18117         __pointer_type_info.
18118         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
18119         (__pointer_to_member_type_info): Likewise.
18120         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
18121         (__pointer_to_member_type_info::__is_pointer_p): Remove.
18122         (__pointer_type_info::__do_catch): Rename to ...
18123         (__pbase_type_info::__do_catch): ... here. Adjust.
18124         (__pbase_type_info::__pointer_catch): Implement.
18125         (__pointer_type_info::__pointer_catch): Adjust.
18126         (__pointer_to_member_type_info::__pointer_catch): Adjust.
18128 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
18130         * tinfo.h (__user_type_info::contained_virtual_p): New
18131         predicate.
18132         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
18133         shaped hierarchy.
18134         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
18135         diamond shaped hierarchy. Add early out for mixed diamond and
18136         duplicate shaped hierarchy.
18138 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
18140         * cp-tree.h (build_delete): Change prototype.
18141         (build_vec_delete): Likewise.
18142         * call.c (build_scoped_method_call): Use special_function_kind
18143         values to indicate the kind of destruction to be done.
18144         (build_method_call): Likewise.
18145         * decl.c (finish_destructor_body): Likewise.
18146         (maybe_build_cleanup_1): Likewise.  Rename to ...
18147         (maybe_build_cleanup): ... this.
18148         * decl2.c (delete_sanity): Use special_function_kind
18149         values to indicate the kind of destruction to be done.
18150         (build_cleanup): Likewise.
18151         * init.c (perform_member_init): Likewise.
18152         (build_vec_delete_1): Likewise.
18153         (build_dtor_call): Simplify.
18154         (build_delete): Use special_function_kind
18155         values to indicate the kind of destruction to be done.
18156         (build_vbase_delete): Likewise.
18157         (build_vec_delete): Likewise.
18159         * init.c (sort_member_init): Fix typo in error message generation
18160         code.
18162 2000-05-15  Donald Lindsay  <dlindsay@cygnus.com>
18164         * semantics.c (begin_class_definition): make the packed
18165         attribute be sensitive to the "-fpack-struct" command line flag
18167 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
18169         Update new-abi upcast algorithm.
18170         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
18171         prototype and meaning of return value.
18172         (__si_class_type_info::__do_upcast): Likewise.
18173         (__vmi_class_type_info::__do_upcast): Likewise.
18174         * tinfo.cc (__class_type_info::__upcast_result): Replace
18175         whole2dst with part2dst. Adjust ctor.
18176         (__class_type_info::__do_upcast): Adjust call of worker function.
18177         (__class_type_info::__do_upcast): Adjust.
18178         (__si_class_type_info::__do_upcast): Adjust. Use parent's
18179         __do_upcast.
18180         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
18181         virtual base in diamond hierarchy bug.
18183 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
18185         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
18186         and bitfield to tinfo_fn_p.
18187         (DECL_TINFO_FN_P): Adjust.
18188         (SET_DECL_TINFO_FN_P): Likewise.
18189         (DECL_MUTABLE_P): Likewise.
18190         (DECL_C_BIT_FIELD): Likewise.
18191         (SET_DECL_C_BIT_FIELD): Likewise.
18192         (CLEAR_DECL_C_BIT_FIELD): Likewise.
18193         (DECL_UNINLINABLE): Likewise.
18194         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
18195         (handle_using_decl): Remove assertion.
18196         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
18197         to build FIELD_DECLs.
18198         (build_base_field): Likewise.
18199         (layout_class_type): Likewise.
18200         * decl.c (init_decl_processing): Likewise.
18201         (build_ptrmemfunc_type): Likewise.
18202         (grokdeclarator): Likewise.
18203         * decl2.c (grok_x_components): Likewise.
18204         * except.c (call_eh_info): Likewise.
18205         * init.c (init_init_processing): Likewise.
18206         * rtti.c (expand_class_desc): Likewise.
18207         (create_pseudo_type_info): Likewise.
18208         (get_vmi_pseudo_type_info): Likewise.
18209         (create_tinfo_types): Likewise.
18210         * ptree.c (print_lang_decl): Adjust.
18211         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
18212         before checking DECL_MUTABLE_P.
18214         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
18215         parameters for template functions.
18216         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
18217         destructors as well as constructors.
18219 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
18221         * class.c (build_ctor_vtbl_group): Set inits.
18222         * optimize.c (maybe_clone_body): Set DECL_INLINE and
18223         DECL_THIS_INLINE appropriately for clones.
18225         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
18226         (DECL_CONV_FN_P): Simplify.
18227         (DECL_OPERATOR): Remove.
18228         (language_to_string): Declare.
18229         * decl.c (duplicate_decls): Fix typo in comment.
18230         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
18231         (grok_op_properties): Use DECL_CONV_FN_P instead of
18232         IDENTIFIER_TYPENAME_P.
18233         * dump.c (dequeue_and_dump): Dump the language linkage of
18234         declarations.
18235         * error.c (language_to_string): Give it external linkage.
18236         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
18237         (implicitly_declare_fn): Set DECL_LANGUAGE.
18238         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
18239         IDENTIFIER_TYPENAME_P.
18240         (tsubst_decl): Likewise.
18241         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
18242         * semantics.c (finish_member_declaration): Don't mark members of
18243         classes declared in an extern "C" region as extern "C".
18245 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
18247         * decl2.c (qualified_lookup_using_namespace): Look through
18248         namespace aliases.
18250         * decl.c (push_using_decl): Return the old decl on namespace level.
18252 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
18254         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
18255         (VTT_NAME_PREFIX): New macro.
18256         (CTOR_VTBL_NAME_PREFIX): Likewise.
18257         (get_ctor_vtbl_name): New function.
18258         * class.c (get_vtable_name): Simplify.
18259         (get_vtt_name): New function.
18260         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
18261         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
18262         when a virtual base becomes primary.
18263         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
18264         VTTs.
18265         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
18266         additional parameters.
18267         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
18268         (initialize_array): New function.
18269         (build_vtt): Likewise.
18270         (build_vtt_inits): Likewise.
18271         (dfs_build_vtt_inits): Likewise.
18272         (dfs_fixup_binfo_vtbls): Likewise.
18273         (build_ctor_vtbl_group): Likewise.
18274         (initialize_vtable): Use initialize_array.
18275         (accumulate_vtbl_inits): Reimplement to handle construction
18276         vtables.
18277         (dfs_accumulate_vtbl_inits): Likewise.
18278         (bulid_vtbl_initializer): Adjust parameter name.
18279         * method.c (build_typename_overload): Remove #if 0'd code.
18280         (get_ctor_vtbl_name): New function.
18281         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
18282         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
18284         * cp-tree.h (struct lang_type): Remove search_slot.
18285         (CLASSTYPE_SEARCH_SLOT): Remove.
18286         (emit_base_init): Change prototype.
18287         (initialize_vtbl_ptrs): Likewise.
18288         (expand_indirect_vtbls_init): Likewise.
18289         (clear_search_slots): Remove.
18290         * decl.c (lang_mark_tree): Don't mark search_slot.
18291         * init.c (initialize_vtbl_ptrs): Simplify.
18292         (emit_base_init): Likewise.
18293         * search.c (struct vbase_info): Document decl_ptr.
18294         (convert_pointer_to_single_level): Remove.
18295         (dfs_find_vbases): Remove.
18296         (dfs_init_base_pointers): Simplify.
18297         (dfs_clear_vbase_slots): Remove.
18298         (dfs_vtable_path_unmark): New function.
18299         (init_vbase_pointers): Simplify.
18300         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
18301         (expand_indirect_vtbls_init): Simplify.  Don't call
18302         mark_all_temps_used.
18303         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
18304         initialize_vtbl_ptrs.
18306 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
18308         * except.c: Add static prototypes.
18310 2000-05-20  H.J. Lu  <hjl@gnu.org>
18312         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
18314 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
18316         Don't create a separate copy of virtual bases for the
18317         CLASSTYPE_VBASECLASSES list.
18318         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
18319         (BINFO_FOR_VBASE): Remove.
18320         (CANONICAL_BINFO): Adjust.
18321         (binfo_for_vbase): New function.
18322         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
18323         instead of BINFO_FOR_VBASE.
18324         (build_vbase_pointer): Likewise.
18325         (build_secondary_vtable): Likewise.
18326         (dfs_mark_primary_bases): Likewise.
18327         (mark_primary_bases): Likewise.
18328         (layout_nonempty_base_or_field): Likewise.
18329         (dfs_set_offset_for_shared_vbases): Likewise.
18330         (dfs_set_offset_for_unshared_vbases): Likewise.
18331         (layout_virtual_bases): Likewise.  Adjust for changes to the
18332         CLASSTYPE_VBASECLASSES list.
18333         (dump_class_hierarchy_r): Use binfo_for_vbase
18334         instead of BINFO_FOR_VBASE.
18335         (dump_class_hierarchy): Likewise.
18336         (finish_vtbls): Likewise.
18337         (build_vtbl_initializer): Adjust for changes to the
18338         CLASSTYPE_VBASECLASSES list.
18339         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
18340         * decl.c (finish_destructor_body): Adjust for changes to the
18341         CLASSTYPE_VBASECLASSES list.
18342         * init.c (sort_base_init): Use binfo_for_vbase.
18343         (construct_virtual_bases): Adjust for changes to the
18344         CLASSTYPE_VBASECLASSES list.
18345         (expand_member_init): Use binfo_for_vbase.
18346         (build_vbase_delete):  Adjust for changes to the
18347         CLASSTYPE_VBASECLASSES list.
18348         * method.c (do_build_copy_constructor): Likewise.
18349         * rtti.c (get_base_offset): Use binfo_for_vbase.
18350         (expand_class_desc): Remove #if 0'd code.
18351         * search.c (struct vbase_info): Remove vbase_types.
18352         (get_base_distance):  Use binfo_for_vbase.
18353         (lookup_field_queue_p): Use CANONICAL_BINFO.
18354         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
18355         (get_pure_virtuals): Adjust for changes to the
18356         CLASSTYPE_VBASECLASSES list.
18357         (dfs_find_vbases): Use binfo_for_vbase.
18358         (dfs_init_vbase_pointers): Likewise.
18359         (init_vbase_pointers): Don't initialize vi.vbase_types.
18360         (virtual_context): Use binfo_for_vbase.
18361         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
18362         CLASSTYPE_VBASECLASSES list.
18363         (expand_indirect_vtbls_init): Simplify.
18364         (dfs_get_vbase_types): Don't replicate virtual bases.
18365         (find_vbase_instance): Use binfo_for_vbase.
18366         (binfo_for_vbase): New function.
18367         * typeck.c (get_delta_difference): Use binfo_for_vbase.
18369 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
18371         * decl2.c (finish_anon_union): Generalize error messages to handle
18372         anonymous structures.
18373         * init.c (perform_member_init): Remove `name' parameter.
18374         (build_field_list): New function.
18375         (sort_member_init): Handle anonymous union initialization order
18376         correctly.  Check for multiple initializations of the same union.
18377         (emit_base_init): Don't look up fields by name here.
18378         (expand_member_init): Record the result of name lookup for future
18379         reference.
18380         * typeck.c (build_component_ref): Fix formatting.
18382 2000-05-17  Andrew Cagney  <cagney@b1.cygnus.com>
18384         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
18385         * typeck.c (build_x_compound_expr): Replace warn_unused with
18386         warn_unused_value.
18388         * decl2.c (lang_decode_option): Update -Wall unused flags by
18389         calling set_Wunused.
18391 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
18393         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
18394         * init.c (dfs_vtable_path_unmark): Remove.
18395         * search.c (marked_new_vtable_p): Likewise.
18396         (unmarked_new_vtable_p): Likewise.
18397         (dfs_search_slot_nonempty_p): Likewise.
18398         (dfs_mark): Likewise.
18399         (dfs_vtable_path_unmark): Likewise.
18400         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
18401         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
18402         (dfs_init_vbase_pointers): Remove special-case new ABI code.
18403         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
18404         (init_vbase_pointers): Simplify.
18405         (expand_indirect_vtbls_init): Likewise.
18407         * class.c (copy_virtuals): New function.
18408         (build_primary_table): Use it.
18409         (build_secondary_vtable): Likewise.
18410         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
18411         indicate that no vcall offset is required.
18412         (add_virtual_function): Likewise.
18413         (modify_all_vtables): Likewise.
18414         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
18415         (dfs_accumulate_vtbl_inits): Likewise.
18416         (build_vtbl_initializer): Make changes to handle construction
18417         vtables.
18418         (dfs_build_vcall_offset_vtbl_entries): Likewise.
18419         (build_rtti_vtbl_entries): Likewise.
18420         (build_vtable_entries): Handle a NULL vcall_index.
18422 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
18424         * decl2.c (lang_decode_option): Fix thinko.
18426 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
18428         * except.c (check_handlers): New fn.
18429         * cp-tree.h: Declare it.
18430         * semantics.c (finish_handler_sequence): Call it.
18431         (finish_function_handler_sequence): Likewise.
18432         (finish_handler_parms): Set TREE_TYPE on the handler.
18433         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
18434         * search.c (get_base_distance_recursive): If protect>1, ignore
18435         special access.
18436         (get_base_distance): Don't reduce watch_access.
18438 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
18440         * lex.c: #include diagnostic.h.
18441         (lang_init_options): Set default prefixing rules.
18443         * lang-options.h: Add -fdiagnostics-show-location=.
18445         * decl2.c: #include diagnostic.h.
18446         (lang_decode_option): Handle -fdiagnostics-show-location=.
18448 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
18450         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
18451         * vec.cc: Revert my 2000-05-07 change.
18453 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
18455         * class.c (check_field_decls): Complain about non-static data
18456         members with same name as class in class with constructor.
18458 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
18460         * decl.c (grokdeclarator): Allow non-static data members with
18461         same name as class.
18463 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
18465         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
18466         and pending_inline.filename.  Update prototypes.
18467         * decl.c (define_label): Constify filename parameter.
18468         * decl2.c (warn_if_unknown_interface): Constify local char *.
18469         * input.c Constify input_source.filename. Don't declare
18470         input_filename or lineno.  Constify filename parameter to feed_input.
18471         * lex.c (init_parse): Constify parameter and return value.
18472         (cp_pragma_interface, cp_pragma_implementation): Constify
18473         filename argument.
18474         (reinit_parse_for_method, reinit_parse_for_block,
18475         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
18476         Constify local char *.
18477         * pt.c: Don't declare lineno or input_filename.
18478         (print_template_context, tsubst_friend_function, tsubst_decl,
18479         tsubst, instantiate_decl): Constify local char *.
18480         * semantics.c (expand_body): Constify local char *.
18481         * tree.c (build_srcloc): Constify filename parameter.
18482         * typeck.c (c_expand_asm_operands): Constify filename
18483         parameter.
18485 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
18487         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
18488         offsetof expansion.
18490 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
18492         * inc/cxxabi.h:  Fix typos in comment.
18493         (__base_class_info::__offset): Use a static_cast.
18495 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
18497         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
18498         of std::size_t and std::ptrdiff_t respectively.
18499         * tinfo.cc: Likewise.
18500         * vec.cc: Likewise.
18502 2000-05-06  Richard Henderson  <rth@cygnus.com>
18504         * typeck.c (build_c_cast): Don't warn integer->pointer size
18505         mismatch for constants.
18507 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
18509         * rtti.c (ptmd_initializer): Set non-public, if class is
18510         incomplete.
18512         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
18513         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
18514         __cxa_vec_delete): Likewise.
18515         * tinfo.cc (__dynamic_cast): Likewise.
18516         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
18517         __cxa_vec_delete): Likewise.
18519 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
18521         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
18522         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
18523         (lang_decl_flags): Add vcall_offset.
18524         (THUNK_VCALL_OFFSET): Use it.
18525         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
18526         * method.c (make_thunk): Create the lang_decl here, not in
18527         emit_thunk.
18528         (emit_thunk): Make generic thunks into ordinary functions once
18529         they have been fed to expand_body.
18530         * semantics.c (expand_body): Set current_function_is_thunk here.
18532 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18534         * class.c (update_vtable_entry_for_fn): Prototype.
18536         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
18537         and `tmpl'.
18539         * search.c (dfs_build_inheritance_graph_order): Prototype.
18541 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
18543         * cp-tree.h (special_function_kind): Add various kinds of
18544         destructors.
18545         (special_function_p): New function.
18546         * class.c (overrides): Don't let one kind of destructor override
18547         another.
18548         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
18549         whether or not to instantiate a template.
18550         * tree.c (special_function_p): Define.
18552 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
18554         * cp-tree.def (THUNK_DECL): Remove.
18555         * cp-tree.h (DECL_THUNK_P): New macro.
18556         (DECL_NON_THUNK_FUNCTION_P): Likewise.
18557         (DECL_EXTERN_C_FUNCTION_P): Likewise.
18558         (SET_DECL_THUNK_P): Likewise.
18559         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
18560         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
18561         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
18562         * decl.c (decls_match): Use DECL_EXTERN_C_P.
18563         (duplicate_decls): Likewise.
18564         (pushdecl): Likewise.  Adjust thunk handling.
18565         (grokfndecl): Use DECL_EXTERN_C_P.
18566         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
18567         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
18568         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
18569         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
18570         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
18571         DECL_NO_STATIC_CHAIN.
18572         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
18573         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
18574         * search.c (covariant_return_p): Remove THUNK_DECL handling.
18575         * ir.texi: Update.
18577 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
18579         * tree.c (walk_tree): Set lineno.
18581 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
18583         * exception.cc: Update license notice.
18584         * new.cc: Likewise.
18585         * new1.cc: Likewise.
18586         * new2.cc: Likewise.
18587         * tinfo.cc: Likewise.
18588         * tinfo2.cc: Likewise.
18589         * vec.cc: Likewise.
18590         * inc/cxxabi.h: Likewise.
18591         * inc/exception: Likewise.
18592         * inc/new: Likewise.
18593         * inc/new.h: Likewise.
18594         * inc/typeinfo: Likewise.
18596 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
18598         * tree.c (build_target_expr_with_type): If we already have a
18599         TARGET_EXPR, just return it.
18601         * optimize.c (initialize_inlined_parameters): Don't generate an
18602         EXPR_STMT if we can just use DECL_INITIAL.
18603         * decl.c (emit_local_var): Only make the initialization a
18604         full-expression if stmts_are_full_exprs_p.
18606 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
18608         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
18609         macro.
18610         * call.c (standard_conversion): Use it.
18611         (direct_reference_binding): Likewise.
18612         (build_over_call): Likewise.
18613         (is_properly_derived_from): Likewise.
18614         (compare_ics): Likewise.
18615         * class.c (resolves_to_fixed_type_p): Likewise.
18616         * optimize.c (declare_return_variable): Likewise.
18617         * pt.c (is_specialization_of): Likewise.
18618         (unify): Likewise.
18619         * typeck.c (comp_target_parms): Likeiwse.
18620         (build_static_cast): Likewise.
18621         (build_reinterpret_cast): Likewise.
18622         (build_const_cast): Likewise.
18623         (comp_ptr_ttypes_real): Likewise.
18624         (comp_ptr_ttypes_const): Likewise.
18625         * typeck2.c (process_init_constructor): Likewise.
18627 2000-04-30  Scott Snyder <snyder@fnal.gov>
18629         * decl.c (finish_destructor_body): Use the base destructor when
18630         destroying virtual bases.
18632 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
18634         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
18635         STMT_EXPRs.
18636         * optimize.c (struct inline_data): Add target_exprs field.
18637         (declare_return_variable): When a function returns an aggregate,
18638         use the variable declared in the TARGET_EXPR as the remapped
18639         DECL_RESULT.
18640         (expand_call_inline): Update the pending target_exprs stack.
18641         (optimize_function): Initialize the stack.
18643         * decl2.c (finish_file): Fix typo in comment.
18645         * method.c (emit_thunk): Don't try to return a `void' value.
18647         * optimize.c (initialize_inlined_parameters): If the parameter is
18648         addressable, we need to make a new VAR_DECL, even if the
18649         initializer is constant.
18651 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
18653         * decl.c (grok_op_properties): Add an extra check of argtypes.
18655 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
18657         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
18658         variables.
18659         (initialize_inlined_parameters): Try to avoid creating new
18660         VAR_DECLs.
18662 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
18664         * lex.c (my_get_run_time): Remove.
18665         (init_filename_times): Use get_run_time instead of my_get_run_time.
18666         (check_newline): Likewise.
18667         (dump_time_statistics): Likewise.
18668         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
18669         of computing elapsed time explicitly.
18671 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
18673         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
18674         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
18675         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
18676         before calling decl_constant_value.
18677         * class.c (check_bitfield_decl): Likewise.
18678         * cvt.c (ocp_convert): Likewise.
18679         (convert): Likewise.
18680         * decl.c (compute_array_index_type): Likewise.
18681         (build_enumerator): Likewise.
18682         * decl2.c (check_cp_case_value): Likewise.
18683         * pt.c (convert_nontype_argument): Likewise.
18684         (tsubst): Likewise.
18685         * typeck.c (decay_conversion): Likewise.
18686         (build_compound_expr): Likewise.
18687         (build_reinterpret_cast): Likewise.
18688         (build_c_cast): Likewise.
18689         (convert_for_assignment): Likewise.
18691 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
18693         * decl.c (finish_function): Don't play games with DECL_INLINE.
18695 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
18697         * ir.texi: Correct typo.
18699 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
18701         * decl.c (grokdeclarator): Reject VLAs as members.
18703 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
18705         * call.c (standard_conversion): Accept conversion between
18706         COMPLEX_TYPEs.
18708         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
18710 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
18712         * decl2.c (finish_file): Remove double setup for accounting
18713         compile time.
18715 2000-04-24  Robert Lipe <robertlipe@usa.net>
18717         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
18719 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
18721         * new.cc (set_new_handler): Needs to be in std::.
18723 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
18725         * cp-tree.h (lang_decl): Remove pretty_function_p.
18726         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
18727         language-specific node.
18728         * decl.c (cp_make_fname_decl): Use build_decl, not
18729         build_lang_decl, to build the variables.
18730         (grokvardecl): Don't call build_lang_decl for local variables in
18731         templates.
18732         (grokdeclarator): Don't call build_lang_decl for local type
18733         declarations in templates.
18734         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
18735         zero'd memory, rather than calling memset.
18736         * pt.c: Include hashtab.h.
18737         (local_specializations): New variable.
18738         (retrieve_local_specialization): Use it.
18739         (register_local_specialization): Likewise.
18740         (tsubst_decl): Don't assume local variables have
18741         DECL_LANG_SPECIFIC.
18742         (instantiate_decl): Set up local_specializations.
18743         * Makefile.in (HTAB_H): New variable.
18745 2000-04-23  Richard Henderson  <rth@cygnus.com>
18747         * typeck.c (c_expand_asm_operands): Restore the original
18748         contents of the output list.
18750 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
18752         * ir.texi:  Document complex number representation.
18754 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
18756         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
18757         (target_incomplete_p): New function.
18758         (tinfo_base_init): Create comdat NTBS name variable.
18759         (ptr_initializer): Add non_public parameter. Calculate it.
18760         (ptmd_initializer): Likewise.
18761         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
18762         (create_real_tinfo_var): Add non_public parameter. Use it.
18763         Push proxy into global namespace.
18764         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
18765         New enumeration.
18766         * inc/typeinfo (type_info::before, type_info::operator==):
18767         Compare __name addresses.
18769         * tinfo2.cc: Remove new-abi builtins comment.
18771 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
18773         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
18775         * call.c (joust): Exit early if we get the same function, too.
18777         * decl2.c (key_method): Return NULL_TREE for template classes.
18778         (import_export_class): Don't need to check for template classes.
18780 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
18782         * lex.c: Remove references to cccp.c.
18784 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
18786         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
18787         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
18788         (DECL_DESTRUCTOR_P): Use destructor_attr.
18789         (DECL_CONST_MEMFUNC_P): Reimplement.
18790         (DECL_VOLATILE_MEMFUNC_P): Remove.
18791         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
18792         (overrides): Use DECL_DESTRUCTOR_P.
18793         (check_for_override): Likewise.
18794         * decl.c (start_function): Likewise.
18795         * decl2.c (grokfclassfn): Likewise.
18796         (check_classfn): Likewise.
18797         (grok_function_init): Likewise.
18799 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
18801         * decl2.c (grokfield): Issue error on illegal data member
18802         declaration.
18804 2000-04-17  Mark P Mitchell  <mark@codesourcery.com>
18806         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
18808 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
18810         * class.c (build_vtable_entry): Don't build thunks for type-info
18811         functions.
18813 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
18815         * decl.c (decls_match): Allow a redeclaration of a builtin to
18816         specify args while the builtin did not.
18818 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
18820         * cp-tree.def (THUNK_DECL): Add to documentation.
18821         * cp-tree.h (flag_huge_objects): Declare.
18822         * class.c (modify_vtable_entry): Tidy.
18823         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
18824         Calculate delta appropriately for the new ABI.
18825         (dfs_modify_vtables): Use it.
18826         (modify_all_vtables): Fix thinko in code to add overriding copies
18827         of functions to primary vtables.
18828         (build_clone): Fix typo in comment.
18829         (clone_function_decl): Correct order of destructors in vtable.
18830         (build_vbase_offset_vtbl_entries): Adjust comment.
18831         (dfs_vcall_offset_queue_p): Remove.
18832         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
18833         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
18834         (build_vtable_entry): Correct check for pure virtual functions.
18835         Don't declare flag_huge_objects.
18836         * decl.c (flag_huge_objects): Remove declaration.
18837         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
18838         Use int_size_in_bytes.
18839         (emit_thunk): Handle vcall offset thunks.
18841 2000-04-15  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
18843         * decl2.c (parse_time, varconst_time): Delete declarations.
18844         (finish_file): Delete LINENO declaration.
18845         START_TIME and THIS_TIME now long.
18847 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
18849         * class.c (build_base_field): Reformat comment.
18851         * inc/cxxabi.h (stddef.h): Comment inclusion.
18852         (__base_class_info::__offset): Comment shift.
18854 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
18856         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
18857         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
18858         (cp_push_exception_identifier): New macro.
18859         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
18860         (DECL_BASE_DESTRUCTOR_P): Likewise.
18861         (DECL_DELETING_DESTRUCTOR_P): Likewise.
18862         (get_vtbl_decl_for_binfo): Fix formatting.
18863         (in_charge_arg_for_name): New macro.
18864         (maybe_build_cleanup_and_delete): Remove declaration.
18865         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
18866         (in_charge_arg_for_name): New function.
18867         (build_new_method_call): Use it.  Handle cloned destructors.
18868         (build_clone): Don't make the base constructor virtual.
18869         Automatically defer generated functions.
18870         (clone_function_decl): Handle destructors, too.
18871         (clone_constructors_and_destructors): Likewise.
18872         (create_vtable_ptr): Don't create a vtable entry for a cloned
18873         function.
18874         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
18875         (initialize_predefined_identifiers): Update appropriately.
18876         (finish_destructor_body): Simplify.
18877         (maybe_build_cleanup_and_delete): Remove.
18878         * except.c (expand_throw): Handle new-ABI destructors.
18879         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
18880         (build_dtor_call): New function.
18881         (build_delete): Use it.  Simplify.
18882         * optimize.c (maybe_clone_body): Handle destructors.
18883         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
18885         * exception.cc (cleanup_fn): New typedef.
18886         (CALL_CLEANUP): New macro.
18887         (cp_eh_info): Use them.
18888         (__cp_push_exception): Likewise.
18889         (__cp_pop_exception): Likewise.
18891 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
18893         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
18894         (complete_dtor_identifier): New macro.
18895         (CLASSTYPE_FIRST_CONVERSION): Remove.
18896         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
18897         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
18898         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
18899         (CLASSTYPE_CONSTRUCTORS): Likewise.
18900         (CLASSTYPE_DESTRUCTORS): Likewise.
18901         (lang_decl): Add cloned_function.
18902         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
18903         (DECL_BASE_CONSTRUCTOR_P): Likewise.
18904         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
18905         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
18906         (DECL_CLONED_FUNCTION_P): Likewise.
18907         (DECL_CLONED_FUNCTION): Likewise.
18908         (clone_function_decl): Declare.
18909         (maybe_clone_body): Likewise.
18910         * call.c (build_user_type_conversion_1): Call complete object
18911         constructors in the new ABI.
18912         (build_new_method_call): Don't add in-charge parameters under the
18913         new ABI.
18914         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
18915         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
18916         CLASSTYPE_DESTRUCTOR_SLOT.
18917         (build_clone): New function.
18918         (clone_function_decl): Likewise.
18919         (clone_constructors_and_destructors): Likewise.
18920         (check_bases_and_members): Use it.
18921         * decl.c (iniitialize_predefined_identifiers): Initialize
18922         complete_dtor_identifier.
18923         (finish_function): Don't add extra code to a clone.
18924         (lang_mark_tree): Mark cloned_function.
18925         * decl2.c (mark_used): Don't bother trying to instantiate things
18926         we synthesized.
18927         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
18928         * method.c (set_mangled_name_for_decl): Don't treat clones as
18929         constructors.
18930         (synthesize_method): Sythesize cloned functions, not the clones.
18931         * optimize.c (inline_data): Update comment on ret_label.
18932         (remap_block): Don't assume DECL_INITIAL exists.
18933         (copy_body_r): Allow ret_label to be NULL.
18934         (maybe_clone_body): Define.
18935         * pt.c (tsubst_decl): Handle clones.
18936         (instantiate_clone): New function.
18937         (instantiate_template): Use it.
18938         (set_mangled_name_for_template_decl): Don't treat clones as
18939         constructors.
18940         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
18941         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
18942         * semantics.c (expand_body): Clone function bodies as necessary.
18944         * optimize.c (remap_decl): Avoid sharing structure for arrays
18945         whose size is only known at run-time.
18946         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
18948         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
18949         to has_in_charge_parm_p.
18950         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
18951         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
18952         (DECL_COPY_CONSTRUCTOR_P): New macro.
18953         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
18954         (build_user_type_conversion_1): Likewise.
18955         (convert_like_real): Likewise.
18956         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
18957         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
18958         (copy_args_p): Likewise.
18959         (grok_ctor_properties): Likewise.
18960         (start_function): Likewise.
18961         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
18962         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
18963         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
18964         * method.c (do_build_copy_constructor): Use
18965         DECL_HAS_IN_CHARGE_PARM_P.
18966         (synthesize_method): Likewise.
18967         * pt.c (instantiate_template): Remove goto.
18968         * tree.c (build_cplus_method_type): Remove mention of obstacks in
18969         comment.
18971         * cp-tre.h (finish_function): Change prototype.
18972         * decl.c (end_cleanup_fn): Adjust caller.
18973         (finish_function): Take only one parameter.
18974         * decl2.c (finish_objects): Adjust caller.
18975         (finish_static_storage_duration_function): Likewise.
18976         * method.c (emit_thunk): Likewise.
18977         * parse.y: Likewise.
18978         * parse.c: Regenerated.
18979         * pt.c (instantiate_decl): Likewise.
18980         * rtti.c (synthesize_tinfo_fn): Likewise.
18981         * semantics.c (expand_body): Likewise.
18983         * cp-tree.h (copy_decl): New function.
18984         * class.c (finish_struct_1): Use it.
18985         * lex.c (copy_decl): Define it.
18986         * pt.c (tsubst_decl): Likewise.
18987         * tree.c (copy_template_template_parm): Likewise.
18989         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
18990         has_nonpublic_assign_ref.
18991         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
18992         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
18993         * class.c (finish_struct_methods): Don't set
18994         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
18995         (interface_only): Don't declare.
18996         (interface_unknown): Likewise.
18998 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
19000         * tree.h (HAVE_TEMPLATES): Remove definition.
19001         * lang-options.h (-fthis-is-variable): Remove documentation.
19003 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
19005         * class.c (instantiate_type): Handle object-relative template-id.
19007         * semantics.c (finish_expr_stmt): Call convert_to_void here.
19008         * decl.c (cplus_expand_expr_stmt): Not here.
19010         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
19011         Initialize exprtype earlier.
19013         * parse.y (fn.def1): Check for defining types in return types.
19015         * decl.c (check_tag_decl): Notice extra fundamental types.
19016         Diagnose empty decls in classes, too.
19018         * decl.c (grokdeclarator): Don't override an anonymous name if no
19019         declarator was given.
19021         * cvt.c (convert_to_void): Call resolve_offset_ref.
19023         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
19025         * decl2.c (decl_namespace): Handle getting a type.
19027         * typeck.c (build_c_cast): Re-enable warning for cast between
19028         pointer and integer of different size.
19030 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
19032         * inc/cxxabi.h (__pointer_type_info): Add restrict and
19033         incomplete flags.
19034         (__pointer_type_info::__pointer_catch): New virtual function.
19035         (__pointer_to_member_type_info): Derive from
19036         __pointer_type_info. Adjust.
19037         (__pointer_to_member_type_info::__do_catch): Remove.
19038         (__pointer_to_member_type_info::__is_pointer_p): Declare.
19039         (__pointer_to_member_type_info::__pointer_catch): Declare.
19040         * rtti.c (qualifier_flags): Add restrict flag.
19041         (ptmd_initializer): Reorder members.
19042         (create_tinfo_types): Expand comments. Reorder
19043         ptmd_desc_type_node members.
19044         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
19045         Implement.
19046         (__pointer_type_info::__do_catch): Move specific code into
19047         __pointer_catch. Call it.
19048         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
19049         specific catch checking. Fix void conversion check.
19050         (__pointer_to_member_type_info::__do_catch): Remove.
19051         (__pointer_to_member_type_info::__pointer_catch): Implement.
19053 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
19055         * lex.c (init_parse): Remove traces of classof and headof.
19056         * decl2.c (flag_operator_names): Default to 1.
19057         (lang_decode_option): Do not set it for -ansi.
19059 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
19061         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
19062         (DECL_MAIN_VARIANT): Remove.
19063         * decl.c (duplicate_decls): Don't set it.
19064         (start_function): Likewise.
19065         (lang_mark_tree): Don't mark it.
19066         * decl2.c (defer_fn): Don't use it.
19067         * lex.c (retrofit_lang_decl): Don't set it.
19068         * pt.c (tsubst_decl): Likewise.
19069         * ptree.c (print_lang_decl): Don't print it.
19070         * typeck.c (mark_addressable): Don't use it.
19072 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
19074         * vec.cc: Include <new> and <exception>.
19075         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
19076         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
19077         terminate.
19078         (__cxa_vec_delete): Catch dtor exceptions.
19080 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
19082         Prepend __ to implementation defined names.
19083         * inc/typeinfo (type_info): Rename _name to __name.
19084         (type_info::type_info): Rename parameter.
19085         (type_info::operator==, type_info::operator!=,
19086         type_info::before): Likewise.
19087         (type_info::is_pointer_p, type_info::is_function_p,
19088         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
19089         parameters.
19090         * inc/cxxabi.h
19091         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
19092         (__pointer_type_info::__pointer_type_info): Likewise.
19093         (__pointer_type_info::is_pointer_p,
19094         __pointer_type_info::do_catch): Prepend __. Rename parameters.
19095         (__array_type_info::__array_type_info): Rename parameters.
19096         (__function_type_info::__function_type_info): Likewise.
19097         (__function_type_info::is_function_p): Prepend __.
19098         (__enum_type_info::__enum_type_info): Rename parameters.
19099         (__pointer_to_member_type_info::__pointer_to_member_type_info):
19100         Likewise.
19101         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
19102         parameters.
19103         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
19104         (__class_type_info::__class_type_info): Rename parameters.
19105         (__class_type_info::sub_kind): Prepend __. Adjust member names.
19106         (__class_type_info::upcast_result,
19107         __class_type_info::dyncast_result): Prepend __. Move definition
19108         into tinfo.cc.
19109         (__class_type_info::do_upcast, __class_type_info::do_catch,
19110         __class_type_info::find_public_src,
19111         __class_type_info::do_dyncast,
19112         __class_type_info::do_find_public_src): Prepend __. Rename
19113         parameters.
19114         (__si_class_type_info::__si_class_type_info): Rename parameters.
19115         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
19116         __si_class_type_info::do_find_public_src): Prepent __. Rename
19117         parameters.
19118         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
19119         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
19120         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
19121         parameters.
19122         (__dynamic_cast): Rename parameters.
19123         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
19124         type_info::do_catch, type_info::do_upcast): Prepend __.
19125         (contained_p, public_p, virtual_p, contained_public_p,
19126         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
19127         (__class_type_info::do_catch,
19128         __class_type_info::do_upcast): Prepend __. Adjust.
19129         (__class_type_info::__upcast_result,
19130         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
19131         Adjust.
19132         (__class_type_info::find_public_src): Prepend __. Adjust.
19133         (__class_type_info::do_find_public_src,
19134         __si_class_type_info::do_find_public_src,
19135         __vmi_class_type_info::do_find_public_src): Likewise.
19136         (__class_type_info::do_dyncast,
19137         __si_class_type_info::do_dyncast,
19138         __vmi_class_type_info::do_dyncast): Likewise.
19139         (__class_type_info::do_upcast,
19140         __si_class_type_info::do_upcast,
19141         __vmi_class_type_info::do_upcast): Likewise.
19142         (__dynamic_cast): Adjust.
19143         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
19144         (__function_type_info::is_function_p): Likewise.
19145         (__pointer_type_info::do_catch): Likewise. Adjust.
19146         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
19147         (__throw_type_match_rtti_2): Adjust.
19148         (__is_pointer): Adjust.
19150 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
19152         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
19153         (complete_ctor_identifier): New macro.
19154         (special_function_kind): Add sfk_copy_constructor and
19155         sfk_assignment_operator.
19156         (LOOKUP_HAS_IN_CHARGE): Remove.
19157         (cons_up_default_function): Rename to ...
19158         (implicitly_declare_fn): ... this.
19159         * call.c (build_new_method_call): Add in-charge parameters for
19160         constructors here.
19161         * class.c (add_implicitly_declared_members): Change parameter name
19162         from cant_have_assignment to cant_have_const_assignment.
19163         Replace calls to cons_up_default_function to implicitly_declare_fn.
19164         * cvt.c (ocp_convert): Use complete_ctor_identifier.
19165         * decl.c (initialize_predefined_identifiers): Initialize it.
19166         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
19167         complex expression.
19168         * init.c (expand_default_init): Don't calculate the in-charge
19169         parameter here.
19170         (build_new_1): Likewise.
19171         * lex.c (cons_up_default_function): Move to method.c.
19172         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
19173         (implicitly_declare_fn): New function.
19174         * typeck.c (build_static_cast): Use complete_ctor_identifier.
19175         (build_modify_expr): Likewise.
19176         * typeck2.c (build_functional_cast): Likewise.
19178         Under the new ABI, constructors don't return `this'.
19179         * cp-tree.h (warn_reorder): Declare.
19180         (special_function_kind): New enum.
19181         (global_base_init_list): Remove declaration.
19182         (emit_base_init): Don't return a value.
19183         (check_base_init): Don't declare.
19184         (is_aggr_typedef): Likewise.
19185         * decl.c (check_special_function_return_type): New function.
19186         (return_types): Remove.
19187         (grokdeclarator): Use check_special_function_return_type.
19188         (start_function): Don't initialize ctor_label under the new ABI.
19189         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
19190         * init.c (begin_init_stmts): Move to top of file.
19191         (finish_init_stmts): Likewise.
19192         (warn_reorder): Don't declare.
19193         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
19194         value.
19195         (check_base_init): Remove.
19196         (is_aggr_typedef): Likewise.
19197         (build_new_1): Don't use the return value of a constructor.
19198         * semantics.c (setup_vtbl_ptr): Don't use the return value
19199         of emit_base_init.
19200         * typeck.c (check_return_expr): Don't magically convert return
19201         statements into `return this' in constructors under the new ABI.
19203         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
19204         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
19205         (base_ctor_identifier): New macro.
19206         (base_dtor_identifier): Likewise.
19207         (deleting_dtor_identifier): Likewise.
19208         * decl.c: Don't include obstack.h.
19209         (obstack_chunk_alloc): Don't define.
19210         (obstack_chunk_free): Likewise.
19211         (struct predefined_identifier): New type.
19212         (initialize_predefined_identifiers): New function.
19213         (init_decl_processing): Use it.
19214         (debug_temp_inits): Remove.
19215         (start_method): Don't call preserve_data.
19216         (hack_incomplete_structures): Update comment.
19217         * init.c (init_init_processing): Don't initialize
19218         nelts_identifier.
19219         (build_offset_rf): Remove dead code.
19220         (build_delete): Use CLASSTYPE_N_BASECLASSES.
19221         * search.c (init_search_processing): Don't initialize
19222         vptr_identifier.
19224 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
19226         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
19227         some sign_compare warnings.
19229 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
19231         Rename abi::__vmi_class_type_info members.
19232         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
19233         base_list, detail_masks members to vmi_flags, vmi_base_count,
19234         vmi_bases and vmi_flags_masks respectively.
19235         (__vmi_class_type_info::vmi_flags_masks): Rename
19236         details_unknown_mask to flags_unknown_mask.
19237         * tinfo.cc (__class_type_info::do_upcast): Adjust.
19238         (__vmi_class_type_info::do_find_public_src): Adjust.
19239         (__vmi_class_type_info::do_dyncast): Adjust.
19240         (__vmi_class_type_info::do_upcast): Adjust.
19242 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
19244         * tinfo.cc (convert_to_base): New function.
19245         (get_vbase_offset): Remove. Move into convert_to_base.
19246         (__vmi_class_type_info::do_find_public_src): Adjust.
19247         (__vmi_class_type_info::do_dyncast): Adjust.
19248         (__vmi_class_type_info::do_upcast): Adjust.
19250 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
19252         * tinfo.cc (operator=): Use __builtin_strcmp.
19253         * tinfo2.cc (before): Likewise.
19255 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
19257         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
19258         (DECL_SAVED_INLINE): Rename to ...
19259         (DECL_DEFERRED_FN): ... this.
19260         (in_function_p): Remove declaration.
19261         (mark_inline_for_output): Rename to ...
19262         (defer_fn): ... this.
19263         * decl.c (finish_function): Adjust call to mark_inline_for_output.
19264         (in_function_p): Remove definition.
19265         * decl2.c (saved_inlines): Rename to ...
19266         (deferred_fns): ... this.
19267         (saved_inlines_used): Rename to ...
19268         (deferred_fns_used): ... this.
19269         (mark_inline_for_output): Rename to ...
19270         (defer_fn): ... this.
19271         (finish_file): Adjust accordingly.
19272         (init_decl2): Likewise.
19273         * lex.c (cons_up_default_function): Likewise.
19274         * pt.c (mark_decl_instantiated): Likewise.
19275         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
19276         circumstances.
19277         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
19278         * semantics.c (expand_body): Defer more functions.
19280 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
19282         * vec.cc: New file.
19283         * Make-lang.in (CXX_LIB2FUNCS): Add it.
19284         (vec.o): Build it.
19285         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
19286         __cxa_vec_delete): Declare.
19288 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
19290         * rtti.c (dfs_class_hint_mark): New static function.
19291         (dfs_class_hint_unmark): New static function.
19292         (class_hint_flags): Use them.
19294 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
19296         * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
19298 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
19300         * cp-tree.h (instantiate_decl): Change prototype.
19301         * decl2.c (mark_used): Adjust call.
19302         * optimize.c (inlinable_function_p): Adjust handling of templates.
19303         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
19304         (do_type_instantiation): Likewise.
19305         (instantiate_decl): Defer more templates.
19306         (instantiate_pending_templates): Adjust logic to handle inline
19307         friend functions.
19309         * Makefile.in (GGC_H): New variable.  Use it throughout in place
19310         of ggc.h.
19312         * call.c: Don't include obstack.h.  Include ggc.h.
19313         (obstack_chunk_alloc): Don't define.
19314         (obstack_chunk_free): Likewise.
19315         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
19316         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
19317         (pop_switch): Free it.
19319         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
19321         * dump.c (dequeue_and_dump): Don't try to print the bit_position
19322         if we don't have a DECL_FIELD_OFFSET.
19324 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
19326         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
19327         special_function_p.
19329 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
19331         * cfns.gperf (hash, libc_name_p): Prototype.
19333         * rtti.c (build_dynamic_cast_1): Constification.
19335         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
19337         * semantics.c (deferred_type_access_control): Prototype.
19339 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
19341         Correct many new ABI issues regarding vbase and vcall offset
19342         layout.
19343         * cp-tree.h (BINFO_VTABLE): Document.
19344         (struct lang_type): Tweak formatting.
19345         (BINFO_PRIMARY_BINFO): Add to documentation.
19346         (CLASSTYPE_VSIZE): Fix typo in comment.
19347         (CLASSTYPE_VBASECLASSES): Update documentation.
19348         (BINFO_VBASE_MARKED): Remove.
19349         (SET_BINFO_VBASE_MARKED): Likewise.
19350         (CLEAR_BINFO_VBASE_MARKED): Likewise.
19351         (BINFO_FIELDS_MARKED): Remove.
19352         (SET_BINFO_FIELDS_MARKED): Likewise.
19353         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
19354         (enum access_kind): New enumeration.
19355         (num_extra_vtbl_entries): Remove declaration.
19356         (size_extra_vtbl_entries): Likewise.
19357         (get_vtbl_decl_for_binfo): New function.
19358         (dfs_vbase_unmark): Remove declaration.
19359         (mark_primary_bases): Likewise.
19360         * class.c (SAME_FN): Remove.
19361         (struct vcall_offset_data_s): Move definition.
19362         (build_vbase_pointer): Use `build', not `build_binary_op', to
19363         access the vbase pointer under the new ABI.
19364         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
19365         (build_primary_vtable): Likewise.
19366         (dfs_mark_primary_bases): Move here from search.c.
19367         (mark_primary_bases): Likewise.
19368         (determine_primary_bases): Under the new ABI, don't make a base
19369         class a primary base just because we don't yet have any virtual
19370         functions.
19371         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
19372         (num_vfun_entries): Remove.
19373         (dfs_count_virtuals): Likewise.
19374         (num_extra_vtbl_entries): Likewise.
19375         (size_extra_vtbl_entries): Likewise.
19376         (layout_virtual_bases): Iterate in inheritance graph order under
19377         the new ABI.
19378         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
19379         indicate that a vfield is present.
19380         (init_class_processing): Initialize access_public_node, etc., from
19381         ak_public, etc.
19382         (get_vtbl_decl_for_binfo): New function.
19383         (dump_class_hierarchy_r): Likewise.
19384         (dump_class_hierarchy): Use it.
19385         (finish_vtbls): Build the vtbls in inheritance graph order.
19386         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
19387         (initialize_vtable): Use get_vtbl_decl_for_binfo.
19388         (accumulate_vtbl_inits): Add comments explaining why a pre-order
19389         walk is required.
19390         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
19391         where the vptr points, even for primary vtables.
19392         (build_vtbl_initializer): Adjust handling of vbase and vcall
19393         offsets.
19394         (build_vcall_and_vbase_vtable_entries): New function.
19395         (dfs_build_vbase_offset_vtbl_entries): Remove.
19396         (build_vbase_offset_vtbl_entries): Reimplement.
19397         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
19398         were already handled in a primary base class vtable.
19399         (build_vcall_offset_vtbl_entries): Adjust.
19400         (build_rtti_vtbl_entries): Adjust.
19401         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
19402         * init.c (expand_virtual_init): Simplify.
19403         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
19404         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
19405         * search.c (BINFO_ACCESS): New macro.
19406         (SET_BINFO_ACCESS): Likewise.
19407         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
19408         (access_in_type): Likewise.
19409         (dfs_accessible_p): Likewise.
19410         (protected_accessible_p): Likewise.
19411         (lookup_fnfields_1): Adjust documentation.
19412         (dfs_mark_primary_bases): Move to class.c
19413         (mark_primary_bases): Likewise.
19414         (dfs_vbase_unmark): Remove.
19415         (virtual_context): Use BINFO_FOR_VBASE.
19416         (dfs_get_vbase_types): Simplify.
19417         (dfs_build_inheritance_graph_order): New function.
19418         (get_vbase_types): Use it.
19419         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
19421         * tinfo.cc (get_vbase_offset): New function.
19422         (__vmi_class_type_info::do_find_public_src): Use it.
19423         (__vmi_class_type_info::do_dyncast): Likewise.
19424         (__vmi_class_type_info::do_upcast): Likewise.
19426 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
19428         * lang-specs.h: Pass -fno-show-column to the preprocessor.
19430 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
19432         * rtti.c (class_hint_flags): Rename flags.
19433         (class_initializer): Remove flags.
19434         (synthesize_tinfo_var): Combine offset and flags. Add flags
19435         for __vmi_class_type_info.
19436         (create_tinfo_types): Remove flags from __class_type_info and
19437         __si_class_type_info. Merge flags and offset from
19438         base_class_type_info.
19439         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
19440         (__base_class_info::is_virtual_p): Adjust.
19441         (__base_class_info::is_public_p): Adjust.
19442         (__base_class_info::offset): New accessor.
19443         (__class_type_info::details): Remove member.
19444         (__class_type_info::__class_type_info): Lose details.
19445         (__class_type_info::detail_masks): Remove.
19446         (__si_class_type_info::__si_class_type_info): Lose details.
19447         (__vmi_class_type_info::details): New member.
19448         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
19449         (__vmi_class_type_info::detail_masks): New member.
19450         * tinfo.cc (__class_type_info::do_upcast): Initialize result
19451         with unknown_details_mask.
19452         (__vmi_class_type_info::do_find_public_src): Adjust
19453         (__vmi_class_type_info::do_dyncast): Adjust.
19454         (__vmi_class_type_info::do_upcast): Set result details, if
19455         needed. Adjust.
19456         (__dynamic_cast): Temporarily #if out optimization.
19458 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
19460         * rtti.c (get_tinfo_decl): Mark used.
19461         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
19462         mark as dealt with, if we output it.
19464 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
19466         * class.c: Reorganize to put virtual function table initialization
19467         machinery at the end of the file.
19469 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
19471         * class.c (finish_struct): Use bitsize_zero_node.
19472         * pt.c (instantiate_class_template): Likewise.
19474 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
19476         Put RTTI entries at negative offsets in new ABI.
19477         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
19478         vbase offset at index -3, not -1.
19479         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
19480         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
19481         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
19482         (build_rtti_vtbl_entries): New function.
19483         (set_rtti_entry): Remove.
19484         (build_primary_vtable): Don't use it.
19485         (build_secondary_vtable): Likewise.
19486         (start_vtable): Remove.
19487         (first_vfun_index): New function.
19488         (set_vindex): Likewise.
19489         (add_virtual_function): Don't call start_vtable.  Do call
19490         set_vindex.
19491         (set_primary_base): Rename parameter.
19492         (determine_primary_base): Likewise.
19493         (num_vfun_entries): Don't use skip_rtti_stuff.
19494         (num_extra_vtbl_entries): Include RTTI information.
19495         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
19496         (skip_rtti_stuff): Remove.
19497         (dfs_modify_vtables): Don't use it.
19498         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
19499         (layout_nonempty_base_or_field): Update size handling.
19500         (create_vtable_ptr): Tweak.
19501         (layout_class_type): Adjust parameter names.
19502         (finish_struct_1): Simplify.
19503         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
19504         (skip_rtti_stuff): Remove.
19505         (first_vfun_index): New function.
19506         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
19507         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
19508         (marked_vtable_pathp): Declare.
19509         (unmarked_vtable_pathp): Likewise.
19510         * error.c (dump_expr): Use first_vfun_index to calculate vtable
19511         offsets.
19512         * rtti.c (build_headof): Look for RTTI at negative offsets.
19513         (get_tinfo_decl_dynamic): Likewise.
19514         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
19515         here.
19516         (create_pseudo_type_info): Do it here instead.  Adjust so that
19517         vptr points at first virtual function.
19518         * search.c (marked_vtable_pathp): Make it global.
19519         (unmarked_vtable_pathp): Likewise.
19520         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
19521         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
19522         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
19523         (get_pure_virtuals): Likewise.
19524         (expand_upcast_fixups): Likewise.
19525         * tree.c (debug_binfo): Likewise.
19526         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
19527         negative offset.
19529 2000-03-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19531         * class.c (check_field_decl): Fix typo.
19532         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
19533         (check_methods): Likewise.
19534         (check_field_decls): Likewise.
19535         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
19536         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
19537         Use DECL_RESULT_FLD, not DECL_RESULT.
19538         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
19539         * lex.c (identifier_type): Likewise.
19540         * pt.c (determine_specialization, lookup_template_class): Likewise.
19541         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
19542         (resolve_overloaded_unification, more_specialized): Likewise.
19543         * semantics.c (finish_member_declaration): Likewise.
19544         * typeck.c (build_x_function_call): Likewise.
19546 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
19548         * class.c (layout_empty_base): Handle empty bases with non-byte
19549         alignment.
19550         (build_base_field): Likewise.
19551         (layout_virtual_bases): Likewise.
19553         * class.c (finish_struct_1): Fix typo in this change:
19555         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19557 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
19559         * decl.c (grokdeclarator): Count partial specializations when
19560         keeping track of how many template classes have been seen.
19562         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
19564 2000-03-25  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19566         * class.c (build_vbase_pointer_fields): layout_field now place_field.
19567         (get_vfield_offset): Use byte_position.
19568         (set_rtti_entry): Set OFFSET to ssizetype zero.
19569         (get_binfo_offset_as_int): Deleted.
19570         (dfs_record_base_offsets): Use tree_low_cst.
19571         (dfs_search_base_offsets): Likewise.
19572         (layout_nonempty_base_or_field): Reflect changes in RLI format
19573         and call byte_position.
19574         (layout_empty_base): Convert offset to ssizetype.
19575         (build_base_field): use rli_size_unit_so_far.
19576         (dfs_propagate_binfo_offsets): Do computation in proper type.
19577         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
19578         (layout_class_type): Reflect changes in RLI names and fields.
19579         (finish_struct_1): Set DECL_FIELD_OFFSET.
19580         * dump.c (dequeue_and_dump): Call bit_position.
19581         * expr.c (cplus_expand_constant): Use byte_position.
19582         * rtti.c (expand_class_desc): Use bitsize_one_node.
19583         * typeck.c (build_component_addr): Use byte_position and don't
19584         special case for zero offset.
19586 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
19588         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
19590         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
19591         tinfo object.
19592         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
19593         vtable.
19595 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
19597         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
19598         DECL_P macros.
19599         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
19600         make_typename_type, check_initializer, cp_finish_decl,
19601         xref_tag): Likewise.
19602         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
19603         decl_namespace, arg_assoc_template_arg, arg_assoc,
19604         validate_nonmember_using_decl, do_class_using_decl): Likewise.
19605         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
19606         args_to_string): Likewise.
19607         * friend.c (is_friend): Likewise.
19608         * lex.c (note_got_semicolon, note_list_got_semicolon,
19609         is_global): Likewise.
19610         * method.c (build_overload_nested_name, build_overload_value,
19611         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
19612         * parse.y (typename_sub, typename_sub1): Likewise.
19613         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
19614         process_partial_specialization, convert_template_argument,
19615         template_args_equal, add_pending_template, lookup_template_class,
19616         for_each_template_parm_r, maybe_fold_nontype_arg,
19617         tsubst, instantiate_template, type_unification_real, unify,
19618         instantiate_pending_templates, set_mangled_name_for_template_decl):
19619         Likewise.
19620         * repo.c (repo_get_id, repo_template_used): Likewise.
19621         * search.c (lookup_field_1): Likewise.
19622         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
19623         * xref.c (classname): Likewise.
19625 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
19627         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
19628         (CANONICAL_BINFO): New macro.
19629         (BINFO_NEW_VTABLE_MARKED): Use it.
19630         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
19631         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
19632         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
19633         not TREE_TYPE.
19634         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
19635         (build_secondary_vtable): Likewise.
19636         (dfs_finish_vtbls): Likewise.
19637         (dfs_accumulate_vtbl_inits): Likewise.
19638         (accumulate_vtbl_inits): New function.
19639         (finish_vtbls): Make sure that virtual bases come after
19640         non-virtual bases in the vtable group.
19641         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
19642         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
19643         * search.c (struct vbase_info): Move definition.
19644         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
19645         (unmarked_new_vtable_p): Likewise.
19646         (dfs_mark_vtable_path): Remove.
19647         (dfs_mark_new_vtable): Remove.
19648         (dfs_unmark_new_vtable): Likewise.
19649         (dfs_clear_search_slot): Likewise.
19650         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
19651         (dfs_clear_vbase_slots): Likewise.
19652         (init_vbase_pointers): LIkewise.
19654 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
19656         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
19657         SIZETYPE to a non-SIZETYPE.
19659 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
19661         * class.c (layout_virtual_bases): Adjust names in conditionally
19662         compiled code.
19664         * class.c (record_base_offsets): New function.
19665         (layout_conflict_p): Likewise.
19666         (layout_nonempty_base_or_field): Use it.
19667         (layout_empty_base): New function.
19668         (build_base_field): Use it.
19669         (build_base_fields): Update comment.
19670         (layout_virtual_bases): Fold in a little code form
19671         layout_basetypes.  Use layout_empty_base.
19672         (layout_basetypes): Remove.
19673         (end_of_class): New function.
19674         (layout_class_type): Use it.  Adjust.
19676         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
19677         (fntype_p): Remove.
19678         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
19679         comment.
19680         (dfs_skip_nonprimary_vbases_markedp): Likewise.
19681         * typeck.c (fntype_p): Remove.
19683         * cp-tree.h (TI_SPEC_INFO): Remove.
19684         (CLASSTYPE_TI_SPEC_INFO): Likewise.
19685         * pt.c (process_partial_specialization): Likewise.
19687         * class.c (build_base_field): Fix thinko in computation of binfo
19688         offsets.
19690         * tree.c (mark_local_for_remap_p): Mark variables declared in
19691         TARGET_EXPRs as well.
19693 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
19695         * typeck.c (require_complete_type, complete_type,
19696         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
19697         build_array_ref, convert_arguments, pointer_diff,
19698         build_x_unary_op, build_unary_op, build_c_cast,
19699         build_modify_expr): Use COMPLETE_TYPE_P etc.
19700         * call.c (is_complete, convert_like_real,
19701         build_new_method_call): Likewise.
19702         * class.c (build_vbase_pointer_fields, check_bases,
19703         build_base_field, finish_struct_1, pushclass): Likewise.
19704         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
19705         * decl.c (maybe_process_template_type_declaration, pushtag,
19706         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
19707         layout_var_decl, check_initializer, cp_finish_decl,
19708         grokdeclarator, require_complete_types_for_parms,
19709         grok_op_properties, xref_tag, xref_basetypes,
19710         check_function_type): Likewise.
19711         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
19712         * friend.c (do_friend): Likewise.
19713         * init.c (build_offset_ref): Likewise.
19714         * parse.y (structsp): Likewise.
19715         * pt.c (maybe_process_partial_specialization,
19716         tsubst_friend_function, instantiate_class_template, tsubst,
19717         do_type_instantiation, instantiate_pending_templates): Likewise.
19718         * repo.c (repo_get_id): Likewise.
19719         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
19720         synthesize_tinfo_var, emit_support_tinfos): Likewise.
19721         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
19722         * semantics.c (begin_class_definition): Likewise.
19723         * tree.c (build_cplus_method_type): Likewise.
19724         * typeck2.c (digest_init, build_functional_cast,
19725         add_exception_specifier): Likewise.
19726         * parse.h, parse.c: Regenerated.
19728 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
19730         * inc/cxxabi.h: New header file. Define new-abi entry points.
19731         (__pointer_type_info::target): Rename member to ...
19732         (__pointer_type_info::type): ... here.
19733         (__base_class_info::type): Rename member to ...
19734         (__base_class_info::base): ... here.
19735         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
19736         * cp-tree.h (CPTI_ABI): New global tree enumeration.
19737         (abi_node): New global tree node.
19738         * decl.c (abi_node): Document.
19739         (init_decl_processing): Initialize abi_node.
19740         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
19741         (get_vmi_pseudo_type_info): Likewise.
19742         (create_tinfo_types): Likewise.
19743         (emit_support_tinfos): Likewise.
19744         * tinfo.h (cxxabi.h): Include for new-abi.
19745         Move rtti class definitions to new header file.
19746         * tinfo.cc (abi): Use the namespace.
19747         (std): Move new abi rtti classes from here ...
19748         (__cxxabiv1): ... to here.
19749         * tinfo2.cc (cxxabi.h): Include for new-abi.
19750         Move rtti class definitions to new header file.
19751         (std): Move new abi rtti classes from here ...
19752         (__cxxabiv1): ... to here.
19753         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
19754         namespace.
19756 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
19757             Jason Merrill  <jason@casey.cygnus.com>
19759         * method.c (build_overload_int): Use host_integerp.
19761 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
19763         * init.c (build_offset_ref): Handle the case of a templated member
19764         function.
19766 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
19768         * except.c (expand_exception_blocks): Clear catch_clauses_last.
19770 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
19772         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
19773         * class.c (check_bitfield_decl): Turn illegal bitfields into
19774         non-bitfields.
19775         (dfs_propagate_binfo_offsets): Adjust for new size_binop
19776         semantics.
19777         (dfs_offset_for_unshared_vbases): Likewise.
19778         * cvt.c (cp_convert_to_pointer): Convert NULL to a
19779         pointer-to-member correctly under the new ABI.
19780         * expr.c (cplus_expand_constant): Don't use cp_convert when
19781         turning an offset into a pointer-to-member.
19782         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
19783         when dereferencing them under the new ABI.
19784         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
19785         of pointers-to-members under the new ABI.
19787         * class.c (check_bitfield_decl): Remove restriction on really long
19788         bitfields.
19789         (layout_class_type): Implement new ABI handling of bitfields
19790         longer than their types.
19792 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
19794         * parse.y (extdefs): Call ggc_collect.
19795         * parse.c: Regenerated.
19797 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
19799         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
19800         (note_name_declared_in_class): Use OVL_CURRENT to get at a
19801         potential overload.
19803 2000-03-17  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19805         * class.c (build_vbase_path): Use integer_zerop.
19806         (build_vtable_entry): Use tree_low_cst.
19807         (get_vfield_offset): Use bit_position.
19808         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
19809         Use tree_low_cst.
19810         (check_bitfield_decl): Set DECL_SIZE using convert.
19811         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
19812         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
19813         Use tree_low_cst.
19814         (finish_struct_1): Use bit_position.
19815         (dump_class_hierarchy): Use tree_low_cst.
19816         * cp-tree.h (min_precision): Add declaration.
19817         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
19818         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
19819         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
19820         * expr.c (cplus_expand_constant): Use bit_position.
19821         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
19822         * rtti.c (get_base_offset): Use bit_position.
19823         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
19824         host_integerp, and tree_low_cst.
19825         (pointer_int_sum): Use integer_zerop.
19826         (build_component_addr): Use bit_position.
19828 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
19830         * typeck.c (require_complete_type): Don't assume size_zero_node.
19831         (complete_type_or_else): Likewise.
19833 2000-03-16  Steven Grady <grady@digitaldeck.com>
19834             Jason Merrill  <jason@casey.cygnus.com>
19836         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
19838 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
19840         * decl2.c (grokfield): Bail out if type is error_mark_node.
19842 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
19844         * tinfo2.cc (__ptr_to_member_data): Rename to ...
19845         (__pointer_to_member_data): ... here. Adjust.
19846         * rtti.c (create_tinfo_types): Adjust.
19848 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
19850         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
19851         * decl.c (ref_desc_type_node): Undocument.
19852         * rtti.c (ptr_ref_initializer): Rename to ...
19853         (ptr_initializer): ... here. Adjust comments.
19854         (ptmd_initializer): Fix comment thinko.
19855         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
19856         (create_tinfo_types): Remove ref_desc_type_node init.
19857         * tinfo2.cc (__reference_type_info): Remove.
19859 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
19861         * decl.c (cp_finish_decl): Remove obsolete comment.
19863         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
19865 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
19867         * cp-tree.h: Tweak documentation.
19868         * class.c (build_vbase_pointer_fields): Layout the fields, too.
19869         (avoid_overlap): Remove.
19870         (get_binfo_offset_as_int): New function.
19871         (dfs_serach_base_offsets): Likewise.
19872         (layout_nonempty_base_or_field): Likewise.
19873         (build_base_field): Layout fields here.  Avoid placing two objects
19874         of the same type at the same address, under the new ABI.
19875         (build_base_fields): Adjust accordingly.
19876         (create_vtable_ptr): Return the new field, but don't attach it to
19877         TYPE_FIELDS.
19878         (remove_base_field): Remove.
19879         (remove_base_fields): Remove.
19880         (layout_basetypes): Adjust accordingly.
19881         (layout_class_type): Call layout_field for each field, rather than
19882         just making a wholesale call to layout_type.
19884 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
19886         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
19888 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
19890         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
19892         * except.c (dtor_nothrow): New fn.
19893         (do_pop_exception): Use it.  Take type parm.
19894         (push_eh_cleanup): Take type parm.
19895         (expand_start_catch_block): Pass it.
19896         (build_eh_type_type_ref): Accept null type.
19898 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
19900         * cp-tree.h (revert_static_member_fn): Change prototype.
19901         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
19902         (grok_op_properties): Likewise.
19903         (start_function): Likewise.
19904         (revert_static_member_fn): Simplify.
19905         * pt.c (check_explicit_specialization): Adjust call to
19906         revert_static_member_fn.
19908 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
19910         * cp-tree.h (scope_kind): New type.
19911         (tmpl_spec_kind): Likewise.
19912         (declare_pseudo_global_level): Remove.
19913         (pseudo_global_level_p): Rename to template_parm_scope_p.
19914         (pushlevel): Remove declaration.
19915         (begin_scope): New function.
19916         (finish_scope): Likewise.
19917         (current_tmpl_spec_kind): Likewise.
19918         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
19919         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
19920         Add template_spec_p.
19921         (toplevel_bindings_p): Adjust.
19922         (declare_pseudo_global_level): Remove.
19923         (pseudo_global_level_p): Rename to template_parm_scope_p.
19924         (current_tmpl_spec_kind): New function.
19925         (begin_scope): Likewise.
19926         (finish_scope): Likewise.
19927         (maybe_push_to_top_level): Adjust.
19928         (maybe_process_template_type_declaration): Likewise.
19929         (pushtag): Likewise.
19930         (pushdecl_nonclass_level): Likewise.
19931         (lookup_tag): Likewise.
19932         (grokfndecl): Handle member template specializations.  Share
19933         constructor and non-constructor code.
19934         * decl2.c (check_classfn): Handle member template specializations.
19935         * pt.c (begin_template_parm_list): Use begin_scope.
19936         (begin_specialization): Likewise.
19937         (end_specialization): Likewise.
19938         (check_explicit_specialization): Use current_tmpl_spec_kind.
19939         Handle member template specializations.
19940         (end_template_decl): Use finish_scope.  Remove call to
19941         get_pending_sizes.
19942         (push_template_decl_real): Remove bogus error message.
19943         (tsubst_decl): Fix typo in code contained in comment.
19944         (instantiate_template): Handle member template specializations.
19945         (most_general_template): Likewise.
19947 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
19949         * lex.c (whitespace_cr): Compress consecutive calls to warning().
19950         (do_identifier): Ditto for error().
19952         * pt.c (convert_nontype_argument): Ditto for cp_error().
19953         (convert_template_argument): Ditto for cp_pedwarn().
19955 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
19957         * exception.cc (__check_null_eh_spec): New fn.
19958         * except.c (expand_end_eh_spec): Call it if the spec is throw().
19960 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
19962         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
19963         * except.c (expand_end_eh_spec): Add the return type.
19964         * rtti.c (throw_bad_cast): Add the parmtypes.
19965         (throw_bad_typeid): Likewise.
19967         * semantics.c (expand_stmt): Only leave out rtl for unused
19968         artificials, and set DECL_IGNORED_P on them as well.
19969         * decl.c (wrapup_globals_for_namespace): Likewise.
19971 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
19973         * decl.c (maybe_commonize_var): Skip all artificial decls.
19974         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
19976 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
19978         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
19979         * cp-tree.h: Declare flag_enforce_eh_specs.
19980         * decl.c (store_parm_decls, finish_function): Check it.
19982         C library functions don't throw.
19983         * Makefile.in (cfns.h): New target.
19984         (except.o): Depend on it.
19985         * Make-lang.in (cc1plus): Depend on cfns.gperf.
19986         * cfns.gperf: New file.
19987         * cfns.h: Generated.
19988         * except.c: Include it.
19989         (nothrow_libfn_p): New fn.
19990         * decl.c (grokfndecl): Use it.
19991         * cp-tree.h: Declare it.
19993         * decl.c (push_overloaded_decl_1, auto_function,
19994         define_function): Lose.
19995         (build_library_fn_1): New static fn.
19996         (builtin_function): Use it.
19997         (get_atexit_node): Use build_library_fn_ptr.
19998         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
19999         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
20000         push_void_library_fn, push_throw_library_fn): New fns.
20001         * cp-tree.h: Declare them.
20002         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
20003         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
20004         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
20005         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
20006         * rtti.c (build_runtime_decl): Lose.
20007         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
20008         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
20009         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
20011         * call.c (build_call): Remove result_type parm.
20012         Call mark_used on unused artificial fns.
20013         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
20015 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
20017         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
20018         appropriate.
20019         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
20020         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
20021         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
20022         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
20023         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
20024         expand_generic_desc): Likewise.
20026 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
20028         * exception.cc (__cp_pop_exception): Cleanup the original object.
20030 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
20032         * decl.c (grok_op_properties): Merge conversion to void warning
20033         with other silly op warnings.
20035 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
20037         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
20038         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
20040 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
20042         * decl.c (cp_make_fname_decl): New function.
20043         (wrapup_globals_for_namespace): Don't emit unused static vars.
20044         (init_decl_processing): Remove comment about use of
20045         array_domain_type. Set make_fname_decl.
20046         (cp_finish_decl): Remove __FUNCTION__ nadgering.
20047         * semantics.c (begin_compound_stmt): Remove
20048         current_function_name_declared flagging.
20049         (expand_stmt): Don't emit unused local statics.
20050         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
20051         specially.
20053 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
20055         * typeck.c (convert_for_assignment): Don't look at array
20056         initializer.
20057         * call.c (convert_like_real): Likewise.
20059 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
20061         Add initial support for '\uNNNN' specifier.
20062         * lex.c (read_ucs): New fn.
20063         (readescape, skip_white_space): Call it.
20064         (is_extended_char, is_extended_char_1): New fns.
20065         (utf8_extend_token): New fn, #if 0'd out.
20066         (real_yylex): Treat extended chars like letters.
20068         * search.c (note_debug_info_needed): Walk the bases even if we
20069         weren't deferring the type itself.
20071 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
20073         * decl2.c (finish_objects): Constify a char*.
20075         * method.c (emit_thunk): Likewise.
20077 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
20079         * typeck.c (dubious_conversion_warnings): Look through
20080         REFERENCE_TYPE.
20082 2000-03-06  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
20084         * class.c (dfs_modify_vtables): I is now unsigned.
20085         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
20086         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
20087         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
20088         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
20089         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
20090         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
20091         Call integer_all_onesp.
20092         * typeck2.c (process_init_constructor): Use compare_tree_int.
20094         * lang-specs.h (as): Don't call if -syntax-only.
20096 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
20098         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
20099         RTL_EXPR_HAS_NO_SCOPE after all.
20101 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
20103         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
20104         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
20105         RTL_EXPR_HAS_NO_SCOPE.
20107         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
20108         later.
20110         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
20112 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
20114         * call.c (convert_like): Macrofy.
20115         (convert_like_with_context): New macro.
20116         (convert_like_real): Renamed from convert_like.  Add calling
20117         context parameters, for diagnostics. Add recursive flag.  Call
20118         dubious_conversion_warnings for outer conversion.
20119         (build_user_type_conversion): Use convert_like_with_context.
20120         (build_over_call): Likewise. Don't warn about dubious
20121         conversions here. Adjust convert_default_arg calls.
20122         (convert_default_arg): Add context parameters for diagnostics.
20123         Pass through to convert_like_with_context.
20124         * cp-tree.h (convert_default_arg): Add context parameters.
20125         (dubious_conversion_warnings): Prototype new function.
20126         * typeck.c (convert_arguments): Adjust convert_default_arg call.
20127         (dubious_conversion_warnings): New function, broken
20128         out of convert_for_assignment.
20129         (convert_for_assignment): Adjust.
20131 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
20133         * decl2.c (key_method): Break out from...
20134         (import_export_vtable, import_export_class): ...here.
20136         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
20137         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
20139         * search.c (note_debug_info_needed, dfs_debug_mark,
20140         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
20141         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
20143 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
20145         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
20146         typos.
20148 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
20150         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
20151         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
20152         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
20153         (lang_type): Split gets_new into has_new and has_array_new.
20154         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20155         (TYPE_GETS_NEW): Split into ...
20156         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
20157         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
20158         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
20159         (build_op_new_call): Don't declare.
20160         (build_new_1): Likewise.
20161         * call.c (build_op_new_call): Remove.
20162         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
20163         instead of TYPE_NEEDS_DESTRUCTOR.
20164         (finish_struct_bits): Likewise.
20165         (add_implicitly_declared_members): Likewise.
20166         (check_field_decl): Likewise.
20167         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
20168         correctly under the new ABI.
20169         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
20170         instead of TYPE_NEEDS_DESTRUCTOR.
20171         (initialize_local_var): Likewise.
20172         (destroy_local_var): Likewise.
20173         (cp_finish_decl): Likewise.
20174         (register_dtor_fn): Likewise.
20175         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
20176         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
20177         TYPE_VEC_DELETE_TAKES_SIZE here.
20178         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
20179         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
20180         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20181         (finish_destructor_body): Likewise.
20182         (maybe_build_cleanup_1): Likewise.
20183         * decl2.c (do_static_destruction): Likewise.
20184         * init.c (build_new_1): Make it static.
20185         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20186         (expand_cleanup_for_base): Likewise.
20187         (get_cookie_size): New function.
20188         (build_new_1): Handle array-new cookies correctly under the new
20189         ABI.
20190         (build_vec_delete_1): Likewise.
20191         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20192         (build_delete): Likewise.
20193         (build_vec_delete): Handle array-new cookies correctly under the new
20194         ABI.
20195         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20196         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
20197         TYPE_HAS_ARRAY_NEW_OPERATOR.
20198         * ptree.c (print_lang_type): Check them.
20199         * search.c (context_for_name_lookup): Fix typo in comment.
20200         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20201         * tree.c (break_out_cleanups): Likewise.
20202         (build_cplus_array_test_1): Likewise.
20203         (cp_build_qualified_type_real): Likewise.
20204         * typeck.c (complete_type): Likewise.
20206         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
20207         the command-line, not the end.
20209 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
20211         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
20213 2000-03-02  Tom Tromey  <tromey@cygnus.com>
20215         * cp-tree.h (build_java_class_ref): Declare.
20216         * init.c (build_java_class_ref): No longer static.
20217         * except.c (expand_throw): Generate a Java-style `throw' if the
20218         thrown object is a "Java" object.
20219         (initialize_handler_parm): Generate a Java-style lookup of
20220         exception info if the caught object is a "Java" object.
20221         (catch_language, catch_language_init): New globals.
20222         (decl_is_java_type): New function.
20223         (expand_start_catch_block): Don't call push_eh_info() or
20224         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
20225         class reference to build_catch_block.
20227 2000-03-02  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
20229         * typeck.c (comptypes): Treat sizetype like its language equivalent.
20231 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
20233         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
20234         to merge reference/pointer code and fix incorrect warnings.
20236 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
20238         * search.c (protected_accessible_p): Use context_for_name_lookup.
20240         * init.c (construct_virtual_bases): Fix thinko.
20241         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
20243 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
20245         * decl.c (current_function_decl): Move to toplev.c.
20247 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
20249         * pt.c (fn_type_unification): Unify return type, whenever
20250         provided.
20251         (get_bindings_real): Only pass return type when necessary.
20252         Remove explicit return type check.
20253         * class.c (resolve_address_of_overloaded_function): Pass desired
20254         return type to fn_type_unification.
20256 2000-02-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
20258         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
20259         DECL_FIELD_SIZE.
20260         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
20261         DECL_FIELD_SIZE.
20262         * rtti.c (expand_class_desc): Likewise.
20263         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
20264         (THUNK_VCALL_OFFSET): Likewise.
20265         (THUNK_DELTA): Reflect changes in ../tree.h.
20267 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
20269         * search.c (protected_accessible_p): Also allow the access if
20270         the member is public in DERIVED.  Lose TYPE parm.
20271         (friend_accessible_p): Lose TYPE parm.
20272         (accessible_p): Adjust.
20274 2000-02-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
20276         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
20277         on things that are not sizes; ssize_binop deleted.
20278         Call size_diffop when appropriate.
20279         (dfs_build_vcall_offset_vtbl_entries): Likewise.
20280         (build_primary_vtable, build_secondary_vtable): Likewise.
20281         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
20282         Variable I is HOST_WIDE_INT.
20283         (get_vfield_offset): Pass proper types to size_binop.
20284         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
20285         (finish_struct_1): Likewise.
20286         (skip_rtti_stuff): Arg N is now pointer to signed.
20287         (layout_class_type): Use size_zero_node.
20288         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
20289         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
20290         * decl.c (complete_arry_type): Pass proper types to size_binop.
20291         (xref_basetypes): BINFO_OFFSET is sizetype.
20292         * error.c (dump_expr): Don't use size_binop non-sizes.
20293         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
20294         * init.c (construct_virtual_bases): Fix type error.
20295         (build_vec_delete_1): Pass proper type to size_binop and don't
20296         fold result.
20297         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
20298         * rtti.c (get_base_offset): Pass proper type to size_binop.
20299         * search.c (dfs_find_vbases): Fix type error.
20300         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
20301         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
20302         * tree.c (debug_binfo): Variable N is signed.
20303         Use HOST_WIDE_INT_PRINT_DEC.
20304         * typeck.c (comptypes): sizetype is same as equivalent integer type.
20305         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
20306         size_one_node and size_zero_node.
20307         (c_alignof): Use size_one_node.
20308         (build_component_addr): Pass proper types to size_binop.
20309         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
20311 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
20313         Implement class scope using-declarations for functions.
20314         * class.c (handle_using_decl): Call add_method for used functions.
20315         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
20316         (add_method): Used functions are hidden by local functions.
20317         (check_bases_and_members): Handle using-decls before finalizing
20318         CLASSTYPE_METHOD_VEC.
20319         * call.c (add_function_candidate): Add ctype parm; if nonzero,
20320         override the type of 'this' accordingly.
20321         (add_template_candidate, add_template_candidate_real): Add ctype parm.
20322         (convert_class_to_reference, build_user_type_conversion_1,
20323         build_new_function_call, build_object_call, build_new_op,
20324         build_new_method_call): Pass ctype parm.
20326         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
20327         the baselink.
20328         * call.c (convert_class_to_reference, build_user_type_conversion_1,
20329         build_new_function_call, build_object_call, build_new_op,
20330         build_new_method_call, build_op_delete_call): Don't get basetype_path
20331         from a baselink.
20332         * typeck.c (build_component_ref): Likewise.
20333         * init.c (build_offset_ref): Likewise.
20334         (resolve_offset_ref): Don't call enforce_access.
20335         Call build_scoped_ref.
20336         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
20337         would cause an error or if -pedantic.
20338         * class.c (alter_access): Lose binfo parm.
20340 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
20342         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
20343         types.
20345 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
20347         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
20348         pseudo_type_info creation into the std namespace
20350 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
20352         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
20353         (import_export_class): Remove declaration.
20354         * decl2.c (import_export_class): Make it static.
20355         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
20356         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
20357         EXPR_WITH_FILE_LOCATION.
20358         * lex.c (check_newline): Tweak filename/lineno setting.
20359         * semantics.c (begin_while_stmt): Fix typo in comment.
20361 2000-02-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
20363         * lang-options.h (-fmessage-length=): Add missing option.
20365         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
20367 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
20369         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
20371 2000-02-25  Jim Wilson  <wilson@cygnus.com>
20373         * optimize.c (expand_call_inline): Emit the return label before
20374         evaluating the return value.
20376 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
20378         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
20379         than duplicating functionality here.
20380         * optimize.c: Include input.h.
20381         (expand_call_inline): Use push_srcloc and pop_srcloc.
20382         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
20383         * parse.c: Regenerated.
20384         * Makefile.in (lex.o): Depend on input.h.
20385         (optimize.o): Likewise.
20387 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
20389         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
20390         function type, rather than ICE.
20392 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
20394         * decl.c (grokdeclarator): Call decl_type_access_control.
20395         * parse.y (parse_end_decl): Don't call decl_type_access_control if
20396         decl is null.
20398 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
20400         * decl.c (decls_match): Remove obsolete static member nadgering.
20402 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
20404         * decl.c (grokdeclarator): Change ANSI to ISO.
20405         * lex.c (consume_string, readescape, do_identifier): Likewise.
20406         (parse_float, real_yylex): Likewise.
20407         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
20408         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
20409         new_type_id, maybe_label_decls, simple_stmt,
20410         for.init.statement): Likewise.
20411         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
20412         * semantics.c (finish_named_return_value): Likewise.
20413         * parse.c: Regenerate.
20415 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
20417         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
20418         (CPTI_CLASS_STAR_TYPE): Remove.
20419         (vtable_index_type): Likewise.
20420         (class_star_type_node): Remove.
20421         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
20422         (build_binary_op_nodefault): Remove.
20423         * call.c (build_new_op): Use build_binary_op instead of
20424         build_binary_op_nodefault.
20425         * decl.c (init_decl_processing): Remove class_star_type_node
20426         initialization.  Make delta_type_node ptrdiff_type_node under the
20427         new ABI.  Initialize vtable_index_type.
20428         (build_ptrmemfunc_type): Build different structures for the new
20429         ABI.
20430         (build_enumerator): Use build_binary_op instead of
20431         build_binary_op_nodefault.
20432         * method.c (build_overload_value): Mangle pointers-to-members
20433         appropriately under the new ABI.
20434         * typeck.c (build_array_ref): Use build_binary_op instead of
20435         build_binary_op_nodefault.
20436         (get_member_function_from_ptrfunc): Adjust for the new ABI.
20437         (build_binary_op_nodefault): Rename to ...
20438         (build_binary_op): ... this.  Remove old version.  Adjust for
20439         pointer-to-member comparisons under the new ABI.
20440         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
20441         (build_ptrmemfunc): Adjust for the new ABI.
20442         (expand_ptrmemfunc_cst): Likewise.
20443         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
20444         (pfn_from_ptrmemfunc): Adjust for the new ABI.
20446 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
20448         * call.c (build_object_call): Compress consecutive calls to
20449         cp_error.
20450         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
20451         (build_op_delete_call): Adjust message formatting.
20453         * class.c (check_bases): Compress consecutive calls to
20454         cp_pedwarn.
20455         (finish_struct_anon): Say 'ISO C++'.
20457         * decl.c (start_decl): Same here.
20458         (grok_reference_init): Likewise.
20459         (grokfndecl): Correct message formatting.
20460         (grokfndecl): Improve diagnostic.
20461         (check_static_variable_definition): Likewise. Say 'ISO C++'
20462         (compute_array_index_type): Say 'ISO C++'
20463         (create_array_type_for_decl): Compress consecutive calls to
20464         cp_error.
20465         (grokdeclarator): Say 'ISO C++'
20466         (grok_op_properties): Likewise.
20468         * decl2.c (delete_sanity): Clairify diagnostic.
20469         (check_member_template): Same here.
20470         (grok_function_init): Use consistent terminology.
20472         * expr.c (do_case): Say 'ISO C++'
20474         * friend.c (do_friend): Compress consecutive calls to warning.
20476 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
20478         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
20479         * class.c (build_secondary_vtable): Reorganize.  Don't create a
20480         new vtable under the new ABI.
20481         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
20482         computing the size.
20483         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
20484         the initializing elements.
20485         (initialize_vtable): New function.
20486         (dfs_finish_vtbls): Use it.
20487         (dfs_accumulate_vtbl_inits): New function.
20488         (finish_vtbls): Merge primary and secondary vtables under the new
20489         ABI.
20490         (finish_struct_1): Remove redundant call to layout_vtable_decl.
20491         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
20492         aren't VAR_DECLs.
20494         * class.c (build_vtable): New function, split out from ...
20495         (get_vtable_decl): ... here, and ...
20496         (build_secondary_vtable): ... here.
20498         * pt.c (tsubst_decl): Fix formatting.
20500 2000-02-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
20502         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
20503         (avoid_overlap, build_base_field): Likewise.
20504         (build_base_field, build_base_fields, is_empty_class):
20505         Test DECL_SIZE with integer_zero.
20506         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
20507         * cp-tree.h (struct lang_type): New field size_unit.
20508         (CLASSTYPE_SIZE_UNIT): New macro.
20509         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
20510         (cp_finish_decl): Delete -Wlarger-than processing.
20511         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
20512         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
20513         * tree.c (make_binfo): binfo vector is one entry longer.
20514         (walk_tree): Walk DECL_SIZE_UNIT.
20516 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
20518         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
20519         comment.
20520         (build_vtable_entry): Don't assume all vtable entries are
20521         functions.
20522         (build_vtbl_initializer): Adjust accordingly.
20523         (get_vtable_decl): Fix formatting.
20525 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
20527         * semantics.c (deferred_type_access_control): Walk the entire
20528         type_lookups list.
20529         (save_type_access_control): Rename from
20530         initial_deferred_type_access_control.  Just remember the value.
20531         (decl_type_access_control): New fn.
20532         (begin_function_definition): Use deferred_type_access_control, after
20533         we've started the function.  Set type_lookups to error_mark_node.
20534         * parse.y (frob_specs, fn.def1): Adjust.
20535         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
20536         (parse_end_decl, parse_bitfield0, parse_method): New fns.
20537         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
20538         (after_type_component_declarator0): Likewise.
20539         (after_type_component_declarator): Likewise.
20540         (notype_component_declarator): Likewise.
20541         * cp-tree.h: Adjust.
20543         * decl.c (redeclaration_error_message): Allow redeclaration of
20544         namespace-scope decls.
20546 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
20548         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
20550 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
20552         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
20553         * decl2.c (grokclassfn): Likewise.
20555         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
20557         * decl2.c (lang_decode_option): Don't set default message length
20558         here.
20559         * lex.c (lang_init_options): Set it here.
20561 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
20563         Make DECL_CONTEXT mean the class in which a member function was
20564         declared, even for a virtual function.
20565         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
20566         (DECL_FRIEND_CONTEXT): New macro.
20567         (DECL_REAL_CONTEXT): Remove.
20568         (SET_DECL_FRIEND_CONTEXT): Likewise.
20569         (DECL_VIRTUAL_CONTEXT): Adjust.
20570         (DECL_CLASS_SCOPE_P): Use TYPE_P.
20571         (add_friends): Remove.
20572         (hack_decl_function_context): Likewise.
20573         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
20574         CP_DECL_CONTEXT.
20575         (build_over_call): Fix indentation.  Use DECL_CONTEXT
20576         instead of DECL_CLASS_CONTEXT.
20577         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
20578         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
20579         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20580         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
20581         (build_base_field): Likewise.
20582         (finish_struct_1): Likewise.
20583         (build_self_reference): Likewise.
20584         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
20585         DECL_REAL_CONTEXT.
20586         (pushtag): Use decl_function_context, not
20587         hack_decl_function_context.
20588         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
20589         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
20590         (pushdecl): Remove bogus code.
20591         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
20592         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
20593         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20594         Use decl_function_context, nothack_decl_function_context.
20595         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
20596         (grokdeclarator): Likewise.  Use decl_function_context, not
20597         hack_decl_function_context.
20598         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
20599         (start_function): Use DECL_FRIEND_CONTEXT, not
20600         DECL_CLASS_CONTEXT.  Use decl_function_context, not
20601         hack_decl_function_context.
20602         (finish_function): Use decl_function_context, not
20603         hack_decl_function_context.
20604         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
20605         DECL_CLASS_CONTEXT.
20606         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
20607         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
20608         (grokfield): Likewise.
20609         (finish_builtin_type): Likewise.
20610         (finish_vtable_vardec): Use decl_function_context, not
20611         hack_decl_function_context.
20612         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20613         (start_static_initialization_or_destruction): Likewise.
20614         (finish_static_initialization_or_destruction): Likewise.
20615         (mark_used): Adjust logic for deciding when to synthesize methods.
20616         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
20617         DECL_REAL_CONTEXT.
20618         * error.c (dump_function_decl): Use DECL_CONTEXT, not
20619         DECL_CLASS_CONTEXT.
20620         * friend.c (is_friend): Likewise.
20621         (add_friends): Remove.
20622         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
20623         * lex.c (begin_definition_of_inclass_inline): Use
20624         decl_function_context, not hack_decl_function_context.
20625         (process_next_inline): Likewise.
20626         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
20627         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
20628         DECL_CLASSS_CONTEXT.
20629         (hack_identifier): Likewise.
20630         (synthesize_method):  Use decl_function_context, not
20631         hack_decl_function_context.
20632         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
20633         DECL_REAL_CONTEXT.
20634         (is_member_template): Use decl_function_context, not
20635         hack_decl_function_context.  Use DECL_CONTEXT, not
20636         DECL_CLASS_CONTEXT.
20637         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
20638         DECL_CLASS_CONTEXT.
20639         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
20640         DECL_REAL_CONTEXT.
20641         (push_template_decl_real): Likewise.
20642         (instantiate_class_template): Don't call add_friends.
20643         (tsubst_default_argument): Use DECL_CONTEXT, not
20644         DECL_REAL_CONTEXT.
20645         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
20646         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20647         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
20648         DECL_CLASS_CONTEXT.
20649         * repo.c (repo_inline_used): Likewise.
20650         * search.c (current_scope): Adjust for new _CONTEXT macros.
20651         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
20652         DECL_REAL_CONTEXT.
20653         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20654         (lookup_fnfields_here):Likewise.
20655         (check_final_overrider): Likewise.
20656         (init_vbase_pointers): Likewise.
20657         (virtual_context): Likewise.
20658         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
20659         (expand_body): Use decl_function_context, not
20660         hack_decl_function_context.
20661         * tree.c (hack_decl_function_context): Remove.
20662         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
20663         DECL_CLASS_CONTEXT.
20664         * typeck2.c (error_not_base_type): Likewise.
20666 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
20668         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
20670 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
20672         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
20674 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
20676         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
20678 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
20680         * decl2.c (lang_decode_option): Enable automatic line wrapping.
20682 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
20684         * parse.y (frob_specs): Split out...
20685         (parse_decl): From here.
20686         (fn.def2): Call initial_deferred_type_access_control.
20687         (after_type_component_declarator0): Call frob_specs.
20688         (notype_component_declarator0): Likewise.
20689         * search.c (friend_accessible_p): Nested classes are friends of their
20690         enclosing classes.
20692 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
20694         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
20695         used to create an implicit temporary.
20697         * class.c (dfs_modify_vtables): Tweak calculation of functions to
20698         override.
20700 2000-02-08  Nathan Sidwell  <nathan@acm.org>
20702         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
20703         strip array element qualifiers too.
20705 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
20707         * decl.c (store_parm_decls): Don't build cleanups for parameters
20708         while processing_template_decl.
20710 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
20712         * cp-tree.h (struct saved_scope): Add incomplete field.
20713         (namespace_scope_incomplete): New macro.
20714         * decl.c (pushdecl): Use it.
20715         (hack_incomplete_structures): Use it.  See through artificial
20716         binding levels.
20717         (mark_saved_scope): Mark it.
20719         Implement access control for nested types.
20720         * search.c (type_access_control): New fn.
20721         (accessible_p): Now we do perform access control for types.
20722         * semantics.c (deferred_type_access_control): New fn.
20723         (initial_deferred_type_access_control): New fn.
20724         (begin_function_definition): Call it.  Add lookups parm.
20725         * decl.c (struct binding_level): Add this_class field.
20726         (pushlevel_class): Set it.
20727         (mark_binding_level): Mark it.
20728         (lookup_name_real): Use it.  Call type_access_control.
20729         (mark_saved_scope): Mark lookups field.
20730         * cp-tree.h (flagged_type_tree): Add lookups field.
20731         (struct saved_scope): Add lookups field.
20732         (type_lookups): New macro.
20733         * parse.y (declmods): Now <ftype>.
20734         (parse_decl): Add lookups parm.  Call
20735         initial_deferred_type_access_control.
20736         (lang_extdef): Clear type_lookups.
20737         (typed_declspecs, declmods, typespec): Set lookups field.
20738         (initdcl): Call deferred_type_access_control.
20739         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
20740         component_decl_1, named_parm): Adjust.
20741         * friend.c (is_friend): Nested classes are friends of their
20742         enclosing classes.
20744         * class.c (currently_open_derived_class): New fn.
20745         * method.c (hack_identifier): Use it.
20747         * lex.c (do_identifier): Remove obsolete code.
20749         * parse.y (typed_typespecs): Propagate new_type_flag properly.
20751 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
20753         * tinfo.h: Remove apostrophes from C++ comment (xgettext
20754         thinks this file is plain C).
20756 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
20758         * Makefile.in (call.o): Depend on $(EXPR_H).
20760         * call.c: Include "expr.h".
20762         * class.c (dump_class_hierarchy): Add prototype.
20764         * search.c (dfs_get_pure_virtuals): Likewise.
20766 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
20768         * parse.y (simple_stmt): Allow :: token in asm parameter list.
20769         * parse.c: Rebuilt.
20771 2000-01-31  Jim Wilson  <wilson@cygnus.com>
20773         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
20774         Store it in DECL_FCONTEXT.
20775         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
20777 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
20779         * tinfo.h (old abi): #include "tconfig.h".
20780         * tinfo.cc (convert_to_base): Move into old abi section.
20782 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
20784         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
20785         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
20786         (BINFO_PRIMARY_BINFO): New macro.
20787         (BF_DELTA): Rename to ...
20788         (BV_DELTA): ... this.
20789         (BF_VCALL_INDEX): Rename to ...
20790         (BV_VCALL_INDEX): ... this.
20791         (BF_FN): Rename to ...
20792         (BV_FN): ... this.
20793         * class.c (build_vbase_path): Adjust for changes to reverse_path.
20794         (set_rtti_entry): Rename BF_ macros to BV_ variants.
20795         (modify_vtable_entry): Simplify.
20796         (add_virtual_function): Rename BF_ macros to BV_ variants.
20797         (build_vtable_initializer): Likewise.
20798         (get_class_offset_1): Remove.
20799         (dfs_get_class_offset): Likewise.
20800         (get_class_offset): Likewise.
20801         (dfs_find_final_overrider): New function.
20802         (find_final_overrider): Likewise.
20803         (modify_one_vtable): Remove.
20804         (dfs_find_base): New function.
20805         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
20806         find_final_overrider.
20807         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
20808         virtuals.
20809         (dfs_fixup_vtable_deltas): Remove.
20810         (override_one_vtable): Remove.
20811         (merge_overrides): Likewise.
20812         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
20813         unreal chilren of virtual bases.
20814         (finish_struct_1): Don't use merge_overrides.  Don't use
20815         dfs_fixup_vtable_deltas.
20816         * tree.c (reverse_path): Return a TREE_LIST, not a chain of
20817         BINFOs.
20819 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
20820             Jason Merrill  <jason@yorick.cygnus.com>
20822         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
20824 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
20826         * exception.cc (__throw_bad_typeid): Add missing std::.
20828 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
20830         * cp-tree.h (make_thunk): PROTO -> PARAMS.
20832 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
20834         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
20836         Runtime support for new-abi rtti.
20837         * inc/typeinfo (type_info::operator!=): Define in class.
20838         (type_info::before, type_info::name, type_info::operator==,
20839         type_info::operator!=): Define new ABI implementations.
20840         (type_info::is_pointer_p, type_info::is_function_p): Declare
20841         new virtual functions.
20842         (type_info::do_catch, type_info::do_upcast): Likewise.
20844         * tinfo.h (__base_class_info): Define new class.
20845         (__class_type_info): Likewise.
20846         (__si_class_type_info): Likewise.
20847         (__vmi_class_type_info): Likewise.
20848         (__dynamic_cast): Prototype.
20850         * tinfo.cc: Conditionalize old and new rtti mechanisms.
20851         (type_info::is_pointer_p): Define new function.
20852         (type_info::is_function_p): Likewise.
20853         (type_info::do_catch): Likewise.
20854         (type_info::do_upcast): Likewise.
20855         (vtable_prefix): New structure for vtable access.
20856         (adjust_pointer): Define new template function.
20857         (contained_p, public_p, virtual_p, contained_public_p,
20858         contained_nonpublic_p, contained_nonvirtual_p): Define new
20859         functions.
20860         (nonvirtual_base_type): New local variable.
20861         (__class_type_info::~__class_type_info): Define.
20862         (__si_class_type_info::~__si_class_type_info): Likewise.
20863         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
20864         (__class_type_info::do_catch): Define new function.
20865         (__class_type_info::do_upcast): Likewise.
20866         (__class_type_info::find_public_src): Likewise.
20867         (__class_type_info::do_find_public_src): Likewise.
20868         (__si_class_type_info::do_find_public_src): Likewise.
20869         (__vmi_class_type_info::do_find_public_src): Likewise.
20870         (__class_type_info::do_dyncast): Likewise.
20871         (__si_class_type_info::do_dyncast): Likewise.
20872         (__vmi_class_type_info::do_dyncast): Likewise.
20873         (__class_type_info::do_upcast): Likewise.
20874         (__si_class_type_info::do_upcast): Likewise.
20875         (__vmi_class_type_info::do_upcast): Likewise.
20876         (__dynamic_cast): Likewise.
20878         * tinfo2.cc (__fundamental_type_info): Define new class.
20879         (__pointer_type_info): Likewise.
20880         (__reference_type_info): Likewise.
20881         (__array_type_info): Likewise.
20882         (__function_type_info): Likewise.
20883         (__enum_type_info): Likewise.
20884         (__ptr_to_member_type_info): Likewise.
20885         (__fundamental_type_info::~__fundamental_type_info): Define.
20886         (__pointer_type_info::~__pointer_type_info): Likewise.
20887         (__reference_type_info::~__reference_type_info): Likewise.
20888         (__array_type_info::~__array_type_info): Likewise.
20889         (__function_type_info::~__function_type_info): Likewise.
20890         (__enum_type_info::~__enum_type_info): Likewise.
20891         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
20892         (__pointer_type_info::do_catch): Define new function.
20893         (__ptr_to_member_type_info::do_catch): Define new function.
20895         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
20896         (__is_pointer): Likewise.
20898         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
20900 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
20902         * cp/class.c (build_vtable): Rename to build_primary_vtable.
20903         (prepare_fresh_vtable): Rename to build_secondary_vtable.
20904         (make_new_vtable): New function.
20905         (modify_vtable_entry): Handle generation of new vtables correctly.
20906         (modify_one_vtable): Remove unused parameter.
20907         (dfs_fixup_vtable_deltas): Likewise.
20908         (override_one_vtable): Use build_secondary_vtable.
20909         (finish_struct_1): Use build_primary_vtable and
20910         build_secondary_vtable.
20912 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
20914         * cp/decl.c: Adjust variable names, comments, help strings.
20916 2000-01-29  Nathan Sidwell  <nathan@acm.org>
20918         * new2.cc (operator delete[]): Use operator delete, don't assume
20919         implementation.
20921 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
20923         * class.c (build_vtbl_initializer): Add argument to
20924         build_vtable_entry call.
20926 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
20928         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
20929         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
20930         (BF_DELTA): New macro.
20931         (BF_VCALL_INDEX): Likewise.
20932         (BF_FN): Likewise.
20933         (THUNK_VCALL_OFFSET): Likewise.
20934         (make_thunk): Change prototype.
20935         * class.c (build_vtable_entry): Integrate
20936         build_vtable_entry_for_fn.  Handle vcall indices.
20937         (build_vtable_entry_for_fn): Remove.
20938         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
20939         BF_VCALL_INDEX, BF_FN.
20940         (modify_vtable_entry): Integrate common code from
20941         modify_one_vtable and dfs_fixup_vtable_deltas.
20942         (add_virtual_function): Set BF_VCALL_INDEX.
20943         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
20944         and BF_FN.
20945         (modify_one_vtable): Simplify.
20946         (dfs_fixup_vtable_deltas): Likewise.
20947         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
20948         * method.c (make_thunk): Handle vcall indices.
20950 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
20952         Compiler side new abi rtti (not enabled).
20953         * cp-tree.h (new_abi_rtti_p): New macro.
20954         (emit_support_tinfos): Prototype new function.
20955         (tinfo_decl_p): Likewise.
20956         (emit_tinfo_decl): Likwise.
20957         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
20958         macros.
20959         (doing_runtime): New local static.
20960         (init_rtti_processing): Add new-abi initializer.
20961         (get_tinfo_decl): Add new-abi logic.
20962         (tinfo_from_decl): Likewise.
20963         (build_dynamic_cast_1): Likewise.
20964         (qualifier_flags): New static function.
20965         (tinfo_base_init): Likewise.
20966         (generic_initializer): Likewise.
20967         (ptr_ref_initializer): Likewise.
20968         (ptmd_initializer): Likewise.
20969         (class_hint_flags): Likewise.
20970         (class_initializer): Likewise.
20971         (synthesize_tinfo_var): Likewise.
20972         (create_real_tinfo_var): Likewise.
20973         (create_pseudo_type_info): Likewise.
20974         (get_vmi_pseudo_type_info): Likewise.
20975         (create_tinfo_types): Likewise.
20976         (emit_support_tinfos): New global function.
20977         (tinfo_decl_p): New global predicate.
20978         (emit_tinfo_decl): New global function.
20979         * class.c (set_rtti_entry): Generalize for old and new rtti.
20980         (build_vtbl_initializer): Likewise.
20981         * decl2.c (finish_file): Likewise.
20983 2000-01-27  Jim Wilson  <wilson@cygnus.com>
20985         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
20986         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
20988 2000-01-27  Mike Stump  <mrs@wrs.com>
20990         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
20991         for scopes.
20993 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
20995         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
20997 2000-01-26  J"orn Rennecke <amylaar@cygnus.co.uk>
20999         * optimize.c (calls_setjmp_r): Supply new argument
21000         to special_function_p.
21002 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
21004         * call.c: PROTO -> PARAMS.
21005         * class.c: Likewise.
21006         * cp-tree.h: Likewise.
21007         * cvt.c: Likewise.
21008         * decl.c: Likewise.
21009         * decl.h: Likewise.
21010         * decl2.c: Likewise.
21011         * dump.c: Likewise.
21012         * errfn.c: Likewise.
21013         * error.c: Likewise.
21014         * except.c: Likewise.
21015         * expr.c: Likewise.
21016         * init.c: Likewise.
21017         * input.c: Likewise.
21018         * lex.c: Likewise.
21019         * lex.h: Likewise.
21020         * method.c: Likewise.
21021         * optimize.c: Likewise.
21022         * parse.y: Likewise.
21023         * pt.c: Likewise.
21024         * repo.c: Likewise.
21025         * rtti.c: Likewise.
21026         * search.c: Likewise.
21027         * semantics.c: Likewise.
21028         * spew.c: Likewise.
21029         * tree.c: Likewise.
21030         * typeck.c: Likewise.
21031         * typeck2.c: Likewise.
21032         * xref.c: Likewise.
21034 2000-01-25  Richard Henderson  <rth@cygnus.com>
21036         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
21038 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
21040         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
21041         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
21042         (struct vcall_offset_data_s): New type.
21043         (dfs_vcall_offset_queue_p): New function.
21044         (dfs_build_vcall_offset_vtbl_entries): Likewise.
21045         (build_vcall_offset_vtbl_entries): Likewise.
21046         (layout_vtable_decl): Likewise.
21047         (num_vfun_entries): Likewise.
21048         (num_extra_vtbl_entries): Add the entries for vcall offsets.
21049         (build_vtbl_initializer): Likewise.
21050         (dfs_finish_vtabls): Use layout_vtable_decl.
21051         (modify_one_vtables): Always duplicate vtables under the new ABI.
21052         (finish_struct_1): Use layout_vtable_decl.
21054 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
21056         * decl.c (member_function_or_else): Change third arg from a format
21057         specifier to an `enum overload_flags'.  Callers changed.
21059 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
21061         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
21062         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
21063         build_const_cast, get_delta_difference, check_return_expr): Avoid
21064         ANSI string concatenation usage.
21066 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
21068         * class.c (layout_class_type): Put the fields required to make a
21069         class non-empty at the end, not the beginning, of the TYPE_FIELDs
21070         list.
21072 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
21074         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
21075         template.
21077         * decl2.c (mark_used): Do instantiate inlines that have been
21078         explicitly instantiated.
21080 2000-01-24  Richard Henderson  <rth@cygnus.com>
21082         * call.c (build_over_call): Use expand_tree_builtin.
21083         * typeck.c (build_function_call_real): Likewise.
21084         (build_binary_op_nodefault): Handle unordered compares.
21086 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
21088         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
21089         cp_tree_index values.
21090         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
21091         New global node #defines for them.
21092         * rtti.c (call_void_fn): Replace with ...
21093         (build_runtime_decl): ... new static function.
21094         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
21095         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
21096         (build_dynamic_cast_1): Always produce correctly typed result.
21097         Explicitly produce type_info addresses. Use dynamic_cast_node.
21098         * exception.cc (__throw_bad_cast): Return `void *'.
21099         (__throw_bad_typeid): Return `const type_info &'.
21101 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
21103         * cp-tree.h (get_vtable_decl): Prototype new function.
21104         * class.c (get_vtable_decl): New function. Broken out from ...
21105         (build_vtable): ... here. Use it.
21106         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
21107         by get_vtable_decl.
21109 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
21111         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
21112         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
21113         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
21114         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
21115         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
21116         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
21117         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
21118         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
21119         (CPTI_TINFO_VAR_ID): New enumeration.
21120         (__tp_desc_type_node, __access_mode_type_node,
21121         __bltn_desc_type_node, __user_desc_type_node,
21122         __class_desc_type_node, __ptr_desc_type_node,
21123         __attr_desc_type_node, __func_desc_type_node,
21124         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
21125         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
21126         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
21127         enum_desc_type_node, class_desc_type_node,
21128         si_class_desc_type_node, vmi_class_desc_type_node,
21129         ptmd_desc_type_node, base_desc_type_node): New #defines.
21130         (tinfo_fn_id, tinfo_fn_type): Rename to ...
21131         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
21132         (tinfo_var_id): New enumeration.
21133         (DECL_TINFO_FN_P): Augment comment.
21134         * decl.c (cp_global_trees): Adjust documentation.
21135         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
21136         tinfo_decl_type and tinfo_var_id.
21137         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
21138         (build_typeid): Remove unused variable.
21139         (get_tinfo_var): Use tinfo_var_id.
21140         (tinfo_name): New static function.
21141         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
21142         (tinfo_from_decl): Likewise.
21143         (get_base_offset): New static function, broken out of
21144         expand_class_desc.
21145         (expand_si_desc): Use tinfo_name.
21146         (expand_class_desc): Likewise. Lose local static variable.
21147         Use base_desc_type_node. Use get_base_offset.
21148         (expand_ptr_desc): Use tinfo_name.
21149         (expand_attr_desc): Likewise.
21150         (expand_generic_desc): Likewise.
21152         * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
21153         * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
21155 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
21157         * cp-tree.h (__eprintf): Remove declaration.
21158         * tree.c (__eprintf): Remove definition.
21160 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
21161             Mark Mitchell  <mark@codesourcery.com>
21163         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
21164         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
21166 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
21168         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
21170 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
21172         * cp-tree.h (register_dtor_fn): New function.
21173         * decl.c (destroy_local_static): Rename to ...
21174         (register_dtor_fn): ... this.  Give it external linkage.
21175         (expand_static_init): Use it.
21176         * decl2.c (do_static_initialization): Likewise, if using
21177         __cxa_atexit.
21178         (do_static_destruction): Check that __cxa_atexit is not in use.
21179         (finish_file): Don't call do_static_destruction if using
21180         __cxa_atexit.
21182         * typeck.c (convert_arguments): Restore two-message error
21183         reporting.
21185 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
21187         Remap dynamic cast hint values to be consistent across ABIs.
21188         * search.c (dynamic_cast_base_recurse): Remap generated value.
21189         (get_dynamic_cast_base_type): Adjust documentation.
21190         * tinfo.h (__user_type_info::dyncast): Likewise.
21191         (__user_type_info::find_public_subobj): Remap BOFF meaning.
21192         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
21193         (__class_type_info::do_dyncast): Likewise.
21194         (__class_type_info::do_find_public_subobj): Likewise.
21195         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
21197 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
21199         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
21201         * typeck2.c (incomplete_type_error): Restore previous
21202         cp_error and cp_error_at call sequence.
21204 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
21206         * class.c (dump_class_hierarchy): Make format agree with argument;
21207         cast pointer to unsigned long and print with %lx.
21209 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
21211         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
21213         * typeck.c (composite_pointer_type, common_type,
21214         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
21215         build_function_call_real, convert_arguments,
21216         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
21217         build_unary_op, mark_addressable, build_compound_expr,
21218         build_static_cast, build_reinterpret_cast, build_const_cast,
21219         build_c_cast, build_modify_expr, get_delta_difference,
21220         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
21221         'ISO C++'.  Fusion consecutive calls to diagnostic message routines
21222         into a single one.
21223         * typeck2.c (readonly_error, abstract_virtuals_error,
21224         process_init_constructor, check_for_new_type): Likewise.
21226 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
21228         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
21229         VAR_DECLs.
21231 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
21233         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
21234         (build_x_typeid): Likewise.
21235         (get_tinfo_fn): Likewise.
21236         (get_tinfo_fn_unused): Rename to ...
21237         (get_tinfo_decl): ... here.
21238         * rtti.c (build_headof): Replace logic error with assertion.
21239         (get_tinfo_fn_dynamic): Rename to ...
21240         (get_tinfo_decl_dynamic): ... here. Make static. Use
21241         complete_type_or_else.
21242         (build_x_typeid): Move into ...
21243         (build_typeid): ... here. Adjust call to
21244         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
21245         throw_bad_typeid expression.
21246         (get_tinfo_fn_unused): Rename to ...
21247         (get_tinfo_decl): ... here. Adjust comment.
21248         (get_tinfo_fn): Delete.
21249         (tinfo_from_decl): New static function.
21250         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
21251         (get_typeid): Use complete_type_or_else.
21252         (build_dynamic_cast_1): Adjust calls to
21253         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
21254         * parse.y (primary): Adjust call to build_typeid.
21255         * except.c (build_eh_type_type_ref): Adjust call to
21256         get_tinfo_decl. Mark as used.
21257         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
21258         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
21259         * parse.c: Regenerated.
21261 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
21263         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
21264         calling convention.
21265         (resolves_to_fixed_type_p): Document calling convention.
21266         * rtti.c (build_x_typeid): Initialize NONNULL.
21268         * cp-tree.h (build_shared_int_cst): New function.
21269         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
21270         * class.c (modify_vtable_entry): Likewise.
21271         (add_virtual_function): Split out code to generated shared
21272         INTEGER_CSTs to build_share_int_cst.
21273         (modify_all_vtables): Handle all the overridden functions here.
21274         Add overridden functions from non-primary virtual bases to the
21275         primary vtable.
21276         (finish_struct_1): Adjust call to modify_all_vtables.  Add
21277         overridden functions from non-primary bases to the vtable.
21278         * tree.c (build_shared_int_cst): New function.
21280         * cp-tree.h (scratchalloc): Remove.
21281         (build_scratch_list): Likewise.
21282         * call.c (convert_class_to_reference): Replace build_scratch_list
21283         and build_expr_list with build_tree_list.
21284         (add_candidate): Replace scratchalloc with expralloc.  Note memory
21285         leak.
21286         (build_user_type_conversion_1):  Replace build_scratch_list
21287         and build_expr_list with build_tree_list.
21288         (build_new_op): Likewise.
21289         (build_op_delete_call): Likewise.
21290         (convert_like): Likewise.
21291         * cvt.c (ocp_convert): Likewise.
21292         * decl.c (start_decl): Likewise.
21293         (start_function): Likewise.
21294         (finish_destructor_body): Likewise.
21295         (maybe_build_cleanup_1): Likewise.
21296         * decl2.c (reparse_decl_as_expr): Likewise.
21297         * init.c (perform_member_init): Likewise.
21298         (expand_cleanup_for_base): Likewise.
21299         (build_builtin_delete_call): Likewise.
21300         (build_new_1): Likewise.
21301         (build_delete): Likewise.
21302         * method.c (do_build_assign_ref): Likewise.
21303         * parse.y (already_scoped_stmt): Likewise.
21304         (nontrivial_exprlist): Likewise.
21305         (net_initializer): Likewise.
21306         (initlist): Likewise.
21307         * parse.c: Regenerated.
21308         * rtti.c (build_x_typeid): Likewise.
21309         (build_dynamic_cast_1): Likewise.
21310         * typeck.c (build_x_compound_expr): Likewise.
21311         (build_static_cast): Likewise.
21312         (build_modify_expr): Likewise.
21314         * cp-tree.h (DECL_VINDEX): Add documentation.
21315         * class.c (build_vtable_entry): Likewise.
21316         (start_vtable): Add comment.
21317         (add_virtual_function): Replace pending_hard_virtuals with
21318         overridden_virtuals and pending_virtuals with new_virtuals.
21319         Replace redundant assignments with assertions.
21320         (check_for_override): Add comment.
21321         (check_bases_and_members): Replace pending_hard_virtuals with
21322         overridden_virtuals and pending_virtuals with new_virtuals.
21323         (create_vtbl_ptr): Likewise.
21324         (layout_class_type): Likewise.
21325         (finish_struct_1): Likewise.  Add comments.
21327 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
21329         * class.c (finish_struct_1): Replace redundant code with
21330         assertions.
21332         * cp-tree.h (flag_new_abi): Move.
21333         (flag_use_cxa_atexit): Likewise.
21334         (flag_honor_std): Likewise.
21335         (flag_rtti): Likewise.
21336         (vbase_offsets_in_vtable_p): Define.
21337         (vptrs_present_everywhere_p): Likewise.
21338         (TYPE_CONTAINS_VPTR_P): Likewise.
21339         (dfs_walk_real): Declare.
21340         * class.c (build_vbase_pointer_fields): Check
21341         vbase_offsets_in_vtable_p.
21342         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
21343         BINFO_VPTR_FIELD.
21344         (build_vbase_offset_vtbl_entries): Simplify.
21345         (build_vbase_offset_vtbl_entries): Adjust.
21346         (build_vbase_pointer): Add ability to look up vbase offsets in
21347         vtable.
21348         (start_vtable): New function.
21349         (add_virtual_function): Use it.
21350         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
21351         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
21352         (build_vtbl_initializer): Take the type of the complete object as
21353         input.  Use it to correctly calculate vbase offsets.
21354         (dfs_finish_vtbls): Pass the complete type to
21355         build_vtbl_initializer.
21356         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
21357         (create_vtable_ptr): Create a vtable even if there are no
21358         new virtual functions, under the new ABI.
21359         (finish_struct_1): Likewise.
21360         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
21361         * decl.c (exapnd_static_init): Remove call to
21362         preserve_initializer.
21363         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
21364         vtables.
21365         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
21366         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
21367         (construct_virtual_bases): Don't initialize virtual base pointers
21368         under the new ABI.
21369         (build_aggr_init): Clean up comment.
21370         (expand_aggr_init_1): Likewise.
21371         * rtti.c (expand_class_desc): Store the virtual function table
21372         index where the vbase offset lives in the offset field.
21373         * search.c (dfs_walk_real): Make it global.
21374         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
21375         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
21377         * tinfo.h (USItype): Make it signed under the new ABI.
21378         * tinfo.cc (convert_to_base): New function.  Encapsulate base
21379         conversion logic here.
21380         (__class_type_info::do_upcast): Use it.
21381         (__class_type_info::do_dyncast): Likewise.
21382         (__class_type_info::do_find_public_subobj): Likewise.
21384         * init.c (construct_virtual_bases): Don't look up the addresses of
21385         virtual bases at run-time.
21387         * class.c (build_vbase_pointer): Relocate.
21388         (build_vbase_pointer_fields): Likewise.
21389         (dfs_build_vbase_offset_vtbl_entries): Likewise.
21390         (build_vbase_offset_vtbl_entries): Likewise.
21392         * decl.c (init_decl_processing): Complain if -fnew-abi
21393         -fno-vtable-thunks is used.
21395         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
21396         flag_new_abi.
21398 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
21400         * cp-tree.h (num_extra_vtbl_entries): New function.
21401         (size_extra_vtbl_entries): Likewise.
21402         (dfs_vtable_path_unmark): Likewise.
21403         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
21404         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
21405         * class.c (num_extra_vtbl_entries): New function.
21406         (size_extra_vtbl_entries): Likewise.
21407         (dfs_build_vbase_offset_vtbl_entries): New function.
21408         (build_vbase_offset_vtbl_entries): Likewise.
21409         (build_vtbl_initializer): Use it.
21410         (finish_struct_1): Adjust vtable sizes (using
21411         num_extra_vtbl_entries).
21412         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
21413         THUNK_DECL is non-NULL before expanding it.
21414         * init.c (expand_virtual_init): Adjust the vtable pointer by
21415         size_extra_vtbl_entries before storing it.
21416         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
21417         Handle TREE_LIST parameters here, not in the dfs_* functions.
21418         (dfs_unmarked_real_bases_queue_p): Adjust.
21419         (dfs_marked_real_bases_queue_p): Likewise.
21420         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
21421         (dfs_vtable_path_marked_real_bases_queue_p): New function.
21422         (dfs_vtable_path_unmark): Likewise.
21424 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
21426         * optimize.c (copy_body_r): Clear the operand three of a
21427         TARGET_EXPR when copying it.
21429 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
21431         * method.c (build_decl_overload_real): Check whether we are in ::
21432         before returning __builtin_new/delete.
21434 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
21436         * pt.c (tsubst_friend_function): Improve comment.
21437         (instantiate_decl): Avoid crashing when a "nested" function is
21438         instantiated from the top level.
21440         * dump.c (dqeueue_and_dump): Dump
21441         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
21443 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
21445         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
21447 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
21449         * g++spec.c (lang_specific_driver): Add -fnew-abi if
21450         ENABLE_NEW_GXX_ABI defined.
21451         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
21452         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
21453         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
21455 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
21457         * decl.c (start_cleanup_fn): Call pushdecl.
21459         * call.c (convert_class_to_reference): Fix typos.
21460         (build_conditional_expr): Handle errors gracefully.
21461         * class.c (push_nested_class): Likewise.
21462         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
21463         (DECL_THIS_EXTERN): Use it.
21464         (DECL_THIS_STATIC): Likewise.
21465         * cvt.c (convert_to_void): Handle errors gracefully.
21466         (build_expr_type_conversion): Likewise.
21467         * decl.c (maybe_push_decl): Likewise.
21468         (start_decl_1): Likewise.
21469         (require_complete_types_for_parms): Likewise.
21470         * parse.y (structsp): Likewise.
21471         (base_class): Likewise.
21472         * parse.c: Regenerated.
21473         * pt.c (finish_member_template_decl): Likewise.
21474         * typeck.c (decay_conversion): Likewise.
21476         * cp-tree.h (dfs_skip_vbases): New function.
21477         (find_vbase_instance): Likewise.
21478         * class.c (determine_primary_base): Allow a nearly empty base to
21479         serve as a primary base class under the new ABI.
21480         (get_class_offset_1): Rename to ...
21481         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
21482         messages here.
21483         (get_class_offset): Use it.  Issue error messages here.
21484         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
21485         find the right copies of virtual bases.
21486         (fixup_vtable_deltas1): Rename to ...
21487         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
21488         bases as primary bases.
21489         (fixup_vtable_deltas): Remove.
21490         (override_one_vtable): Handle virtual bases as primary bases.
21491         (merge_overrides): Likewise.
21492         (finish_struct_1): Likewise.
21493         (dump_class_hierarchy): Dump primary-ness of bases as well.
21494         * search.c (mark_primary_bases): Use a pre-order traversal to
21495         handle primary virtual bases.
21496         (dfs_skip_vbases): New fiunction.
21497         (expand_upcast_fixups): Adjust to handle primary virtual bases.
21498         (fixup_virtual_upcast_offsets): Likewise.
21499         (fixup_all_virtual_upcast_offsets): Likewise.
21500         (dfs_find_vbase_instances): New function.
21501         (find_vbase_instance): Likewise.
21503 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
21505         * lex.c (DIR_SEPARATOR): Delete macro.
21507 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
21509        * decl2.c (lang_decode_option): Handle automatic line wrapping
21510        option.
21512 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
21514         * friend.c (do_friend): Don't resolve scopes when processing
21515         template declarations, even if the qualifying scope doesn't
21516         involve template parameters.
21518 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
21520         * class.c (dfs_modify_vtables_queue_p): Remove.
21521         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
21522         and dfs_marked_real_bases_queue_p instead of
21523         dfs_modify_vtables_queue_p.
21525         * class.c (build_vbase_path): Simplify.
21526         (dfs_propagate_binfo_offsets): New function.
21527         (propagate_binfo_offsets): Use it.
21528         (remove_base_field): Simplify.
21529         (dfs_set_offset_for_vbases): Remove.
21530         (dfs_set_offset_for_shared_vbases): New function.
21531         (dfs_set_offset_for_unshared_vbases): Likewise.
21532         (layout_virtual_bases): Use them.
21533         (layout_basetypes): Don't call propagate_binfo_offsets.
21534         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
21535         for the vbases.
21537         * class.c (build_base_field): New function, split out from ...
21538         (build_base_fields): ... here.  Use it.  Allocate primary bases
21539         first, under the new ABI.
21540         (get_vtable_entry): Remove.
21541         (remove_base_field): New function, split out from ...
21542         (remove_base_fields): ... here.  Adjust since primary bases come
21543         first under the new ABI.
21545         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
21546         (initialize_vtbl_ptrs): New function.
21547         (expand_indirect_vtbls_init): Change prototype.
21548         (convert_pointer_to_vbase): Declare.
21549         * init.c (expand_direct_vtbls_init): Remove.
21550         (dfs_initialize_vtbl_ptrs): New function.
21551         (initialize_vtbl_ptrs): Likewise.
21552         (emit_base_init): Use initialize_vtbl_ptrs.
21553         * search.c (convert_pointer_to_vbase): Make it global.
21554         (expand_indirect_vtbls_init): Remove vtable initialization code.
21555         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
21557         * class.c (dfs_finish_vtbls): New function.
21558         (finish_vtbls): Use it.
21559         (dump_class_hierarchy): New function.
21561         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
21562         (BINFO_VBASE_PRIMARY_P): New macro.
21563         (BINFO_VIRTUALS): Add to documentation.
21564         (SET_BINFO_PRIMARY_MARKED_P): Remove.
21565         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
21566         (dfs_mark_primary_bases_queue_p): Likewise.
21567         (dfs_unmarked_real_bases_queue_p): New function.
21568         (dfs_marked_real_bases_queue_p): Likewise.
21569         * search.c (dfs_mark_primary_bases): Adjust.
21570         (mark_primary_bases): Likewise.
21571         (get_shared_vbase_if_not_primary): New function.
21572         (dfs_unmarked_real_bases_queue_p): Likewise.
21573         (dfs_marked_real_bases_queue_p): Likewise.
21574         (dfs_get_pure_virtuals): Simplify.
21575         (get_pure_virtuals): Likewise.
21577 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
21579         * lex.c: Include tm_p.h.
21581 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
21583         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
21585 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
21587         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
21588         * pt.c (instantiate_decl): Defer comdat templates that might not be
21589         needed.
21591         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
21592         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
21593         (finish_file): Likewise.
21595         * decl2.c (import_export_class): Undo 12/14 change.
21597         * error.c (dump_decl): operator new, not operatornew.
21599         * class.c (field_decl_cmp): A nontype is "greater" than a type.
21600         * search.c (lookup_field_1): Look for the last field with the
21601         desired name.
21603 2000-01-05  Nathan Sidwell  <nathan@acm.org>
21605         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
21606         FUNCTION_DECL.
21608 2000-01-05  Nathan Sidwell  <nathan@acm.org>
21610         * typeck.c (build_static_cast): Don't strip target qualifiers
21611         when casting from a class.
21613 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
21615         * class.c (warn_hidden): Initialize variable `fndecl'.
21617 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
21619         * decl.c (flag_isoc9x): New variable to be able to use code in
21620         c-common.c.  For now always zero.
21622 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
21624         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
21625         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
21626         or unshare_base_binfos for virtual bases here.
21627         * search.c (dfs_get_vbase_types): Do it here.
21628         (get_vbase_types): Adjust.
21630 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
21632         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
21633         (BINFO_PRIMARY_MARKED_P): Use flag 5.
21634         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
21635         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
21636         (unmark_primary_bases): Remove declaration.
21637         (unmarkedp): Declare.
21638         (dfs_vbase_unmark): Likewise.
21639         * class.c (determine_primary_base): Return immediately if there
21640         are no base classes.  Call mark_primary_bases here.
21641         (modify_all_direct_vtables): Remove.
21642         (modify_all_indirect_vtables): Remove.
21643         (dfs_modify_vtables_queue_p): New function.
21644         (dfs_modify_vtables): New function.
21645         (modify_all_vtables): Use them.
21646         (build_base_fields): Build FIELD_DECLs for primary virtual base
21647         classes.
21648         (create_vtable_ptr): Don't call determine_primary_base here.
21649         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
21650         (dfs_set_offset_for_vbases): ... this.
21651         (layout_virtual_bases): Use it.
21652         (layout_class_type): Call determine_primary_base here.
21653         * search.c (unmarkedp): Make it global.
21654         (shared_marked_p): Simplify.
21655         (shared_unmarked_p): Likewise.
21656         (dfs_primary_bases_queue_p): Remove.
21657         (dfs_unmark_primary_bases): Likewise.
21658         (unmark_primary_bases): Likewise.
21659         (mark_primary_bases): Simplify.
21660         (get_pure_virtuals): Don't call mark_primary_bases here.
21661         (dfs_vbase_unmark): New function.
21662         (get_vbase_types): Simplify.
21664         * class.c (struct base_info): Remove.
21665         (determine_primary_base): Take has_virtual_p rather than a
21666         base_info as input.  Don't calculate max_has_virtual.
21667         (finish_struct_bits): Remove max_has_virtual argument.
21668         (create_vtable_ptr): Remove max_has_virtual_p argument.
21669         (layout_virtual_bases): Remove max argument.
21670         (layout_basetypes): Likewise.
21671         (layout_class_type): Remove max_has_virtual_p argument.
21672         (finish_struct_1): Remove max_has_virtual.
21674         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
21675         (layout_basetypes): Remove.
21676         * class.c (propagate_binfo_offsets): Moved here from tree.c.
21677         Update to handle primary virtual bases.
21678         (remove_base_fields): New function, split out from
21679         layout_basetypes.
21680         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
21681         (layout_virtual_bases): New function, split out from
21682         layout_basetypes.  Update to handle primary virtual bases.
21683         (layout_basetypes): Moved here from tree.c.  Use
21684         remove_base_fields and layout_virtual_bases.
21685         * search.c (dfs_mark_primary_bases_queue_p): New function.
21686         (mark_primary_bases): Use it.
21687         * tree.c (CEIL): Remove.
21688         (propagate_binfo_offsets): Remove.
21689         (layout_basetypes): Remove.
21691 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
21693         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
21694         (BINFO_PRIMARY_MARKED_P): New macro.
21695         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
21696         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
21697         (mark_primary_bases): New function.
21698         (unmark_primary_bases): Likewise.
21699         * search.c (get_abstract_virtuals_1): Remove.
21700         (dfs_mark_primary_bases): New function.
21701         (mark_primary_bases): Likewise.
21702         (dfs_unmark_primary_bases): Likewise.
21703         (unmark_primary_bases): Likewise.
21704         (dfs_get_pure_virtuals): Likewise.
21706 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
21708         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
21709         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
21710         (modify_one_vtable): Adjust.
21711         (fixup_vtable_deltas1): Likewise.
21712         (override_one_vtable): Likewise.
21713         * search.c (get_abstract_virtuals_1): Likewise.
21714         (get_pure_virtuals): Likewise.
21715         (expand_upcast_fixups): Likewise.
21716         * tree.c (debug_binfo): Likewise.
21718         * class.c (build_vtable): Don't return a value.  Don't rebuild
21719         vtables for bases that have already been handled.
21720         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
21721         already been handled.
21722         (modify_one_vtable): Adjust accordingly.
21723         (fixup_vtable_deltas1): Likewise.
21724         (finish_struct_1): Likewise.
21726 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
21728         * call.c (build_new_method_call): Also check destructors.