OSDN Git Service

* Makefile.in (install-info): Simplify.
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2003-10-20  Mark Mitchell  <mark@codesourcery.com>
2
3         * Make-lang.in (c++.install-info): Remove.
4
5 2003-10-20  Jason Merrill  <jason@redhat.com>
6
7         * class.c (layout_class_type): Set DECL_ARTIFICIAL on padding
8         field.
9
10 2003-10-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11
12         PR c++/9781, c++/10583, c++/11862
13         * decl.c (cp_finish_decl): Exit immediately if decl is an
14         error_mark_node.
15         * pt.c (push_template_decl_real): Return error_mark_node for
16         invalid template declaration of variable.
17
18 2003-10-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
19
20         PR c++/12495
21         * pt.c (lookup_template_class): Handle when current_class_type
22         is a local class.
23
24 2003-10-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
25
26         PR c++/2513
27         * decl.c (make_typename_type): Use dependent_type_p.
28         (make_unbound_class_template): Likewise.
29         * pt.c (instantiate_class_template): Increment
30         processing_template_decl during substitution of template friend
31         function.  Preincrement processing_template_decl rather than
32         postincrement.
33         (get_mostly_instantiated_function_type): Increment
34         processing_template_decl during partial substitution of function
35         type.
36
37 2003-10-15  Jan Hubicka  <jh@suse.cz>
38
39         PR c++/12574
40         * decl2.c (cxx_callgraph_analyze_expr): Deal with baselink.
41
42 2003-10-14  Jason Merrill  <jason@redhat.com>
43
44         PR c++/11878
45         * tree.c (build_target_expr_with_type): Call force_rvalue for
46         classes with non-trivial copy ctors.
47
48         PR c++/11063
49         * typeck.c (build_modify_expr): Call convert rather than abort.
50
51 2003-10-14  Gabriel Dos Reis  <gdr@integrable-solutions.net>
52
53         Breack out decl.c (3/n)
54         * name-lookup.c: Include flags.h
55         (lookup_name_current_level): Make static.
56         (add_decl_to_level): Likewise.
57         (push_local_binding): Likewise.
58         (push_overloaded_decl): Likewise.
59         (lookup_using_namespace): Likewise.
60         (qualified_lookup_using_namespace): Likewise.
61         (lookup_type_current_level): Likewise.
62         (unqualified_namespace_lookup): Likewise.
63         (namespace_ancestor): Likewise.
64         (push_using_directive): Likewise.
65         * decl.c (pushdecl): Move to name-lookup.c.
66         (pushdecl_top_level_1): Likewise.
67         (pushdecl_top_level): Likewise.
68         (pushdecl_top_level_and_finish): Likewise.
69         (maybe_push_decl): Likewise.
70         (push_using_decl): Likewise.
71         (push_overloaded_decl): Likewise.
72         (make_anon_name): Likewise.
73         (anon_cnt): Likewise.
74         (clear_anon_tags): Likewise.
75         (maybe_inject_for_scope_var): Likewise.
76         (check_for_out_of_scope_variable): Likewise.
77         * Make-lang.in (cp/name-lookup.o): Depend on flags.h.
78         * decl.c (warn_extern_redeclared_static): Export.
79         * cp-tree.h (warn_extern_redeclared_static): Declare.
80
81 2003-10-14  Nathanael Nerode  <neroden@gcc.gnu.org>
82
83         * Make-lang.in: Replace uses of $(target_alias) with
84         $(target_noncanonical).
85
86 2003-10-13  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
87
88         * ChangeLog: Add PR number to patch for PR c++/12370.
89
90 2003-10-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
91
92         * name-lookup.h (cxx_scope_find_binding_for_name): Don't export.
93         (binding_for_name): Likewise.
94         (cxx_binding_clear): Move to name-lookup.c.
95         * name-lookup.c (cxx_scope_find_binding_for_name): Now static.
96         (binding_for_name): Likewise.
97         * decl2.c (is_ancestor): Move to name-lookup.c
98         (namespace_ancestor): Likewise.
99         (add_using_namespace): Likewise.
100         (ambiguous_decl): Likewise.
101         (lookup_using_namespace): Likewise.
102         (qualified_lookup_using_namespace): Likewise.
103         (set_decl_namespace): Likewise.
104         (decl_namespace): Likewise.
105         (current_decl_namespace): Likewise.
106         (push_decl_namespace): Likewise.
107         (pop_decl_namespace): Likewise.
108         (push_scope): Likewise.
109         (pop_scope): Likewise.
110         (struct arg_lookup): Likewise.
111         (arg_assoc): Likewise.
112         (arg_assoc_args): Likewise.
113         (arg_assoc_type): Likewise.
114         (add_function): Likewise.
115         (arg_assoc_namespace): Likewise.
116         (arg_assoc_class): Likewise.
117         (arg_assoc_template_arg): Likewise.
118         (do_namespace_alias): Likewise.
119         (validate_nonmember_using_decl): Likewise.
120         (do_nonmember_using_decl): Likewise.
121         (do_toplevel_using_decl): Likewise.
122         (do_local_using_decl): Likewise.
123         (do_class_using_decl): Likewise.
124         (do_using_directive): Likewise.
125         (constructor_name_full): Likewise.
126         (constructor_name): Likewise.
127         (constructor_name_p): Likewise.
128
129 2003-10-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
130
131         Break out decl.c (2/n) 
132         * name-lookup.c: Include diagnostic.h
133         (cxx_binding_free): Make static.
134         (cxx_binding_make): Likewise.
135         (binding_table_new): Likewise
136         (binding_table_free): Likewise.
137         (binding_table_insert): Likewise.
138         (binding_table_find_anon_type): Likewise.
139         (binding_table_reverse_maybe_remap): Likewise.
140         (supplement_binding): Likewise.
141         * name-lookup.h (global_scope_name): Declare extern.
142         (global_type_node): Likewise.
143         (cxx_binding_free): Don't export.
144         (cxx_binding_make): Likewise.
145         (binding_table_new): Likewise.
146         (binding_table_free): Likewise.
147         (binding_table_insert): Likewise.
148         (binding_table_find_anon_type): Likewise.
149         (binding_table_reverse_maybe_remap): Likewise.
150         * Make-lang.in (cp/name-lookup.o): Depend on $(DIAGNOSTIC_H)
151         * decl.c (lookup_namespace_name): Move to name-lookup.c
152         (select_decl): Likewise.
153         (unqualified_namespace_lookup): Likewise.
154         (lookup_qualified_name): Likewise.
155         (lookup_name_real): Likewise.
156         (lookup_name_nonclass): Likewise.
157         (lookup_function_nonclass): Likewise.
158         (lookup_name): Likewise.
159         (lookup_name_current_level): Likewise.
160         (lookup_type_current_level): Likewise.
161         (lookup_flags): Likewise.
162         (qualify_lookup): Likewise.
163         (lookup_tag): Likewise.
164         (lookup_tag_reverse): Likewise.
165         (getdecls): Likewise.
166         (storedecls): Remove.
167         (cxx_remember_type_decls): Move to name-lookup.c.
168         (global_bindings_p): Likewise.
169         (innermost_nonclass_level): Likewise.
170         (toplevel_bindings_p): Likewise.
171         (namespace_bindings_p): Likewise.
172         (kept_level_p): Likewise.
173         (innermost_scope_kind): Likewise.
174         (template_parm_scope_p): Likewise.
175         (push_binding): Likewise.
176         (push_local_binding): Likewise.
177         (add_decl_to_level): Likewise.  Make extern.
178         (push_class_binding): Move to name-lookup.c.
179         (resume_level): Likewise.  Rename to resume_scope.
180         (begin_scope): Move to name-lookup.c.
181         (indent): Likewise.
182         (binding_depth): Likewise.
183         (is_class_level): Likewise.
184         (cxx_scope_descriptor): Likewise.
185         (cxx_scope_debug): Likewise.
186         (namespace_scope_ht_size): Likewise.
187         (leave_scope): Likewise.
188         (pushlevel_class): Likewise.
189         (poplevel_class): Likewise.
190         (clear_identifier_class_values): Likewise.
191         (pushdecl_with_scope): Likewise.
192         (pushdecl_namespace_level): Likewise.
193         (pushdecl_class_level): Likewise.
194         (push_class_level_binding): Likewise.
195         (push_using_directive): Likewise.
196         (identifier_global_value): Likewise.
197         (keep_next_level_flag): Likewise.
198         (keep_next_level): Likewise.
199         (free_binding_level): Likewise.
200         (set_class_shadows): Likewise.
201         (maybe_push_cleanup_level): Likewise.
202         (cp_namespace_decls): Likewise.
203         (bt_print_entry): Likewise.
204         (print_binding_level): Likewise.
205         (print_other_binding_stack): Likewise.
206         (print_binding_stack): Likewise.
207         (push_namespace): Likewise.
208         (pop_namespace): Likewise.
209         (push_nested_namespace): Likewise.
210         (pop_nested_namespace): Likewise.
211         (cxx_saved_binding_make): Likewise.
212         (struct cxx_saved_binding_make): Likewise.
213         (store_bindings): Likewise.
214         (maybe_push_to_top_level): Likewise.
215         (push_to_top_level): Likewise.
216         (pop_from_top_level): Likewise.
217         (identifier_type_value): Likewise.
218         (set_identifier_type_value): Likewise.
219         (set_identifier_type_value_with_scope): Likewise.
220         (pop_everything): Likewise.
221         (pushtag): Likewise.
222         (follow_tag_typedef): Likewise.
223         (maybe_process_template_type_declaration): Likewise.
224         (pop_binding): Likewise.
225         * cp-tree.h: Move corresponding declarations to name-lookup.h
226         
227 2003-10-12  Steven Bosscher  <steven@gcc.gnu.org>
228
229         * cvt.c (ocp_convert): Move warning to C common code.
230
231 2003-10-09  Jason Merrill  <jason@redhat.com>
232
233         PR c++/6392
234         * tree.c (build_cplus_array_type): Handle all quals the same.
235         (cp_build_qualified_type_real): Look through arrays first.
236
237         * tree.c (build_cplus_new): Use build_decl to create a VAR_DECL.
238         (build_target_expr_with_type): Likewise.
239
240         * pt.c (instantiate_class_template): Sanity check that our
241         enclosing class has been instantiated.
242
243 2003-10-08  Giovanni Bajo  <giovannibajo@libero.it>
244
245         * cp_tree.h: Added TFF_NO_FUNCTION_ARGUMENTS.
246         * error.c (dump_function_decl): Use it to skip the dump of the
247         arguments.
248         (dump_expr): When dumping a declaration found within an
249         expression, always set TFF_NO_FUNCTION_ARGUMENTS
250         in the flags.
251
252 2003-10-08  Giovanni Bajo <giovannibajo@libero.it>
253
254         PR c++/11097
255         * pt.c (tsubst_decl): Substitute also the DECL_NAME node of
256         USING_DECL.
257
258 2003-10-06  Mark Mitchell  <mark@codesourcery.com>
259
260         PR c++/10147
261         * call.c (initialize_reference): Tweak error message.
262         * cxx-pretty-print.h (cxx_pretty_printer_flags): Remove
263         pp_cxx_flag_qualified_id and pp_cxx_flag_global_scope.
264         * cxx-pretty-print.c (pp_cxx_id_expression): Always display
265         qualified entities using qualified names.
266         
267         PR c++/12337
268         * init.c (build_new_1): Make sure that the expression returned is
269         not an lvalue.
270
271         PR c++/12344, c++/12236, c++/8656
272         * decl.c (start_function): Do not ignore attributes embedded in a
273         function declarator.
274
275 2003-10-06  Mark Mitchell  <mark@codesourcery.com>
276
277         * Make-lang.in (c++.info): Remove.
278         (c++.dvi): Remove.
279         (c++.generated-manpages): Replace with ...
280         (generated-manpages): ... this.
281
282 2003-10-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
283
284         * decl.c (struct cp_binding_level): Move to name-lookup.h
285         (current_binding_level): Likewise.
286         (class_binding_level): Likewise.
287         * cp-tree.h (enum scope_kind): Likewise.
288
289 2003-10-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
290
291         * name-lookup.c (binding_entry_free): Nullify name and type
292         fields. 
293
294 2003-10-02  Mark Mitchell  <mark@codesourcery.com>
295
296         PR c++/12486
297         * typeck.c (finish_class_member_access_expr): Issue diagnostic
298         on erroneous use of qualified name.
299
300 2003-09-30  Richard Henderson  <rth@redhat.com>
301
302         PR c++/12370
303         * decl.c (duplicate_decls): Copy DECL_SAVED_INSNS too.
304
305 2003-09-30  Kelley Cook  <kelleycoook@wideopenwest.com>
306
307         * g++spec.c: Convert to ISO C90 prototypes.
308         * parser.c: Likewise.
309
310 2003-09-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
311
312         * decl.c (pop_binding): Don't mess with nullifying binding->scope
313         here. 
314         * name-lookup.c: Re-format.
315         (cxx_binding_free): Nullify binding->scope.
316
317 2003-09-29  Jan Hubicka  <jh@suse.cz>
318
319         PR C++/12047
320         * except.c (build_eh_type_type): Call mark_used on the type.
321
322 2003-09-28  Richard Henderson  <rth@redhat.com>
323
324         * typeck.c (c_expand_asm_operands): Take location_t, instead of
325         individual file and line.
326
327 2003-09-28  Andreas Jaeger  <aj@suse.de>
328
329         * decl.c (cxx_builtin_type_decls): Convert to ISO C90 function
330         definition.
331         * init.c (push_base_cleanups): Likewise.
332         * decl2.c (finish_file): Likewise.
333         * mangle.c (init_mangle): Likewise.
334         (dump_substitution_candidates): Likewise.
335         * search.c: Likewise.
336
337 2003-09-27  Gabriel Dos Reis  <gdr@integrable-solutions.net>
338
339         * name-lookup.h (get_global_value_if_present): New function.
340         (is_typename_at_global_scope): Likewise.
341         * except.c (do_begin_catch): Use get_global_value_if_present.
342         (do_end_catch): Likewise.
343         (do_allocate_exception): Likewise.
344         (do_free_exception): Likewise.
345         (build_throw): Likewise.
346         * parser.c (cp_parser_member_declaration): Likewise.
347         * rtti.c (throw_bad_cast): Likewise.
348         (throw_bad_typeid): Likewise.
349         * decl.c (check_tag_decl): Use is_typename_at_global_scope.
350         (grokdeclarator): Likewise.
351         * cp-tree.h (global_namespace): Move to name-lookup.h
352         * call.c (call_builtin_trap): Tidy.
353
354 2003-09-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
355
356         PR c++/11415
357         * parser.c (cp_parser_nested_name_specifier_opt): Issue correct
358         error message when parser->scope is global_namespace.
359
360 2003-09-27  Gabriel Dos Reis  <gdr@integrable-solutions.net>
361
362         * cp-tree.h, name-lookup.h, decl.c, decl2.c: Remove reference to
363         macros  BINDING_SCOPE, BINDING_VALUE and BINDING_TYPE.
364
365 2003-09-26  Gabriel Dos Reis  <gdr@integrable-solutions.net>
366
367         * decl.c (pop_binding_level, suspend_binding_level,
368         find_class_binding_level): Merge into leave_scope.  Remove.
369         (leave_scope):  New function.
370         (poplevel): Update.
371         (poplevel_class): Likewise.
372         (pop_namespace): Likewise.
373
374 2003-09-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
375
376         PR c++/5655
377         * parser.c (cp_parser_check_access_in_redeclaration): New function.
378         (cp_parser_member_declaration): Use it.
379         (cp_parser_template_declaration_after_export): Likewise.
380
381 2003-09-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
382
383         * cp-tree.h (scope_kind): Add new enumerator.
384         (keep_next_level): Change parameter type to bool.
385         (begin_scope):  Change prototype.
386         (pushlevel): Remove declaration.
387         * decl.c (push_binding_level): Fold in begin_scope.  Remove.
388         (struct cp_binding_level): Remove tag_tranparent field.  Make keep
389         of bitsize one.
390         (keep_next_level_flag): Make a bool.
391         (cxx_scope_descriptor): Update scope names table
392         (make_cxx_scope): Fold in begin_scope.  Remove..
393         (namespace_scope_ht_size): New function.
394         (begin_scope): Change prototype.  Return a scope.  Tidy.
395         (kept_level_p): Update.
396         (pushlevel): Remove.
397         (maybe_push_cleanup_level): Simplify.
398         (poplevel): Update for sk_cleanup and keep change.
399         (print_binding_level): Likewise.
400         (initial_push_namespace_scope): Fold in begin_scope.  Remove.
401         (push_namespace): Update.
402         (pushtag): Likewise.
403         (lookup_tag): Likewise.
404         (lookup_name_current_level): Likewise.
405         (lookup_type_current_level): Likewise.
406         (cxx_init_decl_processing): Likewise.
407         (start_function): Likewise.
408         (begin_function_body): Likewise.
409         (start_method): Likewise.
410         * pt.c (push_inline_template_parms_recursive): Likewise.
411         (begin_template_parm_list): Likewise.
412         (begin_specialization): Likewise.
413         * semantics.c (do_pushlevel): Likewise.
414         (begin_compound_stmt): Likewise.
415         (begin_stmt_expr): Likewise.
416
417 2003-09-21  Richard Henderson  <rth@redhat.com>
418
419         * class.c, cp-tree.h, decl.c, decl2.c, error.c, init.c,
420         method.c, optimize.c, pt.c, semantics.c, tree.c: Revert.
421
422 2003-09-21  Richard Henderson  <rth@redhat.com>
423
424         * class.c, cp-tree.h, decl.c, decl2.c, error.c, init.c,
425         method.c, optimize.c, pt.c, semantics.c, tree.c: Update for
426         DECL_SOURCE_LOCATION rename and change to const.
427
428 2003-09-20  Richard Henderson  <rth@redhat.com>
429
430         * decl.c, decl2.c, pt.c: Use %J in diagnostics.
431
432 2003-09-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
433
434         PR c++/157
435         * parser.c (cp_parser_direct_declarator): Clear
436         parser->num_template_parameter_lists when parsing function
437         parameters.
438         (cp_parser_constructor_declarator_p): Likewise.
439
440 2003-09-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
441
442         PR c++/495
443         * pt.c (tsubst_friend_class): Only use innermost template
444         arguments for the injected friend class template.
445
446 2003-09-19  Nathan Sidwell  <nathan@codesourcery.com>
447
448         PR c++/12332
449         * pt.c (instantiate_class_template): Increment
450         processing_template_decl around the tsubst of a template member
451         function.
452
453 2003-09-19  Gabriel Dos Reis  <gdr@integrable-solutions.net>
454
455         * decl.c (cxx_scope_descriptor): Fix thinko.
456         (struct cp_binding_level): Adjust type of binding_depth field. 
457
458 2003-09-18  Danny Smith  <dannysmith@users.sourceforge.net>
459
460         PR c++/12320
461         * call.c (type_passed_as): Check for incomplete type.
462         (convert_for_arg_passing): Likewise.
463
464 2003-09-18  Nathan Sidwell  <nathan@codesourcery.com>
465
466         PR c++/9848
467         * optimize.c (maybe_clone_body): Don't set MARK_USED on parameters
468         here.
469         * semantics.c (expand_body): Set it here on the remaining clones.
470
471 2003-09-18  Roger Sayle  <roger@eyesopen.com>
472
473         * lex.c (init_operators): Remove operator_name_info for FFS_EXPR.
474         * class.c (instantiate_type): Remove FFS_EXPR case.
475
476 2003-09-18  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
477
478         * ChangeLog: Fix recent commit.
479
480 2003-09-18  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
481
482         * ChangeLog: Add PR number to patch for PR c++/12316.
483
484 2003-09-18  Gabriel Dos Reis <gdr@integrable-solutions.net>
485
486         * error.c (dump_type): Simplify.  Use pp_type_specifier_seq for
487         "C" types. 
488         * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Fix thinko.
489
490 2003-09-17  Richard Henderson  <rth@redhat.com>
491
492         * semantics.c (expand_body): Don't save/restore input_location.
493
494 2003-09-17  Mark Mitchell  <mark@codesourcery.com>
495
496         PR c++/12266
497         * cp-tree.h (tsubst_flags_t): Add tf_conv.
498         * class.c (standard_conversion): Pass tf_conv to
499         instantiate_type.
500         (resolve_address_of_overloaded_function): Do not call mark_used
501         when just checking conversions.
502
503         PR debug/12066
504         * cp-lang.c (LANG_HOOKS_BUILTIN_TYPE_DECLS): Define.
505         * cp-tree.h (cxx_builtin_type_decls): Declare.
506         * decl.c (builtin_type_decls): New variables.
507         (cxx_builtin_type_decls): New function.
508         (record_builtin_type): Add to builtin_type_decls.
509
510 2003-09-17  Richard Henderson  <rth@redhat.com>
511
512         PR c++/12316
513         * semantics.c (expand_or_defer_fn): Inc/dec function_depth.
514
515 2003-09-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
516
517         PR c++/7939
518         * typeck.c (comptypes): Don't ICE when its first argument is
519         error_mark_node.
520         (compparms): Reverse the arguments of same_type_p.
521
522 2003-09-15  Nathan Sidwell  <nathan@codesourcery.com>
523
524         PR c++/12184
525         * typeck.c (convert_arguments): Return error_mark_node for an
526         incomplete parameter. Make error message more informative.
527
528 2003-09-12  Mark Mitchell  <mark@codesourcery.com>
529
530         PR c++/3907
531         * class.c (maybe_note_name_used_in_class): Refine test for whether
532         or not we are in a class scope.
533
534         * cp-tree.h (language_function): Remove x_expanding_p.
535         (expanding_p): Remove.
536         (doing_semantic_analysis_p): Remove.
537         (scope_kind): Add sk_function_parms, sk_class,
538         sk_namespace.
539         (innermost_scope_kind): New method.
540         * call.c (cxx_type_promotes_to): Use type_decays_to.
541         * cp-lang.c (LANG_HOOKS_PUSHLEVEL): Redefine.
542         (LANG_HOOKS_POPLEVEL): Likewise.
543         * decl.c (cp_binding_level): Remove parm_flag, template_parms_p,
544         template_spec_p, namespace_p, is_for_scope, is_try_scope, and
545         is_catch_scope.  Add kind and explicit_spec_p.
546         (cxx_scope_descriptor): Use a lookup table.
547         (find_class_binding_level): Use "kind" field in binding_level, not
548         the various flags.
549         (pop_binding_level): Likewise.
550         (innermost_nonclass_level): Likewise.
551         (toplevel_bindings_p): Likewise.
552         (namespace_bindings_p): Likewise.
553         (template_parm_scope_p): Likewise.
554         (innermost_scope_kind): New method.
555         (current_tmpl_spec_kind): Use "kind" field in binding_level, not
556         the various flags.
557         (pushlevel): Remove check for doing_semantic_analysis_p.
558         (begin_scope): Simplify.
559         (add_decl_to_level): Use "kind" field in binding_level, not
560         the various flags.
561         (push_local_binding): Likewise.
562         (pop_label): Remove check for doing_semantic_analysis_p.
563         (poplevel): Use "kind" field in binding_level, not
564         the various flags.
565         (set_block): Remove check for doing_semantic_analysis_p.
566         (pushlevel_class): Use "kind" field in binding_level, not
567         the various flags. 
568         (poplevel_class): Likewise.
569         (initial_push_namespace_scope): Likewise.
570         (maybe_push_to_top_level): Likewise.
571         (set_identifier_type_value_with_scope): Likewise.
572         (pop_everything): Likewise.
573         (maybe_process_template_type_declaration): Likewise.
574         (pushtag): Likewise.
575         (pushdecl): Likewise.
576         (pushdecl_with_scope): Likewise.
577         (check_previous_goto_1): Likewise.
578         (define_label): Likewise.
579         (finish_case_label): Likewise.
580         (lookup_tag): Likewise.
581         (unqualified_namespace_lookup): Likewise.
582         (lookup_name_real): Likewise.
583         (lookup_name_current_level): Likewise.
584         (lookup_type_current_level): Likewise.
585         (record_builtin_type): Likewise.
586         (cp_make_fname_decl): Likewise.
587         (maybe_inject_for_scope_var): Likewise.
588         (cp_finish_decl): Remove check for doing_semantic_analysis_p.
589         (start_function): Use begin_scope, not pushlevel.
590         (finish_function): Use "kind" field in binding_level, not
591         the various flags.
592         (start_method): Use begin_scope, not pushlevel.
593         (make_label_decl): Do not check expanding_p.
594         (save_function-data): Do not set expanding_p.
595         (cxx_push_function_context): Do not clear expanding_p.
596         * semantics.c (cxx_expand_function_start): Do not set expanding_p.
597         
598 2003-09-14  Mark Mitchell  <mark@codesourcery.com>
599
600         * class.c (layout_class_type): Make DECL_MODE match TYPE_MODE for
601         an bit-field whose width exceeds that of its type.
602
603 2003-09-14  Geoffrey Keating  <geoffk@apple.com>
604
605         * rtti.c (get_tinfo_decl): Set TREE_PUBLIC for typeinfo decls.
606
607 2003-09-14  Kazu Hirata  <kazu@cs.umass.edu>
608
609         * ChangeLog: Follow spelling conventions.
610         * parser.c: Likewise.
611
612 2003-09-13  Richard Henderson  <rth@redhat.com>
613
614         * decl2.c (finish_file): Check cgraph_assemble_pending_functions
615         during relaxation loop.
616
617 2003-09-11  David Edelsohn  <edelsohn@gnu.org>
618
619         * decl2.c (var_finalized_p): Swap arms of conditional.
620
621 2003-09-10  Nathan Sidwell  <nathan@codesourcery.com>
622
623         PR c++/11788
624         * typeck.c (build_address): If it is a function, mark it used.
625         (build_unary_op): Do not lose object's side-effects when taking
626         address of static member function.
627         * class.c (resolve_address_of_overloaded_function): Use
628         tsubst_flags_t parameter. Only expect overload sets. Adjust.
629         (instantiate_type): Adjust flags passing. Do not lose object's
630         side-effects when taking address of static member function.
631
632 2003-09-11  Richard Henderson  <rth@redhat.com>
633
634         * semantics.c (expand_or_defer_fn): Update for new
635         cgraph_finalize_function argument.
636
637 2003-09-10  Richard Henderson  <rth@redhat.com>
638
639         * decl2.c (cxx_callgraph_analyze_expr): Mark argument unused.
640
641 2003-09-10  Jan Hubicka  <jh@suse.cz>
642
643         * decl2.c (var_finalized_p): New.
644         (maybe_emit_vtables, write_out_vars, finish_file): Use it.
645
646 2003-09-10  Richard Henderson  <rth@redhat.com>
647
648         * decl2.c (cxx_callgraph_analyze_expr): New, from corpse of
649         mark_member_pointers.
650         (lower_function): Remove.
651         * cp-tree.h: Update to match.
652         * cp-lang.c (LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR): New.
653         (LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Remove.
654
655 2003-09-09  Richard Henderson  <rth@redhat.com>
656
657         * semantics.c (expand_or_defer_fn): Update call to 
658         cgraph_finalize_function.
659
660         * semantics.c (expand_or_defer_fn): Use cgraph_finalize_function
661         always.
662
663         * decl2.c (finish_file): Avoid out-of-bounds array reference
664         during memmove.
665
666 2003-09-09  Richard Henderson  <rth@redhat.com>
667
668         * decl2.c (mark_member_pointers): Rename from
669         mark_member_pointers_and_eh_handlers and don't check eh handlers.
670
671 2003-09-09  Christian Ehrhardt  <ehrhardt@mathematik.uni-ulm.de>
672
673         PR bootstrap/12168
674         * method.c (use_thunk): Clear DECL_RTL of copied nodes.
675
676 2003-09-08  Mark Mitchell  <mark@codesourcery.com>
677
678         * cp-lang.c (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define to
679         c_register_builtin_type.
680
681         PR c++/11786
682         * decl2.c (add_function): Do not complain about seeing the same
683         non-function twice.
684         * semantics.c (perform_koenig_lookup): Improve documentation.
685
686         PR c++/5296
687         * pt.c (try_one_overload): Add addr_p parameter.
688         (resolve_overloaded_unification): Pass it.
689
690 2003-09-08  Richard Henderson  <rth@redhat.com>
691
692         * optimize.c (maybe_clone_body): Inc/dec function_depth.
693
694 2003-09-08  Richard Henderson  <rth@redhat.com>
695
696         * decl.c (finish_function): Clear current_function_decl.
697         * decl2.c (mark_used): Don't push/pop gc context.
698         * optimize.c (optimize_function): Likewise.
699         * tree.c (cp_cannot_inline_tree_fn): Likewise.
700         * pt.c (instantiate_decl): Inc/dec function_depth instead.
701         * semantics.c (expand_body): Update for tree_rest_of_compilation
702         nested argument.
703
704 2003-09-07  Gabriel Dos Reis  <gcc@integrable-solutions.net>
705
706         PR c++/11762
707         * error.c (dump_decl): Handle namespace-alias-definition.
708         * decl.c (warn_extern_redeclared_static): There is no point in
709         checking changes in storage class specifier for a namespace
710         declaration. 
711         (duplicate_decls): Tidy diagnostic message.
712         * cxx-pretty-print.c (pp_cxx_left_brace): New macro.
713         (pp_cxx_right_brace): Likewise.
714         (pp_cxx_original_namespace_definition): New function.
715         (pp_cxx_namespace_alias_definition): Likewise.
716         (pp_cxx_declaration): Use them.  Handle NAMESPACE_DECLs.
717
718 2003-09-07  Jan Hubicka  <jh@suse.cz>
719
720         * decl2.c (maybe_emit_vtables, write_out_vars, finish_file):
721         Avoid re-emitting variables in unit-at-a-time mode.
722
723 2003-09-06  Mark Mitchell  <mark@codesourcery.com>
724
725         PR c++/11867
726         * call.c (standard_conversion): Improve comments.
727         (perform_direct_initialization): Make sure we return an expression
728         of the correct type.
729         * typeck.c (build_static_cast): Check for ambiguity and
730         accessibility when performing conversions.
731
732 2003-09-06  Gabriel Dos Reis  <gdr@integrable-solutions.net>
733
734         * cp-tree.h (add_binding): Remove declaration.
735         * name-lookup.h (supplement_binding): Declare.
736         * decl.c (add_binding): Move to name-lookup.c.
737         (push_local_binding): Adjust.
738         (push_class_binding): Likewise.
739         (set_identifier_type_value_with_scope): Likewise.
740         * name-lookup.c (supplement_binding): Rename from add_binding.
741         Return a bool.  Improve documentation. 
742         (set_namespace_binding): Adjust.
743         * Make-lang.in (cp/name-lookup.o): Depend on toplev.h
744
745 2003-09-06  Nathan Sidwell  <nathan@codesourcery.com>
746
747         PR c++/11794
748         * class.c (pushclass): Push dependent using decls for nested
749         classes of templates too.
750
751 2003-09-06  Roger Sayle  <roger@eyesopen.com>
752
753         PR c++/11409
754         * class.c (resolve_address_of_overloaded_function): When building
755         list of matching non-template function decls, ignore anticipated
756         declarations of undeclared or shadowed GCC builtins.
757
758 2003-09-06  Steven Bosscher  <steven@gcc.gnu.org>
759
760         PR c++/11595
761         * decl.c (define_label): Remove unreachable timevar pop.
762         Always return the decl, even if the definition is invalid.
763
764 2003-09-06  Nathan Sidwell  <nathan@codesourcery.com>
765
766         PR c++/12167
767         * parser.c (cp_parser_late_parsing_default_args): Push & pop the
768         unparsed functions queue.
769
770 2003-09-05  Mark Mitchell  <mark@codesourcery.com>
771
772         PR c++/12163
773         * call.c (perform_direct_initialization): Correct logic for
774         direct-initialization of a class type.
775
776         PR c++/12146
777         * pt.c (lookup_template_function): Robustify.
778
779 2003-09-05  Nathan Sidwell  <nathan@codesourcery.com>
780
781         PR c++/11922
782         * pt.c (tsubst_qualified_id): Make sure we get a non-type.
783         (tsubst_expr, tsubst_copy_and_build): Pass false, not zero, as
784         is_type_p to lookup_qualified_name.
785
786         * semantics.c (finish_call_expr): Refactor some code.
787
788         PR c++/12037
789         * cp-tree.h (COMPOUND_EXPR_OVERLOADED): New.
790         (build_min_non_dep): Declare.
791         * tree.c (build_min): Propagate TREE_SIDE_EFFECTS.
792         (build_min_non_dep): New.
793         * cvt.c (convert_to_void): Don't explicitly copy
794         TREE_SIDE_EFFECTS, TREE_NO_UNUSED_WARNING.
795         * call.c (build_new_method_call): Use build_min_non_dep.
796         * decl2.c (grok_array_decl): Likewise.
797         (build_offset_ref_call_from_tree): Likewise.
798         * typeck.c (finish_class_member_access_expr,
799         build_x_indirect_ref, build_x_binary_op, build_x_unary_op,
800         build_x_conditional_expr, build_x_compound_expr): Likewise.
801         (build_static_cast, build_reinterpret_cast,
802         build_const_cast): Propagate TREE_SIDE_EFFECTS inside a template.
803         * typeck2.c (build_x_arrow): Use build_min_non_dep.
804         (build_functional_cast): Propagate TREE_SIDE_EFFECTS inside a
805         template.
806         * rtti.c (build_dynamic_cast_1): Set DECL_IS_PURE.
807         (build_dynamic_cast): Set TREE_SIDE_EFFECTS.
808         * pt.c (build_non_dependent_expr): Check COMPOUND_EXPR_OVERLOADED.
809
810 2003-09-04  Richard Henderson  <rth@redhat.com>
811
812         * decl2.c (mark_member_pointers_and_eh_handlers): Update for
813         change in cgraph_mark_needed_node arguments.
814
815 2003-09-02  Geoffrey Keating  <geoffk@apple.com>
816
817         PR 12161
818         * decl2.c (mark_used): Use ggc_push_context/ggc_pop_context.
819         * tree.c (cp_cannot_inline_tree_fn): Likewise.
820
821 2003-09-04  Nathan Sidwell  <nathan@codesourcery.com>
822
823         * cp-tree.h (finish_sizeof, finish_alignof): Remove.
824         (expr_sizeof): Replace with ...
825         (cxx_sizeof_or_alignof_expr): ... here.
826         (cxx_sizeof_or_alignof_type): Make complain parameter a bool.
827         * parser.c (cp_parser_unary_expression): Commonize alignof and
828         sizeof handling.
829         * pt.c (tsubst_copy_and_build): Adjust alignof and sizeof
830         substitution.
831         * semantics.c (finish_sizeof, finish_alignof): Remove.
832         * typeck.c (cxx_sizeof_or_alignof_type): Complain parameter
833         becomes bool. Set TREE_READONLY.
834         (expr_sizeof): Replace with ...
835         (cxx_sizeof_or_alignof_expr): ... here. Clear TREE_SIDE_EFFECTS.
836
837 2003-09-04  Mark Mitchell  <mark@codesourcery.com>
838
839         Remove cast-as-lvalue extension.
840         * call.c (build_conditional_expr): Correct formatting.
841         (convert_like_real): Use lvalue_p, not non_cast_lvalue_p.
842         (initialize_real): Use real_lvalue_p, not real_non_cast_lvalue_p.
843         * cp-tree.h (non_cast_lvalue_p): Remove.
844         (real_non_cast_lvalue_p): Remove.
845         (non_cast_lvalue_or_else): Remove.
846         * tree.c (lvalue_p_1): Remove allow_cast_as_lvalue parameter.
847         (real_lvalue_p): Adjust call to lvalue_p_1.
848         (non_cast_lvalue_p): Remove.
849         (non_cast_lvalue_or_else): Remove.
850         (lvalue_p): Adjust call to lvalue_p_1.
851         (lvalue_or_else): Simplify.
852         * typeck.c (build_unary_op): Use lvalue_or_else, not
853         non_cast_lvalue_or_else.
854         (build_static_cast): Use real_lvalue_p, not real_non_cast_lvalue_p.
855
856 2003-09-03  DJ Delorie  <dj@redhat.com>
857
858         * decl.c (finish_function): Pass fndecl to aggregate_value_p.
859
860 2003-09-03  Mark Mitchell  <mark@codesourcery.com>
861
862         PR c++/12053
863         * class.c (include_empty_classes): Correct logic for ABI version 1.
864
865 2003-09-03  Richard Henderson  <rth@redhat.com>
866
867         * optimize.c (optimize_function): Push/pop ggc context around
868         the call to optimize_inline_calls.
869
870 2003-09-02  Scott Brumbaugh  <scottb.lists@verizon.net>
871
872         PR c++/11553
873         * parser.c (cp_parser_decl_specifier_seq): Add check for a
874         duplicate friend decl-specifier.
875
876 2003-09-02  Mark Mitchell  <mark@codesourcery.com>
877
878         PR c++/11847
879         * pt.c (convert_nontype_argument): Correct representation of
880         REFERENCE_TYPE expressions.
881
882         PR c++/11808
883         * cp-tree.h (KOENIG_LOOKUP_P): New macro.
884         (finish_call_expr): Change prototype.
885         * parser.c (cp_parser_postfix_expression): Adjust call to
886         finish_call_expr.
887         * pt.c (tsubst_copy_and_build): Use KOENIG_LOOKUP_P.
888         * semantics.c (finish_call_expr): Add koenig_p parameter.
889
890 2003-09-01  Mark Mitchell  <mark@codesourcery.com>
891
892         PR c++/12114
893         * cp-tree.h (initialize_reference): Change prototype.
894         * call.c (initialize_reference): Add cleanup parameter.
895         * decl.c (grok_reference_init): Likewise.
896         (check_initializer): Likewise.
897         (cp_finish_decl): Insert a CLEANUP_STMT if necessary.
898         (duplicate_decls): When replacing an anticipated builtin, do not
899         honor TREE_NOTHROW.
900         * typeck.c (convert_for_initialization): Correct call to
901         initialize_reference.
902
903         PR c++/11972
904         * pt.c (dependent_type_p_r): Pass only the innermost template
905         arguments to any_dependent_template_arguments_p.
906
907 2003-09-01  Josef Zlomek  <zlomekj@suse.cz>
908
909         * error.c (dump_expr): Kill BIT_ANDTC_EXPR.
910         * lex.c (init_operators): Kill BIT_ANDTC_EXPR.
911         * pt.c (tsubst_copy): Kill BIT_ANDTC_EXPR.
912         * typeck.c (build_binary_op): Kill BIT_ANDTC_EXPR.
913         (tsubst_copy_and_build): Kill BIT_ANDTC_EXPR.
914
915 2003-08-29  Mark Mitchell  <mark@codesourcery.com>
916
917         PR c++/12093
918         * pt.c (build_non_dependent_expr): Do not build a
919         NON_DEPENDENT_EXPR for a STRING_CST.
920
921         PR c++/11928
922         * search.c (add_conversions): Avoid adding two conversion
923         operators for the same type.
924
925 2003-08-29  Mark Mitchell  <mark@codesourcery.com>
926
927         PR c++/6196
928         * pt.c (tsubst_copy_and_build): Correct handling of
929         address-of-label extension.
930         * semantics.c (finish_goto_stmt): The address of a label must go
931         through the lvalue-to-rvalue conversion.
932
933 2003-08-29  Richard Henderson  <rth@redhat.com>
934             Jason Merrill <jason@redhat.com>
935
936         * cp-lang.c (LANG_HOOKS_RTL_EXPAND_START): New.
937         (LANG_HOOKS_RTL_EXPAND_STMT): New.
938         * cp-tree.h (cxx_expand_function_start): Declare.
939         * decl.c (start_function): Use allocate_struct_function.
940         Move stmts_are_full_exprs_p assertion from expand_body.
941         Do not free_after_parsing or free_after_compilation.
942         (cxx_push_function_context): Move code to set struct function
943         data from genrtl_start_function.
944         * optimize.c (optimize_function): Don't inc/dec function_depth.
945         * semantics.c (expand_body): Use tree_rest_of_compilation.
946         (cxx_expand_function_start): Rename from genrtl_start_function,
947         omit bits done by tree_rest_of_compilation.
948         (genrtl_finish_function): Remove.
949         (clear_decl_rtl): Move to ../tree-optimize.c.
950
951 2003-08-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
952
953         PR c++/11811
954         * cxx-pretty-print.c (pp_cxx_canonical_template_parameter): New
955         function. 
956         * cxx-pretty-print.h: Declare.
957         * error.c (dump_template_parameter): Use it.
958         (dump_type): Likewise.
959
960 2003-08-28  Mark Mitchell  <mark@codesourcery.com>
961
962         * init.c (decl_constant_value): Deal with COND_EXPR specially.
963         * call.c (build_conditional_expr): Revert previous patch.
964
965         PR optimization/5079
966         * call.c (build_conditional_expr): Use decl_constant_value to
967         simplify the arguments.
968
969 2003-08-26  Dan Nicolaescu  <dann@ics.uci.edu>
970
971         * parser.c (struct cp_token): Use enum bitfields.
972         (CP_TOKEN_BLOCK_NUM_TOKENS): Make sure cp_token_block fits in a
973         512B allocation unit.
974         (cp_parser_token_tree_map_node): Use enum bitfields.
975
976 2003-08-26  Nathan Sidwell  <nathan@codesourcery.com>
977
978         PR c++/11871
979         * decl.c (push_class_level_binding): Correct old_decl value from
980         my 2003-07-29 reorganization.
981
982         * call.c (build_call): Don't set TREE_SIDE_EFFECTS here.
983         (build_new_method_call): Add goto finish.
984         * semantics.c (simplify_aggr_init_exprs_r): Don't set
985         TREE_SIDE_EFFECTS on a call.
986
987 2003-08-25  Richard Henderson  <rth@redhat.com>
988
989         * cxx-pretty-print.c (pp_cxx_class_name): Remove unused function.
990
991 2003-08-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
992
993         * cxx-pretty-print.h (pp_cxx_flag_default_argument): New flag.
994         (cxx_pretty_printer): Adjust base type.
995         (pp_cxx_function_specifier): Declare.
996         * cxx-pretty-print.c (pp_cxx_whitespace): New macro.
997         (pp_cxx_left_paren): Likewise.
998         (pp_cxx_right_paren): Likewise.
999         (pp_cxx_dot): Likewise.
1000         (pp_cxx_arrow): Likewise.
1001         (pp_cxx_semicolon): Likewise.
1002         (pp_cxx_identifier): Likewise.
1003         (pp_cxx_cv_qualifier_seq): Likewise.
1004         (pp_cxx_storage_class_specifier): Likewise.
1005         (pp_cxx_expression_list): Likewise.
1006         (pp_cxx_space_for_pointer_operator): Likewise.
1007         (pp_cxx_init_declarator): Likewise.
1008         (pp_cxx_call_argument_list): Likewise.
1009         (pp_cxx_nonconsecutive_character): Tidy.
1010         (pp_cxx_conversion_function_id): New function.
1011         (pp_cxx_template_id): Likewise.
1012         (pp_cxx_template_keyword_if_needed): Likewise.
1013         (pp_cxx_nested_name_specifier): Likewise.
1014         (pp_cxx_unqualified_id): Tidy
1015         (pp_cxx_qualified_id): Handle more nodes.
1016         (pp_cxx_primary_expression): Tidy.
1017         (pp_cxx_postfix_expression): Likewise.
1018         (pp_cxx_new_expression): Tidy.
1019         (pp_cxx_delete_expression): Likewise.
1020         (pp_cxx_cast_expression): New function.
1021         (pp_cxx_pm_expression): Tidy.
1022         (pp_cxx_conditional_expression): Likewise.
1023         (pp_cxx_assignment_operator): New function.
1024         (pp_cxx_assignment_expression): Tidy.
1025         (pp_cxx_expression): New function.
1026         (pp_cxx_function_specifier): Likewise.
1027         (pp_cxx_decl_specifier_seq): Likewise.
1028         (pp_cxx_simple_type_specifier): Tidy.
1029         (pp_cxx_type_specifier_seq): Likewise.
1030         (pp_cxx_ptr_operator): New function.
1031         (pp_cxx_implicit_parameter_type): Likewise.
1032         (pp_cxx_parameter_declaration): Tidy.
1033         (pp_cxx_parameter_declaration_clause): New function.
1034         (pp_cxx_exception_specification): Likewise.
1035         (pp_cxx_direct_declarator): Tidy.
1036         (pp_cxx_declarator): Likewise.
1037         (pp_cxx_ctor_initializer): New function.
1038         (pp_cxx_function_definition): Likewise.
1039         (pp_cxx_abstract_declarator): Tidy.
1040         (pp_cxx_direct_abstract_declarator): Likewise.
1041         (pp_cxx_type_id): Likewise.
1042         (pp_cxx_exception_declaration): New function.
1043         (pp_cxx_statement): Likewise.
1044         (pp_cxx_simple_declaration): Likewise.
1045         (pp_cxx_template_parameter_list): Likewise.
1046         (pp_cxx_template_parameter): Likewise.
1047         (pp_cxx_template_declaration): Likewise.
1048         (pp_cxx_explicit_specialization): Likewise.
1049         (pp_cxx_explicit_instantiation): Likewise.
1050         (pp_cxx_declaration): Tidy.
1051         (pp_cxx_pretty_printer_init): Initialize more fields.
1052
1053 2003-08-25  Mark Mitchell  <mark@codesourcery.com>
1054
1055         PR c++/8795
1056         * cp-tree.h (build_cplus_method_type): Remove.
1057         * call.c (standard_conversion): Use build_method_type_directly
1058         instead of build_cplus_method_type.
1059         * class.c (build_clone): Likewise.
1060         (adjust_clone_args): Likewise.
1061         * decl.c (build_ptrmem_type): Likewise.
1062         (grokdeclarator): Likewise.
1063         (check_function_type): Likewise.
1064         * decl2.c (grok_method_quals): Likewise.
1065         (maybe_retrofit_in_chrg): Likewise.
1066         * pt.c (copy_default_args_to_explicit_spec): Likewise.
1067         (tsubst_function_type): Likewise.
1068         (tsubst): Likewise.
1069         * tree.c (build_cplus_method_type): Remove.
1070         * typeck.c (merge_types): Use build_method_type_directly.
1071
1072 2003-08-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1073
1074         PR c++/3765
1075         * search.c (dfs_access_in_type): Fix typo in comment.
1076         (dfs_accessible_queue_p): Likewise.
1077         (dfs_accessible_p): Only terminate when a friend is found.
1078         (accessible_p): Return immediately if access_in_type allows
1079         access.
1080
1081 2003-08-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1082
1083         PR c++/641, c++/11876
1084         * friend.c (add_friend): Add complain parameter.
1085         (make_friend_class): Likewise.
1086         (do_friend): Adjust add_friend call.
1087         * decl.c (grokdeclarator): Adjust make_friend_class call.
1088         * parser.c (cp_parser_member_declaration): Likewise.
1089         (cp_parser_template_declaration_after_export): Likewise.
1090         * pt.c (instantiate_class_template): Adjust make_friend_class
1091         and add_friend call.
1092         * cp-tree.h (make_friend_class): Adjust declaration.
1093         (add_friend): Likewise.
1094
1095 2003-08-21  Jason Merrill  <jason@redhat.com>
1096
1097         PR c++/11283
1098         * call.c (build_conditional_expr): Ignore cv-qual differences for
1099         non-class types.
1100
1101 2003-08-21  Mark Mitchell  <mark@codesourcery.com>
1102
1103         PR c++/11551
1104         * parser.c (cp_parser_id_expression): Add declarator_p parameter.
1105         (cp_parser_primary_expression): Adjust call to
1106         cp_parser_id_expression.
1107         (cp_parser_unqualified_id): Complain about the use of
1108         typedef-names in a destructor declarator.
1109         (cp_parser_postfix_expression): Adjust call to
1110         cp_parser_id_expression.
1111         (cp_parser_type_parameter): Likewise.
1112         (cp_parser_template_argument): Likewise.
1113         (cp_parser_declarator_id): Likewise.
1114
1115         PR c++/11919
1116         * call.c (standard_conversion): Use same_type_p, not pointer
1117         equality, to compare types.
1118
1119         PR c++/10762
1120         * parser.c (cp_parser_using_declaration): Check for invalid uses
1121         of template-ids here...
1122         * decl2.c (do_class_using_decl): ... rather than here.
1123
1124 2003-08-20  Mark Mitchell  <mark@codesourcery.com>
1125
1126         PR c++/11834
1127         * pt.c (more_specialized): Bump processing_template_decl.
1128
1129 2003-08-21  Jason Merrill  <jason@redhat.com>
1130
1131         PR c++/11614
1132         * decl.c (grokdeclarator): Recognize a flexible array based on the
1133         type, not the form of the declarator.
1134
1135 2003-08-20  Jason Merrill  <jason@redhat.com>
1136
1137         * semantics.c (simplify_aggr_init_expr): Split out from
1138         simplify_aggr_init_exprs_r.  Convert slot address to match
1139         the return type.
1140         * cp-tree.h: Declare it.
1141         * tree.c (cp_copy_res_decl_for_inlining): Don't clobber the
1142         DECL_NAME of a user variable.
1143
1144 2003-08-20  Nathan Sidwell  <nathan@codesourcery.com>
1145
1146         PR c++/11945
1147         * pt.c (build_non_dependent_expr): Look inside COND_EXPR and
1148         COMPOUND_EXPR.
1149         * semantics.c (finish_expr_stmt): Always convert to void.
1150         * typeck.c (build_x_compound_exp): Always convert to void.
1151
1152 2003-08-19  Mark Mitchell  <mark@codesourcery.com>
1153
1154         PR c++/11684
1155         * cp-tree.h (grok_op_properties): Change prototype.
1156         * decl.c (grok_op_properties): Add complain parameter.
1157         (grokfndecl): Pass it.
1158         * pt.c (tsubst_decl): Adjust accordingly.
1159
1160         PR c++/10926
1161         * decl.c (start_method): Return immediately if push_template_decl
1162         does not like the declaration.
1163         * pt.c (push_template_decl_real): Disallow member template
1164         destructors.
1165
1166         PR c++/11036
1167         * cp-tree.h (add_binding): Add prototype.
1168         * class.c (add_method): Set TYPE_HAS_DESTRUCTOR if appropriate.
1169         (maybe_warn_about_overly_private_class): Use
1170         CLASSTYPE_DESTRUCTORS.
1171         (pushclass): Adjust call to set_identifier_type_value.
1172         * decl.c (add_binding): Give it external linkage.
1173         (push_local_binding): Adjust call to add_binding.
1174         (push_class_binding): Likewise.
1175         (set_identifier_type_value_with_scope): Change prototype.  Use
1176         add_binding for global bindings.
1177         (set_identifier_type_value): Adjust accordingly.
1178         (pushtag): Likewise.
1179         (pushdecl): Use set_identifier_type_value, not
1180         set_identifier_type_value_with_scope.
1181         (pushdecl_namespace_level): Adjust calls to
1182         SET_IDENTIFIER_TYPE_VALUE to pass a DECL.
1183         (pushdecl_class_level): Likewise.
1184         (lookup_tag): Use select_decl.
1185         (select_decl): Improve comment.
1186         (record_builtin_type): Do not call pushdecl.
1187         (cxx_init_decl_processing): Do not call xref_tag for bad_alloc.
1188         (cp_finish_decl): Adjust call to set_identifier_type_value.
1189         (check_elaborated_type_specifier): Improve checks for invalid uses
1190         of typedefs.
1191         (xref_tag): Adjust call to check_elaborated_type_specifier.
1192         * decl2.c (grokclassfn): Do not set TYPE_HAS_DESTRUCTOR.
1193         * name-lookup.c (set_namespace_binding): Use add_binding.
1194         * parser.c (cp_parser_simple_type_specifier): Return a TYPE_DECL,
1195         rather than an IDENTIFIER_NODE, to represent built-in types, if
1196         requested by the caller.
1197         (cp_parser_postfix_expression): Adjust call.
1198         (cp_parser_type_specifier): Likewise.
1199         (cp_parser_elaborated_type_specifier): Adjust call to
1200         check_elaborated_type_specifier.
1201         * typeck2.c (build_functional_cast): Do not perform name lookups.
1202
1203         PR c++/10717
1204         * decl.c (expand_static_init): Remove unncessary code.
1205
1206 2003-08-19  Andrew Pinski  <pinskia@physics.uc.edu>
1207
1208         PR c++/10538, PR c/5582
1209         * cp/cp-lang.c (LANG_HOOKS_DECL_UNINIT): Define.
1210
1211 2003-08-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1212
1213         PR c++/11174
1214         * init.c (build_offset_ref): Perform access checking for
1215         pointer to member correctly.
1216
1217 2003-08-19  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1218
1219         * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTICS): Fix spelling.
1220
1221 2003-08-18  Nathan Sidwell  <nathan@codesourcery.com>
1222
1223         PR c++/11957
1224         * cp-tree.h (finish_stmt_expr): Add bool parameter.
1225         * init.c (finish_init_stmts): Pass true to finish_stmt_expr. Don't
1226         adjust the stmt_expr here.
1227         (build_vec_init): Use finish_stmt_expr_expr, convert result to
1228         array type.
1229         * parser.c (cp_parser_primar_expression): Adjust finish_stmt_expr
1230         call.
1231         * pt.c (tsubst_copy): Likewise.
1232         * semantics.c (finish_stmt_expr): Add parameter.
1233
1234         * pt.c (instantiate_class_template): Push to class's scope before
1235         tsubsting base.
1236
1237 2003-08-17  Jan Hubicka  <jh@suse.cz>
1238
1239         PR C++/11702
1240         * semantics.c (finish_id_expression): Mark all functions as used.
1241
1242 2003-08-16  Nathan Sidwell  <nathan@codesourcery.com>
1243
1244         PR c++/11512
1245         * cvt.c (convert_to_void): Indicate which side of conditional has
1246         no effects, and rhs of comma operator. Test for no sideeffect
1247         expressions here and always build a convert expr.
1248         * init.c (expand_default_init): Convert the init to void.
1249         * typeck.c (build_x_compound_expr): Do not check for side effects
1250         here.
1251         (build_compound_expr): Do not convert lhs when building a
1252         template.
1253
1254 2003-08-15  Nathan Sidwell  <nathan@codesourcery.com>
1255
1256         * cp-tree.def (NON_DEPENDENT_EXPR): Add operand.
1257         * decl2.c (build_offset_ref_call_from_tree): Use
1258         build_non_dependent_expr.
1259         * error.c (dump_expr) <NON_DEPENDENT_EXPR case>: Dump the operand.
1260         * pt.c (build_non_dependent_expr): Set operand.
1261
1262 2003-08-14  Jan Hubicka  <jh@suse.cz>
1263
1264         * decl2.c (mark_member_pointers): Rename to...
1265         (mark_member_pointers_and_eh_tinfos): ... this one; deal with eh tinfos
1266         (lower_function): Update call.
1267         * except.c (eh_type_info): Break out from ...
1268         (build_eh_type): ... here; tinfo is already used.
1269         (finish_eh_spec_block): Mark tinfos as used.
1270         * semantics.c (finish_handler_params): Mark tinfo as used.
1271         * cp-tree.h (eh_type_info): Declare.
1272
1273 2003-08-15  Nathan Sidwell  <nathan@codesourcery.com>
1274
1275         * pt.c (instantiate_class_template): Set location before
1276         substuting bases.
1277
1278         * decl.c (make_typename_type): Use my_friendly_assert.
1279         * pt.c (tsubst_aggr_type): Rearrange context substitution.
1280
1281 2003-08-14  Jan Hubicka  <jh@suse.cz>
1282
1283         * method.c (use_thunk): Expand body directly.
1284
1285 2003-08-12  Mark Mitchell  <mark@codesourcery.com>
1286
1287         PR c++/11703
1288         * call.c (type_passed_as): Use TYPE_SIZE, not TYPE_PRECISION to
1289         determine whether or not to promote types.
1290         (convert_for_arg_passing): Likewise.
1291         * decl2.c (cp_build_parm_decl): Do not set DECL_ARG_TYPE in
1292         templates.
1293         * pt.c (tsubst_decl): Do not expect it to be set.
1294
1295         PR c++/9512
1296         PR c++/10923
1297         * cp-tree.h (check_elaborated_type_specifier): Declare.
1298         (handle_class_head): Remove.
1299         (note_got_semicolon): Likewise.
1300         (note_list_got_semicolon): Likewise.
1301         (finish_class_definition): Likewise.
1302         * decl.c (check_elaborated_type_specifier): Make it public.
1303         Robustify.
1304         (handle_class_head): Remove.
1305         * parser.c (cp_parser_elaborated_type_specifier): Use
1306         check_elaborated_type_specifier.
1307         (cp_parser_class_specifier): Do not call finish_class_definition.
1308         (cp_parser_class_head): Or handle_class_head.  Check for
1309         over-qualified names.
1310         * semantics.c (finish_class_definition): Remove.
1311
1312         * parser.c (cp_parser_check_for_definition_in_return_type): New
1313         function.
1314         (cp_parser_simple_declaration): Adjust call to
1315         cp_parser_init_declarator.
1316         (cp_parser_decl_specifier_seq): Change type of
1317         declares_class_or_enum parameter.
1318         (cp_parser_explicit_instantiation): Adjust accordingly.
1319         (cp_parser_type_specifier): Change type of
1320         declares_class_or_enum parameter.
1321         (cp_parser_init_declarator): Add declares_class_or_enum
1322         parameter.
1323         (cp_parser_parameter_declaration): Adjust call to
1324         cp_parser_decl_specifier_seq.
1325         (cp_parser_function_definition): Likewise.
1326         (cp_parser_member_declaration): Likewise.
1327         (cp_parser_single_declaration): Likewise.
1328
1329         * cp-tree.h (lang_type_class): Remove has_call_overloaded,
1330         has_array_ref_overloaded, has_arrow_overloaded, and got_semicolon.
1331         (TYPE_OVERLOADS_CALL_EXPR): Remove.
1332         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
1333         (TYPE_OVERLOADS_ARROW): Likewise.
1334         (CLASSTYPE_GOT_SEMICOLON): Likewise.
1335         * class.c (check_bases): Do not set them.
1336         (finish_struct_1): Likewise.
1337         * decl.c (cp_finish_decl): Do not set CLASSTYPE_GOT_SEMICOLON.
1338         (build_ptrmemfunc_type): Likewise.
1339         (grok_op_properties): Do not set TYPE_OVERLOADS_*.
1340         (start_function): Do not check CLASSTYPE_GOT_SEMICOLON.
1341         * decl2.c (grokfield): Do not set CLASSTYPE_GOT_SEMICOLON.
1342         * lex.c (note_got_semicolon): Remove.
1343         (note_list_got_semicolon): Likewise.
1344         * parser.c (cp_parser_simple_declaration): Do not call
1345         note_list_got_semicolon.
1346         * pt.c (list_eq): Remove.
1347         (lookup_template_class): Do not set CLASSTYPE_GOT_SEMICOLON.
1348         (instantiate_class_template): Do not set TYPE_OVERLOADS*.
1349         (instantiate_class_template): Do not set CLASSTYPE_GOT_SEMICOLON.
1350         * ptree.c (cxx_print_type): Do not print them.
1351         * semantics.c (finish_member_class_template): Do not call
1352         note_list_got_semicolon.
1353
1354 2003-08-11  Aldy Hernandez  <aldyh@redhat.com>
1355
1356         * call.c (standard_conversion): Opaque pointers interconvert.
1357
1358         * testsuite/g++.dg/other/opaque-3.C: New.
1359
1360 2003-08-11  Mark Mitchell  <mark@codesourcery.com>
1361
1362         * typeck.c (merge_types): Handle cv-qualified pointer-to-member
1363         types correctly.
1364
1365 2003-08-10  Mark Mitchell  <mark@codesourcery.com>
1366
1367         PR c++/11789
1368         * cp-tree.h (get_vbase): Remove.
1369         (get_vbase_types): Remove.
1370         * init.c (expand_member_init): Correct logic for looking up base
1371         classes.
1372
1373 2003-08-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1374
1375         * error.c (dump_expr): Tidy.
1376         * cxx-pretty-print.c (pp_cxx_nonconsecutive_character): New.
1377         (pp_cxx_begin_template_argument_list): Likewise.
1378         (pp_cxx_end_template_argument_list): Likewise.
1379         (is_destructor_name): Likewise.
1380         (pp_cxx_unqualified_id): Likewise.
1381         (pp_cxx_qualified_id): Likewise.
1382         (pp_cxx_id_expression): Likewise.
1383         (pp_cxx_new_expression): Likewise.
1384         (pp_cxx_delete_expression): Likewise.
1385         (pp_cxx_pm_expression): Likewise.
1386         (pp_cxx_type_specifier): Rework.
1387         (pp_cxx_type_id): Likewise.
1388         (pp_cxx_primary_expression): Likewise.
1389         (pp_cxx_postfix_expression): Likewise.
1390         (pp_cxx_unary_expression): Likewise.
1391         (pp_cxx_multiplicative_expression): Likewise.
1392         (pp_cxx_conditional_expression): Likewise.
1393         (pp_cxx_assignment_expression): Likewise.
1394         (pp_cxx_pretty_printer_init): Tidy.
1395
1396 2003-08-10  Nathan Sidwell  <nathan@codesourcery.com>
1397
1398         * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): non-NULL
1399         NODE is always a TREE_VEC of nonzero size.
1400         (NUM_TMPL_ARGS): NODE is always a TREE_VEC.
1401         * decl2.c (arg_assoc): Template args will be a vec.
1402         * error.c (dump_decl) <TEMPLATE_ID_EXPR case>: Call
1403         dump_template_argument_list.
1404         (dump_template_parms): Args will be a vec.
1405         * parser.c (cp_parser_template_argument_list): Produce a
1406         vector, not a list.
1407         * pt.c (coerce_template_parms): Args are always vectors.
1408         (mangle_class_name_for_template): Likewise.
1409         (lookup_template_function): Likewise.
1410         (lookup_template_class): Likewise.
1411         (tsubst_template_args): Likewise.
1412         (tsubst_baselink): Use tsubst_template_args.
1413         (tsubst_qualified_id): Likewise.
1414         (tsubst_copy) <TEMPLATE_ID_EXPR case>: Likewise.
1415         (tsubst_copy_and_build) <TEMPLATE_ID_EXPR case>: Likewise.
1416         (any_dependent_template_args_p):  Args are always vectors.
1417         * tree.c (cp_tree_equal): Add TEMPLATE_ID_EXPR case.
1418
1419         PR c++/11670
1420         * call.c (convert_like_real): Add rvalue binding error message.
1421         * error.c (dump_expr) <NOP_EXPR case>: Detect when the no expr is
1422         really a cast.
1423
1424         PR c++/10530
1425         * pt.c (dependent_type_p_r): A dependent template-id is a class
1426         type with dependent template arguments, or a bound template
1427         template parameter.
1428         (type_dependent_expression_p): A template function decl cannot
1429         have a dependent context.
1430
1431 2003-08-07  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1432
1433         PR c++/5767
1434         * parser.c (cp_parser_class_name): Return immediately when scope
1435         is error_mark_node.
1436
1437 2003-08-07  Aldy Hernandez  <aldyh@redhat.com>
1438
1439         * cp/Make-lang.in (cp/call.o): Add dependency for target.h.
1440
1441         * cp/call.c (standard_conversion): Support opaque types.
1442         Include target.h.
1443         (strip_top_quals): Use cp_build_qualified_type instead of
1444         TYPE_MAIN_VARIANT.
1445
1446         * cp/typeck.c (convert_for_assignment): Support opaque types.
1447
1448         * testsuite/g++.dg/other/opaque-1.C: New.
1449
1450         * testsuite/g++.dg/other/opaque-2.C: New.
1451
1452 2003-08-06  Aldy Hernandez  <aldyh@redhat.com>
1453
1454         * decl.c (grokparms): Use cp_build_qualified_type instead
1455         TYPE_MAIN_VARIANT.
1456
1457 2003-08-05  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1458
1459         * cxx-pretty-print.h: New file.
1460         * cxx-pretty-print.c: Likewise.
1461         * error.c (scratch_pretty_printer): Change type.
1462         (init_error): Tidy.
1463         (dump_aggr_type): Likewise.
1464         (dump_global_iord): Likewise.
1465         (dump_expr): Likewise.
1466         (dump_char): Remove.
1467         * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTITCS): Define.
1468         (cxx_initialize_diagnostics): New function.
1469         * Make-lang.in (CXX_OBJS): Add cp/cxx-pretty-print.o
1470         (CXX_PRETTY_PRINT_H): New variable.
1471         (cp/cxx-pretty-print.o): New rule.
1472         (cp/cp-lang.o): Update dependence.
1473         (cp/error.o): Likewise.
1474
1475 2003-08-05  Steven Bosscher  <steven@gcc.gnu.org>
1476
1477         * cp-tree.h (struct lang_decl): Don't include c_lang_decl.
1478         (DECL_DECLARED_INLINE_P): Remove.
1479         * decl2.c (import_export_decl): Only look at DECL_DECLARED_INLINE_P
1480         if decl is a FUNCTION_DECL.  This never made sense, but now it is
1481         required to avoid a tree check failure.
1482         * decl.c (grokfndecl): Don't touch DID_INLINE_FUNC.
1483         * optimize.c (maybe_clone_body): Likewise.
1484
1485 2003-08-04  Roger Sayle  <roger@eyesopen.com>
1486
1487         * decl.c (cxx_insert_default_attributes): Delete.
1488         * cp-tree.h (cxx_insert_default_attributes): Don't prototype.
1489         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Don't define.
1490
1491 2003-08-03  Nathan Sidwell  <nathan@codesourcery.com>
1492
1493         PR c++/11704
1494         * pt.c (type_dependent_expression_p): Cope with COMPONENT_REF with
1495         unknown type.
1496
1497         PR c++/11766
1498         * typeck.c (comp_ptr_ttypes_real): Don't loop on pointers to
1499         member functions.
1500
1501 2003-08-02  Nathan Sidwell  <nathan@codesourcery.com>
1502
1503         PR c++/9447
1504         * cp-tree.def (USING_DECL): Document its type.
1505         * class.c (pushclass): If we're entering a template, push any
1506         dependent using decls it has.
1507         * decl2.c (do_class_using_decl): Refactor. Type is NULL iff it is
1508         a dependent scope.
1509         * pt.c (tsubst_decl) <USING_DECL case>: Set type.
1510         (tsubst): Remove USING_DECL checks.
1511         (type_dependent_expression_p): Remove USING_DECL case.
1512         * semantics.c (finish_member_declaration): A USING_DECL's type
1513         indicates whether it is dependent.
1514
1515 2003-08-02  Nathan Sidwell  <nathan@codesourcery.com>
1516
1517         * cp-tree.h (pushclass): Remove unneeded parameter.
1518         * class.c (pushclass): Remove unneeded MODIFY parm. Adjust.
1519         (push_nested_class): Adjust pushclass call.
1520         * pt.c (instantiate_class_template): Likewise.
1521         * semantics.c (begin_class_definition): Likewise.
1522
1523 2003-08-01  Nathanael Nerode  <neroden@gcc.gnu.org>
1524
1525         * typeck2.c (add_exception_specifier): Use 'bool' where appropriate.
1526
1527 2003-08-01  Mark Mitchell  <mark@codesourcery.com>
1528
1529         PR c++/11697
1530         * decl.c (decls_match): Don't ignore the types of template
1531         classes.
1532
1533         PR c++/11744
1534         * pt.c (tsubst_copy_and_build): Refine Koenig lookup logic.
1535
1536 2003-08-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1537
1538         PR c++/8442, c++/8806
1539         * decl.c (qualify_lookup): Accept TEMPLATE_DECL if types are
1540         preferred.
1541         (check_elaborated_type_specifier): Add allow_template_p
1542         parameter.  Check tag mismatch and class template.
1543         (xref_tag): Add template_header_p parameter.  Add assertion
1544         that name is an IDENTIFIER_NODE.  Remove implicit typename
1545         warning.  Simplify lookup process if globalize is true.
1546         (cxx_init_decl_processing): Adjust call to xref_tag.
1547         (xref_tag_from_type): Likewise.
1548         * decl2.c (handle_class_head): Likewise.
1549         * parser.c (cp_parser_elaborated_type_specifier,
1550         cp_parser_class_head): Likewise.
1551         * rtti.c (init_rtti_processing, build_dynamic_cast1,
1552         tinfo_base_init, emit_support_tinfos): Likewise.
1553         * class.c (is_base_of_enclosing_class): Remove.
1554         * pt.c (convert_template_argument): Don't accept RECORD_TYPE as
1555         template template argument.
1556         * cp-tree.h (xref_tag): Adjust declaration.
1557         (is_base_of_enclosing_class): Remove.
1558         * NEWS: Document template template argument change.
1559
1560 2003-08-01  Nathan Sidwell  <nathan@codesourcery.com>
1561
1562         * parser.c (cp_parser_init_declarator,
1563         cp_paser_member_declaration): Reformat.
1564         * pt.c (lookup_template_class, type_unification_real, unify,
1565         type_dependent_expression_p): Reformat.
1566
1567         PR c++/11295
1568         * cp-tree.h (tubst_flags_t): Add tf_stmt_expr_cmpd,
1569         tf_stmt_expr_body.
1570         (finish_stmt_expr_expr): Declare.
1571         * parser.c (cp_parser_primary_expression): Tell
1572         cp_parser_compount_statement that it is a statement expression.
1573         (cp_parser_statement, cp_parser_labeled_statement,
1574         cp_parser_compound_statement, cp_parser_statement_seq_opt): Add
1575         in_statement_expr_p parameter.
1576         (cp_parser_expression_statement): Likewise. Call
1577         finish_stmt_expr_expr for final expression of a statement
1578         expression.
1579         (cp_parser_for_init_statement,
1580         cp_parser_implicitly_scoped_statement,
1581         cp_parser_already_scoped_statement, cp_parser_function_definition,
1582         cp_parser_try_block, cp_parser_handled): Adjust.
1583         * pt.c (tsubst_copy) <STMT_EXPR case>: Pass tf_stmt_expr.
1584         (tsubst_expr): Process tf_stmt_expr and tf_stmt_exprs flags.
1585         (tsubst_expr) <EXPR_STMT case>: Check tf_stmt_exprs flag.
1586         * semantics.c (finish_expr_stmt): Do not deal with statement
1587         expressions.
1588         (begin_stmt_expr): Clear last_expr_type.
1589         (finish_stmt_expr_expr): New.
1590         (finish_stmt_expr): Process the value expression.
1591
1592         * typeck.c (build_compound_expr): If RHS is a TARGET_EXPR, put the
1593         compound expr inside the target's initializer.
1594
1595         PR c++/11525
1596         * parser.c (cp_parser_primary_expression): Do not set
1597         non-constant-p merely because it is a dependent scope.
1598
1599         PR c++/9447
1600         * decl2.c (do_class_using_decl): Set type to NULL_TREE.
1601         * semantics.c (finish_expr_stmt): Do not convert to void in a
1602         template.
1603
1604 2003-07-31  Nathan Sidwell  <nathan@codesourcery.com>
1605
1606         * pt.c (coerce_template_parms): Refactor.
1607         (fn_type_unification): Increment processing_template_decl when
1608         tsubsting an incomplete set of explicit args.
1609
1610         PR c++/11347
1611         * pt.c (instantiate_class_template): Increment
1612         processing_template_decl around the tsubst of a template member
1613         class.
1614         (tsubst_qualified_id): Assert we do not have a dependent scope.
1615
1616         * pt.c (coerce_template_template_parms, lookup_template_class,
1617         can_complete_type_without_circularity, instantiate_class_template,
1618         tsubst_decl, unify): Reformat.
1619
1620 2003-07-31  Jan Hubicka  <jh@suse.cz>
1621
1622         * decl2.c (maybe_make_one_only): Use mark_referenced.
1623         * method.c (use_thunk): Likewsie.
1624
1625 2003-07-30  Jan Hubicka  <jh@suse.cz>
1626
1627         * class.c (build_vtable_entry_ref): Kill.
1628         (build_vtbl_ref_1): Do not call build_vtable_entry_ref.
1629         (build_vfn_ref): Do not call build_vtable_entry_ref.
1630         * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Kill.
1631         * cp-tree.h (prepare_assemble_variable): Kill.
1632         * cp-decl.c (prepare_assemble_variable): Kill.
1633
1634 2003-07-29  Geoffrey Keating  <geoffk@apple.com>
1635
1636         * parser.c (cp_lexer_new_main): Use c_common_no_more_pch instead
1637         of setting valid_pch by hand.
1638
1639 2003-07-29  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
1640
1641         * decl.c (finish_enum): Initialize underlying_type.
1642
1643 2003-07-29  Nathan Sidwell  <nathan@codesourcery.com>
1644
1645         PR c++/9447
1646         * decl.c (add_binding): Add bval local variable.
1647         (push_class_level_binding): Likewise. Allow a USING_DECL to be
1648         pushed.
1649         * decl2.c (do_class_using_decl):  The type of a using decl is
1650         unknown.
1651         * parser.c (cp_parser_postfix_expression): Refactor unqualified-id
1652         function call lookup code.
1653         * pt.c (tsubst): A USING_DECL will have unknown type.
1654         (tsubst_copy_and_build): Allow a using decl.
1655         (type_dependent_expression_p): A USING_DECL will make it
1656         dependent.
1657         * semantics.c (finish_member_declaration): Push a dependent using
1658         declaration.
1659
1660 2003-07-28  Mark Mitchell  <mark@codesourcery.com>
1661
1662         PR c++/11530
1663         * parser.c (cp_parser_postfix_expression): Do not call mark_used.
1664         * semantics.c (finish_id_expression): Call mark_used for all
1665         declarations.
1666
1667 2003-07-28  Mark Mitchell  <mark@codesourcery.com>
1668
1669         PR c++/11667
1670         * call.c (standard_conversion): Allow all integral->enumeral
1671         conversions, after marking them as bad.
1672         * decl.c (finish_enum): Make sure that all enumerators are
1673         properly converted to the underlying type.
1674         (build_enumerator): Set DECL_CONTEXT for namespace-scope
1675         enumeration types.
1676         * pt.c (tsubst_copy): Adjust handling of CONST_DECLs accordingly.
1677         (tsubst_enum): Tidy.
1678
1679         * Make-lang.in (typeck.o): Depend on convert.h.
1680         (class.o): Likewise.
1681         (rtti.o): Likewise.
1682         * call.c: Include convert.h.
1683         (convert_arg_to_ellipsis): Use convert_to_real.
1684         * class.c: Include convert.h.
1685         (build_base_path): Use convert_to_integer.
1686         * rtti.c: Include convert.h.
1687         (build_headof): Use convert_to_integer.
1688         * typeck.c: Include convert.h.
1689         (decay_conversion): Use convert_to_integer.
1690         (build_unary_op): Use build_nop.
1691         (get_delta_difference): Use convert_to_integer.
1692         (build_ptrmemfunc): Avoid unncessary conversions.
1693
1694 2003-07-28  Jan Hubicka  <jh@suse.cz>
1695
1696         * decl2.c (mark_member_pointers): Verify that member pointer points to
1697         the function.
1698
1699 2003-07-28  Nathan Sidwell  <nathan@codesourcery.com>
1700
1701         * cp-tree.h (begin_compound_stmt): No scope arg is a bool.
1702         (finish_compound_stmt): Remove no scope arg.
1703         * decl.c (register_dtor_fn): Adjust begin_compound_stmt and
1704         end_compound_stmt calls.
1705         (expand_static_init, begin_destructor_body, begin_function_body,
1706         finish_function_body): Likewise.
1707         * decl2.c (start_objects, finish_objects,
1708         start_static_storage_duration_function,
1709         finish_static_storage_duration_function): Likewise.
1710         * init.c (begin_init_stmts, finish_init_stmts,
1711         construct_virtual_base, build_vec_init): Likewise.
1712         * method.c (do_build_assign_ref, synthesize_method): Likewise.
1713         * parser.c (cp_parser_compound_statement,
1714         cp_parser_implicitly_scoped_statement,
1715         cp_parser_already_scoped_statement): Likewise.
1716         * pt.c (tsubst_expr): Likewise.
1717         * semantics.c (begin_compound_stmt): No scope arg is a bool.
1718         (finish_compound_stmt): Remove no scope arg.
1719
1720         * error.c (dump_expr) <COMPOUND_EXPR case>: A compound expr is
1721         always dyadic.
1722
1723 2003-07-27  Mark Mitchell  <mark@codesourcery.com>
1724
1725         * call.c (standard_conversion): Tweak handling of
1726         pointer-to-member types.
1727         * pt.c (tsubst): Correctly qualify pointers-to-data member types.
1728         * typeck.c (comp_ptr_ttypes_real): Check qualifiers on
1729         pointer-to-data member types.
1730
1731 2003-07-27  Nathan Sidwell  <nathan@codesourcery.com>
1732
1733         * parser.c (cp_parser_type_parameter): Reformat.
1734         (cp_parser_parameter_declaration): Deprecate default args where
1735         not allowed.
1736
1737 2003-07-26  Nathan Sidwell  <nathan@codesourcery.com>
1738
1739         * cfns.h: Rebuilt.
1740
1741         * cp-tree.h (begin_init_stmts, finish_init_stmts): Remove.
1742         (begin_global_stmt_expr, finish_global_stmt_expr): Remove.
1743         * init.c (begin_init_stmts): Make static. Return is_global
1744         value. Always call begin_stmt_expr.
1745         (finish_init_stmts): Make static. Add is_global parm. Always
1746         building a stmt tree.
1747         (build_aggr_init): Adjust begin_init_stmts, finish_init_stmts calls.
1748         (build_vec_init): Likewise. Always building a stmt tree.
1749         (expand_default_init): Always building a stmt tree.
1750         (get_temp_regvar): Likewise.
1751         * semantics.c (begin_global_stmt_expr,
1752         finish_global_stmt_expr): Remove.
1753
1754 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
1755
1756         * cp-tree.h (build_compound_expr): Take LHS & RHS args.
1757         (build_x_compound_expr_from_list): Declare.
1758         * typeck.c (build_x_compound_expr_from_list): New.
1759         (build_x_compound_expr): Adjust.
1760         (build_compound_expr): Remove unreachable code. Take two
1761         parameters, adjust.
1762         * decl.c (grok_reference_init): Use
1763         build_x_compound_expr_from_list.
1764         (expand_static_init): Adjust build_compound_expr call.
1765         (cxx_maybe_build_cleanup): Likewise.
1766         * init.c (perform_member_init): Use
1767         build_x_compound_expr_from_list.
1768         (build_new_1): Likewise.
1769         (build_vec_delete): Adjust build_compound_expr calls.
1770         (build_vbase_delete): Likewise.
1771         * typeck2.c (store_init_value): Use
1772         build_x_compound_expr_from_list.
1773         (build_functional_cast): Likewise.
1774
1775 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
1776
1777         * cp-tree.h (enum tsubst_flags_t): Add tf_user.
1778         * decl.c (make_typename_type): Pass it.
1779         * pt.c (lookup_template_class): Use it.
1780         (resolve_typename_type): Pass it.
1781         * semantics.c (finish_template_type): Pass it.
1782
1783 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
1784
1785         PR c++/11617
1786         * cp-tree.h (qualified_name_lookup_error): Declare.
1787         * pt.c (tsubst_qualified_id): Use qualified_name_lookup_error for
1788         errors.
1789         (tsubst_expr) <DECL_STMT case>: Likewise.
1790         (tsubst_copy_and_build) <COMPONENT_REF case>: Likewise.
1791         * semantics.c (qualified_name_lookup_error): New, broken out of ...
1792         (finish_id_expression): ... here. Use it.
1793
1794 2003-07-25  Falk Hueffner  <falk.hueffner@student.uni-tuebingen.de>
1795
1796         * cfns.gperf: Add '%%' delimiter to placate gperf 3.0.
1797
1798 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
1799
1800         PR c++/11596
1801         * pt.c (maybe_fold_nontype_arg, maybe_fold_nontype_args): Remove.
1802         (tsubst_template_arg): New.
1803         (tsubst_template_arg_vector): Rename to ...
1804         (tsubst_template_args): ... this. Accept a TREE_LIST form. Use
1805         tsubst_template_arg.
1806         (coerce_template_parms): Use tsubst_template_arg for default
1807         value.
1808         (tsubst_template_parms): Likewise.
1809         (tsubst_aggr_type): Adjust.
1810         (tsubst_decl): Likewise.
1811         (tsubst): Use tsubst_template_arg for a DOMAIN. Adjust.
1812         (tsubst_copy) <TEMPLATE_ID_EXPR case>: Use tsubst_template_args.
1813
1814 2003-07-25 Gabriel Dos Reis  <gdr@integrable-solutions.net>
1815
1816         * Make-lang.in (cp/error.o): Depend on DIAGNOSTIC_H.
1817         * error.c: Use the new pretty-printer framework.
1818
1819 2003-07-24  Per Bothner  <pbothner@apple.com>
1820
1821         * decl.c (pushdecl_class_level): Don't use push_srcloc/pop_srcloc
1822         which causes errors messages to incorrectly mention included files.
1823
1824 2003-07-24  Mark Mitchell  <mark@codesourcery.com>
1825
1826         * cp-tree.h (convert_to_base_statically): Declare.
1827         * call.c (build_special_member_call): Convert INSTANCE to the base
1828         type.
1829         * class.c (convert_to_base_statically): New method.
1830         * init.c (construct_virtual_base): Use it.
1831         * method.c (do_build_assign_ref): Fix typo in comment.
1832
1833 2003-07-24  Jason Merrill  <jason@redhat.com>
1834
1835         * decl.c: Just set truthvalue_* to boolean_*.
1836
1837 2003-07-24  Nathan Sidwell  <nathan@codesourcery.com>
1838
1839         * decl.c (reshape_init): Remove unreachable code.
1840
1841 2003-07-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1842
1843         PR c++/11513
1844         * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): Use current_scope.
1845
1846 2003-07-23  Mark Mitchell  <mark@codesourcery.com>
1847
1848         PR c++/11645
1849         * cp-tree.h (accessible_base_p): Declare.
1850         * call.c (build_over_call): Use it.
1851         * search.c (accessible_base_p): New function, split out from ...
1852         (lookup_base): ... here.
1853
1854         PR c++/11517
1855         * call.c (build_conditional_expr): Use perform_implicit_conversion
1856         and error_operand_p.  Robustify.
1857         * typeck.c (build_unary_op): Use perform_implicit_conversion.
1858
1859 2003-07-23  Nathan Sidwell  <nathan@codesourcery.com>
1860
1861         PR c++/10953
1862         * parser.c (cp_parser_nested_name_specifier): Reset scope on
1863         failure.
1864         (cp_parser_elaborated_type_specifier): Likewise.
1865
1866 2003-07-22  Mark Mitchell  <mark@codesourcery.com>
1867
1868         Eliminate use of POINTER_TYPE for pointers-to-members.
1869         * call.c (standard_conversion): Rework pointer-to-member handling.
1870         Add comments.
1871         (add_builtin_candidate): Likewise.
1872         (resolve_scoped_fn_name): Remove.
1873         (build_conditional_expr): Rework pointer-to-member handling.
1874         (compare_ics): Likewise.
1875         * class.c (check_field_decls): Use TYPE_PTR_P.
1876         * cp-lang.c (cp_var_mod_type_p): Rework pointer-to-member
1877         handling.
1878         * cp-tree.h (SCALAR_TYPE_P): Use TYPE_PTR_TO_MEMBER_P.
1879         (TYPE_PTRMEM_P): Add comment.
1880         (TYPE_PTR_P): Simplify.
1881         (TYPE_PTROB_P): Correct definition.
1882         (TYPE_PTR_TO_MEMBER_P): New macro.
1883         (TYPE_PTRMEM_CLASS_TYPE): Adjust.
1884         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
1885         (resolved_scoped_fn_name): Remove declaration.
1886         (build_offset_ref): Change prototype.
1887         (resolve_offset_ref): Remove.
1888         (comp_target_types): Remove.
1889         * cvt.c (cp_convert_to_pointer): Rework pointer-to-member
1890         handling.
1891         (convert_to_reference): Use can_convert.
1892         (ocp_convert): Improve error handling.  Rework pointer-to-member
1893         handling.
1894         (perform_qualification_conversions): Rework pointer-to-member
1895         handling.
1896         * decl.c (build_ptrmem_type): Handle functions too.
1897         (create_array_type_for_decl): Remove OFFSET_TYPE error message.
1898         (grokdeclarator): Use OFFSET_TYPE for pointers to data members.
1899         (grokparms): Remove OFFSET_TYPE error message.
1900         * dump.c (cp_dump_tree): Rework pointer-to-member handling.
1901         * error.c (dump_type_prefix): Likewise.
1902         * expr.c (cplus_expand_constant): Use build_nop.
1903         * init.c (build_offset_ref): Add address_p parameter.  Fold in
1904         necessary bits from resolve_offset_ref.
1905         (resolve_offset_ref): Remove.
1906         * parser.c (cp_parser_postfix_expression): Remove special case
1907         code for OFFSET_TYPE.
1908         * pt.c (convert_nontype_argument): Rework pointer-to-member
1909         handling.
1910         (convert_template_argument): Likewise.
1911         (unify): Likewise.
1912         (invalid_nontype_parm_type_p): Likewise.
1913         (dependent_type_p_r): Likewise.
1914         * rtti.c (get_tinfo_decl): Remove OFFSET_TYPE special case.
1915         (target_incomplete_p_): Rework pointer-to-member
1916         handling.
1917         (get_pseudo_ti_init): Likewise.
1918         (get_pseudo_ti_desc): Likewise.
1919         * semantics.c (finish_qualified_id_expr): Adjust call to
1920         build_offset_ref.  Remove use of resolve_offset_ref.
1921         * tree.c (pod_type_p): Use TYPE_PTR_TO_MEMBER_P.
1922         * typeck.c (target_type): Use TYPE_PTRMEM_P.
1923         (type_unknown_p): Remove obsolete code about the time before
1924         non-dependent expressions were handled correctly.
1925         (qualify_type_recursive): Remove.
1926         (composite_pointer_type_r): New function.
1927         (composite_pointer_type): Use it.
1928         (merge_types): Remove dead comments.
1929         (comp_cv_target_types): Remove.
1930         (comp_target_types): Likewise.
1931         (comp_target_parms): Likewise.
1932         (cxx_sizeof_or_alignof_type): Remove OFFSET_TYPE error.
1933         (build_indirect_ref): Use TYPE_PTR_TO_MEMBER_P.
1934         (build_binary_op): Do not use of comp_target_types.
1935         (pointer_diff): Remove OFFSET_TYPE case.
1936         (build_unary_op): Adjust pointer-to-member handling.
1937         (unary_complex_lvalue): Likewise.
1938         (check_for_casting_away_constness): Add description parameter.
1939         (build_static_cast): Pass it.
1940         (build_reinterpret_cast): Use check_for_casting_away_constness.
1941         (build_const_cast): Adjust pointer-to-member handling.
1942         (build_c_cast): Likewise.
1943         (convert_for_assignment): Remove OFFSET_TYPE error message.
1944         (comp_ptr_ttypes_real): Adjust pointer-to-member handling.
1945         (comp_ptr_ttypes_reinterpret): Remove.
1946         (casts_away_constness_r): Adjust pointer-to-member handling.
1947         (casts_away_constness): Liekwise.
1948         (strip_all_pointer_quals): Remove.
1949         * typeck2.c (digest_init): Adjust pointer-to-member handling.
1950         (build_m_component_ref): Likewise.
1951
1952 2003-07-22  Wolfgang Bangerth  <bangerth@dealii.org>
1953
1954         * lex.c (unqualified_fn_lookup_error): Mention that the error
1955         message needs to be kept in synch with the manual.
1956
1957 2003-07-22  Nathan Sidwell  <nathan@codesourcery.com>
1958
1959         PR c++/11614
1960         * decl.c (grokdeclarator): An array member is only a flexible
1961         array member if the field itself is the array.
1962
1963 2003-07-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1964
1965         PR c++/10793
1966         * decl.c (xref_basetypes): Handle error_mark_node.
1967
1968 2003-07-22  Nathan Sidwell  <nathan@codesourcery.com>
1969
1970         * cp-tree.h (enum cp_lvalue_kind): Add clk_packed.
1971         * tree.c (lvalue_p_1): Set it.
1972         * class.c (check_field): Don't allow non-packed non-POD fields to
1973         be packed.
1974         * call.c (reference_binding): Need a temporary for all bitfield
1975         and packed fields.
1976         (convert_like_real): Check it is ok to make a temporary here.
1977
1978 2003-07-21  Nathan Sidwell  <nathan@codesourcery.com>
1979
1980         * cp-tree.h (hack_identifier): Remove.
1981         * method.c (hack_identifier): Remove.
1982         * semantics.c (finish_id_expression): Expand hack_identifier
1983         here. Simplify.
1984
1985 2003-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1986
1987         * call.c class.c decl.c decl2.c g++spec.c lex.c parser.c pt.c rtti.c
1988         semantics.c typeck.c: Remove unnecessary casts.
1989
1990 2003-07-18  Nathan Sidwell  <nathan@codesourcery.com>
1991
1992         * cp-tree.h (hack_identifier): Remove.
1993         * method.c (hack_identifier): Remove.
1994         * semantics.c (finish_id_expression): Expand hack_identifier
1995         here. Simplify.
1996
1997 2003-07-18  Nathan Sidwell  <nathan@codesourcery.com>
1998
1999         * cp-tree.h (finish_non_static_data_member): Add object param.
2000         * method.c (hack_identifier): Adjust.
2001         * pt.c (tsubst_copy_and_build) <COMPONENT_REF case>: Don't search
2002         again for a FIELD_DECL.
2003         * semantics.c (finish_non_static_data_member): Add object
2004         parameter. Always save the DECL in the COMPONENT_REF.
2005         * call.c (resolve_scoped_fn_name): Adjust.
2006
2007 2003-07-17  Zack Weinberg  <zack@codesourcery.com>
2008
2009         * pt.c (get_bindings): Make definition consistent with
2010         forward declaration.
2011
2012 2003-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2013
2014         PR c++/7809
2015         * friend.c (add_friend): Check access for member functions
2016         and templates.
2017
2018 2003-07-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2019
2020         PR c++/10668
2021         * typeck.c (build_class_member_access_expr): Improve diagnostic.
2022
2023 2003-07-16  Mark Mitchell  <mark@codesourcery.com>
2024
2025         PR c++/11547
2026         * cp-tree.h (DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P): New
2027         macro.
2028         (DECL_PRETTY_FUNCTION_P): Use VAR_DECL_CHECK.
2029         * decl.c (duplicate_decls): Merge
2030         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2031         * parser.c (cp_parser_postfix_expression): Adjust call to
2032         cp_parser_initializer_list and
2033         cp_parser_parenthesized_expression_list.
2034         (cp_parser_parenthesized_expression_list): Add non_constant_p.
2035         (cp_parser_new_placement): Adjust call to
2036         cp_parser_parenthesized_expression_list.
2037         (cp_parser_direct_new_declarator): Likewise.
2038         (cp_parser_conditional_expression): Remove.
2039         (cp_parser_constant_expression): Parse an assignment-expression,
2040         not a conditional-expression.
2041         (cp_parser_simple_declaration): Resolve expression/declaration
2042         ambiguity more quickly.
2043         (cp_parser_mem_initializer): Adjust call to
2044         cp_parser_parenthesized_expression_list.
2045         (cp_parser_init_declarator): Keep track of whether or not the
2046         initializer is a constant-expression.
2047         (cp_parser_initializer): Add non_constant_p parameter.
2048         (cp_parser_initializer_clause): Likewise.
2049         (cp_parser_initializer_list): Likewise.
2050         (cp_parser_attribute_list): Adjust call to
2051         cp_parser_parenthesized_expression_list.
2052         (cp_parser_functional_cast): Likewise.
2053         * pt.c (tsubst_decl): Copy
2054         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2055         (tsubst_expr): Tweak use of DECL_PRETTY_FUNCTION_P.
2056         * semantics.c (finish_id_expression): Use
2057         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2058
2059 2003-07-16  Neil Booth  <neil@daikokuya.co.uk>
2060
2061         * lang-options.h: Remove.
2062
2063 2003-07-16  Andrew Pinski  <pinskia@physics.uc.edu>
2064
2065         PR c/10962
2066         * class.c (field_decl_cmp): Remove.
2067         (resort_field_decl_cmp): Remove.
2068         (resort_sorted_fields): Remove.
2069         (add_fields_to_vec): Rename to ...
2070         (add_fields_to_record_type): this.
2071         (finish_struct_1): Change to be using
2072         sorted_fields_type's fields.
2073         * cp-tree.h (lang_decl): In lang_decl_u3
2074         change sorted_fields to be a pointer to
2075         sorted_fields_type.
2076         (resort_sorted_fields): Remove prototype.
2077         * search.c (lookup_field_1): Change to be using
2078         sorted_fields_type's fields.
2079
2080 2003-07-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2081
2082         PR c++/5421
2083         * decl.c (grokdeclarator): Handle TEMPLATE_ID_EXPR if friend
2084         is a member of other class.
2085         * friend.c (do_friend): Don't build TEMPLATE_DECL if friend
2086         is a specialization of function template.
2087
2088 2003-07-16  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2089
2090         PR c++/10903
2091         * pt.c (convert_nontype_argument): Fix thinko in diagnostic.
2092         Improve.
2093
2094 2003-07-15  Mark Mitchell  <mark@codesourcery.com>
2095
2096         * cp-tree.def (LOOKUP_EXPR): Remove.
2097         * cp-tree.h (cp_id_kind): Add CP_ID_KIND_UNQUALIFIED_DEPENDENT.
2098         (LOOKUP_EXPR_GLOBAL): Remove.
2099         (get_bindings): Remove.
2100         (is_aggr_type_2): Remove.
2101         * call.c (resolved_scoped_fn_name): Remove support for
2102         LOOKUP_EXPR.
2103         * decl.c (grokfndecl): Likewise.
2104         (grokdeclarator): Likewise.
2105         * error.c (dump_decl): Likewise.
2106         (dump_expr): Likewise.
2107         * friend.c (do_friend): Likewise.
2108         * init.c (build_offset_ref): Likewise.
2109         * lex.c (unqualified_fn_lookup_error): Use pedwarn.  Do not create
2110         LOOKUP_EXPRs
2111         * mangle.c (write_expression): Remove support for LOOKUP_EXPR.
2112         * parser.c (cp_parser_postfix_expression): Modify Koenig lookup
2113         test.
2114         * pt.c (get_bindings): Give it internal linkage.
2115         (check_explicit_specialization): Remove support for LOOKUP_EXPR.
2116         (lookup_template_function): Likewise.
2117         (for_each_tempalte_parm_r): Likewise.
2118         (tsubst_decl): Likewise.
2119         (tsubst_qualified_id): Handle template template parameters.
2120         (tsubst_copy): Remove support for LOOKUP_EXPR.
2121         (tsubst_copy_and_build): Likewise.
2122         (most_general_template): Likewise.
2123         (value_dependent_expression_p): Likewise.
2124         (type_dependent_expression_p): Note that IDENTIFIER_NODEs are
2125         always dependent.
2126         * semantics.c (perform_koenig_lookup): Do not create
2127         IDENTIFIER_NODEs.
2128         (finish_fname): Likewise.
2129         (finish_id_expression): Likewise.
2130         * tree.c (is_aggr_type_2): Remove.
2131
2132 2003-07-16  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2133
2134         PR c++/11531
2135         * typeck.c (check_return_expr): Fix thinko in diagnostic.
2136
2137 2003-07-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2138
2139         PR c++/10108
2140         * pt.c (tsubst_decl) <TEMPLATE_DECL>: Add a check for
2141         error_mark_node.
2142
2143 2003-07-14  Mark Mitchell  <mark@codesourcery.com>
2144
2145         PR c++/11509
2146         * pt.c (dependent_scope_ref_p): New function.
2147         (value_dependent_expression_p): Use it.
2148         (type_dependent_expression_p): Likewise.
2149
2150         * pt.c (tsubst_friend_function): Use reregister_specialization.
2151
2152         PR c++/7019
2153         * cp-tree.h (lookup_qualified_name): Adjust prototype.
2154         * decl.c (lookup_qualified_name): Add complain parameter.  Adjust
2155         call to is_aggr_type.
2156         * parser.c (cp_parser_lookup_name): Adjust call to
2157         lookup_qualified_name.
2158         * pt.c (tsubst_qualified_id): Likewise.
2159         (tsubst_copy_and_build): Likewise.
2160         * semantics.c (finish_qualified_id_expr): Deal with erroneous
2161         expressions.
2162
2163 2003-07-14  Gabriel Dos Reis <gdr@integrable-solutions.net>
2164
2165         PR c++/11510
2166         * call.c (op_error): Properly format  REALPART_EXPR and
2167         IMAGPART_EXPR.
2168         * error.c (dump_expr): Likewise.
2169
2170 2003-07-14  Gabriel Dos Reis <gdr@integrable-solutions.net>
2171
2172         * error.c (dump_expr): Handle EMPTY_CLASS_EXPR.
2173
2174 2003-07-14  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2175
2176         PR c++/5293
2177         * call.c (initialize_reference): Improve diagnostic.
2178
2179 2003-07-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2180
2181         PR c++/11154
2182         * pt.c (more_specialized_class): Add full_args parameter.
2183         (most_specialized_class): Adjust calls to more_specialized_class.
2184         * cp-tree.h (more_specialized_class): Adjust declaration.
2185
2186 2003-07-14  Dan Nicolaescu  <dann@ics.uci.edu>
2187
2188         * lex.c (enum tree_node_kind): Delete.
2189
2190 2003-07-13  Mark Mitchell  <mark@codesourcery.com>
2191
2192         PR c++/11503
2193         * cp-tree.h (DECL_SELF_REFERENCE_P): New macro.
2194         (SET_DECL_SELF_REFERENCE_P): Likewise.
2195         * class.c (build_self_reference): Use SET_DECL_SELF_REFERENCE_P.
2196         * pt.c (tsubst_decl): Copy it.
2197         * search.c (lookup_base): Use DECL_SELF_REFERENCE_P.
2198
2199         * pt.c (reregister_specialization): Fix thinko in previous change.
2200
2201         * cp-tree.h (cp_id_kind): New type.
2202         (unqualified_name_lookup_error): Change prototype.
2203         (unqualified_fn_lookup_error): New function.
2204         (do_identifier): Remove.
2205         (do_scoped_id): Likewise.
2206         (tsubst_copy_and_build): Change prototype.
2207         (reregister_specialization): New function.
2208         (perform_koenig_lookup): Likewise.
2209         (finish_id_expression): Likewise.
2210         * call.c (build_method_call): Adjust call to
2211         unqualified_name_lookup_error.
2212         * decl.c (duplicate_decls): Use reregister_specialization.
2213         * lex.c (is_global): Remove.
2214         (unqualified_name_lookup_error): Return a value.
2215         (do_identifier): Remove.
2216         (do_scoped_id): Likewise.
2217         (identifier_typedecl_value): Remove.
2218         (unqualified_fn_lookup_error): New function.
2219         * parser.c (cp_parser_id_kind): Remove.
2220         (cp_parser_non_constant_id_expression): Remove.
2221         (cp_parser_primary_expression): Use finish_id_expression.
2222         (cp_parser_class_or_namespace_name): Use cp_id_kind, not
2223         cp_parser_id_kind.
2224         (cp_parser_postfix_expression): Use perform_koenig_lookup.
2225         (cp_parser_template_argument): Use cp_id_kind.
2226         (cp_parser_fold_non_dependent_expr): Adjust call to
2227         tsubst_copy_and_build.
2228         * pt.c (unregister_specialization): Rename to ...
2229         (reregister_specialization): This.
2230         (tsubst_friend_function): Use it.
2231         (maybe_fold_nontype_arg): Adjust call to tsubst_copy_and_build.
2232         (tsubst_qualified_id): Likewise.
2233         (tsubst_expr): Likewise.
2234         (tsubst_copy_and_build): Add function_p parameter.  Use
2235         finish_id_expression.  Introduce RECUR macro.
2236         (tsubst_non_call_postfix_expression): New function.
2237         (regenerate_decl_from_template): Use reregister_specialization.
2238         * semantics.c (perform_koenig_lookup): New function.
2239         (finish_id_expression): Likewise.
2240
2241 2003-07-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2242
2243         * pt.c (push_access_scope_real): Remove.
2244         (push_access_scope): Move code from push_access_scope_real.
2245         (pop_access_scope): Don't check for TEMPLATE_DECL.
2246         (instantiate_template): Defer access checking during template
2247         substitution.
2248         (regenerate_decl_from_template): Tidy.
2249
2250 2003-07-11  Nathanael Nerode  <neroden@gcc.gnu.org>
2251
2252         PR c++/11437
2253         * operators.def: Add definitions for __imag__, __real__.
2254
2255 2003-07-11  Nathan Sidwell  <nathan@codesourcery.com>
2256
2257         PR c++/11050
2258         * parser.c (cp_parser_expression_list): Rename to ...
2259         (cp_parser_parenthesized_expression_list): ... here. Add attribute
2260         parameter, parse the surounding parentheses.
2261         (cp_parser_skip_to_closing_parenthesis): Add recover and or_comma
2262         parameters. Return int.
2263         (cp_parser_skip_to_closing_parenthesis or comma): Remove.
2264         (cp_parser_postfix_expression): Adjust function call parsing.
2265         (cp_parser_new_placement): Adjust.
2266         (cp_parser_new_initializer): Likewise.
2267         (cp_parser_cast_expression): Likewise.
2268         (cp_parser_selection_statement): Likewise.
2269         (cp_parser_mem_initializer): Likewise.
2270         (cp_parser_asm_definition): Likewise.
2271         (cp_parser_init_declarator): Likewise.
2272         (cp_parser_declarator): Make
2273         cdtor_or_conv_p an int ptr.
2274         (cp_parser_direct_declarator): Likewise. Check for a parameter
2275         list on cdtors & conv functions.
2276         (cp_parser_initializer): Adjust.
2277         (cp_parser_member_declaration): Adjust.
2278         (cp_parser_attribute_list): Move code into
2279         cp_parser_parens_expression_list.
2280         (cp_parser_functional_cast): Adjust.
2281         * pt.c (type_dependent_expression_p): Erroneous expressions are
2282         non-dependent.
2283
2284 2003-07-11  Geoffrey Keating  <geoffk@apple.com>
2285
2286         * decl.c (cp_finish_decl): Handle 'used' attribute.
2287
2288         * cp-lang.c (c_reset_state): New dummy routine.
2289         * cp-tree.h (finish_file): Move prototype to c-common.h.
2290         * parser.c (c_parse_file): Rename from yyparse; don't call finish_file.
2291
2292 2003-07-11  Mark Mitchell  <mark@codesourcery.com>
2293
2294         PR c++/8327
2295         * pt.c (tsubst_qualified_id): Implement suggested resolution for
2296         Core Issue 2.
2297         (type_dependent_expression_p): Likewise.
2298
2299 2003-07-10  Mark Mitchell  <mark@codesourcery.com>
2300
2301         * typeck.c (build_binary_op): Do not warn about signed
2302         vs. unsigned comparisons in the bodies of templates.
2303
2304         PR c++/9411
2305         * parser.c (cp_parser_postfix_expression): Check dependency of
2306         functions.
2307
2308 2003-07-09  Mark Mitchell  <mark@codesourcery.com>
2309
2310         PR c++/10032
2311         * decl.c (cxx_init_decl_processing): With -pedantic, pedwarns are
2312         still errors.
2313
2314         PR c++/10527
2315         * error.c (decl_to_string): Do not print default argument
2316         expressions.
2317
2318         * cp-tree.h (break_out_calls): Remove declaration.
2319         * tree.c (break_out_calls): Remove.
2320         * typeck.c (build_modify_expr): Avoid invalid sharing of trees.
2321
2322 2003-07-09  Nathan Sidwell  <nathan@codesourcery.com>
2323
2324         PR c++ 9483
2325         * class.c (check_field_decls): Pass DECL_NAME to constructor_name_p.
2326         * decl2.c (constructor_name_p): Avoid repeated constructor_name
2327         calls.
2328         * decl.c (grokdeclarator): Refactor ctor/dtor detection.
2329
2330 2003-07-09  Mark Mitchell  <mark@codesourcery.com>
2331
2332         * typeck.c (build_x_unary_op): Take note of the fact that
2333         PREINCREMENT_EXPR and POSTINCREMENT_EXPR are binary operations on
2334         trees.
2335
2336         * parser.c (cp_parser_primary_expression): Preserve the form of
2337         qualified expressions in templates, even if they are not
2338         dependent.
2339         * pt.c (convert_nontype_argument): Handle non-dependent SCOPE_REFs.
2340         (tsubst_qualified_id): Likewise.
2341         * search.c (accessible_p): Treat everything in the body of a
2342         template as accessible.
2343
2344 2003-07-08  Mark Mitchell  <mark@codesourcery.com>
2345
2346         * cp-tree.def (NON_DEPENDENT_EXPR): New node.
2347         * cp-tree.h (build_call_from_tree): Remove.
2348         (build_member_call): Likewise.
2349         (dependent_template_arg_p): Remove.
2350         (any_dependent_template_arguments_p): New function.
2351         (dependent_template_id_p): Likewise.
2352         (any_type_dependent_arguments_p): Likewise.
2353         (build_non_dependent_expr): Likewise.
2354         (build_non_dependent_args): Likewise.
2355         (build_x_compound_expr): Adjust prototype.
2356         * call.c (build_new_method_call): Handle non-dependent expressions
2357         correctly.
2358         * decl2.c (grok_array_decl): Likewise.
2359         (build_offset_ref_call_from_tree): Likewise.
2360         (build_call_from_tree): Remove.
2361         * error.c (dump_decl): Handle NON_DEPENDENT_EXPR.
2362         (dump_expr): Likewise.
2363         * init.c (build_member_call): Remove.
2364         * mangle.c (write_expression): Update handling for template-ids.
2365         * parser.c (cp_parser_primary_expression): Use
2366         any_dependent_template_arguments_p.  Update constant-expression
2367         handling.
2368         (cp_parser_postfix_expression): Use
2369         any_type_dependent_arguments_p.  Simplify call processing.
2370         (cp_parser_unary_expression): Simplify.
2371         (cp_parser_expression): Adjust for changes to
2372         build_x_compound_expr.
2373         (cp_parser_template_argument): Implement standard-conforming
2374         parsing of non-type template arguments.
2375         (cp_parser_direct_declarator): Use
2376         cp_parser_fold_non_dependent_expr.
2377         (cp_parser_fold_non_dependent_expr): New function.
2378         (cp_parser_next_token_ends_template_argument_p): Likewise.
2379         * pt.c (convert_template_argument): Do not call
2380         maybe_fold_nontype_arg.
2381         (tsubst_baselink): Likewise.
2382         (tsubst_copy_and_build): Share common code.  Make sizeof/alignof
2383         processing work correctly for non-dependent expressions.  Adjust
2384         handling of COMPOUND_EXPR.  Simplify call processing.
2385         (value_dependent_expression_p): Deal with functional casts and
2386         sizeof/alignof correctly.
2387         (type_dependent_expression_p): Handle overloaded functions.
2388         (any_type_dependent_arguments_p): New function.
2389         (any_dependent_template_arguments_p): Likewise.
2390         (dependent_template_p): Treat SCOPE_REFs as dependent.
2391         (dependent_template_id_p): Simplify.
2392         (build_non_dependent_expr): New function.
2393         (build_non_dependent_args): Likewise.
2394         * semantics.c (finish_stmt_expr): Don't make dependent
2395         statement-expresions have void type.
2396         (finish_call_expr): Handle non-dependent expressions
2397         correctly.
2398         * tree.c (lvalue_p_1): Treat NON_DEPENDENT_EXPRs as lvalues.
2399         * typeck.c (cxx_sizeof_or_alignof_type): Give the expression
2400         type size_t, even in templates.
2401         (expr_sizeof): Likewise.
2402         (finish_class_member_access_expr): Handle non-dependent expressions
2403         correctly.
2404         (build_x_indirect_ref): Likewise.
2405         (build_x_binary_op): Likewise.
2406         (build_x_unary_op): Likewise.
2407         (build_x_conditional_expr): Likewise.
2408         (build_x_compound_expr): Likewise.
2409         * typeck2.c (build_x_arrow): Likewise.
2410
2411 2003-07-09  Jan Hubicka  <jh@suse.cz>
2412
2413         * cp-lang.c (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): New.
2414         * decl.c (duplicate_decls): Use DECL_ESTIMATED_INSNS.
2415         (start_function): Use DECL_ESTIMATED_INSNS.
2416         * optimize.c (maybe_clone_body): Use DECL_ESTIMATED_INSNS.
2417
2418         * decl2.c (maybe_emit_vtables): Fix marking vtables as needed in
2419         unit-at-a-time
2420
2421 2003-07-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2422
2423         PR c++/11030
2424         * pt.c (instantiate_class_template): Don't call xref_tag to
2425         inject name when the friend class is a specialization.
2426
2427 2003-07-07  Mark Mitchell  <mark@codesourcery.com>
2428
2429         * cp-tree.h (build_scoped_method_call): Remove.
2430         (lookup_qualified_name): Remove parameter.
2431         (tsubst_copy_and_build): Declare.
2432         (finish_qualified_object_call_expr): Remove.
2433         (check_accessibility_of_qualified_id): New function.
2434         (finish_qualified_id_expr): Likewise.
2435         (non_reference): Likewise.
2436         (build_expr_from-tree): Remove.
2437         * call.c (non_reference): Remove.
2438         (build_scoped_method_call): Likewise.
2439         (build_method_call): Use error_operand_p.  Assert that we are not
2440         processing a template.
2441         (standard_conversion): Use non_reference.
2442         * class.c (build_vtbl_entry_ref): Likewise.
2443         (build_vtbl_ref_1): Likewise.
2444         * cvt.c (build_expr_type_conversion): Use non_reference.
2445         * decl.c (lookup_qualified_name): Remove flags parameter.
2446         (grok_op_properties): Use non_reference.
2447         * decl2.c (grok_array_decl): Likewise.
2448         (build_expr_from_tree): Remove.
2449         (build_offset_ref_call_from_tree): Update comment.
2450         * error.c (parm_to_string): Call reinit_global_formatting_buffer.
2451         * except.c (prepare_eh_types): Use non_reference.
2452         (can_convert_eh): Likewise.
2453         * init.c (build_dtor_call): Avoid using build_method_call.
2454         * mangle.c (write_template_param): Remove misleading comment.
2455         * method.c (locate_copy): Use non_reference.
2456         * parser.c (cp_parser_scope_through_which_access_occurs): Remove.
2457         (cp_parser_primary_expression): Do not create SCOPE_REFs is
2458         non-dependent contexts.
2459         (cp_parser_postfix_expression): Use finish_qualified_id_expr.
2460         (cp_parser_direct_declarator): Use tsubst_copy_and_build, not
2461         build_expr_from_tree.
2462         (cp_parser_lookup_name): Adjust call to lookup_qualified_name.
2463         Use check_accessibility_of_qualified_id.
2464         * pt.c (maybe_fold_nontype_arg): Use tsubst_copy_and_build, not
2465         build_expr_from_tree.
2466         (tsubst_baselink): New function.
2467         (tsubst_qualified_id): Likewise.
2468         (tsubst_copy): Use them.  Remove support for METHOD_CALL_EXPR.
2469         (tsubst_expr): Adjust call to lookup_qualified_name.
2470         (tsubst_copy_and_build): Handle SCOPE_REFs specially.  Adjust
2471         handling of CALL_EXPRs.
2472         (value_dependent_expression_p): Use INTEGRAL_OR_ENUMERATION_TYPE_P.
2473         * rtti.c (get_tinfo_decl_dynamic): Use non_reference.
2474         * search.c (check_final_overrider): Likewise.
2475         * semantics.c (check_accessibility_of_qualified_id): New function.
2476         (finish_qualified_object_call_expr): Remove.
2477         * typeck.c (target_type): Use non_reference.
2478         (cxx_sizeof_or_alignof_type): Likewise.
2479         (dubious_conversion_warnings): Likewise.
2480         (convert_for_initialization): Likewise.
2481         (non_reference): New function.
2482
2483 2003-07-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2484
2485         * decl.c (print_binding_level, print_other_binding_stack,
2486         print_binding_stack): Merge uses of HOST_PTR_PRINTF with adjacent
2487         stdio calls.
2488         * ptree.c (cxx_print_decl, cxx_print_binding): Likewise.
2489
2490 2003-07-07  Andreas Jaeger  <aj@suse.de>
2491
2492         * friend.c: Convert to ISO C90 prototypes.
2493
2494         * Make-lang.in ($(srcdir)/cp/cfns.h): Use ANSI-C as output
2495         language.
2496         * cfns.h: Regenerate.
2497
2498         * typeck.c: Convert remaining prototypes to ISO C90.
2499         * search.c: Likewise.
2500
2501         * decl2.c (build_expr_from_tree): Convert prototype to ISO C90.
2502         * semantics.c (expand_or_defer_fn): Likewise
2503         * mangle.c (discriminator_for_string_literal): Likewise.
2504         * g++spec.c (lang_specific_driver): Likewise.
2505
2506         * search.c (lookup_base_r): Remove unused variable.
2507
2508 2003-07-07  Nathan Sidwell  <nathan@codesourcery.com>
2509
2510         * semantics.c: (genrtl_try_block) Adjust emit_line_note
2511         calls.
2512
2513 2003-07-07  Andreas Jaeger  <aj@suse.de>
2514
2515         * search.c (lookup_base_r): Remove unused variable.
2516
2517 2003-07-06  Michael Chastain  <mec@shout.net>
2518
2519         PR debug/10055
2520         * lex.c (cxx_init): Call push_srcloc and pop_srcloc rather than
2521         assigning to input_filename directly.
2522
2523 2003-07-06  Kazu Hirata  <kazu@cs.umass.edu>
2524
2525         * call.c: Fix comment formatting.
2526         * class.c: Likewise.
2527         * cp-tree.h: Likewise.
2528         * decl.c: Likewise.
2529         * decl2.c: Likewise.
2530         * error.c: Likewise.
2531         * method.c: Likewise.
2532         * name-lookup.c: Likewise.
2533         * parser.c: Likewise.
2534         * pt.c: Likewise.
2535         * rtti.c: Likewise.
2536         * search.c: Likewise.
2537         * typeck.c: Likewise.
2538
2539 2003-07-06  Mark Mitchell  <mark@codesourcery.com>
2540
2541         PR c++/11345
2542         * search.c (lookup_base_r): Remove is_non_public and
2543         within_current_scope parameters.  Remove other dead code.
2544         (lookup_base): Adjust call to lookup_base_r.
2545         (adjust_result_of_qualified_name_lookup): Improve comment.
2546         * semantics.c (finish_call_expr): Use maybe_dummy_object.
2547
2548 2003-07-06  Neil Booth  <neil@daikokuya.co.uk>
2549
2550         * cp-lang.c (LANG_HOOKS_HANDLE_FILENAME,
2551         LANG_HOOKS_MISSING_ARGUMENT): Override.
2552
2553 2003-07-05  Mark Mitchell  <mark@codesourcery.com>
2554
2555         PR c++/11431
2556         * typeck.c (build_static_cast): Check for reference conversions
2557         earlier.
2558
2559 2003-07-04  Mark Mitchell  <mark@codesourcery.com>
2560
2561         * cp-tree.h (perform_integral_promotions): Declare.
2562         * call.c (build_addr_func): Use decay_conversion.
2563         (convert_arg_to_ellipsis): Likewise.  Remove misleading comment.
2564         (convert_for_arg_passing): Use perform_integral_promotions.
2565         * cvt.c (build_expr_type_conversion): Use decay_conversion.
2566         (type_promotes_to): Do not return a cv-qualified type.
2567         * decl.c (grok_reference_init): Fix formatting.
2568         (get_atexit_node): Use decay_conversion.
2569         (build_enumerator): Use perform_integral_promotions.
2570         * init.c (build_vec_init): Use decay_conversion.
2571         * semantics.c (finish_expr_stmt): Likewise.
2572         (finish_switch_cond): Use perform_integral_promotions.
2573         * typeck.c (default_conversion): Likewise.
2574         (perform_integral_promotions): New function.
2575         (build_indirect_ref): Use decay_conversion.
2576         (build_array_ref): Use perform_integral_promotions.
2577         (convert_arguments): Use decay_conversion.
2578         (build_unary_op): Use perform_integral_promotions.
2579         (build_c_cast): Use decay_conversion.
2580         (build_modify_expr): Likewise.
2581         (convert_for_initialization): Likewise.
2582         * typeck2.c (build_x_arrow): Likewise.
2583
2584 2003-07-04  Kazu Hirata  <kazu@cs.umass.edu>
2585
2586         * call.c: Fix comment typos.
2587         * class.c: Likewise.
2588         * cp-tree.h: Likewise.
2589         * cvt.c: Likewise.
2590         * decl2.c: Likewise.
2591         * decl.c: Likewise.
2592         * init.c: Likewise.
2593         * mangle.c: Likewise.
2594         * parser.c: Likewise.
2595         * pt.c: Likewise.
2596         * search.c: Likewise.
2597         * semantics.c: Likewise.
2598         * tree.c: Likewise.
2599         * typeck.c: Likewise.
2600
2601 2003-07-04  Zack Weinberg  <zack@codesourcery.com>
2602
2603         * parser.c (cp_lexer_read_token): No need to handle string
2604         constant concatenation.
2605
2606 2003-07-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2607
2608         * cp-tree.h (GCC_DIAG_STYLE, ATTRIBUTE_GCC_CXXDIAG): Define.
2609         (cp_error_at, cp_warning_at, cp_pedwarn_at): Mark with
2610         ATTRIBUTE_GCC_CXXDIAG.
2611
2612 2003-07-03  Mark Mitchell  <mark@codesourcery.com>
2613
2614         * call.c (build_addr_func): Handle bound pointers-to-members.
2615         (build_method_call): Do not call resolve_offset_ref.
2616         (implicit_conversion): Likewise.
2617         (resolve_scoped_fn_name): Use finish_non_static_data_member, not
2618         resolve_offset_ref.
2619         (resolve_args): Do not call resolve_offset_ref.
2620         (build_conditional_expr): Likewise.
2621         (build_new_method_call): Likewise.
2622         * cp-tree.def (OFFSET_REF): Update documentation.
2623         * cvt.c (cp_convert_to_pointer): Update handling of conversions from
2624         pointers to members to pointers.
2625         (ocp_convert): Do not call resolve_offset_ref.
2626         (convert_to_void): Likewise.
2627         (build_expr_type_conversion): Likewise.
2628         * decl2.c (delete_sanity): Likewise.
2629         * init.c (resolve_offset_ref): Simplify greatly.
2630         (build_vec_delete): Do not call resolve_offset_ref.
2631         * parser.c (cp_parser_postfix_expression): Call resolve_offset_ref
2632         if appropriate.
2633         (cp_parser_unary_expression): Use
2634         cp_parser_simple_cast_expression.
2635         (cp_parser_delete_expression): Likewise.
2636         (cp_parser_cast_expression): Likewise.
2637         (cp_parser_pm_expression): Use cp_parser_binary_op.
2638         (cp_parser_simple_cast_expression): New function.
2639         * rtti.c (build_dynamic_cast_1): Do not call resolve_offset_ref.
2640         * semantics.c (finish_increment_expr): Likewise.
2641         (finish_typeof): Likewise.
2642         * tree.c (lvalue_p_1): Do not handle OFFSET_REF.
2643         * typeck.c (require_complete_type): Do not handle OFFSET_REFs.
2644         (decay_conversion): Do not call resolve_offset_ref.
2645         (finish_class_member_access_expr): Likewise.
2646         (convert_arguments): Likewise.
2647         (build_x_binary_op): Handle DOTSTAR_EXPR.
2648         (condition_conversion): Do not call resolve_offset_ref.
2649         (unary_complex_lvalue): Likewise.
2650         (build_static_cast): Likewise.
2651         (build_reinterpret_cast): Likewise.
2652         (build_const_cast): Likewise.
2653         (build_c_cast): Likewise.
2654         (build_modify_expr): Likewise.
2655         (convert_for_assignment): Likewise.
2656         (convert_for_initialization): Likewise.
2657         * typeck2.c (build_x_arrow): Likewise.
2658         (build_m_component_ref): Simplify.
2659
2660         * call.c (build_scoped_method_call): Use convert_to_void.
2661         (build_method_call): Likewise.
2662         * class.c (check_field_decls): Remove dead code.
2663         * cvt.c (convert_from_reference): Remove OFFSET_TYPE handling.
2664         * decl2.c (grok_array_decl): Remove dead code.
2665         (arg_assoc_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
2666         as pointer-to-member representation.
2667         * init.c (build_offset_ref): Tidy.
2668         (build_vec_delete_1): Use convert_to_void.
2669         * mangle.c (write_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
2670         as pointer-to-member representation.
2671
2672 2003-07-03  Nathan Sidwell  <nathan@codesourcery.com>
2673
2674         PR c++/9162
2675         * decl.c (grokdeclarator): Return friend decls, not
2676         void_type_node.
2677         * decl2.c (grokfield): Alter friend decl check.
2678         * parser.c (struct cp_parser): Document default_arg chain on
2679         unparsed_functions_queue.
2680         (cp_parser_save_default_args): New.
2681         (cp_parser_init_declarator, cp_parser_function_definition,
2682         cp_parser_member_declaration): Call it.
2683         (cp_parser_class_specifier): Remove unused variable. Alter
2684         processing of unparsed_functions_queue.
2685
2686 2003-07-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2687
2688         * class.c (add_method, check_field_decl): Fix format specifier.
2689         * decl.c (duplicate_decls, pushdecl, check_goto,
2690         fixup_anonymous_aggr, maybe_commonize_var, grokdeclarator,
2691         start_enum): Likewise.
2692         * decl2.c (ambiguous_decl): Likewise.
2693         * pt.c (redeclare_class_template): Likewise.
2694
2695 2003-07-02  Nathan Sidwell  <nathan@codesourcery.com>
2696
2697         PR c++/10219
2698         * pt.c (type_unification_real): Don't unify exprs of error type.
2699         * tree.c (error_type): Don't die on error_type.
2700
2701         PR c++/9779
2702         * decl2.c (arg_assoc_class): Don't die on NULL type.
2703         * typeck.c (type_unknown_p): Don't die on untyped expressions.
2704
2705 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
2706
2707         PR c++/6949
2708         * decl2.c (grokfield): Create TEMPLATE_DECLs for methods in local
2709         classes.
2710
2711 2003-07-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2712
2713         * error.c (locate_error): %P takes an `int', not a `tree'.
2714
2715 2003-07-02  Jan Hubicka  <jh@suse.cz>
2716
2717         * decl2.c (defer_fn): Set DECL_DEFER_OUTPUT.
2718         (finish-file): Do not process function with DECL_DEFER_OUTPUT clear;
2719         clear DECL_DEFER_OUTPUT once function is processed; avoid flags
2720         massaging.
2721
2722         * cp-tree.h (DECL_NEEDED_P): Support unit-at-a-time
2723         (expand_or_defer_fn): Declare.
2724         (lower_function): Declare.
2725         * decl.c (start_cleanup_fn): Use expand_or_defer_fn.
2726         * decl2.c: Include cgraph.h and varpool.h
2727         (maybe_emit_vtables):  Make explicit instantations as needed.
2728         (mark_member_pointers, lower_function): New functions.
2729         (finish_file): Do unit-at-a-time.
2730         * method.c (synthesize_method): Use expand_or_defer_fn.
2731         * optimize.c (maybe_clone_body): Use expand_or_defer_fn.
2732         * parser.c (cp_parser_function_definition_after_decl): Use
2733         expand_or_defer_fn.
2734         * pt.c (instantiate_decl): Likewise.
2735         * semantics.c: Include cgraph.h
2736         (expand_or_defer_fn): Break out from ...
2737         (expand_body): ... here; deal with unit-at-a-time.
2738         * cp-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION,
2739         LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Define.
2740
2741 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
2742
2743         * call.c (resolve_scoped_fn_name): Return error_mark_node for
2744         erroneous cases.
2745
2746 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
2747
2748         PR c++/11149
2749         * call.c (resolve_scoped_fn_name): Check that the qualifying scope
2750         is a class type.
2751
2752 2003-07-01  Giovanni Bajo  <giovannibajo@libero.it>
2753
2754         PR c++/8046
2755         * error.c (dump_decl): Handle BIT_NOT_EXPR as
2756         pseudo destructor calls.
2757
2758 2003-07-01  Nathan Sidwell  <nathan@codesourcery.com>
2759
2760         * cp-tree.h (define_label): Replace filename and lineno
2761         arguments with a location_t.
2762         * decl.c (pop_label): Adjust define_label call.
2763         (define_label): Replace filename and lineno arguments with a
2764         location_t.
2765         * semantics.c (finish_label): Adjust define_label call.
2766
2767 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
2768
2769         PR c++/9559
2770         * decl2.c (grokfield): Do not build NOP_EXPRs around the
2771         error_mark_node.
2772
2773 2003-06-30  Neil Booth  <neil@daikokuya.co.uk>
2774
2775         * Make-lang.in: Update.
2776         * cp-lang.c (c_language): Define.
2777         (LANG_HOOKS_INIT_OPTIONS): Use common hook.
2778         * cp-tree.h (cxx_init_options): Remove.
2779         * lex.c: Don't include diagnostic.h.
2780         (cxx_init_options): Remove.
2781
2782 2003-06-30  Giovanni Bajo  <giovannibajo@libero.it>
2783
2784         PR c++/4933
2785         * error.c (dump_expr): Support correctly the COMPOUND_EXPR
2786         tree generated within a template. Use dump_expr to dump an
2787         expression sizeof.
2788
2789 2003-06-30  Giovanni Bajo  <giovannibajo@libero.it>
2790
2791         * mangle.c (write_expression): Exit gracefully when trying to
2792         mangle a CALL_EXPR.
2793
2794 2003-06-30  Giovanni Bajo  <giovannibajo@libero.it>
2795
2796         PR c++/10750
2797         * parser.c (cp_parser_primary_expression): A VAR_DECL with a
2798         (value- or type-) dependent expression as DECL_INITIAL is a
2799         valid constant-expression (at parser time).
2800
2801 2003-06-30  Giovanni Bajo <giovannibajo@libero.it>
2802
2803         PR c++/11106
2804         * error.c (dump_decl): Call dump_decl to dump the DECL_NAME for a
2805         USING_DECL, instead of print_tree_identifier.
2806
2807 2003-06-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2808
2809         * cp-tree.h (language_to_string): Adjust declaration.
2810         * dump.c (cp_dump_tree): Adjust usage.
2811         * error.c (dump_char): Use output_formatted_scalar. Tidy.
2812         (parm_to_string): Lose unused parameter.  Tidy.
2813         (expr_to_string): Likewise.
2814         (code_to_string): Likewise.
2815         (language_to_string): Likewise.
2816         (op_to_string): Likewise.
2817         (assop_to_string): Likewise.
2818         (digit_buffer): Remove.
2819         (dump_type): Format builtin vector type as __vector__.
2820
2821 2003-06-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2822
2823         * error.c (print_integer): Remove.
2824         (dump_type_suffix): Adjust.
2825         (dump_expr): Likewise.
2826
2827 2003-06-28  Nathan Sidwell  <nathan@codesourcery.com>
2828
2829         * error.c (print_instantiation_partial_context): Take a
2830         location_t.
2831         (print_instantiation_full_context): Adjust.
2832         (print_instantiation_context): Adjust.
2833
2834         * cp-tree.h (cp_line_of, cp_file_of): Remove.
2835         * error.c (cp_line_of, cp_file_of): Merge into ...
2836         (location_of): ... here. Make static, return a location_t.
2837         (cp_error_at, cp_warning_at, cp_pedwarn_at): Adjust.
2838
2839 2003-06-28  Nathan Sidwell  <nathan@codesourcery.com>
2840
2841         PR c++/10784
2842         * call.c (joust): Move warn_conversion check outwards.
2843
2844 2003-06-27  Zack Weinberg  <zack@codesourcery.com>
2845
2846         * decl.c (build_typename_type)
2847         * mangle.c (write_template_template_arg)
2848         * parser.c (cp_parser_scope_through_which_access_occurs)
2849         * pt.c (push_access_scope_real, push_access_scope, pop_access_scope)
2850         * repo.c (get_base_filename)
2851         * semantics.c (maybe_convert_cond):
2852         Mark the definition static, matching the forward declaration.
2853
2854 2003-06-27  Mark Mitchell  <mark@codesourcery.com>
2855
2856         PR c++/10468
2857         * pt.c (tsubst): Handle qualified TYPEOF_TYPEs correctly.
2858
2859 2003-06-27  Mark Mitchell  <mark@codesourcery.com>
2860
2861         PR c++/10796
2862         * decl.c (finish_enum): Implement DR377.
2863
2864         * decl.c (cp_finish_decl): Don't make variables with reference
2865         type readonly while they are being initialized.
2866
2867 2003-06-26  Mark Mitchell  <mark@codesourcery.com>
2868
2869         PR c++/11332
2870         * typeck.c (build_static_cast): Avoid returning expressions with
2871         reference type.
2872
2873 2003-06-26  Nathan Sidwell  <nathan@codesourcery.com>
2874
2875         * call.c (build_op_delete_call): Use strip_array_call. Correct
2876         error message to say 'delete' or 'delete[]'.
2877
2878 2003-06-26  Giovanni Bajo  <giovannibajo@libero.it>
2879
2880         PR c++/8266
2881         * pt.c (check_explicit_specialization): When looking up a
2882         template function from an identifier outside class-scope, bind
2883         it to CP_DECL_CONTEXT.
2884
2885 2003-06-25  Mark Mitchell  <mark@codesourcery.com>
2886
2887         PR c++/10990
2888         * search.c (lookup_base_r): Rely on accessible_p, rather than
2889         trying to emulate that logic here.
2890
2891         PR c++/10931
2892         * call.c (convert_like): Pass issue_conversion_warnings.
2893         (convert_like_with_context): Likewise.
2894         (convert_like_real): Add issue_conversion_warnings parameter.
2895         (perform_direct_initialization_if_possible): New function.
2896         * cp-tree.h (perform_direct_initialization_if_possible): Declare it.
2897         * typeck.c (check_for_casting_away_constness): New function.
2898         (build_static_cast): Rewrite.
2899
2900 2003-06-24  Nathan Sidwell  <nathan@codesourcery.com>
2901
2902         * call.c (enforce_access): Assert we get a binfo.
2903         (build_op_delete_call): Pass a binfo to
2904         perform_or_defer_access_check.
2905         * class.c (alter_access): Likewise.
2906         * decl.c (make_typename_type): Likewise.
2907         (make_unbound_class_template): Likewise.
2908         * lex.c (do_identifier): Likewise.
2909         * method.c (hack_identifier): Likewise.
2910         * parser.c (cp_parser_lookup_name): Likewise.
2911         * search.c (lookup_member): Likewise. Move IDENTIFIER_CLASS_VALUE
2912         test.
2913         * semantics.c (finish_non_static_data_member): Likewise.
2914         (perform_or_defer_access_check): Expect a binfo.
2915         * typeck.c (comptypes): Expect types.
2916
2917         * mangle.c (find_substitution): Don't pass a non-type to same_type_p
2918         * friend.c (make_friend_class): Likewise.
2919         * pt.c (check_default_tmpl_args): Likewise.
2920         (lookup_template_class): Likewise.
2921
2922 2003-06-24  Jan Hubicka  <jh@suse.cz>
2923
2924         * method.c (thunk_labelno): Move outside ifdef block to make garbage
2925         collector happy.
2926
2927 2003-06-24  Jan Hubicka  <jh@suse.cz>
2928
2929         * class.c (build_vtable): Make vtables.
2930         * cp-tree.h (DECL_VTABLE_OR_VTT_P): New macro.
2931         * decl2.c (output_vtable_inherit): Rename to ...
2932         (prepare_assemble_variable): ... this one; change interface.
2933         (maybe_emit_vtables): Do not call output_vtable_inherit.
2934         * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Define.
2935         * cp-tree.h (prepare_assemble_variable): New.
2936
2937 2003-06-23  Andrew Pinski <pinskia@physics.uc.edu>
2938
2939         * method.c: add prototype for make_alias_for_thunk.
2940         (thunk_labelno, make_alias_for_thunk): only define
2941         if ASM_OUTPUT_DEF is defined.
2942
2943 2003-06-23  Jakub Jelinek  <jakub@redhat.com>
2944
2945         * method.c (thunk_labelno): New variable.
2946         (make_alias_for_thunk): New function.
2947         (use_thunk): Use it if defined ASM_OUTPUT_DEF.  Put the thunk
2948         into the same section as the function it is calling.
2949         Include gt-cp-method.h.
2950         * Make-lang.in (gt-cp-method.h): Depend on s-gtype.
2951         (cp/method.o): Depend on gt-cp-method.h.
2952         * config-lang.in (gtfiles): Add $(srcdir)/cp/method.c.
2953
2954 2003-06-23  Jan Hubicka  <jh@suse.cz>
2955
2956         * decl.c (register_dtor_fn): Mark cleanup as used.
2957         * decl2.c (mark_vtable_entries): Skip nops.
2958         * rtti.c (get_tinfo_ptr): Mark tinfo as used.
2959         (build_dynamic_cast_1): Likewise.
2960         (tinfo_base_init): Likewise.
2961         (emit_tinfo_decl): Likewise.
2962
2963 2003-06-23  Jakub Jelinek  <jakub@redhat.com>
2964
2965         * mangle.c (hash_type): Val is the TREE_LIST itself, not a pointer
2966         to it.
2967
2968 2003-06-21  Gabriel Dos Reis <gdr@integrable-solutions.net>
2969
2970         PR c++/10784
2971         * call.c (joust): Warn about choosing conversion sequence only if
2972         -Wconversion.
2973
2974 2003-06-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2975
2976         PR c++/10864
2977         * call.c (op_error): Tidy.
2978         * error.c (dump_expr): Properly format 'T()' when T is an
2979         aggregate type.
2980
2981 2003-06-21  Gabriel Dos Reis <gdr@integrable-solutions.net>
2982
2983         PR c++/10915
2984         * decl.c (grok_op_properties): Warn possible confusing conversion
2985         only if -Wconversion.
2986
2987 2003-06-20  Mark Mitchell  <mark@codesourcery.com>
2988
2989         PR c++/10749
2990         * parser.c (cp_parser_class_head): See through dependent names
2991         when parsing a class-head.
2992
2993         PR c++/10845
2994         * pt.c (try_class_unification): Correct handling of member class
2995         templates.
2996
2997 2003-06-20  Nathan Sidwell  <nathan@codesourcery.com>
2998
2999         * semantics.c (genrtl_finish_function): Adjust
3000         expand_function_end call.
3001
3002 2003-06-19  Mark Mitchell  <mark@codesourcery.com>
3003
3004         PR c++/10939
3005         * pt.c (tsubst_decl): Do not try to substitute into non-dependent
3006         functions.
3007         (value_dependent_expression_p): Correct logic for FUNCTION_DECLs.
3008
3009         PR c++/9649
3010         * cp-tree.h (pushdecl_class_level): Change prototype.
3011         (push_class_level_binding): Likewise.
3012         * decl.c (add_binding): Reject duplicate static data members.
3013         (pushdecl_class_level): Return a value indicating whether or not
3014         the binding was valid.
3015         (push_class_level_binding): Likewise.
3016         * semantics.c (finish_member_declaration): Don't keep invalid
3017         declarations.
3018
3019         PR c++/11041
3020         * call.c (initialize_reference): Do not use cp_finish_decl to emit
3021         temporary variables.
3022         * cp-tree.h (static_aggregates): Declare.
3023         (pushdecl_top_level_and_finish): Likewise.
3024         * decl.c (pushdecl_top_level_1): New function.
3025         (pushdecl_top_level): Use it.
3026         (pushdecl_top_level_and_finish): New function.
3027         (initialize_local_var): Remove redundant code.
3028         (cp_finish_decl): Remove support for RESULT_DECLs.  Don't check
3029         building_stmt_tree.
3030         * decl.h (static_aggregates): Remove.
3031         * decl2.c (get_guard): Use pushdecl_top_level_and_finish.
3032         * rtti.c (get_tinfo_decl): Use pushdecl_top_level_and_finish.
3033         (tinfo_base_init): Likewise.
3034
3035 2003-06-19  Matt Austern  <austern@apple.com>
3036
3037         PR c++/11228
3038         * init.c (build_zero_init): Assert that number of array elements
3039         is an integer constant.
3040         (build_default_init) Don't use build_zero_init for arrays with
3041         variable number of elements.
3042
3043 2003-06-19  Andreas Jaeger  <aj@suse.de>
3044
3045         * cp-tree.h: Remove duplicated declarations.
3046
3047 2003-06-18  Nathanael Nerode  <neroden@gcc.gnu.org>
3048
3049         * pt.c: Convert to ISO C.
3050         * semantics.c: Convert to ISO C.
3051
3052 2003-06-18  Nathan Sidwell  <nathan@codesourcery.com>
3053
3054         * cp-tree.h (comp_except_specs, compparms, cp_has_mutable_p,
3055         at_least_as_qualified_p, more_qualified_p): Return bool.
3056         * typeck.c: ANSIFY function definitions.
3057         (comp_array_types): Take redeclaration bool parameter.
3058         (comptypes): Rearrange STRICT handling.
3059         (at_least_as_qualified_p, more_qualified_p,
3060         comp_cv_qualification): Cache cv quals.
3061         (compparms): Rearrange loop.
3062
3063 2003-06-18  Nathan Sidwell  <nathan@codesourcery.com>
3064
3065         * cp-tree.h (COMPARE_RELAXED): Rename to ...
3066         (COMPARE_DERIVED): ... here. Adjust comment.
3067         (resolve_typename_type_in_current_instantiation): Remove.
3068         (cp_tree_equal, comptypes): Return a bool.
3069         * cvt.c (convert_to_reference): Adjust comptypes call.
3070         * pt.c (template_args_equal, unify,): Adjust cp_tree_equal call.
3071         (resolve_typename_type_in_current_instantiation): Remove.
3072         * tree.c (cp_tree_equal): Return bool. Cope with TEMPLATE_DECLs and
3073         IDENTIFIER_NODEs. Abort if undeciderable. Adjust recursive
3074         calls. Refactor code.
3075         * typeck.c (comp_array_types): Return bool. Lose callback.
3076         parameter. Adjust cp_tree_equal calls.
3077         (comptypes): Return bool. Adjust strict handling. Remove relaxed
3078         enumeration and java type handling. Deal with typename types here.
3079         Adjust recursive and cp_tree_equals calls. Adjust base and derived
3080         checking.
3081         (comp_target_types): Remove unreachable code. Adjust
3082         same_or_base_type_p calls.
3083         (ptr_reasonably_similar): Adjust base and derived check.
3084
3085         * typeck.c (maybe_warn_about_returning_address_of_local): Remove
3086         unused calculation.
3087         (check_return_expr): Adjust error messages.
3088         * cp-tree.def (SCOPE_REF): Correct comment.
3089
3090 2003-06-17  Mark Mitchell  <mark@codesourcery.com>
3091
3092         * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
3093         string again.
3094
3095 2003-06-17  Robert Abeles  <rabeles@archaelogic.com>
3096
3097         * optimize.c (dump_function): Form complete flag name by
3098         prefixing 'fdump-' to string returned by dump_flag_name().
3099
3100 2003-06-17  Mark Mitchell  <mark@codesourcery.com>
3101
3102         * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
3103         string.
3104
3105 2003-06-17  Jason Merrill  <jason@redhat.com>
3106
3107         PR c++/10929
3108         * decl.c (grokfndecl): Don't mark a function inline for
3109         -finline-functions if it isn't defined.
3110
3111 2003-06-17  Mark Mitchell  <mark@codesourcery.com>
3112
3113         PR c++/10712
3114         * class.c (handle_using_decl): Robustify.
3115
3116         PR c++/11105
3117         * cp-tree.h (DECL_CONV_FN_TYPE): New method.
3118         * mangle.c (struct globals): Remove internal_mangling_p.
3119         (write_unqualified_name): Use DECL_CONV_FN_TYPE.
3120         (write_template_parm): Don't write out the level number.
3121         (conv_type_names): New variable.
3122         (hash_type): New function.
3123         (compare_type): Likewise.
3124         (mangle_conv_op_name_for_type): Don't try to mangle conversion
3125         operator names.
3126         * search.c (lookup_conversion_operator): New function.
3127         (lookup_fnfields_1): Use it.
3128
3129 2003-06-17  Andreas Jaeger  <aj@suse.de>
3130
3131         * except.c: Remove duplicate declaration of push_eh_cleanup.
3132
3133         * call.c: Remove extra declaration of inhibit_warnings.
3134
3135 2003-06-16  Nathanael Nerode  <neroden@gcc.gnu.org>
3136
3137         2003-06-16  Jens-Michael Hoffmann  <jensmh@gmx.de>
3138         * mangle.c: Convert to ISO C.
3139
3140 2003-06-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3141
3142         * cp/decl.c, cp/pt.c, cp/search.c, cp/tree.c: Don't use the PTR
3143         macro.
3144
3145 2003-06-16  Nathanael Nerode  <neroden@gcc.gnu.org>
3146
3147         * tree.c: Convert to ISO C.
3148
3149 2003-06-16  Kazu Hirata  <kazu@cs.umass.edu>
3150
3151         * cp-tree.h: Follow spelling conventions.
3152         * mangle.c: Likewise.
3153         * method.c: Likewise.
3154         * parser.c: Likewise.
3155
3156 2003-06-14  Nathan Sidwell  <nathan@codesourcery.com>
3157
3158         * decl.c (start_function): Adjust init_function_start call.
3159         * method.c (use_thunk): Likewise.
3160         * semantics.c (genrtl_start_function): Likewise.
3161
3162 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
3163
3164         * Make-lang.in: Remove c-options.o.
3165
3166 2003-06-13  Nathanael Nerode  <neroden@gcc.gnu.org>
3167
3168         * lex.c: Convert to ISO C.
3169
3170         2003-05-19  Jens-Michael Hoffmann  <jensmh@gmx.de>
3171         * init.c: removes use of PARAMS macro.  Use ISO style function
3172         declarations.  (Not copyright-significant change.)
3173
3174         * rtti.c: Remove PARAMS.
3175
3176         * typeck2.c: Convert to ISO C.
3177
3178 2003-06-12  Mark Mitchell  <mark@codesourcery.com>
3179
3180         PR c++/10635
3181         * typeck.c (build_c_cast): Check that the destination type is
3182         complete.
3183
3184 2003-06-11  Mark Mitchell  <mark@codesourcery.com>
3185
3186         PR c++/10432
3187         * cp-tree.h (finish_declarator): Remove.
3188         * decl.c (cp_finish_decl): Make sure to pop_nested_class even for
3189         erroneous declarations.
3190         * semantics.c (finish_declarator): Remove.
3191
3192 2003-06-11  Roger Sayle  <roger@eyesopen.com>
3193
3194         * decl2.c (generate_ctor_or_dtor_function): Avoid expanding a
3195         global static constructor/destructor if it will be empty, i.e.
3196         either doesn't call any ctors/dtors or only calls pure or const
3197         ctors/dtors.
3198
3199 2003-06-11  Mark Mitchell  <mark@codesourcery.com>
3200
3201         * mangle.c (tm_p.h): Include it.
3202         * Make-lang.in (cp/mangle.o): Depend on $(TM_P_H).
3203
3204         PR c++/11131
3205         * tree.c (cp_cannot_inline_fn): Check for "inline" before
3206         instantiation.
3207
3208 2003-06-10  Jason Merrill  <jason@redhat.com>
3209
3210         PR c++/10968
3211         * pt.c (mark_decl_instantiated): Clear DECL_COMDAT.
3212
3213 2003-06-10  Andrew Pinski  <pinskia@physics.uc.edu>
3214
3215         * decl.c (start_cleanup_fn): Move static 'counter' out, mark with GTY.
3216         (start_cleanup_cnt): New.
3217
3218 2003-06-10  Mark Mitchell  <mark@codesourcery.com>
3219
3220         PR c++/11131
3221         * cp-tree.h (template_for_substitution): Declare.
3222         * decl2.c (mark_used): Use it when figuring out whether or not a
3223         function is inline.
3224         * pt.c (template_for_substitution): Give it external linkage.
3225         * tree.c (cp_cannot_inline_tree_fn): Instantiate as early as
3226         possible.
3227
3228 2003-06-09  Zack Weinberg  <zack@codesourcery.com>
3229
3230         PR 8861
3231         * mangle.c (write_real_cst): New function.  Implement
3232         ABI-compliant mangling of floating-point literals when
3233         -fabi-version>=2; provide backward compatibility with 3.3 when
3234         -fabi-version=1 (with warning).  Clarify commentary.
3235         (write_template_arg_literal): Use write_real_cst.
3236
3237 2003-06-07  Andreas Jaeger  <aj@suse.de>
3238
3239         * cp/decl.c (xref_tag): Remove undefined macro NONNESTED_CLASSES.
3240
3241 2003-06-07  Neil Booth  <neil@daikokuya.co.uk>
3242
3243         * cp-lang.c (LANG_HOOKS_DECODE_OPTON): Drop.
3244         (LANG_HOOKS_HANDLE_OPTION): Override.
3245         * cp-tree.h (cxx_init_options): Update.
3246         * lex.c (cxx_init_options): Update.
3247
3248 2003-06-05  Jan Hubicka  <jh@suse.cz>
3249
3250         * Make-lang.in:  Add support for stageprofile and stagefeedback
3251
3252 2003-06-04  J"orn Rennecke <joern.rennecke@superh.com>
3253
3254         * decl.c (grokdeclarator): Error_mark_node in, error_mark_node out.
3255
3256 2003-06-04  Andreas Jaeger  <aj@suse.de>
3257
3258         * g++spec.c (lang_specific_driver): Remove ALT_LIBM usage.
3259
3260 2003-06-03  Jason Merrill  <jason@redhat.com>
3261
3262         * cp/cp-tree.h (CP_AGGREGATE_TYPE_P): Accept vectors.
3263
3264         * cp/decl.c (reshape_init): Handle vectors.
3265
3266         * testsuite/g++.dg/init/array10.C: New.
3267
3268 2003-06-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3269
3270         PR c++/10940
3271         * pt.c (check_explicit_specialization): Check for 'static'
3272         earlier.
3273
3274 2003-05-31  Diego Novillo  <dnovillo@redhat.com>
3275
3276         * class.c (dump_array): Call CONSTRUCTOR_ELTS to access
3277         the operand of a CONSTRUCTOR node.
3278
3279 2003-05-31  Gabriel Dos Reis <gdr@integrable-solutions.net>
3280
3281         * decl.c (cp_binding_level::this_entity): Rename from this_class.
3282         (cxx_scope_descriptor): New function.
3283         (cxx_scope_debug): Likewise.
3284         (push_binding_level): Use it.
3285         (pop_binding_level): Likewise.
3286         (suspend_binding_level): Likewise.
3287         (resume_binding_level): Likewise.
3288         (pushlevel_class): Adjust use of this_class.
3289         (pushtag): Likewise.
3290         (lookup_name_real): Likewise.
3291         (global_scope_name): New variable.
3292         (initialize_predefined_identifiers): Initialize it.
3293         (push_namespace): Use it.
3294         (make_cxx_scope): New function.
3295         (pushlevel): Use it.
3296         (pushlevel_class): Likewise.
3297         (push_binding_level): Simplify.  Loose the last two arguments.
3298         (make_binding_level): Remove.
3299         (initial_push__namespace_scope): New function.
3300         (push_namespace): Use it.  Simplify.
3301         (cxx_init_decl_processing): Likewise.
3302         (declare_namespace_level): Remove.
3303
3304 2003-05-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3305
3306         PR c++/10956
3307         * pt.c (instantiate_decl): Don't use full template arguments if
3308         we are dealing with specializations.
3309
3310 2003-05-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3311
3312         * decl.c (ENABLE_SCOPE_CHECKING): Rename from DEBUG_BINDING_LEVELS.
3313         (binding_depth): Unconditionally define.
3314         (is_class_level): Likewise.
3315         (indent): Likewise.  Take an indenting parameter.
3316         (push_binding_level): Remove conditional definittion.
3317         (pop_binding_level): Likewise.
3318         (suspend_binding_level): Likewise.
3319         (resume_binding_level): Likewise.
3320         (pushlevel): Likewise.
3321         (pushlevel_class): Likewise.
3322         (poplevel_class): Likewise.
3323         (pop_everything): Likewise.
3324
3325 2003-05-27  Gabriel Dos Reis <gdr@integrable-solutions.net>
3326
3327         * name-lookup.h (global_scope_p): New macro.
3328         * decl.c (pop_binding_level): Use it.  Don't refer directly to
3329         global_binding_level.
3330         (suspend_binding_level): Likewise.
3331         (global_bindings_p): Likewise.
3332         (print_other_binding_stack): Likewise.
3333         (print_binding_stack): Likewise.
3334         (maybe_push_to_top_level): Likewise.
3335         (pushdecl_namespace_level): Likewise.
3336         (cxx_init_decl_processing): Likewise.
3337         (start_decl): Likewise.
3338         (cp_finish_decl): Likewise.
3339         (start_function): Likewise.
3340         (global_binding_level): Remove.
3341
3342 2003-05-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3343
3344         * parser.c (cp_parser_explicit_instantiation): Restore old
3345         access before template instantiation.
3346
3347 2003-05-23  Geoffrey Keating  <geoffk@apple.com>
3348
3349         * lang-specs.h: Use -o to specify preprocessor's output file.
3350         Make -no-integrated-cpp work when building PCH files.
3351
3352 2003-05-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3353
3354         PR c++/10682
3355         * pt.c (instantiate_class_template): Use DECL_ARTIFICIAL to
3356         check for implicitly created typedef to an enum.
3357
3358 2003-05-21  Jason Merrill  <jason@redhat.com>
3359
3360         * init.c (build_vec_delete): Copy the address into a temporary
3361         variable before calling build_vec_delete_1.
3362         * decl2.c (delete_sanity): Don't call stabilize_reference.
3363
3364 2003-05-21  Nathan Sidwell  <nathan@codesourcery.com>
3365
3366         * pt.c (register_specialization): Update the decl's location,
3367         if necessary.
3368         (check_explicit_specialization): Likewise.
3369
3370 2003-05-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3371
3372         * error.c (dump_expr): Use HOST_WIDE_INT_PRINT_DOUBLE_HEX.
3373
3374 2003-05-21  Danny Smith  <dannysmith@users.sourceforge.net>
3375
3376         PR c++/9738
3377         * decl.c (duplicate_decls): Re-invoke make_decl_rtl
3378         if the old decl had instantiated DECL_RTL.
3379         (Base on Richard Henderson 2003-05-13 patch to c-decl.c).
3380
3381 2003-05-19  Matt Austern  <austern@apple.com>
3382
3383         * lang-options.h: Document -Wno-invalid-offsetof
3384         * typeck.c (build_class_member_access_expr): Don't complain about
3385         (Foo *)p->x for non-POD Foo if warn_invalid_offset is zero.
3386
3387 2003-05-18 Andrew Pinski <pinskia@physics.uc.edu>
3388
3389         * name-lookup.c (free_binding_entry): fix where the GTY markers are.
3390         (binding_entry_make): Make entry->chain NULL after getting an entry.
3391         fix the spelling of chain in a comment.
3392         (binding_table_free): speed up by having temporary variable.
3393         (binding_table_new): set table->chain to be NULL after allocating
3394         a table.
3395         (cxx_binding_make): use gcc_alloc instead of ggc_alloc_cleared and set
3396         binding->previous to NULL after getting an binding for speed.
3397
3398 2003-05-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3399
3400         * cp-tree.h (struct lang_type_class): Replace data member tags
3401         with hash-table nested_udts.
3402         (CLASSTYPE_NESTED_UTDS): Rename from CLASSTYPE_TAGS.
3403         * class.c (unreverse_member_declarations): Don't touch
3404         CLASSTYPE_TAGS.
3405         (pushclass): Use cxx_remember_type_decls.
3406         * decl.c (struct cp_binding_level): Replace data member tags with
3407         hash-table type_decls.
3408         (pop_binding_level): Handle level->type_decls.
3409         (kept_level_p): Adjust.
3410         (poplevel): Remove unused local variable.
3411         (bt_print_entry): New function.
3412         (print_binding_level): Use it.
3413         (push_namespace): Build current_binding_level->type_decls.
3414         (maybe_process_template_type_declaration): Adjust.
3415         (pushtag): Likewise.
3416         (clear_anon_tags): Use binding_table_remove_anonymous_types.
3417         (gettags): Remove.
3418         (cxx_remember_type_decls):  Rename from storetags.  Adjust.
3419         (lookup_tag): Use binding_table_find_anon_type.  Tidy.
3420         (lookup_tag_reverse): Use binding_table_reverse_maybe_remap.
3421         (cxx_init_decl_processing): Build global_binding_level->type_decls.
3422         (store_parm_decls): Remove pointless code.
3423         * name-lookup.c (free_binding_entry): New variable.
3424         (ENTRY_INDEX): New macro.
3425         (struct binding_table_s): New datatype.
3426         (binding_entry_make): New function.
3427         (binding_entry_free): Likewise.
3428         (binding_table_construct): Likewise.
3429         (binding_table_free): Likewise.
3430         (binding_table_new): Likewise.
3431         (binding_table_expand): Likewise.
3432         (binding_table_insert): Likewise.
3433         (binding_table_find): Likewise.
3434         (binding_table_find_anon_type): Likewise.
3435         (binding_table_reverse_maybe_remap): Likewise.
3436         (binding_table_remove_anonymous_types): Likewise.
3437         (binding_table_foreach): Likewise.
3438         * name-lookup.h (binding_table): New type.
3439         (binding_entry): Likewise.
3440         (bt_foreach_proc): Likewise.
3441         (struct binding_entry_s): New datatype.
3442         (SCOPE_DEFAULT_HT_SIZE): New macro.
3443         (CLASS_SCOPE_HT_SIZE): Likewise.
3444         (NAMESPACE_ORDINARY_HT_SIZE): Likewise.
3445         (NAMESPACE_STD_HT_SIZE): Likewise.
3446         (GLOBAL_SCOPE_HT_SIZE): Likewise.
3447         (binding_table_new): Declare.
3448         (binding_table_free): Likewise.
3449         (binding_table_insert): Likewise.
3450         (binding_table_find_anon_type): Likewise.
3451         (binding_table_reverse_maybe_remap): Likewise.
3452         (binding_table_remove_anonymous_types): Likewise.
3453         (binding_table_foreach): Likewise.
3454         (binding_table_find): Likewise.
3455         (cxx_remember_type_decls): Likewise.
3456         * pt.c (bt_instantiate_type_proc): New function.
3457         (do_type_instantiation): Use it.
3458         * search.c (lookup_field_r): Use binding_table_find.
3459
3460 2003-05-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3461
3462         * semantics.c (perform_deferred_access_checks): Don't discard
3463         checked access.
3464
3465 2003-05-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3466
3467         * error.c (cp_error_at, cp_warning_at, cp_pedwarn_at): Eliminate
3468         libiberty VA_ macros, always use stdarg.
3469         * rtti.c (create_pseudo_type_info): Likewise.
3470         * tree.c (build_min_nt, build_min): Likewise.
3471
3472 2003-05-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3473
3474         * ptree.c (cxx_print_type, cxx_print_xnode): Use string
3475         concatentation on HOST_WIDE_INT_PRINT_* format specifier to
3476         collapse multiple function calls into one.
3477         * tree.c (debug_binfo): Likewise.
3478
3479 2003-05-15  Jason Merrill  <jason@redhat.com>
3480
3481         PR c++/5388
3482         * call.c (conditional_conversion): Don't consider implicit
3483         conversions if T2 is a base of T1.
3484         * cp-tree.h (DERIVED_FROM_P, UNIQUELY_DERIVED_FROM_P): Make boolean.
3485         (ACCESSIBLY_UNIQUELY_DERIVED_P, PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
3486
3487         * parser.c (cp_parser_primary_expression): Convert a static data
3488         member from reference.
3489
3490 2003-05-15  Mark Mitchell  <mark@codesourcery.com>
3491
3492         * call.c (build_op_delete_call): Avoid creating unnecessary types.
3493         * class.c (instantiate_type): Remove tests for tf_no_attributes.
3494         * cp-tree.h (tsubst_flags_t): Remove tf_no_attributes.
3495         (COMPARE_NO_ATTRIBUTES): Remove.
3496         * typeck.c (comptypes): Do not check COMPARE_NO_ATTRIBUTES.
3497
3498         PR c++/8385
3499         * semantics.c (finish_typeof): Refine type-dependency check.
3500
3501 2003-05-13  Jason Merrill  <jason@redhat.com>
3502
3503         * typeck.c (build_modify_expr): Don't always stabilize the lhs and
3504         rhs.  Do stabilize the lhs of a MODIFY_EXPR used on the lhs.
3505
3506 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3507
3508         * method.c (synthesize_method): Call push/pop_deferring_access_checks.
3509
3510 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3511
3512         PR c++/10230, c++/10481
3513         * semantics.c (finish_non_static_data_member): Handle when the
3514         non-static member is not from a base of the current class type.
3515
3516 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3517
3518         PR c++/10552
3519         * pt.c (tsubst_copy): Handle TEMPLATE_DECL that is a member class
3520         template and has dependent context.
3521
3522 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3523
3524         * pt.c (instantiate_decl): Call push/pop_deferring_access_checks.
3525
3526 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3527
3528         PR c++/9252
3529         * cp-tree.h (saved_scope): Remove check_access field.
3530         (tsubst_flags_t): Remove tf_parsing.
3531         * decl.c (maybe_push_to_top_level): Don't initialize
3532         scope_chain->check_access.
3533         (make_typename_type, make_unbound_class_template): Don't use
3534         tf_parsing.
3535         (register_dtor_fn): Use push/pop_deferring_access_checks
3536         instead of scope_chain->check_access.
3537         * method.c (use_thunk): Likewise.
3538         * parser.c (cp_parser_explicit_instantiation
3539         (cp_parser_constructor_declarator_p): Don't call
3540         push/pop_deferring_access_checks here.
3541         (cp_parser_template_argument, cp_parser_class_name): Don't use
3542         tf_parsing.
3543         (yyparse): Check flag_access_control.
3544         * pt.c (instantiate_class_template): Call
3545         push/pop_deferring_access_checks.
3546         * semantics.c (push_deferring_access_checks): Propagate
3547         dk_no_check.
3548         (perform_or_defer_access_check): Make sure basetype_path is
3549         a type before comparison.
3550         * call.c (build_op_delete_call, build_over_call): Use
3551         perform_or_defer_access_check.
3552         * class.c (alter_access): Likewise.
3553         * init.c (build_offset_ref): Likewise.
3554         * lex.c (do_identifier): Likewise.
3555         * method.c (hack_identifier): Likewise.
3556         * search.c (lookup_member): Likewise.
3557         * semantics.c (finish_non_static_data_member): Likewise.
3558         (simplify_aggr_init_exprs_r): Use push/pop_deferring_access_checks
3559         instead of flag_access_control.
3560
3561 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3562
3563         PR c++/9554
3564         * parser.c (cp_parser_class_name): Remove check_access parameter.
3565         All caller adjusted.  Update declaration.
3566         (cp_parser_lookup_name): Likewise.
3567         * semantics.c (push_deferring_access_checks): Change parameter type
3568         to enum deferring_kind.  All caller adjusted.
3569         (resume_deferring_access_checks): Adjust to use new enum.
3570         (stop_deferring_access_checks): Likewise.
3571         (perform_or_defer_access_check): Likewise.
3572         * cp-tree.h (deferring_kind): New enum.
3573         (deferred_access): Adjust field type.
3574         (push_deferring_access_checks): Update declaration.
3575
3576 2003-05-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3577
3578         PR c++/10555, c++/10576
3579         * pt.c (lookup_template_class): Handle class template with
3580         multiple levels of parameters when one of the levels contain
3581         errors.
3582
3583 2003-05-08  Jason Merrill  <jason@redhat.com>
3584
3585         * init.c (build_new_1): Don't reuse a TARGET_EXPR in an
3586         expression.  Undo some of the recent reorg.
3587
3588 2003-05-07  Richard Henderson  <rth@redhat.com>
3589
3590         PR c++/10570
3591         * cfns.gperf: Comment out POSIX thread cancellation points,
3592         plus abort and raise.
3593         * cfns.h: Regenerate.
3594
3595 2003-05-07  Jason Merrill  <jason@redhat.com>
3596
3597         * call.c (build_conditional_expr): Don't assume that the folded
3598         expression has result_type.
3599
3600 2003-05-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3601
3602         * typeck.c (build_unary_op): Deal with const qualifier in
3603         invalid pointer-to-member earlier.
3604
3605 2003-05-05  Jason Merrill  <jason@redhat.com>
3606
3607         PR c++/9537
3608         * call.c (conditional_conversion): Build an RVALUE_CONV if
3609         we're just changing the cv-quals.
3610         (build_conditional_expr): Don't call convert to change
3611         cv-quals.
3612
3613 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3614
3615         PR c++/10496
3616         * typeck.c (build_unary_op): Don't output const qualifier when
3617         output invalid pointer-to-member diagnostics.
3618
3619 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3620
3621         * decl.c: Fix typos.
3622
3623 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3624
3625         PR c++/4494
3626         * decl.c (start_function): Use same_type_p to check return type
3627         of main.
3628
3629 2003-05-03  Zack Weinberg  <zack@codesourcery.com>
3630
3631         PR c/10604
3632         * cp/typeck.c (build_x_compound_expr): No need to check
3633         extra_warnings as well as warn_unused_value.
3634
3635 2003-05-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3636
3637         PR c++/9364, c++/10553, c++/10586
3638         * decl.c (make_typename_type): Don't crash on illegal code.
3639
3640 2003-05-03  Nathan Sidwell  <nathan@codesourcery.com>
3641
3642         * class.c (finish_struct): Use location_t and input_location
3643         directly.
3644         * decl.c (make_label_decl): Likewise.
3645         (use_label): Likewise.
3646         * decl2.c (warn_if_unknown_interface): Likewise.
3647         (start_static_initialization_or_destruction): Likewise.
3648         (generate_ctor_or_dtor_function): Likewise.
3649         (finish_file): Likewise.
3650         * error.c (print_instantiation_full_context): Likewise.
3651         * init.c (create_temporary_var): Likewise.
3652         * method.c (synthesize_method): Likewise.
3653         * parser.c (cp_token): Likewise.
3654         (cp_lexer_set_source_position_from_token): Likewise.
3655         (cp_lexer_get_preprocessor_token): Likewise.
3656         (cp_parser_statement): Likewise.
3657         * pt.c (tsubst_friend_function): Likewise.
3658         (instantiate_class_template): Likewise.
3659         (tsubst_decl): Likewise.
3660         (tsubst): Likewise.
3661         (instantiate_decl): Likewise.
3662         * semantics.c (begin_class_definition): Likewise.
3663         (expand_body): Likewise.
3664
3665 2003-05-01  Nathan Sidwell  <nathan@codesourcery.com>
3666
3667         * class.c (finish_struct): Rename lineno to input_line.
3668         * decl.c (push_binding_level, pop_binding_level,
3669         suspend_binding_level, resume_binding_level, make_label_decl,
3670         use_label, start_function): Likewise.
3671         * decl2.c (warn_if_unknown_interface,
3672         start_static_initialization_or_destruction,
3673         generate_ctor_or_dtor_function, finish_file): Likewise.
3674         * error.c (cp_line_of, print_instantiation_full_context,
3675         print_instantiation_context): Likewise.
3676         * except.c (check_handlers_1, check_handlers): Likewise.
3677         * init.c (create_temporary_var): Likewise.
3678         * method.c (use_thunk, synthesize_method): Likewise.
3679         * parser.c (cp_lexer_set_source_position_from_token,
3680         cp_lexer_get_preprocessor_token): Likewise.
3681         * pt.c (push_tinst_level, pop_tinst_level,
3682         tsubst_friend_function, instantiate_class_template, tsubst_decl,
3683         tsubst, tsubst_expr, instantiate_decl): Likewise.
3684         * semantics.c (genrtl_try_block, finish_label_stmt,
3685         begin_class_definition, expand_body,
3686         genrtl_finish_function): Likewise.
3687         * tree.c (build_min_nt, build_min): Likewise.
3688
3689 2003-05-01  Mark Mitchell  <mark@codesourcery.com>
3690
3691         * decl2.c (comdat_linkage): Don't externalize explicit
3692         instantiations.
3693
3694 2003-05-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3695
3696         PR c++/10554
3697         * decl2.c (do_class_using_decl): Check if operand 0 of SCOPE_REF
3698         is not NULL.
3699
3700 2003-05-01  Steven Bosscher  <steven@gcc.gnu.org>
3701
3702         * cp-tree.h (struct lang_id2): Remove.  Move fields from here...
3703         (struct lang_identifier): ... to here.
3704         (LANG_ID_FIELD): Remove.
3705         (SET_LANG_ID): Remove.
3706         (IDENTIFIER_LABEL_VALUE): Adjust for new lang_identifier.
3707         (SET_IDENTIFIER_LABEL_VALUE): Likewise.
3708         (IDENTIFIER_IMPLICIT_DECL): Likewise.
3709         (SET_IDENTIFIERL_IMPLICIT_DECL): Likewise.
3710         (IDENTIFIER_ERROR_LOCUS): Likewise.
3711         (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
3712
3713 2003-05-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3714
3715         PR c++/8772
3716         * pt.c (convert_template_argument): Correct diagnostic.
3717
3718 2003-04-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3719
3720         PR c++/9432, c++/9528
3721         * decl2.c (validate_nonmember_using_decl): Handle SCOPE_REF.
3722
3723 2003-04-30  Garbiel Dos Reis  <gcc@integrable-solutions.net>
3724
3725         * decl.c (check_previous_goto_1): Adjust prototype.
3726         (check_previous_goto): Adjust use.
3727         (check_switch_goto): Likewise.
3728         (use_label): Adjust.
3729         (check_previous_goto_1): Don't use pedwarn_with_file_and_line.
3730         (struct named_label_use_list): Use location_t datatype.
3731
3732 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
3733
3734         PR c++/10551
3735         * pt.c (mark_decl_instantiated): Defer all explicit instantiations
3736         that have not yet been written out.
3737
3738 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
3739
3740         PR c++/10549
3741         * class.c (layout_class_type): Mark overlong bitfields as having
3742         the maximum size permitted by their type, after layout.
3743
3744         PR c++/10527
3745         * error.c (dump_expr): Correctly handling of NEW_EXPR.4
3746
3747 2003-04-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3748
3749         * call.c (build_operator_new_call): Fix typo.
3750         * lang-options.h: Likewise.
3751
3752 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
3753
3754         PR c++/10515
3755         * cp-tree.h (lookup_field_1): Declare it.
3756         * search.c (lookup_field_1): Make it public.
3757         * decl.c (reshape_init): Handle designated initializers.
3758
3759         * decl.c (maybe_commonize_var): Further tweak support for systems
3760         without weak symbols.
3761
3762 2003-04-27  Mark Mitchell  <mark@codesourcery.com>
3763
3764         * decl.c (maybe_commonize_var): Fix thinko in last patch.
3765
3766 2003-04-27  Mark Mitchell  <mark@codesourcery.com>
3767
3768         PR c++/10506
3769         * method.c (use_thunk): Decrement immediate_size_expand.
3770
3771         PR c++/10503
3772         * cp-tree.h (DECL_VAR_MARKED_P): New macro.
3773         (DECL_MAYBE_TEMPLATE): Remove.
3774         * class.c (fixed_type_or_null): Avoid infinite recursion.
3775
3776         * decl.c (maybe_commonize_var): Make the code match the comments.
3777         * pt.c (instantiate_decl): Move call to import_export_decl.
3778
3779 2003-04-26  Mark Mitchell  <mark@codesourcery.com>
3780
3781         * decl2.c (finish_file): Fix merge botch.
3782
3783 2003-04-25  Mark Mitchell  <mark@codesourcery.com>
3784
3785         * decl2.c (finish_file): Don't call import_export_decl for
3786         functions that are not defined.
3787         (handle_class_head): Robustify.
3788         * pt.c (instantiate_decl): Do not call cp_finish_decl for
3789         variables that are not defined.
3790
3791 2003-04-24  Sylvain Pion  <Sylvain.Pion@mpi-sb.mpg.de>
3792
3793         * call.c (print_z_candidates): Fix off by one error.
3794
3795 2003-04-24  Nathan Sidwell  <nathan@codesourcery.com>
3796
3797         PR c++/10337
3798         * call.c (joust): Don't warn about conversion ops that are exact
3799         or cv-conversions. Rearrange to avoid multiple type comparisons.
3800
3801 2003-04-23  Mark Mitchell  <mark@codesourcery.com>
3802
3803         PR c++/10471
3804         * call.c (build_cxx_call): Robustify.
3805
3806 2003-04-23  Neil Booth  <neil@daikokuya.co.uk>
3807
3808         * Make-lang.in (lex.o): Remove mbchar.h.
3809         * lex.c (MULTIBYTE_CHARS): Lose.
3810         * parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled
3811         in c-lex.c.
3812
3813 2003-04-23  Mark Mitchell  <mark@codesourcery.com>
3814
3815         PR c++/9847
3816         * cp-tree.h (duplicate_tag_error): Remove.
3817         * class.c (duplicate_tag_error): Remove.
3818         * semantics.c (begin_class_definition): Return immediately for a
3819         duplicate class definition.
3820
3821         PR c++/10451
3822         * decl.c (grokdeclarator): Correct logic for "mutable" errors.
3823
3824 2003-04-22  Mark Mitchell  <mark@codesourcery.com>
3825
3826         PR c++/10446
3827         * search.c (lookup_fnfields_1): Handle empty slots in the method
3828         vector.
3829
3830         PR c++/10428
3831         * decl.c (check_elaborated_type_specifier): New function, split
3832         out from ...
3833         (xref_tag): ... here.  Use the new function in more places.
3834
3835         * rtti.c (throw_bad_typeid): Use build_cxx_call.
3836
3837 2003-04-21  Mark Mitchell  <mark@codesourcery.com>
3838
3839         * call.c (build_over_call): Use build_cxx_call.
3840         (build_cxx_call): New method, split out of build_over_call.
3841         * cp-tree.h (language_function): Add can_throw.
3842         (build_cxx_call): Declare it.
3843         * decl.c (finish_function): If a function does not contain any
3844         calls to functions that can throw an exception, indicate that
3845         fact.
3846         * decl2.c (mark_used): Do not defer the instantiation of
3847         functions, if the current function does not throw.
3848         * optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones.
3849         * pt.c (instantiate_decl): Make sure import_export_decl is called
3850         before emitting things.
3851         * rtti.c (throw_bad_cast): Use build_cxx_call.
3852         (build_dynamic_cast_1): Likewise.
3853         * typeck.c (build_function_call): Likewise.
3854
3855 2003-04-21  Nathan Sidwell  <nathan@codesourcery.com>
3856
3857         PR c++/9881
3858         * typeck.c (build_unary_op): Fold all COMPONENT_REF addr
3859         expressions. Reverts my 2002-08-08 patch.
3860
3861         * typeck.c (comp_ptr_ttypes_real): Swap final && operands for
3862         cheaper early exit.
3863
3864 2003-04-20  Nathan Sidwell  <nathan@codesourcery.com>
3865
3866         * cp/decl2.c (start_static_storage_duration_function): Take count
3867         arg, don't check if it wraps round.
3868         (generate_ctor_or_dtor_function): Add locus arg, use it.
3869         (generate_ctor_and_dtor_functions_for_priority): Data arg is a
3870         locus.
3871         (finish_file): Set line numbers to past EOF for synthesized
3872         functions.
3873
3874 2003-04-20  Nathan Sidwell  <nathan@codesourcery.com>
3875
3876         PR c++/10405
3877         * search.c (lookup_field_1): Final scan goes backwards for
3878         types, forwards for non-types.
3879
3880 2003-04-17  Roger Sayle  <roger@eyesopen.com>
3881
3882         PR c/10375
3883         * decl.c (duplicate_decls): Preserve "const", "noreturn" and
3884         "nothrow" function attributes.
3885
3886 2003-04-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3887
3888         PR c++/10347
3889         * pt.c (type_dependent_expression_p): Handle array new.
3890
3891 2003-04-15  Mark Mitchell  <mark@codesourcery.com>
3892
3893         PR c++/10381
3894         * parser.c (cp_parser_primary_expression): Reorganize logic for
3895         dealing with name lookup failures.
3896
3897 2003-04-15  Jason Merrill  <jason@redhat.com>
3898
3899         * decl2.c (mark_used): Don't instantiate anything if
3900         skip_evaluation.
3901
3902 2003-04-14  Ziemowit Laski  <zlaski@apple.com>
3903
3904         * tree.c (build_cplus_array_type_1): Do not call
3905         uses_template_parms() on a NULL index_type.
3906
3907 2003-04-13  Roger Sayle  <roger@eyesopen.com>
3908
3909         * decl.c (duplicate_decls): Preserve pure and malloc attributes.
3910
3911 2003-04-12  Mark Mitchell  <mark@codesourcery.com>
3912
3913         PR c++/10300
3914         * init.c (build_new_1): Reorganize.
3915
3916 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
3917
3918         * class.c (initialize_array)
3919         * decl.c (reshape_init)
3920         * decl2.c (build_expr_from_tree)
3921         * init.c (build_zero_init)
3922         * pt.c (tsubst_copy, tsubst_copy_and_build)
3923         * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer)
3924         (ptm_initializer, class_initializer, get_pseudo_ti_init)
3925         * semantics.c (finish_compound_literal)
3926         * typeck.c (build_ptrmemfunc1)
3927         * typeck2.c (store_init_value, process_init_constructor)
3928         (build_functional_cast): Use build_constructor.
3929
3930 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
3931
3932         * call.c (print_z_candidates): Use gcc_gettext_width, not
3933         strlen, to determine how much padding to use.
3934
3935 2003-04-10  Zack Weinberg  <zack@codesourcery.com>
3936
3937         * decl.c: Update all calls to shadow_warning.
3938
3939 2003-04-10  Mark Mitchell  <mark@codesourcery.com>
3940
3941         * class.c (layout_class_type): Correct handling for overlong
3942         bit-fields whose width is the same as an integer type.
3943
3944 2003-04-06  Zack Weinberg   <zack@codesourcery.com>
3945
3946         * cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero.
3947         * cp-lang.c (cp_tree_size): New function.
3948         (LANG_HOOKS_TREE_SIZE): Override.
3949
3950         * cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct
3951         tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill.
3952         (union lang_tree_node): Remove common and srcloc members.
3953         (build_srcloc_here): Don't prototype.
3954         * decl.c (cp_tree_node_structure): Kill SRCLOC case.
3955         * pt.c (pending_templates): Correct comment.
3956         * tree.c (build_srcloc, build_srcloc_here): Kill.
3957
3958 2003-04-06  Zack Weinberg   <zack@codesourcery.com>
3959
3960         * call.c: Include intl.h.
3961         (print_z_candidate): Always use inform; get rid of errfn
3962         argument. Reorganize so that all the strings get picked up
3963         by xgettext.  Note obligation of caller to pass first argument
3964         through gettext.
3965         (print_z_candidates): Update to match.  Indent second and
3966         successive candidates by strlen() of translated message.
3967         (joust): Restructure ambiguous-conversion pedwarn so that
3968         translators see a complete sentence.  Update calls to
3969         print_z_candidate.
3970
3971         * Make-lang.in (cp/call.o): Update dependencies.
3972
3973 2003-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3974
3975         * decl.c (set_current_binding_level): Delete, revert last change.
3976         (current_binding_level): Modify to allow it as as lvalue.
3977
3978 2003-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3979
3980         * name-lookup.c (find_binding): Pass appropriate pointer type to
3981         POP_TIMEVAR_AND_RETURN.
3982
3983 2003-04-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3984
3985         * Make-lang.in (cp-warn): Add $(STRICT_WARN).
3986         * cp-tree.h: Don't insist on having GNUC.
3987
3988 2003-04-03  Jason Merrill  <jason@redhat.com>
3989
3990         * cvt.c (ocp_convert): Only abort if we try to convert an object
3991         of TREE_ADDRESSABLE type.
3992
3993         * class.c (build_vtable): Set DECL_ALIGN here.
3994         (get_vtable_decl): Not here.
3995         (layout_vtable_decl): Or here.
3996         (create_vtable_ptr): Or here.
3997         (layout_class_type): Or here.
3998         (check_bitfield_decl): Don't mess with field alignment.
3999
4000 2003-04-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4001
4002         * operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR,
4003         DEF_ASSN_OPERATOR): Delete spurious semi-colon.
4004         * rtti.c (dfs_class_hint_mark): Likewise.
4005
4006         * decl.c (push_local_name, push_class_level_binding,
4007         maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in
4008         functions returning void.
4009         * decl2.c (add_using_namespace): Likewise.
4010
4011         * decl.c (print_binding_level, print_other_binding_stack,
4012         print_binding_stack): Cast argument of %p specifier to void*.
4013         * ptree.c (cxx_print_decl): Likewise.
4014
4015         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
4016         VAR_FUNCTION_OR_PARM_DECL_CHECK,
4017         VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
4018         BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK,
4019         LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__.
4020
4021         * decl.c (set_current_binding_level): New macro.  Use throughout
4022         when setting the current binding level.
4023
4024         * cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma
4025         in enum.
4026         * method.c (mangling_flags): Likewise.
4027
4028         * cp-tree.h (lang_type_header): Add __extension__ and use
4029         CHAR_BITFIELD for members.
4030
4031 2003-04-02  Geoffrey Keating  <geoffk@apple.com>
4032
4033         PR other/9274
4034         * mangle.c: Include gt-cp-mangle.h.
4035         (subst_identifiers): Mark with GTY.
4036         * config-lang.in (gtfiles): Add cp/mangle.c.
4037         * Make-lang.in: (gt-cp-mangle.h): New rule.
4038         (cp/mangle.o): Depends on gt-cp-mangle.h.
4039
4040 2003-04-01  Andrew Pinski  <pinskia@physics.uc.edu>
4041
4042         * config-lang.in (gtfiles): Add \$(srcdir)/cp/name-lookup.c
4043         after \$(srcdir)/cp/name-lookup.h.
4044         * name-lookup.c: (cxx_binding_make): Use ggc_alloc_clearedinstead
4045         of ggc_alloc.  Include gt-cp-name-lookup.h at the end of the file.
4046         * Make-lang.in: (gt-cp-name-lookup.h): Is generated by gengtype.
4047         (cp/name-lookup.o): Depends on gt-cp-name-lookup.h.
4048
4049 2003-03-31  Jason Merrill  <jason@redhat.com>
4050
4051         PR java/10145
4052         * class.c (check_field_decl): Don't set DECL_ALIGN.
4053
4054 2003-03-30  Mark Mitchell  <mark@codesourcery.com>
4055
4056         PR c++/7647
4057         * decl.c (grokdeclarator): Tidy, slightly.
4058         * search.c (lookup_field_1): Add want_type parameter.
4059         (lookup_field_r): Adjust call to lookup_field_1.
4060
4061 2003-03-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4062
4063         * Make-lang.in (cp/name-lookup.o): Add more dependencies.
4064
4065 2003-03-30  Gabriel Dos Reis <gdr@integrable-solutions.net>
4066
4067         * cp-tree.h (binding_for_name: Move to name-lookup.h  Adjust
4068         prototype.
4069         (cxx_scope_find_binding_for_name): Likewise.
4070         * decl.c (find_binding: Move to name-lookup.c.
4071         (binding_for_name): Likewise.
4072         (cxx_scope_find_binding_for_name): Likewise.
4073         (BINDING_LEVEL):  Remove.
4074         (push_binding): Tidy.
4075         (push_class_binding): Likewise.
4076         (pop_binding): Likewise.
4077         (poplevel): Likewise.
4078         (poplevel_class): Likewise.
4079         (set_identifier_type_value_with_scope): Likewise.
4080         (push_overloaded_decl): Likewise.
4081         (lookup_tag): Likewise.
4082         (unqualified_namespace_lookup): Likewise.
4083         (lookup_name_current_level): Likewise.
4084         (maybe_inject_for_scope_var): Likewise.
4085         (namespace_binding): Move to name-lookup.c.
4086         (set_namespace_binding): Likewise.
4087         * decl2.c (lookup_using_namespace): Tidy.
4088         (qualified_lookup_using_namespace): Likewise.
4089         (do_toplevel_using_decl): Likewise.
4090         * name-lookup.c: Include "timevar.h"
4091         * name-lookup.h (cxx_scope):  Declare.
4092         (struct cxx_binding): Lose member "has_level".  Adjust "scope"
4093         member declaration.
4094         (BINDING_SCOPE): Adjust definition.
4095         (BINDING_HAS_LEVEL_P): Remove.
4096
4097 2003-03-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4098
4099         * name-lookup.c: New file.
4100         * name-lookup.h: Likewise..
4101         * decl.c (push_binding): Adjust use cxx_binding_make.
4102         (free_bindings): Move to name-lookup.c
4103         (pop_binding): Use cxx_binding_free.
4104         (binding_for_name): Tidy.
4105         * cp-tree.h: Include "name-lookup.h"
4106         (cxx_binding_make): Move to name-lookup.h
4107         (cxx_binding_clear): Likewise.
4108         (struct cxx_binding): Likewise.
4109         (LOCAL_BINDING_P): Likewise.
4110         (INHERITED_VALUE_BINDING_P): Likewise.
4111         (BINDING_SCOPE): Likewise.
4112         (BINDING_HAS_LEVEL_P): Likewise.
4113         (BINDING_VALUE): Likewise.
4114         (BINDING_TYPE): Likewise.
4115         * config-lang.in (gtfiles): Add cp/name-lookup.h
4116         * Make-lang.in (cp/name-lookup.o): New rule.
4117         (CXX_OBJS): Add cp/name-lookup.o
4118         (CXX_TREE_H): Add cp/name-lookup.h
4119
4120 2003-03-28  Jason Merrill  <jason@redhat.com>
4121
4122         PR c++/10245
4123         * cvt.c (force_rvalue): New fn.
4124         * call.c (build_conditional_expr): Use it.
4125         * cp-tree.h: Declare it.
4126
4127 2003-03-28  Mike Stump  <mrs@apple.com>
4128
4129         * error.c (dump_expr): Add 0x to printed hex numbers to make
4130         output match source code better.
4131
4132 2003-03-28  Mark Mitchell  <mark@codesourcery.com>
4133
4134         PR c++/10218
4135         * decl.c (grokfndecl): Return NULL_TREE for bogus out-of-class
4136         definitions.
4137
4138         * decl2.c (generate_ctor_or_dtor_function): Tolerate a
4139         non-existant ssdf_decls array.
4140         (finish_file): Call generator_ctor_or_dtor_function when there are
4141         static constructors or destructors and no other static
4142         initializations.
4143
4144 2003-03-28  Nathan Sidwell  <nathan@codesourcery.com>
4145
4146         PR c++/10047
4147         * decl2.c (finish_file): Don't warn about explicitly instantiated
4148         inline decls.
4149
4150 2003-03-27  Nathan Sidwell  <nathan@codesourcery.com>
4151
4152         PR c++/10224
4153         * pt.c (lookup_template_class): Only check instantiated args if
4154         they do not contain template parameters.
4155
4156 2003-03-27  Nathan Sidwell  <nathan@codesourcery.com>
4157
4158         PR c++/10158
4159         * parser.c (cp_parser_function_definition): Set
4160         DECL_INITIALIZED_IN_CLASS for members.
4161         * pt.c (instantiate_decl): Only reduce the template args for
4162         friends that are not defined in class.
4163
4164 2003-03-25  Jason Merrill  <jason@redhat.com>
4165
4166         * call.c (print_z_candidate): Change name of first arg to msgid.
4167         (joust): Add comment for translators.
4168
4169 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
4170
4171         PR c++/9898, PR c++/383, DR 322
4172         * pt.c (maybe_adjust_types_for_deduction) <DEDUCE_CONV>: Look
4173         through reference types on both PARM and ARG.
4174
4175 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
4176
4177         PR c++/10119
4178         * error.c (dump_expr) <BASELINK>: Use dump_expr.
4179         * pt.c (maybe_fold_nontype_args): New function.
4180         (tsubst_copy) <SCOPE_REF>: Subst any template_id args.
4181         <TEMPLATE_ID_EXPR>: Break out folding code, call it.
4182         (tsubst_copy_and_build) <TEMPLATE_ID_EXPR>: Call
4183         maybe_fold_nontype_args.
4184
4185 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
4186
4187         PR c++/10026
4188         * decl2.c (arg_assoc_type) <ERROR_MARK>: Don't die.
4189
4190 2003-03-23  Mark Mitchell  <mark@codesourcery.com>
4191
4192         PR c++/7086
4193         * typeck.c (cxx_mark_addressable):  Adjust call to
4194         gen_mem_addressof or put_var_into_stack.
4195
4196 2003-03-22  Nathan Sidwell  <nathan@codesourcery.com>
4197
4198         PR c++/9978, c++/9708
4199         * cp-tree.h (instantiate_template): Add tsubst_flags parameter.
4200         * call.c (add_template_candidate_real): Adjust
4201         instantiate_template call.
4202         * class.c (resolve_address_of_overloaded_function): Likewise.
4203         * decl.c (build_enumerator): Set TREE_CONSTANT.
4204         * pt.c (check_instantiated_args): New.
4205         (push_inline_template_parms_recursive): Set TREE_CONSTANT,
4206         TREE_READONLY.
4207         (build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY.
4208         (reduce_template_parm_level): Likewise.
4209         (process_template_parm): Likewise.
4210         (check_explicit_specialization): Adjust instantiate_template call.
4211         (convert_template_argument): Don't check non-type argument here.
4212         (lookup_template_class): Check them here.
4213         (tsubst_friend_function): Adjust instantiate_template call.
4214         (instantiate_template): Add tsubst_flags parameter, use it. Check
4215         instantiated args.
4216
4217 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
4218
4219         * decl.c: Update calls to shadow_warning.
4220
4221 2003-03-21  Nathan Sidwell  <nathan@codesourcery.com>
4222
4223         PR c++/9898
4224         * error.c (dump_decl) [CONST_DECL]: Print '<enumerator>'.
4225         (dump_expr) [CONSTRUCTOR]: Print default ctor as a function call.
4226
4227 2003-03-20  Mark Mitchell  <mark@codesourcery.com>
4228
4229         * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope
4230         friends.
4231         * cp/pt.c (instantiate_class_template): Fix formatting.
4232
4233 2003-03-14  Matt Austern  <austern@apple.com>
4234
4235         * cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray.
4236         (unemitted_tinfo_decl_p): Remove.
4237         (emit_tinfo_decl): Change declaration to remove unused parameter.
4238         * decl2.c (finish_file): Change tinfo emission to loop through
4239         unemitted_tinfo_decls array instead of looping through all decls.
4240         * rtti.c (unemitted_tinfo_decl_p): Declare as static, remove
4241         unused second parameter.
4242         (init_rtti_processing): initialize unemitted_tinfo_decls varray.
4243         (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls.
4244         (emit_tinfo_decl): remove unused second parameter, add assertion
4245         that decl hasn't already been emitted.
4246
4247 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
4248
4249         * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
4250         type from 'int' to 'bool'. Replace 0 and 1 with true and false in
4251         return statements.
4252
4253 2003-03-19  Jason Merrill  <jason@redhat.com>
4254
4255         PR c++/8316, c++/9315, c++/10136
4256         * call.c (print_z_candidate): Split out from...
4257         (print_z_candidiates): ...here.
4258         (joust): Use it.
4259
4260 2003-03-17  Roger Sayle  <roger@eyesopen.com>
4261
4262         PR c++/10031
4263         * decl.c (duplicate_decls): Use the new type when prototyping
4264         anticipated decls, even when the types match.  This defines the
4265         exception list for the built-in function.
4266
4267 2003-03-17  Jason Merrill  <jason@redhat.com>
4268
4269         PR c++/10091
4270         * typeck.c (build_class_member_access_expr): Compare
4271         TYPE_MAIN_VARIANTs.
4272
4273 2003-03-17  Mark Mitchell  <mark@codesourcery.com>
4274
4275         PR c++/9639
4276         * parser.c (cp_parser_declarator_id): Clear parser->scope.
4277
4278 2003-03-16  Jason Merrill  <jason@redhat.com>
4279
4280         PR c++/9993
4281         * decl.c (finish_function): Only allow the NRVO to use variables
4282         declared at function scope.
4283
4284 2003-03-17  Andreas Jaeger  <aj@suse.de>
4285
4286         * Make-lang.in (cp/TAGS): Remove.
4287
4288 2003-03-16  Nathan Sidwell  <nathan@codesourcery.com>
4289
4290         PR c++/9629
4291         * cp-tree.h (struct language_function): Add in_base_initializer.
4292         (in_base_initializer): define it.
4293         (expand_member_init): Remove INIT param.
4294         * init.c (expand_member_init): Remove INIT param, return the member.
4295         (emit_mem_initializers): Set in_base_initializer.
4296         * class.c (build_base_path): Check in_base_initializer.
4297         * parser.c (cp_parser_mem_initializer): Set in_base_initializer.
4298         * pt.c (tsubst_initializer_list): Likewise.
4299
4300 2003-03-16   Gabriel Dos Reis <gdr@integrable-solutions.net>
4301
4302         * decl.c (binding_for_name): Fix initialization thinko.
4303
4304 2003-03-15  Gabriel Dos Reis <gdr@integrable-solutions.net>
4305
4306         Compile-time improvement: 2/n.
4307         * cp-tree.h (struct cxx_binding): New datatype;
4308         (struct lang_identifier): Use it.
4309         (LOCAL_BINDING_P): Adjust definition.
4310         (INHERITED_VALUE_BINDING_P): Likewise.
4311         (BINDING_SCOPE): Likewise.
4312         (BINDING_HAS_LEVEL_P): Likewise.
4313         (BINDING_VALUE): Likewise.
4314         (BINDING_TYPE): Likewise.
4315         (IDENTIFIER_VALUE): Likewise.
4316         (struct tree_binding): Remove.
4317         (TS_CP_BINDING): Likewise.
4318         ((union lang_tree_node): Remove field "binding".
4319         (cxx_binding_clear): New macro.
4320         (binding_for_name): Adjust return type.
4321         (qualified_lookup_using_namespace): Adjust prototype.
4322         (lookup_using_namespace): Adjust prototype.
4323         (cxx_scope_find_binding_for_name): Declare.
4324         * cp-tree.def: Remove CPLUS_BINDING definition.
4325         * decl.c (push_binding): Adjust local variable type.
4326         (add_binding): Likewise.
4327         (push_class_binding): Likewise.
4328         (pop_binding): Likewise.
4329         (poplevel): Likewise.
4330         (poplevel_class): Likewise.
4331         (free_bindings):  Adjust type.
4332         (find_binding): Adjust return type, add a third parameter. Remove
4333         non-useful assertion now that we use static typing.
4334         (cxx_scope_find_binding_for_name): New function.
4335         (binding_for_name): Use it.  Adjust local variable type. Simplify.
4336         (namespace_binding):  Simplify.
4337         (set_namespace_binding): Likewise.
4338         (set_identifier_type_value_with_scope): Adjust local variable type.
4339         (lookup_tag): Don't type-abuse of local variable 'old'.
4340         (lookup_namespace_name): Likewise.  Allocate binding on stack.
4341         (select_decl): Adjust prototype.
4342         (unqualified_namespace_lookup):  Allocate binding on stack.
4343         Don't type-abuse of local variable 'val'.
4344         (lookup_name_real): Likewise.
4345         (maybe_inject_for_scope_var): Adjust local variable type.
4346         (cp_tree_node_structure): Remove CPLUS_BINDING case label.
4347         (namespace_binding): Adjust logic, simplify.
4348         (BINDING_LEVEL): Adjust definition.
4349         (push_class_level_binding): Adjust local variable type.
4350         (struct cxx_saved_binding): Adjust field 'binding' type.
4351         * decl2.c (ambiguous_decl): Adjust prototype.
4352         (lookup_using_namespace): Adjust local variable type.
4353         (qualified_lookup_using_namespace): Catch type error and correct
4354         ensueing logic error.
4355         (do_nonmember_using_decl): Adjust local variable type.  Allocate
4356         temporary cxx_binding on stack.
4357         (do_toplevel_using_decl): Adjust local variable type.
4358         * ptree.c (cxx_print_cxx_binding): New function.
4359         (cxx_print_identifier): Use it.
4360         (cxx_print_xnode): Delete CPLUS_BINDING case label.
4361
4362 2003-03-15  Roger Sayle  <roger@eyesopen.com>
4363
4364         * tree.c (count_functions): Fix whitespace.
4365
4366 2003-03-15  Neil Booth  <neil@daikokuya.co.uk>
4367
4368         * Make-lang.in: Update.
4369
4370 2003-03-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4371
4372         PR c++/6440
4373         * pt.c (maybe_process_partial_specialization): Handle
4374         member class template when enclosing class template is
4375         explicit specialized.
4376         (most_general_template): Stop looking when DECL is already
4377         specialized.
4378
4379 2003-03-13  Jason Merrill  <jason@redhat.com>
4380
4381         PR c++/9420
4382         * search.c (lookup_conversions): Call complete_type here.
4383         * call.c (implicit_conversion): Not here.
4384
4385 2003-03-13  Mark Mitchell  <mark@codesourcery.com>
4386
4387         * decl2.c (do_nonmember_using_decl): Correct handling of
4388         simultaneous type/non-type bindings.
4389
4390         * call.c (initialize_reference): Remove bogus assertion.
4391         * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
4392
4393 2003-03-12  Andrew Lewycky  <andrew@mxc.ca>
4394
4395         PR c++/7050
4396         * expr.c (cxx_expand_expr): Return const0_rtx for throw
4397         expressions.
4398
4399 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
4400
4401         PR c++/9474
4402         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
4403         to merge old and new declarations.
4404
4405 2003-03-12  Alexandre Oliva  <aoliva@redhat.com>
4406
4407         * g++.1: Remove.
4408         * Make-lang.in (c++.generated-manpages): Build cp/g++.1.
4409         (cp/g++.1): Build it from scratch in the build tree.
4410         (c++.install-man): Depend on it.  Install it from the build tree.
4411         (c++.mostlyclean): Clean it.
4412
4413 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
4414
4415         PR c++/9474
4416         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
4417         to merge old and new declarations.
4418
4419         PR c++/9924
4420         * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
4421
4422 2003-03-11  Jason Merrill  <jason@redhat.com>
4423
4424         PR c++/9820
4425         * search.c (lookup_member): Fix handling of functions in a class
4426         being defined.
4427
4428 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
4429
4430         PR c++/8700
4431         * call.c (convert_class_to_reference): Adjust usage of
4432         splice_viable.
4433         (any_viable): Remove.
4434         (splice_viable): Combine with any_viable.
4435         (print_z_candidates): Avoid printing duplicates.
4436         (build_user_type_conversion_1): Adjust usage of splice_viable.
4437         (build_new_function_call): Likewise.
4438         (build_operator_new_call): Likewise.
4439         (build_object_call): Likewise.
4440         (build_conditional_expr): Likewise.
4441         (build_new_op): Likewise.
4442         (build_new_method_call): Likewise.
4443         (joust): Remove spurious comment.
4444         * cp-tree.h (DECL_FRIENDLIST): Correct documentation.
4445         * decl2.c (arg_assoc_class): Simplify.
4446         * friend.c (add_friend): Likewise.
4447
4448 2003-03-11  Jason Merrill  <jason@redhat.com>
4449
4450         PR c++/8660
4451         * decl2.c (check_classfn): A member template only matches a
4452         member template.
4453
4454 2003-03-11  Neil Booth  <neil@daikokuya.co.uk>
4455
4456         * Make-lang.in (CXX_C_OBJS): Update.
4457         * lang-specs.h: Don't define __GNUG__ here.
4458
4459 2003-03-10  Mark Mitchell  <mark@codesourcery.com>
4460
4461         * call.c (perform_overload_resolution): New function.
4462         (build_new_function_call): Use it.
4463         (build_operator_new_call): Likewise.
4464         (add_candidates): Add explicit_targs and template_only parameters.
4465         (build_new_op): Adjust accordingly.
4466         * cp-tree.h (build_operator_new_call): New function.
4467         (build_function_call_real): Remove.
4468         (build_function_call_maybe): Likewise.
4469         * init.c (build_new_1): Use build_operator_new_call.
4470         * typeck.c (build_function_call_real): Rename to ...
4471         (build_function_call): ... this.
4472
4473 2003-03-10  Devang Patel  <dpatel@apple.com>
4474
4475         PR c++/9394
4476         * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
4477
4478 2003-03-10  Jason Merrill  <jason@redhat.com>
4479
4480         PR c++/9798
4481         * decl.c (push_using_directive): Push before recursing.
4482
4483         PR c++/9868, c++/9524
4484         * call.c (resolve_scoped_fn_name): Handle the case of a function
4485         pointer member.
4486
4487         * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
4488         argument in the pointer-to-member case.
4489
4490 2003-03-09  Mark Mitchell  <mark@codesourcery.com>
4491
4492         PR c++/9373
4493         * cp-lang.c (cxx_get_alias_set): Use alias set zero for
4494         pointers to member functions.
4495
4496         PR c++/8534
4497         * decl.c (build_ptrmemfunc_type): Do not allow default arugments
4498         in pointer-to-member-function types.
4499
4500 2003-03-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4501
4502         * expr.c (cplus_expand_constant): Use C90 prototype style.
4503         (cxx_expand_expr): Likewise.
4504
4505 2003-03-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4506
4507         PR c++/9970
4508         * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
4509         functions.
4510
4511 2003-03-08  Geoffrey Keating  <geoffk@apple.com>
4512
4513         * lang-specs.h (c++-header): Change .pch to .gch.
4514
4515 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
4516
4517         * cp-tree.h (cxx_init): Update prototype.
4518         * lex.c (cxx_init): Similarly.
4519
4520 2003-03-08  Mark Mitchell  <mark@codesourcery.com>
4521
4522         PR c++/9823
4523         * cp-tree.h (begin_mem_initializers): Remove.
4524         * parser.c (cp_parser_mem_initializer_list): Inline it here.
4525         Do not call finish_mem_initializers if not in a constructor.
4526         (cp_parser_class_head): Fix typo in error message.
4527         * semantics.c (begin_mem_initializers): Remove.
4528         * testsuite/g++.dg/parser/constructor1.C: New test.
4529
4530         PR c++/9809
4531         * call.c (add_function_candidate): Skip builtin fuctions that have
4532         not yet been declared.
4533
4534         PR c++/9982
4535         * init.c (build_new_1): Correct logic for determining whether or
4536         not to use an array cookie.
4537
4538         PR c++/9524
4539         * parser.c (cp_parser_postfix_expression): Call
4540         finish_non_static_data_member, even when processing_template_decl.
4541
4542         PR c++/9912
4543         * cp-tree.h (is_ancestor): New function.
4544         (handle_class_head): Change prototype.
4545         * decl2.c (is_namespace_ancestor): Rename to ...
4546         (namespace_anecestor): ... this.
4547         (set_decl_namespace): Adjust accordingly.
4548         (handle_class_head): Remove unncessary parameters.
4549         * parser.c (cp_parser_class_head): Check that
4550         nested-name-specifiers are used appropriately.
4551
4552 2003-03-07  Mark Mitchell  <mark@codesourcery.com>
4553
4554         * call.c (reference_binding): Remove REF_IS_VAR parameter.
4555         (implicit_conversion): Adjust call to reference_binding.
4556         (make_temporary_var_for_ref_to_type): Add TYPE parameter.
4557         (initialize_reference): Adjust handling for references bound to
4558         rvalues.
4559         * cp-tree.h (make_temporary_var_for_ref_to_temp): Change
4560         prototype.
4561         (real_non_cast_lvalue_p): New method.
4562         * cvt.c (build_up_reference): Adjust use of
4563         make_temporary_var_for_ref_to_temp.
4564         * tree.c (real_non_cast_lvalue_p): New method.
4565
4566 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4567
4568         * except.c (init_exception_processing): Use C90 prototype style.
4569         (cp_protect_cleanup_actions): Likewise.
4570         (prepare_eh_type): Likewise.
4571         (build_eh_type_type): Likewise.
4572         (build_exc_ptr): Likewise.
4573         (do_begin_catch): Likewise.
4574         (dtor_nothrow): Likewise.
4575         (do_end_catch): Likewise.
4576         (push_eh_cleanup): Likewise.
4577         (decl_is_java_type): Likewise.
4578         (choose_personality_routine): Likewise.
4579         (initialize_handler_parm): Likewise.
4580         (expand_start_catch_block): Likewise.
4581         (expand_end_catch_block): Likewise.
4582         (begin_eh_spec_block): Likewise.
4583         (finish_eh_spec_block): Likewise.
4584         (do_allocate_exception): Likewise.
4585         (do_free_exception): Likewise.
4586         (wrap_cleanups_r): Likewise.
4587         (stabilize_throw_expr): Likewise.
4588         (build_throw): Likewise.
4589         (complete_ptr_ref_or_void_ptr_p): Likewise.
4590         (is_admissible_throw_operand): Likewise.
4591         (nothrow_libfn_p): Likewise.
4592         (can_convert_eh): Likewise.
4593         (check_handlers_1): Likewise.
4594         (check_handlers): Likewise.
4595
4596 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
4597
4598         * call.c (merge_conversion_sequences): New function.
4599         (build_conv): Set ICS_USER_FLAG for USER_CONVs.
4600         (convert_class_to_reference): Correct handling of second
4601         standard conversion sequence in a user-defined conversion
4602         sequence.
4603         (build_user_type_conversion_1): Use merge_conversion_sequences.
4604         * cp-tree.def: Add comments for CONV nodes.
4605         * rtti.c (get_tinfo_decl): Use build_address/build_nop.
4606
4607 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4608
4609         * error.c (init_error): Use C90 prototype style.
4610         (dump_scope): Likewise.
4611         (dump_qualifiers): Likewise.
4612         (dump_template_argument): Likewise.
4613         (dump_template_argument_list): Likewise.
4614         (dump_template_parameter): Likewise.
4615         (dump_template_bindings): Likewise.
4616         (dump_type): Likewise.
4617         (dump_typename): Likewise.
4618         (class_key_or_enum): Likewise.
4619         (dump_aggr_type): Likewise.
4620         (dump_type_prefix): Likewise.
4621         (dump_type_suffix): Likewise.
4622         (dump_global_iord): Likewise.
4623         (dump_simple_decl): Likewise.
4624         (dump_decl): Likewise.
4625         (dump_template_decl): Likewise.
4626         (dump_function_decl): Likewise.
4627         (dump_parameters): Likewise.
4628         (dump_exception_spec): Likewise.
4629         (dump_function_name): Likewise.
4630         (dump_template_parms): Likewise.
4631         (dump_char): Likewise.
4632         (dump_expr_list): Likewise.
4633         (dump_expr): Likewise.
4634         (dump_binary_op): Likewise.
4635         (dump_unary_op): Likewise.
4636         (type_as_string): Likewise.
4637         (expr_as_string): Likewise.
4638         (decl_as_string): Likewise.
4639         (context_as_string): Likewise.
4640         (lang_decl_name): Likewise.
4641         (cp_file_of): Likewise.
4642         (cp_line_of): Likewise.
4643         (decl_to_string): Likewise.
4644         (expr_to_string): Likewise.
4645         (fndecl_to_string): Likewise.
4646         (code_to_string): Likewise.
4647         (language_to_string): Likewise.
4648         (parm_to_string): Likewise.
4649         (op_to_string): Likewise.
4650         (type_to_string): Likewise.
4651         (assop_to_string): Likewise.
4652         (args_to_string): Likewise.
4653         (cv_to_string): Likewise.
4654         (cxx_print_error_function): Likewise.
4655         (cp_diagnostic_starter): Likewise.
4656         (cp_diagnostic_finalizer): Likewise.
4657         (cp_print_error_function): Likewise.
4658         (function_category): Likewise.
4659         (print_instantiation_full_context): Likewise.
4660         (print_instantiation_partial_context): Likewise.
4661         (maybe_print_instantiation_context): Likewise.
4662         (print_instantiation_context): Likewise.
4663         (cp_printer): Likewise.
4664         (print_integer): Likewise.
4665         (print_non_consecutive_character): Likewise.
4666         (locate_error): Likewise.
4667
4668 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
4669
4670         PR c++/9965
4671         * call.c (reference_binding): Add ref_is_var parameter.
4672         (implicit_conversion): Adjust call to reference_binding.
4673         (initialize_reference): Likewise.
4674
4675         PR c++/9400
4676         * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
4677         PARM_DECLs.
4678
4679         PR c++/9791
4680         * class.c (get_basefndecls): Use lookup_fnfields_1.
4681
4682 2003-03-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4683
4684         PR c++/9188
4685         * parser.c (cp_parser_type_parameter): Remove redundant `expect'
4686         in error message.
4687         (cp_parser_single_declaration): Likewise.
4688
4689 2003-03-05  Jason Merrill  <jason@redhat.com>
4690
4691         PR c++/9440
4692         * call.c (build_conditional_expr): Use convert rather than an
4693         explicit NOP_EXPR.
4694
4695 2003-03-02  Matt Austern  <austern@apple.com>
4696
4697         * decl.c (cp_binding_level): Add static_decls varray member.
4698         (add_decl_to_level): Add static/inline namespace scope
4699         declarations to static_decls array.
4700         (wrapup_global_for_namespace): Pass static_decls only, instead of
4701         all decls, to wrapup_global_declarations/check_global_declarations.
4702         (push_namespace): Initialize static_decls for ordinary namespaces.
4703         (cxx_init_decl_processing): Initialize static_decls for global
4704         namespace.
4705
4706 2003-03-05  Mark Mitchell  <mark@codesourcery.com>
4707
4708         * class.c (end_of_class): Correct thinko.
4709
4710 2003-03-04  Nathanael Nerode  <neroden@gcc.gnu.org>
4711
4712         * config-lang.in: Replace ${libstdcxx_version} by its value.
4713
4714 2003-03-04  Gabriel Dos Reis <gdr@integrable-solutions.net>
4715
4716         * cp-tree.h (cxx_saved_binding): Declare.
4717         (struct saved_scope): Adjust type of field 'old_binding'.
4718         * decl.c (cxx_saved_binding_make): New macro.
4719         (struct cxx_saved_binding): Define.
4720         (store_bindings): Adjust prototype.  Use cxx_saved_binding to save
4721         C++ bindings.
4722         (maybe_push_to_top_level): Adjust local variable type.
4723         (pop_from_top_level): Likewise.
4724
4725 2003-03-04  Tom Tromey  <tromey@redhat.com>
4726
4727         * Make-lang.in (c++.tags): New target.
4728
4729 2003-03-04  Neil Booth  <neil@daikokuya.co.uk>
4730
4731         * Make-lang.in: Update.
4732
4733 2003-03-03  Jason Merrill  <jason@redhat.com>
4734
4735         * decl.c (finish_enum): Do set the type in a template. Simplify.
4736         * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
4737
4738 2003-03-03  Mark Mitchell  <mark@codesourcery.com>
4739
4740         PR c++/9878
4741         * call.c (convert_class_to_reference): Correct conversion
4742         sequences.
4743         (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
4744         (implicit_conversion): Adjust call to reference_binding.
4745         (add_candidate): Change type of candidates parameter.
4746         (add_function_candidate): Likewise.
4747         (add_conv_candidate): Likewise.
4748         (build_builtin_candidate): Likewise.
4749         (add_builtin_candidate): Likewise.
4750         (add_builtin_candidates): Likewise.
4751         (add_template_candidate_real): Likewise.
4752         (add_template_candidate): Likewise.
4753         (add_template_conv_candidate): Likewise.
4754         (build_user_type_conversion_1): Adjust accordingly.
4755         (build_object_call): Likewise.
4756         (build_conditional_expr): Likewise.
4757         (add_candidates): Likewise.
4758         (build_new_op): Likewise.
4759         (convert_like_real): Use USER_CONV_CAND.  Use build_nop.
4760         (build_new_method_call): Adjust calls to add_function_candidate.
4761         (make_temporary_var_for_ref_to_temp): New function.
4762         (initialize_reference): Add decl parameter.
4763         * class.c (build_rtti_vtbl_entries): Use build_address and
4764         build_nop.
4765         * cp-tree.h (initialize_reference): Change prototype.
4766         (make_temporary_var_for_ref_to_temp): New function.
4767         (build_type_conversion): Change prototype.
4768         (build_address): New function.
4769         (build_nop): Likewise.
4770         * cvt.c (cp_convert_to_pointer): Adjust call to
4771         build_type_conversion.  Avoid indicating redundant NOP_EXPRs.
4772         Use build_nop.
4773         (convert_to_pointer_force): Use build_nop.
4774         (build_up_reference): Use make_temporary_var_for_ref_to_temp.
4775         (convert_to_reference): Adjust call to build_type_conversion.
4776         (ocp_convert): Likewise.
4777         (build_type_conversion): Remove for_sure parameter.
4778         * decl.c (grok_reference_init): Use initialize_reference.
4779         * typeck.c (build_address): New function.
4780         (build_nop): Likewise.
4781         (build_unary_op): Use them.
4782         (build_ptrmemfunc): Tidy slightly.
4783         (convert_for_initialization): Adjust call to
4784         initialize_reference.
4785         * typeck2.c (store_init_value): Remove #if 0'd code.
4786
4787 2003-03-03  Jason Merrill  <jason@redhat.com>
4788
4789         * decl.c (start_function): Clear DECL_NUM_STMTS.
4790
4791         * class.c (get_vtable_decl): Use vtbl_type_node.
4792         (build_primary_vtable): Check for it.
4793
4794 2003-03-02  Aldy Hernandez  <aldyh@redhat.com>
4795
4796         * decl.c (check_initializer): Check for vector_opaque_p.
4797
4798 2003-03-02  Ashif Harji  <asharji@uwaterloo.ca>
4799
4800         * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
4801           invoke an external cpp during compilation.
4802
4803 2003-03-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4804
4805         * decl.c (duplicate_decls): Convert use of warning_with_decl() to
4806         that of warning().
4807         (start_decl): Likewise.
4808         (start_function): Likewise.
4809
4810 2003-03-01  Neil Booth  <neil@daikokuya.co.uk>
4811
4812         * Make-lang.in (CXX_C_OBJS): Update.
4813
4814 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
4815
4816         PR c++/9892
4817         * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
4818         instantiating it.
4819
4820 2003-02-28  Aldy Hernandez  <aldyh@redhat.com>
4821
4822         * parser.c (cp_parser_init_declarator): Revert opaque
4823         vector_opaque_p change.
4824         Do not include target.h.
4825
4826 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
4827
4828         PR c++/9879
4829         * cp-tree.h (build_zero_init): Add parameter.
4830         * decl.c (cp_finish_decl): Adjust call.
4831         * init.c (build_zero_init): Add nelts parameter.  Adjust recursive
4832         calls.
4833         (build_default_init): Add nelts parameter.  Adjust calls to
4834         build_zero_init.
4835         (build_new_1): Adjust call to build_default_init.
4836         * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
4837
4838 2003-02-26  Devang Patel  <dpatel@apple.com>
4839
4840         * decl.c (finish_enum): Merge two 'for' loops. Copy value node if
4841         required.  Postpone enum setting for template decls.
4842         (build_enumerator): Delay copying value node until finish_enum
4843         (). Remove #if 0'ed code.
4844         * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
4845         (tsubst_copy): Add check for enum type.
4846
4847 2003-02-25  Mark Mitchell  <mark@codesourcery.com>
4848
4849         PR c++/9683
4850         * decl2.c (prune_vars_needing_no_initialization): Do not throw
4851         away initializations for DECL_EXTERNAL VAR_DECLs.
4852         (finish_file): Adjust accordingly.
4853         * pt.c (instantiate_decl): Do not defer VAR_DECLs.
4854
4855 2003-02-24 Gabriel Dos Reis  <gdr@integrable-solutions.net>
4856
4857         * decl.c (add_binding): Time TV_NAME_LOOKUP.
4858         (push_class_binding): Likewise.
4859         (set_namespace_binding): Likewise.
4860
4861 2003-02-24  Mark Mitchell  <mark@codesourcery.com>
4862
4863         PR c++/9836
4864         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
4865         specializations back to the main template.
4866         * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
4867         * pt.c (resolve_typename_type): Likewise.
4868
4869 2003-02-24  Jeffrey D. Oldham  <oldham@codesourcery.com>
4870
4871         PR c++/9778
4872         * pt.c (tsubst_copy_and_build): For a templated function inside a
4873         scope, process template arguments.
4874
4875 2003-02-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4876
4877         PR c++/9602
4878         * typeck2.c (abstract_virtuals_error): Don't check when
4879         TYPE is still template parameter dependent.
4880
4881 2003-02-23  Mark Mitchell  <mark@codesourcery.com>
4882
4883         PR c++/5333
4884         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
4885         * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
4886         * pt.c (instantiate_class_template): Don't try to instantiate
4887         dependent types.
4888         (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
4889
4890 2003-02-21  Mark Mitchell  <mark@codesourcery.com>
4891
4892         PR c++/9749
4893         * decl.c (grokdeclarator): Do not allow parameters with variably
4894         modified types.
4895
4896 2003-02-21  Nathan Sidwell  <nathan@codesourcery.com>
4897
4898         * search.c (grow_bfs_bases): Remove. Fold into ...
4899         (bfs_walk): ... here, fix fencepost error. Fix merge lossage
4900         in previous patch.
4901
4902 2003-02-20  Mark Mitchell  <mark@codesourcery.com>
4903
4904         PR c++/9729
4905         * mangle.c (mangle_conv_op_name_for_type): Issue an error message
4906         when the G++ 3.2 ABI prevents correct compilation.
4907
4908 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
4909
4910         Change base class access representation. Share virtual base
4911         binfos.
4912         * cp/call.c (build_special_member_call): Remove binfo_for_vbase
4913         call.
4914         * cp/class.c (build_base_path): Likewise.
4915         (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
4916         (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
4917         (make_new_vtable): Adjust.
4918         (force_canonical_binfo_r): Delete.
4919         (force_canonical_binfo): Delete.
4920         (mark_primary_virtual_base): Delete.
4921         (dfs_unshared_virtual_bases): Delete.
4922         (mark_primary_bases): Adjust.
4923         (maybe_warn_about_overly_private_class): Adjust.
4924         (dfs_base_derived_from): Delete.
4925         (base_derived_from): Follow the inheritance chain.
4926         (struct find_final_overrider_data): Add vpath member.
4927         (dfs_find_final_overrider): Adjust.
4928         (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
4929         (find_final_overrider): Adjust.
4930         (update_vtable_entry_for_fn): Adjust.
4931         (modify_all_vtables): Adjust.
4932         (walk_subobject_offsets): Adjust.
4933         (layout_nonempty_base_or_field): Adjust.
4934         (layout_empty_base): Remove last parameter. Adjust.
4935         (build_base_field): Adjust.
4936         (build_base_fields): Adjust.
4937         (propagate_binfo_offsets): Remove last parameter. Adjust.
4938         (dfs_set_offset_for_unshared_vbases): Delete.
4939         (layout_virtual_bases): Adjust.
4940         (finish_struct_1): Adjust.
4941         (init_class_processing): Don't init access nodes.
4942         (dfs_get_primary_binfo): Delete.
4943         (get_primary_binfo): Adjust.
4944         (dump_class_hierarchy_r): Remove most derived arg, add IGO
4945         parameter. Adjust.
4946         (dump_class_hierarchy): Adjust.
4947         (finish_vtbls): Adjust.
4948         (get_original_base): Delete.
4949         (build_vtt_inits): Adjust.
4950         (dfs_build_secondary_vptr_vtt_inits): Adjust.
4951         (dfs_ctor_vtable_bases_queue_p): Adjust.
4952         (build_ctor_vtbl_group): Adjust.
4953         (dfs_accumulate_vtbl_inits): Adjust.
4954         (build_vtbl_initializer): Adjust.
4955         (build_vbase_offset_vtbl_entries): Adjust.
4956         (add_vcall_offset_vtbl_entries_1): Adjust.
4957         * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
4958         (access_*_node): Remove.
4959         (CANONICAL_BINFO): Delete.
4960         (BINFO_UNSHARED_MARKED): Remove.
4961         (BINFO_MARKED): Set LANG_FLAG_0 directly.
4962         (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
4963         (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
4964         (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
4965         Delete.
4966         (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
4967         (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
4968         (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
4969         Delete.
4970         (BINFO_DEPENDENT_BASE_P): New.
4971         (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
4972         index.
4973         (markedp, unmarkedp): Adjust.
4974         (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
4975         dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
4976         find_vbase_instance, binfo_for_vbase): Delete.
4977         (copied_binfo, original_binfo): Declare.
4978         (finish_base_specifier): Add virtual_p arg.
4979         (unshare_base_binfos): Delete.
4980         (copy_base_binfos): Declare.
4981         (reverse_path): Delete.
4982         * cp/decl.c (xref_basetypes): Access and virtuality passed
4983         differently. Don't copy direct base binfos here. Call
4984         copy_base_binfos.
4985         * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
4986         (initialize_vtbl_ptrs): Adjust.
4987         (expand_member_init): Adjust.
4988         * cp/parser.c (cp_parser_base_specifier): Adjust.
4989         * cp/pt.c (instantiate_class_template): Adjust.
4990         (get_template_base_recursive): Adjust.
4991         * cp/rtti.c (get_pseudo_ti_init): Adjust.
4992         (get_pseudo_ti_desc): Adjust.
4993         * cp/tree.c (unshare_base_binfos): Rename to ...
4994         (copy_base_binfos): ... here, reimplement.
4995         (make_binfo): Set BINFO_DEPENDENT_BASE_P.
4996         (reverse_path): Remove.
4997         * cp/typeck.c (get_delta_difference): Adjust error messages.
4998         * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
4999         * cp/search.c (lookup_base_r): Adjust.
5000         (dynamic_cast_base_recurse): Adjust.
5001         (canonical_binfo): Remove.
5002         (dfs_canonical_queue): Remove.
5003         (dfs_assert_unmarked_p): Remove.
5004         (assert_canonical_unmarked): Remove.
5005         (shared_marked_p, shared_unmarked_p): Remove.
5006         (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
5007         (dfs_access_in_type): Adjust.
5008         (access_in_type): Adjust.
5009         (dfs_accessible_queue_p): Adjust.
5010         (dfs_accessible_p): Adjust.
5011         (is_subobject_of_p_1, is_subobject_of_p): Remove.
5012         (struct lookup_field_info): Remove from_dep_base_p field.
5013         (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
5014         (lookup_field_r): Remove dependent base code.
5015         (lookup_member): Likewise.
5016         (dfs_walk, dfs_walk_real): Add access arg to queue fn.
5017         (dfs_unmarked_real_bases_queue_p): Remove.
5018         (dfs_marked_real_bases_queue_p): Remove.
5019         (dfs_skip_vbases): Remove.
5020         (dfs_get_pure_virtuals): Adjust.
5021         (markedp, unmarkedp): Adjust.
5022         (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
5023         (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
5024         (dfs_unmark): Adjust.
5025         (dfs_get_vbase_types):Remove.
5026         (dfs_build_inheritance_graph_order): Remove.
5027         (get_vbase_types): Remove
5028         (dfs_find_vbase_instance): Remove.
5029         (find_vbase_instance): Remove.
5030         (dfs_debug_unmarkedp): Adjust.
5031         (dependent_base_p): Remove.
5032         (dfs_push_type_decls): Adjust.
5033         (dfs_push_decls): Adjust.
5034         (dfs_no_overlap_yet): Adjust.
5035         (copied_binfo): New function.
5036         (original_binfo): New function.
5037         (binfo_for_vbase): Remove.
5038
5039 2003-02-18  Zack Weinberg  <zack@codesourcery.com>
5040
5041         * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
5042         (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
5043         vectors, for speed.
5044
5045 2003-02-18  Mark Mitchell  <mark@codesourcery.com>
5046
5047         PR c++/9704
5048         * class.c (layout_class_type): In the 3.2 ABI, take into account
5049         trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
5050
5051 2003-02-18  Matt Austern <austern@apple.com>
5052
5053         * cp/cp-lang.c: Change lang hooks so that final_write_globals does
5054         nothing for C++.
5055         * cp/decl.c (wrapup_globals_for_namespace): Remove special
5056         handling of global namespace.
5057
5058 2003-02-18  Geoffrey Keating  <geoffk@apple.com>
5059
5060         * cp-tree.h (rid_to_yy): Delete.
5061         (C_RID_YYCODE): Delete.
5062         (finish_file): Delete redundant declaration.
5063
5064 2003-02-18  Jason Merrill  <jason@redhat.com>
5065
5066         PR c++/9623
5067         * decl.c (reshape_init): Don't mess with initializer labels.
5068
5069         PR c++/9485
5070         * parser.c (cp_parser_postfix_expression): Set idk properly for
5071         object->scope::member.
5072
5073 2003-02-18  Ben Elliston  <bje@redhat.com>
5074
5075         PR other/7350
5076         * decl.c (duplicate_decls): Fix typo in comment.
5077
5078 2003-02-17  Michael Elizabeth Chastain <mec@shout.net>
5079
5080         PR debug/9717
5081         * class.c (build_base_field): Mark fields for base classes with
5082         DECL_IGNORED_P.
5083
5084 2003-02-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5085
5086         PR c++/9457
5087         * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
5088         CONSTRUCTOR_ELTS only once.
5089
5090 2003-02-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5091
5092         PR c++/9459
5093         * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
5094         (dump_type_suffix): Likewise.
5095
5096 2003-02-14  Nathan Sidwell  <nathan@codesourcery.com>
5097
5098         * search.c: ANSIfy function declarations and definitions.
5099         * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
5100         * call.c (build_method_call, resolve_scoped_fn_name,
5101         build_java_interface_fn_ref): Adjust lookup_field, lookup_member
5102         calls.
5103         * class.c (handle_using_decl): Likewise.
5104         * decl.c (make_typename_type, make_unmound_class_template,
5105         start_decl, compute_array_index_type): Likewise.
5106         * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
5107         * init.c (expand_member_init, build_member_call): Likewise.
5108         * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
5109         resolve_typename_type): Likewise.
5110         * typeck.c (lookup_destructor, finish_class_member_access_exprm
5111         build_prememfunc_access_expr): Likewise.
5112
5113 2003-02-13  Gabriel Dos Reis <gdr@integrable-solutions.net>
5114
5115         * decl2.c: Include "timevar.h".
5116         (namespace_ancestor): Time name lookup.
5117         (add_using_namespace): Likewise.
5118         (lookup_using_namespace): Likewise.
5119         (qualified_lookup_using_namespace): Likewise.
5120         (decl_namespace): Likewise.
5121         (lookup_arg_dependent): Likewise.
5122         * lex.c (do_identifier): Likewise.
5123         (do_scoped_id): Likewise.
5124         * pt.c (lookup_template_class): Likewise.
5125
5126 2003-02-14   Andrew Pinski <pinskia@physics.uc.edu>
5127
5128         * decl.c: (define_label): Fix warning for return 0 instead of NULL.
5129
5130 2003-02-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5131
5132         * decl.c: Include "timevar.h".
5133         (poplevel): Time name lookup.
5134         (find_binding): Likewise.
5135         (push_namespace): Likewise.
5136         (pop_nested_namespace): Likewise.
5137         (store_bindings): Likewise.
5138         (maybe_push_to_top_level): Likewise.
5139         (pop_from_top_level): Likewise.
5140         (push_local_name): Likewise.
5141         (pushtag): Likewise.
5142         (pushdecl): Likewise.
5143         (pushdecl_with_scope): Likewise.
5144         (pushdecl_namespace_level): Likewise.
5145         (pushdecl_top_level): Likewise.
5146         (pushdecl_class_level): Likewise.
5147         (push_class_level_binding): Likewise.
5148         (push_using_decl): Likewise.
5149         (push_using_directive): Likewise.
5150         (push_overloaded_decl): Likewise.
5151         (lookup_label): Likewise.
5152         (define_label): Likewise.
5153         (lookup_tag): Likewise.
5154         (lookup_tag_reverse): Likewise.
5155         (lookup_namespace_name): Likewise.
5156         (select_decl): Likewise.
5157         (unqualified_namespace_lookup): Likewise.
5158         (lookup_name_real): Likewise.
5159         (lookup_name_current_level): Likewise.
5160         (lookup_type_current_level): Likewise.
5161         (maybe_inject_for_scope_var): Likewise.
5162         (xref_tag): Likewise.
5163
5164         * Make-lang.in (cp/decl.o): Add dependency on timevar.h
5165
5166 2003-02-12  Phil Edwards  <pme@gcc.gnu.org>
5167
5168         * decl.c (build_enumerator):  Remove unneeded test.
5169
5170 2003-02-09  Dan Nicolaescu  <dann@ics.uci.edu>
5171
5172         * cp-tree.h (struct lang_type_header): Make all fields unsigned
5173         char.
5174
5175 2003-02-03  Mark Mitchell  <mark@codesourcery.com>
5176
5177         PR c++/7129
5178         * call.c (z_candidate): Add args.
5179         (convert_class_to_reference): Set it.
5180         (implicit_conversion): Tidy.
5181         (add_candidate): Add args parameter.
5182         (add_function_candidate): Adjust call to add_candidate.
5183         (add_conv_candidate): Likewise.
5184         (build_builtin_candidate): Likewise.
5185         (build_user_type_conversion_1): Eliminate wasteful tree_cons
5186         usage.
5187         (build_new_function_call): Likewise.
5188         (build_object_call): Likewise.
5189         (add_candidates): New function.
5190         (build_new_op): Use it.
5191         (covert_like_real): Adjust call to build_over_call.
5192         (build_over_call): Remove args parameter.
5193         * operators.def: Add <?= and >?=.
5194
5195 2003-02-01  Richard Sandiford  <rsandifo@redhat.com>
5196
5197         * typeck.c (build_indirect_ref): Don't check flag_volatile.
5198
5199 2003-01-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5200
5201         PR c++/8849
5202         * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
5203
5204 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
5205
5206         * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
5207         BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
5208         (BINFO_LANG_ELTS): New #define.
5209         * tree.c (make_binfo): Use BINFO_LANG_ELTS.
5210
5211 2003-01-30  Geoffrey Keating  <geoffk@apple.com>
5212
5213         * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
5214
5215 2003-01-30  Mark Mitchell  <mark@codesourcery.com>
5216
5217         * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
5218         for class types.
5219         * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
5220         rather than TYPE_LANG_FLAG_0.
5221         (TYPE_BUILT_IN): Remove.
5222         (TYPE_DEPENDENT_P): New macro.
5223         (TYPE_DEPENDENT_P_VALID): Likewise.
5224         (lang_type_class): Add fields_readonly.
5225         * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
5226         * pt.c (dependent_type_p_r): New function, split out from ...
5227         (dependent_type_p): ... here.  Memoize results.
5228         * search.c (dependent_base_p): Use dependent_type_p, not
5229         uses_template_parms.
5230         * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
5231         for class types.
5232
5233 2003-01-29  Mark Mitchell  <mark@codesourcery.com>
5234
5235         * call.c (build_field_call): Use build_new_op, not build_opfncall.
5236         (prep_operand): New function.
5237         (build_new_op): Use it.  Remove dead code.
5238         * class.c (pushclass): Change "modify" parameter type from int to
5239         bool.
5240         (currently_open_class): Use same_type_p, not pointer equality.
5241         (push_nested_class): Adjust calls to pushclass, remove modify
5242         parameter.
5243         * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
5244         (pushclass): Change prototype.
5245         (push_nested_class): Likewise.
5246         (grokoptypename): Remove.
5247         (build_opfncall): Remove.
5248         (value_dependent_expression_p): Declare.
5249         (resolve_typename_type): Likewise.
5250         (resolve_typename_type_in_current_instantiation): Likewise.
5251         (enter_scope_of): Remove.
5252         (tsubst): Remove.
5253         (tsubst_expr): Likewise.
5254         (tsubst_copy): Likewise.
5255         (tsubst_copy_and_build): Likewise.
5256         * decl.c (warn_about_implicit_typename_lookup): Remove.
5257         (finish_case_label): Return error_mark_node for erroneous labels.
5258         (start_decl): Adjust calls to push_nested_class.
5259         (grokfndecl): Call push_scope/pop_scope around call to
5260         duplicate_decls.
5261         (grokdeclarator): Do not call tsubst.
5262         (start_function): Adjust calls to push_nested_class.
5263         * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
5264         (check_classfn): Use push_scope/pop_scope around type comparisions.
5265         (grokoptypename): Remove.
5266         (push_sscope): Adjust call to push_nested_class.
5267         * error.c (dump_type): Show cv-qualification of typename types.
5268         * init.c (build_member_call): Use build_new_op, not
5269         build_opfncall.
5270         * method.c (build_opfncall): Remove.
5271         * parser.c (cp_parser): Add allow_non_constant_expression_p and
5272         non_constant_expression_p.
5273         (cp_parser_constant_expression): Adjust prototype.
5274         (cp_parser_resolve_typename_type): Remove.
5275         (cp_parser_non_constant_expression): New function.
5276         (cp_parser_non_constant_id_expression): Likewise.
5277         (cp_parser_new): Set allow_non_constant_expression_p and
5278         non_constant_expression_p.
5279         (cp_parser_primary_expression): Reject `this' and `va_arg' in
5280         constant-expressions.  Note that dependent names aren't really
5281         constant.
5282         (cp_parser_postfix_expression): Reject conversions to non-integral
5283         types in constant-expressions.  Neither are increments or
5284         decrements.
5285         (cp_parser_unary_expression): Reject increments and decrements in
5286         constant-expressions.
5287         (cp_parser_direct_new_declarator): Adjust call to
5288         cp_parser_constant_expression.
5289         (cp_parser_cast_expression): Reject conversions to non-integral
5290         types in constant-expressions.
5291         (cp_parser_assignment_expression): Rejects assignments in
5292         constant-expressions.
5293         (cp_parser_expression): Reject commas in constant-expressions.
5294         (cp_parser_labeled_statement): Adjust call to
5295         cp_parser_constant_expression.
5296         (cp_parser_direct_declarator): Simplify array bounds, even in
5297         templates, when they are non-dependent.  Use
5298         resolve_typename_type, not cp_parser_resolve_typename_type.
5299         (cp_parser_class_head): Use resolve_typename_type, not
5300         cp_parser_resolve_typename_type.
5301         (cp_parser_member_declaration): Adjust call to
5302         cp_parser_constant_expression.
5303         (cp_parser_constant_initializer): Likewise.
5304         (cp_parser_constructor_declarator): Use resolve_typename_type, not
5305         cp_parser_resolve_typename_type.
5306         (cp_parser_late_parsing_default_args): Adjust call to
5307         push_nested_class.
5308         * pt.c (tsubst): Give it internal linkage.
5309         (tsubst_expr): Likewise.
5310         (tsubst_copy): Likewise.
5311         (tsubst_copy_and_build): Likewise.
5312         (push_access_scope_real): Likewise.
5313         (tsubst_friend_class): Likewise.
5314         (instantiate_class_template): Adjust call to pushclass.
5315         (value_dependent_expression_p): Give it external linkage.
5316         Robustify.
5317         (resolve_typename_type): New function.
5318         * semantics.c (finish_call_expr): Use build_new_op, not
5319         build_opfncall.
5320         (begin_constructor_declarator): Remove.
5321         (begin_class_definition): Adjust call to pushclass.
5322         (enter_scope_of): Remove.
5323         * typeck.c (comptypes): Resolve typename types as appropriate.
5324         (build_x_indirect_ref): Use build_new_op, not build_opfncall.
5325         (build_x_compound_expr): Likewise.
5326         (build_modify_expr): Likewise.
5327         (build_x_modify_expr): Likewise.
5328         * typeck2.c (build_x_arrow): Likewise.
5329
5330 2003-01-29  Fariborz Jahanian  <fjahanian@apple.com>
5331
5332         * pt.c (last_pending_template) Declare GTY().
5333
5334 2003-01-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5335
5336         PR c++/8591
5337         * parser.c (cp_parser_elaborated_type_specifier): Convert
5338         TEMPLATE_DECL to TYPE_DECL only when processing template friends.
5339         (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
5340
5341 2003-01-28  Nathan Sidwell  <nathan@codesourcery.com>
5342
5343         PR c++/9437
5344         * pt.c (unify): Don't unify '*T' with 'U C::*'.
5345
5346         PR c++/3902
5347         * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
5348         inside a declarator.
5349
5350 2003-01-27  Nathan Sidwell  <nathan@codesourcery.com>
5351
5352         * class.c (update_vtable_entry_for_fn): Add index parameter.
5353         Generate vcall thunk for covariant overriding from a virtual
5354         primary base.
5355         (dfs_modify_vtables): Adjust.
5356
5357 2003-01-25  Nathan Sidwell  <nathan@codesourcery.com>
5358
5359         PR c++/9403
5360         * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
5361         template keyword.
5362         (cp_parser_base_specifier): Look for and consume a
5363         TEMPLATE keyword. Replace switch with array index.
5364
5365         PR c++/795
5366         * semantics.c (finish_non_static_data_member): Remember the
5367         field's type even in a template.
5368
5369         PR c++/9415
5370         * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
5371         already scoped.
5372
5373         PR c++/8545
5374         * parser.c (cp_parser_cast_expression): Be more tentative.
5375
5376 2003-01-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5377
5378         * cp-tree.h (flagged_type_tree_s): Remove.
5379         (check_for_new_type): Likewise.
5380         * typeck2.c (check_for_new_type): Likewise.
5381
5382 2003-01-23  Nathanael Nerode  <neroden@gcc.gnu.org>
5383
5384         * dump.c: ANSIfy function declarations and definitions.
5385
5386         * cp-tree.h, decl.h: Get rid of PARAMS.  Again.
5387
5388 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
5389
5390         PR c++/9354
5391         * init.c (build_new): Set the type of the new-expression, even
5392         when processing_templte_decl.
5393
5394         PR c++/9216
5395         * parser.c (cp_parser_primary_expression): Improve error message
5396         for templates used in an expression context.
5397
5398         PR c++/8696
5399         * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
5400         parse when encountering "typedef".
5401
5402 2003-01-22  Nathanael Nerode  <neroden@gcc.gnu.org>
5403
5404         * class.c, parser.c: ANSIfy function definitions and declarations.
5405
5406 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
5407
5408         PR c++/9328
5409         * error.c (dump_decl): For an OVERLOAD, just print the name of the
5410         function; it doesn't make sense to try to print its type.
5411         * semantics.c (finish_typeof): Issue errors about invalid uses.
5412
5413         PR c++/9298
5414         * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
5415         function.
5416         (cp_parser_expression_statement): Use it.
5417         (cp_parser_explicit_instantiation): Likewise.
5418         * pt.c (do_decl_instantiation): Improve error handling logic.
5419
5420 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
5421
5422         PR c++/9384
5423         * parser.c (cp_parser_using_declaration): Issue error messages
5424         about name resolution failures here.
5425
5426         PR c++/9388
5427         * class.c (currently_open_derived_class): Use dependent_type_p.
5428         * cp-tree.h (dependent_type_p): New function.
5429         (dependent_template_arg_p): Likewise.
5430         (dependent_template_p): Likewise.
5431         (type_dependent_expression_p): Likewise.
5432         * parser.c (cp_parser_dependent_type_p): Remove.
5433         (cp_parser_value_dependent_type_p): Likewise.
5434         (cp_parser_type_dependent_expression_p): Likewise.
5435         (cp_parser_dependent_template_arg_p): Likewise.
5436         (cp_parser_dependent_template_id_p): Likewise.
5437         (cp_parser_dependent_template_p): Likewise.
5438         (cp_parser_diagnose_invalid_type_name): Replace
5439         cp_parser_dependent_type_p with dependent_type_p, etc.
5440         (cp_parser_primary_expresion): Likewise.
5441         (cp_parser_nested_name_specifier_opt): Likewise.
5442         (cp_parser_postfix_expression): Likewise.
5443         (cp_parser_unary_expression): Likewise.
5444         (cp_parser_template_name): Likewise.
5445         (cp_parser_class_name): Likewise.
5446         (cp_parser_lookup_name): Likewise.
5447         * pt.c (dependent_type_p): New function.
5448         (value_dependent_expression_p): Likewise.
5449         (type_dependent_expression_p): Likewise.
5450         (dependent_template_arg_p): Likewise.
5451         (dependent_template_id_p): Likewise.
5452         (dependent_template_p): Likewise.
5453
5454         PR c++/9285
5455         PR c++/9294
5456         * parser.c (cp_parser_simple_declaration): Return quickly when
5457         encountering errors.
5458
5459 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5460
5461         Make-lang.in (cp/decl.o-warn): Add -Wno-error.
5462
5463 2003-01-17  Jason Merrill  <jason@redhat.com>
5464
5465         PR c++/9167, c++/9358
5466         * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
5467
5468 2003-01-17  Jason Merrill  <jason@redhat.com>
5469
5470         PR c++/9342
5471         * call.c (build_conditional_expr): Always do lvalue-rvalue
5472         conversion.
5473
5474 2003-01-17  Mark Mitchell  <mark@codesourcery.com>
5475
5476         PR c++/9294
5477         * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
5478         * cp-tree.h (BASELINK_BINFO): Adjust.
5479         (BASELINK_FUNCTIONS): Likewise.
5480         (BASELINK_ACCESS_BINFO): Likewise.
5481         (tree_baselink): New structure.
5482         (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
5483         (lang_tree_node): Add baselink.
5484         * decl.c (cp_tree_node_structure): Add BASELINK case.
5485         * search.c (build_baselink): Adjust.
5486         * tree.c (cp_walk_subtrees): Add BASELINK case.  Remove BASELINK_P
5487         test from TREE_LIST case.
5488
5489         PR c++/9272
5490         * parser.c (cp_parser_constructor_declarator_p): Do not assume
5491         that a constructor cannot be declared outside of its own class.
5492
5493         * parser.c (cp_parser_resolve_typename_type): If the scope cannot
5494         be resolved, neither can the qualified name.
5495
5496         * rtti.c (get_pseudo_ti_desc): Fix thinko.
5497
5498 2003-01-16  Jason Merrill  <jason@redhat.com>
5499
5500         PR c++/8564
5501         * init.c (build_vec_init): Re-add maxindex parm.
5502         (perform_member_init, build_aggr_init): Pass it.
5503         (build_new_1): Pass it. Use an incomplete array type for full_type.
5504         * typeck.c (build_modify_expr): Pass it.
5505         * cp-tree.h: Adjust.
5506
5507 2003-01-16  Jeffrey D. Oldham  <oldham@codesourcery.com>
5508
5509         * cp-tree.h (tsubst_copy_and_build): New declaration.
5510         * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
5511         (tsubst_expr): Use 'tsubst_copy_and_build'.  Update initial comment.
5512         (tsubst_copy_and_build): New function.
5513
5514 2003-01-16  Mark Mitchell  <mark@codesourcery.com>
5515
5516         * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
5517         (PARTIAL_INSTANTIATION_P): Remove.
5518         (IMPLICIT_TYPENAME_P): Likewise.
5519         (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
5520         (build_typename_type): Remove declaration.
5521         (parmlist_is_exprlist): Likewise.
5522         * decl.c (build_typename_type): Make it static, remove third
5523         parameter.
5524         (push_class_binding): Don't do implicit typename stuff.
5525         (make_typename_type): Likewise.
5526         (lookup_name_real): Likewise.
5527         (grokdeclarator): Don't try to convert declarations into
5528         initializations.  Don't do implicit typename stuff.
5529         (parmlist_is_exprlist): Remove.
5530         (xref_basetypes): Simplify.
5531         * decl2.c (grokfield): Don't try to convert declarations into
5532         initializations.
5533         (build_anon_union_vars): Do this while processing templates, too.
5534         (finish_anon_union): Likewise.
5535         * error.c (dump_type): Remove implicit typename handling.
5536         * parser.c (cp_parser_diagnose_invalid_type_name): New method.
5537         (cp_parser_primary_expression): Correct handling of names not
5538         found by unqualified name lookup in templates.
5539         (cp_parser_nested_name_specifier_opt): Avoid checking dependency
5540         of types when possible.
5541         (cp_parser_simple_declaration): Complain intelligently about some
5542         invalid declarations.
5543         (cp_parser_member_declaration): Likewise.
5544         (cp_parser_constructor_declarator_p): Don't check when we're in a
5545         function scope.
5546         * pt.c (instantiate_class_template): Remove
5547         PARTIAL_INSTANTIATION_P gunk.
5548         * search.c (lookup_field_r): Don't build implicit typenames.
5549         (marked_pushdecls_p): Don't enter dependent base types.
5550         (unmarked_pushdecls_p): Likewise.
5551         * semantics.c (begin_class_definition): Remove implicit typename
5552         stuff.
5553
5554 2003-01-16  Nathan Sidwell  <nathan@codesourcery.com>
5555
5556         PR c++/9212
5557         * parser.c (cp_parser_direct_declarator): If accepting either
5558         abstract or named, the name must be an unqualified-id.
5559
5560 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5561
5562         * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
5563
5564 2003-01-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5565
5566         * decl2.c (check_classfn): Fix uninitialized warning.
5567         (build_anon_union_vars): Likewise.
5568         * pt.c (tsubst_copy): Likewise.
5569
5570 2003-01-14  Jeffrey D. Oldham  <oldham@codesourcery.com>
5571
5572         Further conform g++'s __vmi_class_type_info to the C++ ABI
5573         specification.
5574         * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
5575         the specification.
5576         (class_hint_flags): Likewise.
5577
5578 2003-01-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5579
5580         * config-lang.in: Add semantics.c to gtfiles.
5581         * cp-tree.h (flagged_type_tree_s): Remove lookups field.
5582         (saved_scope): Likewise.
5583         (type_lookups): Remove.
5584         (deferred_access): New structure.
5585         (type_access_control): Remove.
5586         (save_type_access_control): Likewise.
5587         (reset_type_access_control): Likewise.
5588         (decl_type_access_control): Likewise.
5589         (push_deferring_access_checks): Declare.
5590         (resume_deferring_access_checks): Likewise.
5591         (stop_deferring_access_checks): Likewise.
5592         (pop_deferring_access_checks): Likewise.
5593         (get_deferred_access_checks): Likewise.
5594         (pop_to_parent_deferring_access_checks): Likewise.
5595         (perform_deferred_access_checks): Likewise.
5596         (perform_or_defer_access_check): Likewise.
5597         * decl.c (make_typename_type): Use perform_or_defer_access_check.
5598         (make_unbound_class_template): Likewise.
5599         (grokdeclarator): Don't call decl_type_access_control.
5600         * parser.c (cp_parser_context): Remove deferred_access_checks
5601         and deferring_access_checks_p fields.
5602         (cp_parser_context_new): Adjust.
5603         (cp_parser): Remove access_checks_lists.
5604         (cp_parser_defer_access_check): Remove.
5605         (cp_parser_start_deferring_access_checks): Remove.
5606         (cp_parser_stop_deferring_access_checks): Remove.
5607         (cp_parser_perform_deferred_access_checks): Remove.
5608         (cp_parser_nested_name_specifier_opt): Use new deferred access
5609         functions.
5610         (cp_parser_simple_declaration): Likewise.
5611         (cp_parser_template_id): Likewise.
5612         (cp_parser_function_definition): Likewise.
5613         (cp_parser_class_specifier): Likewise.
5614         (cp_parser_lookup_name): Likewise.
5615         (cp_parser_single_declaration): Likewise.
5616         (cp_parser_pre_parsed_nested_name_specifier): Likewise.
5617         (cp_parser_parse_tentatively): Likewise.
5618         (cp_parser_parse_definitely): Likewise.
5619         (yyparse): Likewise.
5620         (cp_parser_init_declarator): Remove access_checks parameter.
5621         Use new deferred access functions.
5622         (cp_parser_function_definition_from_specifiers_and_declarator):
5623         Likewise.
5624         (cp_parser_class_head): Remove deferring_access_checks_p and
5625         saved_access_checks parameters.  Use new deferred access functions.
5626         (cp_parser_member_specification_opt): Don't call
5627         reset_type_access_control.
5628         * search.c (type_access_control): Remove.
5629         * semantics.c: Include "gt-cp-semantics.h".
5630         (deferred_type_access_control): Remove.
5631         (deferred_access_stack): New variable.
5632         (deferred_access_free_list): Likewise.
5633         (push_deferring_access_checks): New function.
5634         (resume_deferring_access_checks): Likewise.
5635         (stop_deferring_access_checks): Likewise.
5636         (pop_deferring_access_checks): Likewise.
5637         (get_deferred_access_checks): Likewise.
5638         (pop_to_parent_deferring_access_checks): Likewise.
5639         (perform_deferred_access_checks): New function, adapted from
5640         cp_parser_perform_deferred_access_checks.
5641         (perform_or_defer_access_check): New function, adapted from
5642         cp_parser_defer_access_check.
5643         (current_type_lookups): Remove.
5644         (deferred_type_access_control): Likewise.
5645         (decl_type_access_control): Likewise.
5646         (save_type_access_control): Likewise.
5647         (reset_type_access_control): Likewise.
5648         (begin_function_definition): Adjust.
5649         (begin_class_definiton): Likewise.
5650
5651 2003-01-13  Jason Merrill  <jason@redhat.com>
5652
5653         PR c++/8748
5654         * class.c (build_base_path): Take the address before calling save_expr.
5655
5656         * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
5657         all the ambiguous conversions are bad.
5658
5659         * class.c (maybe_warn_about_overly_private_class): Don't stop
5660         searching when we find a nonprivate method.
5661
5662         * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
5663
5664 2003-01-12  Mark Mitchell  <mark@codesourcery.com>
5665
5666         * cp-tree.h (get_arglist_len_in_bytes): Remove.
5667
5668         PR c++/9264
5669         * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
5670         typeame types more robustly.
5671
5672 2003-01-11  Phil Edwards  <pme@gcc.gnu.org>
5673
5674         * parser.c:  Fix comment typos.
5675
5676 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
5677
5678         PR c++/9099
5679         * parser.c (cp_parser_scope_through_which_access_occurs): Handle
5680         an object_type which is not a class type.
5681
5682 2003-01-10  Geoffrey Keating  <geoffk@apple.com>
5683
5684         * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
5685         (cp_parser_late_parsing_default_args): Likewise.
5686
5687 2003-01-10  Nathanael Nerode  <neroden@gcc.gnu.org>
5688
5689         * cfns.gperf: ANSIfy function declarations.
5690         * cfns.h: Regenerate.
5691         * cp-tree.h: ANSIfy function declarations.
5692
5693 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
5694
5695         * cp-tree.h (reparse_absdcl_as_expr): Remove.
5696         (reparse_absdcl_as_casts): Likewise.
5697         (reparse_decl_as_expr): Likewise.
5698         (finish_decl_parsing): Likewise.
5699         * decl2.c (reparse_absdcl_as_expr): Remove.
5700         (reparse_absdcl_as_casts): Likewise.
5701         (repase_decl_as_expr): Likewise.
5702         (finish_decl_parsing): Likewise.
5703
5704         PR c++/9128
5705         PR c++/9153
5706         PR c++/9171
5707         * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
5708         function.
5709         (cp_parser_nested_name_specifier_opt): Correct the
5710         check_dependency_p false.
5711         (cp_parser_postfix_expression): Fix formatting.
5712         (cp_parser_decl_specifier_seq): Avoid looking for constructor
5713         declarators when possible.
5714         (cp_parser_template_id): Avoid performing name-lookup when
5715         possible.
5716         (cp_parser_class_head): Do not count specializations when counting
5717         levels of templates.
5718         (cp_parser_constructor_declarator_p): Return immediately if
5719         there's no chance that the tokens form a constructor declarator.
5720         * rtti.c (throw_bad_typeid): Add comment.  Do not return an
5721         expression with reference type.
5722         (get_tinfo_decl_dynamic): Do not return an expression with
5723         reference type.
5724         (build_typeid): Add comment.  Do not return an expression with
5725         reference type.
5726         * typeck.c (build_class_member_access_expr): Improve handling of
5727         conditionals and comma-expressions as objects.
5728
5729 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
5730
5731         * cfns.gperf: ANSIfy function declarations.
5732         * cfns.h: Regenerate.
5733         * cp-tree.h: ANSIfy function declarations.
5734         * parser.c: ANSIfy function declarations & definitions.
5735
5736         * decl.c (bad_specifiers): Fix parameter order error I introduced.
5737
5738 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
5739
5740         Merge from pch-branch:
5741
5742         2003-01-09  Geoffrey Keating  <geoffk@apple.com>
5743
5744         Merge to tag pch-merge-20030102:
5745
5746         * semantics.c (finish_translation_unit): Don't call finish_file.
5747         * parser.c: Don't include ggc.h.
5748         (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
5749         read first token here.  Don't allow PCH files after the first
5750         token is read.
5751         (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
5752         (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
5753         (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
5754         (cp_parser_late_parsing_for_member): Don't duplicate call to
5755         cp_lexer_set_source_position_from_token.
5756         (cp_parser_late_parsing_default_args): Likewise.
5757         (yyparse): Call finish_file after clearing the_parser.
5758
5759         2002-12-11  Geoffrey Keating  <geoffk@apple.com>
5760
5761         * Make-lang.in: Remove $(GGC_H) from all dependencies.
5762         (CXX_TREE_H): Add $(GGC_H).
5763         * class.c: Don't include ggc.h.
5764         (field_decl_cmp): Make parameters be 'const void *' to match qsort.
5765         (method_name_cmp): Likewise.
5766         (resort_data): New variable.
5767         (resort_field_decl_cmp): New.
5768         (resort_method_name_cmp): New.
5769         (resort_sorted_fields): New.
5770         (resort_type_method_vec): New.
5771         (finish_struct_methods): Delete cast.
5772         (finish_struct_1): Delete cast.
5773         * cp-tree.h: Include ggc.h.
5774         (struct lang_type_class): Add reorder attribute to field `methods'.
5775         (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
5776         (resort_sorted_fields): New prototype.
5777         (resort_type_method_vec): New prototype.
5778         * call.c: Don't include ggc.h.
5779         * decl.c: Likewise.
5780         * decl2.c: Likewise.
5781         * init.c: Likewise.
5782         * lex.c: Likewise.
5783         * method.c: Likewise.
5784         * optimize.c: Likewise.
5785         * parse.y: Likewise.
5786         * pt.c: Likewise.
5787         * repo.c: Likewise.
5788         * search.c: Likewise.
5789         * semantics.c: Likewise.
5790         * spew.c: Likewise.
5791         * tree.c: Likewise.
5792
5793         * lang-specs.h: Remove comment.
5794
5795         2002-12-03  Geoffrey Keating  <geoffk@apple.com>
5796
5797         * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
5798         (operator_name_info): Mark to be saved for PCH, specify size.
5799         (assignment_operator_name_info): Likewise.
5800
5801         2002-11-19  Geoffrey Keating  <geoffk@apple.com>
5802
5803         * decl.c (anon_cnt): Mark to be saved for PCH.
5804
5805         2002-10-25  Geoffrey Keating  <geoffk@apple.com>
5806
5807         * lex.c  (init_reswords): Delete now-untrue comment.
5808         Allocate ridpointers using GGC.
5809
5810         2002-10-04  Geoffrey Keating  <geoffk@apple.com>
5811
5812         * cp-tree.h (union lang_decl_u2): Add tags to all fields.
5813
5814         * g++spec.c (lang_specific_driver): Don't include standard
5815         libraries in `added'.
5816
5817         2002-08-27  Geoffrey Keating  <geoffk@redhat.com>
5818
5819         * decl2.c (finish_file): Call c_common_write_pch.
5820         * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
5821
5822         2002-08-17  Geoffrey Keating  <geoffk@redhat.com>
5823
5824         * g++spec.c (lang_specific_driver): Treat .h files as C++ header
5825         files when using g++.
5826         * lang-specs.h: Handle compiling C++ header files.
5827
5828 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
5829
5830         * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
5831
5832 2003-01-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5833
5834         * pt.c (push_access_scope_real): Call push_to_top_level for
5835         function in namespace scope.
5836         (pop_access_scope): Call pop_from_top_level for function in
5837         namespace scope.
5838
5839 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
5840
5841         * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
5842
5843 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
5844
5845         * Make-lang.in (c++.install-common, c++.install-man,
5846         c++.uninstall): Prepend $(DESTDIR) to destination paths in
5847         all (un)installation commands.
5848         (c++.install-common): Rewrite $(LN) commands to support
5849         DESTDIR with "ln" as well as with "ln -s".
5850
5851 2003-01-08  Jason Merrill  <jason@redhat.com>
5852
5853         * parser.c (cp_parser_primary_expression): See through explicitly
5854         scoped ALIAS_DECLs, too.
5855
5856 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
5857
5858         * decl.c: Remove some #if 0 code.
5859
5860         * decl.c: ANSIfy function declarations.
5861
5862 2003-01-07  Mark Mitchell  <mark@codesourcery.com>
5863
5864         * parser.c (cp_parser_asm_definition): Correct handling of omitted
5865         operands.
5866
5867 2003-01-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5868
5869         PR c++/9030
5870         * decl.c (make_typename_type): Check access only when tf_error.
5871         (make_unbound_class_template): Likewise.
5872         * pt.c (saved_access_scope): New variable.
5873         (push_access_scope_real): New function.
5874         (push_access_scope): Likewise.
5875         (pop_access_scope): Likewise.
5876         (tsubst_default_argument): Use them.
5877         (instantiate_template): Likewise.
5878         (regenerate_decl_from_template): Likewise.
5879         (instantiate_decl): Likewise.
5880         (get_mostly_instantiated_function_type): Likewise.
5881
5882 2003-01-07  Nathanael Nerode <neroden@gcc.gnu.org>
5883
5884         * tree.c: Delete bogus #if 0 code.
5885
5886 2003-01-07  Andreas Schwab  <schwab@suse.de>
5887
5888         * class.c (layout_class_type): Don't use
5889         PCC_BITFIELD_TYPE_MATTERS if not defined.
5890
5891 2003-01-06  Mark Mitchell  <mark@codesourcery.com>
5892
5893         PR c++/9165
5894         * decl2.c (build_cleanup): Mark the object as used.
5895
5896         * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
5897         (hash_local_specialization): New function.
5898         (register_local_specialization): Revert 2003-01-05 change.
5899         (instantiate_decl): Use hash_local_specialization when creating
5900         the local_specializations table.
5901
5902         * decl2.c (mark_used): Do not synthesize thunks.
5903
5904         * class.c (layout_class_type): Correct handling of unnamed
5905         bitfields wider than their types.
5906
5907         PR c++/9189
5908         * parser.c (cp_parser): Remove default_arg_types.  Update
5909         documentation for unparsed_functions_queues.
5910         (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
5911         parameter.
5912         (cp_parser_new): Don't set parser->default_arg_types.
5913         (cp_parser_function_definition): Adjust usage of
5914         unparsed_funtions_queues.
5915         (cp_parser_class_specifier): Don't mess with
5916         parser->default_arg_types.  Handle default argument processing in
5917         a separate phase from function body processing.
5918         (cp_parser_template_declaration_after_export): Adjust usage of
5919         unparsed_functions_queues.
5920         (cp_parser_late_parsing_for_member): Do not handle default
5921         arguments.
5922
5923 2003-01-06  Nathan Sidwell  <nathan@codesourcery.com>
5924
5925         PR c++/9109
5926         * parser.c (cp_parser_declarator_kind): New enum.
5927         (cp_parser_declarator): Adjust.
5928         (cp_parser_direct_declarator): Adjust. Allow for either named or
5929         abstract declarator. Prefer abstract, if possible. Allow
5930         parenthesized function name.
5931         (cp_parser_condition): Adjust cp_parser_declarator call.
5932         (cp_parser_explicit_instantiation): Likewise.
5933         (cp_parser_init_declarator): Likewise.
5934         (cp_parser_type_id): Likewise.
5935         (cp_parser_function_definition): Likewise.
5936         (cp_parser_member_declaration): Likewise.
5937         (cp_parser_parameter_declaration): Use cp_parser_declarator to do
5938         the tentative parsing.
5939         (cp_parser_exception_declaration): Likewise.
5940
5941 2003-01-05  Mark Mitchell  <mark@codesourcery.com>
5942
5943         * parser.c (cp_parser_template_parameter): Adjust call to
5944         cp_parser_parameter_declaration.
5945         (cp_parser_parameter_declaration_list): Likewise.
5946         (cp_parser_parameter_declaration): Replace
5947         greater_than_is_operator_p with template_parm_p parameter.  Do not
5948         cache tokens for template default arguments.
5949
5950         * pt.c (retrieve_local_specialization): Use htab_find, not
5951         htab_find_with_hash.
5952         (register_local_specialization): Use htab_find_slot, not
5953         htab_find_slot_with_hash.
5954         (instantiate_decl): Pass a hash function to htab_create.
5955
5956 2003-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5957
5958         * parser.c (cp_parser_binary_expression,
5959         cp_parser_multiplicative_expression,
5960         cp_parser_additive_expression, cp_parser_shift_expression,
5961         cp_parser_relational_expression, cp_parser_equality_expression,
5962         cp_parser_and_expression, cp_parser_exclusive_or_expression,
5963         cp_parser_inclusive_or_expression,
5964         cp_parser_logical_and_expression, cp_parser_logical_or_expression,
5965         cp_parser_binary_expression): Const-ify.
5966
5967 2003-01-04  Mark Mitchell  <mark@codesourcery.com>
5968
5969         * method.c (use_thunk): Disable access control while building the
5970         body of the thunk.
5971
5972 2003-01-03  Nathanael Nerode  <neroden@gcc.gnu.org>
5973
5974         * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
5975         front end.
5976
5977 2003-01-03  Matt Austern  <austern@apple.com>
5978
5979         * cp-tree.h (struct lang_type_class): add field for key method
5980         (cp_global_trees): rename dynamic_classes to keyed_classes
5981         (key_method): add definition
5982         * class.c (finish_struct_1): compute class's key method, and add
5983         the class to keyed_classes list if there is no key method.
5984         * decl.c (finish_function): add class to keyed_classes list if we
5985         see a definition of the class's key method.
5986         * pt.c (instantiate_class_template): add template specialization
5987         of a dynamic class to keyed_classes list.
5988         * decl2.c (key_method): remove
5989         (finish_file): iterate only through keyed_classes list when
5990         deciding whether to emit vtables, remove class from its list after
5991         we do the emission.
5992
5993 2003-01-02  Jason Merrill  <jason@redhat.com>
5994
5995         * call.c (build_conditional_expr): Stabilize lvalues properly.
5996         * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
5997         * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
5998         Don't allow CALL_EXPR or VA_ARG_EXPR, either.
5999
6000         * call.c (convert_like_real): Call decl_constant_value for an
6001         IDENTITY_CONV even if there are no more conversions.
6002
6003         * cvt.c (build_up_reference): Don't push unnamed temps.
6004
6005         * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
6006
6007         * dump.c (cp_dump_tree): Don't try to dump class-specific fields
6008         for a backend struct.
6009
6010         * except.c (wrap_cleanups_r, build_throw): Make
6011         MUST_NOT_THROW_EXPRs void.
6012         * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
6013
6014         * init.c (build_vec_delete_1): Pre-evaluate the base address.
6015
6016         * init.c (get_temp_regvar): Simplify logic.
6017
6018         * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
6019         our replacement is a decl.
6020
6021         * decl.c (cp_make_fname_decl): Push the decls inside the
6022         outermost scope.
6023
6024 2003-01-03  Nathan Sidwell  <nathan@codesourcery.com>
6025
6026         PR c++/45, c++/3784
6027         * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
6028         the same too.
6029
6030 2003-01-03  Graham Stott  <graham.stott@btinternet.com>
6031
6032         * parser.c (struct cp_parser): Add access_checks_lists field
6033         (cp_parser_simple_declaration): Use.
6034         (cp_parser_init_declarator): Likewise.
6035
6036 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
6037
6038         * parser.c (cp_parser_declaration): Accept the __extension__
6039         keyword before the declaration.
6040
6041         PR c++/2843
6042         * parser.c (cp_parser_parameter_declaration): Allow attributes to
6043         appear after the declarator.
6044
6045         * call.c (build_new_method_call): Fix typo in message format
6046         string.
6047
6048 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
6049
6050         * parser.c (cp_lexer_next_token_is): Declare it inline.
6051         (cp_lexer_set_source_position_from_token): Likewise.
6052         (cp_lexer_debugging_p): Likewise.
6053         (cp_parser_parsing_tentatively): Likewise.
6054         (cp_parser_nested_name_specifier_opt): Reduce the number of calls
6055         to the cp_lexer_peek_token.
6056
6057         * parser.c (cp_parser_sizeof_operand): Do not evaluate the
6058         expression.
6059
6060 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
6061
6062         * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
6063         cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
6064         cp/repo.c: Fix copyright years.
6065
6066 2003-01-01  Neil Booth  <neil@daikokuya.co.uk>
6067
6068         * lex.c: Remove superfluous include of cpplib.h.
6069         (CONSTRAINT): Define without conditions.
6070         (init_cp_pragma): Use c_register_pragma.
6071
6072 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
6073
6074         * .cvsignore: Remove.
6075
6076 2002-12-31  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6077
6078         * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
6079           except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
6080           lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
6081           pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
6082           typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
6083           copyright header.
6084         * lex.h: parse.y is dead, so don't mention it.  Also replace the
6085           copyright header with the default GNU copyright header.
6086
6087 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
6088
6089         * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
6090         (lookup_name_namespace_only): Likewise.
6091         (begin_only_namespace_names): Likewise.
6092         (end_only_namespace_names): Likewise.
6093         * decl.c (only_namespace_names): Remove.
6094         (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
6095         (lookup_name_real): Do not check only_namespace_names.
6096         (lookup_name_namespace_only): Remove.
6097         (begin_only_namespace_names): Likewise.
6098         (end_only_namespace_names): Likewise.
6099         * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
6100         nested-name-specifiers more gracefully.
6101         (cp_parser_class_or_namespace_name): Avoid looking up namespace
6102         names when they cannot possibly appear.
6103         (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
6104         (cp_parser_elaborated_type_specifier): Likewise.
6105         (cp_parser_namespace_name): Only look for namespace names.
6106         (cp_parser_lookup_name): Add is_namespace parameter.
6107         (cp_parser_lookup_name_simple): Adjust call to
6108         cp_parser_lookup_name.
6109
6110         * parser.c (cp_parser_dependent_type_p): Fix thinko.
6111
6112 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
6113
6114         * .cvsignore: Update.
6115
6116 2002-12-31  Nathan Sidwell  <nathan@codesourcery.com>
6117
6118         * class.c (modify_vtable_entry): Remove unused variable.
6119         (get_vcall_index): Always expect a non-thunk.
6120         (update_vtable_entry_for_fn): Combine covariant adjustments, when
6121         overriding a thunk. Pass get_vcall_index a non-thunk.
6122
6123         * decl2.c (finish_file): Mark undefined inlines as extern.
6124
6125 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
6126
6127         * cp-tree.def (RETURN_INIT): Remove.
6128         * cp-tree.h (DECL_IN_MEMORY_P): Remove.
6129         (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
6130         (note_level_for_for): Remove.
6131         (note_level_for_try): Likewise.
6132         (note_level_for_catch): Likewise.
6133         (finish_named_return_value): Likewise.
6134         (do_pushlevel): Change prototype.
6135         (pending_lang_change): Remove.
6136         * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
6137         sk_for.
6138         (note_level_for_for): Remove.
6139         (note_level_for_try): Likewise.
6140         (note_level_for_catch): Likewise.
6141         (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
6142         * parser.c (cp_parser_context_free_list): Make it "deletable".
6143         (cp_parser_template_argument): Remove misleading comment.
6144         * pt.c (tsubst_expr): Remove RETURN_INIT code.
6145         * semantics.c (genrtl_named_return_value): Remove.
6146         (do_pushlevel): Take a scope kind as an argument.
6147         (begin_if_stmt): Adjust.
6148         (begin_while_stmt): Likewise.
6149         (begin_for_stmt): Likewise.
6150         (finish_for_init_stmt): Likewise.
6151         (begin_switch_stmt): Likewise.
6152         (begin_handler): Likewise.
6153         (begin_compound_stmt): Likewise.
6154         (finish_named_return_value): Remove.
6155         (cp_expand_stmt): Remove RETURN_INIT case.
6156         * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
6157
6158 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
6159
6160         PR c++/9112
6161         * parser.c (cp_parser_direct_declarator): Handle erroneous
6162         parenthesized declarators correctly.
6163
6164 2002-12-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6165
6166         * cp-tree.h (pending_lang_change): Declare.
6167
6168 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
6169
6170         * parser.c (cp_parser_context_free_list): New variable.
6171         (cp_parser_context_new): Use it.
6172         (cp_parser_error): Check return code from
6173         cp_parser_simulate_error.
6174         (cp_parser_simulate_error): Return a value.
6175         (cp_parser_id_expression): Optimize common case.
6176         (cp_parser_class_name): Likewise.
6177         (cp_parser_class_specifier): Adjust call to
6178         cp_parser_late_parsing_default_args.
6179         (cp_parser_lookup_name): Optimize common case.
6180         (cp_parser_late_parsing_for_member): Adjust call to
6181         cp_parser_late_parsing_default_args.
6182         (cp_parser_late_parsing_default_args): Add scope parameter.
6183         (cp_parser_require): Avoid creating the error message unless it's
6184         needed.
6185         (cp_parser_parse_definitely): Place free'd contexts on the free
6186         list.
6187
6188         * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
6189
6190 2002-12-30  David Edelsohn  <edelsohn@gnu.org>
6191
6192         * parser.c (cp_parser_parameter_declaration_clause): Treat system
6193         header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
6194
6195 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
6196
6197         * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
6198         GCC, not GNU CC.
6199
6200 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
6201
6202         * parse.y: Remove.
6203         * spew.c: Likewise.
6204         * Make-lang.in (gt-cp-spew.h): Remove.
6205         * cp-tree.h (do_pending_lang_change): Remove.
6206         (do_identifier): Change prototype.
6207         (finish_id_expr): Remove.
6208         * decl.c (lookup_name_real): Remove yylex variable.
6209         * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
6210         * lex.c (init_cpp_parse): Remove.
6211         (reduce_cmp): Likewise.
6212         (token_cmp): Likewise.
6213         (yychar): Likewise.
6214         (lastiddecl): Likewise.
6215         (token_count): Likewise.
6216         (reduce_count): Likewise.
6217         (yyhook): Likewise.
6218         (print_parse_statistics): Likewise.
6219         (do_pending_lang_change): Likewise.
6220         (do_identifier): Remove parsing parameter.
6221         * lex.h (lastiddecl): Remove.
6222         (looking_for_typename): Remove.
6223         (looking_for_template): Likewise.
6224         (pending_lang_change): Likewise.
6225         (yylex): Likewise.
6226         * semantics.c (finish_id_expr): Remove.
6227
6228         * decl.c (grokdeclarator): Diagnost "extern thread" and "static
6229         thread" correctly.
6230
6231 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
6232
6233         * decl.c, decl2.c, decl.h:  GCC, not GNU CC.  This is the C++ front
6234         end, not the C front end.
6235
6236 2002-12-30  Nathan Sidwell  <nathan@codesourcery.com>
6237
6238         * cp-tree.h (THUNK_TARGET): New macro.
6239         (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
6240         (finish_thunk): Remove offset parms.
6241         * class.c (find_final_overrider): Look through thunks.
6242         (get_vcall_index): Use THUNK_TARGET.
6243         (update_vtable_entry_for_fn): Look through thunks. Set covariant
6244         fixed offset here. Adjust finish_thunk call.
6245         (build_vtbl_initializer): Adjust finish_thunk calls.
6246         * mangle.c (mangle_call_offset): Remove superfluous if.
6247         (mangle_thunk): Adjust.
6248         * method.c (make_thunk): Adjust.
6249         (finish_thunk): Adjust.
6250         (thunk_adjust): Remove assert.
6251         (use_thunk): Use THUNK_TARGET
6252         * dump1.c (cp_dump_tree): Adjust thunk dumping.
6253
6254         PR c++/9054
6255         * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
6256         * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
6257
6258 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6259
6260         Remove traditional C constructs 4/n.
6261         * decl2.c (grok_method_quals, warn_if_unknown_interface,
6262         grok_x_components, cp_build_parm_decl, build_artificial_parm,
6263         maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
6264         delete_sanity, check_member_template, check_java_method,
6265         check_classfn, finish_static_data_member_decl, grokfield,
6266         grokbitfield, grokoptypename, grok_function_init,
6267         cplus_decl_attributes, constructor_name, defer_fn,
6268         build_anon_union_vars, finish_anon_union, coerce_new_type,
6269         coerce_delete_type, comdat_linkage, maybe_make_one_only,
6270         key_method, import_export_vtable, import_export_class,
6271         output_vtable_inherit, import_export_decl, import_export_tinfo,
6272         build_cleanup, get_guard, get_guard_bits, get_guard_cond,
6273         set_guard, start_objects, finish_objects,
6274         start_static_storage_duration_function,
6275         finish_static_storage_duration_function, get_priority_info,
6276         start_static_initialization_or_destruction,
6277         finish_static_initialization_or_destruction,
6278         do_static_initialization, do_static_destruction,
6279         prune_vars_needing_no_initialization, write_out_vars,
6280         reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
6281         add_using_namespace, merge_functions, ambiguous_decl,
6282         lookup_using_namespace, lookup_using_namespace,
6283         qualified_lookup_using_namespace, set_decl_namespace,
6284         decl_namespace, current_decl_namespace, push_decl_namespace,
6285         pop_decl_namespace, push_scope, pop_scope, add_function,
6286         arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
6287         lookup_arg_dependent, do_namespace_alias,
6288         validate_nonmember_using_decl, do_nonmember_using_decl,
6289         do_toplevel_using_decl, do_local_using_decl,
6290         do_class_using_decl, do_using_directive, check_default_args,
6291         mark_used, handle_class_head): Use C90 prototypings.  Use booleans.
6292         * parser.c (cp_parser_class_head): Use booleanss.
6293         * decl.c (walk_globals, walk_vtables): Likewise.
6294         * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
6295         walk_globals): Change return type from 'int' to 'bool'.
6296         * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
6297         throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
6298         build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
6299         get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
6300         qualifier_flags, tinfo_base_init, generic_initializer,
6301         ptr_initializer, dfs_class_hint_mark, ptm_initializer,
6302         dfs_class_hint_unmark, class_hint_flags, class_initializer,
6303         typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
6304         get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
6305         unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
6306         * repo.c (repo_compile_flags, repo_template_declared,
6307         repo_template_defined, repo_class_defined, repo_get_id,
6308         repo_template_used, repo_vtable_used, repo_inline_used,
6309         repo_tinfo_used, repo_template_instantiated, extract_string,
6310         open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
6311         finish_repo): Likewise.
6312         * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
6313         cxx_print_xnode): Likewise..
6314         * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
6315         cxx_warn_unused_global_decl, cp_expr_size): Likewise.
6316         * cxxfilt.c (demangle_it, print_demangler_list, usage,
6317         standard_symbol_characters, hp_symbol_characters, main, fatal):
6318         Likewise.
6319         (strip_underscore):  Change type from 'int' to 'bool'.
6320         (main): Use boolean constants.
6321
6322 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6323
6324         Remove traditional C constructs 3/n.
6325         * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
6326         build_up_reference, warn_ref_binding, convert_to_reference,
6327         convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
6328         convert_to_void, convert, convert_force, build_type_conversion,
6329         build_expr_type_conversion, type_promotes_to,
6330         perform_qualification_conversions): Use C90 prototyping style.
6331         * decl2.c (grok_array_decl): Use boolean constant.
6332         (delete_sanity): Likewise.
6333         * typeck.c (build_unary_op): Likewise.
6334         * semantics.c (finish_switch_cond): Likewise.
6335         * parser.c (cp_parser_direct_new_declarator): Likewise.
6336         * init.c (build_new): Likewise.
6337
6338 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
6339
6340         * Make-lang.in (po-generated): Remove parse.c.
6341         (CXX_OBJS): Remove parse.o and spew.o.  Add parser.o.
6342         ($(srcdir)/cp/parse.h): Remove target.
6343         ($(srcdir)/cp/parse.c): Likewise.
6344         (gt-cp-parse.h): Likewise.
6345         (gt-cp-parser.h): New target.
6346         (c++.distclean): Do not remove parse.output.
6347         (c++.maintainer-clean): Do not remove parse.c or parse.h.
6348         (cp/spew.o): Remove target.
6349         (cp/lex.o): Adjust dependencies.
6350         (cp/pt.o): Likewise.
6351         (cp/parse.o): Likewise.
6352         (cp/TAGS): Do not mention parse.c.
6353         (cp/parser.o): New target.
6354         * NEWS: Mention the new parser.
6355         * call.c (build_scoped_method_call): Simplify.
6356         (build_method_call): Likewise.
6357         (build_new_function_call): Adjust calls to add_function_candidate
6358         and add_template_candidate.
6359         (build_new_op): Improve handling of erroroneous operands.
6360         (convert_default_arg): Remove circular argument processing.
6361         (name_as_c_string): New function.
6362         (build_new_method_call): Use it.
6363         (perform_implicit_conversion): Use error_operand_p.
6364         * class.c (finish_struct_anon): Use constructor_name_p.
6365         (check_field_decls): Likewise.
6366         (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
6367         (resolve_address_of_overloaded_function): Likewise.
6368         (instantiate_type): Tweak pointer-to-member handling.
6369         (get_primary_binfo): Remove incorrect assertion.
6370         * config-lang.in (gtfiles): Add parser.c, remove parse.c.
6371         * cp-tree.h (DEFARG_TOKENS): New macro.
6372         (default_arg): New structure.
6373         (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
6374         (lang_tree_node): Add default_arg.
6375         (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
6376         (type_info_ref_type): New macro.
6377         (saved_scope): Make processing_explicit_instantiation a boolean.
6378         (check_access): New field.
6379         (unparsed_text): Remove.
6380         (language_function): Remove unparsed_inlines.
6381         (error_operand_p): New macro.
6382         (lang_decl): Adjust pending_inline_info.
6383         (DEFARG_POINTER): Remove.
6384         (tag_types): Add typenames.
6385         (lookup_ualified_name): Declare.
6386         (lookup_name_real): Likewise.
6387         (shadow_tag): Adjust prototype.
6388         (get_scope_of_declarator): Declare it.
6389         (process_next_inline): Remove it.
6390         (check_for_missing_semicolon): Likewise.
6391         (maybe_get_template_decl_from_type_decl): Declare it.
6392         (finish_label_stmt): Adjust prototype.
6393         (finish_non_static_data_meber): Declare it.
6394         (finish_pseudo_destructor_call_expr): Rename to ...
6395         (finish_pseudo_destructor_expr): ... this.
6396         (finish_compound_literal): Declare it.
6397         (begin_inline_definitions): Remove it.
6398         (init_spew): Remove.
6399         (peekyylex): Likewise.
6400         (arbitrate_lookup): Likewise.
6401         (frob_opname): Likewise.
6402         (maybe_snarf_defarg): Likewise.
6403         (add_defarg_fn): Likewise.
6404         (do_pending_defargs): Likewise.
6405         (done_pending_defargs): Likewise.
6406         (unprocessed_defarg_fn): Likewise.
6407         (replace_defarg): Likewise.
6408         (end_input): Likewise.
6409         (get_overloaded_fn): Likewise.
6410         * cvt.c (convert_to_reference): Improve error handling.
6411         * decl.c (lookup_name_real): Do not declare it static.
6412         (maybe_push_to_top_level): Set check_access.
6413         (identifier_type_value): Adjust call to lookup_name_real.
6414         (lookup_qualified_name): New method.
6415         (lookup_name_real): Remove special-case parsing code.
6416         (lookup_name-nonclass): Adjust call to lookup_name_real.
6417         (lookup_name_namespace_only): Likewise.
6418         (lookup_name): Likewise.
6419         (check_tag_decl): Return the type declared.
6420         (shadow_tag): Likewise.
6421         (register_dtor_fn): Tweak check_access.
6422         (grokfndecl): Use constructor_name_p.
6423         (get_scope_of_declarator): New function.
6424         (grokdeclarator): Obscure tweaks for slightly different declarator
6425         representations.
6426         (start_method): Return error_mark_node to indicate failure.
6427         (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
6428         * decl2.c (constructor_name_full): Simplify.
6429         (constructor_name): Use it.
6430         (build_expr_from_tree): Adjust for changes to do new parser.
6431         (push_scope): Improve robustness.
6432         (validate_nonmember_using_decl): Process declarations, not names.
6433         (do_class_using_decl): Likewise.
6434         (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
6435         here.
6436         * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
6437         * expr.c (cxx_expand_expr): Handle BASELINKs.
6438         * init.c (member_init_ok_or_else): Issue more errors.
6439         (build_offset_ref): Tweak handling of FUNCTION_DECLs.
6440         * lex.c: Do not include parse.h.
6441         (yypring): Do not declare.
6442         (yylval): Likewise.
6443         (make_reference_declarator): Remove error-generating code.
6444         (rid_to_yy): Remove.
6445         (cxx_init): Do not call init_spew.
6446         (yypring): Remove.
6447         (check_for_missing_semicolon): Remove.
6448         * lex.h (got_scope): Remove.
6449         (got_object): Remove.
6450         * method.c (hack_identifier): Use finish_non_static_data_member.
6451         (implicitly_declare_fn): Adjust use of constructor_name.
6452         * parser.c: New file.
6453         * pt.c (parse.h): Do not include it.
6454         (maybe_get_template_decl_from_template): Do not declare it.
6455         (finish_member_template_decl): Tweak.
6456         (begin_explicit_instantiation): Adjust for
6457         processing_explicit_instantiation being boolean.
6458         (end_explicit_instantiation): Likewise.
6459         (maybe_process_partial_specialization): Tighten specialization
6460         test.
6461         (retrieve_local_specialization): Adjust ue of hash table.
6462         (eq_local_specializations): New function.
6463         (register_local_specialization): Likewise.
6464         (push_template_decl_real): Remove unnecessary test.
6465         (maybe_get_template_decl_from_type_decl): Don't make it static.
6466         (for_each_template_parm_r): Handle TYPEOF_TYPE.
6467         (tsubst_copy): Use retrieive_local_specialization to handle
6468         PARM_DECL.  Adjust handling of CONST_DECLs.  Handle BASELINKs.
6469         Handle COMPONENT_REFs with pseudo-destructor-expressions.
6470         Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
6471         (tsubst_expr): Pass decls, not names, to do_local_using_decl.
6472         (unify): Tweak handling of CONST_DECLs.
6473         (regenerate_decl_from_template): Use push_nested_class.
6474         (template_for_substitution): New funciton.
6475         (instantiate_decl): Use it.  Register parameters as local
6476         specializations.
6477         * rtti.c (init_rtti_processing): Set type_info_ref_type.
6478         (build_typeid): Use it.
6479         (get_typeid): Likeise.
6480         * search.c (accessible_p): Use check_access, not
6481         flag_access_control.
6482         (adjust_result_of_qualified_name_lookup): Pay attention to the
6483         context_class.
6484         * semantics.c (finish_asm_stmt): Adjust error handling.
6485         (finish_label_stmt): Return the statement.
6486         (finish_non_static_data_member): New function.
6487         (finish_class_expr): Handle BASELINKs.
6488         (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
6489         (finish_object_call_expr): Simplify handling during templates.
6490         (finish_pseudo_destructor_call_expr): Rename to ...
6491         (finish_pseudo_dtor_expr): ... this.
6492         (finish_compound_literal): New function.
6493         (begin_inline_definitions): Remove.
6494         (finish_sizeof): Remove special template handling.
6495         * spew.c: Do not include parse.h.
6496         * tree.c (get_overloaded_fn): Remove.
6497         * typeck.c (build_class_member_access_expr): Handle
6498         PSEUDO_DTOR_EXPR.  Adjust handling of static member functions.
6499         (lookup_destructor): New function.
6500         (finish_class_member_access_expr): Use it.
6501         (convert_arguments): Simplify.
6502         (build_unary_op): Handle BASELINKs.
6503
6504 2002-12-26  Nathan Sidwell  <nathan@codesourcery.com>
6505
6506         PR c++/4803
6507         * decl2.c (mark_used): Defer inline functions.
6508         (finish_file): Merge deferred_fns loops. Check all used
6509         inline functions have a definition.
6510         * method.c (make_thunk): Thunks are not inline.
6511
6512         PR c++/5116, c++/764
6513         * call.c (build_new_op): Make sure template class operands are
6514         instantiated.
6515
6516 2002-12-24  Nathan Sidwell  <nathan@codesourcery.com>
6517
6518         PR C++/7964
6519         * cp-tree.h (resolve_scoped_fn_name): Prototype.
6520         * call.c (resolve_scoped_fn_name): New function. Deal with
6521         more template expansion. Broken out of ...
6522         * parse.y (parse_finish_call_expr): ... here. Call it.
6523         * decl2.c (build_expr_from_tree, CALL_EXPR): Use
6524         resolve_scoped_fn_name and build_call_from_tree.
6525
6526         PR c++/9053
6527         * decl.c (duplicate_decls): Templates may be disambiguated by
6528         return type.
6529
6530         PR c++/8702
6531         * decl2.c (check_classfn): Use lookup_fnfield_1. List all
6532         conversion operators on failure.
6533
6534 2002-12-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6535
6536         Remove traditional C constructs 2/n.
6537         * call.c (tourney, build_field_call, equal_functions, joust,
6538         compare_ics, build_over_call, build_java_interface_fn_ref,
6539         convert_like_real, op_error, build_object_call, resolve_args,
6540         build_vfield_ref, check_dtor_name, build_scoped_method_call,
6541         build_addr_func, build_call, build_method_call, null_ptr_cst_p,
6542         sufficient_parms_p, build_conv, non_reference, strip_top_quals,
6543         standard_conversion, reference_related_p,
6544         reference_compatible_p, convert_class_to_reference,
6545         direct_reference_binding, reference_binding,
6546         ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
6547         add_template_conv_candidate, any_viable, any_strictly_viable,
6548         build_this, splice_viable, print_z_candidates,
6549         build_user_type_conversion, build_new_function_call,
6550         conditional_conversion, build_conditional_expr, build_new_op,
6551         build_op_delete_call, enforce_access, call_builtin_trap,
6552         convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
6553         convert_default_arg, type_passed_as, convert_for_arg_passing,
6554         in_charge_arg_for_name, is_properly_derived_from,
6555         maybe_handle_implicit_object, maybe_handle_ref_bind,
6556         source_type, add_warning, can_convert, can_convert_arg,
6557         perform_implicit_conversion, can_convert_arg_bad,
6558         initialize_reference, add_conv_candidate,
6559         add_template_candidate_real, add_template_candidate): Ansify.
6560
6561 2002-12-22  Nathan Sidwell  <nathan@codesourcery.com>
6562
6563         PR c++/8572
6564         * cp-tree.h (grokoptypename): Add SCOPE parameter.
6565         * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
6566         if in a template scope.
6567         * parse.y (unoperator): Return the scope.
6568         (operator_name): Adjust grokoptypename call.
6569
6570 2002-12-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6571
6572         * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
6573         * decl.c (make_unbound_class_template): Adjust.  Check for tf_error.
6574         * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
6575
6576 2002-12-20  Kazu Hirata  <kazu@cs.umass.edu>
6577
6578         * ChangeLog: Fix a typo.
6579         * class.c: Fix comment typos.
6580         * cp-tree.h: Likewise.
6581
6582 2002-12-18  Jason Merrill  <jason@redhat.com>
6583
6584         Handle anonymous unions at the tree level.
6585         C++ ABI change: Mangle anonymous unions using the name of their
6586         first named field (by depth-first search).  Should not cause
6587         binary compatibility problems, though, as the compiler previously
6588         didn't emit anything for affected unions.
6589         * cp-tree.def (ALIAS_DECL): New tree code.
6590         * decl2.c (build_anon_union_vars): Build ALIAS_DECLs.  Return the
6591         first field, not the largest.
6592         (finish_anon_union): Don't mess with RTL.  Do set DECL_ASSEMBLER_NAME,
6593         push the decl, and write it out at namespace scope.
6594         * decl.c (lookup_name_real): See through an ALIAS_DECL.
6595         (pushdecl): Add namespace bindings for ALIAS_DECLs.
6596         * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
6597         of a decl which doesn't have one.
6598         * typeck.c (build_class_member_access_expr): Don't recurse if
6599         we already have the type we want.
6600
6601 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6602
6603         PR c++/8099
6604         * friend.c (make_friend_class): Allow partial specialization
6605         when declaration is not a template friend.
6606
6607 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6608
6609         PR c++/3663
6610         * pt.c (lookup_template_class): Copy TREE_PRIVATE and
6611         TREE_PROTECTED to created decl nodes.
6612
6613 2002-12-18  Mark Mitchell  <mark@codesourcery.com>
6614
6615         * class.c (build_base_field): Do not set DECL_PACKED on the
6616         FIELD_DECL.
6617
6618 2002-12-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6619
6620         * cp-tree.h (struct tree_srcloc): Use location_t.
6621         (SOURCE_LOCUS): New.
6622         (SRCLOC_FILE, SRCLOC_LINE): Adjust.
6623
6624 2002-12-17  Jason Merrill  <jason@redhat.com>
6625
6626         * decl.c (finish_function): Also complain about no return in
6627         templates.
6628         * semantics.c (finish_return_stmt): Also call check_return_expr in
6629         templates.
6630         * typeck.c (check_return_expr): In a template, just remember that we
6631         saw a return.
6632
6633 2002-12-16  Jason Merrill  <jason@redhat.com>
6634
6635         * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
6636         of the CALL_EXPR.
6637
6638         * semantics.c (do_pushlevel): Call pushlevel after adding the
6639         SCOPE_STMT.
6640         (do_poplevel): Call poplevel before adding the SCOPE_STMT.
6641         * parse.y (function_body): Go back to using compstmt.
6642         * decl.c (pushdecl): Skip another level to get to the parms level.
6643
6644         * call.c (build_new_method_call): Use is_dummy_object to determine
6645         whether or not to evaluate the object parameter to a static member
6646         function.
6647
6648 2002-12-14  Jason Merrill  <jason@redhat.com>
6649
6650         * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
6651         return slot for normal functions.  Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
6652         * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
6653         don't bother with an AGGR_INIT_EXPR.
6654         (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
6655         just generate a new decl normally.  Take return slot parm.
6656         * cp-tree.h: Adjust prototype.
6657
6658 2002-12-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6659
6660         PR C++/8031
6661         * cvt.c (convert_to_pointer_force): Don't try comparing against
6662         erronous type.
6663
6664 2002-12-13  Geoffrey Keating  <geoffk@apple.com>
6665
6666         * cp-tree.h: Have the multiple-include guards around
6667         the entire file.
6668
6669 2002-12-10  David Edelsohn  <edelsohn@gnu.org>
6670
6671         * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
6672         for SPEW_DEBUG.
6673         (snarf_method): Same.
6674         (snarf_defarg): Same.
6675
6676 2002-12-10  Mark Mitchell  <mark@codesourcery.com>
6677
6678         PR c++/8372
6679         * pt.c (tsubst_copy): Handle destructor names more correctly.
6680
6681 2002-12-10  Matt Austern   <austern@apple.com>
6682
6683         * cp-tree.h: get rid of needs_virtual_reinit bit.
6684
6685 2002-12-09  Mark Mitchell  <mark@codesourcery.com>
6686
6687         * NEWS: Document removal of in-class initialization extension for
6688         static data members of non-arithmetic, non-enumeration type.
6689         * decl.c (check_static_variable_definition): Do not allow that
6690         extension.
6691         * decl2.c (grokfield): Do not call digest_init when processing
6692         templates.
6693
6694 2002-12-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6695
6696         * error.c (dump_expr): Fix format specifier warning.
6697
6698 2002-12-04  Geoffrey Keating  <geoffk@apple.com>
6699
6700         * class.c (finish_struct_1): Correct comment.
6701         * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
6702
6703 2002-12-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6704
6705         PR C++/8799
6706         * error.c (dump_expr): Don't ever try to dump a non-existent
6707         expression.
6708
6709 2002-12-03  Nathan Sidwell  <nathan@codesourcery.com>
6710
6711         Implement covariant returns.
6712         * cp-tree.h (IS_AGGR_TYPE_2): Remove.
6713         (struct lang_decl_flags): Add this_thunk_p flag.
6714         Rename vcall_offset to virtual_offset.
6715         (struct lang_decl): Rename delta to fixed_offset.
6716         (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
6717         (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
6718         (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
6719         (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
6720         (make_thunk): Add this_adjusting arg.
6721         (finish_thunk): Declare.
6722         (mangle_thunk): Add this_adjusting arg.
6723         * class.c (get_vcall_index): Use base function for lookup.
6724         (update_vtable_entry_for_fn): Generate covariant thunk.
6725         (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
6726         (build_vtbl_initializer): Use base function for lookup.
6727         Finish covariant thunk here. Adjust thunk generation.
6728         * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
6729         Adjust thunk dumping.
6730         * mangle.c (mangle_call_offset): New function.
6731         (mangle_thunk): Adjust for covariant thunks.
6732         * method.c (make_thunk): Adjust. Do not set name here.
6733         (finish_thunk): New function. Set name here.
6734         (use_thunk): Generate covariant thunks too.
6735         (thunk_adjust): New function.
6736         * search.c (covariant_return_p): Remove. Fold into ...
6737         (check_final_overrider): ... here. Simplify.
6738         * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
6739
6740 2002-12-03  Jason Merrill  <jason@redhat.com>
6741
6742         PR c++/8674
6743         * call.c (build_over_call): Check specifically for TARGET_EXPR
6744         when eliding.
6745
6746         PR c++/8461, c++/8625
6747         * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
6748         (cp_convert_parm_for_inlining): Remove.
6749         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
6750         Remove.
6751         * cp-tree.h (ADDR_IS_INVISIREF): Remove.
6752         * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
6753
6754         * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
6755         an ambiguous conversion.
6756
6757 2002-12-03  Mark Mitchell  <mark@codesourcery.com>
6758
6759         PR c++/8688
6760         * decl.c (reshape_init): Handle erroneous initializers.
6761
6762 2002-12-02  Mark Mitchell  <mark@codesourcery.com>
6763
6764         PR c++/8720
6765         * spew.c (remove_last_token): Make sure that last_chunk is set
6766         correctly.
6767
6768         PR c++/8615
6769         * error.c (dump_expr): Handle character constants with
6770         TREE_OVERFLOW set.
6771
6772 2002-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6773
6774         DR 180
6775         * decl.c (grokdeclarator): Require class-key for all friend class.
6776         Output the correct type and context in the error message.
6777
6778 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
6779
6780         PR c++/5919
6781         * pt.c (unify): Use variably_modified_type_p to test validity of
6782         template argument types.
6783
6784         PR c++/8727
6785         * cp-tree.h (lang_type_class): Add typeinfo_var.
6786         (CLASSTYPE_TYPEINFO_VAR): New macro.
6787         * rtti.c (get_tinfo_decl): Use it.
6788
6789         PR c++/8663
6790         * init.c (expand_member_init): Always get the main variant of a
6791         base class.
6792
6793 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
6794
6795         PR c++/8332
6796         PR c++/8493
6797         * decl.c (cxx_init_decl_processing): Use size_type_node, not
6798         c_size_type_node.
6799         * decl2.c (coerce_new_type): Likewise.
6800         * except.c (do_allocate_exception): Likewise.
6801
6802 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
6803
6804         * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
6805         dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
6806         lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
6807         repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
6808         typeck2.c: Include coretypes.h and tm.h.
6809         * Make-lang.in: Update dependencies.
6810
6811 2002-11-30  Mark Mitchell  <mark@codesourcery.com>
6812
6813         PR c++/8227
6814         * decl.c (layout_var_decl): Deal gracefully with erroneous types.
6815         (check_initializer): Validate the type of the initialized
6816         variable, even if the initializer is absent.
6817         * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
6818
6819         PR c++/8214
6820         * typeck.c (convert_for_assignment): Do not use
6821         decl_constant_value on the operand.
6822
6823         PR c++/8511
6824         * pt.c (instantiate_decl): Handle template friends defined outside
6825         of the class correctly.
6826
6827 2002-11-29  Joe Buck <jbuck@synopsys.com>
6828
6829         * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
6830         anonymous structs.
6831
6832 2002-11-29  Mark Mitchell  <mark@codesourcery.com>
6833
6834         * class.c (walk_subobject_offsets): Recur on binfos as well as on
6835         types.
6836         (layout_nonempty_base_or_field): Pass it a binfo when processing a
6837         base class.
6838         (layout_empty_base): Likewise.
6839         (build_base_field): Likewise.
6840
6841 2002-11-27  Mark Mitchell  <mark@codesourcery.com>
6842
6843         * class.c (build_base_field): Make sure we get the canonical base
6844         when descending through primary bases.
6845
6846 2002-11-26  Geoffrey Keating  <geoffk@apple.com>
6847
6848         * decl.c (check_initializer): Don't error on initialisation of
6849         a scalar with a brace-enclosed expression.
6850
6851 2002-11-26  Nathan Sidwell  <nathan@codesourcery.com>
6852
6853         * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
6854         (template_parms_equal): Remove prototype.
6855         * typeck.c (buuld_indirect_ref): Reformat.
6856
6857 2002-11-25  Jason Merrill  <jason@redhat.com>
6858
6859         * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
6860         and a DO_STMT.
6861
6862 2002-11-25  Mark Mitchell  <mark@codesourcery.com>
6863
6864         * tree.c (cp_build_qualified_type_real): Correct handling of
6865         array types.
6866         * class.c (walk_subobject_offsets): Fix thinko.
6867         (build_base_field): Record offsets of empty bases in primary
6868         virtual bases.
6869         (layout_class_type): Record offsets of empty bases in fields.
6870
6871         * search.c (is_subobject_of_p_1): Fix thinko.
6872         (lookup_field_queue_p): Likewise.
6873
6874 2002-11-24  Mark Mitchell  <mark@codesourcery.com>
6875
6876         * class.c (layout_class_type): Reuse tail padding when laying out
6877         virtual bases.
6878
6879 2002-11-22  Mark Mitchell  <mark@codesourcery.com>
6880
6881         * rtti.c (qualifier_flags): Fix thinko.
6882
6883 2002-11-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6884
6885         Remove traditional C constructs 1/n.
6886         * cp-tree.h (init_method, set_mangled_name_for_decl,
6887         build_opfncall, hack_identifier, make_thunk, use_thunk,
6888         synthesize_method, implicitly_declare_fn,
6889         skip_artificial_parms_for, optimize_function, calls_setjmp_p,
6890         maybe_clone_body): Remove use of PARAMS.
6891
6892         * method.c (do_build_assign_ref, do_build_copy_constructor,
6893         synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
6894         Likewise.
6895         (synthesize_method): Use 'bool' type and constants instead of
6896         'int'.
6897         (locate_copy): Likewise.
6898         (implicitly_declare_fn): Likewise.
6899
6900         * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
6901         Remove old-style declaration.
6902         (maybe_clone_body): Use 'bool' type and constants.
6903
6904 2002-11-21  Glen Nakamura  <glen@imodulo.com>
6905
6906         PR c++/8342
6907         * typeck.c (get_member_function_from_ptrfunc): Make sure that a
6908         SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
6909         of the branches of a COND_EXPR.
6910
6911 2002-11-19  Mark Mitchell  <mark@codesourcery.com>
6912
6913         * pt.c (for_each_template_parm): Free allocated memory.
6914         * search.c (is_subobject_of_p_1): New function.
6915         (is_subobject_of_p): Avoid walking virtual bases multiple times.
6916
6917 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
6918
6919         * g++spec.c (lang_specific_spec_functions): New.
6920
6921 2002-11-15  Kazu Hirata  <kazu@cs.umass.edu>
6922
6923         * ChangeLog: Follow spelling conventions.
6924         * class.c: Likewise.
6925         * decl2.c: Likewise.
6926
6927 2002-11-14  Zack Weinberg  <zack@codesourcery.com>
6928
6929         * search.c (dfs_push_decls): Do not try to reorder elements
6930         3..n of method_vec if method_vec has only two elements.
6931         Reverse order of two tests to avoid accessing unallocated
6932         memory.
6933
6934 2002-11-14  Mark Mitchell  <mark@codesourcery.com>
6935
6936         * class.c (dfs_find_final_overrider): Adjust so that the most
6937         derived object is a binfo, rather than a class type.
6938         (find_final_overrider): Likewise.
6939         (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
6940         (add_vcall_offset): Likewise.
6941
6942 2002-11-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6943
6944         PR c++/8389
6945         * pt.c (instantiate_template): Push class scope for member
6946         functions.
6947         (get_mostly_instantiated_function_type): Likewise.  Don't call
6948         tsubst on context.  Remove CONTEXTP and TPARMSP parameters.
6949         * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
6950         * mangle.c (write_encoding, write_unqualified_name): Adjust.
6951
6952 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
6953
6954         * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
6955         vcall offfsets.  Split out ...
6956         (add_vcall_offset): ... new function.
6957
6958         PR c++/8338
6959         * pt.c (for_each_template_parm): Add htab parameter.
6960         (process_partial_specialization): Adjust call.
6961         (push_template_decl_real): Likewise.
6962         (pair_fn_data): Add visited.
6963         (for_each_template_parm_r): Avoid walking duplicates more than
6964         once.
6965         (uses_template_parms): Adjust call to for_each_template_parm.
6966
6967 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
6968
6969         * class.c (add_implicitly_declared_members): Put implicitly
6970         declared functions at the end of TYPE_METHODs when -fabi-version
6971         is at least 2.
6972
6973 2002-11-05  Geoffrey Keating  <geoffk@apple.com>
6974
6975         * decl2.c (finish_file): Correct spelling.
6976
6977 2002-11-03  Mark Mitchell  <mark@codesourcery.com>
6978
6979         * call.c (build_special_member_call): Do not try to lookup VTTs by
6980         name.
6981         * class.c (vtbl_init_data): Add generate_vcall_entries.
6982         (get_vtable_decl): Do not look up virtual tables by name.
6983         (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
6984         (set_primary_base): Do not set CLASSTYPE_RTTI.
6985         (determine_primary_base): Likewise.
6986         (get_matching_virtual): Remove.
6987         (get_vcall_index): New function.
6988         (update_vtable_entry_for_fn): Do not try to use virtual thunks
6989         when they are not required.  Assign vcall indices at this point.
6990         (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
6991         Do update dynamic_classes.
6992         (build_vtt): Do not add VTTs to the symbol table.
6993         (build_ctor_vtbl_group): Likewise.
6994         (build_vtbl_initializer): Simplify handling of vcall indices.
6995         (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
6996         for the most derived class.
6997         (add_vcall_offset_vtbl_entries_1): But do not actually add them to
6998         the vtable.
6999         * cp-tree.h (dynamic_classes): New macro.
7000         (lang_type_class): Remove rtti.  Add vtables.  Add vcall_indices.
7001         (CLASSTYPE_RTTI): Remove.
7002         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
7003         (CLASSTYPE_VCALL_INDICES): New macro.
7004         (CLASSTYPE_VTABLES): Likewise.
7005         (BV_USE_VCALL_INDEX_P): Remove.
7006         (build_vtable_path): Remove.
7007         * decl2.c (finish_vtable_vardecl): Remove.
7008         (key_method): Remove #if 0'd code.
7009         (finish_vtable_vardecl): Rename to ...
7010         (maybe_emit_vtables): ... this.
7011         (finish_file): Use it.
7012         * search.c (look_for_overrides_here): Update comment.
7013
7014 2002-11-01  Zack Weinberg  <zack@codesourcery.com>
7015
7016         PR c/7353 redux
7017         * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
7018
7019 2002-10-30  Jason Merrill  <jason@redhat.com>
7020
7021         PR c++/8186
7022         * cp-tree.h (ADDR_IS_INVISIREF): New macro.
7023         * call.c (convert_for_arg_passing): Set it.
7024         * except.c (stabilize_throw_expr): Recurse for such an arg.
7025
7026 2002-10-31  Mark Mitchell  <mark@codesourcery.com>
7027
7028         * cp-tree.h (lang_decl_flags): Remove init_priority.
7029         (lang_decl): Add delta.
7030         (GLOBAL_INIT_PRIORITY): Remove.
7031         (THUNK_DELTA): Revise definition.
7032         * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
7033         * dump.c (cp_dump_tree): Don't dump it.
7034
7035 2002-10-30  Mark Mitchell  <mark@codesourcery.com>
7036
7037         PR c++/8160
7038         * typeck2.c (process_init_constructor): Call complete_array_type.
7039
7040         PR c++/8149
7041         * decl.c (make_typename_type): Issue errors about invalid results.
7042
7043 2002-10-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7044
7045         Core issue 287, PR c++/7639
7046         * cp-tree.h (lang_type_class): Add decl_list field.
7047         (CLASSTYPE_DECL_LIST): New macro.
7048         (maybe_add_class_template_decl_list): Add declaration.
7049         * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
7050         (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
7051         (maybe_add_class_template_decl_list): New function.
7052         (add_implicitly_declared_members): Use it.
7053         * decl.c (maybe_process_template_type_declaration): Likewise.
7054         (pushtag): Likewise.
7055         * friend.c (add_friend): Likewise.
7056         (make_friend_class): Likewise.
7057         * semantics.c (finish_member_declaration): Likewise.
7058         (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
7059         * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
7060         to process members and friends in the order of declaration.
7061
7062 2002-10-29  Mark Mitchell  <mark@codesourcery.com>
7063
7064         PR c++/8287
7065         * decl.c (finish_destructor_body): Create the label to jump to
7066         when returning from a destructor here.
7067         (finish_function_body): Rather than here.
7068
7069 2002-10-25  Zack Weinberg  <zack@codesourcery.com>
7070
7071         PR c++/7266
7072         * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
7073         SCOPE_REF is not null before dereferencing it.
7074
7075 2002-10-25  Mark Mitchell  <mark@codesourcery.com>
7076
7077         * call.c (build_over_call): Use DECL_CONTEXT, not
7078         DECL_VIRTUAL_CONTEXT.
7079         * class.c (modify_vtable_entry): Don't mess with
7080         DECL_VIRTUAL_CONTEXT.
7081         (set_vindex): Remove.
7082         (set_primary_base): Remove vfuns_p parameter.
7083         (determine_primary_base): Likewise.
7084         (modify_all_vtables): Likewise.
7085         (layout_class_type): Likewise.  Adjust calls to other functions
7086         accordingly.
7087         (finish_struct_1): Adjust calls to modified functions.  Set
7088         DECL_VINDEX here.
7089         * cp-tree.h (lang_type_class): Remove vsize.
7090         (CLASSTYPE_VSIZE): Remove.
7091         (lang_decl): Remove thunks.
7092         (DECL_THUNKS): Adjust.
7093         (DECL_VIRTUAL_CONTEXT): Remove.
7094         (duplicate_decls): Don't copy it.
7095         * pt.c (build_template_decl): Don't set it.
7096         (tsubst_decl): Likewise.
7097         * typeck.c (expand_ptrmemfunc_cst): Don't use it.
7098
7099         * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
7100         (build_vtable_entry): Remove.
7101         * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
7102         (lang_decl): Add thunks.
7103         (DECL_THUNKS): New macro.
7104         * decl.c (duplicate_decls): Copy it.
7105         * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
7106         * semantics.c (emit_associated_thunks): Simplify.
7107
7108 2002-10-24  David Edelsohn  <edelsohn@gnu.org>
7109
7110         PR c++/7228
7111         * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
7112         lang_type structure exists before accessing field.
7113         (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
7114         (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
7115         (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
7116         * class.c (check_field_decls): Use new macros.
7117         * typeck2.c (process_init_constructor): Remove redundant check for
7118         existence of lang_type structure.
7119
7120 2002-10-24  Mark Mitchell  <mark@codesourcery.com>
7121
7122         * class.c (end_of_base): New method.
7123         (end_of_class): Use it.  Check indirect virtual bases.
7124
7125         * class.c (check_field_decls): Fix typo.
7126
7127 2002-10-23  Mark Mitchell  <mark@codesourcery.com>
7128
7129         PR c++/8067
7130         * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
7131         related variables.
7132
7133         PR c++/7679
7134         * spew.c (next_token): Do not return an endless stream of
7135         END_OF_SAVED_INPUT tokens.
7136         (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
7137         the cached token stream.
7138         (snarf_defarg): Likewise.
7139
7140 2002-10-23  Zack Weinberg  <zack@codesourcery.com>
7141
7142         * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
7143         variably_modified_type_p.
7144         * cp-tree.h: Remove prototype of variably_modified_type_p.
7145         * tree.c (variably_modified_type_p): Remove; now implemented
7146         in language-independent code.
7147
7148 2002-10-22  Mark Mitchell  <mark@codesourcery.com>
7149
7150         PR c++/6579
7151         * spew.c (snarf_parenthesized_expression): New function.
7152         (snarf_block): Use it.
7153
7154 2002-10-22  Richard Henderson  <rth@redhat.com>
7155
7156         * method.c (use_thunk): Always compute vcall_value; assert that
7157         it is not zero.  Use can_output_mi_thunk; use output_mi_thunk
7158         for vcall thunks as well.
7159
7160 2002-10-21  Mark Mitchell  <mark@codesourcery.com>
7161
7162         * class.c (empty_base_at_nonzero_offset_p): New function.
7163         (layout_nonempty_base_or_field): Do not check for conflicts when
7164         laying out a virtual base using the GCC 3.2 ABI.
7165         (build_base_field): Correct checking for presence of empty classes
7166         at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
7167
7168         * class.c (include_empty_classes): Use normalize_rli.
7169         (layout_class_type): Likewise.
7170
7171         * decl.c (reshape_init): Tweak handling of character arrays.
7172
7173         PR c++/8218
7174         * cp-tree.h (lang_type_class): Add contains_empty_class_p.
7175         (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
7176         * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
7177         (check_field_decls): Likewise.
7178         (layout_class_type): Likewise.
7179         (finish_struct_1): Initialize it.
7180         (walk_subobject_offsets): Use it to prune searches.
7181
7182 2002-10-20  Mark Mitchell  <mark@codesourcery.com>
7183
7184         * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
7185         * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
7186         TARGET_ASM_OUTPUT_MI_THUNK in comments.
7187
7188 2002-10-18  Zack Weinberg  <zack@codesourcery.com>
7189
7190         * decl.c (start_decl): Point users of the old initialized-
7191         typedef extension at __typeof__.
7192
7193 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
7194
7195         * Make-lang.in (method.o): Depend on TARGET_H.
7196         * method.c (target.h): Include it.
7197         (use_thunk): Use target hooks.  Use vcall thunks, if available.
7198
7199 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
7200
7201         * class.c (base_derived_from): Make sure return value is a bool.
7202
7203 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
7204
7205         * class.c (find_final_overrider_data_s): Remove overriding_fn and
7206         overriding_base.
7207         (dfs_base_derived_from): New function.
7208         (base_derived_from): Likewise.
7209         (dfs_find_final_overrider): Use base_derived_from.
7210         (find_final_overrider): Adjust.
7211
7212 2002-10-18  Jason Merrill  <jason@redhat.com>
7213
7214         PR c++/8080
7215         * semantics.c (finish_for_cond, finish_while_cond): Don't mess
7216         with condition decls in a template.
7217
7218 2002-10-17  Nathan Sidwell  <nathan@codesourcery.com>
7219
7220         * class.c (add_method): Compare template parms too.
7221
7222 2002-10-17  Mark Mitchell  <mark@codesourcery.com>
7223
7224         PR c++/7584
7225         * class.c (handle_using_decl): Allow the declaration used to be
7226         from an ambiguous base.
7227
7228         * pt.c (convert_template_argument): Revert this change:
7229                 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
7230                 * pt.c (convert_template_argument): Do not fold non-type
7231                 template rguments when inside a template.
7232
7233         * init.c (expand_default_init): Handle brace-enclosed initializers
7234         correctly.
7235
7236 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
7237
7238         * mangle.c (write_expression): Correct handling of enumeration
7239         constants.
7240         (write_template_arg): Likewise.
7241         * pt.c (convert_template_argument): Do not fold non-type template
7242         arguments when inside a template.
7243
7244         PR c++/7478
7245         * cvt.c (convert_to_reference): Allow references as the incoming
7246         type.
7247
7248 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
7249
7250         PR c++/7524
7251         * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
7252         build_qualified_type.
7253
7254 2002-10-15  Richard Henderson  <rth@redhat.com>
7255
7256         * error.c (dump_expr): Use real_to_decimal directly, and with
7257         the new arguments.
7258
7259 2002-10-15  Mark Mitchell  <mark@codesourcery.com>
7260
7261         * decl.c (reshape_init): Fix typo.
7262
7263         * cp-tree.h (operator_name_info_t): Add arity.
7264         * lex.c (init_operators): Initialize it.
7265         * mangle.c (write_conversion_operator_name): New function.
7266         (write_unqualified_name): Use it.
7267         (write_template_args): Accept template arguments as a TREE_LIST.
7268         (write_expression): Adjust handling of qualified names to match
7269         specification.
7270
7271 2002-10-15  Jason Merrill  <jason@redhat.com>
7272
7273         * call.c (call_builtin_trap): New fn.
7274         (convert_arg_to_ellipsis): Use it.  Downgrade error to warning.
7275         (build_call): Don't set current_function_returns_abnormally outside
7276         a function.
7277
7278 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
7279
7280         * class.c (check_field_decls): Remove empty_p parameter.  Instead,
7281         clear CLASSTYPE_EMPTY_P.
7282         (build_base_field): Likewise.
7283         (build_base_fields): Likewise.
7284         (check_bases_and_members): Likewise.
7285         (create_vtbl_ptr): Likewise.
7286         (layout_class_type): Likewise.  Ensure that empty classes have
7287         size zero when used as base classes in the 3.2 ABI.
7288         (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
7289         CLASSTYPE_NEARLY_EMPTY_P.  Adjust calls to avoid passing empty_p
7290         parameter.
7291         (is_empty_class): Correct definition when using post-3.2 ABI.
7292         * cp-tree.h (lang_type_class): Add empty_p.
7293         (CLASSTYPE_EMPTY_P): New macro.
7294
7295 2002-10-12  Nathan Sidwell  <nathan@codesourcery.com>
7296
7297         * init.c (build_delete): Do not apply save_expr for arrays.
7298         (build_vec_delete): Likewise.
7299
7300 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
7301
7302         * decl.c (layout_var_decl): Call layout_decl even for variables
7303         whose type is an array with unspecified bounds.
7304
7305         PR c++/7176
7306         * lex.c (do_identifier): Add another option for the parsing
7307         parameter.
7308         * parse.y (do_id): Use it.
7309
7310 2002-10-11  Gabriel Dos Reis  <gdr@integrable-solutions.net>
7311
7312         PRs C++/6803, C++/7721 and C++/7803
7313         * decl.c (grokdeclarator): Gracefully handle template-name as
7314         decl-specifier.
7315
7316 2002-10-11  Jason Molenda  <jmolenda@apple.com>
7317
7318         * init.c (build_field_list): Provide uses_unions_p with a default
7319         value.
7320
7321 2002-10-11  Mark Mitchell  <mark@codesourcery.com>
7322
7323         PR c++/5661
7324         * cp-tree.h (variably_modified_type_p): New function.
7325         (grokdeclarator) Tighten check for variably modified types as
7326         fields.
7327         * pt.c (convert_template_argument): Do not allow variably modified
7328         types as template arguments.
7329         * tree.c (variably_modified_type_p): New function.
7330
7331         * NEWS: Document removal of "new X = ..." extension.
7332         * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
7333         brace-enclosed initializers.
7334         * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
7335         (initialize_local_var): Remove declaration.
7336         (expand_static_init): Likewise.
7337         * decl.c (next_initializable_field): New function.
7338         (reshape_init): Likewise.
7339         (check_initializer): Use them.  Build dynamic initializer for
7340         aggregates here too.
7341         (initialize_local_var): Simplify, and incorporate cleanup
7342         insertion code as well.
7343         (destroy_local_var): Remove.
7344         (cp_finish_decl): Tidy.
7345         (expand_static_init): Fold checks for whether or not a variable
7346         needs initialization into this function.  Simplify.
7347         * decl2.c (do_static_initialization): Simplify.
7348         * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
7349         be done for us automatically.
7350         (expand_default_init): Handle brace-enclosed initializers
7351         correctly.
7352         (expand_aggr_init_1): Remove RTL-generation code.
7353         (build_vec_init): Remove "new X = ..." support.
7354         * parse.y (new_initializer): Likewise.
7355         * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
7356         brace-enclosed initializer.
7357         (create_pseudo_type_info): Likewise.
7358         * typeck2.c (store_init_value): Don't try to handle digest_init
7359         being called more than once.
7360         (digest_init): Tidy handling of brace-enclosed initializers.
7361
7362 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7363
7364         * decl.c (typename_hash): Use htab_hash_pointer.
7365
7366 2002-10-10  Jim Wilson  <wilson@redhat.com>
7367
7368         * decl.c (duplicate_decls): Don't call decl_attributes.
7369
7370 2002-10-09  Zack Weinberg  <zack@codesourcery.com>
7371
7372         PR c/7353
7373         * decl.c (start_decl): Unconditionally issue error for
7374         'typedef foo = bar'.
7375         (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
7376         (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
7377
7378 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7379
7380         * decl2.c (prune_vtable_vardecl): Delete unused function.
7381
7382 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
7383
7384         PR c++/7754
7385         * decl2.c (finish_anon_union): Do not expand anonymous unions when
7386         procesing template functions.
7387         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
7388         type. Call layout_decl.
7389         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
7390
7391 2002-10-07  Richard Henderson  <rth@redhat.com>
7392
7393         * decl2.c, pt.c: Revert c++/7754 fix.
7394
7395 2002-10-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7396
7397         PR c++/7804
7398         * error.c (dump_expr) [REAL_CST]: Output in decimal format.
7399
7400 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
7401
7402         PR c++/7931
7403         * pt.c (for_each_template_parm_r): Handle BASELINKs.
7404
7405         PR c++/7754
7406         * decl2.c (finish_anon_union): Do not expand anonymous unions when
7407         procesing template functions.
7408         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
7409         type. Call layout_decl.
7410         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
7411
7412 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
7413
7414         PR c++/8006
7415         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
7416         template parameters.
7417         (globals): Add entity and need_abi_warning.
7418         (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
7419         CLASSTYPE_TEMPLATE_INFO.
7420         (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
7421         TYPE_TI_TEMPLATE.
7422         (write_prefix): Handle typename types correctly.
7423         (write_template_prefix): Handle template template parameters
7424         correctly.
7425         (start_mangling): Add entity parameter.
7426         (finish_mangling): Warn about names whose mangling will change.
7427         (mangle_decl_string): Adjust.
7428         (mangle_type_string): Likewise.
7429         (mangle_special_for_type): Likewise.
7430         (mangle_ctor_vtbl_for_type): Likewise.
7431         (mangle_thunk): Likewise.
7432         (mangle_guard_variable): Likewise.
7433         (mangle_ref_init_variable): Likewise.
7434
7435 2002-10-02  Mark Mitchell  <mark@codesourcery.com>
7436
7437         PR c++/7188.
7438         * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
7439         * cp-tree.h (emit_base_init): Rename to ....
7440         (emit_mem_initializers): ... this.
7441         (expand_member_init): Change prototype.
7442         * init.c (perform_member_init): Compute explicit, rather than
7443         requiring it as a parameter.
7444         (sort_member_init): Rename to ...
7445         (sort_mem_initializers): ... this.  Process bases and data members
7446         together.
7447         (sort_base_init): Remove.
7448         (emit_base_init): Rename to ...
7449         (emit_mem_initializers): ... this.
7450         (expand_aggr_vbase_init_1): Remove.
7451         (construct_virtual_bases): Rename to ...
7452         (construct_virtual_base): ... this.
7453         (expand_member_init): Rework handling of base initializers.
7454         * method.c (do_build_copy_constructor): Use
7455         finish_mem_initializers.
7456         * parse.y (member_init): Adjust calls to expand_member_init.
7457         * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
7458         (tsubst_initializer_list): Use expand_member_init.
7459         * semantics.c (finish_mem_intiailizers): Simplify.
7460
7461 2002-10-02  Matt Austern  <austern@apple.com>
7462         * decl.c (walk_vtables_r): Fixed typo that caused result to
7463         never get a nonzero value.
7464
7465 2002-10-02  Roger Sayle  <roger@eyesopen.com>
7466
7467         PR optimization/6627
7468         * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
7469         from here, and move it to tree.h.
7470         * decl.c (cxx_init_decl_processing): If storing the vbit
7471         in function pointers, ensure that force_align_functions_log
7472         is atleast one.
7473
7474 2002-10-02  Matt Austern  <austern@apple.com>
7475
7476         * class.c (check_field_decls): Changed warning about const member
7477         variables so that it doesn't get issued for a class aggregate.
7478
7479 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
7480
7481         * decl.c (cp_finish_decl): Make sure array types are laid out,
7482         even if the array bounds are unknown.
7483
7484 2002-10-01  Steve Ellcey  <sje@cup.hp.com>
7485
7486         * class.c (build_vtbl_initializer): Change build_c_cast
7487         to build1.
7488
7489 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
7490
7491         * decl.c (cp_finish_decl): Make sure array types are laid out,
7492         even if the array bounds are unknown.
7493
7494         * decl.c (cp_finish_decl): Correct check for dynamic
7495         initialization of thread-local storage.
7496
7497 2002-09-30  Nathan Sidwell  <nathan@codesourcery.com>
7498
7499         * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
7500         overloaded.
7501
7502 2002-09-30  Steve Ellcey  <sje@cup.hp.com>
7503
7504         * class.c (build_vtbl_initializer): Add cast.
7505         (add_vcall_offset_vtbl_entries_1):
7506         Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
7507
7508 2002-09-30  Mark Mitchell  <mark@codesourcery.com>
7509
7510         * class.c (walk_subobject_offsets): Correct the calculation of
7511         offsets for virtual bases.  Correct the counting of array
7512         elements.
7513         (layout_nonempty_base_or_field): Simplify.  Correct the
7514         calculation of offsets to be propagated through the binfo
7515         hierarchy.
7516         (build_base_field): Avoid creating a FIELD_DECL for empty bases.
7517         Add the FIELD_DECL to TYPE_FIELDS.
7518         (build_base_fields): Adjust accordingly.
7519         (layout_virtual_bases): Use build_base_field.
7520         (end_of_class): Return a tree, not an integer.
7521         (warn_about_ambiguous_direct_bases): Rename to ...
7522         (warn_about_ambiguous_bases): ... this.
7523         (include_empty_classes): New function.
7524         (layout_class_type): Create an alternative version of the type to
7525         be used when as a base class type.  Do not call
7526         finish_record_layout until we are done laying out the class.
7527         * cp-tree.h (lang_type_class): Remove size, size_unit.  Add
7528         as_base.
7529         (CLASSTYPE_SIZE): Reimplement.
7530         (CLASSTYPE_SIZE_UNIT): Likewise.
7531         (CLASSTYPE_ALIGN): Likweise.
7532         (CLASSTYPE_USER_ALIGN): Likewise.
7533         (CLASSTYPE_AS_BASE): New macro.
7534         (DECL_INITIALIZED_P): Likewise.
7535         (extract_init): Remove prototype.
7536         (build_forced_zero_init): Rename to ...
7537         (build_zero_init): ... this.
7538         (force_store_init_value): Remove.
7539         * decl.c (obscure_complex_init): Remove.
7540         (duplicate_decls): Copy DECL_INITIALIZED_P.
7541         (check_initializer): Do not leave junk in DECL_INITIAL.
7542         (cp_finish_decl): Handle zero-initialization of entities with
7543         static storage duration.
7544         * expr.c (extract_init): Remove.
7545         * init.c (build_forced_zero_init): Remove.
7546         (build_zero_init): New function.
7547         (build_default_init): Use it.
7548         (build_field_list): Skip FIELD_DECLs for base subobjects.
7549         (push_base_cleanups): Likewise.
7550         * method.c (do_build_assign_ref): Likewise.
7551         (synthesize_exception_spec): Likewise.
7552         * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
7553         (regenerate_decl_from_template): To not set DECL_INITIAL for a
7554         static data member whose initialization took place in its class.
7555         (instantiate_decl): Do not pass an initializer to cp_finish_decl
7556         in that situation.
7557         * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
7558         (dfs_unuse_fields): Likewise.
7559         * tree.c (pod_type_p): Handle error_mark_node.
7560         (zero_init_p): Likewise.
7561         * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
7562         subobjects.
7563         * typeck2.c (store_init_value): Remove #if 0'd code.
7564         (force_store_init_value): Remove.
7565         (process_init_constructor): Use build_zero_init.
7566
7567 2002-09-29  Nathan Sidwell  <nathan@codesourcery.com>
7568
7569         PR c++/7788
7570         * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
7571
7572 2002-09-29  Kazu Hirata  <kazu@cs.umass.edu>
7573
7574         * cp-tree.h: Fix comment typos.
7575         * decl.c: Likewise.
7576         * pt.c: Likewise.
7577
7578 2002-09-25  Mark Mitchell  <mark@codesourcery.com>
7579
7580         * cp/class.c (contains_empty_class_p): New method.
7581         (walk_subobject_offsets): Correct computation of field offset.
7582         (layout_empty_base): Correct placement of emtpy base classes.
7583         (layout_class_type): Warn about ABI changes.
7584
7585 2002-09-23  Mark Mitchell  <mark@codesourcery.com>
7586
7587         * cp/class.c (layout_virtual_bases): Do not round the size of the
7588         type to a multiple of the alignment before laying out virtual bases.
7589         (layout_class_type): Correct handling of bit-fields that are wider
7590         than their type inside unions.  Round the size of the type to a
7591         even number of bytes when computing the size without virtual
7592         bases.
7593         * cp/cp-tree.h (abi_version_at_least): New macro.
7594
7595 2002-09-21  Kazu Hirata  <kazu@cs.umass.edu>
7596
7597         * ChangeLog: Follow spelling conventions.
7598         * ChangeLog.2: Likewise.
7599         * call.c: Likewise.
7600         * class.c: Likewise.
7601         * cp-tree.h: Likewise.
7602         * cvt.c: Likewise.
7603         * decl.c: Likewise.
7604         * decl2.c: Likewise.
7605         * except.c: Likewise.
7606         * friend.c: Likewise.
7607         * g++spec.c: Likewise.
7608         * init.c: Likewise.
7609         * lex.c: Likewise.
7610         * mangle.c: Likewise.
7611         * method.c: Likewise.
7612         * operators.def: Likewise.
7613         * optimize.c: Likewise.
7614         * pt.c: Likewise.
7615         * rtti.c: Likewise.
7616         * search.c: Likewise.
7617         * semantics.c: Likewise.
7618         * spew.c: Likewise.
7619         * tree.c: Likewise.
7620         * typeck.c: Likewise.
7621
7622 2002-09-18  Devang Patel  <dpatel@apple.com>
7623
7624         * cp/cp-tree.h: New prototype for walk_vtabls().
7625         * cp/decl.c (walk_vtables_r): New function.
7626         (struct cp_binding_level): Add new members, namespaces,
7627         names_size and vtables.
7628         (add_decl_to_level): Add decl in namespaces or vtables
7629         chain, if conditions match.
7630         (walk_vtables): New function.
7631         (walk_namespaces_r): Travers separate namespace chain
7632         for namespace decls.
7633         (wrapup_globals_for_namespace): Use names_size instead
7634         of list_length().
7635         * cp/decl2.c (finish_file): Use walk_vtables() instead of
7636         walk_globals() to walk vtable decls.
7637
7638 2002-09-18  Nathan Sidwell  <nathan@codesourcery.com>
7639
7640         * decl.c (grokdeclarator): Use assert, not internal_error. Don't
7641         ICE with invalid pointers & references.
7642
7643 2002-09-17  Zack Weinberg  <zack@codesourcery.com>
7644
7645         * Make-lang.in: Remove all references to the demangler.
7646         * cxxfilt.c: Moved to binutils.
7647
7648 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
7649
7650         PR c++/7718
7651         * pt.c (tsubst_decl): Remove assert.
7652
7653         Remove DR 295 implementation.
7654         * pt.c (check_cv_quals_for_unify): Disable function & method cases.
7655         * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
7656         about ignoring volatile qualifiers.
7657
7658         * search.c (lookup_member): Correct documentation.
7659
7660 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
7661
7662         * cp-tree.h (union lang_tree_node): Add chain_next option.
7663
7664 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
7665
7666         * parse.y (parse_finish_call_expr): Check lookup_member result.
7667
7668         PR c++/7015
7669         * semantic.c (finish_asm_stmt): Fix operand/output_operands
7670         thinko.
7671         * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
7672
7673 2002-09-15  Nathan Sidwell  <nathan@codesourcery.com>
7674
7675         PR c++/7919
7676         * call.c (build_over_call): Convert this pointer for fns found by
7677         using decls.
7678
7679 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
7680
7681         * ChangeLog: Follow spelling conventions.
7682         * ChangeLog.1: Likewise.
7683
7684 2002-09-14  Nathan Sidwell  <nathan@codesourcery.com>
7685
7686         PR c++/7768
7687         * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
7688
7689 2002-09-14  Kazu Hirata  <kazu@cs.umass.edu>
7690
7691         * error.c: Fix comment formatting.
7692         * except.c: Likewise.
7693         * expr.c: Likewise.
7694         * friend.c: Likewise.
7695         * g++spec.c: Likewise.
7696         * init.c: Likewise.
7697         * lex.c: Likewise.
7698         * mangle.c: Likewise.
7699         * method.c: Likewise.
7700         * optimize.c: Likewise.
7701         * pt.c: Likewise.
7702         * rtti.c: Likewise.
7703         * search.c: Likewise.
7704         * semantics.c: Likewise.
7705         * spew.c: Likewise.
7706         * tree.c: Likewise.
7707         * typeck.c: Likewise.
7708         * typeck2.c: Likewise.
7709
7710 2002-09-13  Matt Austern  <austern@apple.com>
7711
7712         PR C++/7828
7713         * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
7714         * cp/call.c: Change call-by-const-reference mechanism to use
7715         non_cast_lvalue_p when deciding whether the create a temporary.
7716         We need a temporary when passing, e.g. (long) x by const ref.
7717
7718 2002-09-13  Nathan Sidwell  <nathan@codesourcery.com>
7719
7720         * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
7721
7722 2002-09-13  Kazu Hirata  <kazu@cs.umass.edu>
7723
7724         * decl.c: Fix comment formatting.
7725         * decl2.c: Likewise.
7726
7727 2002-09-12  Kazu Hirata  <kazu@cs.umass.edu>
7728
7729         * call.c: Fix comment formatting.
7730         * class.c: Likewise.
7731         * cp-lang.c: Likewise.
7732         * cp-tree.h: Likewise.
7733         * cvt.c: Likewise.
7734
7735 2002-09-11  Zack Weinberg  <zack@codesourcery.com>
7736
7737         * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
7738         and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
7739         * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
7740         minor adjustments (use version_string, eliminate yet another
7741         duplicate of xmalloc)
7742
7743 2002-09-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7744
7745         * cp-tree.h (require_complete_eh_spec_types): Add prototype.
7746
7747 2002-09-05  Jason Merrill  <jason@redhat.com>
7748
7749         * typeck2.c (add_exception_specifier): Only pedwarn for an
7750         incomplete type.
7751         (require_complete_eh_spec_types): New fn.
7752         (cxx_incomplete_type_diagnostic): Also support pedwarning.
7753         * typeck.c (complete_type_or_diagnostic): Likewise.
7754         * call.c (build_call): Call require_complete_eh_spec_types.
7755         * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
7756         on an incomplete type.
7757
7758 2002-09-04  Jakub Jelinek  <jakub@redhat.com>
7759
7760         * decl.c (start_cleanup_fn): Clear interface_only before
7761         start_function, restore it afterwards.
7762
7763 2002-09-02  Nathan Sidwell  <nathan@codesourcery.com>
7764
7765         * cp-tree.h (finish_builtin_type): Remove.
7766         * decl2.c (finish_builtin_type): Move to common code.
7767         * decl.c (build_ptrmemfunc_type): Adjust.
7768         * rtti.c (create_pseudo_type_info): Adjust.
7769         (create_tinfo_types): Adjust.
7770
7771 2002-08-31  Jason Merrill  <jason@redhat.com>
7772
7773         * cp-lang.c (cp_expr_size): Allow initialization from a
7774         CONSTRUCTOR.
7775
7776 2002-08-30  Richard Henderson  <rth@redhat.com>
7777
7778         PR opt/7515
7779         * tree.c: Include target.h.
7780         (cp_cannot_inline_tree_fn): Don't auto-inline functions that
7781         don't bind locally.
7782         * Makefile.in (tree.o): Update.
7783
7784 2002-08-27  Mark Mitchell  <mark@codesourcery.com>
7785
7786         * class.c (layout_virtual_bases): Warn about bugs in G++ that
7787         result in incorrect object layouts.
7788         (layout_class_type): Likewise.
7789
7790 2002-08-24  Matt Austern  <austern@apple.com>
7791
7792         * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
7793         are allowable.
7794         (real_lvalue_p): Update caller.
7795         (lvalue_p): Ditto.
7796         (non_cast_lvalue_or_else): New.
7797         * tree.h: Declare it.
7798         * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
7799
7800 2002-08-22  Mark Mitchell  <mark@codesourcery.com>
7801
7802         * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
7803         and COND_EXPR specially; fix error message output.
7804
7805 2002-08-22  Jason Merrill  <jason@redhat.com>
7806
7807         * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
7808         * semantics.c (nullify_returns_r): Likewise.
7809
7810 2002-08-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
7811
7812         Fix PR/7621
7813         * typeck.c (finish_class_member_access_expr): Diagnose cases where
7814         name lookup finds nothing.
7815
7816 2002-08-15  Jason Merrill  <jason@redhat.com>
7817
7818         * semantics.c (finish_then_clause): Remove redundant assignment.
7819         (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
7820         extra binding level outside the if/switch statement.
7821         (finish_while_cond, finish_for_cond): Rewrite complex condition
7822         into the loop body.
7823
7824 2002-08-15  Alexandre Oliva  <aoliva@redhat.com>
7825
7826         * parse.y (sizeof, alignof, typeof): New non-terminals to
7827         increment skip_evaluation.  Replace terminals with them and
7828         decrement skip_evaluation at the end of rules using them.
7829         * decl2.c (mark_used): Don't assemble_external if
7830         skipping evaluation.
7831
7832 2002-08-15  Gabriel Dos Reis  <gdr@nerim.net>
7833
7834         Fix PR/7504
7835         * parse.y (parse_finish_call_expr): Handle incomplete
7836         type used to name a scope.
7837
7838 2002-08-15  Nathan Sidwell  <nathan@codesourcery.com>
7839
7840         PR c++/7598
7841         * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
7842         regression caused by my 2002-08-08 patch.
7843
7844 2002-08-13  Mark Mitchell  <mark@codesourcery.com>
7845
7846         * decl.c (pushdecl_class_level): Honor requests to bind names to
7847         OVERLOADs.
7848
7849 2002-08-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7850
7851         * decl2.c (build_call_from_tree): Fix uninitialized variable.
7852         * parse.y (parse_finish_call_expr): Likewise.
7853         * repo.c (old_args, old_dir, old_main): Const-ify.
7854
7855 2002-08-11  Gabriel Dos Reis  <gdr@nerim.net>
7856
7857         * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE
7858         DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
7859         * optimize.c (maybe_clone_body): Likewise.
7860         * pt.c (tsubst_enum): Likewise.
7861         (lookup_template_class): Likewise.
7862         * tree.c (cp_copy_res_decl_for_inlining): Likewise.
7863
7864 2002-08-10  Neil Booth  <neil@daikokuya.co.uk>
7865
7866         * lang-specs.h: Remove -ansi.
7867
7868 2002-08-10  Nathan Sidwell  <nathan@codesourcery.com>
7869
7870         * tree.c (maybe_dummy_object): Replace // with /* */
7871
7872 2002-08-09  Mark Mitchell  <mark@codesourcery.com>
7873
7874         * call.c (standard_conversion): Use build_ptrmem_type.
7875         * cp-tree.h (build_ptrmem_type): New function.
7876         (adjust_result_of_qualified_name_lookup): Likewise.
7877         * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
7878         static data members.
7879         (build_ptrmem_type): New function.
7880         (grokdeclarator): Do not use build_offset_type when encountering a
7881         qualified name.
7882         * parse.y (parse_finish_call_expr): Use
7883         adjust_result_of_qualified_name_lookup.
7884         * search.c (adjust_result_of_qualified_name_lookup): New function.
7885         * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
7886         accessing OFFSET_TYPEs directly.
7887
7888 2002-08-08  Mike Stump  <mrs@apple.com>
7889
7890         * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
7891         (type_decays_to): Likewise.
7892         * class.c (find_final_overrider): Likewise.
7893         (maybe_note_name_used_in_class): Likewise.
7894         * decl.c (current_tmpl_spec_kind): Likewise.
7895         (add_binding): Likewise.
7896         (push_class_binding): Likewise.
7897         (duplicate_decls): Likewise.
7898         (layout_var_decl): Likewise.
7899         (grokfndecl): Likewise.
7900         (grokdeclarator): Likewise.
7901         (check_default_argument): Likewise.
7902         * decl2.c (handle_class_head): Likewise.
7903         * error.c (dump_template_decl): Likewise.
7904         * init.c (build_offset_ref): Likewise.
7905         * pt.c (check_specialization_scope): Likewise.
7906         (determine_specialization): Likewise.
7907         (check_explicit_specialization): Likewise.
7908         (maybe_check_template_type): Likewise.
7909         (process_partial_specialization): Likewise.
7910         (check_default_tmpl_args): Likewise.
7911         (push_template_decl_real): Likewise.
7912         (convert_template_argument): Likewise.
7913         (try_class_unification): Likewise.
7914         (get_bindings_real): Likewise.
7915         (do_decl_instantiation): Likewise.
7916         * semantics.c (begin_function_definition): Likewise.
7917         (finish_member_declaration): Likewise.
7918         (check_multiple_declarators): Likewise.
7919         * typeck.c (comp_array_types): Likewise.
7920         (comptypes): Likewise.
7921         (expr_sizeof): Likewise.
7922         (build_binary_op): Likewise.
7923         (dubious_conversion_warnings): Likewise.
7924         (check_return_expr): Likewise.
7925
7926 2002-08-08  Mark Mitchell  <mark@codesourcery.com>
7927
7928         * typeck.c (build_class_member_access_expr): Do not return
7929         error_mark_node when no error has occurred.
7930
7931 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
7932
7933         * typeck.c (build_component_addr): Remove.
7934         (build_unary_op): Just check it's not a bitfield, and then build
7935         an ADDR_EXPR.
7936
7937 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
7938
7939         * class.c (convert_to_base): Correct check for error_mark_node.
7940         (create_vtable_ptr): Remove unused VFUNS_P parm.
7941
7942 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
7943
7944         * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
7945
7946 2002-08-07  Mark Mitchell  <mark@codesourcery.com>
7947
7948         Rework build_component_ref.
7949         * call.c (build_vfield_ref): Do not go through build_component_ref.
7950         (build_field_call): Use build_class_member_access_expr.
7951         (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
7952         (build_object_call): Likewise.
7953         * class.c (convert_to_base): New function.
7954         (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
7955         (instantiate_type): Handle BASELINKs.
7956         * cp-tree.def (BASELINK): New tree code.
7957         * cp-tree.h (BASELINK_P): Reimplement.
7958         (SET_BASELINK_P): Remove.
7959         (BASELINK_BINFO): Reimplement.
7960         (BASELINK_FUNCTIONS): Likewise.
7961         (BASELINK_ACCESS_BINFO): Likewise.
7962         (BASELINK_OPTYPE): Likewise.
7963         (convert_to_base): New function.
7964         (name_p): Likewise.
7965         (build_object_ref): Remove.
7966         (build_component_ref_1): Likewise.
7967         (build_component_ref): Likewise.
7968         (build_x_component_ref): Likewise.
7969         (build_class_member_access_expr): New function.
7970         (finish_class_member_access_expr): Likewise.
7971         (build_ptrmemfunc_access_expr): Likewise.
7972         * decl.c (grokdeclarator): Handle BASELINKs.
7973         * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
7974         finish_class_member_access_expr.
7975         (arg_assoc): Handle BASELINKs.
7976         (do_class_using_decl): Likewise.
7977         * error.c (dump_decl): Likewise.
7978         (dump_expr): Use build_ptrmemfunc_access_expr.
7979         * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
7980         destructors.
7981         (build_throw): Use BASELINK_FUNCTIONS.
7982         * init.c (perform_member_init): Use
7983         build_class_member_access_expr.
7984         (build_offset_ref): Handle BASELINKs.  Use
7985         build_class_member_access_expr.
7986         * method.c (hack_identifier): Likewise.
7987         * parse.y (do_id): Use BASELINK, not TREE_LIST.
7988         (primary): Remove uses of build_object_ref.
7989         * pt.c (lookup_template_function): Handle BASELINKs.
7990         (resolve_overloaded_unification): Likewise.
7991         * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
7992         (lookup_field): Use BASELINK, not TREE_LIST.
7993         (lookup_fnfiels): Likewise.
7994         (setup_class_bindings): Likewise.
7995         * semantics.c (finish_object_call_expr): Do not use
7996         build_method_call when we already know what function is being
7997         called.
7998         * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
7999         * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
8000         TREE_CHAIN.
8001         (name_p): New function.
8002         * typeck.c (build_object_ref): Remove.
8003         (build_component_ref_1): Likewise.
8004         (build_x_component_ref): Likewise.
8005         (build_class_member_access_expr): New function.
8006         (finish_class_member_access_expr): Likewise.
8007         (build_ptrmemfunc_access_expr): Likewise.
8008         (get_member_function_from_ptrfunc): Use
8009         build_ptrmemfunc_access_expr.
8010         (build_binary_op): Likewise.
8011         (build_unary_op): Likewise.
8012         (build_ptrmemfunc): Likewise.
8013         (pfn_from_ptrmemfunc): Likewise.
8014         * typeck2.c (build_m_component_ref): Adjust comment.
8015
8016 2002-08-07  Neil Booth  <neil@daikokuya.co.uk>
8017
8018         * Make-lang.in (CXX_C_OBJS): Update.
8019         * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
8020         * cp-tree.h (cxx_decode_option): Remove.
8021         * decl2.c (compare_options, lang_f_options, unsupported_options,
8022         cxx_decode_option): Remove.
8023
8024 2002-08-06  Gabriel Dos Reis  <gdr@nerim.net>
8025
8026         * typeck.c (build_x_unary_op): Handle pointer-to-member.
8027
8028 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
8029
8030         * class.c: Don't include obstack.h.
8031         (popclass):
8032         * decl2.c: Delete bogus comment.
8033         * error.c: Don't include obstack.h.
8034         * except.c: Likewise.
8035         (dump_type): Correct comment.
8036         * method.c: Don't include obstack.h.
8037         * tree.c: Likewise.
8038
8039 2002-08-04  Gabriel Dos Reis  <gdr@nerim.net>
8040
8041         Fix PR/2213
8042         * cvt.c (cp_convert_to_pointer): Reject conversions from integral
8043         expressions to pointer-to-data-member of pointer-to-member-functions.
8044
8045 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
8046
8047         * cvt.c (ocp_convert): Delete obsolete code.
8048         * parse.y (permanent_obstack): Delete declaration.
8049         * pt.c (permanent_obstack): Delete declaration.
8050         * repo.c (permanent_obstack): Delete declaration.
8051         (open_repo_file): Use xmalloc instead of permanent_obstack.
8052         (init_repo): Use xstrdup instead of permanent_obstack.
8053
8054 2002-08-04  Nathan Sidwell  <nathan@codesourcery.com>
8055
8056         * cp-tree.h (VF_DERIVED_VALUE): Remove.
8057         * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
8058
8059 2002-08-03  Nathan Sidwell  <nathan@codesourcery.com>
8060
8061         PR 7470.
8062         C++ ABI change - vfunc ordering.
8063         * class.c (add_virtual_function): Remove.
8064         (dfs_modify_all_vtables): Take list of all declared
8065         virtuals. Assign all that are not in primary base.
8066         (check_for_override): Adjust comments.
8067         (create_vtable_ptr): Take single list of virtuals. Build chain
8068         of declared virtuals here.
8069         (layout_class_type): Take single list of virtuals. Adjust.
8070         (finish_struct_1): Keep virtuals on single list. Adjust.
8071
8072 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
8073
8074         * init.c (build_member_call): Use build_new_method_call, not
8075         build_method_call.
8076
8077 2002-08-02  Krister Walfridsson  <cato@df.lth.se>
8078
8079         * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
8080
8081 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
8082
8083         * call.c (build_method_call): Issue a more helpful error message
8084         about ambiguous method names.
8085
8086 2002-08-02  Nathan Sidwell  <nathan@codesourcery.com>
8087
8088         * tree.c (build_shared_int_cst): Make cache file scope, and
8089         GTY it.
8090
8091 2002-08-02  Jason Merrill  <jason@redhat.com>
8092
8093         * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
8094         (cp_expr_size): New fn.
8095         * call.c (build_over_call): Lose empty class hackery.
8096         (convert_arg_to_ellipsis): Promote non-POD warning to error.
8097         * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
8098
8099         * semantics.c (expand_body): Do tree optimization in the function
8100         context, too.
8101
8102 2002-08-01  Neil Booth  <neil@daikokuya.co.uk>
8103
8104         * cp-tree.h: Move all warning and flag declarations to c-common.h.
8105         * decl.c: Move all warning and flag variables to c-common.c.
8106         * decl2.c: Move all warning and flag variables to c-common.c.
8107         * lex.c (flag_digraphs): Remove.
8108         (warn_traditional): Now in c-common.c.
8109
8110 2002-07-31  Mark Mitchell  <mark@codesourcery.com>
8111
8112         * call.c (build_field_call): Do not look up the field by name.
8113         (build_method_call): Simplify.
8114         (struct z_candidate): Add access_path and conversion_path.  Remove
8115         basetype_path.
8116         (convert_class_to_reference): Adjust use of
8117         add_function_candidate.
8118         (add_candidate): Add conversion_path argument.
8119         (add_function_candidate): Use it.
8120         (add_conv_dndidate): Likewise.
8121         (build_builtin_candidate): Likewise.
8122         (add_template_candidate_real): Add conversion_path argument.
8123         (add_template_conv_candidate): Likewise.
8124         (add_template_candidate): Likewise.
8125         (build_user_type_conversion_1): Use it.
8126         (build_new_function_call): Remove name lookup code.  Adjust use of
8127         add_template_candidate and add_function_candidate.
8128         (build_new_op): Likewise.
8129         (convert_like_real): Use build_special_member_call.
8130         (build_over_call): Use cand->conversion_path.
8131         (build_special_member_call): New method.
8132         (build_new_method_call): Remove name lookup code.
8133         * cp-tree.def (OFFSET_REF): Update documentation.
8134         (TEMPLATE_ID_EXPR): Likewise.
8135         * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
8136         (BASELINK_OPTYPE): Likewise.
8137         (build_new_method_call): Adjust prototype.
8138         (build_special_member_call): New method.
8139         (build_baselink): New method.
8140         (build_offset_ref_call_from_tree): Likewise.
8141         (build_call_from_tree): Likewise.
8142         (finish_qualified_call_expr): Remove.
8143         (finish_call_expr): Adjust prototype.
8144         (build_x_function_call): Remove.
8145         * cvt.c (ocp_convert): Use build_special_member_call.
8146         * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
8147         (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
8148         CALL_EXPR.
8149         (build_offset_ref_call_from_tree): New function.
8150         (build_call_from_tree): Likewise.
8151         * init.c (expand_cleanup): Use build_special_member_call.
8152         (expand_default_init): Likewise.
8153         (build_member_call): Use finish_call_expr.
8154         (build_new_1): Use build_special_member_call.
8155         (push_base_cleanups): Likewise.
8156         * method.c (do_build_assign_ref): Likewise.
8157         * parse.y (template_id): Do not pass a COMPONENT_REF to
8158         lookup_template_function.
8159         (primary): Use parse_finish_call_epxr, not finish_call_expr.
8160         (parse_finish_call_expr): New function.
8161         * pt.c (lookup_template_function): Add assertions.
8162         * search.c (lookup_base): Allow T to be a binfo.
8163         (build_baselink): New function.
8164         (lookup_member): Use it.
8165         * semantics.c (finish_call_expr): Do not do name lookup.
8166         (finish_object_call_expr): Remove #if 0'd code.
8167         (finish_qualified_call_expr): Remove.
8168         * typeck.c (build_x_function_call): Remove.
8169         (build_static_case): Use build_special_member_call.
8170         * typeck2.c (build_functional_cast): Likewise.
8171
8172 2002-07-30  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
8173
8174         * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
8175
8176 2002-07-30  Gabriel Dos Reis  <gdr@nerim.net>
8177
8178         * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
8179
8180 2002-07-30  Nathan Sidwell  <nathan@codesourcery.com>
8181
8182         * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
8183         documentation.
8184
8185 2002-07-29  Alan Modra  <amodra@bigpond.net.au>
8186
8187         * cp-tree.h: Comment typo fix.
8188
8189 2002-07-29  Richard Earnshaw  <rearnsha@arm.com>
8190
8191         * spew.c (space_for_token): Allocate zeroed memory for a new token
8192         chunk.
8193
8194 2002-07-27  Roger Sayle  <roger@eyesopen.com>
8195
8196         * decl.c (builtin_function_1): No need to explicitly mark
8197         BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
8198
8199 2002-07-27  Roger Sayle  <roger@eyesopen.com>
8200
8201         * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
8202
8203 2002-07-26  Jason Merrill  <jason@redhat.com>
8204
8205         * call.c (build_over_call): Likewise.
8206         (cp_convert_parm_for_inlining): New fn.
8207         (convert_for_arg_passing): New fn.
8208         (convert_default_arg, build_over_call): Use it.
8209         (type_passed_as): New fn.
8210         * pt.c (tsubst_decl): Use it.
8211         * decl2.c (cp_build_parm_decl): New fn.
8212         (build_artificial_parm): Use it.
8213         (start_static_storage_duration_function): Likewise.
8214         * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
8215         (grokparms): Don't mess with DECL_ARG_TYPE.
8216         * typeck.c (convert_arguments): Use convert_for_arg_passing.
8217         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
8218         Define.
8219         * cp-tree.h: Declare new fns.
8220
8221 2002-07-26  Neil Booth  <neil@daikokuya.co.uk>
8222
8223         * cp-tree.h (flag_operator_names): Remove.
8224         * decl2.c (flag_operator_names): Remove.
8225         (lang_f_options): Remove operator-names.
8226         * lex.c (D_OPNAME): Remove.
8227         (reswords): Remove operator names.
8228         (rid_to_yy): Remove operator names.
8229         (init_reswords): No need to handle D_OPNAME.
8230         * spew.c (read_process_identifier): There are no operator
8231         names.
8232
8233 2002-07-26  Jason Merrill  <jason@redhat.com>
8234
8235         * dump.c (cp_dump_tree): Call c_dump_tree.
8236         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
8237
8238 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
8239
8240         * error.c (print_whitespace): Remove.
8241         * g++spec.c (LIBUNWIND): Move.
8242         * mangle.c (mangled_position, write_signed_number): Remove.
8243
8244 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
8245
8246         * decl2.c (cxx_decode_option): Similarly.
8247
8248 2002-07-25  Gabriel Dos Reis  <gdr@nerim.net>
8249
8250         * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
8251         (cxx_sizeof_or_alignof_type): Take a third argument.
8252         (cxx_sizeof): Adjust definition.
8253         (cxx_alignof): Likewise.
8254         * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
8255         * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
8256         complaining.
8257         (c_sizeof_nowarn): Remove definition.
8258         (build_unary_op): Use cxx_sizeof_nowarn.
8259
8260 2002-07-24  Geoffrey Keating  <geoffk@redhat.com>
8261
8262         * tree.c (cp_build_qualified_type_real): When copying
8263         pointer-to-method types, unshare the record that holds
8264         the cached pointer-to-member-function type.
8265
8266 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
8267
8268         * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
8269
8270 2002-07-23  Gabriel Dos Reis  <gdr@nerim.net>
8271
8272         Fix PR/7363:
8273         * typeck.c (cxx_sizeof_or_alignof_type): New function.
8274         (c_sizeof): Remove definition.
8275         (expr_sizeof): Use cxx_sizeof.
8276         * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
8277         * decl.c (finish_destructor_body): Use cxx_sizeof.
8278         * semantics.c (finish_alignof): Likewise.
8279         (finish_alignof): Use cxx_alignof.
8280         * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
8281         (cxx_sizeof_or_alignof_type): Declare.
8282         (my_friendly_assert): Move to ../c-common.h.
8283
8284 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
8285
8286         * class.c, method.c, pt.c, search.c: Don't define obstack macros.
8287
8288 2002-07-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8289
8290         PR c++/7347, c++/7348
8291         * cp-tree.h (tsubst_flags_t): Add tf_parsing.
8292         * decl.c (make_typename_type): Use it.
8293         (make_unbound_class_template): Likewise.
8294         (lookup_name_real): Don't call type_access_control if scope is
8295         template parameter dependent.
8296         * parse.y (template_arg): Call make_unbound_class_template with
8297         tf_parsing set.
8298         (nest_name_specifier): Call make_typename_type with tf_parsing set.
8299         (typename_sub0): Likewise.
8300         (typename_sub1): Likewise.
8301         (instantiate_decl): Push class scope.
8302         * pt.c (regenerate_decl_from_template): Call pushclass and popclass
8303         for both static variable and member function template.
8304         (instantiate_decl) Call pushclass and popclass when tsubst'ing type
8305         and arguments.
8306         * search.c (type_access_control): Do type access for TEMPLATE_DECL
8307         too.
8308
8309 2002-07-20  Roger Sayle  <roger@eyesopen.com>
8310
8311         * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
8312         test by using positive_option.  Make whitespace consistent.
8313
8314 2002-07-20  Gabriel Dos Reis  <gdr@nerim.net>
8315
8316         * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
8317         members with 'locus'.  Adjust use throughout.
8318         (struct feed):  Likewise.
8319         (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
8320         Adjust use.
8321         (snarf_defarg): Use error(), not error_with_file_and_line().
8322
8323 2002-07-19  Chris Demetriou  <cgd@broadcom.com>
8324
8325         * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
8326         cpp_options is included.
8327
8328 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8329
8330         PR c++/2862, c++/2863
8331         * pt.c (determine_specialization): Compare the length of
8332         TYPE_ARG_TYPES.  Tidy.
8333
8334 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8335
8336         PR c++/3797
8337         * decl.c (duplicate_decls): Don't propagate inlining parameters from
8338         olddecl to newdecl when newdecl is a specialization of the
8339         instantiation olddecl.
8340
8341 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8342
8343         PR c++/4802, c++/5387
8344         * decl.c (make_typename_type): Use enforce_access.
8345
8346 2002-07-17  Scott Snyder <snyder@fnal.gov>
8347
8348         PR c++/7320
8349         * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
8350
8351 2002-07-12  Mark Mitchell  <mark@codesourcery.com>
8352
8353         * class.c (add_method): Correct handling of conversion operators.
8354
8355 2002-07-11  Mark Mitchell  <mark@codesourcery.com>
8356
8357         PR c++/7224
8358         * class.c (add_method): Simplify.
8359
8360 2002-07-11  Jason Merrill  <jason@redhat.com>
8361
8362         PR c++/7279
8363         * tree.c (cp_copy_res_decl_for_inlining): Also copy
8364         TREE_ADDRESSABLE.
8365
8366 2002-07-10  Graham Stott  <graham.stott@btinternet.com>
8367
8368         * pt.c (template_parm_this_level_p, push_template_decl_real):
8369         Pass depth as int pointer.
8370
8371 2002-07-11  Tim Josling  <tej@melbpc.org.au>
8372
8373         Remove front end hard coding from gengtype.c.
8374
8375         * config-lang.in (gtfiles): Add files needed for this front end.
8376
8377 2002-07-10  Mark Mitchell  <mark@codesourcery.com>
8378
8379         * cp-tree.h (unqualified_name_lookup_error): Declare it.
8380         (begin_function_definition): Adjust prototype.
8381         * lex.c (unqualified_name_lookup_error): New function, split out
8382         from ...
8383         (do_identifier): ... here.
8384         * parse.y (parse_begin_function_definition): New function.
8385         (fn.def1): Use it.
8386         * semantics.c (begin_function_definition): Accept decl-specifiers
8387         and attributes as separate parameters.
8388
8389 2002-07-10  Jason Merrill  <jason@redhat.com>
8390
8391         PR c++/6255
8392         * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
8393         modifying the old one.
8394
8395 2002-07-09  Mark Mitchell  <mark@codesourcery.com>
8396
8397         * cp-tree.h (constructor_name_p): Declare it.
8398         (check_template_template_default_arg): Likewise.
8399         * class.c (handle_using_decl): Use constructor_name_p.
8400         * decl.c (grokdeclarator): Likewise.
8401         * decl2.c (constructor_name_p): Define it.
8402         * init.c (build_member_call): Use constructor_name_p.
8403         * parse.y (template_parm): Use check_template_template_default_arg.
8404         * pt.c (check_explicit_specialization): Use constructor_name_p.
8405         * semantics.c (check_template_template_default_arg): New function.
8406
8407 2002-07-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8408
8409         * pt.c (can_complete_type_without_circularity): Add static to
8410         function definition.
8411
8412 2002-07-08  Mark Mitchell  <mark@codesourcery.com>
8413
8414         * cp-tree.h (have_extern_spec): Declare it
8415         * decl.c (have_extern_spec): Define it.
8416         (start_decl): Eliminate use of used_extern_spec.
8417         (start_function): Likewise.
8418         * parse.y (have_extern_spec): Remove declaration.
8419         (used_extern_spec): Likewise.
8420         (frob_specs): Eliminate use of used_extern_spec.
8421         (.hush_warning): Likewise.
8422
8423 2002-07-07  Mark Mitchell  <mark@codesourcery.com>
8424
8425         * Make-lang.in (cp/parse.o): Depend on decl.h.
8426         * cp-tree.h (do_decl_instantiation): Change prototype.
8427         * parse.y: Include decl.h.
8428         (parse_decl_instantiation): New function.
8429         (explicit_instantiation): Use it.
8430         * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
8431         and DECLSPECS.
8432
8433 2002-07-07  Roger Sayle  <roger@eyesopen.com>
8434
8435         * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
8436         constructor and destructor tests when passed a TEMPLATE_DECL.
8437
8438 2002-07-05  Jason Merrill  <jason@redhat.com>
8439
8440         * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
8441         pointers.
8442
8443         PR optimization/7145
8444         * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
8445
8446 2002-07-05  Nathan Sidwell  <nathan@codesourcery.com>
8447
8448         Repair damage on weak-impared targets caused by my previous patch.
8449         * cp-tree.h (import_export_tinfo): Add parameter.
8450         * decl2.c (import_export_tinfo): Add parameter, post adjust
8451         DECL_COMDAT.
8452         * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
8453         import_export_tinfo.
8454
8455 2002-07-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8456
8457         PR c++/6944
8458         * init.c (build_aggr_init): Remove qualifiers of init before calling
8459         build_vec_init.
8460         (build_vec_init): Flatten multi-dimensional array during cleanup.
8461         (build_vec_delete_1): Abort if the type of each element is array.
8462
8463 2002-07-03  Graham Stott  <graham.stott@btinternet.com>
8464
8465         * pt.c (instantiate_class_template): Fix typo.
8466
8467 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8468
8469         * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
8470         by CVS conflict in my last patch.
8471
8472 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8473
8474         PR c++/6716
8475         * pt.c (can_complete_type_without_circularity): New function.
8476         (instantiate_class_template): Use it.
8477         * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
8478         message due to incomplete fields.
8479
8480 2002-07-01  Mark Mitchell  <mark@codesourcery.com>
8481
8482         PR c++/7112
8483         * mangle.c (write_expression): Add mangling for sizeof when
8484         applied to a type.
8485         * operators.def: Remove stale comment.
8486
8487 2002-06-30  Nathan Sidwell  <nathan@codesourcery.com>
8488
8489         * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
8490         (CPTI_TYPE_INFO_PTR_TYPE): ... this.
8491         (tinfo_decl_type): Replace with ...
8492         (type_info_ptr_type): ... this.
8493         (import_export_tinfo): Declare.
8494         (tinfo_decl_p): Rename to ...
8495         (unemitted_tinfo_decl_p): ... this.
8496         * decl2.c (import_export_decl): Break out tinfo handling into ...
8497         (import_export_tinfo): ... here. New function.
8498         (finish_file): Adjust.
8499         * rtti.c (TINFO_REAL_NAME): New macro.
8500         (init_rtti_processing): Create the tinfo types.
8501         (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
8502         (get_tinfo_decl): Adjust.
8503         (get_tinfo_ptr): New function.
8504         (get_type_id): Use it.
8505         (tinfo_base_init): Create vtable decl here, if it doesn't exist.
8506         (ptr_initializer): Use get_tinfo_ptr.
8507         (ptm_initializer): Likewise.
8508         (synthesize_tinfo_var): Break into ...
8509         (get_pseudo_ti_init): ... this. Just create the initializer.
8510         (get_pseudo_ti_desc): .. and this.
8511         (create_real_tinfo_var): Remove.
8512         (create_pseudo_type_info): Don't create the vtable decl here.
8513         (get_vmi_pseudo_type_info): Remove.
8514         (create_tinfo_types): Adjust.
8515         (tinfo_decl_p): Rename to ...
8516         (unemitted_tinfo_decl_p): ... here. Adjust.
8517         (emit_tinfo_decl): Adjust. Create the initializer.
8518
8519 2002-06-27  Mark Mitchell  <mark@codesourcery.com>
8520
8521         PR c++/6695
8522         * pt.c (tsubst_friend_class): Substitute into the context of the
8523         friend before using it.
8524
8525 2002-06-26  Mark Mitchell  <mark@codesourcery.com>
8526
8527         * cp-tree.h (xref_tag): Change prototype.
8528         (handle_class_head): Likewise.
8529         (build_x_component_ref): Likewise.
8530         * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
8531         (xref_tag): Take attributes as a separate parameter.
8532         (xref_tag_from_type): Adjust call to xref_tag.
8533         * decl2.c (build_expr_from_tree): Adjust call to
8534         build_x_component_ref.
8535         (handle_class_head): Take attributes as a separate parameter.
8536         * parse.y (parse_xref_tag): New function.
8537         (parse_handle_class_head): Likewise.
8538         (primary): Use parse_xref_tag.
8539         (class_head_decl): Use parse_handle_class_head.
8540         (class_head_defn): Likewise.
8541         * rtti.c (init_rtti_processing): Adjust call to xref_tag.
8542         (build_dynamic_cast_1): Likewise.
8543         (create_pseudo_type_info): Likewise.
8544         (emit_support_tinfos): Likewise.
8545         * typeck.c (build_object_ref): Adjust call to
8546         build_x_component_ref.
8547         (build_x_component_ref): Remove protect parameter.
8548
8549 2002-06-25  Mark Mitchell  <mark@codesourcery.com>
8550
8551         * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
8552         * class.c (handle_using_decl): Likewise.
8553         (instantiate_type): Likewise.
8554         * cp-tree.h (BASELINK_FUNCTIONS): New macro.
8555         (xref_basetypes): Change prototype.
8556         (begin_mem_initializers): New function.
8557         (get_overloaded_fn): Likewise.
8558         * decl.c (xref_basetypes): Simplify.
8559         * error.c (dump_expr): Use BASELINK_FUNCTIONS.
8560         * init.c (build_offset_ref): Likewise.
8561         * parse.y (base_init): Use begin_mem_initializers().
8562         (structsp): Adjust call to xref_basetypes.
8563         * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
8564         (instantiate_class_template): Adjust call to xref_basetypes.
8565         * semantics.c (begin_mem_initializers): New function.
8566         * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
8567         (really_overlaoded_fn): Likewise.
8568         (get_overloaded_fn): New function.'
8569         (get_first_fn): USe BASELINK_FUNCTIONS.
8570
8571 2002-06-24  Mark Mitchell  <mark@codesourcery.com>
8572
8573         * cp-tree.h (SCALAR_TYPE_P): New macro.
8574         (check_for_out_of_scope_variable): New function.
8575         (at_class_scope_p): Likewise.
8576         (finish_fname): Likewise.
8577         * class.c (finish_struct): Use at_function_scope_p.
8578         * decl.c (check_for_out_of_scope_variable): New function, split
8579         out from do_identifier.
8580         (finish_enum): Use at_function_scope_p.
8581         * lex.c (do_identifier): Use check_for_out_of_scope_variable.
8582         * parse.y (VAR_FUNC_NAME): Give it <ttype>.  Use finish_fname.
8583         (primary): Use at_function_scope_p.
8584         * search.c (at_class_scope_p): New function.
8585         * semantics.c (finish_fname): Likewise.
8586         (check_multiple_declarators): Use at_function_scope_p.
8587
8588 2002-06-23  Mark Mitchell  <mark@codesourcery.com>
8589
8590         * parse.y (parse_scoped_id): New function.
8591         (primary): Use it.
8592         * cp-tree.h (do_scoped_id): Adjust declaration.
8593         * lex.c (do_scoped_id): Remove call to yylex.
8594         * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
8595         * typeck2.c (add_exception_specifier): Use tree_cons, rather than
8596         expanding it inline.
8597
8598 2002-06-23  Matt Thomas  <matt@3am-software.com>
8599
8600         * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
8601         "#if VMS_TARGET".
8602
8603 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8604
8605         * mangle.c (integer_type_codes): Const-ify.
8606
8607 2002-06-20  Richard Henderson  <rth@redhat.com>
8608
8609         PR c++/6747
8610         * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
8611         Call put_var_into_stack.
8612
8613 2002-06-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8614
8615         * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
8616         array size calculation.
8617
8618 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8619
8620         PR c++/6892
8621         * pt.c (tsubst_expr): Handle FILE_STMT.
8622
8623 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8624
8625         PR c++/6723
8626         * pt.c (lookup_template_class): Don't build complete argument of
8627         BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
8628         argument.
8629
8630 2002-06-19  Akim Demaille  <akim@epita.fr>
8631
8632         * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
8633         decl.h's TYPENAME.
8634         * spew.c, lex.c: Adjust.
8635         * parse.y (explicit_instantiation): Add empty action to override
8636         the default $$ = $1 where it introduces a type clash.
8637
8638 2002-06-14  Jason Merrill  <jason@redhat.com>
8639
8640         * semantics.c (begin_for_stmt): Push the 'for' scope before
8641         adding the FOR_STMT.
8642
8643         C++ ABI changes.
8644         * class.c (build_base_field): Set DECL_PACKED.
8645         (layout_class_type): Don't use tail padding of PODs.
8646         * mangle.c (write_unqualified_name): Fix template conversion op
8647         mangling.
8648
8649 2002-06-16  Richard Henderson  <rth@redhat.com>
8650
8651         PR opt/6793
8652         * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
8653         after template instantiation.
8654
8655 2002-06-16  Richard Henderson  <rth@redhat.com>
8656
8657         * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
8658
8659 2002-06-15  Gabriel Dos Reis  <gdr@codesourcery.com>
8660
8661         * cp-tree.h (compiler_error): Remove declaration.
8662         * lex.c (compiler_error): Remove definition.
8663
8664 2002-06-14  Steve Ellcey  <sje@cup.hp.com>
8665
8666         * g++spec.c (LIBUNWIND): New.
8667         (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
8668
8669 2002-06-13  Jessica Han  <jessica@cup.hp.com>
8670
8671         * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
8672         (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
8673         (build_vbase_offset_vtbl_entries): Likewise.
8674         * rtti.c (build_headof): Likewise.
8675         (get_tinfo_decl_dynamic): Likewise.
8676         (create_pseudo_type_info): Likewise.
8677
8678 2002-06-12  Stan Shebs  <shebs@apple.com>
8679
8680         * mpw-config.in: Remove file, no longer used.
8681         * mpw-make.sed: Ditto.
8682
8683 2002-06-07  Zack Weinberg  <zack@codesourcery.com>
8684
8685         * decl2.c: Update call to cpp_handle_option.
8686
8687 2002-06-07  H.J. Lu  (hjl@gnu.org)
8688
8689         * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
8690
8691 2002-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
8692
8693         * error.c (cp_error_at): Fix typo.
8694
8695 2002-06-04  Gabriel Dos Reis  <gdr@codesourcery.com>
8696
8697         * error.c (cp_diagnostic_starter): Adjust call.
8698         (maybe_print_instantiation_context): Change prototype to take a
8699         'diagnostic_info *'.
8700         (print_instantiation_full_context): Likewise.
8701         (print_instantiation_partial_context): Likewise.
8702         (cp_diagnostic_starter): Likewise.
8703         (cp_diagnostic_finalizer): Likewise.
8704         (cp_print_error_function): Likewise.
8705         (cp_printer): Take a secondary parameter as a 'text_info *'.
8706         Remove output_state savings.  Adjust calls.
8707
8708 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
8709
8710         * pt.c (inline_parm_levels): Mark for GC.
8711
8712         * mangle.c (start_mangling): Allocate G.substitutions here...
8713         (init_mangle): ... rather than here.
8714         (finish_mangling): Clear the varray pointer when done with it.
8715         * spew.c (yylexstring): Don't use VARRAY_FREE.
8716         * search.c (bfs_walk): Don't use VARRAY_FREE.
8717         * decl2.c (pending_statics): Use gengtype to mark.
8718         (deferred_fns): Likewise.
8719         (ssdf_decls): Likewise.
8720         (init_decl2): Delete.
8721         * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
8722         (cxx_init_decl_processing): Don't call init_decl2.
8723         (cxx_pop_function_context): Don't use VARRAY_FREE.
8724         * cp-tree.h (struct saved_scope): No need for special marking
8725         of varrays.
8726         (struct language_function): Likewise.
8727         (local_classes): Use gengtype to mark.
8728         (init_decl2): Delete prototype.
8729         * class.c (init_class_processing): Don't use
8730         ggc_add_tree_varray_root.
8731         (build_vtbl_initializer): Don't use VARRAY_FREE.
8732
8733         * decl.c (typename_compare): Don't use same_type_p.
8734
8735         * decl.c: Include hashtab.h instead of hash.h.
8736         (typename_hash): Update to use htab_h.
8737         (typename_compare): Likewise.
8738         (typename_htab): Use gengtype to mark.
8739         (build_typename_type): Update to use htab_h.
8740         * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
8741
8742         * Make-lang.in (gt-cp-tree.h): New rule.
8743         (cp/tree.o): Depend on gt-cp-tree.h.
8744         * config-lang.in (gtfiles): Add cp/tree.c.
8745         * tree.c: Include gt-cp-tree.h.
8746         (list_hash_table): Use gengtype to mark.
8747         (init_tree): Use gengtype to mark trees.
8748
8749         * Make-lang.in (cp/decl.o): Add debug.h dependency.
8750         * call.c (struct z_candidate): Use gengtype.
8751         (USER_CONV_CAND): Use WRAPPER_ZC.
8752         (convert_class_to_reference): Use build_zc_wrapper.
8753         (build_type_conversion_1): Likewise.
8754         (build_over_call): Use WRAPPER_ZC.
8755         (add_warning): Use build_zc_wrapper.
8756         * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
8757         * cp-tree.h (struct lang_identifier): Use gengtype.
8758         (struct template_parm_index_s): Likewise.
8759         (struct ptrmem_cst): Likewise.
8760         (struct tree_binding): Likewise.
8761         (struct tree_overload): Likewise.
8762         (struct tree_srcloc): Likewise.
8763         (struct tree_wrapper): Likewise.  Also modify to have a pointer
8764         to struct z_candidate rather than void.
8765         (enum cp_tree_node_structure_enum): New.
8766         (union lang_tree_node): New.
8767         (cxx_mark_tree): Delete prototype.
8768         (cp_tree_node_structure): New prototype.
8769         (build_ptr_wrapper): Delete prototype.
8770         (build_int_wrapper): Delete prototype.
8771         (build_zc_wrapper): New prototype.
8772         * decl.c: Include debug.h
8773         (cxx_mark_tree): Delete.
8774         (cp_tree_node_structure): New.
8775         * tree.c (build_ptr_wrapper): Delete.
8776         (build_int_wrapper): Delete.
8777         (build_zc_wrapper): New.
8778
8779         * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
8780         Correct typo.  Patch from k_fukui@highway.ne.jp.
8781
8782         * semantics.c (current_stmt_tree): Update for change to
8783         struct language_function.
8784         (finish_mem_initializers): Likewise.
8785         * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
8786         * cp-tree.h (struct language_function): Rename from
8787         cp_language_function.  Change all uses.
8788         (cp_function_chain): Don't need to cast.
8789
8790         * class.c (duplicate_tag_error): Reset discriminator.
8791         (check_bases_and_members): Update for data structure changes.
8792         * cp-tree.h (struct lang_id2): Use gengtype.
8793         (flagged_type_tree): Likewise.
8794         (SET_LANG_ID): Use GGC on struct lang_id2.
8795         (struct cp_language_function): Use gengtype.  Remove field
8796         'x_vcalls_possible_p'.
8797         (current_vcalls_possible_p): Delete.
8798         (struct lang_type_header): New.
8799         (struct lang_type_class): Rename from struct lang_type.  Include
8800         struct lang_type_header.
8801         (struct lang_type_ptrmem): New.
8802         (struct lang_type): New.
8803         (LANG_TYPE_CLASS_CHECK): New.  Use it in all the appropriate macros.
8804         (LANG_TYPE_PTRMEM_CHECK): New.  Use it in all the appropriate macros.
8805         (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
8806         (struct lang_decl_flags): Use gengtype.  Add discriminators.
8807         (struct lang_decl): Use gengtype.  Add and use discriminators.
8808         Update the macros that reference moved fields.
8809         (LANG_DECL_U2_CHECK): New function.  Use it when appropriate.
8810         (SET_DECL_THUNK_P): Set discriminator too.
8811         (clear_inline_text_obstack): Delete prototype.
8812         (finish_inline_definitions): Delete prototype.
8813         (mark_pending_inlines): Delete prototype.
8814         (lang_check_failed): New prototype.
8815         * decl.c (struct named_label_use_list): Use gengtype.
8816         (struct named_label_list): Likewise.
8817         (mark_binding_level): Delete.
8818         (mark_named_label_lists): Delete.
8819         (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
8820         (cxx_init_decl_processing): Use generated marker routine.
8821         (begin_destructor_body): Delete dead set to
8822         current_vcalls_possible_p.
8823         (mark_lang_function): Delete.
8824         (mark_cp_function_context): Delete.
8825         (lang_mark_tree): Use generated marker routines.
8826         * decl2.c (start_objects): Set discriminator when setting
8827         GLOBAL_INIT_PRIORITY.
8828         * lex.c (retrofit_lang_decl): Set discriminators.
8829         (copy_lang_type): Update for changes to lang_type structure.
8830         (cp_make_lang_type): Set discriminator.
8831         * parse.y: Use gengtype on YYLVAL.  Don't use dots in identifiers.
8832         * search.c: Include ggc.h.
8833         * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
8834         (finish_inline_definitions): Delete.
8835         * spew.c (struct token): Use gengtype.
8836         (struct token_chunk): New.
8837         (struct unparsed_text): Use gengtype.  Store tokens in chunks.
8838         (struct feed): Use gengtype.
8839         (feed_obstack): Delete.
8840         (feed): Mark as GC root.
8841         (pending_inlines): Mark as GC root.
8842         (pending_inlines_tail): Likewise.
8843         (processing_these_inlines): Likewise.
8844         (token_obstack): Make static.
8845         (first_token): Likewise.
8846         (init_spew): Don't initialize deleted things; use gengtype for roots.
8847         (clear_inline_text_obstack): Delete.
8848         (feed_input): Use GC for struct feed.  Update for changes to
8849         struct unparsed_text.
8850         (mark_pending_inlines): Delete.
8851         (next_token): Rename from add_token.  Change all callers.  Update
8852         for changes to struct unparsed_text.
8853         (space_for_token): New.
8854         (remove_last_token): New.
8855         (alloc_unparsed_text): New.
8856         (snarf_block): Take an unparsed_text.  Update for changes to struct
8857         unparsed_text.
8858         (snarf_method): Update for changes to struct unparsed_text.
8859         (snarf_defarg): Update for changes to struct unparsed_text.
8860         * tree.c (lang_check_failed): New.
8861
8862         * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
8863         gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
8864         (cp/spew.o): Add dependency on gt-<filename>.h.
8865         (cp/decl2.o): Add dependency on gt-<filename>.h.
8866         (cp/call.o): Add dependency on gt-<filename>.h.
8867         (cp/pt.o): Add dependency on gt-<filename>.h.
8868         (cp/repo.o): Add dependency on gt-<filename>.h.
8869         (cp/parse.o): Add dependency on gt-<filename>.h.
8870         * call.c: Use gengtype for roots.
8871         * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
8872         decl2.c parse.y pt.c repo.c spew.c.
8873         * cp-tree.h: Use gengtype for roots.
8874         (struct saved_scope): Use GGC, gengtype.
8875         (cp_parse_init): Delete prototype.
8876         (init_pt): Delete prototype.
8877         * decl.c: Use gengtype for roots.
8878         (mark_saved_scope): Delete.
8879         (cxx_init_decl_processing): Don't call deleted initilisation
8880         routines.
8881         (signed_size_zero_node): Delete, unused.
8882         * decl.h: Use gengtype for roots.
8883         * decl2.c: Use gengtype for roots.
8884         * lex.h: Use gengtype for roots.
8885         * parse.y: Use gengtype for roots.
8886         (cp_parse_init): Delete.
8887         * pt.c: Use gengtype for roots.
8888         (init_pt): Delete.
8889         * repo.c: Use gengtype for roots.
8890         * spew.c: Use gengtype for roots.
8891
8892         * Make-lang.in: Allow for filename changes.  Add gtype-cp.h.
8893         (cp/decl.o): Add dependency on gtype-cp.h.
8894         * decl.c: Remove use of add_deletable_root, use GTY marker instead.
8895         Include gtype-cp.h.  Allow for filename changes.
8896
8897         * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
8898         (cp/decl.o): Add cp/gt-decl.h dependency.
8899         * config-lang.in (gtfiles): New.
8900         * tree.h: Rename struct binding_level to struct cp_binding_level.
8901         * decl.c: Rename struct binding_level to struct cp_binding_level.
8902         Include cp/gt-decl.h.
8903         (struct cp_binding_level): Use gengtype.
8904         (make_binding_level): Use GGC on struct cp_binding_level.
8905         (mark_binding_level): Use gt_ggc_m_cp_binding_level.
8906         (cxx_init_decl_processing): Mark free_binding_level as
8907         deletable.
8908
8909         * decl.c (mark_cp_function_context): Update calling sequence.
8910
8911         * decl.c (start_function): Don't free 'struct
8912         cp_language_function'.
8913         (pop_cp_function_context): Likewise.
8914         (save_function_data): Allocate it using GC.
8915         * semantics.c (genrtl_start_function): Don't free 'struct
8916         cp_language_function'.
8917
8918 2002-05-31  Matthew Woodcraft  <mattheww@chiark.greenend.org.uk>
8919
8920         * lang-specs.h: Use cpp_debug_options.
8921
8922 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
8923
8924         * mangle.c, tree.c: Include real.h.
8925         * Make-lang.in: Update dependency lists.
8926
8927 2002-05-25  Neil Booth  <neil@daikokuya.demon.co.uk>
8928
8929         * lex.c: Don't include c-lex.h.
8930         * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
8931
8932 2002-05-23  Neil Booth  <neil@daikokuya.demon.co.uk>
8933
8934         * spew.c (yyungetc, snarf_block): Remove indent_level handling.
8935
8936 2002-05-22  Richard Henderson  <rth@redhat.com>
8937
8938         * decl.c (obscure_complex_init): Check for VAR_DECL
8939         before using DECL_THREAD_LOCAL.
8940
8941 2002-05-22  Richard Henderson  <rth@redhat.com>
8942
8943         * decl.c (check_tag_decl): Handle RID_THREAD.
8944         (obscure_complex_init): Reject run-time init of tls.
8945         (grokvardecl, grokdeclarator): Handle RID_THREAD.
8946         * lex.c (reswords): Add __thread.
8947         (rid_to_yy): Map RID_THREAD to SCSPEC.
8948
8949 2002-05-22  Neil Booth  <neil@daikokuya.demon.co.uk>
8950
8951         * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
8952         * cp-tree.h (cxx_post_options): Kill.
8953         * cp-lex.c (cxx_post_options): Kill.
8954
8955 2002-05-21  Richard Henderson  <rth@redhat.com>
8956
8957         * lex.c (rid_to_yy): Add RID_THREAD.
8958
8959 2002-05-21  Alexandre Oliva  <aoliva@redhat.com>
8960
8961         * init.c (build_vec_init): Test for trivial copy-assignment when
8962         copy-assigning arrays.
8963
8964 2002-05-20  Andreas Jaeger  <aj@suse.de>
8965
8966         * init.c (build_default_init): Remove unused variable.
8967
8968 2002-05-20  Alexandre Oliva  <aoliva@redhat.com>
8969
8970         * call.c (any_strictly_viable): New.
8971         (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
8972
8973 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8974
8975         * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
8976
8977 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8978
8979         PR c++/186, DR 259
8980         * pt.c (do_decl_instantiation): Don't complain explicit
8981         instantiation after explicit specialization.
8982         (do_type_instantiation): Likewise.
8983
8984 2002-05-19  Alexandre Oliva  <aoliva@redhat.com>
8985
8986         * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
8987         renamed from...
8988         (complete_type_or_else): ... this.  Redefined as macro.
8989         (cxx_incomplete_type_diagnostic): Declare.
8990         (cxx_incomplete_type_error): Define as macro.
8991         * init.c (build_delete): Warn about incomplete types other than
8992         void, and use the built-in operator delete for them.
8993         * typeck.c (complete_type_or_diagnostic): Renamed from
8994         complete_type_or_else.  Added warn_only argument, passed to...
8995         * typeck2.c (cxx_incomplete_type_diagnostic): ... this.  Print
8996         warnings or errors depending on new warn_only argument.  Renamed
8997         from...
8998         (cxx_incomplete_type_error): ... this.  New implementation in
8999         terms of cxx_incomplete_type_diagnostic.
9000
9001 2002-05-18  Jason Merrill  <jason@redhat.com>
9002
9003         PR c++/6611
9004         * decl2.c (import_export_decl): If we clear
9005         DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
9006
9007 2002-05-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9008
9009         PR c++/6620
9010         * pt.c (verify_class_unification): Don't check if PARM is template
9011         parameter dependent.  Simplify.
9012         (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
9013         parameter dependent expression.
9014
9015 2002-05-14  Jason Merrill  <jason@redhat.com>
9016
9017         * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
9018         Do set DECL_COMDAT.
9019         (synthesize_tinfo_var): Take the public decl.
9020         (create_real_tinfo_var): Likewise.  Check DECL_COMDAT.
9021         (emit_tinfo_decl): Adjust.  Call import_export_decl.
9022         * decl2.c (import_export_decl): Simplify tinfo decl handling.
9023
9024 2002-05-14  Alexandre Oliva  <aoliva@redhat.com>
9025
9026         * cp-tree.h (struct lang_type): Added non_zero_init.
9027         (CLASSTYPE_NON_ZERO_INIT_P): New macro.
9028         (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
9029         * class.c (check_field_decls): Test non_zero_init.
9030         * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
9031         zero-to-NULL conversions.
9032         * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
9033         type that needs zero-initialization without zeros.
9034         (check_initializer_decl): Compute zero-initializer for types
9035         that require a non-trivial one.
9036         * init.c (build_forced_zero_init): New function.
9037         (build_default_init): Use it.
9038         * tree.c (zero_init_p): New function.
9039         * typeck2.c (force_store_init_value): New function.
9040         (process_init_constructor): Create non-trivial zero-initializers
9041         for array members and class fields.
9042
9043 2002-05-14  Neil Booth  <neil@daikokuya.demon.co.uk>
9044
9045         * lang-specs.h: Remove redundant -lang-c++.
9046
9047 2002-05-13  Jason Merrill  <jason@redhat.com>
9048
9049         * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
9050         (fixed_type_or_null): See through reference vars.
9051         (build_base_path): Vtable contents are constant.
9052         * typeck.c (get_member_function_from_ptrfunc): Likewise.
9053
9054 2002-05-12  Jason Merrill  <jason@redhat.com>
9055
9056         * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
9057         structs are safe.
9058
9059 2002-05-09  Neil Booth  <neil@daikokuya.demon.co.uk>
9060
9061         * cp-tree.h (flag_ansi): Remove.
9062         * decl2.c (flag_ansi): Remove.
9063         (cxx_decode_option): Set flag_iso and flag_undef.
9064
9065 2002-05-09  Jason Merrill  <jason@redhat.com>
9066
9067         * typeck.c (get_member_function_from_ptrfunc): Reorganize.
9068         Use subtraction rather than a bitmask to get the index.
9069         * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
9070
9071         * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
9072
9073 2002-05-07  Neil Booth  <neil@daikokuya.demon.co.uk>
9074
9075         * Make-lang.in (decl2.o): Update.
9076         * cp-tree.h (warn_multichar): Remove.
9077         * decl2.c: Include c-common.h.
9078         (warn_multichar): Remove.
9079
9080 2002-05-03  Jason Merrill  <jason@redhat.com>
9081
9082         * tree.c (build_cplus_array_type): Only const and volatile get
9083         special handling.
9084
9085         * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
9086
9087 2002-04-30  Mark Mitchell  <mark@codesourcery.com>
9088
9089         ABI change, returning simple classes from functions.
9090         * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
9091         TYPE_HAS_TRIVIAL_INIT_REF is false or
9092         TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
9093
9094 2002-04-30  Jason Merrill  <jason@redhat.com>
9095
9096         PR debug/6436
9097         * decl.c (grokdeclarator): Don't override TYPE_NAME of an
9098         anonymous class with a typedef if there are attributes.
9099
9100 2002-04-29  Paul Eggert  <eggert@twinsun.com>
9101
9102         * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
9103
9104 2002-04-29  Jakub Jelinek  <jakub@redhat.com>
9105
9106         PR c++/6477
9107         * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
9108         non-NULL first.
9109
9110 2002-04-29  Mark Mitchell  <mark@codesourcery.com>
9111
9112         PR c++/6492
9113         * pt.c (tsubst_friend_class): If the friend has an explicit scope,
9114         enter that scope before name lookup.
9115
9116         PR c++/6486
9117         * method.c (do_build_copy_constructor): Avoid building
9118         cv-qualified reference types.
9119
9120 2002-04-29  Nathan Sidwell  <nathan@codesourcery.com>
9121
9122         PR c++/5719
9123         * decl.c (grok_op_properties): Assignment ops don't have to return
9124         by value. operator% should.
9125
9126 2002-04-28  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
9127
9128         PR c/6343
9129         * decl.c (duplicate_decls): Call merge_weak.
9130
9131 2002-04-26  Richard Henderson  <rth@redhat.com>
9132
9133         * parse.y (malloced_yyss, malloced_yyvs): New.
9134         (yyoverflow): Re-add.  Set them.
9135         (free_parser_stacks): New.
9136
9137 2002-04-26  Mark Mitchell  <mark@codesourcery.com>
9138
9139         PR c++/6497
9140         * method.c (do_build_assign_ref): Pass a derivation to
9141         build_method_call when calling base class assignment operators.
9142
9143 2002-04-26  Richard Henderson  <rth@redhat.com>
9144
9145         * parse.y (yyoverflow): Revert.
9146
9147 2002-04-26  Richard Henderson  <rth@redhat.com>
9148
9149         PR c/3581
9150         * parse.y (string): Remove.  Update all uses to use STRING
9151         instead, and not call combine_strings.
9152         * rtti.c (tinfo_name): Use fix_string_type.
9153         * semantics.c (finish_asm_stmt): Don't call combine_strings.
9154         * spew.c (yylexstring): New.
9155         (read_token): Use it.
9156
9157 2002-04-25  Richard Henderson  <rth@redhat.com>
9158
9159         PR c/2161
9160         * parse.y (yyoverflow): New.
9161
9162 2002-04-25  Jason Merrill  <jason@redhat.com>
9163
9164         PR c++/5607
9165         * search.c (check_final_overrider): No longer static.
9166         * class.c (update_vtable_entry_for_fn): Call it.
9167         * cp-tree.h: Adjust.
9168
9169 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
9170
9171         * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
9172         * cp-tree.h (cxx_set_yydebug): Die.
9173         * lex.c (YYDEBUG): Get from c-lex.h.
9174         (cxx_set_yydebug): Remove.
9175         * parse.y: Include c-lex.h.
9176         (YYDEBUG): Get from c-lex.h.
9177
9178 2002-04-24  Mark Mitchell  <mark@codesourcery.com>
9179
9180         PR c++/6438.
9181         * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
9182         void.
9183
9184 2002-04-24  Neil Booth  <neil@daikokuya.demon.co.uk>
9185
9186         * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
9187         LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
9188         Redefine.
9189         * cp-tree.h (cp_attribute_table): Rename.
9190         * decl.c (lang_attribute_table): Remove declaration.
9191         (cxx_init_decl_processing): Don't set it.
9192         * tree.c (cp_attribute_table): Rename.
9193
9194 2002-04-24  Jason Merrill  <jason@redhat.com>
9195
9196         PR c++/6331
9197         * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
9198         * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
9199         The pedwarn for array assignment is now unconditional.
9200         * tree.c (build_cplus_array_type_1): Still process simple array types
9201         normally in templates.
9202
9203         PR c++/6395
9204         * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
9205         stuff for comdats.
9206
9207 2002-04-23  Jakub Jelinek  <jakub@redhat.com>
9208
9209         * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
9210         node with attributes.
9211
9212 2002-2-23  David O'Brien  <obrien@FreeBSD.org>
9213
9214         * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
9215         Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
9216
9217 2002-04-23  Mark Mitchell  <mark@codesourcery.com>
9218
9219         PR c++/6256:
9220         * pt.c (tsubst_friend_class): Handle templates with explicit
9221         nested names.
9222
9223         PR c++/6331:
9224         * typeck.c (merge_types): Remember the cv-qualification of pointer
9225         types when merging them.
9226
9227 2002-04-20  Neil Booth  <neil@daikokuya.demon.co.uk>
9228
9229         * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
9230         LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
9231         * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
9232         cxx_mark_function_context): New.
9233         * decl.c (push_cp_function_context, pop_cp_function_context,
9234         mark_cp_function_context): Rename for consistency.
9235         (cxx_init_decl_processing): Don't set old hooks.
9236
9237 2002-04-19  Neil Booth  <neil@daikokuya.demon.co.uk>
9238
9239         * call.c (convert_type_from_ellipsis): Rename, update.
9240         * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
9241         * cp-tree.h (convert_type_from_ellipsis): Rename.
9242         * decl.c (cxx_init_decl_processing): Don't set hook.
9243
9244 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
9245
9246         * call.c (build_new_method_call): Update.
9247         * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
9248         * cp-tree.h (cxx_incomplete_type_error): New.
9249         * decl.c (grokdeclarator, grokparms): Update.
9250         * decl2.c (check_classfn): Update.
9251         * pt.c (tsubst): Update.
9252         * typeck.c (complete_type_or_else, expr_sizeof,
9253         decay_conversion): Update.
9254         * typeck2.c (incomplete_type_error): Rename.
9255         (add_exception_specifier): Update.
9256
9257 2002-04-18  Jason Merrill  <jason@redhat.com>
9258
9259         PR c++/5658
9260         * search.c (setup_class_bindings): A class template qualifies as a
9261         type binding.
9262
9263 2002-04-17  Jakub Jelinek  <jakub@redhat.com>
9264
9265         PR c++/6316
9266         * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
9267         before expanding.
9268
9269 2002-04-16  Mark Mitchell  <mark@codesourcery.com>
9270
9271         * init.c (begin_init_stmts): Remove commented out code.
9272         (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
9273         * semantics.c (begin_gobal_stmt_expr): Adjust call to
9274         expand_start_stmt_expr.
9275
9276 2002-04-15  Mark Mitchell  <mark@codesourcery.com>
9277
9278         * decl.c (register_dtor_fn): Pass the address of dso_handle, not
9279         dso_handle itself, to __cxa_atexit.
9280
9281 2002-04-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
9282
9283         * error.c (cxx_print_error_function): Adjust call to macros.
9284
9285 2002-04-14  Jakub Jelinek  <jakub@redhat.com>
9286
9287         * class.c (layout_virtual_bases): Do all dsize computation on trees.
9288
9289 2002-04-14  Jason Merrill  <jason@redhat.com>
9290
9291         * typeck.c (get_member_function_from_ptrfunc): Don't do
9292         gratuitious division and multiplication on
9293         ptrmemfunc_vbit_in_delta targets.
9294
9295 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
9296
9297         PR c++/5373.
9298         * semantics.c (finish_expr_stmt): Remember the type of the
9299         expression before any conversions are performed.
9300
9301 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
9302
9303         PR c++/5189.
9304         * call.c (add_template_candidate_real): Do not treat member
9305         templates as copy constructors.
9306
9307 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
9308
9309         * decl.c (duplicate_decls): Do not copy the RTL for a variable
9310         declaration if the old variable had an incomplete type and the new
9311         variable does not.
9312         (complete_vars): Do not call layout_decl for completed variables.
9313
9314 2002-04-12  Richard Sandiford  <rsandifo@redhat.com>
9315
9316         * decl.c (duplicate_decls): Don't try to unify an implicit typedef
9317         with an explicit one.
9318         (follow_tag_typedef): New.
9319         (lookup_tag): Use it to extract the tag of an explicit typedef.
9320         (xref_tag): Likewise.
9321
9322 2002-04-11  Andrew Haley  <aph@redhat.com>
9323
9324         * typeck.c (type_after_usual_arithmetic_conversions):
9325         If two types have the same variant, return immediately.
9326         When two floating-point operands are the same precision:
9327           convert to float if one of the operands is float;
9328           if neither operand is one of the standard types, return the type
9329           of the first operand.
9330
9331 2002-04-10  Nathan Sidwell  <nathan@codesourcery.com>
9332
9333         PR c++/5507
9334         * decl.c (make_typename_type): Remove implicit typenameness.
9335
9336 2002-04-09  Jason Merrill  <jason@redhat.com>
9337
9338         PR optimization/6189
9339         * semantics.c (genrtl_start_function): Don't free
9340         DECL_SAVED_FUNCTION_DATA for inline functions.
9341
9342         * init.c (build_member_call): For now, don't convert to
9343         intermediate base if it would cause an error.
9344
9345 2002-04-08  Paolo Carlini  <pcarlini@unitus.it>
9346
9347         * parse.y (namespace_qualifier, maybe_identifier,
9348         begin_explicit_instantiation, end_explicit_instantiation,
9349         apparent_template_type, .finish_template_type,
9350         do_id, maybe_init, defarg_again, component_decl_1):
9351         Add ending ';', in accordance with POSIX.
9352
9353 2002-04-06  Mark Mitchell  <mark@codesourcery.com>
9354
9355         PR c++/5571
9356         * class.c (layout_class_type): Remember incomplete static
9357         variables.
9358         (finish_struct_1): Call complete_vars, not
9359         hack_incomplete_structures.
9360         * cp-tree.h (hack_incomplete_structures): Rename to ...
9361         (complete_vars): ... this.
9362         (struct saved_scope): Remove incomplete.
9363         (namespace_scope_incomplete): Remove.
9364         * decl.c (struct binding_level): Remove incomplete.
9365         (incomplete_vars): New variable.
9366         (mark_binding_level): Don't mark incomplete.
9367         (print_binding_level): Don't print it.
9368         (mark_saved_scope): Don't mark incomplete.
9369         (pushdecl): Use maybe_register_incopmlete_var.
9370         (cxx_init_decl_processing): Register incomplete_vars for GC.
9371         (start_decl_1): Clarify error message.
9372         (hack_incomplete_vars): Remove.
9373         (maybe_register_incomplete_var): New function.
9374         (complete_vars): Likewise.
9375
9376 2002-04-06  Jason Merrill  <jason@redhat.com>
9377
9378         PR c++/4934
9379         * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
9380         set before checking it.
9381
9382         PR c++/525
9383         * init.c (build_member_call): Use build_scoped_ref.
9384         (resolve_offset_ref): Likewise.
9385         * call.c (build_scoped_method_call): Likewise.
9386         * tree.c (maybe_dummy_object): Kludge around current_class_type being
9387         wrong.
9388         * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
9389         * cp-tree.h: Adjust.
9390
9391         * init.c (push_base_cleanups): Just use build_scoped_method_call.
9392
9393         PR c++/6179
9394         * method.c (implicitly_declare_fn): Pass unqualified type to
9395         synthesize_exception_spec.
9396
9397 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
9398
9399         * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
9400         * cvt.c: Update comment.
9401         * init.c (expand_cleanup_for_base): Update.
9402         * semantics.c (finish_parenthesized_expr): Update.
9403         * typeck.c (cp_truthvalue_conversion): Update.
9404
9405 2002-04-04  Jason Merrill  <jason@redhat.com>
9406
9407         * semantics.c (finish_eh_cleanup): New fn.
9408         * cp-tree.h: Add prototype.
9409         * init.c (perform_member_init, expand_cleanup_for_base): Use
9410         finish_eh_cleanup.
9411         * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
9412         * cp-tree.h: Remove references.
9413         * decl.c (begin_constructor_body, end_constructor_body): Likewise.
9414         * dump.c (cp_dump_tree): Likewise.
9415         * pt.c (tsubst_expr): Likewise.
9416         * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
9417         (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
9418         * tree.c (cp_statement_code_p): Likewise.
9419
9420         * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
9421
9422         PR c++/5636
9423         * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
9424         cleanup for nrv.
9425
9426         PR c++/5104
9427         * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
9428         specifiers.
9429         [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
9430
9431 2002-04-03  Richard Henderson  <rth@redhat.com>
9432
9433         * cp-lang.c (cxx_warn_unused_global_decl): New.
9434         (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
9435
9436 2002-04-03  Neil Booth  <neil@daikokuya.demon.co.uk>
9437
9438         * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
9439         * tree.c (init_tree): Don't set hook.
9440
9441 2002-04-03  Roger Sayle  <roger@eyesopen.com>
9442
9443         PR c++/5998:
9444         * decl.c (duplicate_decls): Don't mess with assembler names when
9445         redeclaring builtin functions as static.
9446
9447 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
9448
9449         * call.c (build_addr_func): Update.
9450         * class.c (resolve_address_of_overloaded_function): Update.
9451         * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
9452         * cp-tree.h (cxx_mark_addressable): New.
9453         * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
9454         * decl2.c (build_cleanup): Update.
9455         * except.c (build_throw): Update.
9456         * init.c (resolve_offset_ref): Update.
9457         * pt.c (convert_nontype_argument): Update.
9458         * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
9459         * typeck.c (decay_conversion, build_array_ref, build_unary_op,
9460         unary_complex_lvalue): Update.
9461         (mark_addressable): Rename.
9462
9463 2002-04-01  Roger Sayle  <roger@eyesopen.com>
9464
9465         PR c++/5998:
9466         * decl.c (duplicate_decls):  Overwrite the RTL when (and only
9467         when) overwriting a built-in function.  Don't use COPY_DECL_RTL,
9468         but follow the SET_DECL_RTL idiom used elsewhere in the function.
9469
9470 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
9471
9472         * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
9473         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
9474         * decl.c (grokdeclarator): Update.
9475         * mangle.c (write_integer_cst): Update.
9476         * typeck.c (build_binary_op): Update.
9477
9478 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
9479
9480         * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
9481         * lex.c (cxx_init): Don't set hook.
9482
9483 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
9484
9485         * Make-lang.in (error.o): Update.
9486         * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
9487         * cp-tree.h (struct diagnostic_context): Predeclare.
9488         (cxx_print_error_function): New.
9489         * error.c: Include langhooks-def.h.
9490         (lang_print_error_function): Rename.  Update.
9491         (init_error): Don't set hook.
9492
9493 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
9494
9495         * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
9496         Redefine.
9497         * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
9498         * decl.c (finish_enum): Similarly.
9499         * error.c (dump_type): Similarly.
9500         * lex.c (cxx_init): Similarly.
9501         * mangle.c (write_builtin_type): Similarly.
9502         * typeck.c (comptypes): Similarly.
9503
9504 2002-03-28  Roger Sayle  <roger@eyesopen.com>
9505
9506         PR c++/5998:
9507         * decl.c (cxx_init_decl_processing): Re-enable built-in functions
9508         in the g++ front-end.
9509         (duplicate_decl): Allow redefinition of anticipated built-ins.
9510         Fix inlining problem by over-writing the old DECL_RTL.
9511         (lookup_namespace_name): Fail to find an identifier in the
9512         specified namespace if its still anticipated.
9513         (builtin_function_1): New function split out from builtin_function
9514         to create a builtin in the current namespace with given context.
9515         (builtin_function): Call builtin_function_1 to define the
9516         appropriate builtins in both the std and global namespaces.
9517         (select_decl): Don't test for anticipated decls here.
9518         (unqualified_namespace_lookup): Instead ignore them whilst
9519         searching through scopes and namespaces.
9520         * decl2.c (do_nonmember_using_decl): If a using declaration
9521         specifies an anticipated built-in function, mark it as no longer
9522         anticipated in that scope.
9523         (ambiguous_decl):  Avoid resolving to an anticipated decl.
9524         * lex.c (do_scoped_id): Fail to find an identifier in the global
9525         namespace if its still anticipated.
9526
9527 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
9528
9529         * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
9530         * cp-tree.h (cp_make_lang_type): Rename.
9531         * lex.c (cp_make_lang_type): Rename.
9532         (make_aggr_type): Update.
9533         * tree.c (init_tree): Don't set make_lang_type_fn.
9534
9535 2002-03-29  Jakub Jelinek  <jakub@redhat.com>
9536
9537         PR c++/6073
9538         * class.c (finish_struct_1): Update static field's DECL_MODE even
9539         if its type is a variant of t.
9540
9541 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
9542
9543         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
9544         * cp-tree.h (cxx_insert_default_attributes): New.
9545         * decl.c (insert_default_attributes): Rename.
9546
9547 2002-03-27  Mark Mitchell  <mark@codesourcery.com>
9548
9549         PR c++/4884
9550         * call.c (build_op_delete_call): Allow for the fact the placement
9551         may be a COMPOUND_EXPR.
9552
9553 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
9554
9555         * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
9556         * cp-tree.h (init_cplus_expand): Remove.
9557         (cxx_expand_expr): New.
9558         * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
9559         fix prototype.
9560         (init_cplus_expand): Remove.
9561         * lex.c (cxx_init): Don't call init_cplus_expand.
9562
9563 2002-03-26  Mark Mitchell  <mark@codesourcery.com>
9564
9565         PR c++/4884.
9566         * init.c (build_new_1): Allow for the fact the result of
9567         build_function_call may be a COMPOUND_EXPR.
9568
9569 2002-03-26  Nathan Sidwell  <nathan@codesourcery.com>
9570
9571         PR c++/5682
9572         * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
9573         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
9574         (dfs_skip_nonprimary_vbases_markedp): Remove.
9575         * search.c (get_shared_vbase_if_not_primary): Remove.
9576         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
9577         (dfs_skip_nonprimary_vbases_markedp): Remove.
9578         (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
9579         (dfs_marked_real_bases_queue_p): Likewise.
9580
9581 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
9582
9583         * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
9584         * cp-tree.h (cxx_mark_tree): New.
9585         * decl.c (lang_mark_tree): Rename cxx_mark_tree.
9586
9587 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
9588
9589         * cp-tree.h (cxx_maybe_build_cleanup): New.
9590         * decl.c (destroy_local_var, hack_incomplete_structures): Update.
9591         (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
9592         * tree.c (build_target_expr): Update.
9593         * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
9594
9595 2002-03-24  Neil Booth  <neil@daikokuya.demon.co.uk>
9596
9597         * decl2.c (cxx_decode_option): Handle -E.
9598         * lang-specs.h (default_compilers): Preprocess with cc1plus.
9599         * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
9600
9601 2002-03-23  Jakub Jelinek  <jakub@redhat.com>
9602
9603         PR c++/6037
9604         * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
9605
9606 2002-03-23  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
9607
9608         * error.c (dump_type): Be careful about implicit typenames.
9609
9610 2002-03-21  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
9611
9612         PR C++/3656
9613         * semantics.c (finish_base_specifier): Handle erronous base
9614         classes.
9615
9616 2002-03-22  Zack Weinberg  <zack@codesourcery.com>
9617
9618         * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
9619         REAL_IS_NOT_DOUBLE.
9620
9621 2002-03-22  Jeff Knaggs  <jknaggs@redhat.com>
9622
9623         * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
9624         an index into the vtable_entry array regardless of
9625         TARGET_PTRMEMFUNC_VBIT_LOCATION.
9626
9627 2002-03-21  Aldy Hernandez  <aldyh@redhat.com>
9628
9629         * tree.c (cp_cannot_inline_tree_fn): Same.
9630
9631 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
9632
9633         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
9634         insert_block, getdecls, global_bindings_p): New.
9635
9636 2002-03-20  Nathan Sidwell  <nathan@codesourcery.com>
9637
9638         PR c++/4361
9639         * mangle.c (struct globals) Add internal_mangling_p member.
9640         (write_template_param): Do internal mangling, if needed.
9641         (mangle_conv_op_name_for_type): Request internal mangling.
9642
9643 2002-03-20  Jason Merrill  <jason@redhat.com>
9644
9645         PR c++/2136
9646         * init.c (build_delete): Check access for a member op delete here.
9647         * decl2.c (delete_sanity): Not here.
9648
9649 2002-03-19  Jason Merrill  <jason@redhat.com>
9650
9651         PR c++/5118
9652         * class.c (get_vfield_name): Use the constructor_name.
9653
9654 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
9655
9656         * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
9657         * cp-tree.h (lang_printable_name): Rename.
9658         * error.c (lang_decl_name): Use new hook.
9659         * lex.c (cxx_init): Remove old hook.
9660         * pt.c (tsubst_decl): Use new hook.
9661         * tree.c (lang_printable_name): Rename.
9662
9663 2002-03-18  Eric Botcazou  <ebotcazou@multimania.com>
9664
9665         PR c++/3882
9666         * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
9667         (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
9668         only after recording the declaration.
9669
9670 2002-03-18  Jason Merrill  <jason@redhat.com>
9671
9672         PR c++/2039
9673         * init.c (resolve_offset_ref): Hand off to build_component_ref.
9674
9675         PR c++/4222, c++/5995
9676         * call.c (build_over_call): Fix empty class logic.
9677
9678         PR c++/3870
9679         * cp-tree.h (struct saved_scope): Add last_parms field.
9680         * decl.c (maybe_push_to_top_level): Save last_function_parms.
9681         (pop_from_top_level): Restore it.
9682
9683         PR c++/4377
9684         * mangle.c (write_expression): Strip NOP_EXPRs sooner.  Also strip
9685         NON_LVALUE_EXPRs.
9686
9687         PR c++/4003
9688         * pt.c (tsubst_friend_function): Use decl_namespace_context.
9689
9690         PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
9691         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
9692         type with a nontrivial destructor.
9693
9694 2002-03-17  Jason Merrill  <jason@redhat.com>
9695
9696         PR c++/4460
9697         * class.c (build_base_path): Virtual base layout is fixed in
9698         in-charge [cd]tors.
9699
9700 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
9701
9702         * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
9703         * parse.y (yyparse): Remove macro.
9704
9705 2002-03-17  Jason Merrill  <jason@redhat.com>
9706
9707         PR c++/5757
9708         * init.c (build_new_1): Pass the right pointer to op delete.
9709
9710 2002-03-16  Nathan Sidwell  <nathan@codesourcery.com>
9711
9712         PR c++/4361
9713         * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
9714         conversion operators go.
9715         (struct lang_decl_flags): Add template_conv_p and unused
9716         bitfields.
9717         (DECL_TEMPLATE_CONV_FN_P): New macro.
9718         * call.c (build_user_type_conversion_1): Don't check second type
9719         conversion of overload set first.
9720         * class.c (add_method): Make sure templated conversion operators
9721         all end up on slot 2.
9722         * lex.c (do_identifier): A conversion operator token might be
9723         satisfied by a templated conversion operator.
9724         * pt.c (check_explicit_specialization): Use
9725         CLASSTYPE_FIRST_CONVERSION_SLOT.
9726         (template_parm_this_level_p): New function.
9727         (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
9728         * search.c (lookup_fnfields_1): Template conversions will be on
9729         the first slot.
9730         * typeck.c (build_component_ref): Preserve the type of an
9731         conversion operator name on the overload type.
9732         (build_x_function_call): Retrieve the conversion operator name.
9733
9734 2002-03-15  Richard Henderson  <rth@redhat.com>
9735
9736         * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
9737
9738 2002-03-15  Mark Mitchell  <mark@codesourcery.com>
9739
9740         * cp-tree.h (CLEANUP_DECL): Remove.
9741         (CLEANUP_EXPR): Likewise.
9742         * decl.c (destroy_local_var): Simplify.
9743         (maybe_build_cleanup): Tidy.
9744         * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
9745         * semantics.c (cp_expand_stmt): Likewise.
9746         * cp/tree.c (cp_statement_code_p): Likewise.
9747
9748 2002-03-15  Jason Merrill  <jason@redhat.com>
9749
9750         PR c++/5857
9751         * decl.c (duplicate_decls): Use merge_types instead of common_type.
9752         * typeck.c (common_type): Just hand off to
9753         type_after_usual_arithmetic_conversions and
9754         composite_pointer_type.
9755         (merge_types): New fn.
9756         (commonparms): Use it instead of common_type.
9757         (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
9758         (composite_pointer_type): Also handle attributes.
9759         * cp-tree.h: Declare merge_types.
9760
9761         * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
9762         variables.
9763         * decl2.c (maybe_make_one_only): Also mark the decl as needed.
9764
9765 2002-03-14  Richard Henderson  <rth@redhat.com>
9766
9767         * decl.c: Include c-pragma.h.
9768         (start_decl, start_function): Invoke maybe_apply_pragma_weak.
9769         * Make-lang.in: Update dependencies.
9770
9771 2002-03-14  Jakub Jelinek  <jakub@redhat.com>
9772
9773         PR c++/5908
9774         * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
9775         * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
9776
9777 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
9778
9779         * mangle.c (write_builtin_type): Handle 128-bit integers even if
9780         they are not a standard integer type.
9781
9782 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
9783
9784         * cp-tree.h (init_init_processing): Remove declaration.
9785         * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
9786         * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
9787
9788 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9789
9790         * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
9791         Define.
9792         * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
9793         tree_code_length.
9794         * lex.c (cplus_tree_code_type, cplus_tree_code_length,
9795         cplus_tree_code_name): Delete.
9796         (cxx_init): Don't call add_c_tree_codes, instead set
9797         lang_unsafe_for_reeval.  Don't try to copy into the various
9798         tree_code arrays.
9799
9800 2002-03-12  Nathan Sidwell  <nathan@codesourcery.com>
9801
9802         PR c++/5659
9803         * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
9804         * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
9805         definitions.
9806
9807 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
9808
9809         Revert 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>,
9810         DR209 is now not a defect.
9811         * cp-tree.h (skip_type_access_control): Remove.
9812         * decl.c (grokdeclarator): Do type access control for friend
9813         declarations.
9814         * semantics.c (decl_type_access_control): Don't reset
9815         current_type_lookups.
9816         (save_type_access_control): Always save the lookups.
9817         (skip_type_access_control): Remove.
9818         (finish_class_definition): Don't change type_lookups.
9819
9820 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
9821
9822         Revert 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>,
9823         It is incorrect.
9824         * typeck.c (build_static_cast): Compare non-qualified types
9825         with pointer to member conversions.
9826
9827 2002-03-11  Dan Nicolaescu  <dann@ics.uci.edu>
9828             Daniel Berlin  <dan@dberlin.org>
9829
9830         * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
9831         (cxx_get_alias_set): Use it.
9832
9833 2002-03-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9834
9835         * cp-tree.h (stabilize_expr): Prototype.
9836
9837 2002-03-08  Craig Rodrigues  <rodrigc@gcc.gnu.org>
9838
9839         * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
9840         conditional return void.
9841
9842 2002-03-08  Neil Booth  <neil@daikokuya.demon.co.uk>
9843
9844         * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
9845         * cp-tree.h (cxx_unsave): New.
9846         * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
9847         (init_tree): Update.
9848
9849 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9850
9851         * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
9852         explicit sizeof/sizeof.
9853         * decl2.c (cxx_decode_option): Likewise.
9854         * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
9855
9856 2002-03-02  Nathan Sidwell  <nathan@codesourcery.com>
9857
9858         PR c++/775
9859         * decl.c (lookup_tag): Only reject enum/class mismatch, not
9860         class/union mismatch.
9861         * parse.y (check_class_key): New function.
9862         (structsp): Call it.
9863
9864 2002-03-01  Michael Matz  <matz@suse.de>
9865
9866         * typeck.c (cp_pointer_int_sum): Complete inner type which is
9867         used later by size_in_bytes().
9868
9869 2002-03-01  Phil Edwards  <pme@gcc.gnu.org>
9870
9871         * cp-tree.h:  Require __GNUC__ to be #defined.
9872         (build_init):  Add missing prototype.
9873
9874 2002-03-01  Jason Merrill  <jason@redhat.com>
9875
9876         * except.c: Don't include decl.h or obstack.h.  Do include
9877         tree-inline.h.
9878         (build_throw): Destroy temporaries from the thrown
9879         expression before calling __cxa_throw.  Construct a thrown
9880         temporary directly into the exception object.
9881         (stabilize_throw_expr): New function.
9882         (wrap_cleanups_r): New function.
9883         * tree.c (stabilize_expr): New function.
9884         * init.c (build_init): New function.
9885         * Make-lang.in (cp/except.o): Adjust .h deps.
9886
9887 2002-02-28  Jason Merrill  <jason@redhat.com>
9888
9889         * search.c (lookup_base_r): Don't clear is_non_public just because
9890         we found a friendly scope.
9891
9892         * decl.c (finish_function): Only warn about missing return
9893         statement with -Wreturn-type.
9894
9895 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
9896
9897         * class.c (build_clone): Update.
9898         * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
9899         * cp-tree.h (cxx_dup_lang_specific_decl): New.
9900         * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
9901         (copy_decl): Update.
9902         * method.c (make_thunk): Update.
9903
9904 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
9905
9906         * decl2.c: Delete traditional-mode-related code copied from
9907         the C front end but not used, or used only to permit the
9908         compiler to link.
9909
9910 2002-02-24 Craig Rodrigues  <rodrigc@gcc.gnu.org>
9911
9912         PR c++/4093
9913         * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
9914         to void.
9915
9916 2002-02-22  Jakub Jelinek  <jakub@redhat.com>
9917
9918         PR other/5746
9919         * semantics.c (finish_switch_cond): Don't call get_unwidened
9920         if error_mark_node.
9921
9922 2002-02-22  Nathan Sidwell  <nathan@codesourcery.com>
9923
9924         PR c++/2645, DR 295
9925         * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
9926         tf_keep_type_decl.
9927         (make_typename_type): Use tsubst_flags_t.
9928         * decl.c (make_typename_type): Adjust. Return non-artificial
9929         TYPE_DECLs, if required.
9930         (grokdeclarator): Simplify CVR qualification handling. Allow bad
9931         qualifiers on typedef types.
9932         * decl2.c (handle_class_head): Adjust make_typename_type call.
9933         * parse.y (nested_name_specifier): Likewise.
9934         (typename_sub0): Likewise.
9935         (typename_sub1): Likewise.
9936         * pt.c (convert_template_argument): Adjust make_typename_type
9937         return value.
9938         (tsubst): Adjust cp_build_qualified_type_real calls.
9939         (check_cv_quals_for_unify): Cope with allowing bad qualifications
9940         on template type parms.
9941         (instantiate_decl): Recheck substitutions to give warnings on bad
9942         qualifications.
9943         * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
9944
9945 2002-02-21  Aldy Hernandez  <aldyh@redhat.com>
9946
9947         * cp/decl.c (duplicate_decls): Merge always_inline attribute.
9948
9949         * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
9950         unless DECL_ALWAYS_INLINE.
9951
9952 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
9953
9954         * typeck.c (cp_pointer_int_sum): Renamed from
9955         pointer_int_sum, call pointer_int_sum.
9956
9957 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
9958
9959         * decl.c (duplicate_decls): Return 0 if issued error about
9960         redeclaration.
9961
9962 2002-02-19  Jason Merrill  <jason@redhat.com>
9963
9964         ABI change: Mangle `void (A::*)() const' as
9965         M1AKFvvE, not MK1AFvvE.
9966         * mangle.c (write_function_type): Write cv-quals for member
9967         function type here.
9968         (write_pointer_to_member_type): Not here.
9969
9970 2002-02-18  Jason Merrill  <jason@redhat.com>
9971
9972         * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
9973         (do_decl_instantiation): Likewise.
9974
9975 2002-02-17  Craig Rodrigues  <rodrigc@gcc.gnu.org>
9976
9977         PR c++/5685
9978         * decl.c (duplicate_decls): Make warning unconditional
9979         if duplicate default argument declarations are present.
9980
9981 2002-02-17  Jakub Jelinek  <jakub@redhat.com>
9982
9983         * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
9984         shortening.
9985
9986 2002-02-15  Nathan Sidwell  <nathan@codesourcery.com>
9987
9988         * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
9989         remove incorrect comment. Move #if 0'd code to common path. Use
9990         IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
9991
9992 2002-02-13  Jason Merrill  <jason@redhat.com>
9993
9994         * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
9995         (finish_function): Don't warn if current_function_returns_null.
9996
9997         * typeck2.c (digest_init): Do handle values of vector type.
9998
9999         * typeck2.c (digest_init, process_init_constructor): Treat vectors
10000         like arrays.
10001
10002 2002-02-11  Jason Merrill  <jason@redhat.com>
10003
10004         * parse.y (reserved_declspecs): Don't handle attributes.
10005         (reserved_typespecquals): Handle them here.
10006         * Make-lang.in (parse.c): Adjust expected conflicts.
10007
10008 2002-02-08  Jakub Jelinek  <jakub@redhat.com>
10009
10010         * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
10011         instead of compstmt.
10012         (compstmt_or_stmtexpr): Renamed from compstmt.
10013         (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
10014
10015 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
10016
10017         Rename instantiate_type_flags to tsubst_flags_t & expand use.
10018         * cp-tree.h (instantiate_type_flags): Rename to ...
10019         (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
10020         add tf_warning flag.
10021         (instantiate_type): Adjust prototype.
10022         (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
10023         do_type_instantiation, cp_build_qualified_type_real): Likewise.
10024         cp_build_qualified_type: Adjust.
10025         * class.c (instantiate_type): Adjust parameter. Rename itf_* to
10026         tf_*.
10027         * call.c (standard_conversion): Rename itf_* to tf_*.
10028         (reference_binding): Likewise.
10029         (convert_like_real): Likewise.
10030         * cvt.c (cp_convert_to_pointer): Likewise.
10031         (convert_to_reference): Likewise.
10032         * decl.c (lookup_namespace_name): Use tf_* flags.
10033         (make_typename_type): Likewise.
10034         (grokdeclarator): Likewise.
10035         * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
10036         (coerce_template_template_parms, convert_template_argument,
10037         coerce_template_parms, maybe_get_template_decl_from_type_decl,
10038         lookup_template_class, tsubst_friend_function, tsubst_friend_class,
10039         instantiate_class_template, tsubst_template_arg_vector,
10040         tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
10041         tsubst_decl, tsubst_arg_types, tsubst_function_type,
10042         tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
10043         instantiate_template, fn_type_unification,
10044         resolve_overloaded_unification, verify_class_unification,
10045         unify, get_bindings_real, do_type_instantiation,
10046         regenerate_decl_from_template, instantiate_decl,
10047         tsubst_initializer_list, tsubst_enum,
10048         get_mostly_instantiated_function_type,
10049         invalid_nontype_parm_type_p): Likewise.
10050         * tree.c (cp_build_qualified_type_real): Likewise.
10051         * typeck.c (build_binary_op): Rename itf_* to tf_*.
10052         (build_ptrmemfunc): Likewise.
10053         (convert_for_assignment): Likewise.
10054
10055 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
10056
10057         PR c++/109
10058         * decl.c (grokdeclarator): Allow friend declarations from
10059         dependent types.
10060         * decl2.c (handle_class_head): Don't push into template parm contexts.
10061         * pt.c (push_template_decl_real): Template parm contexts are never
10062         being defined.
10063
10064 2002-02-05  Alexandre Oliva  <aoliva@redhat.com>
10065
10066         * class.c: Include target.h.
10067         (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
10068         BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
10069         bit-field layout.
10070         * Make-lang.in: Adjust deps.
10071
10072 2002-02-05  Jason Merrill  <jason@redhat.com>
10073
10074         * error.c (dump_type): Be more helpful about VECTOR_TYPE.
10075
10076 2002-02-04  Jakub Jelinek  <jakub@redhat.com>
10077
10078         * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
10079         (finish_switch_cond): Set SWITCH_TYPE.
10080
10081 2002-02-04  Richard Henderson  <rth@redhat.com>
10082
10083         * method.c (use_thunk): Always initialize the block tree.  Reindent.
10084         * semantics.c (expand_body): Emit thunks after function, not before.
10085
10086 2002-02-04  Jason Merrill  <jason@redhat.com>
10087
10088         * decl.c (start_function): Call cplus_decl_attributes immediately
10089         after grokdeclarator.
10090
10091         * decl.c (start_function): Combine DECL_RESULT handling code.
10092
10093 2002-02-03  Jason Merrill  <jason@redhat.com>
10094
10095         * xref.c: Remove.
10096         * Make-lang.in (CXX_OBJS): Remove cp/xref.o
10097         (cp/xref.o): Remove dependencies.
10098         * class.c (finish_struct_1, check_methods): Don't call xref fns.
10099         (finish_struct_1): Likewise.
10100         * friend.c (make_friend_class): Likewise.
10101         * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
10102         * spew.c (read_process_identifier): Likewise.
10103
10104 2002-02-01  Jason Merrill  <jason@redhat.com>
10105
10106         PR c++/4872
10107         * decl.c (finish_function): Warn about a non-void function with
10108         no return statement and no abnormal exit.
10109         * cp-tree.h (struct cp_language_function): Add returns_abnormally.
10110         (current_function_returns_abnormally): New macro.
10111         * call.c (build_call): Set it.
10112
10113         * typeck.c (build_component_ref): Always complain about offsetof
10114         constructs on non-PODs.  Only make it an error for members of
10115         virtual bases.
10116
10117         * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
10118         (dump_function_decl): Always dump parms.
10119
10120         * decl2.c (finish_static_data_member_decl): Complain about a local
10121         class with a static data member.
10122
10123         PR c++/4286
10124         * search.c (lookup_field_1): Don't xref a static data member
10125         just because we looked it up.
10126
10127 2002-01-31  Jason Merrill  <jason@redhat.com>
10128
10129         * Make-lang.in (parse.c): Handle .output file.
10130
10131         PR c++/3395
10132         * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
10133         not TREE_TYPE.
10134         * semantics.c (finish_class_definition): Adjust.
10135
10136         Allow attributes in parms and casts.
10137         * parse.y (named_parm): Don't strip attrs.
10138         (declmods): Remove 'attributes' production.
10139         (nonempty_cv_qualifiers): Accept attributes.
10140         (ATTRIBUTE): Give precedence.
10141         * decl.c (groktypename): Handle attributes.
10142         (grokparms): Likewise.
10143
10144 2002-01-29  Jakub Jelinek  <jakub@redhat.com>
10145
10146         * decl2.c (cxx_decode_option): Pass 0 as last argument to
10147         cpp_handle_option.
10148         * lang-specs.h: Use cpp_unique_options instead of cpp_options
10149         when used together with cc1_options.
10150
10151 2002-01-29  Nathan Sidwell  <nathan@codesourcery.com>
10152
10153         PR c++/5132
10154         * typeck2.c (digest_init): Make sure non-array core type is
10155         instantiated.
10156         * decl2.c (reparse_absdcl_as_casts): Just store the type in the
10157         constructor, rather than build a new one.
10158         (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
10159         PURPOSE of constructor elts.
10160
10161 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
10162
10163         * Make-lang.in (parse.c): Adjust expected number of
10164         shift-reduce conflicts.
10165         (decl.o): Depend on diagnostic.h.
10166         * decl.c: Include diagnostic.h.
10167         (grokdeclarator): Check for null pointer.
10168         (finish_function): Don't abort when
10169         current_binding_level->parm_flag != 1, if errors have
10170         occurred; throw away the statement tree and extra binding
10171         levels, and continue.
10172         * lex.c (note_list_got_semicolon): Check for null pointer.
10173         * method.c (hack_identifier): Just return error_mark_node if
10174         value is error_mark_node.
10175         * parse.y (primary: TYPEID(type_id)): No need to use
10176         TYPE_MAIN_VARIANT here.
10177         (handler_seq): Accept an empty list of catch clauses and
10178         generate a fake handler block to avoid later crashes.
10179         (ansi_raise_identifier): Accept the error token too.
10180         * semantics.c (begin_class_definition,
10181         finish_class_definition): Check for error_mark_node.
10182
10183 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
10184
10185         * typeck2.c (friendly_abort): Delete definition.
10186         * cp-tree.h (friendly_abort): Don't prototype.
10187         (my_friendly_assert): Use fancy_abort.
10188
10189 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
10190
10191         * cp-tree.h (my_friendly_abort): Remove.
10192
10193 2002-01-23  Jakub Jelinek  <jakub@redhat.com>
10194
10195         * spew.c (pending_inlines, pending_inlines_tail,
10196         processing_these_inlines): Make static.
10197         (mark_pending_inlines): Remove static.
10198         (begin_parsing_inclass_inline): If in function, save pi
10199         for GC to cp_function_chain->unparsed_inlines instead.
10200         (process_next_inline): Likewise.
10201         * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
10202         (mark_pending_inlines): Add prototype.
10203         * decl.c (spew_debug): Remove unused extern.
10204         (mark_lang_function): Call mark_pending_inlines.
10205
10206 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
10207
10208         * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
10209         init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
10210         semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
10211         Change my_fancy_abort() to abort().
10212
10213 2002-01-23  Jason Merrill  <jason@redhat.com>
10214
10215         PR c++/5453
10216         * class.c (fixed_type_or_null): Fix thinko.
10217
10218         PR c++/3331
10219         * init.c (resolve_offset_ref): Use build_indirect_ref.
10220
10221         * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
10222
10223 2002-01-22  Jason Merrill  <jason@redhat.com>
10224
10225         * parse.y (function_body): Suppress the block for the outermost
10226         curly braces.
10227         * decl.c (pushdecl): Don't try to skip it.
10228         (begin_function_body): Keep the block we create, not the next one.
10229         * init.c (emit_base_init): Don't mess with keep_next_level.
10230
10231         * class.c (build_base_path): Tweak formatting.
10232
10233 2002-01-19  Nathan Sidwell  <nathan@codesourcery.com>
10234
10235         Fix regression introduced with patch for c++/775
10236         * parse.y (class_head_defn): Check for template specializations
10237         with a different class-key.
10238
10239 2002-01-17  Jason Merrill  <jason@redhat.com>
10240
10241         * decl.c (begin_constructor_body, begin_destructor_body): New fns.
10242         (begin_function_body): Call them and keep_next_level.
10243         * init.c (emit_base_init): Call keep_next_level.
10244         * semantics.c (setup_vtbl_ptr): Lose.
10245         * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
10246         (vtbls_set_up_p): Lose.
10247         * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
10248         * method.c (do_build_copy_constructor): Likewise.
10249         (synthesize_method): Call finish_mem_initializers.
10250         * parse.y (nodecls): Likewise.
10251
10252         * error.c (dump_type_suffix): Print the exception specs before
10253         recursing.
10254         (dump_function_decl): Here, too.
10255
10256         * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
10257
10258 2002-01-10  Ira Ruben   <ira@apple.com>
10259
10260         PR c++/907
10261         * decl.c (start_method): Handle attrlist.
10262
10263 2002-01-10  Jakub Jelinek  <jakub@redhat.com>
10264
10265         * decl2.c (max_tinst_depth): Increase default limit to 500.
10266
10267 2002-01-10  Graham Stott  <grahams@redhat.com>
10268
10269         * spew.c (YYCHAR): Uppercase macro parameter and add
10270         parenthesis.
10271         (YYCODE): Likewise.
10272         (NAME): Uppercase macro parameter.
10273
10274 2002-01-09  Graham Stott  <grahams@redhat.com>
10275
10276         * decl.h (grokdeclarator): Wrap long line.
10277
10278         * semantics.c (FINISH_COND): Uppercase macro paramaters and
10279         add parenthesis.
10280
10281 2002-01-08  Graham Stott  <grahams@redhat.com>
10282
10283         * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
10284         (PALLOC): Uppercase macro parameter and whitespace.
10285         (SALLOC): Uppercase macro parameter.
10286         (SFREE): Uppercase macros parameter, add parenthese and
10287         whitespace.
10288         (STREQL): Uppercase macro parameter and whitespace.
10289         (STRNEQ): Likewise.
10290         (STRLSS): Likewise.
10291         (STRLEQ): Likewise.
10292         (STRGTR): Likewise.
10293         (STRGEQ): Likewise.
10294
10295         * call.c (convert_like): Add parenthesis and wrap.
10296         (convert_like_with_context): Likewise.
10297         (ICS_RANK): Whitespace.
10298         (NEED_TEMPORARY_P): Remove parenthesis.
10299
10300         * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
10301         whitespace.
10302         (VTT_MARKED_BINFO_P): Likewise.
10303
10304         * decl.c (BINDING_LEVEL): Add parenthesis.
10305         (DEF_OPERATOR): Likewise.
10306
10307         * mangle.c (MANGLE_TRACE): Add parenthesis.
10308         (MANGLE_TRACE_TREE): Likewise.
10309         (write_signed_number): Likewise.
10310         (write_unsigned_number): Likewise.
10311
10312         * pt.c (ccat): Uppercase macro parameter.
10313         (cat): Likewise
10314
10315         * search.c (SET_BINFO_ACCESS): Add parenthesis.
10316
10317 2002-01-07  Jason Merrill  <jason@redhat.com>
10318
10319         * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
10320         to pedwarn.
10321
10322         PR c++/3536
10323         * method.c (make_thunk): If !flag_weak, give the thunk the
10324         function's linkage.
10325         (use_thunk): Here, too.
10326
10327 2002-01-07  Graham Stott  <grahams@redhat.com>
10328
10329         * error.c: Update copyright date.
10330         (print_scope_operator): Add parenthesis.
10331         (print_left_paren): Likewise.
10332         (print_right_paren): Likewise.
10333         (print_left_bracket): Likewise.
10334         (print_right_bracket): Likewise.
10335         (print_template_argument_list_start): Likewise.
10336         (print_template_argument_list_end): Likewise.
10337         (print_non_consecutive_character): Likewise.
10338         (print_tree_identifier): Likewise.
10339         (print_identifier): Likewise.
10340         (NEXT_CODE): Uppercase macro parameter.
10341         (ident_fndecl): Delete unused.
10342         (GLOBAL_THING): Likewise.
10343
10344 2002-01-06  Graham Stott  <grahams@redhat.com>
10345
10346         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
10347         (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
10348         (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
10349         (RECORD_OR_UNION_TYPE_CHECK): Likewise.
10350         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
10351         (C_IS_RESERVED_WORD): Uppercase macro parameter.
10352         (C_RID_YYCODE) Likewise.
10353         (ptrmem_cst): Use rtx.
10354         (LOCAL_BINDING_P): Add whitespace.
10355         (INHERITED_VALUE_BINDING_P): Likewise.
10356         (BINDING_SCOPE): Wrap long line.
10357         (BINDING_HAS_LEVEL_P): Remove parenthesis.
10358         (BINDING_VALUE): Wrap long line.
10359         (BINDING_TYPE): Whitespace.
10360         (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
10361         (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
10362         (IDENTIFIER_NAMESPACE_VALUE): Likewise.
10363         (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
10364         (same_type_p): Uppercase macro parameters.
10365         (same_type_ignoring_top_level_qualifiers_p): Likewise.
10366         (OVL_FUNCTION): Wrap long line.
10367         (OVL_CHAIN): Whitespace.
10368         (OVL_CURRENT): Add parenthesis and whitespace.
10369         (OVL_NEXT): Whitespace.
10370         (OVL_USED): Likewise.
10371         (IDENTIFIER_TYPE_VALUE): Likewise.
10372         (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
10373         (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
10374         (LANG_ID_FIELD): Whitespace.
10375         (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
10376         (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
10377         (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
10378         (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
10379         (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
10380         (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
10381         (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
10382         (IDENTIFIER_VIRTUAL_P): Likewise.
10383         (IDENTIFIER_OPNAME_P): Likewise.
10384         (IDENTIFIER_TYPENAME_P): Remove parenthesis.
10385         (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
10386         (C_SET_EXP_ORIGINAL_CODE): Likewise.
10387         (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
10388         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
10389         (IS_AGGR_TYPE): Uppercase macro parameter.
10390         (CLASS_TYPE_P): Likewise.
10391         (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
10392         (IS_AGGR_TYPE_2): Whitespace.
10393         (TAGGED_TYPE_P): Uppercase macro parameter.
10394         (TYPE_BUILT_IN): Whitespace.
10395         (TYPE_FOR_JAVA): Likewise.
10396         (FUNCTION_ARG_CHAIN): Remove parenthesis.
10397         (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
10398         (FUNCTION_FIRST_USER_PARAM): Likewise.
10399         (PROMOTES_TO_AGGR_TYPE): Whitespace.
10400         (DERIVED_FROM_P): Add parenthesis and wrap.
10401         (UNIQUELY_DERIVED_FROM_P): Likewise.
10402         (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
10403         (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
10404         (CLASSTYPE_USE_TEMPLATE): Whitespace.
10405         (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
10406         (TYPE_GETS_DELETE): Add parenthesis.
10407         (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
10408         (TYPE_HAS_ASSIGN_REF): Likewise,
10409         (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
10410         (TYPE_HAS_INIT_REF): Likewise.
10411         (TYPE_HAS_CONST_INIT_REF): Likewise.
10412         (TYPE_BEING_DEFINED): Likewise.
10413         (TYPE_LANG_SPECIFIC): Likewise.
10414         (CLASSTYPE_RTTI): Likewise.
10415         (TYPE_OVERLOADS_CALL_EXPR): Likewise.
10416         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
10417         (TYPE_OVERLOADS_ARROW): Likewise.
10418         (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
10419         (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
10420         (CLASSTYPE_METHOD_VEC): Likewise.
10421         (CLASSTYPE_MARKED_N): Likewise.
10422         (CLASSTYPE_MARKED): Likewise.
10423         (CLASSTYPE_MARKED2): Likewise.
10424         (CLASSTYPE_MARKED3): Likewise.
10425         (CLASSTYPE_MARKED4): Likewise.
10426         (CLASSTYPE_MARKED5): Likewise.
10427         (CLASSTYPE_MARKED6): Likewise.
10428         (SET_CLASSTYPE_MARKED): Whitespace.
10429         (CLEAR_CLASSTYPE_MARKED): Likewise.
10430         (SET_CLASSTYPE_MARKED2): Likewise.
10431         (CLEAR_CLASSTYPE_MARKED2): Likewise.
10432         (SET_CLASSTYPE_MARKED3): Likewise.
10433         (CLEAR_CLASSTYPE_MARKED3): Likewise.
10434         (SET_CLASSTYPE_MARKED4): Likewise.
10435         (CLEAR_CLASSTYPE_MARKED4): Likewise.
10436         (SET_CLASSTYPE_MARKED5): Likewise.
10437         (CLEAR_CLASSTYPE_MARKED5): Likewise.
10438         (SET_CLASSTYPE_MARKED6): Likewise.
10439         (CLEAR_CLASSTYPE_MARKED6): Likewise.
10440         (CLASSTYPE_TAGS): Likewise.
10441         (CLASSTYPE_VSIZE): Likewise.
10442         (CLASSTYPE_VBASECLASSES): Likewise.
10443         (CANONICAL_BINFO): Add parenthesis.
10444         (CLASSTYPE_SIZE(NODE): Likewise.
10445         (CLASSTYPE_SIZE_UNIT): Likewise.
10446         (CLASSTYPE_ALIGN(NODE): Likewise.
10447         (CLASSTYPE_USER_ALIGN): Likewise.
10448         (TYPE_JAVA_INTERFACE): Likewise.
10449         (CLASSTYPE_PURE_VIRTUALS): Likewise.
10450         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
10451         (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
10452         (CLASSTYPE_HAS_MUTABLE): Likewise.
10453         (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
10454         (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
10455         (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
10456         (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
10457         (CLASSTYPE_INTERFACE_ONLY): Likewise.
10458         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
10459         (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
10460         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
10461         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
10462         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
10463         (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
10464         (BINFO_UNSHARED_MARKED): Whitespace.
10465         (BINFO_MARKED): Whitespace and wrap.
10466         (SET_BINFO_MARKED): Likewise.
10467         (CLEAR_BINFO_MARKED): Likewise.
10468         (BINFO_VTABLE_PATH_MARKED): Likewise.
10469         (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
10470         (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
10471         (BINFO_SUBVTT_INDEX): Remove parenthesis.
10472         (BINFO_VPTR_INDEX): Likewise.
10473         (BINFO_PRIMARY_BASE_OF): Likewise,
10474         (CLASSTYPE_VFIELDS): Whitespace.
10475         (VF_DERIVED_VALUE): Wrap long line.
10476         (NAMESPACE_LEVEL): Whitespace.
10477         (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
10478         (DEFARG_POINTER): Whitespace.
10479         (DECL_NEEDED_P): Remove parenthesis.
10480         (DECL_LANGUAGE): Whitespace.
10481         (SET_DECL_LANGUAGE): Add parenthesis.
10482         (DECL_CONSTRUCTOR_P): Whitespace and wrap.
10483         (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
10484         (DECL_IN_AGGR_P): Whitespace.
10485         (DECL_FRIEND_P): Likewise.
10486         (DECL_BEFRIENDING_CLASSES): Likewise.
10487         (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
10488         (DECL_NONCONVERTING_P): Whitespace.
10489         (DECL_PURE_VIRTUAL_P): Likewise.
10490         (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
10491         (DECL_PENDING_INLINE_INFO): Whitespace.
10492         (DECL_SORTED_FIELDS): Likewise.
10493         (DECL_DEFERRED_FN): Likewise.
10494         (DECL_TEMPLATE_INFO): Likewise.
10495         (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
10496         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
10497         (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
10498         (TMPL_ARGS_LEVEL): Likewise.
10499         (SET_TMPL_ARGS_LEVEL): Likewise.
10500         (INNERMOST_TEMPLATE_PARMS): Whitespace.
10501         (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
10502         (INTEGRAL_CODE_P(CODE): Add parenthesis.
10503         (CP_INTEGRAL_TYPE_P): Remove parenthesis.
10504         (TYPE_HAS_CONSTRUCTOR): Whitespace.
10505         (TREE_HAS_CONSTRUCTOR): Likewise.
10506         (TYPE_HAS_DESTRUCTOR): Likewise.
10507         (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
10508         (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
10509         (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
10510         (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
10511         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
10512         (TYPE_PTRMEMFUNC_P): Likewise.
10513         (TYPE_PTRMEMFUNC_FLAG): Likewise.
10514         (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
10515         (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
10516         (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
10517         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
10518         (DECL_ACCESS): Whitespace.
10519         (DECL_GLOBAL_CTOR_P): Remove parenthesis.
10520         (DECL_GLOBAL_DTOR_P): Likewise.
10521         (GLOBAL_INIT_PRIORITY): Likewise.
10522         (DECL_TEMPLATE_PARMS): Likewise.
10523         (DECL_TEMPLATE_RESULT): Likewise.
10524         (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
10525         (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
10526         (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
10527         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
10528         (PRIMARY_TEMPLATE_P): Add parenthesis.
10529         (DECL_USE_TEMPLATE): Whitespace.
10530         (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
10531         (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
10532         (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
10533         (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
10534         (CALL_DECLARATOR_PARMS): Remove parenthesis.
10535         (CALL_DECLARATOR_QUALS): Likewise.
10536         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
10537         (TEMP_NAME_P): Wrap.
10538         (VFIELD_NAME_P): Likewise.
10539         (B_SET): Uppercase macro parameters and add parenthesis.
10540         (B_CLR): Likewise.
10541         (B_TST): Likewise.
10542         (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
10543         (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
10544         (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
10545         (same_or_base_type_p): Likewise.
10546         (cp_deprecated): Likewise.
10547
10548 2002-01-05  Richard Henderson  <rth@redhat.com>
10549
10550         * semantics.c (expand_body): Revert last change.
10551
10552 2002-01-04  Jason Merrill  <jason@redhat.com>
10553
10554         PR c++/4122
10555         * class.c (update_vtable_entry_for_fn): Set delta to zero for a
10556         lost primary.
10557
10558         * class.c (build_vtbl_initializer): Check for a lost primary
10559         before calculating the vtable entry to throw away.
10560
10561 2002-01-02  Jason Merrill  <jason@redhat.com>
10562
10563         * semantics.c (expand_body): Call outlining_inline_function when
10564         emitting an inline function out of line.
10565
10566 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10567
10568         PR c++/5116, c++/764 reversion
10569         * call.c (build_new_op): Revert the instantiations. They are
10570         incorrect.
10571
10572 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10573
10574         PR c++/5089
10575         * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
10576
10577 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10578
10579         PR c++/3716
10580         * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
10581         (tsubst, case POINTER_TYPE): Handle pmfs here.
10582         (tsubst, case OFFSET_TYPE): Check it is not an offset to
10583         reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
10584
10585 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10586
10587         PR c++/35
10588         * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
10589         (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
10590         * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
10591         PARM_DECL.
10592         (tsubst_template_parms): Break up loop statements.
10593         (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
10594         parm PARM_DECLs don't get promoted.
10595
10596 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10597
10598         PR c++/5123
10599         * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
10600         (build_x_function_call): Cope with a COMPONENT_REF containing a
10601         TEMPLATE_ID_EXPR.
10602
10603 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10604
10605         PR c++/5213
10606         * pt.c (convert_template_argument): Be more careful determining
10607         when RECORD_TYPE templates are or are not templates.
10608
10609 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10610
10611         PR c++/775
10612         * cp-tree.h (handle_class_head): Adjust prototype.
10613         * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
10614         parameters. Use for all class heads.
10615         * parse.y (named_class_head_sans_basetype, named_class_head,
10616         named_complex_class_head_sans_basetype,
10617         named_class_head_sans_basetype_defn,
10618         unnamed_class_head): Remove.
10619         (class_head, class_head_apparent_template): Recognize class heads
10620         (class_head_decl, class_head_defn): New reductions. Process class
10621         heads.
10622         (structsp): Adjust class definition and class declaration
10623         reductions.
10624         (maybe_base_class_list): Give diagnostic on empty list.
10625
10626 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10627
10628         PR c++/4379
10629         * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
10630         single non-static member.
10631         (unary_complex_lvalue): If it cannot be a pointer to member, don't
10632         make it so. Check it is not pointer to reference.
10633
10634 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10635
10636         PR c++/5132
10637         * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
10638         are processing a template decl.
10639
10640 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10641
10642         PR c++/5116, c++/764
10643         * call.c (build_new_op): Make sure template class operands are
10644         instantiated. Simplify arglist construction.
10645
10646 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
10647
10648         * call.c (build_user_type_conversion_1): Use my_friendly_assert
10649         rather than if ... abort.
10650         * cvt.c (convert_to_reference): Likewise.
10651         * semantics.c (setup_vtbl_ptr): Likewise.
10652         * pt.c (lookup_template_class): Comment typo.
10653
10654 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
10655
10656         PR c++/5125
10657         * pt.c (push_template_decl_real): Make sure DECL has
10658         DECL_LANG_SPECIFIC.
10659
10660 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
10661
10662         PR c++/335
10663         * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
10664         for non-reference fields.
10665         * typeck.c (require_complete_type): Use resolve_offset_ref).
10666
10667 2001-12-26  Nathan Sidwell  <nathan@codesourcery.com>
10668
10669         PR c++/196
10670         * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
10671
10672 2001-12-24  Nathan Sidwell  <nathan@codesourcery.com>
10673
10674         PR c++/160
10675         * typeck.c (build_modify_expr): Remove old unreachable code & tidy
10676         up. Don't stabilize_references when initializing a reference.
10677
10678 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10679
10680         * decl2.c (lang_f_options): Const-ify.
10681
10682 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
10683
10684         * config-lang.in (diff_excludes): Remove.
10685
10686 2001-12-19  Nathan Sidwell  <nathan@codesourcery.com>
10687
10688         PR c++/90
10689         * typeck.c (build_function_call_real): Use original function
10690         expression for errors.
10691
10692 2001-12-18  Jason Merrill  <jason@redhat.com>
10693
10694         PR c++/3242
10695         * class.c (add_method): Do compare 'this' quals when trying to match a
10696         used function.  Don't defer to another used function.
10697
10698 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
10699
10700         * pt.c (instantiate_clone): Remove, fold into ...
10701         (instantiate_template): ... here. Simplify by removing mutual
10702         recursion.
10703         * typeck2.c (build_m_component_ref): Don't cv qualify the function
10704         pointed to by a pointer to function.
10705         * class.c (delete_duplicate_fields_1): Typo.
10706
10707 2001-12-18  Jason Merrill  <jason@redhat.com>
10708
10709         C++ ABI change: destroy value arguments in caller.
10710         * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
10711         create an extra binding level for the parameters.
10712         * decl.c (store_parm_decls): Don't do parameter cleanups.
10713
10714 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
10715
10716         * call.c (build_new_method_call): Use '%#V'.
10717         * error.c (cv_to_string): Use V parameter to determine padding.
10718
10719 2001-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
10720
10721         * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
10722         spellings in messages.
10723
10724 2001-12-17  Zack Weinberg  <zack@codesourcery.com>
10725
10726         * cp-tree.h: Delete #defines for cp_error, cp_warning,
10727         cp_pedwarn, and cp_compiler_error.
10728         * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
10729         except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
10730         rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
10731         typeck2.c: Change calls to the above macros to use their
10732         language-independent equivalents: error, warning, pedwarn, and
10733         internal_error respectively.
10734
10735 2001-12-16  Neil Booth  <neil@daikokuya.demon.co.uk>
10736
10737         * decl2.c (finish_file): Remove back_end_hook.
10738
10739 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
10740
10741         * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
10742         cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
10743         pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
10744
10745 2001-12-15  Joseph S. Myers  <jsm28@cam.ac.uk>
10746
10747         * lang-options.h: Use American spelling in messages.
10748
10749 2001-12-13  Jason Merrill  <jason@redhat.com>
10750
10751         * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
10752
10753         Use cleanups to run base and member destructors.
10754         * init.c (push_base_cleanups): New function, split out from...
10755         (build_delete): ...here.  Lose !TYPE_HAS_DESTRUCTOR code.
10756         * decl.c (finish_destructor_body): Move vbase destruction code to
10757         push_base_cleanups.
10758         (begin_function_body, finish_function_body): New fns.
10759         (finish_function): Move [cd]tor handling and call_poplevel to
10760         finish_function_body.
10761         (pushdecl): Skip the new level.
10762         * semantics.c (genrtl_try_block): Don't call end_protect_partials.
10763         (setup_vtbl_ptr): Call push_base_cleanups.
10764         * method.c (synthesize_method): Call {begin,end}_function_body.
10765         * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
10766         * cp-tree.h: Declare new fns.
10767         * parse.y (function_body, .begin_function_body): New nonterminals.
10768         (fndef, pending_inline, function_try_block): Use function_body.
10769         (ctor_initializer_opt, function_try_block): No longer has a value.
10770         (base_init): Remove .set_base_init token.
10771         (.set_base_init, compstmt_or_error): Remove.
10772         * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
10773
10774         * optimize.c (maybe_clone_body): Fix parameter updating.
10775
10776 2001-12-12  Jason Merrill  <jason@redhat.com>
10777
10778         * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
10779         * semantics.c (genrtl_start_function): Don't pass
10780         parms_have_cleanups or push an extra binding level.
10781         (genrtl_finish_function): Lose cleanup_label cruft.
10782
10783         * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
10784         (ctor_label): Remove.
10785         * semantics.c (finish_return_stmt): Lose ctor_label support.
10786         * decl.c (finish_constructor_body, mark_lang_function): Likewise.
10787         * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
10788         dtor_label.
10789
10790         * call.c (build_new_method_call): Let resolves_to_fixed_type_p
10791         check for [cd]tors.
10792         * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
10793
10794         * decl.c (finish_function): Check VMS_TARGET, not VMS.
10795
10796         * decl.c (start_cleanup_fn): Remove redundant pushlevel.
10797         (end_cleanup_fn): And poplevel.
10798
10799         * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
10800         if we're in a template.
10801
10802 2001-12-12  Jakub Jelinek  <jakub@redhat.com>
10803
10804         * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
10805         ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
10806         THIS_NAME_P): Delete.
10807         * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
10808         THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
10809         with internal naming scheme.
10810         * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
10811
10812 2001-12-12  Nathan Sidwell  <nathan@codesourcery.com>
10813
10814         * decl.c (grokdeclarator): Deprecated implicit typename use.
10815
10816 2001-12-11  Nathan Sidwell  <nathan@codesourcery.com>
10817
10818         PR g++/51
10819         * parse.y (frob_specs): Indicate it is a language linkage which
10820         contained the extern.
10821         * decl.c (grokdeclarator): Allow extern language linkage with
10822         other specifiers.
10823
10824 2001-12-10  Nathan Sidwell  <nathan@codesourcery.com>
10825
10826         PR g++/72
10827         * decl.c (add_binding): Don't reject duplicate typedefs involving
10828         template parameters.
10829
10830 2001-12-10  Neil Booth  <neil@daikokuya.demon.co.uk>
10831
10832         * parse.y, semantics.c: Similarly.
10833
10834 2001-12-09  Nathan Sidwell  <nathan@codesourcery.com>
10835
10836         PR g++/87
10837         * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
10838         (copy_args_p): Rename to ...
10839         (copy_fn_p): ... here.
10840         (grok_special_member_properties): New function.
10841         (grok_op_properties): Lose VIRTUALP parameter.
10842         (copy_assignment_arg_p): Remove.
10843         * call.c (build_over_call): Use copy_fn_p.
10844         * decl.c (grokfndecl): Reformat. Adjust call to
10845         grok_op_properties.
10846         (copy_args_p): Rename to ...
10847         (copy_fn_p): ... here. Reject template functions. Check for pass
10848         by value.
10849         (grok_special_member_properties): Remember special functions.
10850         (grok_ctor_properties): Don't remember them here, just check.
10851         (grok_op_properties): Likewise.
10852         (start_method): Call grok_special_member_properties.
10853         * decl2.c (grokfield): Likewise.
10854         (copy_assignment_arg_p): Remove.
10855         (grok_function_init): Don't remember abstract assignment here.
10856         * pt.c (instantiate_class_template): Call
10857         grok_special_member_properties.
10858         (tsubst_decl): Adjust grok_op_properties call.
10859
10860 2001-12-08  Aldy Hernandez  <aldyh@redhat.com>
10861
10862         * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
10863         RID_TYPES_COMPATIBLE_P.
10864
10865 2001-12-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
10866
10867         * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
10868         call to build_aggr_init.
10869         * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
10870
10871 2001-12-08  Neil Booth  <neil@daikokuya.demon.co.uk>
10872
10873         * parse.y: Replace uses of the string non-terminal with STRING.
10874         Don't perform string concatentaion here.
10875         (string): Remove non-terminal.
10876         * semantics.c (finish_asm_stmt): Don't concatenate strings here.
10877
10878 2001-12-05  Jason Merrill  <jason@redhat.com>
10879
10880         * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
10881         (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
10882         * tree.c (cp_start_inlining, cp_end_inlining): New fns.
10883         * pt.c (push_tinst_level): No longer static.
10884         * cp-tree.h: Declare them.
10885
10886         * init.c (resolve_offset_ref): Don't check access for the base
10887         conversion to access a FIELD_DECL.
10888
10889         * cp-tree.h (TYPE_REFFN_P): New macro.
10890         * decl.c (bad_specifiers): Check it, too.
10891
10892         * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
10893         on the __*_type_info type if we haven't seen a definition.
10894
10895 2001-12-05  Neil Booth  <neil@daikokuya.demon.co.uk>
10896
10897         * decl.c: Include c-common.h.
10898         (shadow_warning): Move to c-common.c.
10899
10900 2001-12-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10901
10902         * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
10903
10904 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
10905
10906         * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
10907
10908 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
10909
10910         PR g++/164
10911         * init.c (sort_base_init): Allow binfos to be directly specified.
10912         * method.c (do_build_copy_constructor): Explicitly convert to the
10913         base instance.
10914         (do_build_assign_ref): Likewise.
10915
10916 2001-12-03  Hans-Peter Nilsson  <hp@bitrange.com>
10917
10918         * decl.c (xref_basetypes): Don't use C99 construct in tag_code
10919         declaration and initialization.
10920
10921 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
10922
10923         * typeck2.c: Remove leading capital from diagnostic messages, as
10924         per GNU coding standards.
10925
10926 2001-12-03  Mumit Khan  <khan@nanotech.wisc.edu>
10927
10928         PR c++/3394
10929         * decl.c (xref_basetypes): Handle attributes between
10930         'class' and name.
10931
10932 2001-12-03  Nathan Sidwell  <nathan@codesourcery.com>
10933
10934         PR g++/3381
10935         * parse.y (named_complex_class_head_sans_basetype): Add new
10936         reduction.
10937         * Make-lang.in (parse.c): Adjust expected conflict count.
10938
10939 2001-12-03  Jason Merrill  <jason@redhat.com>
10940
10941         * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
10942         immediate binfos for our virtual bases.
10943
10944 2001-12-02  Neil Booth  <neil@daikokuya.demon.co.uk>
10945
10946         * call.c (build_java_interface_fn_ref): Similarly.
10947         * except.c (is_admissible_throw_operand): Similarly.
10948         * init.c (build_java_class_ref): Similarly.
10949         * xref.c (open_xref_file): Similarly.
10950
10951 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
10952
10953         * class.c (finish_struct): Remove trailing periods from messages.
10954         * decl.c (check_tag_decl): Similarly.
10955         * lex.c (cxx_set_yydebug): Similarly.
10956         * typeck2.c (friendly_abort): Similarly.
10957
10958 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
10959
10960         PR c++/3048
10961         * cp-tree.h (ovl_member): Remove.
10962         * decl2.c (merge_functions): Handle extern "C" functions
10963         specially.
10964         * tree.c (ovl_member): Remove.
10965
10966 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
10967
10968         PR c++/4842
10969         * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
10970         FUNCTION_DECL, as input.
10971         (mark_overriders): Remove.
10972         (warn_hidden): Rework for the new ABI.
10973
10974 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
10975
10976         PR c++/3471
10977         * call.c (convert_like_real): Do not build additional temporaries
10978         for rvalues of class type.
10979
10980 2001-11-28  Nathan Sidwell  <nathan@codesourcery.com>
10981
10982         * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
10983         (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
10984         (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
10985         (DERIVED_FROM_P): Likewise.
10986         (enum base_access): Renumber, add ba_quiet bit mask.
10987         (get_binfo): Remove.
10988         (get_base_distance): Remove.
10989         (binfo_value): Remove.
10990         (ACCESSIBLY_DERIVED_FROM_P): Remove.
10991         * call.c (standard_conversion): Use lookup_base.
10992         * class.c (strictly_overrides): Likewise.
10993         (layout_virtual_bases): Likewise.
10994         (warn_about_ambiguous_direct_bases): Likewise.
10995         (is_base_of_enclosing_class): Likewise.
10996         (add_vcall_offset_vtbl_entries_1): Likewise.
10997         * cvt.c (build_up_reference): Adjust comment.
10998         * init.c (build_member_call): Reformat.
10999         * search.c (get_binfo): Remove.
11000         (get_base_distance_recursive): Remove.
11001         (get_base_distance): Remove.
11002         (lookup_base_r): Tweak.
11003         (lookup_base): Add ba_quiet control. Complete the types here.
11004         (covariant_return_p): Use lookup_base.
11005         * tree.c (binfo_value): Remove.
11006         (maybe_dummy_object): Use lookup_base.
11007         * typeck.c (build_static_cast): Use lookup_base.
11008         (get_delta_difference): Likewise.
11009         * typeck2.c (binfo_or_else): Use lookup_base.
11010         (build_scoped_ref): Add back error_mark_check.
11011         (build_m_component_ref): Use lookup_base.
11012
11013 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
11014
11015         * Make-lang.in (c++.generated-manpages): New dummy target.
11016
11017 2001-11-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11018
11019         * Make-lang.in (cp-lang.o): Depends on c-common.h.
11020         * cp-lang.c (c-common.h): Include.
11021         (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
11022         * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
11023         * expr.c (init_cplus_expand): Don't set lang_expand_constant.
11024
11025 2001-11-26  Neil Booth  <neil@daikokuya.demon.co.uk>
11026
11027         * decl2.c (c_language): Move to c-common.c.
11028         * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
11029         functions.
11030         (cxx_init): Update.
11031
11032 2001-11-26  Jason Merrill  <jason@redhat.com>
11033
11034         * call.c (joust): Remove COND_EXPR hack.
11035
11036 2001-11-25  Aldy Hernandez  <aldyh@redhat.com>
11037
11038         * search.c (lookup_base_r): Declare bk in variable declaration
11039         space.
11040
11041 2001-11-25  Nathan Sidwell  <nathan@codesourcery.com>
11042
11043         PR g++/3145
11044         * class.c (build_vbase_pointer): Remove.
11045         (build_vbase_path): Remove.
11046         (build_base_path): New function.
11047         * cp-tree.h (base_access, base_kind): New enumerations.
11048         (build_base_path): Declare.
11049         (convert_pointer_to_real): Remove.
11050         (convert_pointer_to): Remove.
11051         (lookup_base): Declare.
11052         (convert_pointer_to_vbase): Remove.
11053         * call.c (build_scoped_method_call): Use lookup_base &
11054         build_base_path instead of convert_pointer_to_real,
11055         get_base_distance & get_binfo.
11056         (build_over_call): Likewise.
11057         * cvt.c (cp_convert_to_pointer): Likewise.
11058         (convert_to_pointer_force): Likewise.
11059         (build_up_reference): Likewise.
11060         (convert_pointer_to_real): Remove.
11061         (convert_pointer_to): Remove.
11062         * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
11063         instead of convert_pointer_to_vbase & build_vbase_path.
11064         (emit_base_init): Use build_base_path instead of
11065         convert_pointer_to_real.
11066         (expand_virtual_init): Lose unrequired conversions.
11067         (resolve_offset_ref): Use lookup_base and build_base_path
11068         instead of convert_pointer_to.
11069         * rtti.c (build_dynamic_cast_1): Use lookup_base &
11070         build_base_path instead of get_base_distance & build_vbase_path.
11071         * search.c (get_vbase_1): Remove.
11072         (get_vbase): Remove.
11073         (convert_pointer_to_vbase): Remove.
11074         (lookup_base_r): New function.
11075         (lookup_base): New function.
11076         * typeck.c (require_complete_type): Use lookup_base &
11077         build_base_path instead of convert_pointer_to.
11078         (build_component_ref): Likewise.
11079         (build_x_function_call): Likewise.
11080         (get_member_function_from_ptrfunc): Likewise.
11081         (build_component_addr): Likewise.
11082         * typeck2.c (build_scoped_ref): Likewise.
11083
11084 2001-11-22  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
11085
11086         * cp-tree.h (CP_TYPE_QUALS): Removed.
11087         * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
11088         * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
11089         LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
11090         * dump.c (cp_dump_tree): Use void* dump_info argument to match
11091         lang-hooks prototype.
11092         * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
11093         rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
11094         CP_TYPE_QUALS changed to cp_type_quals.
11095         * Make-lang.in: References to c-dump.h changed to tree-dump.h.
11096         (CXX_C_OBJS): Remove c-dump.o.
11097
11098 2001-11-21  Mark Mitchell  <mark@codesourcery.com>
11099
11100         PR c++/3637
11101         * pt.c (lookup_template_class): Ensure that all specializations
11102         are registered on the list corresponding to the most general
11103         template.
11104
11105 2001-11-20  Mark Mitchell  <mark@codesourcery.com>
11106
11107         * call.c (non_reference): Add documentation.
11108         (convert_class_to_reference): Do not strip reference types
11109         from conversion operators.
11110         (maybe_handle_ref_bind): Simplify.
11111         (compare_ics): Correct handling of references.
11112
11113 2001-11-19  John Wilkinson <johnw@research.att.com>
11114
11115         * dump.c (dump_op): New function.
11116         (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION.  Use
11117         dump_op.  Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
11118         DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
11119
11120 2001-11-19  Mark Mitchell  <mark@codesourcery.com>
11121
11122         PR4629
11123         * semantics.c (finish_sizeof): Make sure that expression created
11124         while processing a template do not have a type.
11125         (finish_alignof): Likewise.
11126         * typeck.c (c_sizeof): Likewise.
11127         (expr_sizeof): Likewise.
11128
11129 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
11130
11131         * lex.c (cxx_finish): Call c_common_finish.
11132         (finish_parse): Remove.
11133
11134 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11135
11136         * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
11137         when displaying error message about missing array bounds.
11138
11139 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11140
11141         * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
11142         CONST_CAST_EXPR.
11143         * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
11144
11145 2001-11-16  Neil Booth  <neil@daikokuya.demon.co.uk>
11146
11147         * cp-tree.h (print_class_statistics): Restore.
11148
11149 2001-11-15  Jason Merrill  <jason@redhat.com>
11150
11151         * method.c (use_thunk): Don't emit debugging information for thunks.
11152
11153         * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
11154         * decl.c (make_typename_type): Handle getting a class template.
11155         * search.c (lookup_field_r): A class template is good enough for
11156         want_type.
11157
11158         * call.c (convert_like_real): Only use cp_convert for the bad part.
11159         (standard_conversion): Also allow bad int->enum.
11160         * typeck.c (ptr_reasonably_similar): Also allow functions to
11161         interconvert.  Pointers to same-size integers are reasonably
11162         similar.
11163
11164         * cvt.c (convert_to_void): If we build a new COND_EXPR, always
11165         give it void type.
11166
11167 2001-11-15  Nathan Sidwell  <nathan@codesourcery.com>
11168
11169         PR g++/3154
11170         * init.c (sort_base_init): Remove unreachable code.
11171         (expand_member_init): Adjust comment to reflect reality. Simplify
11172         and remove unreachable code.
11173
11174 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
11175
11176         * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
11177         (cxx_init): Update prototype.
11178         * decl.c (init_decl_processing): Rename.  Move null node init
11179         to its creation time.
11180         * lex.c (cxx_init_options): Update.
11181         (cxx_init): Combine with old init_parse; also call
11182         cxx_init_decl_processing.
11183
11184 2001-11-14  Richard Sandiford  <rsandifo@redhat.com>
11185
11186         * decl.c (check_initializer): Try to complete the type of an
11187         array element before checking whether it's complete.  Don't
11188         complain about arrays with complete element types but an
11189         unknown size.
11190         (cp_finish_decl): Build the hierarchical constructor before
11191         calling maybe_deduce_size_from_array_init.
11192
11193 2001-11-14  Joseph S. Myers  <jsm28@cam.ac.uk>
11194
11195         * Make-lang.in: Change all uses of $(manext) to $(man1ext).
11196
11197 2001-11-13  Nathan Sidwell  <nathan@codesourcery.com>
11198
11199         PR g++/4206
11200         * parse.y (already_scoped_stmt): Remove.
11201         (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
11202
11203 2001-11-12  H.J. Lu <hjl@gnu.org>
11204
11205         * cvt.c (ocp_convert): Don't warn the address of a weak
11206         function is always `true'.
11207
11208 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
11209
11210         * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
11211         LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
11212         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
11213         * cp-tree.h (print_class_statistics): Remove.
11214         (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
11215         cxx_print_identifier, cxx_set_yydebug): New.
11216         * lex.c (set_yydebug): Rename c_set_yydebug.
11217         * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
11218         lang_print_xnode): Rename.
11219         * tree.c (print_lang_statistics): Rename.
11220
11221 2001-11-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11222
11223         * class.c (dump_array): Fix format specifier warning.
11224
11225 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
11226
11227         * cp-lang.c (LANG_HOOKS_NAME): Override.
11228         (struct lang_hooks): Constify.
11229         * lex.c (cxx_init_options): Update.
11230         (lang_identify): Remove.
11231         * parse.y (language_string): Remove.
11232
11233 2001-11-08  Andreas Franck  <afranck@gmx.de>
11234
11235         * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
11236         DEMANGLER_CROSS_NAME): Handle program_transform_name the way
11237         suggested by autoconf.
11238         (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
11239         (c++.install-common): Use the transformed target alias names.
11240
11241 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
11242
11243         * Make-lang.in: Update.
11244         * cp-lang.c: Include langhooks-def.h.
11245
11246 2001-11-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11247
11248         * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
11249
11250 2001-11-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11251
11252         * lex.c (copy_lang_type): Add static prototype.
11253
11254 2001-11-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11255
11256         * pt.c (unify): Handle SCOPE_REF.
11257
11258 2001-11-01  Jakub Jelinek  <jakub@redhat.com>
11259
11260         * tree.c (cp_copy_res_decl_for_inlining): Adjust
11261         DECL_ABSTRACT_ORIGIN for the return variable.
11262
11263 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
11264
11265         *  Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
11266
11267 2001-10-28  Joseph S. Myers  <jsm28@cam.ac.uk>
11268
11269         * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
11270         semantics.c, spew.c: Fix spelling errors.
11271
11272 2001-10-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11273
11274         * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
11275
11276 2001-10-25  Zack Weinberg  <zack@codesourcery.com>
11277
11278         * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
11279         pop_everything.
11280
11281 2001-10-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11282
11283         * cp-lang.c (cxx_get_alias_set): New function.
11284         Point LANG_HOOKS_GET_ALIAS_SET to it.
11285
11286 2001-10-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11287
11288         * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
11289         * cp-tree.h (make_unbound_class_template): Prototype new function.
11290         * decl.c (make_unbound_class_template): New function.
11291         * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
11292         * error.c (dump_type): Likewise.
11293         * mangle.c (write_type): Likewise.
11294         * parse.y (template_parm): Likewise.
11295         (template_argument): Use make_unbound_class_template.
11296         * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
11297         (tsubst): Likewise.
11298         (tsubst_copy): Likewise.
11299         (unify): Likewise.
11300         * tree.c (walk_tree): Likewise.
11301         * typeck.c (comptypes): Likewise.
11302
11303 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11304
11305         * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
11306         extra calls into fewer ones.
11307
11308 2001-10-18  Alexandre Oliva  <aoliva@redhat.com>
11309
11310         * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
11311         Warn when merging inline with attribute noinline.
11312         (start_decl, start_function): Warn if inline and attribute
11313         noinline appear in the same declaration.
11314
11315 2001-10-16  H.J. Lu <hjl@gnu.org>
11316
11317         * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
11318         for tree checking disabled.
11319
11320 2001-10-16  Hans-Peter Nilsson  <hp@axis.com>
11321
11322         * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
11323         NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
11324
11325 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
11326
11327         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
11328         (unify): Only handle MINUS_EXPR specially if the above flag is set
11329         and the subtracted constant is 1.  Clear the flag on recursive calls.
11330         Set it when unifying the maximum value in an INTEGER_TYPE's range.
11331
11332 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
11333
11334         * decl.c (bad_specifiers): Don't allow exception specifications
11335         on any typedefs.
11336
11337 2001-10-14  Neil Booth  <neil@daikokuya.demon.co.uk>
11338
11339         * cp/lex.c (init_cp_pragma): Similarly.
11340
11341 2001-10-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11342
11343         * pt.c (lookup_template_class): Build complete template arguments
11344         for BOUND_TEMPLATE_TEMPLATE_PARM.
11345
11346 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11347
11348         * cp-tree.h (TYPE_BINFO): Update comment.
11349         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
11350         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
11351         (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
11352         (copy_type): Prototype new function.
11353         * lex.c (copy_lang_decl): Gather tree node statistics.
11354         (copy_lang_type): New function.
11355         (copy_type): Likewise.
11356         (cp_make_lang_type): Create lang_type for
11357         BOUND_TEMPLATE_TEMPLATE_PARM.  Set TYPE_BINFO for TYPENAME_TYPE
11358         and BOUND_TEMPLATE_TEMPLATE_PARM.
11359         * pt.c (tsubst): Use copy_type instead of copy_node.
11360         * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
11361
11362 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11363
11364         * pt.c (determine_specialization): Ignore functions without
11365         DECL_TEMPLATE_INFO.
11366
11367 2001-10-12  Nathan Sidwell  <nathan@codesourcery.com>
11368
11369         PR g++/4476
11370         * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
11371
11372 2001-10-11  Jason Merrill  <jason_merrill@redhat.com>
11373
11374         * typeck2.c (store_init_value): Don't re-digest a bracketed
11375         initializer.
11376
11377         * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
11378         ANON_AGGR_TYPE_P.
11379
11380 2001-10-11  Richard Henderson  <rth@redhat.com>
11381
11382         * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
11383         of an asm statement.
11384         (build_vtbl_ref_1): Split out from build_vtbl_ref.
11385         (build_vfn_ref): Use it to handle vtable descriptors before
11386         calling build_vtable_entry_ref.
11387         * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
11388
11389 2001-10-10  Richard Henderson  <rth@redhat.com>
11390
11391         * parse.y (asm_operand): Allow named operands.
11392         * semantics.c (finish_asm_stmt): Tweek for changed location
11393         of the operand constraint.
11394
11395 2001-10-09  Jason Merrill  <jason_merrill@redhat.com>
11396
11397         * call.c (standard_conversion): Add bad conversion between
11398         integers and pointers.
11399         (convert_like_real): Don't use convert_for_initialization for bad
11400         conversions; complain here and use cp_convert.
11401         (build_over_call): Don't handle bad conversions specially.
11402         (perform_implicit_conversion): Allow bad conversions.
11403         (can_convert_arg_bad): New fn.
11404         * cp-tree.h: Declare it.
11405         * typeck.c (convert_for_assignment): Use it.
11406         (ptr_reasonably_similar): Any target type is similar to void.
11407
11408 2001-10-08  Alexandre Oliva  <aoliva@redhat.com>
11409
11410         * Make-lang.in (CXX_OBJS): Added cp-lang.o.
11411         (cp/cp-lang.o): New rule.
11412         * cp-tree.h: Declare hooks.
11413         * tree.c: Make hooks non-static.
11414         (init_tree): Don't initialize hooks here.
11415         * lex.c: Likewise.  Move definition of lang_hooks to...
11416         * cp-lang.c: ... new file.
11417
11418 2001-10-08  Richard Henderson  <rth@redhat.com>
11419
11420         * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
11421         (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
11422
11423 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11424
11425         * class.c (build_vtable_entry_ref): Const-ify.
11426         * decl.c (predefined_identifier,
11427         initialize_predefined_identifiers): Likewise.
11428         * init.c (build_new_1): Likewise.
11429         * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
11430         Likewise.
11431
11432 2001-10-05  Alexandre Oliva  <aoliva@redhat.com>
11433
11434         * optimize.c (struct inline_data): Moved to ../tree-inline.c.
11435         (INSNS_PER_STMT): Likewise.
11436         (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
11437         (copy_body, initialize_inlined_parameters): Likewise.
11438         (declare_return_variable, inlinable_function_p): Likewise.
11439         (expand_call_inline, expand_calls_inline): Likewise.
11440         (optimize_inline_calls, clone_body): Likewise.
11441         * tree.c (walk_tree): Moved to ../tree-inline.c.
11442         (walk_tree_without_duplicates): Likewise.
11443         (copy_tree_r, remap_save_expr): Likewise.
11444
11445 2001-10-04  Alexandre Oliva  <aoliva@redhat.com>
11446
11447         * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
11448         (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
11449         * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
11450         (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
11451         (flag_inline_trees): Moved declaration to ../tree-inline.h.
11452         (walk_tree): Moved declaration to ../tree-inline.h.
11453         (walk_tree_without_duplicates, copy_tree_r): Likewise.
11454         (remap_save_expr): Likewise.
11455         * decl.c: Include tree-inline.h.
11456         (lang_mark_tree): Don't mark inlined_fns.
11457         * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
11458         * optimize.c: Include tree-inline.h.
11459         (optimize_inline_calls): Move declaration to ../tree.h, as
11460         non-static.
11461         (remap_decl): Use language-independent constructs and hooks.
11462         (remap_block, copy_body_r, declare_return_variable): Likewise.
11463         (inlinable_function_p): Likewise.  Don't test for
11464         DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
11465         no longer language-specific.
11466         (optimize_inline_calls): Likewise.  Make it non-static.  Moved
11467         call of dump_function to...
11468         (optimize_function): Here...
11469         (clone_body): New function, extracted from...
11470         (maybe_clone_body): ... here.  Build decl_map locally and pass
11471         it on to clone_body.
11472         * pt.c, semantics.c: Include tree-inline.h.
11473         * tree.c: Likewise.
11474         (cp_walk_subtrees): New language-specific hook for tree inlining.
11475         (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
11476         cp_is_overload_p, cp_auto_var_in_fn_p,
11477         cp_copy_res_decl_for_inlining): Likewise.
11478         (walk_tree): Move language-specific constructs into...
11479         (cp_walk_subtrees): this new function.
11480         (copy_tree_r): Use language-independent constructs and hooks.
11481         (init_tree): Initialize tree inlining hooks.
11482         (remap_save_expr): Adjust prototype so that the declaration
11483         does not require the definition of splay_tree.
11484
11485 2001-10-03  John David Anglin  <dave@hiauly1.hia.nrc.ca>
11486
11487         * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
11488         to build the declaration instead of the declaration itself.
11489
11490 2001-10-02  Jason Merrill  <jason_merrill@redhat.com>
11491
11492         * decl2.c (cxx_decode_option): Add 'else'.
11493
11494         * spew.c (end_input): No longer static.
11495         * cp-tree.h: Declare it.
11496         * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
11497
11498 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
11499
11500         * call.c (build_over_call), typeck.c (build_function_call_real):
11501         Pass type attributes to check_function_format rather than name or
11502         assembler name.  Don't require there to be a name or assembler
11503         name to check formats.
11504
11505 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
11506
11507         * decl.c (init_decl_processing): Don't call
11508         init_function_format_info.  Initialize lang_attribute_table
11509         earlier.
11510         (builtin_function): Call decl_attributes.
11511         (insert_default_attributes): New.
11512
11513 2001-10-01  Jason Merrill  <jason_merrill@redhat.com>
11514
11515         * decl.c (grokdeclarator): Copy array typedef handling from C
11516         frontend.
11517
11518         * decl.c (grokdeclarator): Copy too-large array handling from C
11519         frontend.
11520
11521 2001-09-29  Alexandre Oliva  <aoliva@redhat.com>
11522
11523         * config-lang.in (target_libs): Added target-gperf, so that we
11524         don't try to build it if C++ is disabled.
11525
11526 2001-09-23  Zack Weinberg  <zack@codesourcery.com>
11527
11528         * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
11529         (cp/errfn.o): Delete rule.
11530         (cp/error.o): Depend on flags.h.
11531         * errfn.c: Delete file.
11532         * cp-tree.h: Declare warn_deprecated.  Remove definitions of
11533         TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
11534         and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
11535         cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
11536         internal_error respectively.  Make cp_deprecated into a macro.
11537         Don't define cp_printer typedef or declare cp_printers.
11538         * error.c: Include flags.h.
11539         Delete: struct tree_formatting_info, print_function_argument_list,
11540         print_declaration, print_expression, print_function_declaration,
11541         print_function_parameter, print_type_id, print_cv_qualifier_seq,
11542         print_type_specifier_seq, print_simple_type_specifier,
11543         print_elaborated_type_specifier, print_rest_of_abstract_declarator,
11544         print_parameter_declaration_clause, print_exception_specification,
11545         print_nested_name_specifier, and definition of cp_printers.
11546         (locate_error): New function.
11547         (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
11548         rewritten in terms of locate_error and diagnostic.c.
11549         (cp_tree_printer): Rename cp_printer; wire up to *_to_string
11550         instead of deleted print_* routines.  Handle %C, %L, %O, %Q also.
11551         (init_error): Adjust to match.
11552
11553 2001-09-22  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11554
11555         * Make-lang.in (CXX_C_OBJS): Add attribs.o.
11556
11557 2001-09-21  Richard Henderson  <rth@redhat.com>
11558
11559         * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
11560         (build_vtbl_initializer): Likewise.
11561         (build_vfn_ref): New.
11562         * cp-tree.h: Declare it.
11563         * call.c (build_over_call): Use it.
11564         * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
11565         * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
11566
11567 2001-09-21  J"orn Rennecke <amylaar@redhat.com>
11568
11569         * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
11570
11571 2001-09-21  Joseph S. Myers  <jsm28@cam.ac.uk>
11572
11573         Table-driven attributes.
11574         * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
11575         * decl2.c (cplus_decl_attributes): Only take one attributes
11576         parameter.
11577         * cp-tree.c (cplus_decl_attributes): Update prototype.
11578         * class.c (finish_struct), decl.c (start_decl, start_function),
11579         decl2.c (grokfield), friend.c (do_friend), parse.y
11580         (parse_bitfield): Update calls to cplus_decl_attributes.
11581         * decl.c (grokdeclarator): Take a pointer to a single ordinary
11582         attribute list.
11583         * decl.h (grokdeclarator): Update prototype.
11584         * decl2.c (grokfield): Take a single ordinary attribute list.
11585         * friend.c (do_friend): Likewise.
11586         * decl.c (shadow_tag, groktypename, start_decl,
11587         start_handler_parms, grokdeclarator, grokparms, start_function,
11588         start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
11589         parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
11590         (process_template_parm, do_decl_instantiation): Pass single
11591         ordinary attribute lists around.
11592         * decl.c (grokdeclarator): Correct handling of nested attributes.
11593         Revert the patch
11594         1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
11595                 * decl.c (grokdeclarator): Embedded attrs bind to the right,
11596                 not the left.
11597         .
11598         * cp-tree.h (cp_valid_lang_attribute): Remove declaration
11599         (cp_attribute_table): Declare.
11600         * decl.c (valid_lang_attribute): Don't define.
11601         (lang_attribute_table): Define.
11602         (init_decl_processing): Initialize lang_attribute_table instead of
11603         valid_lang_attribute.
11604         * tree.c (cp_valid_lang_attribute): Remove.
11605         (handle_java_interface_attribute, handle_com_interface_attribute,
11606         handle_init_priority_attribute): New functions.
11607         (cp_attribute_table): New array.
11608         * decl2.c (import_export_class): Don't use
11609         targetm.valid_type_attribute.
11610
11611 2001-09-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
11612
11613         * Make-lang.in (cp/error.o): Depend on real.h
11614         * error.c: #include "real.h"
11615
11616 2001-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11617
11618         * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
11619         xmalloc/strcpy/strcat.
11620
11621 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11622
11623         * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
11624         Const-ification.
11625         * pt.c (tsubst_decl): Likewise.
11626
11627 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11628
11629         * decl2.c (lang_f_options): Const-ification.
11630         * lex.c (cplus_tree_code_name): Likewise.
11631         * spew.c (yyerror): Likewise.
11632
11633 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
11634
11635         PR c++/3986
11636         * class.c (force_canonical_binfo_r): Check & move an indirect
11637         primary base first.
11638         (force_canonical_binfo): Check that it's not already
11639         canonical.
11640         (mark_primary_virtual_base): Remove BINFO parameter.
11641         (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
11642
11643 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
11644
11645         Remove TYPE_NONCOPIED_PARTS.
11646         * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
11647         CLASSTYPE_PURE_VIRTUALS.
11648         (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
11649         * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
11650         (layout_class_type): Don't call fixup_inline_methods here ...
11651         (finish_struct_1): ... call it here.
11652
11653 2001-09-04  Mark Mitchell  <mark@codesourcery.com>
11654
11655         * decl.c (duplicate_decls): Remove code deadling with
11656         DECL_SAVED_INSNS.
11657         * decl2.c (finish_file): Likewise.
11658         * pt.c (instantiate_decl): Likewise.
11659         * semantics.c (expand_body): Don't defer local functions if
11660         they wouldn't be deferred for some other reason.  Don't
11661         generate RTL for functions that will not be emitted.
11662         (genrtl_start_function): Remove code deadling with
11663         DECL_SAVED_INSNS.
11664         (genrtl_finish_function): Likewise.
11665
11666 2001-09-04  Nathan Sidwell  <nathan@codesourcery.com>
11667
11668         PR c++/4203
11669         * call.c (build_over_call): Do not optimize any empty base
11670         construction.
11671
11672 2001-08-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11673
11674         * error.c (dump_template_decl): Output template parameters
11675         together with their specifiers.
11676         Output `class' prefix for template template parameter.
11677         (dump_decl): Fix formatting.
11678
11679 2001-08-30  Kurt Garloff  <garloff@suse.de>
11680
11681         * optimize.c (inlinable_function_p): Allow only smaller single
11682         functions. Halve inline limit after reaching recursive limit.
11683
11684 2001-08-30  Joern Rennecke <amylaar@redhat.com>
11685             Jason Merrill  <jason_merrill@redhat.com>
11686
11687         * class.c (build_vtable_entry_ref): Subtract in char*, not
11688         ptrdiff_t.
11689
11690 2001-08-23  Jason Merrill  <jason_merrill@redhat.com>
11691
11692         * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
11693         (build_cplus_array_type): Use cp_build_qualified_type, not
11694         TYPE_MAIN_VARIANT, to get an unqualified version.
11695
11696         * decl2.c (grok_alignof): Lose.
11697         (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
11698         * typeck.c (c_alignof): Lose.
11699         * semantics.c (finish_sizeof, finish_alignof): New.
11700         * parse.y: Use them.
11701         * cp-tree.h: Declare them.
11702
11703 2001-08-22  Jason Merrill  <jason_merrill@redhat.com>
11704
11705         * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
11706         Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
11707         * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
11708
11709 2001-08-19  Jakub Jelinek  <jakub@redhat.com>
11710
11711         * typeck2.c (add_exception_specifier): Only require complete type if
11712         not in processing template declaration.
11713
11714 2001-08-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11715
11716         * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
11717         GNU_xref_start_scope and GNU_xref_end_scope.
11718
11719         * tree.c (TYPE_HASH): Moved to ../tree.h.
11720
11721 2001-08-16  Mark Mitchell  <mark@codesourcery.com>
11722
11723         * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
11724         on COMPOUND_EXPRs.
11725
11726 2001-08-14  Richard Henderson  <rth@redhat.com>
11727
11728         * class.c, cp-tree.h (build_vfn_ref): Remove.
11729         * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
11730
11731 2001-08-13  Mark Mitchell  <mark@codesourcery.com>
11732
11733         * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
11734         empty class assignment as having side-effects to avoid
11735         spurious warnings.
11736
11737 2001-08-13  Zack Weinberg  <zackw@panix.com>
11738
11739         * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
11740         * except.c: Include libfuncs.h.
11741
11742 2001-08-11  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
11743
11744         * decl.c (grokdeclarator): Clarify diagnostic message.
11745
11746 2001-08-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11747
11748         * decl2.c (do_nonmember_using_decl): Replace using directive
11749         with using declaration in the error message.
11750
11751 2001-08-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11752
11753         * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
11754         criterion to avoid rebuilding expression tree instead of
11755         processing_template_decl.
11756
11757 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
11758
11759         Support named return value optimization for inlines, too.
11760         * decl.c (finish_function): Nullify returns here.
11761         * semantics.c (genrtl_start_function): Not here.
11762         (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
11763         (nullify_returns_r): No longer static.  Just clear RETURN_EXPR.
11764         Also nullify the CLEANUP_STMT for the nrv.
11765         * cp-tree.h: Declare it.
11766         * optimize.c (declare_return_variable): Replace the nrv with the
11767         return variable.
11768         * typeck.c (check_return_expr): Be more flexible on alignment check.
11769         Ignore cv-quals when checking for a matching type.
11770
11771 2001-08-09  Richard Henderson  <rth@redhat.com>
11772
11773         * decl2.c (finish_objects): Use target hooks instead of
11774         assemble_constructor and assemble_destructor.
11775
11776 2001-08-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
11777
11778         * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
11779
11780 2001-08-07  Nathan Sidwell  <nathan@codesourcery.com>
11781
11782         PR c++/3820
11783         Stop using TYPE_NONCOPIED_PARTS.
11784         * call.c (build_over_call): Be careful when copy constructing
11785         or assigning to an empty class.
11786         * class.c (check_bases_and_members): It has a
11787         COMPLEX_ASSIGN_REF if it has a vptr.
11788         (layout_class_type): Don't add empty class padding to
11789         TYPE_NONCOPIED_PARTS.
11790         (finish_struct_1): Don't add the VFIELD either.
11791         * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
11792         initialization.
11793
11794 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
11795
11796         * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
11797
11798 2001-08-06  Richard Henderson  <rth@redhat.com>
11799
11800         * decl2.c (finish_objects): Pass a symbol_ref and priority to
11801         assemble_{constructor,destructor}.  Remove priority handling.
11802
11803 2001-08-05  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
11804
11805         Don't allow template-id in using-declaration.
11806         * decl2.c (validate_nonmember_using_decl): Handle template-ids.
11807         (do_class_using_decl): Likewise.
11808
11809 2001-08-04  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
11810
11811         * cp/spew.c (read_token): No need to pop buffers.
11812
11813 2001-08-02  Stan Shebs  <shebs@apple.com>
11814
11815         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
11816         (fnaddr_from_vtable_entry): Remove decl.
11817         * method.c (use_thunk): Update comment.
11818
11819 2001-08-01  Andrew Cagney  <ac131313@redhat.com>
11820
11821         * repo.c (get_base_filename): Change return value to const char
11822         pointer.
11823
11824 2001-08-02  Nathan Sidwell  <nathan@codesourcery.com>
11825
11826         Kill -fhonor-std.
11827         * NEWS: Document.
11828         * cp-tree.h (flag_honor_std): Remove.
11829         (CPTI_FAKE_STD): Remove.
11830         (std_node): Remove comment about it being NULL.
11831         (fake_std_node): Remove.
11832         * decl.c (in_fake_std): Remove.
11833         (walk_namespaces_r): Remove fake_std_node check.
11834         (push_namespace): Remove in_fake_std code.
11835         (pop_namespace): Likewise.
11836         (lookup_name_real): Remove fake_std_node check.
11837         (init_decl_processing): Always create std_node. Always add
11838         std:: things there.
11839         (builtin_function): Always put non '_' fns in std.
11840         * decl2.c (flag_honor_std): Remove.
11841         (lang_f_options): Remove honor-std.
11842         (unsupported_options): Add honor-std.
11843         (set_decl_namespace): Remove fake_std_node check.
11844         (validate_nonmember_using_decl): Likewise.
11845         (do_using_directive): Likewise.
11846         (handle_class_head): Likewise.
11847         * dump.c (cp_dump_tree): Likewise.
11848         * except.c (init_exception_processing): Adjust.
11849         * init.c (build_member_call): Remove fake_std_node check.
11850         (build_offset_ref): Likewise.
11851         * lang-options.h: Remove -fhonor-std, -fno-honor-std.
11852         * rtti.c (init_rtti_processing): Adjust.
11853
11854 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
11855
11856         * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
11857         operand while calling cp_tree_equal.
11858
11859 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
11860
11861         The 3.0 ABI no longer has vbase pointer fields.
11862         * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
11863         FORMAT_VBASE_NAME): Remove.
11864         * method.c (do_build_copy_constructor): Adjust.
11865         (do_build_assign_ref): Adjust.
11866         * search.c (lookup_field_r): Adjust.
11867         * typeck.c (build_component_ref): Adjust.
11868
11869         The 3.0 ABI always has a vtable pointer at the start of every
11870         polymorphic class.
11871         * rtti.c (build_headof_sub): Remove.
11872         (build_headof): Adjust.
11873         (get_tinfo_decl_dynamic): No need to check flag_rtti
11874         here. Adjust.
11875         (create_real_tinfo_var): Explain why we need a hidden name.
11876
11877 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
11878
11879         PR c++/3631
11880         * class.c (update_vtable_entry_for_fn): The fixed adjustment
11881         of a virtual thunk should be from declaring base.
11882
11883 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
11884
11885         * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
11886         the shared virtual base, so preserving inheritance graph order.
11887
11888 2001-07-30  Andreas Jaeger  <aj@suse.de>
11889
11890         * decl2.c: Remove unused var global_temp_name_counter.
11891
11892 2001-07-28  Richard Henderson  <rth@redhat.com>
11893
11894         * method.c (pending_inlines): Remove.
11895
11896 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
11897
11898         * class.c (mark_primary_virtual_base): Don't adjust base
11899         offsets here.
11900         (dfs_unshared_virtual_bases): Adjust them here.
11901         (mark_primary_bases): Explain why we adjust at the end.
11902
11903 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
11904
11905         * class.c (finish_struct_1): When copying the primary base's
11906         VFIELD, make sure we find it is at offset zero.
11907
11908 2001-07-26  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11909
11910         * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
11911         tsubst_expr for default template arguments.
11912
11913 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
11914
11915         PR c++/3621
11916         * spew.c (yylex): Only copy the token's lineno, if it is
11917         nonzero.
11918
11919 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
11920
11921         PR c++/3624
11922         * call.c (resolve_args): Simplify, call
11923         convert_from_reference.
11924         (build_new_op): Resolve and convert from reference ARG1
11925         earlier. Adjust ARG2 & ARG3 resolve and conversion.
11926
11927 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
11928
11929         * decl.c (last_function_parm_tags): Remove.
11930         (current_function_parm_tags): Remove.
11931         (init_decl_processing): Adjust.
11932         (start_function): Adjust.
11933         (store_parm_decls): Adjust.
11934
11935         PR c++/3152
11936         * decl.c (grokdeclarator): Detect when a function typedef is
11937         declaring a function, and create last_function_parms correctly.
11938
11939 2001-07-25  Jason Merrill  <jason_merrill@redhat.com>
11940
11941         * call.c (joust): Only prefer a non-builtin candidate to a builtin
11942         one if they have the same signature.
11943
11944         * cvt.c (build_up_reference): Take DECL parm.  Check TREE_STATIC on
11945         it rather than toplevel_bindings_p.  Give it a mangled name if static.
11946         (convert_to_reference): Adjust.
11947         * decl2.c (get_temp_name): Lose.
11948         * mangle.c (mangle_ref_init_variable): New fn.
11949         (mangle_guard_variable): Strip the ref-init header.
11950         * cp-tree.h: Adjust.
11951         * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
11952         initializer.
11953         (grok_reference_init): Always use DECL_INITIAL.
11954
11955 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
11956
11957         PR c++/3416
11958         * call.c (build_conditional_expr): Recheck args after
11959         conversions.
11960         * cp-tree.h (build_conditional_expr): Move to correct file.
11961         * typeck.c (decay_conversion): Diagnose any unknown types
11962         reaching here.
11963         (build_binary_op): Don't do initial decay or default
11964         conversions on overloaded functions.
11965         (build_static_cast): Don't do a decay conversion here.
11966
11967 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
11968
11969         PR c++/3543
11970         * typeck.c (condition_conversion): Resolve an OFFSET_REF.
11971         * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
11972
11973 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
11974
11975         * class.c (build_vtbl_or_vbase_field): Remove, move into ...
11976         (create_vtbl_ptr): ... here.
11977
11978 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
11979
11980         * class.c (build_vbase_offset_vbtl_entries): Look for
11981         non-primary base of which we are a sub vtable.
11982
11983 2001-07-24  Phil Edwards  <pme@sources.redhat.com>
11984
11985         * semantics.c (finish_this_expr):  Remove unused code.
11986
11987 2001-07-24  Nathan Sidwell  <nathan@codesourcery.com>
11988
11989         Simplify rtti, now we've only one ABI.
11990         * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
11991         CPTI_TINFO_VAR_ID.
11992         (tinfo_decl_id, tinfo_var_id): Remove.
11993         (get_typeid_1): Remove.
11994         * rtti.c
11995         (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
11996         (typeid_ok_p): New function.
11997         (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
11998         (get_tinfo_decl): Remove old abi documentation.
11999         (tinfo_from_decl): Remove.
12000         (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
12001         (get_typeid_1): Remove.
12002         (get_base_offset): Remove.
12003         (synthesize_tinfo_var): Absorb get_base_offset.
12004         (create_real_tinfo_var): Don't use tinfo_decl_id.
12005
12006 2001-07-23  Graham Stott  <grahams@redhat.com>
12007
12008         * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
12009         variable has_two_argument_delete_p.
12010
12011 2001-07-21  Nathan Sidwell  <nathan@codesourcery.com>
12012
12013         Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
12014         * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
12015         (CPTI_INDEX_IDENTIFIER): Remove.
12016         (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
12017         (delta2_identifier): Remove.
12018         (index_identifier): Remove.
12019         (pfn_or_delta2_identifier): Remove.
12020         (flag_vtable_thunks): Remove.
12021         (VTABLE_DELTA2_NAME): Remove.
12022         (VTABLE_INDEX_NAME): Remove.
12023         (FNADDR_FROM_VTABLE_ENTRY): Adjust.
12024         (vfunc_ptr_type_node): Adjust.
12025         (VTABLE_NAME_PREFIX): Adjust.
12026         (build_vfn_ref): Lose first parameter.
12027         (fixup_all_virtual_upcast_offsets): Remove.
12028         * decl.c (initialize_predefined_identifiers): Remove
12029         delta2_identifier, index_identifier, pfn_or_delta2_identifier.
12030         (init_decl_processing): Remove no-vtable-thunk code.
12031         * decl2.c (flag_vtable_thunks): Remove.
12032         (mark_vtable_entries): Remove no-vtable-thunk code.
12033         * error.c (dump_decl): Remove no-vtable-thunk code.
12034         (dump_expr): Adjust ptr to member function code.
12035         * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
12036         code.
12037         * rtti.c (build_headof): Remove no-vtable-thunk code.
12038         (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
12039         * search.c (get_base_distance): Remove expand_upcast_fixups case.
12040         (virtual_context) Remove.
12041         (expand_upcast_fixups): Remove.
12042         (fixup_virtual_upcast_offsets): Remove.
12043         (fixup_all_virtual_upcast_offsets): Remove.
12044         * typeck.c (get_member_function_from_ptrfunc): Remove
12045         no-vtable-thunk code.
12046         * call.c (build_over_call): Adjust call to build_vfn_ref.
12047         * class.c (build_vfn_ref): Lose first parameter. Remove
12048         no-vtable-thunk code.
12049         (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
12050         (build_vtable_entry): Remove no-vtable-thunk code.
12051
12052 2001-07-20  Nathan Sidwell  <nathan@codesourcery.com>
12053
12054         Remove old-abi remnants. Remove comments about old abi
12055         behavior. Remove references to 'new-abi' in comments.
12056         * cp-tree.h: Adjust comments.
12057         (vbase_offsets_in_vtable_p): Delete.
12058         (vcall_offsets_in_vtable_p): Delete.
12059         (vptrs_present_everywhere_p): Delete.
12060         (all_overridden_vfuns_in_vtables_p): Delete.
12061         (merge_primary_and_secondary_vtables_p): Delete.
12062         (TYPE_CONTAINS_VPTR_P): Adjust.
12063         (VTT_NAME_PREFIX): Remove.
12064         (CTOR_VTBL_NAME_PREFIX): Remove.
12065         (init_vbase_pointers): Remove.
12066         * class.c: Adjust coments.
12067         (build_vbase_pointer_fields): Delete.
12068         (build_vbase_pointer): Remove old-abi code.
12069         (build_secondary_vtable): Likewise.
12070         (modify_all_vtables): Likewise.
12071         (create_vtable_ptr): Likewise.
12072         (layout_class_type): Likewise.
12073         (finish_struct_1): Likewise.
12074         (finish_vtbls): Likewise.
12075         (dfs_finish_vtbls): Delete.
12076         (build_vbase_offset_vtbl_entries): Remove old-abi code.
12077         * cvt.c: Adjust comments.
12078         * decl.c: Adjust comments.
12079         * decl2.c: Adjust comments.
12080         * init.c: Adjust comments.
12081         (construct_virtual_bases): Remove old-abi code.
12082         * lang-specs.h: Remove -fno-new-abi.
12083         * mangle.c: Adjust comments.
12084         * rtti.c: Adjust comments.
12085         (get_base_offset): Remove old-abi-code.
12086         * search.c: Adjust comments.
12087         (dfs_init_vbase_pointers): Remove.
12088         (dfs_vtable_path_unmark): Remove.
12089         (init_vbase_pointers): Remove.
12090         * semantics.c: Adjust comments.
12091         (emit_associated_thunks): Remove old-abi code.
12092         * typeck.c: Adjust comments.
12093
12094 2001-07-20  Daniel Berlin  <dan@cgsoftware.com>
12095
12096         * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
12097         params.h.
12098
12099 2001-07-19  Mark Mitchell  <mark@codesourcery.com>
12100
12101         * class.c (finish_struct_anon): Forbid nested classes.
12102
12103 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
12104
12105         * decl2.c: Don't include dwarfout.h and dwarf2out.h.
12106         * optimize.c: Include debug.h.
12107         (maybe_clone_body): Use debug hook.
12108         * semantics.c: Include debug.h.
12109         (expand_body): Use debug hook.
12110
12111 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
12112
12113         * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
12114
12115 2001-07-18  Mark Mitchell  <mark@codesourcery.com>
12116
12117         * class.c (type_requires_array_cookie): New function.
12118         (check_methods): Don't try to figure out whether the type needs a
12119         cookie here.
12120         (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
12121         * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
12122         (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
12123         * pt.c (instantiate_class_template): Don't set
12124         TYPE_VEC_DELETE_TAKES_SIZE.
12125         * NEWS: Document ABI changes from GCC 3.0.
12126
12127 2001-07-18  Xavier Delacour <xavier@fmaudio.net>,
12128             Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
12129
12130         * NEWS (Changes in GCC 3.0): Fix typo.
12131
12132 2001-07-13  Joseph S. Myers  <jsm28@cam.ac.uk>
12133
12134         * decl2.c (cplus_decl_attributes): Take a pointer to the node to
12135         which attributes are to be attached, and a flags argument.  Update
12136         call to decl_attributes.
12137         (grokfield): Update call to decl_attributes.
12138         * class.c (finish_struct): Update call to cplus_decl_attributes.
12139         * cp-tree.h (cplus_decl_attributes): Update prototype.
12140         * decl.c (start_decl, grokdeclarator, start_function): Update
12141         calls to decl_attributes and cplus_decl_attributes.
12142         * friend.c (do_friend): Update call to cplus_decl_attributes.
12143         * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
12144
12145 2001-07-12  Mark Mitchell  <mark@codesourcery.com>
12146
12147         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
12148         for `register' variables with an asm-specification.
12149
12150 2001-07-11  Mark Mitchell  <mark@codesourcery.com>
12151
12152         * semantics.c (finish_asm_stmt): Mark the output operands
12153         to an asm addressable, if necessary.
12154
12155 2001-07-11  Ben Elliston  <bje@redhat.com>
12156
12157         * Revert this change -- there is a subtle bug.
12158
12159         PR c++/80
12160         * decl.c (finish_enum): New "attributes" argument; pass it to
12161         cplus_decl_attributes.  Use a narrower type if the enum is packed.
12162         * cp-tree.h (finish_enum): Adjust prototype.
12163         * parse.y (enum_head): New non-terminal.
12164         (structsp): Use it. Enums now may be preceded or followed by
12165         optional attributes -- pass their chained tree to finish_enum().
12166         * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
12167
12168 2001-07-10  Mark Mitchell  <mark@codesourcery.com>
12169
12170         * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
12171         variables.
12172
12173 2001-07-10  Jason Merrill  <jason_merrill@redhat.com>
12174
12175         * semantics.c (cp_expand_stmt): Fix for null
12176         current_function_return_value.
12177
12178 2001-07-10  Jan van Male  <jan.vanmale@fenk.wau.nl>
12179
12180         * call.c (build_op_delete_call): Initialize fn.
12181         (convert_like_real): Delete conditional.
12182         (joust): Initialize *w and *l.
12183         * class.c: Add prototype for binfo_ctor_vtable.
12184         (get_primary_binfo): Initialize result.
12185         * init.c (build_java_class_ref): Initialize name.
12186
12187 2001-07-09  Erik Rozendaal  <dlr@acm.org>
12188
12189         * typeck.c (unary_complex_lvalue): Do not duplicate the
12190         argument to modify, pre-, or post-increment when used as an
12191         lvalue and when the argument has side-effects.
12192
12193 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
12194
12195         * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
12196         (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES.  Call
12197         cplus_decl_attributes even if attrs is NULL.
12198         * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
12199
12200 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
12201
12202         * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
12203         calls to decl_attributes.
12204
12205 2001-07-06  Ira Ruben   <ira@apple.com>
12206
12207         * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
12208         be DECL_TEMPLATE_RESULT.
12209
12210 2001-07-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12211
12212         * cp-tree.h (copy_template_template_parm): Rename to ...
12213         (bind_template_template_parm): ... here.
12214         * tree.c (copy_template_template_parm): Rename to ...
12215         (bind_template_template_parm): ... here.  Remove the case when
12216         NEWARGS is NULL_TREE.
12217         (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
12218         BOUND_TEMPLATE_TEMPLATE_PARM.
12219         * pt.c (lookup_template_class): Adjust.
12220
12221 2001-07-05  Jason Merrill  <jason_merrill@redhat.com>
12222
12223         * cvt.c (convert_lvalue): New fn.
12224         * cp-tree.h: Declare it.
12225         * method.c (do_build_assign_ref): Use it.
12226         (do_build_copy_constructor): Convert parm to base types
12227         before calling base constructors.
12228
12229         * typeck.c (check_return_expr): Check DECL_ALIGN instead of
12230         DECL_USER_ALIGN.  Check flag_elide_constructors instead of
12231         optimize.
12232         * semantics.c (cp_expand_stmt): Don't destroy the named return value.
12233
12234 2001-07-02  Nathan Sidwell  <nathan@codesourcery.com>
12235
12236         * optimize.c (optimize_inline_calls): New function, broken out
12237         of ...
12238         (optimize_function): ... here. Call it. Don't inline if it is
12239         a thunk.
12240         (dump_function): Print name of dump flag causing this dump.
12241         * semantics.c (expand_body): Move thunk inline check to
12242         optimize_function.
12243
12244 2001-06-29  Joseph S. Myers  <jsm28@cam.ac.uk>
12245
12246         * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
12247         (comptypes): Use target.comp_type_attributes.
12248
12249 2001-06-29  Nathan Sidwell  <nathan@codesourcery.com>
12250
12251         * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
12252
12253 2001-06-28  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
12254
12255         * error.c (lang_print_error_function): Add a `diagnostic_context *'
12256         parameter. Tweak.
12257
12258 2001-06-27  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
12259
12260         * decl2.c (import_export_class): Update.
12261
12262 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
12263
12264         * error.c (init_error): Adjust settings.
12265
12266 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
12267
12268         * error.c (init_error): Adjust settings.
12269
12270 2001-06-19  Richard Sandiford  <rsandifo@redhat.com>
12271
12272         * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
12273         return pointers to data members by reference rather than by value.
12274
12275 2001-06-18  Jason Merrill  <jason_merrill@redhat.com>
12276
12277         Implement the Named Return Value optimization.
12278         * cp-tree.h (struct cp_language_function): Add x_return_value.
12279         (current_function_return_value): Now a macro.
12280         * decl.c: Don't define it.
12281         (define_label, finish_case_label): Don't clear it.
12282         (init_decl_processing): Don't register it with GC.
12283         * semantics.c (genrtl_finish_function): Don't check it for
12284         no_return_label.  Copy the RTL from the return value to
12285         current_function_return_value and walk, calling...
12286         (nullify_returns_r): ...this new fn.
12287         * typeck.c (check_return_expr): Set current_function_return_value.
12288
12289 2001-06-15  Jason Merrill  <jason_merrill@redhat.com>
12290
12291         * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
12292         sharing a ctor vtable with.  Merge code for cases 1 and 2.
12293         (binfo_ctor_vtable): New fn.
12294         (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
12295
12296 2001-06-14  Jason Merrill  <jason_merrill@redhat.com>
12297
12298         * class.c (dfs_find_final_overrider): Fix logic.
12299
12300         * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
12301         virtual thunk instead of non-virtual.
12302         (get_matching_virtual): Uncomment.
12303
12304         * pt.c (unify): Don't recurse between the POINTER_TYPE and the
12305         OFFSET_TYPE.  If we're adding cv-quals, the extra ones would be on
12306         PARM, not ARG.
12307
12308 2001-06-14  Nathan Sidwell  <nathan@codesourcery.com>
12309
12310         * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
12311         we've not emerged from the hierarchy of RTTI_BINFO on reaching
12312         a non-virtual base.
12313
12314 2001-06-13  Mark Mitchell  <mark@codesourcery.com>
12315
12316         * NEWS: Update release number.
12317
12318 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
12319
12320         PR c++/3130, c++/3131, c++/3132
12321         * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
12322         * class.c (force_canonical_binfo_r): Move
12323         BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
12324         virtual bases unless they're primary and what they're primary
12325         too has been moved.
12326         (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
12327         with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
12328         BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
12329         derived binfo.
12330         (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
12331         (layout_nonempty_base_or_field): Add most derived type
12332         parameter. Adjust.
12333         (layout_empty_base): Likewise.
12334         (build_base_field): Likewise.
12335         (build_base_fields): Likewise.
12336         (propagate_binfo_offsets): Add most derived type
12337         parameter. Skip non canonical virtual bases too.
12338         (dfs_set_offset_for_unshared_vbases): Don't skip primary
12339         bases. Do skip canonical bases.
12340         (layout_virtual_bases): Adjust.
12341         (layout_class_type): Adjust.
12342         (dfs_get_primary_binfo): Build list of virtual primary base
12343         candidates.
12344         (get_primary_binfo): Check that the shared virtual primary
12345         base candidate was found first.
12346         (accumulate_vtbl_inits): Don't do anything for non-vptr
12347         containing binfos. For case 1 primary virtual bases, keep
12348         checking that we've not emerged from the hierarchy of RTTI_BINFO.
12349
12350 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
12351
12352         PR c++/3089
12353         * class.c (dfs_accumulate_vtbl_inits): Always walk down the
12354         hierarchy looking for primary bases for a ctor
12355         vtable. Recursively call oneself, if we meet our primary via
12356         this route and haven't met it yet via inheritance graph order.
12357
12358 2001-06-11  Mark Mitchell  <mark@codesourcery.com>
12359
12360         * lang-options.h: Emit documentation for -fno-honor-std, not
12361         -fhonor-std.
12362
12363 2001-06-10  Alexandre Oliva  <aoliva@redhat.com>
12364
12365         * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
12366         Don't clobber delta.
12367         (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
12368
12369 2001-06-10  Mark Mitchell <mark@codesourcery.com>
12370             Gabriel Dos Reis  <gdr@codesourcery.com>
12371
12372         * Make-lang.in (cp/call.o): Depend on diagnostic.h
12373         (cp/typeck.o): Depend on diagnostic.h
12374         (cp/typeck2.o): Depend on diagnostic.h
12375         (cp/repo.o): Depend on dignostic.h
12376         * typeck.c: #include diagnostic.h
12377         (convert_for_initialization): Remove extern declaration for
12378         warningcount and errorcount.
12379
12380         * call.c: #include diagnostic.h
12381         (convert_like_real): Remove extern declaration for warnincount and
12382         errorcount.
12383
12384         * repo.c: #include diagnostic.h
12385         * typeck2.c: #include diagnostic.h
12386
12387 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
12388
12389         * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
12390         in previous change.
12391
12392 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
12393
12394         PR c++/2929
12395         * friend.c (do_friend): Use push_decl_namespace for classes at
12396         namespace scope.
12397
12398 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
12399             Jason Merrill <jason_merrill@redhat.com>
12400
12401         PR c++/3061
12402         * class.c (build_secondary_vtable): Use assert, rather than an error
12403         message.
12404         (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
12405         (dfs_accumulate_vtbl_inits): A lost primary virtual base may
12406         be between ORIG_BINFO and RTTI_BINFO, but neither of them.
12407         Don't set BINFO_VTABLE for a primary virtual base.
12408
12409 2001-06-07  Mark Mitchell  <mark@codesourcery.com>
12410
12411         * decl.c (duplicate_decls): Update source position information
12412         when a template function is defined.
12413
12414 2001-06-07  Phil Edwards  <pme@sources.redhat.com>
12415
12416         * lang-specs.h:  Move -D_GNU_SOURCE to config/linux.h.
12417
12418 2001-06-07  Nathan Sidwell  <nathan@codesourcery.com>
12419
12420         PR c++/2914
12421         * decl.c (pushtag): Don't push into a complete type's scope.
12422
12423 2001-06-06  Jason Merrill  <jason_merrill@redhat.com>
12424
12425         * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
12426         (struct lang_decl_flags): Lose generate_with_vtable_p.
12427         (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
12428         * class.c (copy_virtuals): Adjust.
12429         * decl2.c (mark_vtable_entries): Adjust.
12430         * method.c (make_thunk, build_vtable_entry): Adjust.
12431         * class.c (update_vtable_entry_for_fn): Only look as far as the
12432         first defining class.
12433         (build_vtbl_initializer): Put nothing in the slot for a function only
12434         defined in a lost primary virtual base.
12435         (add_vcall_offset_vtbl_entries_1): Use the same code for
12436         the lost primary case and the normal case.
12437         (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
12438         (get_vfield_offset, get_derived_offset): Lose.
12439         (dfs_find_final_overrider): Use look_for_overrides_here.
12440         (get_matching_virtual): New fn.
12441         * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
12442         not BV_VCALL_INDEX.
12443         * search.c (look_for_overrides_here): Split out from...
12444         (look_for_overrides_r): Here.
12445
12446         * class.c (find_final_overrider): Return error_mark_node on error.
12447
12448         * decl2.c (key_method): #if 0 accidental change.
12449
12450 2001-06-06  John David Anglin  <dave@hiauly1.hia.nrc.ca>
12451
12452         * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
12453         (build_over_call): Likewise.
12454         * decl.c (grokparms): Likewise.
12455         * pt.c (tsubst_decl): Likewise.
12456         * typeck.c (convert_arguments): Likewise.
12457
12458 2001-06-05  Mark Mitchell  <mark@codesourcery.com>
12459
12460         * semantics.c (begin_class_definition): Robustify.
12461
12462         * pt.c (instantiate_decl): Tell the repository code about the
12463         clones, not the cloned functions.
12464         * repo.c (repo_template_used): Explicitly instantiate the cloned
12465         function, not the clones.
12466
12467 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
12468
12469         * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
12470         ICS_BAD_FLAG on created conversion.
12471         (compare_ics): Break out rank.
12472
12473 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
12474
12475         * decl.c (xref_tag): Remove extraneous %s on dependent name
12476         lookup warning.
12477
12478 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
12479
12480         * class.c (layout_vtable_decl): Fix off by one error on
12481         build_index_type.
12482         (build_vtt): Likewise.
12483         (build_ctor_vtbl_group): Likewise.
12484
12485 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
12486
12487         * class.c (maybe_indent_hierarchy): New function.
12488         (dump_class_hierarchy_r): Add flags. Dump extra binfo
12489         information, if enabled. Use maybe_indent_hierarchy. Adjust
12490         output format.
12491         (dump_class_hierarchy): Adjust prototype. Adjust output format.
12492         (dump_array, dump_vtable, dump_vtt): New functions.
12493         (finish_struct_1): Adjust hierarchy dumping.
12494         (initialize_vtable): Call dump_vtable.
12495         (build_vtt): Call dump_vtt.
12496         (build_ctor_vtbl_group): Call dump_vtable.
12497         * decl2.c (flag_dump_class_layout): Remove.
12498         (cxx_decode_option): Remove dump translation unit
12499         and dump class hierarchy check. Call dump_switch_p.
12500         (finish_file): Adjust dumping.
12501         (dump.c): Only dump base classes if not TDF_SLIM.
12502         Only dump namespace members if not TDF_SLIM.
12503         * optimize.c (dump_function): New function.
12504         (optimize_function): Call dump_function.
12505         * semantics.c (expand_body): Use dump_enabled_p.
12506
12507 2001-06-01  Nathan Sidwell  <nathan@codesourcery.com>
12508
12509         PR g++/2936
12510         Part missed from first commit
12511         * decl2.c (finish_anon_union): Copy context.
12512
12513 2001-05-30  Nathan Sidwell  <nathan@codesourcery.com>
12514
12515         PR g++/2936
12516         * optimize.c (remap_decl): Remap anonymous aggregate members too.
12517
12518 2001-05-26  Nathan Sidwell  <nathan@codesourcery.com>
12519
12520         PR g++/2823
12521         * semantics.c (expand_body): Don't optimize thunks.
12522
12523 2001-05-25  Sam TH  <sam@uchicago.edu>
12524
12525         * cp-tree.h lex.h: Fix header include guards.
12526
12527 2001-05-25  Mark Mitchell <mark@codesourcery.com>
12528
12529         * decl.c (init_decl_processing): Tweak.
12530
12531 2001-05-24  Mark Mitchell  <mark@codesourcery.com>
12532
12533         * decl.c (duplicate_decls): Tidy.
12534         (init_decl_processing): Always set flag_no_builtin.
12535
12536 2001-05-24  Nathan Sidwell  <nathan@codesourcery.com>
12537
12538         PR c++/2184
12539         * decl2.c (do_local_using_decl): Push the decls, even in a
12540         template.
12541
12542 2001-05-22  Mark Mitchell  <mark@codesourcery.com>
12543
12544         * optimize.c (initialize_inlined_parameters): Don't set
12545         TREE_READONLY for a VAR_DECL taking the place of an inlined
12546         PARM_DECL.
12547
12548 2001-05-22  Jason Merrill  <jason_merrill@redhat.com>
12549
12550         * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
12551         * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
12552         attribute.
12553
12554 2001-05-22  Joseph S. Myers  <jsm28@cam.ac.uk>
12555
12556         * parse.y: Refer to compound literals as such, not as
12557         constructor-expressions.
12558
12559 2001-05-21  Mark Mitchell  <mark@codesourcery.com>
12560
12561         * call.c (build_op_delete_call): Ignore exception-specifications
12562         when looking for matching delete operators.
12563         * init.c (build_new_1): Compute whether or not the allocation
12564         function used is a placement allocation function or not, and
12565         communicate this information to build_op_delete_call.
12566
12567 2001-05-21  Jason Merrill  <jason_merrill@redhat.com>
12568
12569         * class.c (build_vtable_entry_ref): Lose vtbl parm.  Fix for new abi.
12570         (build_vtbl_ref): Adjust.
12571         (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
12572         * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
12573         Re-add vtable-gc.
12574         (unsupported_options): Correspondingly.
12575
12576         * decl2.c (maybe_make_one_only): Check flag_weak, not
12577         supports_one_only().
12578
12579         * cp-tree.def (START_CATCH_STMT): Lose.
12580         * dump.c (cp_dump_tree): Don't dump it.  Do dump HANDLER_PARMS.
12581         * tree.c (cp_statement_code_p): Don't case it.
12582         * semantics.c (cp_expand_stmt): Likewise.
12583         * cp-tree.h (START_CATCH_TYPE): Lose.
12584         (HANDLER_TYPE): New.
12585         * except.c (expand_start_catch_block): Don't start any blocks.
12586         Return the type.
12587         (expand_end_catch_block): Don't end any blocks.
12588         * parse.y (handler): Don't pass anything from finish_handler_parms
12589         to finish_handler.
12590         * pt.c (tsubst_expr): Likewise.
12591         * semantics.c (begin_handler): Call note_level_for_catch here.
12592         (finish_handler_parms): Don't return anything.
12593         (genrtl_catch_block, begin_catch_block): Lose.
12594         (genrtl_handler): Call expand_start_catch here.
12595
12596 2001-05-18  Jason Merrill  <jason_merrill@redhat.com>
12597
12598         * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
12599         (get_vtable_decl, build_vtt): Not here.
12600
12601 2001-05-20  Nathan Sidwell  <nathan@codesourcery.com>
12602
12603         PR c++/2781
12604         * optimize.c (update_cloned_parm): Copy addressability and other
12605         flags.
12606
12607 2001-05-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12608
12609         * pt.c (determine_specialization): Ignore artificial functions.
12610
12611 2001-05-20  Neil Booth  <neil@daikokuya.demon.co.uk>
12612
12613         * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
12614         (C_RID_CODE): Remove.
12615         * lex.c (cxx_init_options): Call set_identifier_size.  Update.
12616         (init_parse): Don't do it here.
12617
12618 2001-05-18  Diego Novillo  <dnovillo@redhat.com>
12619
12620         * decl2.c (finish_objects): Use the original SYMBOL_REF from the
12621         function declaration to avoid stripping the symbol's attributes.
12622
12623 2001-05-18  Nathan Sidwell  <nathan@codesourcery.com>
12624
12625         * decl.c (pushdecl): Adjust error string.
12626         (xref_tag): Adjust friend class injection warning. Remove the
12627         inherited name from the class shadowed scope.
12628
12629 2001-05-17  Mark Mitchell  <mark@codesourcery.com>
12630
12631         * except.c (cp_protect_cleanup_actions): New function.
12632         (init_exception_processing): Don't set protect_cleanup_actions
12633         here.  Do set lang_protect_cleanup_actions.
12634
12635 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
12636
12637         * spew.c (read_token): Call yyerror on all unexpected tokens.
12638
12639 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
12640
12641         * init.c (member_init_ok_or_else): Take a tree rather than
12642         string for name.
12643         (expand_member_init): Adjust.
12644
12645 2001-05-14  Nick Clifton  <nickc@cambridge.redhat.com>
12646
12647         * decl.c (duplicate_decls): Suppress warning about duplicate
12648         decls if the first decl is a friend.
12649
12650 2001-05-12  Zack Weinberg  <zackw@stanford.edu>
12651
12652         * except.c (choose_personality_routine): Export.  Add
12653         explanatory comment.  Take an enum languages, not a boolean.
12654         (initialize_handler_parm): Adjust to match.
12655         * cp-tree.h: Prototype choose_personality_routine.
12656         * lex.c (handle_pragma_java_exceptions): New function.
12657         (init_cp_pragma): Register #pragma GCC java_exceptions.
12658
12659 2001-05-12  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
12660
12661         * method.c (build_mangled_C99_name): Remove unused prototype.
12662
12663 2001-05-12  Alexandre Oliva  <aoliva@redhat.com>
12664
12665         * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
12666         * typeck.c (get_member_function_from_ptrfunc,
12667         build_ptrmemfunc, expand_ptrmemfunc_cst): Take
12668         TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
12669
12670         Reverted Geoff Keating's 2001-05-03's patch.
12671
12672 2001-05-11  Ira Ruben   <ira@apple.com>
12673
12674         * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
12675
12676 2001-05-11  Neil Booth  <neil@daikokuya.demon.co.uk>
12677
12678         * cp-tree.h (finish_label_expr, lookup_label): Delete.
12679         * parse.y: Update for '&&'; don't issue warning here.
12680         * semantics.c (finish_label_expr): Delete.
12681
12682 2001-05-07  Mark Mitchell  <mark@codesourcery.com>
12683
12684         * splay-tree.h (splay_tree_max): New function.
12685         (splay_tree_min): Likewise.
12686
12687 2001-05-03  Geoffrey Keating  <geoffk@redhat.com>
12688
12689         * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
12690         (pfn_vflag_identifier): Define.
12691         Update comment about layout of pointer functions.
12692         (build_ptrmemfunc1): Update prototype.
12693         (expand_ptrmemfunc_cst): Update prototype.
12694         * decl.c (initialize_predefined_identifiers): Initialize
12695         pfn_vflag_identifier.
12696         (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
12697         an extra field to the type.
12698         * expr.c (cplus_expand_constant): Pass 'flag' between
12699         expand_ptrmemfunc_cst and build_ptrmemfunc1.
12700         * typeck.c (get_member_function_from_ptrfunc): When
12701         FUNCTION_BOUNDARY < 16, look at additional field to determine
12702         if a pointer-to-member is a real pointer or a vtable offset.
12703         (build_ptrmemfunc1): Add new parameter to contain extra field.
12704         (build_ptrmemfunc): Pass the extra field around.
12705         (expand_ptrmemfunc_cst): Add new parameter to return extra field.
12706         (pfn_from_ptrmemfunc): Ignore the extra field.
12707
12708 2001-05-03  Mark Mitchell  <mark@codesourcery.com>
12709
12710         * cp-tree.h (flag_inline_trees): Update documentation.
12711         * decl.c (init_decl_processing): Adjust handling of
12712         flag_inline_functions and flag_inline_trees to support -O3.
12713         (grokfndecl): Set DECL_INLINE on all functions if that's what
12714         the user requested.
12715         (save_function_data): Clear DECL_INLINE in
12716         current_function_cannot_inline is non-NULL.
12717         * decl2.c (flag_inline_trees): Update documentation.
12718
12719 2001-05-03  Nathan Sidwell  <nathan@codesourcery.com>
12720
12721         * dump.c (cp_dump_tree, USING_STMT case): New case.
12722         * tree.c (cp_statement_code_p): Add USING_STMT.
12723         * decl2.c (do_using_directive): Add the using directive statement.
12724
12725         * tree.c (walk_tree): Reformat an if block.
12726
12727 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
12728
12729         * decl.c (compute_array_index_type): Don't try to do anything with
12730         the indices when processing a template.
12731
12732 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12733
12734         * call.c: NULL_PTR -> NULL.
12735         * class.c: Likewise.
12736         * cvt.c: Likewise.
12737         * decl.c: Likewise.
12738         * decl2.c: Likewise.
12739         * except.c: Likewise.
12740         * init.c: Likewise.
12741         * rtti.c: Likewise.
12742         * search.c: Likewise.
12743         * tree.c: Likewise.
12744         * typeck.c: Likewise.
12745         * typeck2.c: Likewise.
12746
12747 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
12748
12749         * decl2.c (do_using_directive): Revert previous patch.
12750
12751 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
12752
12753         * cp-tree.def (USING_STMT): New statement node.
12754         * cp-tree.h (USING_STMT_NAMESPACE): New macro.
12755         * decl2.c (do_using_directive): Add USING_STMT to statement
12756         tree. Don't emit errors when processing template decl.
12757         * pt.c (tsubst_expr, USING_STMT case): New case.
12758         * semantics.c (cp_expand_stmt, USING_STMT case): New case.
12759
12760 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
12761
12762         * call.c (build_new_op): Convert args from reference here.
12763         (build_conditional_expr): Don't convert here.
12764
12765 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
12766
12767         * spew.c (last_token_id): New static variable.
12768         (read_token): Set it here.
12769         (yyerror): Use it here.
12770
12771 2001-04-30  Richard Henderson  <rth@redhat.com>
12772
12773         * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
12774         * decl.c: Likewise.
12775
12776 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
12777
12778         * gxxint.texi: Remove.
12779         * Make-lang.in: Remove all traces of gxxint.texi.
12780
12781 2001-04-30  Mark P Mitchell  <mark@codesourcery.com>
12782
12783         * decl2.c (start_static_initialization_or_destruction): Correct
12784         logic to handle the -fno-use-cxa-atexit case.
12785
12786 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
12787
12788         * optimize.c (update_cloned_parm): New function.
12789         (maybe_clone_body): Use it.  Update the `this' parameter too.
12790
12791 2001-04-29  Joseph S. Myers  <jsm28@cam.ac.uk>
12792
12793         * decl2.c (unsupported_options): Add new-abi.
12794         * lang-options.h: Remove no longer supported options.
12795
12796 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
12797
12798         * except.c (can_convert_eh): Don't check template parms,
12799         typename types etc.
12800
12801 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
12802
12803         * optimize.c (maybe_clone_body): Copy parameter names and locations.
12804
12805 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
12806
12807         * cp-tree.h (adjust_clone_args): Prototype new function.
12808         * class.c (adjust_clone_args): New function.
12809         * decl.c (start_function): Call it for in charge ctors.
12810
12811 2001-04-26  Mark Mitchell  <mark@codesourcery.com>
12812
12813         * method.c (use_thunk): Make sure that thunks really are emitted
12814         when requested.
12815
12816 2001-04-26  Nathan Sidwell <nathan@codesourcery.com>
12817
12818         * mangle.c (write_chars): New macro.
12819         (hwint_to_ascii): New function
12820         (write_number): Use it.
12821         (write_integer_cst): Deal with really big numbers.
12822
12823 2001-04-25  Mark Mitchell  <mark@codesourcery.com>
12824
12825         * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
12826         the clone.
12827
12828 2001-04-25  Nathan Sidwell  <nathan@codesourcery.com>
12829
12830         * decl.c (grokdeclarator): Set context of namespace scope
12831         TYPE_DECLS.
12832
12833 2001-04-24  Zack Weinberg  <zackw@stanford.edu>
12834
12835         * cp/optimize.c: Include hashtab.h.
12836         (struct inline_data): Add tree_pruner.
12837         (expand_call_inline, expand_calls_inline): Use it when calling
12838         walk_tree.
12839         (optimize_function): Initialize and free tree_pruner.
12840
12841 2001-04-24  Nathan Sidwell <nathan@codesourcery.com>
12842
12843         Lazy __FUNCTION__ generation.
12844         * cp-tree.def (FUNCTION_NAME): Remove.
12845         * cp-tree.h (function_name_declared_p): Remove.
12846         (cp_fname_init): Prototype.
12847         * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
12848         don't call declare_function_name. Call start_fname_decls.
12849         (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
12850         clobber the line number.
12851         (cp_fname_init): New function.
12852         (start_function): Call start_fname_decls.
12853         (finish_function): Call finish_fname_decls.
12854         * lex.c (reswords): Add slots for __FUNCTION__ et al.
12855         (rid_to_yy): Add mappings for __FUNCTION__ et al.
12856         * optimize.c (maybe_clone_body): Remove function_name_declared_p.
12857         * parse.y (VAR_FUNC_NAME): New token.
12858         (primary): Add VAR_FUNC_NAME.
12859         * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
12860         generation.
12861         (tsubst, FUNCTION_NAME case): Remove.
12862         (tsubst_copy, FUNCTION_NAME case): Remove.
12863         (tsubst_expr, DECL_STMT case): Be careful with a
12864         DECL_PRETTY_FUNCTION_P.
12865         (instantiate_decl): Remove function_name_declared_p.
12866         * semantics.c (begin_compound_statement): Don't call
12867         declare_function_name here.
12868         (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
12869         (finish_translation_unit): Call finish_fname_decls.
12870         (expand_body): Remove function_name_declared_p.
12871         * typeck2.c (digest_init): Allow any ERROR_MARK.
12872
12873 2001-04-24  Nathan Sidwell  <nathan@codesourcery.com>
12874
12875         * pt.c (tsubst_decl): Use VOID_TYPE_P.
12876         * semantics.c: Fix some typos.
12877
12878 2001-04-23  Phil Edwards  <pme@sources.redhat.com>
12879
12880         * cp/decl2.c (flag_honor_std):  Always initialize to 1.
12881
12882 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12883
12884         * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
12885
12886 2001-04-23  Jason Merrill  <jason_merrill@redhat.com>
12887
12888         * except.c (build_throw): Wrap the initialization of the exception
12889         object in a MUST_NOT_THROW_EXPR.
12890         (do_free_exception): #if 0.
12891
12892 2001-04-20  Mark Mitchell  <mark@codesourcery.com>
12893
12894         * cp-tree.h (finish_enum): Change prototype.
12895         * decl.c (finish_enum): Reorganize.
12896         * parse.y (structsp): Adjust calls to finish_enum.
12897
12898 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
12899
12900         * tree.c (cp_tree_equal): Adjust final switch formatting. Add
12901         't' case.
12902
12903 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
12904
12905         * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
12906         (layout_empty_base): Return at end flag.
12907         (build_base_field): Likewise.
12908         (build_base_fields): Likewise.
12909         (layout_virtual_bases): Don't add 1 to eoc value.
12910         (end_of_class): Use full size for empty bases.
12911         (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
12912         empty bases. Don't add 1 to eoc value. Only add trailing padding
12913         if we're an empty class with no empty bases.
12914         (dump_class_hierarchy): Dump size and alignment.
12915
12916 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
12917
12918         * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
12919         ICS_BAD_FLAG.
12920
12921 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
12922
12923         * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
12924         is found, look first if name does not match the structure name.
12925
12926 2001-04-19  Mark Mitchell  <mark@codesourcery.com>
12927
12928         * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
12929         set.
12930         (SET_DECL_LANGUAGE): New macro.
12931         * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
12932         (pushdecl): Likewise.
12933         (build_library_fn_1): Likewise.
12934         (build_cp_library_fn): Likewise.
12935         (grokfndecl): Likewise.
12936         (grokvardecl): Mark `extern "C"' variables as having C linkage.
12937         * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
12938         * lex.c (retrofit_lang_decl): Likewise.
12939         * mangle.c (mangle_decl_string): Don't mangle the names of
12940         variables declared with C language linkage.
12941         * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
12942
12943 2001-04-18  John David Anglin  <dave@hiauly1.hia.nrc.ca>
12944
12945         * semantics.c (simplify_aggr_init_exprs_r): Don't restore
12946         flag_access_control from uninitialized storage.
12947
12948 2001-04-15  Mark Mitchell  <mark@codesourcery.com>
12949
12950         * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
12951         * mangle.c (write_pointer_to_member_type): Fix mangling of
12952         pointers to cv-qualified member function types.
12953
12954         * init.c (build_delete): Create a SAVE_EXPR for the address if
12955         we're going to use it more than once.
12956
12957 2001-04-13  Mark Mitchell  <mark@codesourcery.com>
12958
12959         * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
12960         (expand_ptremfunc_cst): Change prototype.
12961         (delta2_from_ptrmemfunc): Remove.
12962         * expr.c (cplus_expand_constant): Adjust call to
12963         expand_ptrmemfunc_cst.
12964         * typeck.c (build_ptrmemfunc1): Simplify.
12965         (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
12966         results in a constant.
12967         (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
12968         (delta2_from_ptrmemfunc): Remove.
12969         (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
12970
12971 2001-04-12  Jason Merrill  <jason_merrill@redhat.com>
12972
12973         * cp-tree.h (decl_namespace_list): New macro.
12974         (struct saved_scope): Add decl_ns_list.
12975         * decl.c (mark_saved_scope): Mark it.
12976         * decl2.c: Lose static decl_namespace_list.
12977         (init_decl2): Don't save it.
12978
12979 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12980
12981         * cp-tree.h (warn_return_type, yylex): Delete redundant
12982         declarations.
12983
12984         * decl.c (current_class_depth, global_namespace): Likewise.
12985
12986         * decl2.c (current_class_depth, flag_gnu_xref): Likewise
12987
12988         * repo.c (flag_use_repository): Likewise.
12989
12990 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12991
12992         * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
12993         set_block, pushdecl, getdecls, gettags, init_decl_processing,
12994         maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
12995         lvalue_or_else, print_lang_statistics, comp_target_types,
12996         unsigned_type, signed_type, signed_or_unsigned_type,
12997         build_function_call, mark_addressable, incomplete_type_error):
12998         Delete redundant declarations.
12999
13000 2001-04-11  Jason Merrill  <jason_merrill@redhat.com>
13001
13002         * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
13003         (TYPE_ANONYMOUS_P): New macro.
13004         (TAGGED_TYPE_P): New macro.
13005         * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
13006         (grokfndecl, grokvardecl, grokdeclarator): Likewise.
13007         * tree.c (no_linkage_helper): Likewise.
13008         * semantics.c (begin_class_definition): Likewise.
13009         * pt.c (convert_template_argument): Likewise.
13010         * lex.c (check_for_missing_semicolon): Likewise.
13011
13012 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
13013
13014         * class.c (dfs_unshared_virtual_bases): New function.
13015         (mark_primary_bases): Call it.
13016         (check_bases): Ignore virtual bases when determining
13017         nearly-emptiness.
13018
13019 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
13020
13021         * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
13022
13023 2001-04-11  Mark Mitchell  <mark@codesourcery.com>
13024
13025         * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
13026         cloned function to the clone.
13027
13028 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13029
13030         * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
13031
13032         * semantics.c: Include expr.h.
13033
13034 2001-04-11  Nathan Sidwell  <nathan@codesourcery.com>
13035
13036         * method.c (implicitly_declare_fn): Commonize code for copy ctor
13037         and assignment op. Set TREE_USED for parameter.
13038
13039 2001-04-10  Mark Mitchell  <mark@codesourcery.com>
13040
13041         * class.c (find_final_overrider_data): Add `candidates'.
13042         (dfs_find_final_overrider): Don't issue error messages
13043         prematurely.
13044         (find_final_overrider): Issue error messages here.
13045         (build_base_field): Don't warn about amgibuous direct bases here.
13046         (warn_about_ambiguous_direct_bases): New function.
13047         (layout_class_type): Use it.
13048
13049 2001-04-10  Richard Henderson  <rth@redhat.com>
13050
13051         * typeck.c (build_array_ref): Push the array reference inside
13052         COMPOUND_EXPR and COND_EXPR.
13053
13054 2001-04-05  Mark Mitchell  <mark@codesourcery.com>
13055
13056         * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
13057         * decl.c (duplicate_decls): Adjust accordingly.
13058         (maybe_commonize_var): Likewise.
13059         (grokfndecl): Likewise.
13060         (start_function): Likewise.
13061         (start_method): Likewise.
13062         * decl2.c (key_method): Likewise.
13063         (import_export_decl): Likewise.
13064         * method.c (implicitly_declare_fn): Likewise.
13065         * optimize.c (maybe_clone_body): Likewise.
13066
13067 2001-04-05  Benjamin Kosnik  <bkoz@redhat.com>
13068
13069         * lang-specs.h: Add __DEPRECATED.
13070
13071 2001-04-05  J"orn Rennecke <amylaar@redhat.com>
13072
13073         * search.c (get_dynamic_cast_base_type): When building a new
13074         constant, set its type to ssizetype.
13075
13076 2001-04-04  Jakub Jelinek  <jakub@redhat.com>
13077
13078         * optimize.c (expand_call_inline): Only add newly inlined statements
13079         into inlined_stmts.
13080
13081 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
13082
13083         * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
13084         (OPERATOR_FORMAT): Likewise.
13085         (OPERATOR_TYPENAME_FORMAT): Likewise.
13086         * operators.def: Remove old name-mangling information.
13087         * decl.c (grok_op_properties): Adjust accordingly.
13088         * lex.c (init_operators): Likewise.
13089         * rtti.c (get_tinfo_decl): Issue error messages about types that
13090         have variable size.
13091
13092 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
13093
13094         * decl2.c (import_export_decl): Don't call import_export_class
13095         when processing an inline member function.
13096         * semantics.c (expand_body): Call import_export_decl before
13097         emitting inline functions.
13098
13099 2001-03-28  Richard Henderson  <rth@redhat.com>
13100
13101         IA-64 ABI Exception Handling:
13102         * cp-tree.def (EH_SPEC_BLOCK): New.
13103         (MUST_NOT_THROW_EXPR): New.
13104         * cp-tree.h: Update changed function declarations.
13105         (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
13106         (CPTI_CALL_UNEXPECTED): New.
13107         (struct cp_language_function): Rename x_eh_spec_try_block
13108         to x_eh_spec_block.
13109         (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
13110         * decl.c (current_binding_level): If no current function
13111         bindings, revert to scope_chain.
13112         (initialize_predefined_identifiers): Remove __cp_push_exception.
13113         (store_parm_decls): Use begin_eh_spec_block.
13114         (finish_function): Use finish_eh_spec_block.
13115         (mark_lang_function): Update for name changes.
13116         * decl2.c (finish_file): No mark_all_runtime_matches.
13117         * dump.c (cp_dump_tree): Handle new tree codes.
13118         * error.c (dump_expr) [BIND_EXPR]: Fix typo.
13119         * except.c (catch_language_init, catch_language): Remove.
13120         (init_exception_processing): Don't set language code.
13121         Initialize call_unexpected_node, protect_cleanup_actions,
13122         eh_personality_libfunc, lang_eh_runtime_type.
13123         (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
13124         (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
13125         (prepare_eh_type): Split out type canonicalizations ...
13126         (build_eh_type_type): ... from here.
13127         (build_eh_type_type_ref): Remove.
13128         (mark_all_runtime_matches): Remove.
13129         (build_exc_ptr): New.
13130         (do_begin_catch, do_end_catch): New.
13131         (do_pop_exception): Remove.
13132         (build_terminate_handler): Remove.
13133         (choose_personality_routine): Split out language choice from ...
13134         (initialize_handler_parm): ... here.
13135         Use MUST_NOT_THROW_EXPR.
13136         (expand_start_catch_block): Use do_begin_catch.  Simplify Java
13137         exception object handling.
13138         (expand_start_eh_spec, expand_end_eh_spec): Remove.
13139         (expand_exception_blocks, alloc_eh_object): Remove.
13140         (begin_eh_spec_block, finish_eh_spec_block): New.
13141         (do_allocate_exception, do_free_exception): New.
13142         (expand_throw): Merge into ...
13143         (build_throw): ... here.  Update for abi.
13144         * expr.c (cplus_expand_expr): No expand_internal_throw.
13145         Handle MUST_NOT_THROW_EXPR.
13146         * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
13147         * semantics.c (*) Update for except.h name changes.
13148         (genrtl_try_block): No protect_with_terminate.
13149         (genrtl_eh_spec_block): New.
13150         (genrtl_handler): Don't emit the goto here.
13151         (cp_expand_stmt): Handle EH_SPEC_BLOCK.
13152         (genrtl_finish_function): Don't expand_exception_blocks.
13153         * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
13154
13155 2001-03-28  Richard Henderson  <rth@redhat.com>
13156
13157         * decl.c (struct named_label_list): Rename eh_region to
13158         in_try_scope, add in_catch_scope.
13159         (struct binding_level): Rename eh_region to is_try_scope,
13160         add is_catch_scope.
13161         (note_level_for_try): Rename from note_level_for_eh.
13162         (note_level_for_catch): New.
13163         (poplevel): Copy both is_try_scope and is_catch_scope to
13164         the named_label_list struct.
13165         (check_previous_goto_1): Don't check for catch block via
13166         DECL_ARTIFICIAL; use in_try_scope instead.
13167         (check_goto): Likewise.
13168         * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
13169         * except.c (expand_start_catch_block): Call note_level_for_catch.
13170         * semantics.c (begin_compound_stmt): Update for note_level_for_try.
13171
13172 2001-03-27  Richard Henderson  <rth@redhat.com>
13173
13174         * except.c: Use USING_SJLJ_EXCEPTIONS instead of
13175         exceptions_via_longjmp.
13176
13177 2001-03-27  Phil Edwards  <pme@sources.redhat.com>
13178
13179         * pt.c (check_default_tmpl_args):  Make error messages clearer.
13180
13181 2001-03-26  Phil Edwards  <pme@sources.redhat.com>
13182
13183         * error.c:  Also undefine 'A' macro used for cp_printers definition.
13184
13185 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13186
13187         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
13188
13189 2001-03-26  Mike Yang <yang@research.att.com>
13190             Mark Mitchell  <mark@codesourcery.com>
13191
13192         * dump.c (dump_access): New function.
13193         (cp_dump_tree): Use it.  Dump basetype information for class
13194         types.
13195
13196 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
13197
13198         * Makefile.in (optimize.o): Depend on params.h.
13199         (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
13200         (init_decl_processing): Set flag_no_inline when doing
13201         inlining-on-trees.
13202         * optimize.c: Include params.h.
13203         (struct inline_data): Improve documentation of FNS.  Add
13204         FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
13205         (INSNS_PER_STMT): New macro.
13206         (remap_block): Use CLONING_P.
13207         (inlinable_function_p): Don't inline big functions.
13208         (expand_call_inline): Keep track of how much inlining we've done.
13209         (optimize_function): Set FIRST_INLINED_FN.
13210         (maybe_clone_body): Set CLONING_P.
13211         * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
13212         tree nodes.
13213         (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
13214         rest_of_compilation.  Clear DECL_RTL for local variables
13215         afterwards.
13216         (clear_decl_rtl): New function.
13217
13218 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>
13219
13220         Implement DR 209
13221         * cp-tree.h (skip_type_access_control,
13222         reset_type_access_control): Prototype.
13223         * decl.c (grokdeclarator): Access of friends is not checked.
13224         * parse.y (component_decl_list): Reset type access control.
13225         * semantics.c (decl_type_access_control): Clear
13226         current_type_lookups.
13227         (save_type_access_control): Don't save if not deferring.
13228         (skip_type_access_control, reset_type_access_control): New
13229         functions.
13230         (begin_class_definition): Do type access control for basetypes.
13231         Start deferred access control.
13232         (finish_class_definition): Resume immediate access control if
13233         this is a local class.
13234
13235 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13236
13237         * class.c (add_method): Use memcpy/memmove, not bcopy.
13238
13239         * decl.c (duplicate_decls): Likewise.
13240
13241 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
13242
13243         * mangle.c (write_discriminator): Use `_0' for discriminator 1,
13244         not `_'.
13245
13246 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
13247
13248         * decl.c (local_names): Define.
13249         (push_local_name): New.
13250         (grok_reference_init): Return init if initializing static reference
13251         variable with non-constant instead of emitting it.
13252         Move expand_static_init call to cp_finish_decl.
13253         (layout_var_decl): Call push_local_name.
13254         (maybe_commonize_var): Allow inlining functions even if they have
13255         static local variables, use comdat_linkage for them if flag_weak.
13256         (check_initializer): Call obscure_complex_init if
13257         grok_reference_init returned nonzero.
13258         (save_function_data): Clear x_local_names.
13259         (pop_cp_function_context): Free x_local_names.
13260         (mark_inlined_fns): Remove.
13261         (mark_lang_function): Mark x_local_names.
13262         (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
13263         Mark inlined_fns as tree, remove call to mark_inlined_fns.
13264         * class.c (alter_access): Ensure DECL_ACCESS is never set if
13265         DECL_DISCRIMINATOR_P.
13266         * cp-tree.h (cp_language_function): Add x_local_names.
13267         (lang_decl_flags): Add discriminator into u2.
13268         (lang_decl_inlined_fns): Remove.
13269         (lang_decl): inlined_fns is now a TREE_VEC.
13270         (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
13271         * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
13272         TREE_VEC, not a custom structure.
13273         (optimize_function): Likewise.
13274         * mangle.c (discriminator_for_local_entity): Discriminate among
13275         VAR_DECL local entities.
13276         * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
13277         is not valid.
13278
13279 2001-03-22  Bryce McKinlay  <bryce@albatross.co.nz>
13280
13281         Add support for Java interface method calls.
13282         * cp-tree.h (struct lang_type): Add java_interface flag.
13283         (TYPE_JAVA_INTERFACE): New macro.
13284         * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
13285         by setting TYPE_JAVA_INTERFACE.
13286         * call.c (java_iface_lookup_fn): New static.
13287         (build_over_call): If calling a method declared in a
13288         TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
13289         expression which resolves the function address.
13290         (build_java_interface_fn_ref): New function.
13291
13292 2001-03-22  Richard Henderson  <rth@redhat.com>
13293
13294         * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
13295         * except.c: Don't include it.
13296
13297 2001-03-22  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
13298             based on an idea from Joe Buck <jbuck@synopsys.com>
13299
13300         * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
13301         New nonterminals.
13302         (data_def, component_decl): Add reductions to bad_decl.
13303
13304 2001-03-22  Jakub Jelinek  <jakub@redhat.com>
13305
13306         * method.c (do_build_assign_ref): Don't use build_modify_expr for
13307         anonymous aggregates, since they don't have assignment operator
13308         method.
13309         * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
13310         assignment operators for anonymous structure fields.
13311
13312 2001-03-21  Jason Merrill  <jason@redhat.com>
13313
13314         * pt.c (instantiate_decl): Abort if we see a member constant
13315         instantiation that doesn't already have its initializer.
13316         Downgrade explicit instantiation without definition to pedwarn.
13317
13318         * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
13319         * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
13320         (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
13321
13322         * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
13323         (pending_vtables): Remove.
13324         * decl2.c (pending_vtables): Remove.
13325         (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
13326         CLASSTYPE_VTABLE_NEEDS_WRITING.
13327         (import_export_class): Likewise.
13328         (init_decl2): Don't mark pending_vtables.
13329         * lex.c (handle_pragma_vtable): Just sorry.
13330         * pt.c (instantiate_class_template): Don't mess with
13331         CLASSTYPE_VTABLE_NEEDS_WRITING.
13332         (mark_class_instantiated): Likewise.
13333         * ptree.c (print_lang_type): Don't print it.
13334         * semantics.c (begin_class_definition): Don't set it.
13335
13336         * pt.c (template_tail): Replace with last_pending_template.
13337         (maybe_templates, maybe_template_tail): Remove.
13338         (add_pending_template): Adjust.
13339         (instantiate_pending_templates): Adjust.
13340
13341         * cp-tree.h (struct saved_scope): Remove lang_stack field.
13342         (current_lang_stack): Remove.
13343         * decl.c (maybe_push_to_top_level): Don't initialize it.
13344         (duplicate_decls): Use current_lang_depth.
13345         (xref_basetypes): Likewise.
13346         * class.c (current_lang_depth): New fn.
13347         (push_lang_context): Use more varray functionality.
13348         (pop_lang_context): Likewise.
13349
13350         * error.c (GLOBAL_THING): Always use '__'.
13351
13352 2001-03-21  Mark Mitchell  <mark@codesourcery.com>
13353
13354         * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
13355
13356         * mangle.c (mangle_decl_string): Mangle the names of overloaded
13357         operators, even when they have `extern "C"' linkage.
13358
13359 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
13360
13361         * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
13362         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
13363         where it's not necessary.
13364         (add_method): Remove optimization involving comparison of
13365         DECL_ASSEMBLER_NAME.
13366         (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
13367         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
13368         where it's not necessary.
13369         (check_methods): Likewise.
13370         (build_clone): Likewise.
13371         (built_vtt): Likewise.
13372         * cp-tree.h (DECL_NEEDED_P): Likewise.
13373         * decl.c (pushtag): Likewise.
13374         (duplicate_decls): Likewise.
13375         (pushdecl): Likewise.
13376         (builtin_function): Likewise.
13377         (build_library_fn_1): Set DECL_LANGUAGE for library functions.
13378         (build_cp_library_fn): Likewise.
13379         (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
13380         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
13381         where it's not necessary.
13382         (make_rtl_for_nonlocal_decl): Likewise.
13383         (cp_finish_decl): Likewise.
13384         (grokfndecl): Likewise.
13385         (grokvardecl): Likewise.
13386         (grokdeclarator): Likewise.
13387         (start_function): Likewise.
13388         (cp_missing_return_ok_p): Likewise.
13389         * decl2.c (grokclassfn): Likewise.
13390         (check_classfn): Likewise.
13391         (finish_static_data_member_decl): Likewise.
13392         (grokfield): Likewise.
13393         * error.c (GLOBAL_IORD_P): Remove.
13394         (dump_global_iord): Improve output.
13395         (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
13396         * except.c (nothrow_libfn_p): Summarily reject any function not in
13397         namespace-scope.
13398         * init.c (build_java_class_ref): Don't explicitly set
13399         DECL_ASSEMBLER_NAME after calling mangle_decl.
13400         * mangle.c (mangle_decl_string): Handle extern "C" functions.
13401         (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
13402         * method.c (set_mangled_name_for_decl): Don't explicitly set
13403         DECL_ASSEMBLER_NAME after calling mangle_decl.
13404         (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
13405         IDENTIFIER_GLOBAL_VALUE for the thunk.
13406         * pt.c (set_mangled_name_for_template_decl): Remove.
13407         (check_explicit_specialization): Don't use it.
13408         (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
13409         (tsubst_friend_function): Likewise.
13410         (tsubst_decl): Likewise.
13411         (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
13412         * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
13413         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
13414         where it's not necessary.
13415         (tinfo_base_init): Likewise.
13416         (create_real_tinfo_var): Likewise.
13417         * search.c (looup_field_1): Likewise.
13418         * semantics.c (finish_named_return_value): Likewise.
13419         * tree.c (init_tree): Set lang_set_decl_assembler_name.
13420
13421 2001-03-15  Gabriel Dos Reis  <gdr@codesourcery.com>
13422
13423         Correct semantics restrictions checking in throw-expression.
13424         * except.c (is_admissible_throw_operand): New function.
13425         (build_throw): Use it.
13426
13427 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
13428
13429         * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
13430         and its ilk.
13431
13432 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
13433
13434         * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
13435         * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
13436         * decl.c (duplicate_decls): Likewise.
13437         (builtin_function): Likewise.
13438         (build_library_fn): Likewise.
13439         (build_cp_library_fn): Likewise.
13440         (check_initializer): Likewise.
13441         (cp_finish_decl): Likewise.
13442         * decl2.c (grokfield): Likewise.
13443         (grok_function_init): Remove #if 0'd code.
13444         (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
13445         * friend.c (do_friend): Likewise.
13446         * init.c (get_temp_regvar): Likewise.
13447         * method.c (make_thunk): Likewise.
13448         * pt.c (tsubst_friend_function): Likewise.
13449         (tsubst_decl): Likewise.
13450         (regenerate_decl_from_template): Likewise.
13451         * semantics.c (genrtl_named_return_value): Likewise.
13452         (expand_body): Likewise.
13453         (genrtl_finish_function): Likewise.
13454         * tree.c (cp_tree_equal): Likewise.
13455
13456 2001-03-12  Nathan Sidwell  <nathan@codesourcery.com>
13457
13458         * call.c (convert_like_real): Add extra semantics to INNER
13459         parameter. Don't convert to temporary if a user conversion
13460         gives us an lvalue that we're about to bind to a reference.
13461         Set INNER to indicate pending reference binding on recursive
13462         calls.
13463
13464 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
13465
13466         * cp/lex.c: Delete duplicate pending_lang_change.
13467
13468 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
13469
13470         * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
13471         Similarly.
13472         * cp/repo.c (get_base_filename, open_repo_file): Similarly.
13473         * cp/cp-tree.h: Remove file_name_nondirectory prototype.
13474
13475 2001-03-09  Zack Weinberg  <zackw@stanford.edu>
13476
13477         * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
13478
13479 2001-03-08  Stan Shebs  <shebs@apple.com>
13480
13481         * cp-tree.h (set_identifier_local_value): Remove unused decl.
13482
13483 2001-03-06  Zack Weinberg  <zackw@stanford.edu>
13484
13485         * spew.c: Remove references to CPP_OSTRING.
13486
13487 2001-03-06  Andrew Haley  <aph@redhat.com>
13488
13489         * typeck.c (convert_arguments): Check that we have an fndecl.
13490
13491 2001-03-05  Andrew Haley  <aph@redhat.com>
13492
13493         * typeck.c (convert_arguments): Don't do ellipsis conversion for
13494         __built_in_constant_p.
13495
13496 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
13497
13498         * typeck.c (build_static_cast): Allow enum to enum conversions
13499         as per DR 128.
13500
13501 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
13502
13503         * class.c (check_field_decls): Pointers to member do not a
13504         non-pod struct make, as per DR 148.
13505
13506 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
13507
13508         * call.c (joust): cp_pedwarn when using gnu extension concerning
13509         worst conversion sequences.
13510
13511 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
13512
13513         * decl.c: Replace all uses of 'boolean' with 'bool'.
13514
13515 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
13516
13517         * lang-specs.h: Add zero initializer for cpp_spec field to
13518         all array elements that need one.  Don't put an #ifdef inside
13519         the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
13520         use it.
13521
13522 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
13523
13524         Implement using decls inside template functions.
13525         * decl2.c (validate_nonmember_using_decl): Don't special case
13526         fake_std_node in the global namespace. Don't reject early when
13527         processing a template.
13528         (do_local_using_decl): Add to statement tree. Don't do further
13529         processing when building a template.
13530         * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
13531
13532 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
13533
13534         * decl2.c (do_nonmember_using_decl): Don't complain if we find
13535         same function. Do complain about ambiguating extern "C"
13536         declarations.
13537
13538 2001-02-28  Nathan Sidwell  <nathan@codesourcery.com>
13539
13540         Remove floating point and complex type template constant parms.
13541         * pt.c (convert_nontype_argument): Remove REAL_TYPE and
13542         COMPLEX_TYPE extensions.
13543         (invalid_nontype_parm_type_p): Likewise.
13544
13545 2001-02-27  Jeffrey Oldham  <oldham@codesourcery.com>
13546
13547         * except.c (call_eh_info): Revert "match_function"'s type.
13548
13549 2001-02-27  Nathan Sidwell  <nathan@codesourcery.com>
13550
13551         Fix ctor vtable vcall offsets.
13552         * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
13553         (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
13554         (get_matching_base): Remove.
13555         (get_original_base): New function.
13556         (build_vtbl_initializer): Initialize vid.rtti_binfo.
13557         Use a virtual thunk for a ctor vtable with an index
13558         (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
13559         primary base within a constructor vtable. Only set
13560         BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
13561         when primary base has been lost.
13562         * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
13563
13564 2001-02-26  Jeffrey Oldham  <oldham@codesourcery.com>
13565
13566         * call.c (joust): Ensure more_specialized()'s argument length
13567         parameter has correct value for constructors.
13568
13569 2001-02-26  Nathan Sidwell  <nathan@codesourcery.com>
13570
13571         * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
13572
13573         * decl.c (mark_inlined_fns): Prototype.
13574
13575 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
13576
13577         * spew.c (yylex): Correct handling of friends.
13578
13579 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
13580
13581         * mangle.c (write_encoding): Pass write_function_type the
13582         FUNCTION_DECL for the function being encoded.
13583         (write_function_type): Pass it along to write_bare_function_type.
13584         (write_bare_function_type): Pass it along to write_method_parms.
13585         (write_method_parms): Don't mangle the compiler-generated
13586         parameters to a constructor or destructor.
13587
13588 2001-02-22  Andreas Jaeger  <aj@suse.de>
13589
13590         * optimize.c: Include toplev.h for
13591         note_deferral_of_defined_inline_function prototype.
13592
13593 2001-02-22  Jakub Jelinek  <jakub@redhat.com>
13594
13595         * cp-tree.h (struct lang_decl_inlined_fns): New.
13596         (struct lang_decls): Add inlined_fns.
13597         (DECL_INLINED_FNS): New macro.
13598         * optimize.c (struct inline_data): Add inlined_fns.
13599         (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
13600         (inlinable_function_p): Likewise, fix typo in comment,
13601         function is not inlinable if it already inlined function currently
13602         being optimized.
13603         (expand_call_inline): Add fn to inlined_fns if necessary.
13604         (optimize_function): Initialize inlined_fns.
13605         Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
13606         * decl.c (mark_inlined_fns): New function.
13607         (lang_mark_tree): Call it.
13608
13609 2001-02-21  Jason Merrill  <jason@redhat.com>
13610
13611         * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
13612         (DECL_UNINLINABLE): Move to middle-end.
13613
13614         * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
13615         * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
13616         * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
13617         * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
13618         parms and outer BLOCK.  note_deferral_of_defined_inline_function.
13619
13620         * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
13621         second parm of op=.
13622
13623 2001-02-19  Mark Mitchell  <mark@codesourcery.com>
13624
13625         * decl2.c (set_decl_namespace): Allow explicit instantiations in
13626         any namespace.
13627
13628 2001-02-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
13629
13630         * optimize.c (expand_call_inline): Don't walk subtrees of type
13631         nodes.
13632
13633 2001-02-18  Mark Mitchell  <mark@codesourcery.com>
13634
13635         * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
13636         for a destructor.
13637
13638 2001-02-18  Jason Merrill  <jason@redhat.com>
13639
13640         Do put the VTT parameter in DECL_ARGUMENTS.
13641         * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
13642         (current_vtt_parm): New macro.
13643         (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
13644         (DECL_HAS_VTT_PARM_P): New macro.
13645         (DECL_VTT_PARM): Remove.
13646         (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
13647         * decl.c (duplicate_decls): Only copy the operator code if
13648         appropriate.
13649         (start_function): Set current_vtt_parm.
13650         (lang_mark_tree): Don't mark vtt_parm.
13651         * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
13652         DECL_ARGUMENTS.  Set DECL_HAS_VTT_PARM_P.
13653         * class.c (build_clone): Maybe remove the VTT parm.
13654         * optimize.c (maybe_clone_body): Set up the VTT parm.
13655         * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
13656         * call.c (build_over_call): Just allow the VTT arg.
13657         * method.c (make_thunk): Don't set DECL_VTT_PARM.
13658         (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
13659         (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
13660         * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
13661         * error.c (dump_function_decl): Likewise.
13662         * call.c (build_user_type_conversion_1, convert_like_real): Abort
13663         if we try to call a constructor with in-charge or VTT parms.
13664         * method.c (skip_artificial_parms_for): New fn.
13665         * call.c (add_function_candidate, build_over_call): Call it.
13666         * call.c (build_new_method_call): Use current_vtt_parm.
13667         * init.c (expand_virtual_init): Likewise.
13668         * class.c (same_signature_p): No longer static.
13669         * cp-tree.h: Declare it.
13670         * search.c (look_for_overrides_r): Use it.
13671
13672 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
13673
13674         * cp-tree.h (new_abi_rtti_p): Remove.
13675         (name_mangling_version): Likewise.
13676         (flag_do_squangling): Likewise.
13677         * class.c (build_rtti_vtbl_entries): Remove old ABI support.
13678         * decl.c (grokfndecl): Likewise.
13679         * decl2.c (name_mangling_version): Remove.
13680         (flag_do_squangling): Likewise.
13681         (lang_f_options): Remove `squangle'.
13682         (unsupported_options): Add `squangle'.
13683         (cxx_decode_option): Issue a warning about uses of
13684         -fname-mangling-version.
13685         (finish_file): Remove old ABI support.
13686         * pt.c (check_explicit_specialization): Likewise.
13687         (tsubst_decl): Likewise.
13688         * rtti.c (init_rtti_processing): Likewise.
13689         (build_headof): Likewise.
13690         (get_tinfo_decl_dynamic): Likewise.
13691         (tinfo_from_decl): Likewise.
13692         (build_dynamic_cast_1): Likewise.
13693         (synthesize_tinfo_var): Likewise.
13694         * init.c (build_new): Allow enumeration types for the array-bounds
13695         in a direct-new-declarator.
13696
13697         * semantics.c (finish_typeof): Resolve OFFSET_REFs.
13698
13699         * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
13700         TREE_PROTECTED from the template being specialized.
13701
13702 2001-02-17  Jason Merrill  <jason@redhat.com>
13703
13704         * decl2.c (build_artificial_parm): Set TREE_READONLY.
13705
13706         * decl.c (bad_specifiers): Allow throw specs on things with
13707         pointer-to-function or -member-function type.
13708         * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
13709         a pmf.
13710
13711 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
13712
13713         * call.c (check_dtor_name): Handle template names correctly.
13714
13715 2001-02-16  Jason Merrill  <jason@redhat.com>
13716
13717         * cp-tree.h (DECL_USE_VTT_PARM): Remove.
13718         * decl2.c (maybe_retrofit_in_chrg): Don't create it.
13719         * optimize.c (maybe_clone_body): Don't substitute it.
13720         * call.c (build_new_method_call): Check in_chrg instead.
13721         * init.c (expand_virtual_init): Likewise.
13722
13723 2001-02-16  Gabriel Dos Reis  <gdr@codesourcery.com>
13724
13725         * decl.c (check_tag_decl): Make sure a typedef for an anonymous
13726         class-type introduces at least a type-name.
13727
13728 2001-02-16  Jakub Jelinek  <jakub@redhat.com>
13729
13730         * call.c (convert_like_real): Create a temporary for non-lvalue.
13731
13732 2001-02-16  Jeffrey Oldham  <oldham@codesourcery.com>
13733
13734         * cp-tree.h: Fix typos in comments.
13735
13736 2001-02-16  Jason Merrill  <jason@redhat.com>
13737
13738         * optimize.c (remap_block): If we're compiling a clone, pass the
13739         new block to insert_block.
13740
13741 2001-02-16  Mark Mitchell  <mark@codesourcery.com>
13742
13743         * semantics.c (finish_asm_stmt): Robustify.
13744
13745 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
13746
13747         * pt.c (push_template_decl_real): Don't remangle the name of a
13748         class template.
13749
13750 2001-02-15  Jim Meyering  <meyering@lucent.com>
13751
13752         * Make-lang.in (c++.install-common): Depend on installdirs.
13753         (c++.install-info): Likewise.
13754         (c++.install-man): Likewise.
13755
13756 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
13757
13758         * typeck2.c (build_m_component_ref): Robustify.
13759
13760 2001-02-15  Alexandre Oliva  <aoliva@redhat.com>
13761
13762         * friend.c (do_friend): Don't take the nested [template] class
13763         into account when deciding whether to warn about the friend
13764         function not referring to a template function.
13765
13766 2001-02-14  Jakub Jelinek  <jakub@redhat.com>
13767
13768         * typeck.c (build_unary_op): Clarify error message.
13769
13770 2001-02-08  Aldy Hernandez  <aldyh@redhat.com>
13771
13772         * parse.y (component_constructor_declarator): allow optional
13773         parentheses around constructor class name.
13774
13775 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
13776
13777         * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
13778         section.
13779         * init.c (emit_base_init): Remove incorrect comment about
13780         virtual bases.
13781         * method.c (make_thunk): Fix comment alignment.
13782
13783 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
13784
13785         Kill remnants of this is variable.
13786         * cp-tree.h (flag_this_is_variable): Remove.
13787         * decl2.c (flag_this_is_variable): Remove.
13788         * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
13789         (build_vbase_path): The path is non-static, even in a cdtor.
13790         (resolves_to_fixed_type_p): Add additional return value.
13791         * search.c (init_vbase_pointers): Adjust.
13792         * tree.c (lvalue_p_1): Adjust.
13793         * typeck.c (mark_addressable): Adjust.
13794
13795 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
13796
13797         * pt.c (unify): Don't check cv quals of array types.
13798
13799 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
13800
13801         * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
13802         check whether we already have the type.
13803
13804 2001-02-13  Mark Mitchell  <mark@codesourcery.com>
13805
13806         * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
13807         * call.c (build_op_delete_call): Simplify to remove duplicate
13808         code.
13809         * class.c (clone_function_decl): Don't build the deleting variant
13810         of a non-virtual destructor.
13811         * decl.c (finish_destructor_body): Don't call delete if this is a
13812         non-virtual destructor.
13813         * init.c (build_delete): Explicitly call `operator delete' when
13814         deleting an object with a non-virtual destructor.
13815
13816 2001-02-13  Jason Merrill  <jason@redhat.com>
13817
13818         * lang-specs.h: Add more __EXCEPTIONS.
13819
13820 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
13821
13822         * typeck2.c (process_init_constructor): Check
13823         TREE_HAS_CONSTRUCTOR before issuing missing init warning.
13824
13825 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
13826
13827         * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
13828         Remove spurious information in comment. Allow further
13829         adjustments of REFERENCE_TYPE args.
13830
13831 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
13832
13833         * errfn.c (cp_deprecated): Tweak diagnostic text.
13834         * parse.y (new_initializer): Deprecate initializer lists
13835         extension.
13836
13837 2001-02-12  Mark Mitchell  <mark@codesourcery.com>
13838
13839         Remove old ABI support.
13840
13841 2001-02-11  Mark Mitchell  <mark@codesourcery.com>
13842
13843         * decl2.c (flag_vtable_thunks): Always set it to 1.
13844         (flag_new_abi): Likewise.
13845         * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
13846
13847         * Makefile.in (g++spec.o): Fix typo.
13848
13849 2001-02-09  Jason Merrill  <jason@redhat.com>
13850
13851         * lang-specs.h: Restore definition of __EXCEPTIONS.
13852
13853 2001-02-08  Jason Merrill  <jason@redhat.com>
13854
13855         * search.c (shared_member_p): New function.
13856         (lookup_field_r): Use it.
13857         * cp-tree.h (SHARED_MEMBER_P): Remove.
13858
13859         * method.c (process_overload_item): Handle template-dependent array
13860         bounds.
13861         * pt.c (type_unification_real): If we end up with undeduced nontype
13862         parms, try again.
13863
13864         * decl.c (lookup_name_real): Tweak warning to refer to decls, not
13865         types.
13866
13867         * typeck2.c (friendly_abort): Don't say anything if we have
13868         earlier errors or sorries.
13869
13870         * decl.c (check_tag_decl): Notice attempts to redefine bool and
13871         wchar_t.  Ignore if in_system_header.
13872
13873         * decl.c (maybe_push_cleanup_level): New fn...
13874         (start_decl_1): ...split out from here.
13875         * cvt.c (build_up_reference): Use it.
13876         * cp-tree.h: Declare it.
13877
13878 2001-02-07  Mark Mitchell  <mark@codesourcery.com>
13879
13880         * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
13881         spec.
13882
13883 2001-02-06  Nathan Sidwell  <nathan@codesourcery.com>
13884
13885         * pt.c (lookup_template_class): Make sure it's a primary
13886         template or template_template_parm when called from the parser.
13887         (instantiate_template_class): Add assertion.
13888
13889 2001-02-05  Alexandre Oliva  <aoliva@redhat.com>
13890
13891         * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
13892         from error_mark_node.
13893
13894 2001-02-05  Nathan Sidwell  <nathan@codesourcery.com>
13895
13896         Fix specification and implementation bugs in V3 ABI
13897         construction vtables.
13898         * cp-tree.h (flag_dump_class_layout): New flag.
13899         (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
13900         (BINFO_LOST_PRIMARY_P): New flag.
13901         (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
13902         (BINFO_PRIMARY_MARKED_P): Rename to ...
13903         (BINFO_PRIMARY_P): ... here.
13904         (binfo_via_virtual): New prototype.
13905         * decl2.c (flag_dump_class_layout): New flag.
13906         (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
13907         use `=' as a file name separator.
13908         * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
13909         bases.
13910         (build_vtbl_address): If this is a virtual primary base, then
13911         get the vtbl of what it is ultimately primary for.
13912         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
13913         for BINFO_PRIMARY_P.
13914         (dfs_skip_nonprimary_vbases_markedp): Likewise.
13915         (get_shared_vbase_if_not_primary): Likewise.
13916         (dfs_get_pure_virtuals): Likewise.
13917         (expand_upcast_fixups): Likewise.
13918         (fixup_virtual_upcast_offsets): Likewise.
13919         (dfs_find_vbase_instance): Likewise.
13920         (find_vbase_instance): Likewise.
13921         (binfo_from_vbase): Adjust comment to reflect reality.
13922         (binfo_via_virtual): New function.
13923         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
13924         for binfo walking during VTT construction.
13925         (dfs_mark_primary_bases): Remove.
13926         (force_canonical_binfo_r): New function.
13927         (force_canonical_binfo): New function.
13928         (mark_primary_virtual_base): New function.
13929         (mark_primary_bases): Walk in inheritance graph order, use
13930         mark_primary_virtual_base.
13931         (determine_primary_base): Use some more intermediate variables.
13932         (dfs_find_final_overrider): Don't check for overriding along a
13933         virtual path.
13934         (dfs_modify_vtables): Walk into primary virtual bases too.
13935         (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
13936         (build_base_fields): Likewise.
13937         (dfs_set_offset_for_unshared_vbases): Likewise.
13938         (layout_virtual_bases): Likewise.
13939         (end_of_class): Likewise.
13940         (finish_struct_1): Call dump_class_hierarchy, if requested.
13941         (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
13942         (dump_class_hierarchy_r): Add stream parameter. Emit more information.
13943         (dump_class_hierarchy): Add file parameter. Append to file, if
13944         required.
13945         (finish_vtbls): Adjust accumulate_vtbl_inits call.
13946         Use canonical base for virtual bases.
13947         (build_vtt): Add more comments. Adjust build_vtt_inits call.
13948         (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
13949         Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
13950         VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
13951         virtual VTTs.
13952         (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
13953         from DATA.  We want virtual primary bases and all bases via virtual.
13954         Only set BINFO_VPTR_INDEX for top level. Look up from a primary
13955         virtual base when not a construction vtable.
13956         (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
13957         (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
13958         Use canonical bases when processing virtual bases.
13959         (accumulate_vtbl_inits): We're interested in any base via a
13960         virtual path.
13961         (dfs_accumulate_vtbl_inits): If this is a primary virtual base
13962         within a construction vtable, determine what is being overridden.
13963         (build_vtbl_initializer): Add more comments
13964         (add_vcall_offset_vtbl_entries_1): Adjust comment.
13965         (build_rtti_vtbl_entries): Check if the base has lost its
13966         primary.
13967
13968 2001-02-05  Mark Mitchell  <mark@codesourcery.com>
13969
13970         * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
13971
13972 2001-02-04  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13973
13974         * decl.c (pushdecl): Call abort instead of fatal.
13975         * except.c (decl_is_java_type): Call fatal_error instead of fatal.
13976         * init.c (build_new_1): Likewise.
13977         (build_java_class_ref): Call internal_error and fatal_error, not fatal.
13978         * decl.c (build_typename_type): hash_table_init now returns void.
13979         decl.c (init_decl_processing): Make an error non-fatal.
13980
13981 2001-02-04  Mark Mitchell  <mark@codesourcery.com>
13982
13983         * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
13984         Document.
13985         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
13986         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
13987         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
13988         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
13989         * decl.c (maybe_commonize_var): Use the new name-mangling where
13990         appropriate.
13991         * decl2.c (comdat_linkage): Enhance comments.  Make all
13992         compiler-generated things static, if COMDAT is not available.
13993         (get_tinfo_decl): Do not make typeinfo objects that belong in the
13994         library COMDAT.
13995         (tinfo_base_init): Use the correct mangled name for typeinfo
13996         strings, and push them into the global scope.
13997         (typeinfo_in_lib_p): New function.
13998         (synthesize_tinfo_var): Use it.
13999         (create_real_tinfo_var): Likewise.
14000
14001 2001-02-03  Jakub Jelinek  <jakub@redhat.com>
14002
14003         * decl.c (push_class_binding): Use context_for_name_lookup instead
14004         of CP_DECL_CONTEXT.
14005         * search.c (context_for_name_lookup): Remove static.  Check for NULL
14006         context in the loop.
14007         * cp-tree.h (context_for_name_lookup): Add prototype.
14008
14009 2001-02-02  Jakub Jelinek  <jakub@redhat.com>
14010
14011         * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
14012         * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
14013         Remove.
14014         * call.c (convert_class_to_reference, build_user_type_conversion_1,
14015         add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
14016
14017 2001-02-02  Mark Mitchell  <mark@codesourcery.com>
14018
14019         * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
14020         of macros used when compiling g++spec.c.
14021         * g++spec.c (lang_specific_driver): Link with the shared
14022         libgcc by default.
14023
14024 2001-01-29  Joseph S. Myers  <jsm28@cam.ac.uk>
14025
14026         * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
14027         make_reference_declarator, make_call_declarator), method.c
14028         (implicitly_declare_fn), parse.y (namespace_using_decl,
14029         notype_unqualified_id, expr_or_declarator, new_type_id,
14030         after_type_declarator, direct_after_type_declarator,
14031         notype_declarator, complex_notype_declarator,
14032         complex_direct_notype_declarator, qualified_id,
14033         notype_qualified_id, overqualified_id, direct_new_declarator,
14034         absdcl, direct_abstract_declarator, conversion_declarator), pt.c
14035         (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
14036         instead of build_parse_node.
14037
14038 2001-01-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14039
14040         * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
14041         (minus_one_node): Moved to top level gcc directory.  Renamed
14042         to integer_minus_one_node.
14043
14044         * init.c (init_init_processing): Don't set minus_one_node.
14045         (build_vec_init): Use integer_minus_one_node.
14046
14047         * rtti.c (get_tinfo_decl_dynamic): Likewise.
14048
14049 2001-01-28  Jakub Jelinek  <jakub@redhat.com>
14050
14051         * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
14052         identical and they would be replaced with constant, remove
14053         MODIFY_EXPR from the tree.
14054
14055 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14056
14057         * Make-lang.in: Remove all dependencies on defaults.h.
14058         * call.c: Don't include defaults.h.
14059         * decl.c: Likewise.
14060         * decl2.c: Likewise.
14061         * except.c: Likewise.
14062         * pt.c: Likewise.
14063         * rtti.c: Likewise.
14064         * tree.c: Likewise.
14065         * typeck.c: Likewise.
14066
14067 2001-01-25  Jakub Jelinek  <jakub@redhat.com>
14068
14069         * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
14070         operators even in "C" linkage.
14071         * method.c (set_mangled_name_for_decl): Likewise.
14072         * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
14073         overloaded operators in "C" linkage.
14074
14075 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
14076
14077         * pt.c (tsubst_decl): Remove IN_DECL parameter.
14078         (tsubst_arg_types): Check parameter is not void.
14079         (tsubst): Adjust tsubst_decl call.
14080
14081 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
14082
14083         * call.c (add_builtin_candidate): Quote std properly, from
14084         previous change.
14085
14086 2001-01-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14087
14088         * pt.c (check_explicit_specialization): Clone constructors and
14089         destructors.
14090
14091 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
14092
14093         * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
14094         indicates anything special about template depth. Make sure we
14095         only count the user visible template classes.
14096
14097 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
14098
14099         * call.c (build_conv): Typo in comment.
14100         (add_builtin_candidate): Add more explanation.
14101         Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
14102         Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
14103         when we have enumeral types.
14104         (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
14105         candidates for relops and eqops.
14106         (joust): Simplify control flow. Allow a non-template user
14107         function to hide a builtin.
14108
14109 2001-01-22  Nathan Sidwell  <nathan@codesourcery.com>
14110
14111         * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
14112         (more_specialized): Add deduction parameter.
14113         * call.c (joust): Adjust more_specialized call.
14114         * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
14115         UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
14116         (get_bindings_order): Remove.
14117         (get_bindings_real): Add DEDUCE parameter.
14118         (maybe_adjust_types_for_deduction): Return extra unify flags. Do
14119         REFERENCE_TYPE jig for DEDUCE_ORDER.
14120         (type_unification_real): Deal with DEDUCE_ORDER. Use result of
14121         maybe_adjust_types_for_deduction.
14122         (more_specialized): Add DEDUCE parameter. Call get_bindings_real
14123         directly.
14124         (try_one_overload): Use result of maybe_adjust_types_for_deduction.
14125         (check_cv_quals_for_unify): Use new unify qualifier flags.
14126         (unify): Clear new unify qualifier flags.
14127         (get_bindings_real): Add DEDUCE parameter.
14128         (get_bindings): Adjust call to get_bindings_real.
14129         (get_bindings_overload): Likewise.
14130         (most_specialized_instantiation): Adjust call to
14131         more_specialized.
14132
14133 2001-01-19  Jason Merrill  <jason@redhat.com>
14134
14135         * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
14136
14137         * decl.c (init_decl_processing): Just force -fvtable-thunks on if
14138         -fnew-abi.
14139
14140 2001-01-19  Ute Pelkmann  <scope.muc@t-online.de>
14141
14142         * decl2.c (arg_assoc_class): Fix double iteration logic.
14143
14144 2001-01-19  Jason Merrill  <jason@redhat.com>
14145
14146         * init.c (build_delete): Always call convert_force to strip cv-quals.
14147
14148         * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
14149         * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
14150         * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
14151
14152 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
14153
14154         * search.c (get_vbase_1): Count only virtual bases.
14155
14156 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
14157
14158         * class.c (duplicate_tag_error): Robustify flag clearing.
14159
14160 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
14161
14162         * cp-tree.h (lookup_template_class): Add complain parm.
14163         * decl.c (lookup_namespace_name): Adjust call to
14164         lookup_template_class.
14165         (make_typename_type): Likewise.
14166         * semantics.c (finish_template_type): Likewise.
14167         * pt.c (lookup_template_class): Add complain parm. Adjust.
14168         (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
14169         (tsubst): Likewise.
14170
14171 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
14172
14173         * pt.c (copy_default_args_to_explicit_spec): Preserve
14174         object's CV quals. Reorganize.
14175
14176 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
14177
14178         * typeck.c (build_modify_expr): Say `initialization' for
14179         INIT_EXPRs.
14180         * init.c (build_default_init): Convert to enumeral type, if
14181         needed.
14182
14183 2001-01-18  Jakub Jelinek  <jakub@redhat.com>
14184
14185         * parse.y (nomods_initdcl0): Properly set things up for
14186         initdcl0_innards.
14187
14188 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
14189
14190         * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
14191         (type_unification_real): Set it.
14192         (unify): Use it.
14193
14194 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
14195
14196         * decl.c (finish_destructor_body): Convert to vbase pointer here.
14197
14198 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
14199
14200         * semantics.c (begin_class_definition): Check we're not inside a
14201         template parm list.
14202
14203 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
14204
14205         * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
14206         BASELINK_P.
14207
14208 2001-01-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14209
14210         * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
14211         * call.c (build_over_call): Add comment.
14212
14213 2001-01-16 Daniel Berlin <dberlin@redhat.com>
14214
14215         * cvt.c (ocp_convert): Handle vector type conversion
14216         * typeck2.c (digest_init): Handle vector type initializations
14217
14218 2001-01-16  Phil Edwards  <pme@sources.redhat.com>
14219
14220         * g++spec.c:  Don't add libraries needlessly if -fsyntax-only
14221           was given.
14222
14223 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
14224
14225         * pt.c (check_nontype_parm): Rename to ...
14226         (invalid_nontype_parm_type_p): ... here.
14227         (process_template_parm): Adjust.
14228         (convert_template_argument): Adjust.
14229
14230 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
14231
14232         * pt.c (check_nontype_parm): New function.
14233         (process_template_parm): Use it.
14234         (convert_template_argument): Use it.
14235         (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
14236         member.
14237
14238 2001-01-14  Jeffrey Oldham  <oldham@codesourcery.com>
14239
14240         * tree.c: Add defaults.h
14241         (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
14242         * Make-lang.in (cp/tree.o): Add defaults.h.
14243
14244 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
14245
14246         * Make-lang.in (CXX_C_OBJS): Add c-format.o.
14247
14248 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
14249
14250         * g++.1: Change to be ".so man1/gcc.1".
14251
14252 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
14253
14254         * Make-lang.in (c++.info, c++.install-info): Build and install g++
14255         internals info.
14256         (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
14257         ($(srcdir)/cp/g++int.info): New target.
14258         * gxxint.texi: Add info directory entry.  Use @@ in email address.
14259         * .cvsignore: Update.
14260
14261 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
14262
14263         * typeck.c (build_c_cast): Do template processing earlier.
14264         Always pedwarn on array casts.
14265
14266 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
14267
14268         * friend.c (make_friend_class): Make sure a templated class is
14269         actually a template.
14270
14271 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
14272
14273         * decl2.c (get_guard): Set linkage from guarded decl.
14274
14275 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
14276
14277         * call.c (convert_default_arg): Check for unprocessed
14278         DEFAULT_ARG.
14279         * cp-tree.h (replace_defarg): Move to spew.c.
14280         (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
14281         spew.c, which is where they really are.
14282         (done_pending_defargs): Declare.
14283         (unprocessed_defarg_fn): Declare.
14284         * decl.c (replace_defarg): Move to spew.c
14285         * parse.y (structsp): Call done_pending_defargs.
14286         * spew.c (defarg_fns): Rearrange list structure.
14287         (defarg_fnsdone): New static variable.
14288         (defarg_depfns): New static variable.
14289         (init_spew): Adjust.
14290         (add_defarg_fn): Store the type in TREE_TYPE.
14291         (do_pending_defargs): Detect and deal with ordering constraints
14292         and circularity.
14293         (done_pending_defargs): New function.
14294         (unprocessed_defarg_fn): New function.
14295         (replace_defarg): Moved from decl.c. Robustify. Don't save
14296         if circularity detected.
14297
14298 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
14299
14300         * pt.c (unify): Check array has a domain, before checking
14301         whether it is variable sized.
14302
14303 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
14304
14305         * decl.c (grokparms): Unobfuscate and get correct diagnostic for
14306         parameters with pointers to arrays of unknown bound.
14307
14308 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
14309
14310         * parse.y (template_parm_header, template_spec_header): New
14311         reductions. Split out from ...
14312         (template_header): ... here. Use them.
14313         (template_template_parm): Use template_parm_header.
14314         * semantics.c (finish_template_template_parm): Add assert.
14315
14316 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
14317
14318         * mangle.c (write_builtin_type): Fix thinko.
14319
14320         * pt.c (copy_default_args_to_explicit_spec_1): New function.
14321         (copy_default_args_to_explicit_spec): Likewise.
14322         (check_explicit_specialization): Use it.
14323
14324         * class.c (finish_struct_1):  Remove last argument in call to
14325         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
14326         * decl.c (builtin_function): Likewise.
14327         (build_cp_library_fn): Likewise.
14328         (check_initializer): Likewise.
14329         (make_rtl_for_nonlocal_decl): Likewise.
14330         (cp_finish_decl): Likewise.
14331         (start_function): Likewise.
14332         * decl2.c (finish_anon_union): Likewise.
14333         * friend.c (do_friend): Likewise.
14334         * init.c (build_java_class_ref): Likewise.
14335         * method.c (make_thunk): Likewise.
14336         * pt.c (tsubst_friend_function): Likewise.
14337         * semantics.c (expand_body): Likewise.
14338
14339 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
14340
14341         * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
14342         looking at DECL_CLONED_FUNCTION for non-functions.
14343
14344 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
14345
14346         * error.c (dump_template_parameter): Use parm to determine how
14347         to print default value.
14348
14349 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
14350
14351         * class.c (duplicate_tag_error): Clear more flags.
14352
14353 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
14354
14355         * call.c (build_new_method_call): Use binfo_for_vbase.
14356
14357 2001-01-10  Joseph S. Myers  <jsm28@cam.ac.uk>
14358
14359         * cp-tree.h (flag_cond_mismatch): Don't declare.
14360         * decl2.c (flag_cond_mismatch): Don't define.
14361         (lang_f_options): Remove cond-mismatch.
14362         (unsupported_options): Add cond-mismatch.
14363
14364 2001-01-09  Nathan Sidwell  <nathan@codesourcery.com>
14365
14366         * class.c (handle_using_decl): Reject using of constructor name
14367         of sourcing class. Allow injecting of a method with same name as
14368         nested class. Fixup error messages.
14369
14370 2001-01-09  Joseph S. Myers  <jsm28@cam.ac.uk>
14371
14372         * decl2.c (lang_decode_option): Handle -Wformat=2.
14373
14374 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
14375
14376         * cp-tree.h (lang_decl_flags): Rename defined_in_class to
14377         initialized_in_class.
14378         (DECL_DEFINED_IN_CLASS_P): Rename to ...
14379         (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
14380         * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
14381         (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
14382         * pt.c (check_default_tmpl_args): Adjust for
14383         DECL_INITIALIZED_IN_CLASS_P.
14384         (instantiate_class_template): Likewise.
14385         (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
14386
14387         * class.c (finish_struct): Constify saved_filename.
14388
14389 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
14390
14391         * class.c (duplicate_tag_error): Adjust diagnostic.
14392         (finish_struct): Locally set location to start of struct.
14393         * decl.c (fixup_anonymous_aggr): Use cp_error_at.
14394
14395 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
14396
14397         * decl.c (struct binding_level): Adjust class_shadowed comments
14398         to reflect reality.
14399         (push_class_level_binding): Adjust comments to reflect reality.
14400         Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
14401         Don't set TREE_VALUE on the class_shadowed list.
14402
14403 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14404
14405         * decl2.c (acceptable_java_type): Allow references too.
14406         * init.c (build_java_class_ref): When using the new ABI, search
14407         `class$' and have it mangled with `mangle_decl.'
14408         * mangle.c (write_java_integer_type_codes): New function.
14409         (write_builtin_type): Detect and mangle Java integer and real
14410         types.
14411
14412 2001-01-07  Mark Mitchell  <mark@codesourcery.com>
14413
14414         * decl2.c (grokfield): Don't accept `asm' specifiers for
14415         non-static data members.
14416
14417 2001-01-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14418
14419         * expr.c (cplus_expand_expr): Don't reset `target'.
14420
14421 2001-01-07  Neil Booth  <neil@daikokuya.demon.co.uk>
14422
14423         * cp/decl2.c (cxx_post_options): Call cpp_post_options.
14424
14425 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
14426
14427         * parse.y (template_datadef): Check for error_mark_node.
14428
14429 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
14430
14431         * cp-tree.def (DEFAULT_ARG): Make `x' class.
14432
14433 2001-01-04  Joseph S. Myers  <jsm28@cam.ac.uk>
14434
14435         * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
14436         (record_builtin_type): Make non-static.
14437         (flag_short_double): Don't declare.
14438         (init_decl_processing): Remove the creation of many tree nodes now
14439         in c_common_nodes_and_builtins.
14440         (build_void_list_node): New function.
14441         * decl2.c (flag_short_double, flag_short_wchar): Don't define.
14442         * cp-tree.h (flag_short_wchar): Don't declare.
14443
14444 2001-01-04  Mark Mitchell  <mark@codesourcery.com>
14445
14446         * call.c (build_conv): Don't use build1 for USER_CONV.
14447         * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
14448
14449 2001-01-03  Joseph S. Myers  <jsm28@cam.ac.uk>
14450
14451         * lex.c (lang_init): Call c_common_lang_init.
14452
14453 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
14454
14455         * search.c (lookup_fnfields_here): Remove.
14456         (look_for_overrides_r): Use lookup_fnfields_1.
14457         Ignore functions from using declarations.
14458
14459 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
14460
14461         Implement exceptions specifiers for implicit member functions.
14462         * cp-tree.h (merge_exceptions_specifiers): Declare new function.
14463         * method.c (synthesize_exception_spec): New function.
14464         (locate_dtor, locate_ctor, locate_copy): New functions.
14465         (implicitly_declare_fn): Generate the exception spec too.
14466         * search.c (check_final_overrider): Check artificial functions
14467         too.
14468         * typeck2.c (merge_exception_specifiers): New function.
14469
14470 2001-01-03  Jason Merrill  <jason@redhat.com>
14471
14472         * init.c (build_default_init): New fn.
14473         (perform_member_init): Split out from here.
14474         (build_new_1): Use it.  Simplify initialization logic.
14475         (build_vec_init): Take an array, rather than a pointer and maxindex.
14476         Speed up simple initializations.  Don't clean up if we're assigning.
14477         * cp-tree.h: Adjust.
14478         * decl2.c (do_static_initialization): Remove TREE_VEC case.
14479         * parse.y (new_initializer): Return void_zero_node for ().
14480         * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
14481         * typeck2.c (digest_init): Only complain about user-written
14482         CONSTRUCTORs.
14483
14484 2000-12-22  Mike Stump  <mrs@wrs.com>
14485
14486         * decl2.c: (max_tinst_depth): Increase to 50.
14487
14488 2001-01-02  Mark Mitchell  <mark@codesourcery.com>
14489
14490         * class.c (invalidate_class_lookup_cache): Zero the
14491         previous_class_values.
14492         * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
14493         TREE_INT_CST_HIGH.
14494         (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
14495         * decl.c (free_bindings): New variable.
14496         (push_binding): Don't create a new binding if we have one on the
14497         free list.
14498         (pop_binding): Put old bindings on the free list.
14499         (init_decl_processing): Use size_int, not build_int_2.
14500         Register free_bindings as a GC root.
14501         (cp_make_fname_decl): Use size_int, not build_int_2.
14502         (push_inline_template_parms_recursive): Likewise.
14503         (end_template_parm_list): Likewise.
14504         (for_each_template_parm): Do not use walk_tree_without_duplicates.
14505         (tsubst_template_parms): Use size_int, not build_int_2.
14506         (tsubst): Likewise.
14507         * rtti.c (get_vmi_pseudo_type_info): Likewise.
14508
14509 2001-01-02  Richard Henderson  <rth@redhat.com>
14510
14511         * parse.y (asm): Set ASM_INPUT_P.
14512
14513 2001-01-02  Jason Merrill  <jason@redhat.com>
14514
14515         * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
14516         for v3 ABI.
14517
14518         * typeck.c (cp_truthvalue_conversion): New fn.
14519         * cvt.c (ocp_convert): Use it.
14520
14521         * cp-tree.h: Lose c-common.c decls.
14522
14523         * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
14524         * cvt.c (convert_to_void): Use type_unknown_p.
14525
14526         * typeck.c (strip_all_pointer_quals): Also strip quals from
14527         pointer-to-member types.
14528
14529         * Make-lang.in (cp/TAGS): Use --no-globals.  Ignore parse.c, and treat
14530         parse.y as C.
14531
14532         * call.c (build_new_method_call): Do evaluate the object parameter
14533         when accessing a static member.
14534         * typeck.c (build_component_ref): Likewise.
14535
14536 2001-01-02  Andreas Jaeger  <aj@suse.de>
14537
14538         * decl.c (cp_missing_noreturn_ok_p): New.
14539         (init_decl_processing): Set lang_missing_noreturn_ok_p.
14540
14541 2000-12-29  Jakub Jelinek  <jakub@redhat.com>
14542
14543         * decl.c (init_decl_processing): Fix sign of wchar_type_node.
14544
14545 2000-12-29  Mark Mitchell  <mark@codesourcery.com>
14546
14547         * class.c (pushclass): Remove #if 0'd code.
14548         * cp-tree.h (overload_template_name): Remove.
14549         * decl.c (store_bindings): Simplify.
14550         (pop_from_top_level): Likewise.
14551         * pt.c (overload_template_name): Remove.
14552         (instantiate_decl): Don't call push_to_top_level if it's not
14553         needed.
14554
14555 2000-12-28  Mark Mitchell  <mark@codesourcery.com>
14556
14557         * pt.c (register_local_specialization): Don't return a value.
14558         (lookup_template_class): Use move-to-front heuristic when looking
14559         up template instantiations.
14560         (instantiate_decl): Only push_to_top_level when we're actually
14561         going to instantiate the template.
14562
14563 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
14564
14565         * search.c (binfo_for_vtable): Return least derived class, not
14566         most.  Handle secondary vtables.
14567
14568 2000-12-22  Jason Merrill  <jason@redhat.com>
14569
14570         * pt.c (more_specialized): Don't optimize len==0.
14571         (fn_type_unification): If we're adding the return type, increase len.
14572
14573         * typeck.c (build_binary_op): Fix pmf comparison logic.
14574
14575         * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
14576         DECL_STATIC_FUNCTION_P.
14577
14578         * semantics.c (genrtl_finish_function): Don't try to jump to
14579         return_label unless it exists.
14580
14581         In partial ordering for a call, ignore parms for which we don't have
14582         a real argument.
14583         * call.c (joust): Pass len to more_specialized.
14584         (add_template_candidate_real): Strip 'this', pass len.
14585         * pt.c (more_specialized): Pass len down.  Lose explicit_args parm.
14586         (get_bindings_order): New fn.  Pass len down.
14587         (get_bindings_real): Strip 'this', pass len.
14588         (fn_type_unification): Likewise.
14589         (type_unification_real): Succeed after checking 'len' args.
14590         (most_specialized_instantiation): Lose explicit_args parm.
14591         * class.c (resolve_address_of_overloaded_function): Strip 'this',
14592         pass len.
14593
14594 2000-12-21  Jason Merrill  <jason@redhat.com>
14595
14596         * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
14597         DECL_TEMPLATE_RESULT.
14598
14599         * search.c (lookup_field_r): Call lookup_fnfields_1, not
14600         lookup_fnfields_here.
14601
14602         * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
14603
14604         * call.c (build_object_call): Also allow conversions that return
14605         reference to pointer to function.
14606         (add_conv_candidate): Handle totype being ref to ptr to fn.
14607         (build_field_call): Also allow members of type reference to function.
14608         Lose support for calling pointer to METHOD_TYPE fields.
14609
14610         * error.c (dump_expr): Handle *_CAST_EXPR.
14611
14612         * typeck2.c (build_scoped_ref): Always convert to the naming class.
14613
14614         * tree.c (break_out_cleanups): Lose.
14615         * cp-tree.h: Remove prototype.
14616         * typeck.c (build_component_ref): Don't break_out_cleanups.
14617         (build_compound_expr): Likewise.
14618         * semantics.c (finish_expr_stmt): Likewise.
14619
14620 2000-12-20  Richard Henderson  <rth@redhat.com>
14621
14622         * cp-tree.h: Update declarations.
14623         * decl.c (finish_case_label): Return the new stmt node.
14624         * semantics.c (finish_goto_stmt): Likewise.
14625         (finish_expr_stmt, finish_return_stmt): Likewise.
14626         (finish_break_stmt, finish_continue_stmt): Likewise.
14627         (finish_asm_stmt): Likewise.
14628         * parse.y (already_scoped_stmt): Set STMT_LINENO.
14629         (compstmt, implicitly_scoped_stmt, stmt): Likewise.
14630         (simple_if, simple_stmt): Return the new stmt node.
14631         (save_lineno): New.
14632
14633 2000-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
14634
14635         * cp-tree.h: Don't declare warn_long_long.
14636
14637 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14638
14639         * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
14640         IS_AGGR_TYPE.
14641
14642 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14643
14644         * pt.c (unify): Handle when both ARG and PARM are
14645         BOUND_TEMPLATE_TEMPLATE_PARM.
14646
14647 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14648
14649         * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
14650         DECL_TEMPLATE_PARM_P.
14651
14652 2000-12-15  Jason Merrill  <jason@redhat.com>
14653
14654         * init.c (build_new_1): Reorganize.  Now with 100% fewer SAVE_EXPRs!
14655
14656         * init.c (build_new_1): Don't strip quals from type.
14657
14658         * decl.c (pushdecl): Don't check for linkage on a non-decl.
14659
14660         * call.c (build_op_delete_call): See through ARRAY_TYPEs.
14661
14662         * call.c (build_new_function_call): Lose space before paren in
14663         error message.
14664         (build_new_method_call): Likewise.
14665
14666         * typeck2.c (build_m_component_ref): Propagate quals from datum.
14667
14668 2000-12-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14669
14670         * pt.c (check_explicit_specialization): Propagate default
14671         function arguments to explicit specializations.
14672
14673 2000-12-13  DJ Delorie  <dj@redhat.com>
14674
14675         * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
14676         and <? operators.
14677
14678 2000-12-08  Jason Merrill  <jason@redhat.com>
14679
14680         * error.c (dump_function_name): Don't let the user see __comp_ctor.
14681
14682         Clean up copy-initialization in overloading code.
14683         * call.c (build_user_type_conversion_1): Die if we are asked to
14684         convert to the same or a base type.
14685         (implicit_conversion): Avoid doing so.  Lose reference binding code.
14686         (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
14687         direct-initialization.  Also do direct-init part of copy-init.
14688         (build_user_type_conversion): Don't provide context to convert_like.
14689         * cvt.c (ocp_convert): build_user_type_conversion will now provide
14690         the constructor call for copy-init.
14691
14692         * pt.c (tsubst_decl): Call clone_function_decl here if this is an
14693         instantiation of a member template.
14694         (do_decl_instantiation): Not here.
14695
14696 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
14697
14698         * class.c (check_field_decls): Don't special case anonymous
14699         fields in error messages.
14700         (note_name_declared_in_class): Use %D on diagnostic.
14701
14702         * tree.c (pod_type_p): Use strip_array_types.
14703         (cp_valid_lang_attribute): Likewise.
14704         * typeck.c (cp_type_quals): Strip arrays separately, to avoid
14705         multiple evaluations.
14706         (cp_has_mutable_p): Use strip_array_types.
14707
14708 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
14709
14710         * cp-tree.h (sufficient_parms_p): Declare new function.
14711         * call.c (sufficient_parms_p): New function, broken out of ...
14712         (add_function_candidate): ... here. Use it.
14713         (add_conv_candidate): Use it.
14714         * decl.c (grok_ctor_properties): Use it.
14715
14716 2000-12-07  Jakub Jelinek  <jakub@redhat.com>
14717
14718         * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
14719
14720 2000-12-07  Joseph S. Myers  <jsm28@cam.ac.uk>
14721
14722         * decl2.c (lang_decode_option): Handle -Wformat-security.
14723
14724 2000-12-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14725
14726         * pt.c (verify_class_unification): New function.
14727         (get_class_bindings): Use it.
14728         (try_class_unification): Tidy.
14729         (unify): Handle when argument of a template-id is not
14730         template parameter dependent.
14731         (template_args_equal): Handle when TREE_CODE's do not match.
14732
14733 2000-12-06  Alexandre Oliva  <aoliva@redhat.com>
14734
14735         * lang-specs.h (c++): When invoking the stand-alone preprocessor
14736         for -save-temps, pass all relevant -Defines to it, and then don't
14737         pass them to cc1plus.
14738
14739 2000-12-05  Will Cohen  <wcohen@redhat.com>
14740
14741         * decl.c (finish_case_label): Cleared
14742         more_cleanups_ok in surrounding function scopes.
14743         (define_label): Likewise.
14744
14745 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
14746
14747         * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
14748         (get_matching_virtual): Remove.
14749         (look_for_overrides): Declare new function.
14750         * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
14751         DECL_VINDEX here.
14752         * class.c (check_for_override): Move base class iteration code
14753         to look_for_overrides.
14754         * search.c (next_baselink): Remove.
14755         (get_virtuals_named_this): Remove.
14756         (get_virtual_destructor): Remove.
14757         (tree_has_any_destructors_p): Remove.
14758         (struct gvnt_info): Remove.
14759         (check_final_overrider): Remove `virtual' from error messages.
14760         (get_matching_virtuals): Remove. Move functionality to ...
14761         (look_for_overrides): ... here, and ...
14762         (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
14763         to be overriding.
14764
14765 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
14766
14767         * typeck.c (get_delta_difference): If via a virtual base,
14768         return zero.
14769         * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
14770         adjustment.
14771
14772 2000-12-04  Richard Henderson  <rth@redhat.com>
14773
14774         * error.c (dump_tree): Use output_add_string not OB_PUTS.
14775
14776 2000-12-04  Jason Merrill  <jason@redhat.com>
14777
14778         * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
14779         (write_builtin_type): Pass intSI_type_node and the like through
14780         type_for_mode.
14781         * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
14782         Pass intSI_type_node and the like through type_for_mode.
14783         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
14784         * pt.c (tsubst, unify): Likewise.
14785         * tree.c (walk_tree): Likewise.
14786         * error.c (dump_type): Likewise.
14787         (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
14788
14789         * Make-lang.in: Tweak top comment for emacs.
14790         (cp/TAGS): Restore.
14791
14792         * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
14793
14794         * class.c (clone_function_decl): Robustify.
14795
14796 2000-12-04  Michael Matz  <matzmich@cs.tu-berlin.de>
14797
14798         * decl.c (store_bindings): Only search in the non modified
14799         old_bindings for duplicates.
14800
14801 2000-12-04  Nathan Sidwell  <nathan@codesourcery.com>
14802
14803         * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
14804         TYPE_POLYMORPHIC_P.
14805
14806         * typeck.c (build_static_cast): Remove unused variable.
14807
14808 2000-12-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14809
14810         * pt.c: Fix typo in comment.
14811
14812 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
14813
14814         * decl2.c (warn_format): Remove definition.
14815         (lang_decode_option): Handle -Wformat-nonliteral,
14816         -Wno-format-extra-args and -Wno-format-y2k.  Use set_Wformat.
14817
14818 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
14819
14820         * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
14821         (init_decl_processing): Don't create string_type_node,
14822         const_string_type_node, wint_type_node, intmax_type_node,
14823         uintmax_type_node, default_function_type, ptrdiff_type_node and
14824         unsigned_ptrdiff_type_node.  Adjust position of call to
14825         c_common_nodes_and_builtins.
14826         (identifier_global_value): New function.
14827
14828 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>
14829
14830         * call.c (standard_conversion): Reject pointer to member
14831         conversions from ambiguous, inaccessible or virtual bases.
14832         * typeck.c (build_static_cast): Don't check pointers to members
14833         specially.
14834
14835 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
14836
14837         * method.c (do_build_copy_constructor): Preserve cv
14838         qualifications when accessing source object members.
14839         (do_build_assign_ref): Likewise. Remove separate diagnostics for
14840         unnamed fields.
14841
14842 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
14843
14844         * method.c (do_build_assign_ref): Construct appropriately
14845         CV-qualified base reference. Don't allow const casts in base
14846         conversion.
14847
14848 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
14849
14850         * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
14851         incomplete return type.
14852
14853 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
14854
14855         * parse.y (base_class.1): Produce a _TYPE not a _DECL.
14856         * semantics.c (finish_base_specifier): Accept a _TYPE not a
14857         _DECL.
14858
14859 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
14860
14861         * spew.c (yyerror): Cope if yylval.ttype is NULL.
14862
14863 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
14864
14865         * decl.c (grokdeclarator): Diagnose undefined template contexts.
14866
14867 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
14868
14869         * decl.c (grokdeclarator): Do type access control on friend
14870         class.
14871
14872 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
14873
14874         * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
14875         bison parser ickiness.
14876         * pt.c (tsubst_friend_function): Enter namespace scope when
14877         tsubsting the function name.
14878         * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
14879
14880 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
14881
14882         * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
14883         * cvt.c (cp_convert_to_pointer): Add force parameter.
14884         Allow conversions via virtual base if forced.
14885         (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
14886         (ocp_convert): Likewise.
14887         * search.c (binfo_from_vbase): Return the virtual base's binfo.
14888         * typeck.c (get_delta_difference): Adjust handling of virtual
14889         bases.
14890
14891 2000-11-26  Mark Mitchell  <mark@codesourcery.com>
14892
14893         * tree.c (struct list_hash): Remove.
14894         (list_hash_table): Make it be an htab.
14895         (struct list_proxy): New type.
14896         (list_hash_eq): New function.
14897         (list_hash_pieces): Renamed from ...
14898         (list_hash): ... this.
14899         (list_hash_lookup): Remove.
14900         (list_hash_add): Remove.
14901         (hash_tree_cons): Use the generic hashtable.
14902         (mark_list_hash): Remove.
14903         (init_tree): Create the hashtable.
14904
14905 2000-11-25  Joseph S. Myers  <jsm28@cam.ac.uk>
14906
14907         * method.c (build_mangled_C9x_name): Rename to
14908         build_mangled_C99_name.  Change C9X references in comments to
14909         refer to C99.
14910
14911 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
14912
14913         * parse.y (unary_expr): Move VA_ARG from here ...
14914         (primary): ... to here.
14915
14916 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
14917
14918         * semantics.c (finish_id_expr): If type is error_mark, return
14919         error_mark.
14920
14921 2000-11-23  Nathan Sidwell  <nathan@codesourcery.com>
14922
14923         * pt.c (lookup_template_class): Simplify loop exit constructs.
14924         Cope when there is no partial instantiation of a template
14925         template member.
14926
14927 2000-11-23  J"orn Rennecke <amylaar@redhat.com>
14928
14929         * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
14930
14931 2000-11-22  Mark Mitchell  <mark@codesourcery.com>
14932
14933         * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
14934         prefix.
14935
14936         * pt.c (do_decl_instantiate): Explicitly clone constructors and
14937         destructors that haven't already been cloned.
14938
14939 2000-11-20  Richard Henderson  <rth@redhat.com>
14940
14941         * parse.y (yyparse_1): Rename the parser entry point.
14942
14943 2000-11-20  Alex Samuel  <samuel@codesourcery.com>
14944
14945         * mangle.c (write_name): Use <unscoped-name> for names directly in
14946         function scope.
14947         (write_unscoped_name): Accept names directly in function scope.
14948
14949 2000-11-20  Nathan Sidwell  <nathan@codesourcery.com>
14950
14951         * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
14952         * parse.y (extdef): Add EXPORT reduction.
14953         * spew.c (yylex): Don't skip export here.
14954
14955 2000-11-19  Mark Mitchell  <mark@codesourcery.com>
14956
14957         * decl.c (init_decl_processing): Correct name of pure virtual
14958         function under the new ABI.
14959         * rtti.c (throw_bad_cast): Likewise, for bad cast function.
14960         (throw_bad_typeid): Likewise for bad typeid function.
14961
14962 2000-11-18  Mark Mitchell  <mark@codesourcery.com>
14963
14964         * decl.c (grokparms): Don't even function types of `void' type,
14965         either.
14966         * mangle.c (write_type): Don't crash when confronted with the
14967         error_mark_node.
14968
14969         * decl.c (grokparms): Don't create parameters of `void' type.
14970
14971 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
14972
14973         * lex.c (mark_impl_file_chain): Delete.
14974         (init_parse): Remove call to ggc_add_string_root.  No need to
14975         ggc_strdup a string constant.  Do not add impl_file_chain to GC
14976         roots.
14977         (handle_pragma_implementation): No need to ggc_strdup main_filename.
14978
14979 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
14980
14981         * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
14982
14983 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
14984
14985         * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
14986         * decl.c (grokdeclarator): Don't reject void parms here.
14987         (require_complete_types_for_parms): Simplify, use
14988         complete_type_or_else.
14989         (grokparms): Remove bitrot. Remove funcdef parm.
14990         Deal with ellipsis parm lists here.
14991         * semantics.c (finish_parmlist): Don't append void_list_node
14992         here. Set PARMLIST_ELLIPSIS_P.
14993
14994 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
14995
14996         * typeck2.c (incomplete_type_error): Reorganize to avoid
14997         excessive diagnostics.
14998
14999 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
15000
15001         * lex.c (struct impl_files, internal_filename): Constify a char *.
15002
15003 2000-11-16  Mark Mitchell  <mark@codesourcery.com>
15004
15005         * mangle.c (write_special_name_constructor): Don't generate
15006         assembler junk when confronted with an old-style constructor.
15007         (write_special_name_destructor): Likewise.
15008         (mangle_decl_string): Do it here instead.
15009
15010 2000-11-16  Nathan Sidwell  <nathan@codesourcery.com>
15011
15012         * call.c (op_error): Make error messages clearer.
15013
15014 2000-11-15  Mark Mitchell  <mark@codesourcery.com>
15015
15016         * decl.c (wrapup_globals_for_namespace): Don't mark things
15017         TREE_ASM_WRITTEN when they're not.
15018
15019 2000-11-15  Jason Merrill  <jason@redhat.com>
15020
15021         * typeck2.c (friendly_abort): Uncount the error before handing
15022         off to fancy_abort.
15023
15024 2000-11-15  Nathan Sidwell  <nathan@codesourcery.com>
15025
15026         * typeck.c (lookup_anon_field): Cope with qv qualifiers.
15027
15028 2000-11-14  Mark Mitchell  <mark@codesourcery.com>
15029
15030         * class.c (build_vtbl_initializer): Fix typo in comment.
15031         * typeck.c (expr_sizeof): Don't crash on errors.
15032
15033 2000-11-14  Jim Wilson  <wilson@redhat.com>
15034
15035         * lang-specs.h: Add %2 after %(cc1_options).
15036
15037 2000-11-14  Richard Henderson  <rth@redhat.com>
15038
15039         * typeck.c (c_sizeof): Be strict about casting result value
15040         back to c_size_type_node.
15041         (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
15042
15043 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
15044
15045         * typeck.c (build_unary_op): Use boolean_increment from
15046         c-common.c, moving the relevant code there.
15047
15048 2000-11-11  Jason Merrill  <jason@redhat.com>
15049
15050         * typeck.c (mark_addressable): Don't call put_var_into_stack.
15051
15052         * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
15053         in inlines.
15054
15055 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15056
15057         * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
15058         * lex.c (copy_lang_decl): Likewise.
15059
15060 2000-11-09  Mark Mitchell  <mark@codesourcery.com>
15061
15062         * dump.c (cp_dump_tree): Don't dump function bodies here.
15063
15064         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
15065         (dump.o): Update dependency list.
15066         * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
15067         (flag_dump_translation_unit): Likewise.
15068         (CP_TYPE_QUALS): Adjust definition.
15069         (DECL_C_BIT_FIELD): Remove.
15070         (SET_DECL_C_BIT_FIELD): Likewise.
15071         (CLEAR_DECL_C_BIT_FIELD): Likewise.
15072         (add_maybe_template): Likewise.
15073         (strip_array_types): Likewise.
15074         (dump_node_to_file): Likewise.
15075         (cp_dump_tree): New function.
15076         * decl.c (init_decl_processing): Set lang_dump_tree.
15077         * decl2.c (flag_dump_translation_unit): Remove.
15078         * dump.c: Move most of it to ../c-dump.c.
15079         (cp_dump_tree): New function.
15080         * pt.c (add_maybe_template): Remove.
15081         * typeck.c (strip_array_types): Likewise.
15082
15083 2000-11-07  Eric Christopher  <echristo@redhat.com>
15084
15085         * decl.c (init_decl_processing): Change definition of
15086         __wchar_t to wchar_t.  Remove artificial declaration of
15087         wchar_t.
15088         * lex.c: Change instances of __wchar_t to wchar_t.
15089
15090 2000-11-09  Nathan Sidwell  <nathan@codesourcery.com>
15091
15092         * lex.c (do_identifier): Don't lookup_name for operators.
15093         * parse.y (operator): Save looking_for_typename.
15094         (unoperator): Restore it.
15095         * spew.c (frob_opname): Use nth_token for lookahead.
15096
15097 2000-11-08  Nathan Sidwell  <nathan@codesourcery.com>
15098
15099         * decl.c (grok_op_properties): Always use coerce_new_type and
15100         coerce_delete_type.
15101         * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
15102         exception specification. Tidy up.
15103         (coerce_delete_type): Preserve exception specification. Tidy up.
15104
15105 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
15106
15107         * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
15108         (push_binding_level), error.c (cp_tree_printer), pt.c
15109         (process_partial_specialization, tsubst_template_arg_vector),
15110         search.c (lookup_member): Use memset () instead of bzero ().
15111
15112 2000-11-07  Nathan Sidwell  <nathan@codesourcery.com>
15113
15114         * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
15115
15116 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
15117
15118         * Make-lang.in (c++.distdir): Remove.
15119
15120 2000-11-04  Mark Mitchell  <mark@codesourcery.com>
15121
15122         * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
15123         declarations from different namespaces to be combined.
15124
15125 2000-11-03  Zack Weinberg  <zack@wolery.stanford.edu>
15126
15127         * decl.c: Include tm_p.h.
15128
15129 2000-11-03  Joseph S. Myers  <jsm28@cam.ac.uk>
15130
15131         * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
15132
15133 2000-11-02  Joseph S. Myers  <jsm28@cam.ac.uk>
15134
15135         * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
15136         (build_overload_value), repo.c (open_repo_file), xref.c
15137         (open_xref_file): Use strchr () and strrchr () instead of index ()
15138         and rindex ().
15139
15140 2000-11-01  Bernd Schmidt  <bernds@redhat.co.uk>
15141
15142         * call.c (build_over_call): Call fold on the CALL_EXPR.
15143
15144 2000-11-01  Gabriel Dos Reis  <gdr@codesourcery.com>
15145
15146         * error.c (dump_template_decl): Separate template hearders with
15147         space not comma.
15148
15149 2000-10-31  Gabriel Dos Reis  <gdr@codesourcery.com>
15150
15151         * error.c: Move TFF_ macros into cp-tree.h.  Throughout, replace
15152         TS_* flags with corresponding TFF_*.  Adjust prototypes of
15153         functions (which used to take a tree_string_flags) to take an int.
15154
15155         * cp-tree.h (enum tree_string_flags): Remove
15156         (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
15157         TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
15158         TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
15159         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
15160         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
15161         TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
15162         (type_as_string, decl_as_string, expr_as_string,
15163         context_as_string): Adjust prototype.
15164
15165         * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
15166         instead of TS_PLAIN.
15167
15168         * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
15169         instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
15170         plain `0'.
15171
15172 2000-10-30  Mark Mitchell  <mark@codesourcery.com>
15173
15174         * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
15175         (linkage_kind): New enumeration.
15176         (decl_linkage): New function.
15177         * decl2.c (comdat_linkage): Extend comment.
15178         * error.c (dump_function_decl): Print the arguments used to
15179         instantiate a template, even when not printing the type of the
15180         function.
15181         * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
15182         not TREE_PUBLIC, to test for external linkage.
15183         * tree.c (decl_linkage): New function.
15184
15185 2000-10-28  Mark Mitchell  <mark@codesourcery.com>
15186
15187         * pt.c (instantiate_decl): Always instantiate static data members
15188         initialized in-class.
15189
15190 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
15191
15192         * Make-lang.in: Move all build rules here from Makefile.in,
15193         adapt to new context.  Wrap all rules that change the current
15194         directory in parentheses.  Expunge all references to $(P).
15195         When one command depends on another and they're run all at
15196         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
15197         all object-file generation rules.  Delete obsolete variables.
15198
15199         * Makefile.in: Delete.
15200         * config-lang.in: Delete outputs= line.
15201
15202 2000-10-26  Gabriel Dos Reis  <gdr@codesourcery.com>
15203
15204         * error.c (dump_function_decl): Print no space between
15205         `ptr-operator' the `type-specifier' of the return type.
15206         (dump_type_prefix): Make sure we put space at the appropriate
15207         place.
15208
15209 2000-10-23  Jason Merrill  <jason@redhat.com>
15210
15211         * call.c (equal_functions): Also call decls_match for extern "C" fns.
15212
15213 2000-10-22  Jason Merrill  <jason@redhat.com>
15214
15215         * call.c (build_conditional_expr): Use ocp_convert to force
15216         rvalue conversion.
15217
15218 2000-10-22  Mark Mitchell  <mark@codesourcery.com>
15219
15220         * call.c (standard_conversion): Use RVALUE_CONVs for all
15221         expressions that satisfy lvalue_p, not just those that satisfy
15222         real_lvalue_p.
15223
15224         * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
15225
15226         * typeck.c (c_sizeof): Return an expression of `size_t' type,
15227         not one with TYPE_IS_SIZETYPE set.
15228         (dubious_conversion_warnings): Remove special-case code.
15229
15230 2000-10-21  Geoffrey Keating  <geoffk@cygnus.com>
15231
15232         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
15233         * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
15234         (dump_type_prefix): Print vector-of-int as 'int vector'.
15235         (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
15236         * tree.c (walk_tree): Handle VECTOR_TYPE.
15237
15238         * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
15239
15240 2000-10-21  Jason Merrill  <jason@redhat.com>
15241
15242         * parse.y (operator): Set got_object from got_scope.
15243         Set looking_for_typename.
15244         * decl.c (lookup_name_real): Clear val after setting from_obj.
15245         Reorganize diagnostic.
15246
15247 2000-10-20  Jason Merrill  <jason@redhat.com>
15248
15249         * tree.c (walk_tree): Don't walk into default args.
15250
15251         * error.c (dump_expr): Use host_integerp.
15252
15253 2000-10-20  David Edelsohn  <edelsohn@gnu.org>
15254
15255         * typeck2.c (abstract_virtuals_error): Use "because" instead of
15256         "since" in error message.
15257
15258 2000-10-20  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15259
15260         * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
15261
15262 2000-10-20  Jeffrey Oldham  <oldham@codesourcery.com>
15263
15264         * decl.c (revert_static_member_fn): Fixed typo.
15265
15266 2000-10-19  Mark Mitchell  <mark@codesourcery.com>
15267
15268         * class.c (subobject_offset_fn): New type.
15269         (dfs_record_base_offsets): Remove.
15270         (record_base_offsets): Likewise.
15271         (dfs_search_base_offsets): Likewise.
15272         (record_subobject_offset): New function.
15273         (check_subobject_offset): Likewise.
15274         (walk_subobject_offsets): Likewise.
15275         (record_subobject_offsets): Likewise.
15276         (layout_conflict_p): Reimplement.
15277         (layout_nonempty_base_or_field): Correct handling of type
15278         conflicts during layout.
15279         (layout_empty_base): Likewise.
15280         (build_base_field): Adjust to handle new representation of empty
15281         base offset table.
15282         (build_base_fields): Likewise.
15283         (layout_virtual_bases): Likewise.
15284         (splay_tree_compare_integer_csts): New function.
15285         (layout_class_type): Use a splay_tree, rather than a varray, to
15286         represent the offsets of empty bases.
15287
15288         * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
15289         * decl.c (select_decl): Don't return declarations that are
15290         DECL_ANTICIPATED.
15291
15292 2000-10-18  Mark Mitchell  <mark@codesourcery.com>
15293
15294         * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
15295         (fake_std_node): New macro.
15296         * decl.c (in_std): Rename to ...
15297         (in_fake_std): ... this.
15298         (flag_no_builtin): Remove.
15299         (flag_no_nonansi_builtin): Likewise.
15300         (walk_namespaces_r): Use fake_std_node.
15301         (push_namespace): Use std_identifier.
15302         (pop_namespace): Use in_fake_std.
15303         (lookup_name_real): Use fake_std_node.
15304         (init_decl_processing): When -fhonor-std, create the `std'
15305         namespace.  Don't create a dummy fake_std_node in that case.
15306         Adjust call to c_common_nodes_and_builtins.  Use std_identifier.
15307         (builtin_function): Put builtins whose names don't begin
15308         with `_' in the std namespace.
15309         * decl2.c (flag_no_builtin): Remove.
15310         (flag_no_nonansi_builtin): Likewise.
15311         (set_decl_namespace): Use fake_std_node.
15312         (validate_nonmember_using_decl): Likewise.
15313         (do_using_directive): Likewise.
15314         (handle_class_head): Likewise.
15315         * dump.c (dequeue_and_dump): Likewise.
15316         * except.c (init_exception_processing): Use std_identifier.
15317         * init.c (build_member_call): Use fake_std_node.
15318         * rtti.c (init_rtti_processing): Use std_identifier.
15319
15320 2000-10-17  Mark Mitchell  <mark@codesourcery.com>
15321
15322         * cp-tree.h (back_end_hook): Remove declaration.
15323         * decl2.c (back_end_hook): Remove definition.
15324
15325         * dump.c (dequeue_and_dump): Dump TREE_USED.
15326
15327 2000-10-17  Brad Lucier <lucier@math.purdue.edu>
15328
15329         * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
15330
15331 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
15332
15333         * decl.c (WINT_TYPE): Define.
15334         (init_decl_processing): Create types unsigned_ptrdiff_type_node,
15335         c_size_type_node, signed_size_type_node and wint_type_node.
15336
15337 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
15338
15339         * decl2.c (warn_missing_format_attribute): New variable.
15340         (lang_decode_option): Decode -Wmissing-format-attribute.
15341
15342 2000-10-16  Mark Mitchell  <mark@codesourcery.com>
15343
15344         * typeck.c (qualify_type): Remove.
15345         (composite_pointer_type): Fix handling of conversions to `cv void*'.
15346
15347 2000-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15348
15349         * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
15350
15351 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15352
15353         * Makefile.in (parse.c, parse.h): Create atomically.
15354
15355 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
15356
15357         * class.c (current_obstack): Remove.
15358         * decl.c (ggc_p): Remove.
15359         (start_decl): Don't use decl_tree_cons.
15360         (grokdeclarator): Don't use build_decl_list.
15361         (start_function): Don't use decl_tree_cons.
15362         (finish_function): Don't mess with obstacks.
15363         * decl2.c (grok_x_components): Don't use build_decl_list.
15364         * lex.c (make_call_declarator): Don't call decl_tree_cons.
15365         (implicitly_declare_fn): Don't call build_decl_list.
15366         * parse.y (frob_specs): Don't call build_decl_list or
15367         decl_tree_cons.
15368         (expr_or_declarator_intern): Don't call decl_tree_cons.
15369         (primary): Don't call build_decl_list.
15370         (fcast_or_absdcl): Likewise.
15371         (typed_declspecs): Don't call decl_tree_cons.
15372         (reserved_declspecs): Don't call build_decl_list.
15373         (declmods): Likewise.
15374         (reserved_typespecquals): Likewise.
15375         (aggr): Likewise.
15376         (new_type_id): Likewise.
15377         (cv_qualifiers): Likewise.
15378         (after_type_declarator_intern): Likewise.
15379         (notype_declarator_intern): Likewise.
15380         (absdcl_intern): Likewise.
15381         (named_parm): Likewise.
15382         * pt.c (most_specialized_class): Likewise.
15383         * repo.c (temporary_obstack): Make it a structure, not a pointer.
15384         (init_repo): Initialize it.
15385         * search.c (current_obstack): Remove.
15386         * typeck2.c (add_exception_specifier): Don't call build_decl_list.
15387
15388 2000-10-09  Richard Henderson  <rth@cygnus.com>
15389
15390         * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
15391         (c++ language support bits for libgcc): Remove.
15392         (c++.clean): Remove cplib2.txt cleanup.
15393         * config-lang.in (headers, lib2funcs): Remove.
15394
15395         * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
15396         * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
15397         * inc/cxxabi.h, inc/exception, inc/new: Remove files.
15398         * inc/new.h, inc/typeinfo: Remove files.
15399
15400 2000-10-08  Joseph S. Myers  <jsm28@cam.ac.uk>
15401
15402         * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
15403         defined.
15404         (init_decl_processing): Initialize intmax_type_node and
15405         uintmax_type_node.
15406
15407 2000-10-06  Richard Henderson  <rth@cygnus.com>
15408
15409         * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
15410         (original_result_rtx): Remove.
15411         * decl.c (save_function_data): Don't clear x_result_rtx.
15412         (mark_lang_function): Don't mark it either.
15413         * expr.c (fixup_result_decl): Remove.
15414         * semantics.c (genrtl_named_return_value): Frob the return decl
15415         before calling emit_local_var.
15416         (genrtl_finish_function): Don't call fixup_result_decl.
15417         Always emit the jump to return_label.
15418
15419 2000-10-06  Nathan Sidwell  <nathan@codesourcery.com>
15420
15421         * pt.c (lookup_template_class): Set current access for enum.
15422         (tsubst_enum): Set file & line for enum decl.
15423
15424         * spew.c (yylex): Remove unused variable.
15425
15426 2000-10-05  Richard Henderson  <rth@cygnus.com>
15427
15428         * semantics.c (genrtl_finish_function): Don't init or check
15429         can_reach_end; remove noreturn and return value checks.
15430
15431 2000-10-05  Tom Tromey  <tromey@cygnus.com>
15432
15433         * init.c (build_java_class_ref): Use `build_static_name' with a
15434         suffix, not a prefix, to build the class object's name.
15435
15436 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
15437
15438         * cp-tree.h (access_kind): Fix comment typo.
15439         * decl2.c (grokfield): Fix diagnostic typo.
15440         * semantics.c (finish_template_type): Fix comment typo.
15441         (finish_qualified_object_call_expr): Likewise.
15442
15443 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
15444
15445         * pt.c (tsubst_expr, DECL_STMT case): Don't process if
15446         tsubsting fails.
15447
15448 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
15449
15450         * spew.c (frob_id): New static function.
15451         (frob_opname): Use it.
15452         (yylex): Use it.
15453
15454 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
15455
15456         * decl.c (lang_mark_false_label_stack): Remove.
15457         * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
15458
15459 2000-09-30  Joseph S. Myers  <jsm28@cam.ac.uk>
15460
15461         * gxxint.texi: Use @email for formatting email addresses.
15462
15463 2000-09-29  Gabriel Dos Reis  <gdr@codesourcery.com>
15464
15465         * error.c: Remove direct obstack manipulation.  Replace with
15466         output_buffer-based formatting.  Adjust calls to removed macros.
15467         (obstack_chunk_alloc, obstack_chunk_free): Remove.
15468         (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
15469         OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
15470
15471 2000-09-24  Mark Mitchell  <mark@codesourcery.com>
15472
15473         * ir.texi: Move to ../c-tree.texi.
15474
15475 2000-09-20  Jason Merrill  <jason@redhat.com>
15476
15477         * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
15478
15479 2000-09-21  Andreas Jaeger  <aj@suse.de>
15480
15481         * errfn.c: Move declaration of cp_printer and cp_printers to ...
15482         * cp-tree.h: ... here.
15483
15484         * error.c: Remove declaration of cp_printer.
15485
15486 2000-09-20  Mark Mitchell  <mark@codesourcery.com>
15487
15488         * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
15489
15490 2000-09-20  Hans-Peter Nilsson  <hp@axis.com>
15491
15492         * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
15493         users.
15494
15495 2000-09-18  Mark Mitchell  <mark@codesourcery.com>
15496
15497         * decl.c (start_function): Robustify.
15498
15499 2000-09-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15500
15501         * cp-tree.h (check_function_format): Accept a `status' parameter.
15502
15503         * call.c, typeck.c: Updates calls to `check_function_format'.
15504
15505 2000-09-17  Geoffrey Keating  <geoffk@cygnus.com>
15506
15507         * decl2.c (handle_class_head): Always push some scope even
15508         in the error case.
15509
15510 2000-09-16  Mark Mitchell  <mark@codesourcery.com>
15511
15512         * cp-tree.h (struct cp_language_function): Remove
15513         x_scope_stmt_stack and name_declared.
15514         (current_scope_stmt_stack): Remove.
15515         (function_name_declared_p): New macro.
15516         (struct lang_decl_flags): Use c_lang_decl as a base class.
15517         (context): Remove.
15518         (struct lang_decl): Replace saved_tree with context.
15519         (DECL_FRIEND_CONTEXT): Adjust accordingly.
15520         (SET_DECL_FRIEND_CONTEXT): Likewise.
15521         (DECL_VIRTUAL_CONTEXT): Likewise.
15522         (DECL_SAVED_TREE): Remove.
15523         (C_DECLARED_LABEL_FLAG): Likewise.
15524         (cplus_expand_expr_stmt): Don't declare.
15525         (add_decl_stmt): Likewise.
15526         (add_scope_stmt): Likewise.
15527         * decl.c (mark_stmt_tree): Remove.
15528         (case_compare): Likewise.
15529         (finish_case_label): Use c_add_case_label.
15530         (init_decl_processing): Set more language-specific hooks.
15531         (build_enumerator): Fix typo in comment.
15532         (cplus_expand_expr_stmt): Remove.
15533         (mark_lang_function): Use mark_c_language_function.
15534         (lang_mark_tree): Use c_mark_lang_decl.
15535         * decl2.c: Change order of inclusion.
15536         * except.c: Likewise.
15537         * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR.  Fall
15538         back on c_expand_expr.
15539         * friend.c: Include expr.h.
15540         * init.c: Change order of inclusion.
15541         * Makefile.in: Update dependencies.
15542         * lex.h (free_lang_decl_chain): Remove.
15543         * optimize.c (maybe_clone_body): Use function_name_declared_p.
15544         * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
15545         it doesn't exist.
15546         (instantiate_decl): Use function_name_declared_p.
15547         * semantics.c (lang_expand_expr_stmt): Remove.
15548         (set_current_function_name_declared): Likewise.
15549         (current_function_name_declared): Likewise.
15550         (begin_compound_stmt): Use function_name_declared_p.
15551         (add_decl_stmt): Remove.
15552         (setup_vtbl_ptr): Use function_name_declared_p.
15553         (add_scope_stmt): Remove.
15554         (current_scope_stmt_stack): New function.
15555         (cp_expand_stmt): Don't handle SCOPE_STMTs.
15556         (expand_body): Use function_name_declared_p.
15557         * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
15558         * typeck.c: Change order of includes.
15559         (convert_sequence): Remove.
15560
15561 2000-09-14  Joseph S. Myers  <jsm28@cam.ac.uk>
15562
15563         * lex.c (reswords): Add _Complex.
15564
15565 2000-09-14  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15566
15567         * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
15568
15569 2000-09-13  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
15570
15571         * init.c (begin_init_stmts): Don't use // comments.
15572
15573 2000-09-12  Jason Merrill  <jason@redhat.com>
15574
15575         * decl.c (maybe_deduce_size_from_array_init): Set do_default for
15576         all non-extern arrays.
15577
15578         * decl.c (grokdeclarator): Complain about 'friend T' for implicit
15579         typenames, too.  Downgrade complaint to pedwarn.
15580         (xref_tag): Warn about surprising behavior of 'friend struct T'.
15581         * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
15582         'class This::Inherited'.
15583
15584 2000-09-12  Mark Mitchell  <mark@codesourcery.com>
15585
15586         * decl.c (finish_case_label): Given the LABEL_DECL a
15587         DECL_CONTEXT.
15588
15589 2000-09-12  Gabriel Dos Reis  <gdr@codesourcery.com>
15590
15591         * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
15592         TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
15593         TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
15594         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
15595         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
15596         New macros.
15597         (sorry_for_unsupported_tree, print_scope_operator,
15598         print_left_paren, print_right_paren, print_left_bracket,
15599         print_right_bracket, print_whitespace): Likewise.
15600         (aggr_variety): Rename to class_key_or_enum.
15601         (print_type): Rename to print_type_id.
15602         (print_type_specifier_seq, print_simple_type_specifier,
15603         print_elaborated_type_specifier,
15604         print_rest_of_abstract_declarator,
15605         print_parameter_declaration_clause, print_exception_specification,
15606         print_nested_name_specifier, print_template_id,
15607         typedef_original_name,  print_template_argument_list_start,
15608         print_template_argument_list_end): New functions.
15609
15610 2000-09-11  Gabriel Dos Reis  <gdr@codesourcery.com>
15611
15612         * ir.texi: Add more documentation.
15613
15614 2000-09-11  Mark Mitchell  <mark@codesourcery.com>
15615
15616         * cp-tree.h (struct saved_scope): Remove x_function_parms.
15617         (current_function_parms): Don't define.
15618         (struct cp_language_function): Remove parms_stored.
15619         (current_function_just_assigned_this): Don't define.
15620         (current_function_parms_stored): Likewise.
15621         (static_ctors): Declare.
15622         (static_dtors): Likewise.
15623         (SF_EXPAND): Don't define.
15624         (expand_start_early_try_stmts): Remove declaration.
15625         (store_parm_decls): Likewise.
15626         * decl.c (static_ctors): Don't declare.
15627         (static_dtors): Likewise.
15628         (struct binding_level): Remove this_block.
15629         (poplevel): Remove dead code.
15630         (set_block): Likewise.
15631         (mark_binding_level): Don't mark this_block.
15632         (mark_saved_scope): Don't mark x_function_parms.
15633         (init_decl_processing): Don't add current_function_parms as a GC
15634         root.
15635         (check_function_type): Change prototype.
15636         (start_function): Remove RTL-generation code.
15637         (expand_start_early_try_stmts): Remove.
15638         (store_parm_decls): Give it internal linkage.  Remove
15639         RTL-generation code.
15640         (finish_function): Remove RTL-generation code.
15641         * decl2.c (static_ctors): Fix formatting.
15642         (static_dtors): Likewise.
15643         * method.c (use_thunk): Don't call store_parm_decls.
15644         (synthesize_method): Likewise.
15645         * optimize.c (maybe_clone_body): Likewise.
15646         * parse.y (fn.def2): Likewise.
15647         (.set_base_init): Likewise.
15648         (nodecls): Likewise.
15649         * pt.c (instantiate_decl): Likewise.
15650         * rtti.c (synthesize_tinfo_fn): Likewise.
15651         * semantics.c (genrtl_try_block): Simplify.
15652         (expand_body): Use genrtl_start_function and
15653         genrtl_finish_function.
15654         (genrtl_start_function): New function.
15655         (genrtl_finish_function): Likewise.
15656
15657 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
15658
15659         * error.c (cp_tree_printer, case 'P'): Append break.
15660
15661 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
15662
15663         * cp-tree.h (frob_opname): Declare.
15664         * parse.y (saved_scopes): New static variable.
15665         (cp_parse_init): Adjust.
15666         (do_id): If lastiddecl is NULL, do do_identifier.
15667         (operator): Save scope information.
15668         (unoperator): New reduction. Restore scope information.
15669         (operator_name): Append unoperator. Call frob_opname.
15670         * spew.c (frob_opname): Define.
15671
15672 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
15673
15674         * decl.c, rtti.c: Include defaults.h if not already included.
15675         Don't define the *_TYPE_SIZE macros.
15676
15677 2000-09-09  Mark Mitchell  <mark@codesourcery.com>
15678
15679         * cp-tree.h (push_switch): Change prototype.
15680         (check_cp_case_value): Remove declaration.
15681         (decl_constant_value): Likewise.
15682         * decl.c (struct cp_switch): Add switch_stmt and cases.
15683         (case_compare): New function.
15684         (push_switch): Set switch_stmt.  Initialize cases.
15685         (pop_switch): Clean up cases.
15686         (define_case_label): Rename to ...
15687         (finish_case_label): ... this.  Do semantic analysis for case
15688         labels here.
15689         (start_function): Correct comment.
15690         * decl2.c (check_cp_case_value): Remove.
15691         * expr.c (do_case): Remove.
15692         * pt.c (tsubst_expr): Adjust call to finish_case_label.
15693         * semantics.c (genrtl_do_poplevel): Remove declaration.
15694         (RECHAIN_STMTS): Remove.
15695         (finish_break_stmt): Use build_break_stmt.
15696         (finish_continue_stmt): Use build_continue_stmt.
15697         (finish_switch_cond): Adjust condition here, rater than in
15698         c_expand_start_case.
15699         (finish_case_label): Remove.
15700         * typeck.c (c_expand_return): Remove.
15701         (c_expand_start_case): Likewise.
15702
15703 2000-09-07  Gabriel Dos Reis  <gdr@codesourcery.com>
15704
15705         * ir.texi: Document type nodes.
15706
15707 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
15708
15709         * cp-tree.h (init_cp_semantics): Declare.
15710         (genrtl_try_block): Don't declare.
15711         (genrtl_handler): Likewise.
15712         (genrtl_catch_block): Likewise.
15713         (genrtl_ctor_stmt): Likewise.
15714         (genrtl_subobject): Likewise.
15715         (genrtl_do_poplevel): Likewise.
15716         (genrtl_named_return_value): Likewise.
15717         * lex.c (init_parse): Call init_cp_semantics.
15718         * semantics.c (genrtl_try_block): Give it internal linkage.
15719         (genrtl_handler): Likewise.
15720         (genrtl_catch_block): Likewise.
15721         (genrtl_ctor_stmt): Likewise.
15722         (genrtl_subobject): Likewise.
15723         (genrtl_do_poplevel): Likewise.
15724         (genrtl_named_return_value): Likewise.
15725         (lang_expand_stmt): Rename to ...
15726         (cp_expand_stmt): ... this.  Only handle C++-specific nodes.
15727         (init_cp_semantics): Define.
15728
15729         * decl.c (initialize_local_var): Remove RTL-generating code.
15730         * semantics.c (genrtl_try_block): Fix formatting.
15731
15732         Move statement-tree facilities from C++ to C front-end.
15733         * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
15734         (void_zero_node): Remove.
15735         (stmt_tree): Likewise.
15736         (scope_chain): Adjust.
15737         (language_function): Rename to cp_language_function.
15738         (cp_function_chain): Adjust.
15739         (current_stmt_tree): Remove.
15740         (last_tree): Likewise.
15741         (last_expr_type): Likewise.
15742         (struct lang_decl): Adjust.
15743         (STMT_IS_FULL_EXPR_P): Remove.
15744         (add_tree): Remove.
15745         (begin_stmt_tree): Likewise.
15746         (finish_stmt_tree): Likewise.
15747         (walk_tree_fn): Likewise.
15748         (walk_stmt_tree): Likewise.
15749         * class.c (finish_struct): Replace use of add_tree with add_stmt.
15750         * decl.c (mark_stmt_tree): Adjust type.
15751         (init_decl_processing): Don't build void_zero_node.
15752         (initialize_local_var): Adjust usage of current_stmt_tree.
15753         (finish_enum): Use add_stmt, not add_tree.
15754         (save_function_data): Adjust use of language_function.
15755         (finish_constructor_body): Use add_stmt, not add_tree.
15756         (finish_destructor_body): Likewise.
15757         (push_cp_function_context): Adjust use of language_function.
15758         (pop_cp_function_context): Likewise.
15759         (mark_lang_function): Likewise.
15760         (mark_cp_function_context): Likewise.
15761         * init.c (build_aggr_init): Adjust use of current_stmt_tree.
15762         (build_vec_init): Likewise.
15763         * semantics.c (SET_LAST_STMT): Remove.
15764         (RECHAIN_STMTS): Don't use it.
15765         (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
15766         (current_stmt_tree): Define.
15767         (add_tree): Remove.
15768         (finish_goto_stmt): Use add_stmt, not add_tree.
15769         (finish_expr_stmt): Likewise.
15770         (begin_if_stmt): Likewise.
15771         (finish_then_clause): Likewise.
15772         (begin_while_stmt): Likewise.
15773         (begin_do_stmt): Likewise.
15774         (finish_return_stmt): Likewise.
15775         (begin_for_stmt): Likewise.
15776         (finish_break_stmt): Likewise.
15777         (finish_continue_stmt): Likewise.
15778         (begin_switch_stmt): Likewise.
15779         (finish_case_label): Likewise.
15780         (begin_try_block): Likewise.
15781         (begin_function_try_block): Likewise.
15782         (begin_handler): Likewise.
15783         (begin_catch_block): Likewise.
15784         (begin_compound_stmt): Likewise.
15785         (begin_asm_stmt): Likewise.
15786         (finish_asm_stmt): Likewise.
15787         (finish_label_stmt): Likewise.
15788         (add_decl_stmt): Likewise.
15789         (finish_subobject): Likewise.
15790         (finish_decl_cleanup): Likewise.
15791         (finish_named_return_value): Likewise.
15792         (setup_vtbl_ptr): Likewise.
15793         (add_scope_stmt): Likewise.
15794         (finish_stmt_expr): Likewise.
15795         (prune_unused_decls): Remove.
15796         (begin_stmt_tree): Likewise.
15797         (finish_stmt_tree): Likewise.
15798         (prep_stmt): Adjust use of current_stmt_tree.
15799         (lang_expand_stmt): Likewise.
15800         * tree.c (statement_code_p): Remove.
15801         (cp_statement_code_p): New function.
15802         (walk_stmt_tree): Remove.
15803         (init_tree): Set lang_statement_code_p.
15804
15805 2000-09-06  Zack Weinberg  <zack@wolery.cumb.org>
15806
15807         Integrated preprocessor.
15808
15809         * Make-lang.in, Makefile.in: Remove all references to input.c,
15810         gxx.gperf, and hash.h.  Add ../c-lex.o to C_OBJS.
15811         * gxx.gperf, hash.h, input.c: Delete.
15812         * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
15813         initialized properly.
15814
15815         * class.c (fixup_pending_inline): Take a tree, not a
15816         struct pending_inline *.  All callers changed.
15817         (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
15818         RID_PROTECTED entries in ridpointers[] array here.
15819         * decl.c (duplicate_decls): Do not refer to struct
15820         pending_inline.
15821         (record_builtin_type, init_decl_processing): Use RID_MAX not
15822         CP_RID_MAX.
15823         (grokdeclarator): Use C_IS_RESERVED_WORD.
15824         * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
15825         cpplib.
15826         (grok_x_components): Do not inspect pending_inlines chain.
15827
15828         * cp-tree.h (struct lang_identifier): Add rid_code entry.
15829         (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
15830         (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
15831         (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
15832         TIME_IDENTIFIER_FILEINFO): Kill.
15833         Update prototypes.
15834         * lex.h: Expunge cp_rid.  Rewrite RIDBIT macros to use just a
15835         single 32-bit word.
15836         * parse.y: Call do_pending_inlines unconditionally.
15837         reinit_parse_for_method is now snarf_method.  fn.defpen is no
15838         longer necessary.  Remove unnecessary <itype> annotation on
15839         SCOPE.  Do not refer to end_of_file or struct pending_inline.
15840         * semantics.c (begin_inline_definitions): Call
15841         do_pending_inlines unconditionally.
15842
15843         * lex.c: Remove all code now shared with C front end.
15844         Initialize cpplib properly if USE_CPPLIB.  Put reserved words
15845         into the get_identifier table.  Rewrite pragma handling to
15846         work with the registry.  Move code to save tokens for later
15847         processing to spew.c.
15848
15849         * spew.c: Rewrite everything in terms of token streams instead
15850         of text.  Move routines here from lex.c / input.c as
15851         appropriate.  GC-mark trees hanging off the pending inlines
15852         chain.
15853
15854 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
15855
15856         * NEWS: Mention that the named return value extension has been
15857         deprecated.
15858         * cp-tree.h (original_result_rtx): Define.
15859         (TREE_REFERENCE_EXPR): Remove.
15860         (DECL_VPARENT): Likewise.
15861         (pushdecl_nonclass_level): Likewise.
15862         (store_return_init): Likewise.
15863         (reinit_lang_specific): Likewise.
15864         (genrtl_named_return_value): Change prototype.
15865         * decl.c (original_result_rtx): Remove.
15866         (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
15867         Do not generate RTL for local variables here.
15868         (store_return_init): Remove.
15869         * semantics.c (genrtl_named_return_value): Simplify.  Fold in
15870         store_return_init.
15871         (finish_named_return_value): Adjust accordingly.  Warn that this
15872         extension is deprecated.
15873         (lang_expand_stmt): Adjust call to genrtl_named_return_value.
15874
15875 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
15876
15877         * pt.c (type_unification_real): Replace switch with if.
15878         (unify): Tsubst non-type parms before comparing.
15879
15880 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
15881
15882         * error.c (dump_typename): New function, broken out of ...
15883         (dump_type): ... here. Use it.
15884         * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
15885
15886 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
15887
15888         * init.c (build_offset_ref): Deal with namespace scoped
15889         TEMPLATE_ID_EXPRs.
15890
15891 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
15892
15893         * class.c (resolve_address_of_overloaded_function): Add
15894         explanation message.
15895         * decl.c (define_case_label): Reformat explanation.
15896         * decl2.c (finish_static_data_member_decl): Likewise.
15897         (grokfield): Likewise.
15898         * friend.c (do_friend): Likewise.
15899
15900 2000-09-05  Zack Weinberg  <zack@wolery.cumb.org>
15901
15902         * tree.c (walk_tree): Expose tail recursion.
15903         (walk_stmt_tree): New function.
15904         * cp-tree.h: Prototype walk_stmt_tree.
15905         * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
15906         the BLOCKs directly.  If a BLOCK has no variables after
15907         pruning, discard it.
15908         (finish_stmt_tree): Use walk_stmt_tree.  No need to save and
15909         restore the line number.
15910
15911 2000-09-05  Mark Mitchell  <mark@codesourcery.com>
15912
15913         * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
15914         (pt.o): Remove dependency on HTAB_H.
15915         * cp-tree.h: Include hashtab.h.
15916         (walk_tree): Change prototype.
15917         (walk_tree_without_duplicates): New function.
15918         * decl.c (check_default_argument): Use it.
15919         * optimize.c (remap_decl): Adjust calls to walk_tree.
15920         (copy_body): Likewise.
15921         (expand_calls_inline): Likewise.
15922         (calls_setjmp_p): Use walk_tree_without_duplicates.
15923         * pt.c: Don't include hashtab.h.
15924         (for_each_template_parm): Use walk_tree_without_duplicates.
15925         * semantics.c (finish-stmt_tree): Likewise.
15926         (expand_body): Likewise.
15927         * tree.c (walk_tree): Add additional parameter.
15928         (walk_tree_without_duplicates): New function.
15929         (count_trees): Use it.
15930         (verify_stmt_tree): Adjust call to walk_tree.
15931         (find_tree): Use walk_tree_without_duplicates.
15932         (no_linkage_check): Likewise.
15933         (break_out_target_exprs): Adjust call to walk_tree.
15934         (cp_unsave): Likewise.
15935
15936 2000-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
15937
15938         * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
15939         (TEMPLATE_TEMPLATE_PARM): Adjust comment.
15940         * cp-tree.h (TYPE_BINFO): Adjust comment.
15941         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
15942         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
15943         (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
15944         (TYPE_TEMPLATE_INFO): Likewise.
15945         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
15946         * class.c (push_nested_class): Likewise.
15947         * decl.c (lookup_name_real): Likewise.
15948         (grokdeclarator): Likewise.
15949         (grok_op_properties): Likewise.
15950         (xref_tag): Likewise.
15951         (xref_basetypes): Likewise.
15952         * decl2.c (constructor_name_full): Likewise.
15953         (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
15954         (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
15955         * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
15956         (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15957         (dump_type_suffix): Likewise.
15958         * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
15959         instead.
15960         (get_aggr_from_typedef): Likewise.
15961         * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
15962         (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15963         (write_template_parm): Likewise.
15964         (write_template_template_parm): Check tree code instead of
15965         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
15966         * method.c (build_overload_nested_name): Add
15967         BOUND_TEMPLATE_TEMPLATE_PARM.
15968         (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
15969         * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15970         * pt.c (convert_template_argument): Check tree code instead of
15971         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
15972         (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
15973         (for_each_template_parm): Adjust comment.
15974         (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.
15975         (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15976         (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.  Use
15977         template_args_equal to compare template template parameter cases.
15978         * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15979         * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
15980         instead.
15981         * tree.c (copy_template_template_parm): Decide whether to create
15982         a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
15983         (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15984         (copy_tree_r): Likewise.
15985         * typeck.c (comptypes): Likewise.  Check tree code instead of
15986         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
15987
15988 2000-09-04  Mark Elbrecht  <snowball3@bigfoot.com>
15989
15990         * decl.c (finish_function): Move the code for handling functions
15991         marked with the constructor and destructor attributes inside the
15992         expand_p block.
15993
15994 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
15995
15996         * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
15997
15998 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
15999
16000         * pt.c (lookup_template_class): Remove abort.
16001         * tree.c (get_type_decl): Allow error_mark_node.
16002
16003 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
16004
16005         * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
16006         TEMPLATE_ID_EXPRs.
16007
16008 2000-09-03  Mark Mitchell  <mark@codesourcery.com>
16009
16010         * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
16011         new ABI mangling.
16012
16013 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
16014
16015         * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
16016         union tag mismatch error reporting.
16017
16018 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
16019
16020         * call.c (build_scoped_method_call): Check it is not a namespace.
16021
16022 2000-08-30  Jason Merrill  <jason@redhat.com>
16023
16024         * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
16025
16026         * tree.c (bot_manip): Check TREE_CONSTANT rather than
16027         !TREE_SIDE_EFFECTS.  Call break_out_target_exprs and
16028         build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
16029
16030         * decl.c (start_function): Always call make_function_rtl.
16031
16032 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
16033
16034         * semantics.c (prune_unused_decls): New function.
16035         (finish_stmt_tree): Call it via walk_tree.
16036
16037 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
16038
16039         * class.c (build_secondary_vtable): Constify a char *.
16040         * decl.c (init_decl_processing): Initialize function_id_node,
16041         pretty_function_id_node, and func_id_node.
16042         * input.c (struct input_source): Constify 'str'.
16043         (feed_input): Constify first argument.
16044         * mangle.c (write_identifier): Constify argument.
16045         * pt.c (mangle_class_name_for_template): Constify argument.
16046
16047 2000-08-29  Mark Mitchell  <mark@codesourcery.com>
16048
16049         * typeck.c (mark_addressable): Remove code that pokes around in
16050         RTL.
16051
16052 2000-08-28  Jason Merrill  <jason@redhat.com>
16053
16054         * lex.c (file_name_nondirectory): Move to toplev.c.
16055
16056         * cp-tree.h (LOCAL_CLASS_P): New macro.
16057         * class.c (finish_struct_1): Use it.
16058
16059 2000-08-27  Alex Samuel  <samuel@codesourcery.com>
16060
16061         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
16062         (write_encoding): Pass another argument to write_name.
16063         (write_name): Add ignore_local_scope parameter.  Fix handling of
16064         local names.
16065         (write_nested_name): Use write_unqualified_name.
16066         (write_prefix): Likewise.  Skip out on FUNCTION_DECLs.
16067         (write_template_prefix): Use write_unqualified_name.
16068         (write_component): Remove.
16069         (write_local_name): Add parameter.  Use direct local entity to
16070         discriminator calculation.
16071         (write_class_enum_type): Pass another argument to write_name.
16072         (write_template_template_arg): Likewise.
16073         (make_guard_variable): Likewise.
16074
16075 2000-08-27  Jason Merrill  <jason@redhat.com>
16076
16077         * decl.c (pushdecl): Matching decls for local externs are found in
16078         the current level.  Propagate linkage information from previous
16079         declarations.
16080
16081 2000-08-26  Gabriel Dos Reis  <gdr@codesourcery.com>
16082
16083         * ir.texi (Expressions): Fix typo.
16084
16085 2000-08-25  Greg McGary  <greg@mcgary.org>
16086
16087         * tree.c (init_tree): Use ARRAY_SIZE.
16088
16089 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
16090
16091         * error.c (cp_tree_printer): Rework.
16092
16093 2000-08-25  Mark Mitchell  <mark@codesourcery.com>
16094
16095         * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
16096         dyn-string.o.
16097         (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
16098         (cp-demangle.o): Remove target.
16099         (dyn-string.o): Likewise.
16100
16101         * decl.c (grokfndecl): Require that `main' return an `int'.
16102         * mangle.c (write_encoding): Don't mangle return types for
16103         conversion functions.
16104
16105 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
16106
16107         * error.c (tree_formatting_info): New data type.
16108         (tree_being_formatted): New macro.
16109         (tree_formatting_flags): Likewise.
16110         (put_whitespace): Likewise.
16111         (print_tree_identifier): Likewise.
16112         (print_identifier): Likewise.
16113         (cp_tree_printer, print_function_argument_list, print_declaration,
16114         print_expression, print_function_declaration,
16115         print_function_parameter, print_type, print_cv_qualifier): New
16116         functions.
16117         (init_error): Initialize lang_printer.
16118
16119 2000-08-24  Jason Merrill  <jason@redhat.com>
16120
16121         * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
16122         adjustment necessary.
16123
16124 2000-08-24  Greg McGary  <greg@mcgary.org>
16125
16126         * cp-tree.h (MAIN_NAME_P): Remove macro.
16127
16128 2000-08-24  Gabriel Dos Reis  <gdr@codesourcery.com>
16129
16130         * error.c (print_instantiation_context): Don't forget to flush the
16131         buffer.
16132
16133 2000-08-23  Jason Merrill  <jason@redhat.com>
16134
16135         * typeck.c (build_ptrmemfunc): Save the input pmf.
16136
16137         * method.c (process_modifiers): Use same_type_p.
16138
16139 2000-08-23  Mark Mitchell  <mark@codesourcery.com>
16140
16141         * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
16142         * mangle.c (write_function_type): Change prototype.
16143         (write_encoding): Don't mangle return types for
16144         constructors or destructors.
16145         (write_type): Adjust call to write_function_type.
16146         * pt.c (instantiate_template): Instantiate alternate entry points
16147         when instantiating the main function.
16148
16149 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
16150
16151         * error.c (cp_print_error_function): Don't use embedded '\n' in
16152         output_printf.
16153
16154 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
16155
16156         * decl.c (init_decl_processing): Remove bogus initialization.
16157         * error.c (lang_print_error_function): Restore here.
16158         (init_error): Initialize print_error_function.
16159
16160 2000-08-22  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
16161
16162         * decl2.c (arg_assoc): Revert my 2000-08-11 change.
16163
16164 2000-08-22  Gabriel Dos Reis  <gdr@codesourcery.com>
16165
16166         * Makefile.in (error.o): Depends on diagnostic.h
16167
16168         * cp-tree.h (problematic_instantiation_changed,
16169         record_last_problematic_instantiation, current_instantiation,
16170         print_instantiation_context): Declare.
16171         (maybe_print_template_context): Remove.
16172
16173         * decl.c (init_decl_processing): Set print_error_function to NULL.
16174         (lang_print_error_function): Remove, since we're using a new
16175         machinery.
16176
16177         * error.c: #include diagnostic.h
16178         (function_category): New function.
16179         (cp_diagnostic_starter): Likewise.
16180         (cp_diagnostic_finalizer): Likewise.
16181         (cp_print_error_function): Likewise.
16182         (maybe_print_instantiation_context): Likewise.
16183         (print_instantiation_full_context): Likewise.
16184         (print_instantiation_partial_context): Likewise.
16185         (print_instantiation_context): Define.
16186         (init_error): Initialize diagnostic pager and finalizer.
16187
16188         * pt.c (problematic_instantiation_changed): Define.
16189         (record_last_problematic_instantiation): Likewise.
16190         (current_instantiation): Likewise.
16191         (maybe_print_template_context): Remove.
16192         (print_template_context): Likewise.
16193         (current_tinst_level): Make static to reflect Brendan Kehoe's
16194         change of 1995-04-13.
16195         (push_tinst_level): Call print_instantiation_context.
16196
16197 2000-08-21  Nix  <nix@esperi.demon.co.uk>
16198
16199         * lang-specs.h: Do not process -o or run the assembler if
16200         -fsyntax-only.
16201
16202 2000-08-21  Joseph S. Myers  <jsm28@cam.ac.uk>
16203
16204         * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
16205         variables.
16206         * decl2.c (lang_decode_option): Disable gettext attributes for
16207         -ansi.
16208
16209 2000-08-21  Gabriel Dos Reis  <gdr@codesourcery.com>
16210
16211         * lex.c (lang_init_options): Default diagnostic message maximum
16212         length to 80, when line-wrapping.
16213
16214 2000-08-20  Mark Mitchell  <mark@codesourcery.com>
16215
16216         * class.c (build_vtbl_initializer): Clear the entire
16217         vtbl_init_data.  Start keeping track of the functions for which we
16218         have created vcall offsets here.
16219         (dfs_build_vcall_offset_vtbl_entries): Remove.
16220         (build_vcall_offset_vtbl_entries): Reimplement.
16221         (add_vcall_offset_vtbl_entries_r): New function.
16222         (add_vcall_offset_vtbl_entries_1): Likewise.  Tweak logic for
16223         computing when vcall offsets are necessary.
16224
16225 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
16226
16227         * decl.c (member_function_or_else): Use cp_error ... %T.
16228         (grokdeclarator): Likewise.
16229         (start_method): Likewise.
16230         * friend.c (make_friend_class): Use cp_pedwarn ... %T.
16231
16232 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
16233
16234         * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
16235         TYPE_DECLs.
16236
16237 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
16238
16239         * cp-tree.h (PTRMEM_OK_P): New macro.
16240         (itf_ptrmem_ok): New enumeration value.
16241         * class.c (resolve_address_of_overloaded_function): Add PTRMEM
16242         argument. Diagnose implicit pointer to member.
16243         (instantiate_type): Don't diagnose implicit pointer to member
16244         here. Pass itf_ptrmem_ok if ok. Adjust calls to
16245         resolve_address_of_overloaded_function.
16246         * init.c (build_offset_ref): Set PTRMEM_OK_P.
16247         (resolve_offset_ref): Don't diagnose implicit pointer to member here.
16248         * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
16249         * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
16250         (build_unary_op): Deal with single non-static member in
16251         microsoft-land.
16252
16253 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
16254
16255         * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
16256
16257 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
16258
16259         * cp-tree.h (enum_name_string): Remove prototype.
16260         (report_case_error): Remove prototype.
16261         * cp/typeck2.c (enum_name_string): Remove.
16262         (report_case_error): Remove.
16263         * error.c (dump_expr): Deal with enum values directly.
16264         Correctly negate integer constant.
16265
16266 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
16267
16268         * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
16269         (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
16270         * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
16271         (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
16272         (__cxa_vec_new): Use __cxa_vec_new2.
16273         (__cxa_vec_delete): Use __cxa_vec_delete2.
16274
16275 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
16276
16277         * vec.cc (__cxa_vec_new): Set "C" linkage.
16278         (__cxa_vec_ctor): Likewise.
16279         (__cxa_vec_cctor): Likewise.
16280         (__cxa_vec_dtor): Likewise.
16281         (__cxa_vec_delete): Likewise.
16282         * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
16283         (__cxa_vec_ctor): Likewise.
16284         (__cxa_vec_cctor): Likewise.
16285         (__cxa_vec_dtor): Likewise.
16286         (__cxa_vec_delete): Likewise.
16287
16288 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
16289
16290         * class.c (instantiate_type): Reinstate local variable
16291         deleted in previous change.
16292
16293         * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
16294         itf_no_attributes.
16295
16296 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
16297
16298         * cp-tree.h (instantiate_type_flags): New enumeration.
16299         (instantiate_type): Change parameter.
16300         * class.c (instantiate_type): Adjust prototype. Adjust.
16301         * call.c (standard_conversion): Adjust instantiate_type call.
16302         (reference_binding): Likewise.
16303         (build_op_delete_call): Likewise.
16304         (convert_like_real): Likewise.
16305         * cvt.c (cp_convert_to_pointer): Likewise.
16306         (convert_to_reference): Likewise.
16307         * pt.c (convert_nontype_argument): Likewise.
16308         * typeck.c (build_binary_op): Likewise.
16309         (build_ptrmemfunc): Likewise.
16310         (convert_for_assignment): Likewise.
16311
16312 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
16313
16314         * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
16315         (current_aggr): Define.
16316         * decl.c (grokdeclarator): Make sure a friend class is an
16317         elaborated type specifier.
16318         * parse.y (current_aggr): Remove static definition.
16319         (cp_parse_init): Adjust.
16320         (structsp): Clear and restore current_aggr.
16321         (component_decl_list): Clear current_aggr.
16322
16323         * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
16324         aggregate tag on the typename's context.
16325
16326         * pt.c (tsubst_friend_class): Return error_mark_node, if
16327         parms becomes NULL.
16328         (instantiate_class_template): Ignore error_mark_node friend types.
16329
16330 2000-08-14  Nathan Sidwell  <nathan@codesourcery.com>
16331
16332         * cvt.c (warn_ref_binding): New static function, broken out of ...
16333         (convert_to_reference): ... here. Use it.
16334
16335 2000-08-11  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
16336
16337         * parse.y (template_arg): Add rule for template qualified with
16338         global scope.
16339
16340 2000-08-11  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
16341
16342         * decl2.c (add_function): Reorganize.
16343         (arg_assoc): Do not consider function template decls.
16344
16345 2000-08-11  Jason Merrill  <jason@redhat.com>
16346
16347         * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
16348         looking inside.
16349
16350 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
16351
16352         * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
16353         (lookup_nested_tag): Likewise.
16354
16355         * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
16356         can be produced.
16357
16358 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
16359
16360         * parse.y (named_complex_class_head_sans_basetype): Remove
16361         always true if.
16362
16363 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
16364
16365         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
16366         explicit TEMPLATE_ID_EXPR args.
16367         (build_expr_from_tree, case CALL_EXPR): Likewise.
16368
16369 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
16370
16371         * decl.c (check_tag_decl): Diagnose typename's which don't
16372         declare anything.
16373
16374 2000-08-10  Nathan Sidwell  <nathan@codesourcery.com>
16375
16376         * init.c (build_aggr_init): Reject bogus array initializers
16377         early.
16378
16379 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
16380
16381         * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
16382         runtime.
16383         * cp/tinfo.cc (__dynamic_cast): Likewise.
16384         * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
16385
16386 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
16387
16388         * cvt.c (convert_to_pointer_force): Fix error message when
16389         attempting to cast from ambiguous base.
16390
16391 2000-08-08  Jason Merrill  <jason@redhat.com>
16392
16393         * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
16394         (tsubst_template_arg_vector): Likewise.
16395
16396         * decl2.c (build_anon_union_vars): Choose the largest field; don't
16397         assume that one will be as large as the union.
16398
16399 2000-08-07  Kazu Hirata  <kazu@hxi.com>
16400
16401         * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
16402         * decl.c (pop_labels): Likewise.
16403
16404 2000-08-04  Jeffrey Oldham  <oldham@codesourcery.com>
16405
16406         * inc/cxxabi.h (__pbase_type_info): Changed member names to match
16407         specifications.
16408         (__pointer_to_member_type_info): Likewise.
16409         (__base_class_info): Likewise.
16410         (__class_type_info): Likewise.
16411         (__si_class_type_info): Likewise.
16412         (__vmi_class_type_info): Likewise.
16413         * tinfo.cc (__si_class_type_info::__do_find_public_src):
16414         Changed member names to match specifications.
16415         (__vmi_class_type_info::__do_find_public_src): Likewise.
16416         (__si_class_type_info::__do_dyncast): Likewise.
16417         (__vmi_class_type_info::__do_dyncast): Likewise.
16418         (__si_class_type_info::__do_upcast): Likewise.
16419         (__vmi_class_type_info::__do_upcast): Likewise.
16420         * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
16421         (__pbase_type_info::__pointer_catch): Likewise.
16422         (__pointer_type_info::__pointer_catch): Likewise.
16423         (__pointer_to_member_type_info::__pointer_catch): Likewise.
16424
16425 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
16426
16427         * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
16428         * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
16429         (cc1plus): Link with $(BACKEND) and $(C_OBJS).
16430
16431 2000-08-04  Mark Mitchell  <mark@codesourcery.com>
16432
16433         * cp-tree.h (add_method): Change prototype.
16434         * class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
16435         Don't double the size of the method vector in the error case.
16436         (handle_using_decl): Adjust call to add_method.
16437         (add_implicitly_declared_members): Likewise.
16438         (clone_function_decl): Likewise.
16439         * decl2.c (check_classfn): Likewise.
16440         * semantics.c (finish_member_declaration): Likewise.
16441
16442 2000-08-04  Joseph S. Myers  <jsm28@cam.ac.uk>
16443
16444         * decl.c (flag_isoc94): New variable.
16445
16446 2000-08-02  Jason Merrill  <jason@redhat.com>
16447
16448         * pt.c (do_type_instantiation): Add complain parm; don't complain
16449         if called recursively.
16450         * cp-tree.h, parse.y: Adjust.
16451
16452 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
16453
16454         * decl2.c: Silently ignore -Wstrict-prototypes; warn about
16455         -Wno-strict-prototypes.
16456
16457         * g++spec.c: Adjust type of second argument to
16458         lang_specific_driver, and update code as necessary.
16459
16460         * cp-tree.h: Don't prototype min_precision here.
16461         (my_friendly_assert): Cast expression to void.
16462         * semantics.c (do_poplevel): Initialize scope_stmts.
16463
16464 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
16465
16466         * cp-tree.h (DECL_NEEDED_P): Tweak.
16467
16468 2000-07-28  Jason Merrill  <jason@redhat.com>
16469
16470         * lang-specs.h: Use %i in rule for .ii files.
16471
16472 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
16473
16474         * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
16475
16476 2000-07-30  Mark Mitchell  <mark@codesourcery.com>
16477
16478         Allow indirect primary bases.
16479         * cp-tree.h (struct lang_type): Remove vfield_parent.  Add
16480         primary_base.
16481         (CLASSTYPE_VFIELD_PARENT): Remove.
16482         (CLASSTYPE_PRIMARY_BINFO): Reimplement.
16483         (BINFO_PRIMARY_BINFO): Remove.
16484         (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
16485         (BINFO_VBASE_PRIMARY_P): Likewise.
16486         (BINFO_PRIMARY_BASE_OF): New macro.
16487         (BINFO_INDIRECT_PRIMARY_P): Likewise.
16488         (get_primary_binfo): New function.
16489         * decl.c (lang_mark_tree): Make lang_type::primary_base.
16490         * class.c (vcall_offset_data_s): Rename to ...
16491         (vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
16492         and add ctor_vtbl_p.
16493         (get_derived_offset): Use get_primary_binfo.
16494         (dfs_mark_primary_bases): Adjust handling of virtual primary
16495         bases.
16496         (mark_primary_bases): Likewise.
16497         (set_primary_base): Take a binfo, not an integer, as a
16498         representation of the primary base.
16499         (indirect_primary_base_p): Remove.
16500         (determine_primary_base): Adjust for indirect primary bases.
16501         (dfs_find_final_overrider): Fix typo in coment.
16502         (update_vtable_entry_for_fn): Use get_primary_binfo.
16503         (layout_nonempty_base_or_field): Tweak.
16504         (build_base_fields): Adjust for new primary base semantics.
16505         (dfs_propagate_binfo_offsets): Remove.
16506         (propagate_binfo_offsets): Rewrite.
16507         (dfs_set_offset_for_shared_vbases): Remove.
16508         (layout_virtual_bases): Don't use it.
16509         (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
16510         ABI.
16511         (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
16512         CLASSTYPE_VFIELD_PARENT.
16513         (dfs_get_primary_binfo): New function.
16514         (get_primary_binfo): Likewise.
16515         (dump_class_hierarchy_r): Tweak printing of primary bases.
16516         (build_vtbl_initializer): Fix typo in comments.  Use
16517         vtbl_init_data.
16518         (build_vcall_and_vbase_vtbl_entries): Likewise.
16519         (build_vbaes_offset_vtbl_entries): Likewise.
16520         (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
16521         BV_VCALL_INDEX to handle indirect primary bases.
16522         (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
16523         (build_rtti_vtbl_entries): Likewise.
16524         * search.c (get_shared_vbase_if_not_primary): Tweak.
16525         (find_vbase_instance): Likewise.
16526         (binfo_for_vtable): Simplify.
16527         * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
16528         (make_binfo): Make it have 11 entries.
16529
16530 2000-07-30  Alex Samuel  <samuel@codesourcery.com>
16531
16532         * mangle.c (DECL_TEMPLATE_ID_P): Remove.
16533         (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
16534         ascertaining primaryness.
16535         (G): Remove template_args.
16536         (decl_is_template_id): New function.
16537         (write_encoding): Use decl_is_template_id.
16538         (write_name): Likewise.  Handle type_decls.  Get main variant of
16539         type decls.
16540         (write_nested_name): Likewise.
16541         (write_prefix): Likewise.
16542         (write_template_prefix): Likewise.
16543         (write_special_name_constructor): Remove defunct production from
16544         comment.
16545         (write_bare_function_type): Remove comment about absent parameter.
16546         (write_template_template_arg): Add missing grammar production to
16547         comment.
16548
16549 2000-07-27  Jason Merrill  <jason@redhat.com>
16550
16551         * decl.c (duplicate_decls): If common_type produces a non-typedef
16552         type for a typedef, just use the old type.
16553
16554 2000-07-27  Mark Mitchell  <mark@codesourcery.com>
16555
16556         * cp-tree.h (function_depth): Declare.
16557         (verify_stmt_tree): Likewise.
16558         (find_tree): Likewise.
16559         * decl.c (function_depth): Give it external linkage.
16560         * optimize.c (optimize_function): Increment and decrement it.
16561         * tree.c (verify_stmt_tree_r): New function.
16562         (verify_stmt_tree): Likewise.
16563         (find_tree_r): Likewise.
16564         (find_tree): Likewise.
16565
16566 2000-07-27  Jason Merrill  <jason@redhat.com>
16567
16568         * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
16569         TYPE_PTRMEMFUNC_P.
16570         * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
16571
16572 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
16573
16574         * decl.c (start_cleanup_fn): Mark the function as `inline'.
16575         * decl2.c (get_guard): Call cp_finish_decl, not
16576         rest_of_decl_compilation, for local guards.
16577         * lex.c (do_identifier): Remove unused variable.
16578
16579 2000-07-26      Marc Espie <espie@cvs.openbsd.org>
16580
16581         * parse.y:  Add missing ';'.
16582
16583 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
16584
16585         * parse.y (empty_parms): Use `()', not `(...)', when in the scope
16586         of `extern "C++"'.
16587
16588 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
16589
16590         Kill strict_prototype. Backwards compatibility only for
16591         non NO_IMPLICIT_EXTERN_C systems.
16592         * cp-tree.h (flag_strict_prototype): Remove.
16593         (strict_prototype): Remove.
16594         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
16595         * decl.c (maybe_push_to_top_level): Adjust.
16596         (pop_from_top_level): Adjust.
16597         (decls_match): Only allow sloppy parm matching for ancient
16598         system headers.
16599         (init_decl_processing): Adjust.
16600         (grokdeclarator): Adjust.
16601         * decl2.c (flag_strict_prototype): Remove.
16602         (strict_prototype): Remove.
16603         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
16604         (lang_f_options): Remove "strict-prototype".
16605         (unsupported-options): Add "strict-prototype".
16606         * lex.c (do_identifier): Adjust.
16607         (do_scoped_id): Adjust.
16608         * parse.y (empty_parms): Adjust.
16609         * class.c (push_lang_context): Adjust.
16610         (pop_lang_context): Adjust.
16611         * typeck.c (comp_target_parms): Adjust.
16612
16613 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
16614
16615         * decl.c (poplevel): Deal with anonymous variables at for scope.
16616         (maybe_inject_for_scope_var): Likewise.
16617
16618 2000-07-25  Zack Weinberg  <zack@wolery.cumb.org>
16619
16620         * decl.c: Remove all signal handling code, now done in toplev.c.
16621
16622 2000-07-23  Mark Mitchell  <mark@codesourcery.com>
16623
16624         * decl.c (make_rtl_for_nonlocal_decl): Rework.
16625
16626         * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
16627         correctly.
16628
16629 2000-07-20  Zack Weinberg  <zack@wolery.cumb.org>
16630
16631         * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
16632         Define my_friendly_assert and my_friendly_abort as macros
16633         which may call friendly_abort.  Prototype friendly abort, not
16634         my_friendly_abort or my_friendly_assert.
16635         * decl.c (signal_catch): Report the signal caught in the error
16636         message.  Call fatal directly.
16637         * typeck2.c (ack, my_friendly_assert): Delete.
16638         (my_friendly_abort): Rename to friendly_abort.  Expect file,
16639         line, and function parameters.  Report the abort code, then
16640         call fancy_abort.  Do not mask an abort if errors have
16641         already occurred.
16642
16643 2000-07-18  Nathan Sidwell  <nathan@codesourcery.com>
16644
16645         * typeck.c (comp_target_parms): Remove obsolete parameter.
16646         (comp_target_types): Adjust.
16647
16648 2000-07-17  Jason Merrill  <jason@redhat.com>
16649
16650         * typeck.c (mark_addressable): Never set TREE_USED.
16651         * call.c (build_call): Don't abort on calls to library functions
16652         that have been declared normally.
16653
16654         * typeck.c (build_binary_op): Fix grammar in warning.
16655
16656         * exception.cc (__eh_free): Fix prototype.
16657
16658         * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
16659
16660         * decl.c (pushdecl): Handle seeing an OVERLOAD in
16661         IDENTIFIER_NAMESPACE_VALUE.
16662
16663 2000-07-16  Mark Mitchell  <mark@codesourcery.com>
16664
16665         * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
16666         * method.c (use_thunk): Correct handling of vcall offsets.
16667
16668 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
16669
16670         * .cvsignore: parse.h and parse.c have no cp- prefix.
16671
16672 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
16673
16674         * .cvsignore: New file.
16675
16676 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
16677
16678         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
16679
16680 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
16681
16682         * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
16683         * parse.c: Remove.
16684         * parse.h: Likewise.
16685
16686 2000-07-11  Mark Mitchell  <mark@codesourcery.com>
16687
16688         * class.c (layout_class_type): Add pointers to virtual bases after
16689         base classes under the old ABI.
16690
16691 2000-07-10  Benjamin Chelf  <chelf@codesourcery.com>
16692
16693         * semantics.c (finish_for_stmt): Remove call to emit_line_note.
16694         (finish_continue_stmt): Likewise.
16695         (begin_for_stmt): Remove call to note_level_for_for.
16696         (finish_goto_stmt): Change call from build_min_nt
16697         to build_stmt.
16698         (finish_expr_stmt): Likewise.
16699         (begin_if_stmt): Likewise.
16700         (begin_while_stmt): Likewise.
16701         (finish_while_stmt): Likewise.
16702         (finish_return_stmt): Likewise.
16703         (begin_for_stmt): Likewise.
16704         (finish_for_stmt): Likewise.
16705         (finish_break_stmt): Likewise.
16706         (begin_switch_stmt): Likewise.
16707         (finish_case_label): Likewise.
16708         (genrtl_try_block): Likewise.
16709         (begin_try_block): Likewise.
16710         (begin_handler): Likewise.
16711         (begin_compound_stmt): Likewise.
16712         (finish_asm_stmt): Likewise.
16713         (finish_label_stmt): Likewise.
16714         (add_decl_stmt): Likewise.
16715         (finish_subobject): Likewise.
16716         (finish_decl_cleanup): Likewise.
16717         (finish_named_return_value): Likewise.
16718         (setup_vtbl_ptr): Likewise.
16719         (add_scope_stmt): Likewise.
16720         * decl.c (finish_constructor_body): Likewise.
16721         (finish_destructor_body): Likewise.
16722         * optimize.c (copy_body_r): Likewise.
16723         (initialize_inlined_parameters): Likewise.
16724         (declare_return_variable): Likewise.
16725         (expand_call_inline): Likewise.
16726
16727 2000-07-10  Jakub Jelinek  <jakub@redhat.com>
16728
16729         * semantics.c (expand_body): Sync interface information
16730         at the end of function body expansion.
16731
16732 2000-07-09  Jason Merrill  <jason@redhat.com>
16733
16734         * init.c (build_new_1): Bail early if the call to new fails.
16735
16736         * decl.c (compute_array_index_type): Check specifically for
16737         an INTEGER_CST, not just TREE_CONSTANT.
16738
16739         * decl.c (duplicate_decls): Don't call duplicate_decls on
16740         the DECL_TEMPLATE_RESULT.
16741         (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
16742         codes.
16743
16744         * error.c (dump_template_bindings): Don't crash if we had an
16745         invalid argument list.
16746
16747         * typeck.c (c_expand_start_case): Do narrowing here.
16748         * semantics.c (finish_switch_cond): Not here.
16749
16750 2000-07-09  Hidvegi Zoli  <hzoli@austin.ibm.com>
16751
16752         * parse.y (asm_clobbers): Do string concatenation.
16753
16754 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
16755
16756         * decl.c (pushtag): Don't put local classes in template functions
16757         on the local_classes list.
16758
16759 2000-07-04  Scott Snyder  <snyder@fnal.gov>
16760
16761         * decl2.c (get_guard): Add missing return for old ABI local
16762         variable case.
16763
16764 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
16765
16766         * cp-tree.h (char_type_p): New function.
16767         * decl.c (init_decl_processing): Don't initialize
16768         signed_wchar_type_node or unsigned_wchar_type_node.
16769         (complete_array_type): Handle brace-enclosed string-constants.
16770         * rtti.c (emit_support_tinfos): Remove #if 0'd code.
16771         * tree.c (char_type_p): New function.
16772         * typeck2.c (digest_init): Use char_type_p.
16773
16774 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
16775
16776         * pt.c (tsubst): Don't layout type, if it's error_mark.
16777
16778 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
16779
16780         * pt.c (instantiate_pending_templates): Reset template level.
16781
16782 2000-07-05  Jason Merrill  <jason@redhat.com>
16783
16784         * call.c (joust): Don't complain about `operator char *()' beating
16785         `operator const char *() const'.
16786
16787 2000-07-04  scott snyder  <snyder@fnal.gov>
16788             Jason Merrill  <jason@redhat.com>
16789
16790         * repo.c (repo_get_id): Handle the case where a class with virtual
16791         bases has a null TYPE_BINFO_VTABLE.
16792
16793 2000-07-04  Kevin Buhr  <buhr@stat.wisc.edu>
16794             Jason Merrill  <jason@redhat.com>
16795
16796         * parse.y (member_init): Just pass in the type.
16797         * init.c (expand_member_init): Handle getting a type.
16798
16799 2000-07-04  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
16800             Jason Merrill  <jason@redhat.com>
16801
16802         * decl.c (finish_function): Warn if a function has no return
16803         statement.
16804         Suggested by Andrew Koenig.
16805         * typeck.c (check_return_expr): Do set current_function_returns_value
16806         if we got an error_mark_node.
16807
16808 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
16809
16810         * decl2.c (push_decl_namespace): Push the original namespace.
16811
16812 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
16813
16814         * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
16815         * semantics.c (begin_class_definition): Clear it.
16816
16817 2000-07-02  Benjamin Chelf  <chelf@codesourcery.com>
16818
16819         * cp-tree.h (genrtl_goto_stmt): Remove declaration.
16820         (genrtl_expr_stmt): Likewise.
16821         (genrtl_decl_stmt): Likewise.
16822         (genrtl_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
16837         * init.c (begin_init_stmts): Remove call to
16838         genrtl_begin_compound_stmt.
16839         (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
16840
16841         * semantics.c (lang_expand_stmt): Changed call to
16842         genrtl_compound_stmt to ignore return value.
16843
16844 2000-07-02  Mark Mitchell  <mark@codesourcery.com>
16845
16846         * mangle.c (canonicalize_for_substitution): Return the canonical
16847         variant of a type.
16848
16849         * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
16850         TYPE_DECL.
16851         * typeck.c (commonparms): Remove obstack manipulations.
16852
16853 2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>
16854
16855         * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
16856
16857         * Makefile.in (OBJS): Added ../c-semantics.o.
16858         (OBJDEPS): Likewise.
16859
16860         * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
16861         ../c-common.h.
16862         (struct stmt_tree): Added comment.
16863         (current_function_name_declared): Removed.
16864         (stmts_are_full_exprs_p): Likewise.
16865         (genrtl_do_pushlevel): Likewise.
16866         (genrtl_clear_out_block): Likewise.
16867         (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
16868         (DECL_ANON_UNION_ELEMS): Likewise.
16869         (emit_local_var): Likewise.
16870         (make_rtl_for_local_static): Likewise.
16871         (do_case): Likewise.
16872         (expand_stmt): Likewise.
16873         (genrtl_decl_cleanup): Likewise.
16874         (c_expand_asm_operands): Likewise.
16875         (c_expand_return): Likewise.
16876         (c_expand_start_case): Likewise.
16877
16878         * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
16879         (emit_local_var): Likewise.
16880         (initialize_local_var): Change reference to
16881         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
16882         Change reference to stmts_are_full_exprs_p to
16883         current_stmt_tree->stmts_are_full_exprs_p.
16884         (push_cp_function_context): Likewise.
16885
16886         * expect.c (expand_throw): Change reference to
16887         stmts_are_full_exprs_p.
16888
16889         * init.c (build_aggr_init): Change reference to
16890         stmts_are_full_exprs_p.
16891         (build_vec_init): Likewise.
16892
16893         * optimize.c (maybe_clone_body): Change reference to
16894         current_function_name_declared to
16895         cp_function_chain->name_declared.
16896
16897         * pt.c (instantiate_decl): Change reference to
16898         current_function_name_declared to
16899         cp_function_chain->name_declared.
16900
16901         * semantics.c (expand_cond): Moved declaration to c-common.h.
16902         (genrtl_do_pushlevel): Moved to c-semantics.c.
16903         (genrtl_clear_out_block): Likewise.
16904         (genrtl_goto_stmt): Likewise.
16905         (genrtl_expr_stmt): Likewise.
16906         (genrtl_decl_stmt): Likewise.
16907         (gerntl_if_stmt): Likewise.
16908         (genrtl_while_stmt): Likewise.
16909         (genrtl_do_stmt): Likewise.
16910         (genrtl_return_stmt): Likewise.
16911         (genrtl_for_stmt): Likewise.
16912         (genrtl_break_stmt): Likewise.
16913         (genrtl_continue_stmt): Likewise.
16914         (genrtl_scope_stmt): Likewise.
16915         (genrtl_switch_stmt): Likewise.
16916         (genrtl_case_label): Likewise.
16917         (genrtl_begin_compound_stmt): Likewise.
16918         (genrtl_finish_compound_stmt): Likewise.
16919         (genrtl_compound_stmt): Likewise.
16920         (genrtl_asm_stmt): Likewise.
16921         (genrtl_decl_cleanup): Likewise.
16922         (expand_cond): Likewise.
16923         (expand_stmt): Renamed to ...
16924         (lang_expand_stmt): ... this.
16925         (lang_expand_expr_stmt): Initialize.
16926         (set_current_function_name_declared): Likewise.
16927         (stmts_are_full_exprs_p): Likewise.
16928         (current_function_name_declared): Likewise.
16929         (anon_aggr_type_p): Likewise.
16930         (do_poplevel): Change reference to
16931         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
16932         Change reference to stmts_are_full_exprs_p to
16933         current_stmt_tree->stmts_are_full_exprs_p.
16934         (add_tree): Likewise.
16935         (finish_expr_stmt): Likewise.
16936         (prep_stmt): Likewise.
16937         (lang_expand_stmt): Likewise.
16938         (begin_compound_stmt): Change reference to
16939         current_function_name_declared to
16940         cp_function_chain->name_declared and call to
16941         current_function_name_declared().
16942         (setup_vtbl_ptr): Likewise.
16943         (genrtl_do_poplevel): Removed.
16944
16945 2000-06-30  Jason Merrill  <jason@redhat.com>
16946
16947         * init.c (init_init_processing): Go back to aligning like
16948         double_type_node for old ABI.
16949         (get_cookie_size): Make cookie larger if we get a type that needs
16950         more alignment.
16951         (build_vec_delete): Call it.
16952
16953         * typeck.c (qualify_type_recursive): New fn.
16954         (composite_pointer_type): Use it.
16955         (build_binary_op): Use composite_pointer_type.
16956
16957 2000-06-24  Carlos O'Ryan  <coryan@cs.wustl.edu>
16958             Jason Merrill  <jason@redhat.com>
16959
16960         * typeck.c (check_return_expr): Don't complain about returning
16961         NULL from operator new if -fcheck-new.
16962         * cp-tree.h: Declare flag_check_new here.
16963         * init.c: Not here.
16964
16965 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
16966
16967         * mangle.c (find_substitution): Use same_type_p.
16968         (write_encoding): Don't check for substitutions.
16969
16970 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
16971
16972         * parse.y (expr_no_comma_rangle): New non-terminal.
16973         (template_parm): Use it for default parameter case.
16974         (template_arg): Use it.
16975         (expr_no_commas): Remove commented out undefined extensions.
16976         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
16977         * parse.h, parse.c: Rebuilt.
16978
16979 2000-06-30  Mark Mitchell  <mark@codesourcery.com>
16980
16981         * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
16982         (finish_asm_stmt): Do it here, instead.
16983
16984         * cp-tree.h (ridpointers): Don't declare.
16985         * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
16986         (record_builtin_java_type): Likewise.
16987         (init_decl_processing): Likewise.
16988         * lex.c: Move inclusion of lex.h.
16989         (ridpointers): Don't define.
16990         (init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
16991         RID_MAX.
16992         * lex.h (enum rid): Rename to ...
16993         (enum cp_rid): ... this.
16994         (ridpointers): Don't declare.
16995         * parse.y: Move inclusion of lex.h.
16996         * parse.c: Regenerated.
16997         * spew.c: Move inclusion of lex.h.
16998
16999         * cp-tree.h (struct language_function): Remove temp_name_counter.
17000         (temp_name_counter): Remove.
17001         (get_temp_name): Change prototype.
17002         (get_guard): New function.
17003         (get_guard_cond): Likewise.
17004         (set_guard): Likewise.
17005         * cvt.c (build_up_reference): Adjust call to get_temp_name.
17006         * decl.c (expand_static_init): Use get_guard and friends to
17007         implement guard variables.
17008         * decl2.c (get_temp_name): Assume that the variables created are
17009         always static.
17010         (get_sentry): Rename to ...
17011         (get_guard): ... this.  Implement new ABI guard variables.
17012         (get_guard_bits): New function.
17013         (get_guard_cond): Likewise.
17014         (set_guard): Likewise.
17015         (start_static_initialization_or_destruction): Use them.
17016         (do_static_initialization): Replace sentry with guard throughout.
17017         (do_static_destruction): Likewise.
17018         * init.c (create_temporary_var): Add comment.
17019
17020 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
17021
17022         * mangle.c (find_substitution): Use same_type_p.
17023         (write_encoding): Don't check for substitutions.
17024
17025 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
17026
17027         * parse.y (expr_no_comma_rangle): New non-terminal.
17028         (template_parm): Use it for default parameter case.
17029         (template_arg): Use it.
17030         (expr_no_commas): Remove commented out undefined extensions.
17031         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
17032         * parse.h, parse.c: Rebuilt.
17033
17034 2000-06-29  Mark Mitchell  <mark@codesourcery.com>
17035
17036         * cp-tree.h (flag_const_strings): Remove.
17037         (warn_parentheses): Likewise.
17038         (warn_format): Likewise.
17039         (common_type): Likewise.
17040         (default_conversion): Likewise.
17041         (build_binary_op): Likewise.
17042         (cp_build_binary_op): New macro.
17043         * call.c (build_new_op): Use cp_build_binary_op instead of
17044         build_binary_op.
17045         * class.c (build_vtable_entry_ref): Likewise.
17046         * decl.c (expand_static_init): Likewise.
17047         (compute_array_index_type): Likewise.
17048         (build_enumerator): Likewise.
17049         * decl2.c (delete_sanity): Likewise.
17050         (start_static_initialization_or_destruction): Likewise.
17051         * error.c (dump_type_suffix): Likewise.
17052         * init.c (resolve_offset_ref): Likewise.
17053         (build_new): Likewise.
17054         (build_new_1): Likewise.
17055         (build_vec_delete_1): Likewise.
17056         (build_vec_init): Likewise.
17057         (build_delete): Likewise.
17058         * rtti.c (synthesize_tinfo_fn): Likewise.
17059         (synthesize_tinfo_var): Likewise.
17060         * search.c (expand_upcast_fixups): Likewise.
17061         (fixup_all_virtual_upcast_offsets): Likewise.
17062         * typeck.c (build_array_ref): Likewise.
17063         (get_member_function_from_ptrfunc): Likewise.
17064         (build_binary_op): Add parameter.
17065         (pointer_int_sum): Use cp_build_binary_op.
17066         (pointer_diff): Likewise.
17067         (build_modify_expr): Likewise.
17068         (get_delta_difference): Likewise.
17069         (build_ptrmemfunc): Likewise.
17070
17071 2000-06-29  Nathan Sidwell  <nathan@codesourcery.com>
17072
17073         * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
17074         * decl.c (create_implicit_typedef): Adjust.
17075         * decl2.c (build_artificial_parm): Adjust.
17076         * method.c (implicitly_declare_fn): Adjust.
17077         * pt.c (push_inline_template_parms_recursive): Adjust.
17078         (process_template_parm): Adjust.
17079         (overloaded_template_name): Adjust.
17080         * semantics.c (finish_template_template_parm): Adjust.
17081
17082 2000-06-28  Mark Mitchell  <mark@codesourcery.com>
17083
17084         * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
17085         * class.c (update_vtable_entry_for_fn): Correct logic for deciding
17086         where to emit thunks.
17087         (build_vtt): Adjust call to build_vtt_inits.
17088         (build_vtt_inits): Add parameter to indicate whether or not
17089         sub-VTTs for virtual bases should be included.  Adjust handling of
17090         construction vtables.
17091         (get_matching_base): New function.
17092         (dfs_build_vtt_inits): Rename to ...
17093         (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
17094         construction vtables.
17095         (dfs_fixup_binfo_vtbls): Likewise.
17096         (build_ctor_vtbl_groups): Build construction vtables for virtual
17097         bases, too.
17098         (accumulate_vtbl_inits): Tweak logic for deciding whether or not
17099         to build construction vtbls.
17100         (dfs_accumulate_vtbl_inits): Adjust handling of
17101         construction vtables.
17102
17103         * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
17104         types correctly.
17105
17106 2000-06-27  Mark Mitchell  <mark@codesourcery.com>
17107
17108         * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
17109
17110 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
17111
17112         * search.c (hides): Remove.
17113         (is_subobject_of_p): Add most_derived parameter. Use
17114         CANONICAL_BINFO.
17115         (lookup_field_queue_p): Adjust.
17116         (lookup_field_r): Adjust.
17117
17118 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
17119
17120         * decl2.c (handle_class_head): Bash typedefs to the type's main
17121         decl.
17122
17123 2000-06-25  Mark Mitchell  <mark@codesourcery.com>
17124
17125         * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
17126         (begin_global_stmt_expr): ... this.
17127         (genrtl_finish_stmt_expr): Rename to ...
17128         (finish_global_stmt_expr): ... this.
17129         * init.c (begin_init_stmts): Adjust calls.
17130         (finish_init_stmts): Likewise.
17131         * semantics.c (genrtl_begin_stmt_expr): Rename to ...
17132         (begin_global_stmt_expr): ... this.
17133         (genrtl_finish_stmt_expr): Rename to ...
17134         (finish_global_stmt_expr): ... this.
17135
17136 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
17137
17138         * search.c (lookup_member): Fix typo in comment.
17139
17140 2000-06-24  Jason Merrill  <jason@redhat.com>
17141
17142         * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
17143         (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
17144
17145 2000-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
17146
17147         * parse.y (complex_direct_notype_declarator): Support global_scope.
17148         * Makefile.in: Adjust conflict count.
17149
17150 2000-06-23  Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
17151
17152         * parse.y (template_arg): Convert TEMPLATE_DECL
17153         that is a template template parameter to
17154         TEMPLATE_TEMPLATE_PARM here.
17155
17156         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
17157         * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
17158         (copy_template_template_parm): Adjust prototype.
17159         * decl.c (grokdeclarator): Remove dead code.
17160         * pt.c (process_template_parm): Tidy.
17161         (lookup_template_class): Construct nodes in
17162         copy_template_template_parm.
17163         (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
17164         lookup_template_class.  Use TYPE_TI_TEMPLATE.
17165         * tree.c (copy_template_template_parm): Add NEWARGS
17166         parameter.
17167         (mapcar): Adjust call to copy_template_template_parm.
17168         * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
17169         * method.c (build_template_template_parm_names): Change error
17170         code to avoid compilation warning.
17171
17172         * gxxint.texi: Document template template parameter
17173         name mangling.
17174
17175 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
17176
17177         * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
17178         (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
17179         (cp-demangle.o): New rule.
17180         (dyn-string.o): Likewise.
17181         * inc/cxxabi.h (__cxa_demangle): New declaration.
17182
17183 2000-06-22  Mark Mitchell  <mark@codesourcery.com>
17184
17185         * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
17186         (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
17187         (lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
17188         a tree, not an int.
17189         (THUNK_GENERATE_WITH_VTABLE_P): New macro.
17190         (make_thunk): Change prototype.
17191         (emit_thunk): Rename to use_thunk.
17192         (mangle_thunk): Change prototype.
17193         * class.c (get_derived_offset): Simplify.
17194         (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
17195         BV_GENERATE_THUNK_WITH_VTABLE_P.
17196         (build_primary_vtable): Simplify.
17197         (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
17198         (dfs_find_base): Remove.
17199         (update_vtable_entry_for_fn): Correct bug in finding the base
17200         where a virtual function was first declared.  Figure out whether
17201         or not to emit a vcall-thunk with the vtables in which it appears.
17202         Correct logic for deciding whether to use an ordinary thunk, or a
17203         vcall thunk.
17204         (finish_struct_1): Remove unnecssary code.
17205         (build_vtbl_initializer): Use ssize_int for the running counter of
17206         negative indices.
17207         (build_vtbl_initializer): Only use vcall thunks where necessary.
17208         Mark thunks as needing to be emitted with their vtables, or not.
17209         (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
17210         indices.  Use size_binop.
17211         (dfs_build_vcall_offset_vtbl_entries): Don't rely on
17212         BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
17213         size_binop.
17214         (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
17215         (build_vtable_entry): Mark thunks as needing to be emitted with
17216         their vtables, or not.
17217         * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
17218         * decl2.c (mark_vtable_entries): Use use_thunk instead of
17219         emit_thunk.
17220         * dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
17221         information.
17222         * error.c (dump_expr): Use BV_FN.
17223         * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
17224         not an int.
17225         * method.c (make_thunk): Likewise.
17226         (emit_thunk): Rename to use_thunk.  Allow callers to decide
17227         whether or not to actually emit the thunk.  Adjust for changes in
17228         representation of vcall offsets.
17229         * search.c (dfs_get_pure_virtuals): Use BV_FN.
17230         * semantics.c (emit_associated_thunks): New function.
17231         (expand_body): Use it.
17232         * ir.texi: Adjust decriptions of thunks.
17233
17234 2000-06-22  Jason Merrill  <jason@redhat.com>
17235
17236         * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
17237         (tsubst_friend_function): Copy it here.
17238
17239         * decl.c (grok_op_properties): Fix typo.
17240
17241         * decl2.c (delete_sanity): Clarify warning, avoid failure on
17242         deleting void*.
17243
17244         * pt.c (check_explicit_specialization): Clarify error.
17245
17246         * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
17247         an old OVERLOAD when we're declaring a non-function.
17248         (pushdecl, destroy_local_var): Check for error_mark_node.
17249         (warn_extern_redeclared_static): Also bail early if
17250         we're a CONST_DECL.
17251         (push_overloaded_decl): Ignore an old error_mark_node.
17252
17253 2000-06-22  Nathan Sidwell  <nathan@codesourcery.com>
17254
17255         * call.c (build_x_va_arg): Check if in a template decl.
17256         * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
17257
17258 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17259
17260         * class.c (push_lang_context): TYPE_NAME gets you to the Java
17261         types DECLs.
17262         * decl.c (check_goto): Computed gotos assumed OK.
17263
17264 2000-06-20  Jason Merrill  <jason@redhat.com>
17265
17266         * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
17267         for which we don't need to look for instantiations.
17268
17269 2000-06-21  Nathan Sidwell  <nathan@codesourcery.com>
17270
17271         * parse.y (program): Always call finish_translation_unit.
17272         * parse.c, parse.h: Rebuilt.
17273
17274 2000-06-20  Zack Weinberg  <zack@wolery.cumb.org>
17275
17276         * method.c: Don't include hard-reg-set.h.
17277
17278 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
17279
17280         * rtti.c (get_base_offset): Cope when vbase field is in a base.
17281
17282 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
17283
17284         * call.c (build_conditional_expr): Use VOID_TYPE_P.
17285         * cvt.c (cp_convert_to_pointer): Likewise.
17286         (convert_to_void): Likewise.
17287         * error.c (dump_expr): Likewise.
17288         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
17289         * init.c (build_delete): Likewise.
17290         * method.c (emit_thunk): Likewise.
17291         * optmize.c (declare_return_variable): Likewise.
17292         * rtti.c (get_tinfo_decl_dynamic): Likewise.
17293         (get_typeid): Likewise.
17294         (build_dynamic_cast_1): Likewise.
17295         * typeck.c (composite_pointer_type): Likewise.
17296         (common_type): Likewise.
17297         (build_indirect_ref): Likewise.
17298         (build_binary_op): Likewise.
17299         (build_x_compound_expr): Likewise.
17300         (check_return_expr): Likewise.
17301         * typeck2.c (add_exception_specifier): Likewise.
17302
17303         * mangle.c (write_method_parms): Use direct comparison for end
17304         of parmlist.
17305
17306 2000-06-19  Benjamin Chelf  <chelf@codesourcery.com>
17307
17308         * cp-tree.h (genrtl_try_block): Declare function.
17309         (genrtl_handler): Likewise.
17310         (genrtl_catch_block): Likewise.
17311         (genrtl_ctor_stmt): Likewise.
17312         (genrtl_subobject): Likewise.
17313         (genrtl_decl_cleanup): Likewise.
17314         (genrtl_do_poplevel): Likewise.
17315         (genrtl_do_pushlevel): Likewise.
17316         (genrtl_clear_out_block): Likewise.
17317         (genrtl_goto_stmt): Likewise.
17318         (genrtl_expr_stmt): Likewise.
17319         (genrtl_decl_stmt): Likewise.
17320         (genrtl_if_stmt): Likewise.
17321         (genrtl_while_stmt): Likewise.
17322         (genrtl_do_stmt): Likewise.
17323         (genrtl_return_stmt): Likewise.
17324         (genrtl_for_stmt): Likewise.
17325         (genrtl_break_stmt): Likewise.
17326         (genrtl_continue_stmt): Likewise.
17327         (genrtl_scope_stmt): Likewise.
17328         (genrtl_switch_stmt): Likewise.
17329         (genrtl_case_label): Likewise.
17330         (genrtl_begin_compound_stmt): Likewise.
17331         (genrtl_finish_compound_stmt): Likewise.
17332         (genrtl_compound_stmt): Likewise.
17333         (genrtl_asm_stmt): Likewise.
17334         (genrtl_named_return_value): Likewise.
17335         (genrtl_begin_stmt_expr): Likewise.
17336         (genrtl_finish_stmt_expr): Likewise.
17337         (finish_for_stmt): Removed first argument.
17338         (finish_switch_stmt): Likewise.
17339
17340         * semantics.c (genrtl_try_block): Define function.
17341         (genrtl_handler): Likewise.
17342         (genrtl_catch_block): Likewise.
17343         (genrtl_ctor_stmt): Likewise.
17344         (genrtl_subobject): Likewise.
17345         (genrtl_decl_cleanup): Likewise.
17346         (genrtl_do_poplevel): Likewise.
17347         (genrtl_do_pushlevel): Likewise.
17348         (genrtl_clear_out_block): Likewise.
17349         (genrtl_goto_stmt): Likewise.
17350         (genrtl_expr_stmt): Likewise.
17351         (genrtl_decl_stmt): Likewise.
17352         (genrtl_if_stmt): Likewise.
17353         (genrtl_while_stmt): Likewise.
17354         (genrtl_do_stmt): Likewise.
17355         (genrtl_return_stmt): Likewise.
17356         (genrtl_for_stmt): Likewise.
17357         (genrtl_break_stmt): Likewise.
17358         (genrtl_continue_stmt): Likewise.
17359         (genrtl_scope_stmt): Likewise.
17360         (genrtl_switch_stmt): Likewise.
17361         (genrtl_case_label): Likewise.
17362         (genrtl_begin_compound_stmt): Likewise.
17363         (genrtl_finish_compound_stmt): Likewise.
17364         (genrtl_compound_stmt): Likewise.
17365         (genrtl_asm_stmt): Likewise.
17366         (genrtl_named_return_value): Likewise.
17367         (genrtl_begin_stmt_expr): Likewise.
17368         (genrtl_finish_stmt_expr): Likewise.
17369         (finish_for_stmt): Removed first argument and generate rtl
17370         specific code.
17371         (finish_switch_stmt): Likewise.
17372         (do_poplevel): Removed generate rtl specific code.
17373         (do_pushlevel): Likewise.
17374         (add_tree): Likewise.
17375         (finish_goto_stmt): Likewise.
17376         (finish_expr_stmt): Likewise.
17377         (begin_if_stmt): Likewise.
17378         (finish_if_stmt_cond): Likewise.
17379         (finish_then_clause): Likewise.
17380         (begin_else_clause): Likewise.
17381         (finish_else_clause): Likewise.
17382         (finish_if_stmt): Likewise.
17383         (clear_out_block): Likewise.
17384         (begin_while_stmt): Likewise.
17385         (finish_while_stmt_cond): Likewise.
17386         (finish_while_stmt): Likewise.
17387         (begin_do_stmt): Likewise.
17388         (finish_do_body): Likewise.
17389         (finish_do_stmt): Likewise.
17390         (finish_return_stmt): Likewise.
17391         (begin_for_stmt): Likewise.
17392         (finish_for_init_stmt): Likewise.
17393         (finish_for_cond): Likewise.
17394         (finish_for_expr): Likewise.
17395         (finish_break_stmt): Likewise.
17396         (finish_continue_stmt): Likewise.
17397         (begin_switch_stmt): Likewise.
17398         (finish_switch_cond): Likewise.
17399         (finish_case_label): Likewise.
17400         (begin_try_block): Likewise.
17401         (begin_function_try_block): Likewise.
17402         (finish_try_block): Likewise.
17403         (finish_cleanup_try_block): Likewise.
17404         (finish_cleanup): Likewise.
17405         (finish_function_try_block): Likewise.
17406         (finish_handler_sequence): Likewise.
17407         (finish_function_handler_sequence): Likewise.
17408         (begin_handler): Likewise.
17409         (finish_handler_parms): Likewise.
17410         (begin_catch_block): Likewise.
17411         (finish_handler): Likewise.
17412         (begin_compound_stmt): Likewise.
17413         (finish_compound_stmt): Likewise.
17414         (finish_asm_stmt): Likewise.
17415         (finish_label_stmt): Likewise.
17416         (finish_label_decl): Likewise.
17417         (finish_subobject): Likewise.
17418         (finish_decl_cleanup): Likewise.
17419         (finish_named_return_value): Likewise.
17420         (begin_stmt_expr): Likewise.
17421         (finish_stmt_expr): Likewise.
17422
17423         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
17424         to call genrtl_expr_stmt when appropriate.
17425
17426         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
17427         begin_compound_expr to call genrtl_begin_stmt_expr and
17428         genrtl_begin_compound_expr when appropriate.
17429         (finish_init_stmts): Changed calls to finish_compound_expr and
17430         finish_stmt_expr to call genrtl_finish_compound_expr and
17431         genrtl_finish_stmt_expr when appropriate.
17432         (expand_default_init): Changed call to finish_expr_stmt to call
17433         genrtl_expr_stmt when appropriate.
17434         (build_vec_init): Likewise.
17435
17436         * parse.y (simple_stmt): Removed first argument from call to
17437         finish_for_stmt. Removed first argument from call to
17438         finish_switch_stmt.
17439
17440         * parse.c: Regenerated.
17441
17442         * pt.c (tsubst_expr): Removed first argument from call to
17443         finish_for_stmt. Removed first argument from call to
17444         finish_switch_stmt.
17445
17446 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
17447
17448         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
17449         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
17450
17451         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
17452         (cplus_tree_code_length[]): Likewise.
17453         (cplus_tree_code_name[]): Likewise.
17454         (init_parse): Added call to add_c_tree_codes. Changed
17455         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
17456
17457 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
17458
17459         * cp-tree.h (finish_mem_initializers): Declare.
17460         (count_trees): Likewise.
17461         * parse.y (base_init): Use finish_mem_initializers.
17462         * semantics.c (finish_mem_initializers): New function.
17463
17464         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
17465         the number of trees.
17466         (n_trees): Remove.
17467         (count_trees): Don't use it.
17468
17469 2000-06-15  Jason Merrill  <jason@redhat.com>
17470
17471         * tree.c (count_trees): New debugging function.
17472
17473         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
17474         * init.c (build_member_call): Pull out the name of a DECL.
17475
17476         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
17477         * semantics.c (expand_body): Push to TV_INTEGRATION here.
17478         * optimize.c (optimize_function): Not here.
17479         * pt.c (instantiate_decl): Push to TV_PARSE.
17480
17481 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
17482
17483         * cp-tree.h (struct language_function): Remove x_base_init_list
17484         and x_member_init_list.
17485         (current_base_init_list): Remove.
17486         (current_member_init_list): Likewise.
17487         (setup_vtbl_ptr): Change prototype.
17488         (emit_base_init): Likewise.
17489         (expand_member_init): Likewise.
17490         (reinit_parse_for_function): Remove.
17491         * decl.c (save_function_data): Don't clear x_base_init_list and
17492         x_member_init_list.
17493         (mark_language_function): Don't mark them.
17494         * init.c (perform_member_init): Tweak comment.
17495         (sort_member_init): Take the list of initializers as an argument.
17496         (sort_base_init): Likewise.
17497         (emit_base_init): Likewise.
17498         (expand_member_init): Return the initializer.  Don't use global
17499         variables.
17500         * lex.c (reinit_parse_for_function): Remove.
17501         * method.c (build_template_parm_names): Correct substitution.
17502         (do_build_copy_constructor): Don't use current_member_init_list
17503         and current_base_init_list.
17504         (synthesize_method): Likewise.
17505         * parse.y (base_init): Split mem-initializers into
17506         base-initializers and field-initializers.
17507         (member_init_list): Build up the list here.
17508         (member_init): Return the initializer.
17509         (fn.depfn): Don't use reinit_parse_for_function.
17510         * parse.c: Regenerated.
17511         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
17512         ERROR_MARK.
17513         (tsubst_expr): Don't use current_member_init_list
17514         and current_base_init_list.
17515         (tsubst_expr_values): Rename to ...
17516         (tsubst_initializer_list): ... this.  Use convert_from_reference.
17517         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
17518         and current_base_init_list.
17519         (begin_function_definition): Don't call reinit_parse_for_function.
17520
17521         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
17522
17523         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
17524         correctly.
17525
17526         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
17527
17528 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
17529
17530         * cp-tree.h (IF_COND): Move to c-common.h.
17531         (THEN_CLAUSE): Likewise.
17532         (ELSE_CLAUSE): Likewise.
17533         (WHILE_COND): Likewise.
17534         (WHILE_BODY): Likewise.
17535         (DO_COND): Likewise.
17536         (DO_BODY): Likewise.
17537         (RETURN_EXPR): Likewise.
17538         (EXPR_STMT_EXPR): Likewise.
17539         (FOR_INIT_STMT): Likewise.
17540         (FOR_COND): Likewise.
17541         (FOR_EXPR): Likewise.
17542         (FOR_BODY): Likewise.
17543         (SWITCH_COND): Likewise.
17544         (SWITCH_BODY): Likewise.
17545         (CASE_LOW): Likewise.
17546         (CASE_HIGH): Likewise.
17547         (GOTO_DESTINATION): Likewise.
17548         (COMPOUND_BODY): Likewise.
17549         (ASM_CV_QUAL): Likewise.
17550         (ASM_STRING): Likewise.
17551         (ASM_OUTPUTS): Likewise.
17552         (ASM_INPUTS): Likewise.
17553         (ASM_CLOBBERS): Likewise.
17554         (DECL_STMT_DECL): Likewise.
17555         (STMT_EXPR_STMT): Likewise.
17556         (LABEL_STMT_LABEL): Likewise.
17557         (SCOPE_BEGIN_P): Likewise.
17558         (SCOPE_END_P): Likewise.
17559         (SCOPE_STMT_BLOCK): Likewise.
17560         (SCOPE_NULLIFIED_P): Likewise.
17561         (SCOPE_NO_CLEANUPS_P): Likewise.
17562         (SCOPE_PARTIAL_P): Likewise.
17563         (ASM_VOLATILE_P): Likewise.
17564         (STMT_LINENO): Likewise.
17565         (STMT_LINENO_FOR_FN_P): Likewise.
17566
17567         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
17568         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
17569         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
17570         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
17571         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
17572
17573         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
17574
17575         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
17576         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
17577
17578         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
17579         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
17580         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
17581
17582 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
17583
17584         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
17585         * class.c (dfs_find_final_overrider): Set it appropriately.
17586         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
17587         avoid unneeded secondary vptrs.
17588
17589 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
17590
17591         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
17592         (check_bitfield_decl, check_field_decl): Likewise.
17593         (build_vtbl_or_vbase_field, build_base_field): Likewise.
17594         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
17595         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
17596         (xfer_tag, finish_enum): Likewise.
17597         * decl2.c (finish_builtin_type): Likewise.
17598         * init.c (init_init_processing): Likewise.
17599         * pt.c (instantiate_class_template): Likewise.
17600         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
17601         * cp-tree.h (struct lang_type): Add user_align member.
17602         (CLASSTYPE_USER_ALIGN): Define.
17603
17604 2000-06-13  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
17605
17606         * Make-lang.in (c++.install-common): Install g++-cross in
17607         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
17608         $(target_alias)-g++ and $(target_alias)-c++.
17609
17610 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
17611
17612         * class.c (vcall_offset_data_s): Add last_init and fns.
17613         (overrides): Rename to same_signature_p.
17614         (dfs_find_final_overrider): Adjust accordingly.
17615         (mark_overriders): Likewise.
17616         (warn_hidden): Likewise.
17617         (build_vtbl_initializer): Reorganize machinery for building things
17618         at negative offsets.
17619         (build_vcall_and_vbase_vtbl_entries): Likewise.
17620         (build_vbase_offset_vtbl_entries): Likewise.
17621         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
17622         offset entries.  Do not create two entries for functions with the
17623         same signature.
17624         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
17625         (build_rtti_vtbl_entries): Reorganize machinery for building things
17626         at negative offsets.
17627
17628         * optimize.c (expand_call_inline): Don't recurse into the code
17629         used to initialize the parameters more than once.
17630
17631 2000-06-11  Mark Mitchell <mark@codesourcery.com>
17632
17633         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
17634         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
17635         (find_substitution): Only use the `Sa' substitution for
17636         std::allocator, not instantiations of it.
17637         (write_template_prefix): Move comment.  Only use a TREE_LIST to
17638         represent substitutions for a member template.
17639         (write_array_type): Mangle array dimensions correctly.
17640         * optimize.c (maybe_clone_body): Copy more information from the
17641         cloned function.
17642         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
17643         on the regenerated declaration.
17644
17645 2000-06-11  Chip Salzenberg  <chip@valinux.com>
17646             Mark Mitchell <mark@codesourcery.com>
17647
17648         * class.c (build_vtable): Clarify comment.
17649         (build_ctor_vtbl_group): Pass the most derived type to
17650         build_vtable.
17651
17652 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17653
17654         * decl2.c (compare_options): Don't needlessly cast away const-ness.
17655
17656 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
17657
17658         * decl.c (add_binding): Handle duplicate declarations of external
17659         variables.
17660
17661 2000-06-09  Chip Salzenberg  <chip@valinux.com>
17662             Mark Mitchell <mark@codesourcery.com>
17663
17664         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
17665         argument.
17666         (write_signed_number): New macro.
17667         (write_unsigned_number): Likewise.
17668         (write_source_name): Use them.
17669         (write_number): Handle signed and unsigned values.
17670         (write_integer_cst): Use tree_int_cst_sgn, and use
17671         write_unsigned_number or write_signed_number as appropriate.
17672         (write_discriminator): Use write_unsigned_number or
17673         write_signed_number as appropriate.
17674         (write_template_arg_literal): Likewise.
17675         (write_array_type): Use tree_low_cst.
17676         (write_template_parm):  Use write_unsigned_number or
17677         write_signed_number as appropriate.
17678         (write_substitution): Adjust call to write_number.
17679         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
17680         (write_expression): Handle non-type template arguments of
17681         reference type correctly.
17682         (mangle_thunk): Use write_signed_number.
17683
17684 2000-06-09  Chip Salzenberg  <chip@valinux.com>
17685
17686         * mangle.c (find_substition): Don't mangle objects with typename
17687         substitutions (e.g. "cin" as "Si").
17688
17689 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
17690
17691         * call.c (add_candidate): Use ggc_alloc_cleared.
17692         * decl.c (lookup_label): Likewise.
17693         * lex.c (retrofit_lang_decl): Likewise.
17694
17695 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
17696
17697         * semantics.c (expand_body): Push to TV_EXPAND.
17698         * optimize.c (optimize_function): Push to TV_INTEGRATION.
17699         * decl.c (start_function): Always call announce_function.
17700
17701         * tinfo2.cc: Just declare abort.
17702
17703 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
17704
17705         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
17706         whenever @ is a symbolic name.
17707
17708 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
17709
17710         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
17711
17712 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
17713
17714         * decl.c (pushdecl): Look up functions by DECL_NAME, not
17715         DECL_ASSEMBLER_NAME.
17716
17717 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
17718
17719         * decl2.c (c_language): Define.
17720
17721 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
17722
17723         * lex.c (lang_init_options): Tweak.
17724
17725         * decl2.c: Remove #inclusion of diagnostic.h
17726         (lang_decode_option): Move diagnostic formatting options to
17727         toplevel.
17728
17729         * lang-options.h: Remove documentation for diagnostic options.
17730
17731         * Makefile.in (lex.o): Depends upon diagnostic.h
17732
17733 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
17734
17735         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
17736         the same DECL_RESULT, it's not a redefinition.
17737         * pt.c (tsubst_decl): Remove code to handle illegal
17738         specializations.
17739
17740 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
17741
17742         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
17743
17744 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
17745
17746         * search.c (maybe_suppress_debug_info): Don't check
17747         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
17748
17749         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
17750         here if extern_p.
17751
17752         Remember instantiation context in deferred instantiations.
17753         * cp-tree.h (struct tinst_level): Remove.
17754         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
17755         * pt.c (current_tinst_level): Now a tree.
17756         (print_template_context, push_tinst_level, pop_tinst_level,
17757         tinst_for_decl): Adjust.
17758         (reopen_tinst_level): New fn.
17759         (init_pt): Register current_tinst_level as a root.
17760         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
17761         of the pending templates list.
17762         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
17763         * lex.c (extract_interface_info): Adjust.
17764         * decl2.c (warn_if_unknown_interface): Adjust.
17765
17766 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
17767
17768         * class.c (indirect_primary_base_p): New function.
17769         (determine_primary_base): Use it.
17770
17771 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
17772
17773         Update new-abi dynamic cast algorithm.
17774         * tinfo.cc (__class_type_info::__dyncast_result): Add
17775         whole_details. Adjust constructor.
17776         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
17777         Avoid unnecessary searching.
17778         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
17779
17780 2000-06-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
17781
17782         * decl.c (init_decl_processing): Don't call record_component_aliases.
17783         * tree.c (build_cplus_array_type_1): Likewise.
17784
17785 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
17786
17787         * ir.texi: Correct typo.
17788         * mangle.c (write_expression): Handle non-type template arguments
17789         with reference type.
17790         * method.c (build_overload_value): Likewise.
17791         * pt.c (convert_nontype_argument): Explicitly represent conversion
17792         to a reference with an ADDR_EXPR.
17793         (unify): Always unify arguments in left-to-right order.
17794
17795 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
17796             Mark Mitchell  <mark@codesourcery.com>
17797
17798         * Make-lang.in (CXX_SRCS): Add mangle.c.
17799         * Makefile.in (CXX_OBJS): Add mangle.o.
17800         (mangle.o): New rule.
17801
17802         * class.c (local_classes): New variable.
17803         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
17804         (get_vtt_name): Use mangle_vtt_name for new ABI.
17805         (init_class_processing): Initialize local_classes.
17806         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
17807         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
17808         (std_identifier): New macro.
17809         (DECL_VOLATILE_MEMFUNC_P): New macro.
17810         (DECL_NAMESPACE_STD_P): Likewise.
17811         (local_classes): Declare.
17812         (get_mostly_instantiated_function_type): Declare.
17813         (init_mangle): Declare.
17814         (mangle_decl): Likewise.
17815         (mangle_type_string): Likewise.
17816         (mangle_type): Likewise.
17817         (mangle_typeinfo_for_type): Likewise.
17818         (mangle_typeinfo_string_for_type): Likewise.
17819         (mangle_vtbl_for_type): Likewise.
17820         (mangle_vtt_for_type): Likewise.
17821         (mangle_ctor_vtbl_for_type): Likewise.
17822         (mangle_thunk): Likewise.
17823         (mangle_conv_op_name_for_type): Likewise.
17824         (mangle_guard_variable): Likewise.
17825         * decl.c (pushtag): Keep track of local classes.
17826         (initialize_predefined_identifiers): Initialize std_identifier.
17827         (init_decl_processing): Use std_identifier.
17828         (start_decl): Don't treat instantiations as specializations.
17829         (grokdeclarator): Likewise.
17830         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
17831         name for fully-instantiated templates.
17832         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
17833         destructors with the new ABI.
17834         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
17835         (grokfield): Use mangle_type for new ABI.
17836         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
17837         (get_sentry): Use mangle_guard_variable for new ABI.
17838         (start_static_initialization_or_destruction): Likewise.
17839         * expr.c (extract_aggr_init): Remove.
17840         (extract_scalar_init): Likewise.
17841         (extract_init): Remove #if 0'd code.
17842         * mangle.c: New function.
17843         * method.c (build_mangled_name): Assert not flag_new_abi.
17844         (build_static_name): Likewise.
17845         (build_decl_overload_real): Likewise.
17846         (build_typename_overload): Likewise.
17847         (build_overload_with_type): Likewise.
17848         (build_overload_name): Likewise.
17849         (get_ctor_vtbl_name): Likewise.
17850         (start_squangling): Likewise.
17851         (get_id_2): Likewise.
17852         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
17853         (init_method): Call init_mangle for new ABI.
17854         (make_thunk): Call mangle_thunk for new ABI.
17855         * operators.def: Correct new ABI manglings for the `%' operator.
17856         Add `::' operator.
17857         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
17858         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
17859         (lookup_template_class): Call mangle_decl for new ABI.
17860         (get_mostly_instantiated_function_type): New function.
17861         (set_mangled_name_for_template_decl): Use it.
17862         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
17863         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
17864         conversion op names.
17865         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
17866         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
17867         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
17868         mangle_typeinfo_string_for_type.
17869
17870 2000-06-03  Mark Mitchell  <mark@codesourcery.com>
17871
17872         * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
17873         (INNERMOST_TEMPLATE_ARGS): New macro.
17874         (innermost_args): Remove.
17875         (get_innermost_template_args): New function.
17876         * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
17877         * error.c (dump_function_decl): Be caution when using
17878         most_general_template.
17879         * method.c (build_template_parm_names):  Use
17880         INNERMOST_TEMPLATE_ARGS.
17881         * pt.c (add_to_template_args): Tidy comment
17882         (get_innermost_template_args): New function.
17883         (check_explicit_specialization): Clear DECL_INITIAL for a new
17884         specialization.
17885         (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
17886         Tidy.
17887         (push_template_decl): Always register specializations of the most
17888         general template.
17889         (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
17890         (coerce_template_parms): Likewise.
17891         (lookup_template_class): Likewise.
17892         (innermost_args): Remove.
17893         (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
17894         (tsubst_decl): Handle tricky specializations.  Use
17895         get_innermost_template_args.
17896         (instantiate_template): Simplify handling of partial
17897         instantiations.
17898         (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
17899         (most_general_template): Reimplement, in a more straightforward
17900         manner.
17901         (regenerate_decl_from_template): Tweak formatting.  Use
17902         TMPL_ARGS_DEPTH for clarity.
17903         (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
17904
17905         * dump.c (dequeue_and_dump): Dump information about thunks.
17906
17907 2000-06-01  Richard Henderson  <rth@cygnus.com>
17908
17909         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
17910
17911 2000-06-01  Richard Henderson  <rth@cygnus.com>
17912
17913         * decl2.c (unsupported_options): Fix typo, make const.
17914         (lang_decode_option): Fix bsearch argument order.
17915
17916 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
17917
17918         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
17919         on FIELD_DECLs.
17920
17921 2000-05-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
17922
17923         * cp-tree.h (c_get_alias_set): Deleted.
17924         * Makefile.in (decl.o): Include ../expr.h.
17925         * decl.c (expr.h): Include.
17926         (init_decl_processing): Call record_component_aliases for arrays.
17927         (grokdeclarator): Likewise.
17928         Set TREE_ADDRESSABLE for fields that aren't bitfields.
17929         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
17930
17931 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
17932
17933         Remove guiding declaration support.
17934         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
17935         (flag_guiding_decls): Remove.
17936         * call.c (build_user_type_conversion_1): Remove support for
17937         guiding decls.
17938         (build_new_function_call): Likewise.
17939         (build_new_op): Likewise.
17940         (build_new_method_call): Likewise.
17941         * decl.c (start_function): Likewise.
17942         * friend.c (is_friend): Likewise.
17943         (do_friend): Likewise.
17944         * decl2.c ((flag_dump_translation_unit): Make it const.
17945         (flag_guiding_decls): Remove.
17946         (unsupported_options): New variable
17947         (compare_options): New function.
17948         (lang_decode_option): Use them.
17949
17950         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
17951
17952         * method.c (mangle_expression): Adjust test for legal expression
17953         operators.
17954
17955         * pt.c (instantiate_decl): Save and restore the local
17956         specializations list.
17957
17958 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
17959
17960         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
17961
17962 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
17963
17964         * call.c (add_template_candidate_real): Handle member template
17965         constructors for classes with virtual bases.
17966         (build_user_type_conversion_1): Use in_charge_arg_for_name.
17967         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
17968
17969         * ir.texi: Update thunk documentation.
17970
17971         * call.c (joust): Fix handling of overloaded builtin operators.
17972
17973 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
17974
17975         * cp-tree.h (DECL_ANTICIPATED): New macro.
17976         Document new use of DECL_LANG_FLAG_7.
17977         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
17978         in the user namespace.
17979         * lex.c (do_identifier): If the identifier's declaration has
17980         DECL_ANTICIPATED on, it has not yet been declared.  But do not
17981         replace it with an ordinary implicit declaration.
17982
17983         * tinfo2.cc: Include stdlib.h.
17984
17985 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
17986
17987         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
17988         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
17989         CLASSTYPE_ALIGN.
17990
17991 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
17992
17993         * decl2.c (lang_decode_option): Use skip_leading_substring instead
17994         of plain strncmp.
17995
17996 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
17997
17998         * operators.def (<?): Duplicated, should have been...
17999         (>?): this.  Fixed.
18000
18001 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
18002             Mark Mitchell  <mark@codesourcery.com>
18003
18004         * cp-tree.h (ansi_opname): Make it a macro.
18005         (ansi_assopname): Likewise.
18006         (struct lang_decl_flags): Add assignment_operator_p.
18007         (struct lang_decl): Add operator_code.
18008         (DECL_VTT_PARM): Adjust.
18009         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
18010         overloaded operator.
18011         (SET_OVERLOADED_OPERATOR_CODE): New macro.
18012         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
18013         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
18014         (opname_tab): Remove.
18015         (assignop_tab): Likewise.
18016         (operator_name_info_t): New type.
18017         (operator_name_info): New variable.
18018         (assignment_operator_name_info): Likewise.
18019         (build_cp_library_fn): Remove declaration.
18020         (push_cp_library_fn): Likewise.
18021         (operator_name_string): Likewise.
18022         (build_decl_overload): Likewise.
18023         * call.c (print_z_candidates): Simplify.
18024         (build_object_call): Adjust usage of ansi_opname.  Use
18025         DECL_OVERLOADED_OPERATOR_P.
18026         (op_error): Adjust operator name lookup.
18027         (build_conditional_expr): Adjust usage of ansi_opname.
18028         (build_new_op): Likewise.
18029         (build_op_delete_call): Likewise.
18030         (build_over_call): Likewise.
18031         (joust): Use DECL_OVERLOADED_OPERATOR_P.
18032         * decl.c (duplicate_decls): Copy operator_code.
18033         (init_decl_processing): Adjust parameters to push_cp_library_fn.
18034         (builtin_function): Adjust parameters to build_library_fn_1.
18035         (build_library_fn_1): Accept an overloaded operator code.
18036         (build_library_fn): Pass ERROR_MARK.
18037         (build_cp_library_fn): Accept an overloaded operator code.
18038         (push_cp_library_fn): Likewise.
18039         (grokfndecl): Tweak.
18040         (grokdeclarator): Simplify code to compute names of overloaded
18041         operators.  Adjust use of ansi_opname.
18042         (ambi_op_p): Work on tree_codes, not identifiers.
18043         (unary_op_p): Likewise.
18044         (grok_op_properties): Likewise.
18045         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
18046         (lang_mark_tree): Don't try to mark the operator_code.
18047         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
18048         * error.c (dump_decl): Remove special handling for operator
18049         names.
18050         (dump_function_name): Likewise.
18051         (dump_expr): Adjust name lookup of operators.
18052         (op_to_string): Simplify.
18053         (assop_to_string): Likewise.
18054         * init.c (build_new_1): Adjust use of ansi_opname.
18055         * lex.c (opname_tab): Remove.
18056         (assignop_tab): Likewise.
18057         (ansi_opname): Likewise.
18058         (ansi_assopname): Likewise.
18059         (operator_name_string): Likewise.
18060         (reinit_lang_specific): Likewise.
18061         (operator_name_info): New variable.
18062         (assignment_operator_name_info): Likewise.
18063         (init_operators): New function.
18064         (init_parse): Use it.
18065         (do_identifier): Adjust use of ansi_opname.
18066         * method.c (mangle_expression): Don't use ansi_opname for
18067         mangling.
18068         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
18069         (build_decl_overload): Remove.
18070         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
18071         (do_build_assign_ref): Adjust use of ansi_opname.
18072         (synthesize_method): Likewise.
18073         (implicitly_declare_fn): Likewise.
18074         * operators.def: New file.
18075         * parse.y (operator): Adjust use of ansi_opname.
18076         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
18077         (set_mangled_name_for_template_decl): Don't play games with
18078         current_namespace.
18079         (special_function_p): Adjust use of ansi_opname.
18080         * typeck.c (check_return_expr): Likewise.
18081         * Make-lang.in (cc1plus): Depend on operators.def.
18082         * Makefile.in (lex.o): Likewise.
18083         (decl.o): Likewise.
18084
18085 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
18086
18087         * Make-lang.in (cplib2.ready): Eradicate.
18088
18089 2000-05-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
18090
18091         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
18092         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
18093         (built_min, cp_tree_equal): Likewise.
18094
18095 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
18096
18097         * class.c (layout_nonempty_base_or_field): Replace
18098         `record_layout_info' with `record_layout_info_s'.
18099
18100 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
18101
18102         Fix goto checking.
18103         * cp-tree.h (struct language_function): x_named_labels is now
18104         a struct named_label_list*.
18105         * decl.c (struct named_label_use_list): Renamed from...
18106         (struct named_label_list): ...this.  New struct.
18107         (push_binding_level): Don't set eh_region.
18108         (note_level_for_eh): New fn.
18109         (pop_label): Take label and old value directly.
18110         (pop_labels): Adjust for new named_labels format.
18111         (lookup_label): Likewise.
18112         (poplevel): Note characteristics of a binding level containing a
18113         named label.  Mess with named label lists earlier.
18114         (mark_named_label_lists): New fn.
18115         (mark_lang_function): Call it.
18116         (use_label): New fn, split out from...
18117         (make_label_decl): ...here.  Don't call it.
18118         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
18119         check_previous_gotos): New fns, split out from...
18120         (define_label): ...here.
18121         (check_switch_goto): New fn.
18122         (define_case_label): Call it.
18123         (check_goto): New fn.
18124         * semantics.c (finish_goto_stmt): Call it and use_label.
18125         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
18126         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
18127
18128 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
18129
18130         * class.c (build_vtable_entry_ref): Correct usage of
18131         get_vtbl_decl_for_binfo.
18132
18133         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
18134         * method.c (implicitly_declare_fn): Not here.
18135
18136 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
18137
18138         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
18139         (CPTI_PTMD_DESC_TYPE): ... here.
18140         (ptmd_desc_type_node): Rename to ...
18141         (ptm_desc_type_node): ... here.
18142         * decl.c: Likewise.
18143         * rtti.c (ptmd_initializer): Rename to ...
18144         (ptm_initializer): ... here.
18145         (sythesize_tinfo_var): Adjust. Deal with pointer to member
18146         function.
18147         (create_tinfo_types): Adjust.
18148
18149 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
18150
18151         Finish implementation of VTTs.
18152         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
18153         CPTI_VTT_PARM_IDENTIFIER.
18154         (vtt_parm_identifier): New macro.
18155         (vtt_parm_type): Likewise.
18156         (BINFO_SUBVTT_INDEX): Likewise.
18157         (BINFO_VPTR_INDEX): Likewise.
18158         (struct lang_decl): Add vtt_parm.
18159         (DECL_VTT_PARM): New macro.
18160         (DECL_USE_VTT_PARM): Likewise.
18161         (DECL_NEEDS_VTT_PARM_P): Likewise.
18162         (get_vtt_name): Declare.
18163         (build_artificial_parm): Likewise.
18164         (fixup_all_virtual_upcast_offsets): Likewise.
18165         (expand_indirect_vtbls_init): Remove.
18166         * call.c (build_new_method_call): Pass the vtt to subobject
18167         constructors and destructors.
18168         * class.c (get_vtt_name): Give it external linkage.
18169         (build_clone): Handle the magic VTT parameters for clones.
18170         (clone_function_decl): Fix typo in comment.
18171         (build_vtt): Keep track of the indices in the VTTs where various
18172         entities are stored.
18173         (build_vtt_inits): Likewise.
18174         (dfs_build_vtt_inits): Likewise.
18175         (build_ctor_vtbl_group): Tweak type of construction vtables.
18176         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
18177         primary bases, when building construction vtables.
18178         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
18179         (initialize_predefined_identifiers): Add vtt_parm_identifier.
18180         (init_decl_processing): Initialize vtt_parm_type.
18181         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
18182         (lang_mark_tree): Make vtt_parm.
18183         * decl2.c (build_artificial_parm): New function.
18184         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
18185         (grokclassfn): Use build_artificial_parm.
18186         * init.c (initialize_vtbl_ptrs): Call
18187         fixup_all_virtual_upcast_offsets directly.
18188         (perform_member_init): Use the complete subobject destructor for
18189         member cleanups.
18190         (build_vtbl_address): New function.
18191         (expand_virtual_init): Handle VTTs.
18192         * optimize (maybe_clone_body): Likewise.
18193         * search.c (fixup_all_virtual_upcast_offsets): Give it external
18194         linkage.
18195         (expand_indirect_vtbls_init): Remove.
18196         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
18197         * tree.c (make_binfo): Make them bigger.
18198
18199 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
18200
18201         * inc/cxxabi.h (__pbase_type_info): Define, based on
18202         __pointer_type_info.
18203         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
18204         (__pointer_to_member_type_info): Likewise.
18205         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
18206         (__pointer_to_member_type_info::__is_pointer_p): Remove.
18207         (__pointer_type_info::__do_catch): Rename to ...
18208         (__pbase_type_info::__do_catch): ... here. Adjust.
18209         (__pbase_type_info::__pointer_catch): Implement.
18210         (__pointer_type_info::__pointer_catch): Adjust.
18211         (__pointer_to_member_type_info::__pointer_catch): Adjust.
18212
18213 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
18214
18215         * tinfo.h (__user_type_info::contained_virtual_p): New
18216         predicate.
18217         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
18218         shaped hierarchy.
18219         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
18220         diamond shaped hierarchy. Add early out for mixed diamond and
18221         duplicate shaped hierarchy.
18222
18223 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
18224
18225         * cp-tree.h (build_delete): Change prototype.
18226         (build_vec_delete): Likewise.
18227         * call.c (build_scoped_method_call): Use special_function_kind
18228         values to indicate the kind of destruction to be done.
18229         (build_method_call): Likewise.
18230         * decl.c (finish_destructor_body): Likewise.
18231         (maybe_build_cleanup_1): Likewise.  Rename to ...
18232         (maybe_build_cleanup): ... this.
18233         * decl2.c (delete_sanity): Use special_function_kind
18234         values to indicate the kind of destruction to be done.
18235         (build_cleanup): Likewise.
18236         * init.c (perform_member_init): Likewise.
18237         (build_vec_delete_1): Likewise.
18238         (build_dtor_call): Simplify.
18239         (build_delete): Use special_function_kind
18240         values to indicate the kind of destruction to be done.
18241         (build_vbase_delete): Likewise.
18242         (build_vec_delete): Likewise.
18243
18244         * init.c (sort_member_init): Fix typo in error message generation
18245         code.
18246
18247 2000-05-15  Donald Lindsay  <dlindsay@cygnus.com>
18248
18249         * semantics.c (begin_class_definition): make the packed
18250         attribute be sensitive to the "-fpack-struct" command line flag
18251
18252 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
18253
18254         Update new-abi upcast algorithm.
18255         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
18256         prototype and meaning of return value.
18257         (__si_class_type_info::__do_upcast): Likewise.
18258         (__vmi_class_type_info::__do_upcast): Likewise.
18259         * tinfo.cc (__class_type_info::__upcast_result): Replace
18260         whole2dst with part2dst. Adjust ctor.
18261         (__class_type_info::__do_upcast): Adjust call of worker function.
18262         (__class_type_info::__do_upcast): Adjust.
18263         (__si_class_type_info::__do_upcast): Adjust. Use parent's
18264         __do_upcast.
18265         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
18266         virtual base in diamond hierarchy bug.
18267
18268 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
18269
18270         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
18271         and bitfield to tinfo_fn_p.
18272         (DECL_TINFO_FN_P): Adjust.
18273         (SET_DECL_TINFO_FN_P): Likewise.
18274         (DECL_MUTABLE_P): Likewise.
18275         (DECL_C_BIT_FIELD): Likewise.
18276         (SET_DECL_C_BIT_FIELD): Likewise.
18277         (CLEAR_DECL_C_BIT_FIELD): Likewise.
18278         (DECL_UNINLINABLE): Likewise.
18279         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
18280         (handle_using_decl): Remove assertion.
18281         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
18282         to build FIELD_DECLs.
18283         (build_base_field): Likewise.
18284         (layout_class_type): Likewise.
18285         * decl.c (init_decl_processing): Likewise.
18286         (build_ptrmemfunc_type): Likewise.
18287         (grokdeclarator): Likewise.
18288         * decl2.c (grok_x_components): Likewise.
18289         * except.c (call_eh_info): Likewise.
18290         * init.c (init_init_processing): Likewise.
18291         * rtti.c (expand_class_desc): Likewise.
18292         (create_pseudo_type_info): Likewise.
18293         (get_vmi_pseudo_type_info): Likewise.
18294         (create_tinfo_types): Likewise.
18295         * ptree.c (print_lang_decl): Adjust.
18296         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
18297         before checking DECL_MUTABLE_P.
18298
18299         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
18300         parameters for template functions.
18301         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
18302         destructors as well as constructors.
18303
18304 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
18305
18306         * class.c (build_ctor_vtbl_group): Set inits.
18307         * optimize.c (maybe_clone_body): Set DECL_INLINE and
18308         DECL_THIS_INLINE appropriately for clones.
18309
18310         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
18311         (DECL_CONV_FN_P): Simplify.
18312         (DECL_OPERATOR): Remove.
18313         (language_to_string): Declare.
18314         * decl.c (duplicate_decls): Fix typo in comment.
18315         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
18316         (grok_op_properties): Use DECL_CONV_FN_P instead of
18317         IDENTIFIER_TYPENAME_P.
18318         * dump.c (dequeue_and_dump): Dump the language linkage of
18319         declarations.
18320         * error.c (language_to_string): Give it external linkage.
18321         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
18322         (implicitly_declare_fn): Set DECL_LANGUAGE.
18323         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
18324         IDENTIFIER_TYPENAME_P.
18325         (tsubst_decl): Likewise.
18326         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
18327         * semantics.c (finish_member_declaration): Don't mark members of
18328         classes declared in an extern "C" region as extern "C".
18329
18330 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
18331
18332         * decl2.c (qualified_lookup_using_namespace): Look through
18333         namespace aliases.
18334
18335         * decl.c (push_using_decl): Return the old decl on namespace level.
18336
18337 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
18338
18339         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
18340         (VTT_NAME_PREFIX): New macro.
18341         (CTOR_VTBL_NAME_PREFIX): Likewise.
18342         (get_ctor_vtbl_name): New function.
18343         * class.c (get_vtable_name): Simplify.
18344         (get_vtt_name): New function.
18345         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
18346         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
18347         when a virtual base becomes primary.
18348         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
18349         VTTs.
18350         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
18351         additional parameters.
18352         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
18353         (initialize_array): New function.
18354         (build_vtt): Likewise.
18355         (build_vtt_inits): Likewise.
18356         (dfs_build_vtt_inits): Likewise.
18357         (dfs_fixup_binfo_vtbls): Likewise.
18358         (build_ctor_vtbl_group): Likewise.
18359         (initialize_vtable): Use initialize_array.
18360         (accumulate_vtbl_inits): Reimplement to handle construction
18361         vtables.
18362         (dfs_accumulate_vtbl_inits): Likewise.
18363         (bulid_vtbl_initializer): Adjust parameter name.
18364         * method.c (build_typename_overload): Remove #if 0'd code.
18365         (get_ctor_vtbl_name): New function.
18366         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
18367         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
18368
18369         * cp-tree.h (struct lang_type): Remove search_slot.
18370         (CLASSTYPE_SEARCH_SLOT): Remove.
18371         (emit_base_init): Change prototype.
18372         (initialize_vtbl_ptrs): Likewise.
18373         (expand_indirect_vtbls_init): Likewise.
18374         (clear_search_slots): Remove.
18375         * decl.c (lang_mark_tree): Don't mark search_slot.
18376         * init.c (initialize_vtbl_ptrs): Simplify.
18377         (emit_base_init): Likewise.
18378         * search.c (struct vbase_info): Document decl_ptr.
18379         (convert_pointer_to_single_level): Remove.
18380         (dfs_find_vbases): Remove.
18381         (dfs_init_base_pointers): Simplify.
18382         (dfs_clear_vbase_slots): Remove.
18383         (dfs_vtable_path_unmark): New function.
18384         (init_vbase_pointers): Simplify.
18385         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
18386         (expand_indirect_vtbls_init): Simplify.  Don't call
18387         mark_all_temps_used.
18388         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
18389         initialize_vtbl_ptrs.
18390
18391 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
18392
18393         * except.c: Add static prototypes.
18394
18395 2000-05-20  H.J. Lu  <hjl@gnu.org>
18396
18397         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
18398
18399 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
18400
18401         Don't create a separate copy of virtual bases for the
18402         CLASSTYPE_VBASECLASSES list.
18403         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
18404         (BINFO_FOR_VBASE): Remove.
18405         (CANONICAL_BINFO): Adjust.
18406         (binfo_for_vbase): New function.
18407         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
18408         instead of BINFO_FOR_VBASE.
18409         (build_vbase_pointer): Likewise.
18410         (build_secondary_vtable): Likewise.
18411         (dfs_mark_primary_bases): Likewise.
18412         (mark_primary_bases): Likewise.
18413         (layout_nonempty_base_or_field): Likewise.
18414         (dfs_set_offset_for_shared_vbases): Likewise.
18415         (dfs_set_offset_for_unshared_vbases): Likewise.
18416         (layout_virtual_bases): Likewise.  Adjust for changes to the
18417         CLASSTYPE_VBASECLASSES list.
18418         (dump_class_hierarchy_r): Use binfo_for_vbase
18419         instead of BINFO_FOR_VBASE.
18420         (dump_class_hierarchy): Likewise.
18421         (finish_vtbls): Likewise.
18422         (build_vtbl_initializer): Adjust for changes to the
18423         CLASSTYPE_VBASECLASSES list.
18424         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
18425         * decl.c (finish_destructor_body): Adjust for changes to the
18426         CLASSTYPE_VBASECLASSES list.
18427         * init.c (sort_base_init): Use binfo_for_vbase.
18428         (construct_virtual_bases): Adjust for changes to the
18429         CLASSTYPE_VBASECLASSES list.
18430         (expand_member_init): Use binfo_for_vbase.
18431         (build_vbase_delete):  Adjust for changes to the
18432         CLASSTYPE_VBASECLASSES list.
18433         * method.c (do_build_copy_constructor): Likewise.
18434         * rtti.c (get_base_offset): Use binfo_for_vbase.
18435         (expand_class_desc): Remove #if 0'd code.
18436         * search.c (struct vbase_info): Remove vbase_types.
18437         (get_base_distance):  Use binfo_for_vbase.
18438         (lookup_field_queue_p): Use CANONICAL_BINFO.
18439         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
18440         (get_pure_virtuals): Adjust for changes to the
18441         CLASSTYPE_VBASECLASSES list.
18442         (dfs_find_vbases): Use binfo_for_vbase.
18443         (dfs_init_vbase_pointers): Likewise.
18444         (init_vbase_pointers): Don't initialize vi.vbase_types.
18445         (virtual_context): Use binfo_for_vbase.
18446         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
18447         CLASSTYPE_VBASECLASSES list.
18448         (expand_indirect_vtbls_init): Simplify.
18449         (dfs_get_vbase_types): Don't replicate virtual bases.
18450         (find_vbase_instance): Use binfo_for_vbase.
18451         (binfo_for_vbase): New function.
18452         * typeck.c (get_delta_difference): Use binfo_for_vbase.
18453
18454 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
18455
18456         * decl2.c (finish_anon_union): Generalize error messages to handle
18457         anonymous structures.
18458         * init.c (perform_member_init): Remove `name' parameter.
18459         (build_field_list): New function.
18460         (sort_member_init): Handle anonymous union initialization order
18461         correctly.  Check for multiple initializations of the same union.
18462         (emit_base_init): Don't look up fields by name here.
18463         (expand_member_init): Record the result of name lookup for future
18464         reference.
18465         * typeck.c (build_component_ref): Fix formatting.
18466
18467 2000-05-17  Andrew Cagney  <cagney@b1.cygnus.com>
18468
18469         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
18470         * typeck.c (build_x_compound_expr): Replace warn_unused with
18471         warn_unused_value.
18472
18473         * decl2.c (lang_decode_option): Update -Wall unused flags by
18474         calling set_Wunused.
18475
18476 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
18477
18478         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
18479         * init.c (dfs_vtable_path_unmark): Remove.
18480         * search.c (marked_new_vtable_p): Likewise.
18481         (unmarked_new_vtable_p): Likewise.
18482         (dfs_search_slot_nonempty_p): Likewise.
18483         (dfs_mark): Likewise.
18484         (dfs_vtable_path_unmark): Likewise.
18485         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
18486         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
18487         (dfs_init_vbase_pointers): Remove special-case new ABI code.
18488         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
18489         (init_vbase_pointers): Simplify.
18490         (expand_indirect_vtbls_init): Likewise.
18491
18492         * class.c (copy_virtuals): New function.
18493         (build_primary_table): Use it.
18494         (build_secondary_vtable): Likewise.
18495         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
18496         indicate that no vcall offset is required.
18497         (add_virtual_function): Likewise.
18498         (modify_all_vtables): Likewise.
18499         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
18500         (dfs_accumulate_vtbl_inits): Likewise.
18501         (build_vtbl_initializer): Make changes to handle construction
18502         vtables.
18503         (dfs_build_vcall_offset_vtbl_entries): Likewise.
18504         (build_rtti_vtbl_entries): Likewise.
18505         (build_vtable_entries): Handle a NULL vcall_index.
18506
18507 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
18508
18509         * decl2.c (lang_decode_option): Fix thinko.
18510
18511 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
18512
18513         * except.c (check_handlers): New fn.
18514         * cp-tree.h: Declare it.
18515         * semantics.c (finish_handler_sequence): Call it.
18516         (finish_function_handler_sequence): Likewise.
18517         (finish_handler_parms): Set TREE_TYPE on the handler.
18518         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
18519         * search.c (get_base_distance_recursive): If protect>1, ignore
18520         special access.
18521         (get_base_distance): Don't reduce watch_access.
18522
18523 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
18524
18525         * lex.c: #include diagnostic.h.
18526         (lang_init_options): Set default prefixing rules.
18527
18528         * lang-options.h: Add -fdiagnostics-show-location=.
18529
18530         * decl2.c: #include diagnostic.h.
18531         (lang_decode_option): Handle -fdiagnostics-show-location=.
18532
18533 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
18534
18535         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
18536         * vec.cc: Revert my 2000-05-07 change.
18537
18538 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
18539
18540         * class.c (check_field_decls): Complain about non-static data
18541         members with same name as class in class with constructor.
18542
18543 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
18544
18545         * decl.c (grokdeclarator): Allow non-static data members with
18546         same name as class.
18547
18548 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
18549
18550         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
18551         and pending_inline.filename.  Update prototypes.
18552         * decl.c (define_label): Constify filename parameter.
18553         * decl2.c (warn_if_unknown_interface): Constify local char *.
18554         * input.c Constify input_source.filename. Don't declare
18555         input_filename or lineno.  Constify filename parameter to feed_input.
18556         * lex.c (init_parse): Constify parameter and return value.
18557         (cp_pragma_interface, cp_pragma_implementation): Constify
18558         filename argument.
18559         (reinit_parse_for_method, reinit_parse_for_block,
18560         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
18561         Constify local char *.
18562         * pt.c: Don't declare lineno or input_filename.
18563         (print_template_context, tsubst_friend_function, tsubst_decl,
18564         tsubst, instantiate_decl): Constify local char *.
18565         * semantics.c (expand_body): Constify local char *.
18566         * tree.c (build_srcloc): Constify filename parameter.
18567         * typeck.c (c_expand_asm_operands): Constify filename
18568         parameter.
18569
18570 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
18571
18572         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
18573         offsetof expansion.
18574
18575 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
18576
18577         * inc/cxxabi.h:  Fix typos in comment.
18578         (__base_class_info::__offset): Use a static_cast.
18579
18580 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
18581
18582         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
18583         of std::size_t and std::ptrdiff_t respectively.
18584         * tinfo.cc: Likewise.
18585         * vec.cc: Likewise.
18586
18587 2000-05-06  Richard Henderson  <rth@cygnus.com>
18588
18589         * typeck.c (build_c_cast): Don't warn integer->pointer size
18590         mismatch for constants.
18591
18592 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
18593
18594         * rtti.c (ptmd_initializer): Set non-public, if class is
18595         incomplete.
18596
18597         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
18598         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
18599         __cxa_vec_delete): Likewise.
18600         * tinfo.cc (__dynamic_cast): Likewise.
18601         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
18602         __cxa_vec_delete): Likewise.
18603
18604 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
18605
18606         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
18607         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
18608         (lang_decl_flags): Add vcall_offset.
18609         (THUNK_VCALL_OFFSET): Use it.
18610         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
18611         * method.c (make_thunk): Create the lang_decl here, not in
18612         emit_thunk.
18613         (emit_thunk): Make generic thunks into ordinary functions once
18614         they have been fed to expand_body.
18615         * semantics.c (expand_body): Set current_function_is_thunk here.
18616
18617 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18618
18619         * class.c (update_vtable_entry_for_fn): Prototype.
18620
18621         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
18622         and `tmpl'.
18623
18624         * search.c (dfs_build_inheritance_graph_order): Prototype.
18625
18626 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
18627
18628         * cp-tree.h (special_function_kind): Add various kinds of
18629         destructors.
18630         (special_function_p): New function.
18631         * class.c (overrides): Don't let one kind of destructor override
18632         another.
18633         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
18634         whether or not to instantiate a template.
18635         * tree.c (special_function_p): Define.
18636
18637 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
18638
18639         * cp-tree.def (THUNK_DECL): Remove.
18640         * cp-tree.h (DECL_THUNK_P): New macro.
18641         (DECL_NON_THUNK_FUNCTION_P): Likewise.
18642         (DECL_EXTERN_C_FUNCTION_P): Likewise.
18643         (SET_DECL_THUNK_P): Likewise.
18644         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
18645         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
18646         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
18647         * decl.c (decls_match): Use DECL_EXTERN_C_P.
18648         (duplicate_decls): Likewise.
18649         (pushdecl): Likewise.  Adjust thunk handling.
18650         (grokfndecl): Use DECL_EXTERN_C_P.
18651         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
18652         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
18653         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
18654         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
18655         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
18656         DECL_NO_STATIC_CHAIN.
18657         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
18658         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
18659         * search.c (covariant_return_p): Remove THUNK_DECL handling.
18660         * ir.texi: Update.
18661
18662 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
18663
18664         * tree.c (walk_tree): Set lineno.
18665
18666 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
18667
18668         * exception.cc: Update license notice.
18669         * new.cc: Likewise.
18670         * new1.cc: Likewise.
18671         * new2.cc: Likewise.
18672         * tinfo.cc: Likewise.
18673         * tinfo2.cc: Likewise.
18674         * vec.cc: Likewise.
18675         * inc/cxxabi.h: Likewise.
18676         * inc/exception: Likewise.
18677         * inc/new: Likewise.
18678         * inc/new.h: Likewise.
18679         * inc/typeinfo: Likewise.
18680
18681 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
18682
18683         * tree.c (build_target_expr_with_type): If we already have a
18684         TARGET_EXPR, just return it.
18685
18686         * optimize.c (initialize_inlined_parameters): Don't generate an
18687         EXPR_STMT if we can just use DECL_INITIAL.
18688         * decl.c (emit_local_var): Only make the initialization a
18689         full-expression if stmts_are_full_exprs_p.
18690
18691 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
18692
18693         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
18694         macro.
18695         * call.c (standard_conversion): Use it.
18696         (direct_reference_binding): Likewise.
18697         (build_over_call): Likewise.
18698         (is_properly_derived_from): Likewise.
18699         (compare_ics): Likewise.
18700         * class.c (resolves_to_fixed_type_p): Likewise.
18701         * optimize.c (declare_return_variable): Likewise.
18702         * pt.c (is_specialization_of): Likewise.
18703         (unify): Likewise.
18704         * typeck.c (comp_target_parms): Likeiwse.
18705         (build_static_cast): Likewise.
18706         (build_reinterpret_cast): Likewise.
18707         (build_const_cast): Likewise.
18708         (comp_ptr_ttypes_real): Likewise.
18709         (comp_ptr_ttypes_const): Likewise.
18710         * typeck2.c (process_init_constructor): Likewise.
18711
18712 2000-04-30  Scott Snyder <snyder@fnal.gov>
18713
18714         * decl.c (finish_destructor_body): Use the base destructor when
18715         destroying virtual bases.
18716
18717 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
18718
18719         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
18720         STMT_EXPRs.
18721         * optimize.c (struct inline_data): Add target_exprs field.
18722         (declare_return_variable): When a function returns an aggregate,
18723         use the variable declared in the TARGET_EXPR as the remapped
18724         DECL_RESULT.
18725         (expand_call_inline): Update the pending target_exprs stack.
18726         (optimize_function): Initialize the stack.
18727
18728         * decl2.c (finish_file): Fix typo in comment.
18729
18730         * method.c (emit_thunk): Don't try to return a `void' value.
18731
18732         * optimize.c (initialize_inlined_parameters): If the parameter is
18733         addressable, we need to make a new VAR_DECL, even if the
18734         initializer is constant.
18735
18736 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
18737
18738         * decl.c (grok_op_properties): Add an extra check of argtypes.
18739
18740 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
18741
18742         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
18743         variables.
18744         (initialize_inlined_parameters): Try to avoid creating new
18745         VAR_DECLs.
18746
18747 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
18748
18749         * lex.c (my_get_run_time): Remove.
18750         (init_filename_times): Use get_run_time instead of my_get_run_time.
18751         (check_newline): Likewise.
18752         (dump_time_statistics): Likewise.
18753         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
18754         of computing elapsed time explicitly.
18755
18756 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
18757
18758         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
18759         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
18760         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
18761         before calling decl_constant_value.
18762         * class.c (check_bitfield_decl): Likewise.
18763         * cvt.c (ocp_convert): Likewise.
18764         (convert): Likewise.
18765         * decl.c (compute_array_index_type): Likewise.
18766         (build_enumerator): Likewise.
18767         * decl2.c (check_cp_case_value): Likewise.
18768         * pt.c (convert_nontype_argument): Likewise.
18769         (tsubst): Likewise.
18770         * typeck.c (decay_conversion): Likewise.
18771         (build_compound_expr): Likewise.
18772         (build_reinterpret_cast): Likewise.
18773         (build_c_cast): Likewise.
18774         (convert_for_assignment): Likewise.
18775
18776 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
18777
18778         * decl.c (finish_function): Don't play games with DECL_INLINE.
18779
18780 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
18781
18782         * ir.texi: Correct typo.
18783
18784 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
18785
18786         * decl.c (grokdeclarator): Reject VLAs as members.
18787
18788 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
18789
18790         * call.c (standard_conversion): Accept conversion between
18791         COMPLEX_TYPEs.
18792
18793         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
18794
18795 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
18796
18797         * decl2.c (finish_file): Remove double setup for accounting
18798         compile time.
18799
18800 2000-04-24  Robert Lipe <robertlipe@usa.net>
18801
18802         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
18803
18804 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
18805
18806         * new.cc (set_new_handler): Needs to be in std::.
18807
18808 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
18809
18810         * cp-tree.h (lang_decl): Remove pretty_function_p.
18811         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
18812         language-specific node.
18813         * decl.c (cp_make_fname_decl): Use build_decl, not
18814         build_lang_decl, to build the variables.
18815         (grokvardecl): Don't call build_lang_decl for local variables in
18816         templates.
18817         (grokdeclarator): Don't call build_lang_decl for local type
18818         declarations in templates.
18819         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
18820         zero'd memory, rather than calling memset.
18821         * pt.c: Include hashtab.h.
18822         (local_specializations): New variable.
18823         (retrieve_local_specialization): Use it.
18824         (register_local_specialization): Likewise.
18825         (tsubst_decl): Don't assume local variables have
18826         DECL_LANG_SPECIFIC.
18827         (instantiate_decl): Set up local_specializations.
18828         * Makefile.in (HTAB_H): New variable.
18829
18830 2000-04-23  Richard Henderson  <rth@cygnus.com>
18831
18832         * typeck.c (c_expand_asm_operands): Restore the original
18833         contents of the output list.
18834
18835 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
18836
18837         * ir.texi:  Document complex number representation.
18838
18839 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
18840
18841         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
18842         (target_incomplete_p): New function.
18843         (tinfo_base_init): Create comdat NTBS name variable.
18844         (ptr_initializer): Add non_public parameter. Calculate it.
18845         (ptmd_initializer): Likewise.
18846         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
18847         (create_real_tinfo_var): Add non_public parameter. Use it.
18848         Push proxy into global namespace.
18849         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
18850         New enumeration.
18851         * inc/typeinfo (type_info::before, type_info::operator==):
18852         Compare __name addresses.
18853
18854         * tinfo2.cc: Remove new-abi builtins comment.
18855
18856 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
18857
18858         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
18859
18860         * call.c (joust): Exit early if we get the same function, too.
18861
18862         * decl2.c (key_method): Return NULL_TREE for template classes.
18863         (import_export_class): Don't need to check for template classes.
18864
18865 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
18866
18867         * lex.c: Remove references to cccp.c.
18868
18869 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
18870
18871         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
18872         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
18873         (DECL_DESTRUCTOR_P): Use destructor_attr.
18874         (DECL_CONST_MEMFUNC_P): Reimplement.
18875         (DECL_VOLATILE_MEMFUNC_P): Remove.
18876         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
18877         (overrides): Use DECL_DESTRUCTOR_P.
18878         (check_for_override): Likewise.
18879         * decl.c (start_function): Likewise.
18880         * decl2.c (grokfclassfn): Likewise.
18881         (check_classfn): Likewise.
18882         (grok_function_init): Likewise.
18883
18884 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
18885
18886         * decl2.c (grokfield): Issue error on illegal data member
18887         declaration.
18888
18889 2000-04-17  Mark P Mitchell  <mark@codesourcery.com>
18890
18891         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
18892
18893 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
18894
18895         * class.c (build_vtable_entry): Don't build thunks for type-info
18896         functions.
18897
18898 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
18899
18900         * decl.c (decls_match): Allow a redeclaration of a builtin to
18901         specify args while the builtin did not.
18902
18903 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
18904
18905         * cp-tree.def (THUNK_DECL): Add to documentation.
18906         * cp-tree.h (flag_huge_objects): Declare.
18907         * class.c (modify_vtable_entry): Tidy.
18908         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
18909         Calculate delta appropriately for the new ABI.
18910         (dfs_modify_vtables): Use it.
18911         (modify_all_vtables): Fix thinko in code to add overriding copies
18912         of functions to primary vtables.
18913         (build_clone): Fix typo in comment.
18914         (clone_function_decl): Correct order of destructors in vtable.
18915         (build_vbase_offset_vtbl_entries): Adjust comment.
18916         (dfs_vcall_offset_queue_p): Remove.
18917         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
18918         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
18919         (build_vtable_entry): Correct check for pure virtual functions.
18920         Don't declare flag_huge_objects.
18921         * decl.c (flag_huge_objects): Remove declaration.
18922         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
18923         Use int_size_in_bytes.
18924         (emit_thunk): Handle vcall offset thunks.
18925
18926 2000-04-15  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
18927
18928         * decl2.c (parse_time, varconst_time): Delete declarations.
18929         (finish_file): Delete LINENO declaration.
18930         START_TIME and THIS_TIME now long.
18931
18932 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
18933
18934         * class.c (build_base_field): Reformat comment.
18935
18936         * inc/cxxabi.h (stddef.h): Comment inclusion.
18937         (__base_class_info::__offset): Comment shift.
18938
18939 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
18940
18941         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
18942         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
18943         (cp_push_exception_identifier): New macro.
18944         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
18945         (DECL_BASE_DESTRUCTOR_P): Likewise.
18946         (DECL_DELETING_DESTRUCTOR_P): Likewise.
18947         (get_vtbl_decl_for_binfo): Fix formatting.
18948         (in_charge_arg_for_name): New macro.
18949         (maybe_build_cleanup_and_delete): Remove declaration.
18950         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
18951         (in_charge_arg_for_name): New function.
18952         (build_new_method_call): Use it.  Handle cloned destructors.
18953         (build_clone): Don't make the base constructor virtual.
18954         Automatically defer generated functions.
18955         (clone_function_decl): Handle destructors, too.
18956         (clone_constructors_and_destructors): Likewise.
18957         (create_vtable_ptr): Don't create a vtable entry for a cloned
18958         function.
18959         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
18960         (initialize_predefined_identifiers): Update appropriately.
18961         (finish_destructor_body): Simplify.
18962         (maybe_build_cleanup_and_delete): Remove.
18963         * except.c (expand_throw): Handle new-ABI destructors.
18964         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
18965         (build_dtor_call): New function.
18966         (build_delete): Use it.  Simplify.
18967         * optimize.c (maybe_clone_body): Handle destructors.
18968         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
18969
18970         * exception.cc (cleanup_fn): New typedef.
18971         (CALL_CLEANUP): New macro.
18972         (cp_eh_info): Use them.
18973         (__cp_push_exception): Likewise.
18974         (__cp_pop_exception): Likewise.
18975
18976 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
18977
18978         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
18979         (complete_dtor_identifier): New macro.
18980         (CLASSTYPE_FIRST_CONVERSION): Remove.
18981         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
18982         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
18983         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
18984         (CLASSTYPE_CONSTRUCTORS): Likewise.
18985         (CLASSTYPE_DESTRUCTORS): Likewise.
18986         (lang_decl): Add cloned_function.
18987         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
18988         (DECL_BASE_CONSTRUCTOR_P): Likewise.
18989         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
18990         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
18991         (DECL_CLONED_FUNCTION_P): Likewise.
18992         (DECL_CLONED_FUNCTION): Likewise.
18993         (clone_function_decl): Declare.
18994         (maybe_clone_body): Likewise.
18995         * call.c (build_user_type_conversion_1): Call complete object
18996         constructors in the new ABI.
18997         (build_new_method_call): Don't add in-charge parameters under the
18998         new ABI.
18999         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
19000         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
19001         CLASSTYPE_DESTRUCTOR_SLOT.
19002         (build_clone): New function.
19003         (clone_function_decl): Likewise.
19004         (clone_constructors_and_destructors): Likewise.
19005         (check_bases_and_members): Use it.
19006         * decl.c (iniitialize_predefined_identifiers): Initialize
19007         complete_dtor_identifier.
19008         (finish_function): Don't add extra code to a clone.
19009         (lang_mark_tree): Mark cloned_function.
19010         * decl2.c (mark_used): Don't bother trying to instantiate things
19011         we synthesized.
19012         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
19013         * method.c (set_mangled_name_for_decl): Don't treat clones as
19014         constructors.
19015         (synthesize_method): Sythesize cloned functions, not the clones.
19016         * optimize.c (inline_data): Update comment on ret_label.
19017         (remap_block): Don't assume DECL_INITIAL exists.
19018         (copy_body_r): Allow ret_label to be NULL.
19019         (maybe_clone_body): Define.
19020         * pt.c (tsubst_decl): Handle clones.
19021         (instantiate_clone): New function.
19022         (instantiate_template): Use it.
19023         (set_mangled_name_for_template_decl): Don't treat clones as
19024         constructors.
19025         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
19026         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
19027         * semantics.c (expand_body): Clone function bodies as necessary.
19028
19029         * optimize.c (remap_decl): Avoid sharing structure for arrays
19030         whose size is only known at run-time.
19031         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
19032
19033         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
19034         to has_in_charge_parm_p.
19035         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
19036         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
19037         (DECL_COPY_CONSTRUCTOR_P): New macro.
19038         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
19039         (build_user_type_conversion_1): Likewise.
19040         (convert_like_real): Likewise.
19041         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
19042         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
19043         (copy_args_p): Likewise.
19044         (grok_ctor_properties): Likewise.
19045         (start_function): Likewise.
19046         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
19047         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
19048         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
19049         * method.c (do_build_copy_constructor): Use
19050         DECL_HAS_IN_CHARGE_PARM_P.
19051         (synthesize_method): Likewise.
19052         * pt.c (instantiate_template): Remove goto.
19053         * tree.c (build_cplus_method_type): Remove mention of obstacks in
19054         comment.
19055
19056         * cp-tre.h (finish_function): Change prototype.
19057         * decl.c (end_cleanup_fn): Adjust caller.
19058         (finish_function): Take only one parameter.
19059         * decl2.c (finish_objects): Adjust caller.
19060         (finish_static_storage_duration_function): Likewise.
19061         * method.c (emit_thunk): Likewise.
19062         * parse.y: Likewise.
19063         * parse.c: Regenerated.
19064         * pt.c (instantiate_decl): Likewise.
19065         * rtti.c (synthesize_tinfo_fn): Likewise.
19066         * semantics.c (expand_body): Likewise.
19067
19068         * cp-tree.h (copy_decl): New function.
19069         * class.c (finish_struct_1): Use it.
19070         * lex.c (copy_decl): Define it.
19071         * pt.c (tsubst_decl): Likewise.
19072         * tree.c (copy_template_template_parm): Likewise.
19073
19074         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
19075         has_nonpublic_assign_ref.
19076         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
19077         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
19078         * class.c (finish_struct_methods): Don't set
19079         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
19080         (interface_only): Don't declare.
19081         (interface_unknown): Likewise.
19082
19083 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
19084
19085         * tree.h (HAVE_TEMPLATES): Remove definition.
19086         * lang-options.h (-fthis-is-variable): Remove documentation.
19087
19088 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
19089
19090         * class.c (instantiate_type): Handle object-relative template-id.
19091
19092         * semantics.c (finish_expr_stmt): Call convert_to_void here.
19093         * decl.c (cplus_expand_expr_stmt): Not here.
19094
19095         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
19096         Initialize exprtype earlier.
19097
19098         * parse.y (fn.def1): Check for defining types in return types.
19099
19100         * decl.c (check_tag_decl): Notice extra fundamental types.
19101         Diagnose empty decls in classes, too.
19102
19103         * decl.c (grokdeclarator): Don't override an anonymous name if no
19104         declarator was given.
19105
19106         * cvt.c (convert_to_void): Call resolve_offset_ref.
19107
19108         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
19109
19110         * decl2.c (decl_namespace): Handle getting a type.
19111
19112         * typeck.c (build_c_cast): Re-enable warning for cast between
19113         pointer and integer of different size.
19114
19115 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
19116
19117         * inc/cxxabi.h (__pointer_type_info): Add restrict and
19118         incomplete flags.
19119         (__pointer_type_info::__pointer_catch): New virtual function.
19120         (__pointer_to_member_type_info): Derive from
19121         __pointer_type_info. Adjust.
19122         (__pointer_to_member_type_info::__do_catch): Remove.
19123         (__pointer_to_member_type_info::__is_pointer_p): Declare.
19124         (__pointer_to_member_type_info::__pointer_catch): Declare.
19125         * rtti.c (qualifier_flags): Add restrict flag.
19126         (ptmd_initializer): Reorder members.
19127         (create_tinfo_types): Expand comments. Reorder
19128         ptmd_desc_type_node members.
19129         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
19130         Implement.
19131         (__pointer_type_info::__do_catch): Move specific code into
19132         __pointer_catch. Call it.
19133         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
19134         specific catch checking. Fix void conversion check.
19135         (__pointer_to_member_type_info::__do_catch): Remove.
19136         (__pointer_to_member_type_info::__pointer_catch): Implement.
19137
19138 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
19139
19140         * lex.c (init_parse): Remove traces of classof and headof.
19141         * decl2.c (flag_operator_names): Default to 1.
19142         (lang_decode_option): Do not set it for -ansi.
19143
19144 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
19145
19146         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
19147         (DECL_MAIN_VARIANT): Remove.
19148         * decl.c (duplicate_decls): Don't set it.
19149         (start_function): Likewise.
19150         (lang_mark_tree): Don't mark it.
19151         * decl2.c (defer_fn): Don't use it.
19152         * lex.c (retrofit_lang_decl): Don't set it.
19153         * pt.c (tsubst_decl): Likewise.
19154         * ptree.c (print_lang_decl): Don't print it.
19155         * typeck.c (mark_addressable): Don't use it.
19156
19157 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
19158
19159         * vec.cc: Include <new> and <exception>.
19160         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
19161         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
19162         terminate.
19163         (__cxa_vec_delete): Catch dtor exceptions.
19164
19165 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
19166
19167         Prepend __ to implementation defined names.
19168         * inc/typeinfo (type_info): Rename _name to __name.
19169         (type_info::type_info): Rename parameter.
19170         (type_info::operator==, type_info::operator!=,
19171         type_info::before): Likewise.
19172         (type_info::is_pointer_p, type_info::is_function_p,
19173         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
19174         parameters.
19175         * inc/cxxabi.h
19176         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
19177         (__pointer_type_info::__pointer_type_info): Likewise.
19178         (__pointer_type_info::is_pointer_p,
19179         __pointer_type_info::do_catch): Prepend __. Rename parameters.
19180         (__array_type_info::__array_type_info): Rename parameters.
19181         (__function_type_info::__function_type_info): Likewise.
19182         (__function_type_info::is_function_p): Prepend __.
19183         (__enum_type_info::__enum_type_info): Rename parameters.
19184         (__pointer_to_member_type_info::__pointer_to_member_type_info):
19185         Likewise.
19186         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
19187         parameters.
19188         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
19189         (__class_type_info::__class_type_info): Rename parameters.
19190         (__class_type_info::sub_kind): Prepend __. Adjust member names.
19191         (__class_type_info::upcast_result,
19192         __class_type_info::dyncast_result): Prepend __. Move definition
19193         into tinfo.cc.
19194         (__class_type_info::do_upcast, __class_type_info::do_catch,
19195         __class_type_info::find_public_src,
19196         __class_type_info::do_dyncast,
19197         __class_type_info::do_find_public_src): Prepend __. Rename
19198         parameters.
19199         (__si_class_type_info::__si_class_type_info): Rename parameters.
19200         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
19201         __si_class_type_info::do_find_public_src): Prepent __. Rename
19202         parameters.
19203         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
19204         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
19205         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
19206         parameters.
19207         (__dynamic_cast): Rename parameters.
19208         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
19209         type_info::do_catch, type_info::do_upcast): Prepend __.
19210         (contained_p, public_p, virtual_p, contained_public_p,
19211         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
19212         (__class_type_info::do_catch,
19213         __class_type_info::do_upcast): Prepend __. Adjust.
19214         (__class_type_info::__upcast_result,
19215         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
19216         Adjust.
19217         (__class_type_info::find_public_src): Prepend __. Adjust.
19218         (__class_type_info::do_find_public_src,
19219         __si_class_type_info::do_find_public_src,
19220         __vmi_class_type_info::do_find_public_src): Likewise.
19221         (__class_type_info::do_dyncast,
19222         __si_class_type_info::do_dyncast,
19223         __vmi_class_type_info::do_dyncast): Likewise.
19224         (__class_type_info::do_upcast,
19225         __si_class_type_info::do_upcast,
19226         __vmi_class_type_info::do_upcast): Likewise.
19227         (__dynamic_cast): Adjust.
19228         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
19229         (__function_type_info::is_function_p): Likewise.
19230         (__pointer_type_info::do_catch): Likewise. Adjust.
19231         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
19232         (__throw_type_match_rtti_2): Adjust.
19233         (__is_pointer): Adjust.
19234
19235 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
19236
19237         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
19238         (complete_ctor_identifier): New macro.
19239         (special_function_kind): Add sfk_copy_constructor and
19240         sfk_assignment_operator.
19241         (LOOKUP_HAS_IN_CHARGE): Remove.
19242         (cons_up_default_function): Rename to ...
19243         (implicitly_declare_fn): ... this.
19244         * call.c (build_new_method_call): Add in-charge parameters for
19245         constructors here.
19246         * class.c (add_implicitly_declared_members): Change parameter name
19247         from cant_have_assignment to cant_have_const_assignment.
19248         Replace calls to cons_up_default_function to implicitly_declare_fn.
19249         * cvt.c (ocp_convert): Use complete_ctor_identifier.
19250         * decl.c (initialize_predefined_identifiers): Initialize it.
19251         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
19252         complex expression.
19253         * init.c (expand_default_init): Don't calculate the in-charge
19254         parameter here.
19255         (build_new_1): Likewise.
19256         * lex.c (cons_up_default_function): Move to method.c.
19257         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
19258         (implicitly_declare_fn): New function.
19259         * typeck.c (build_static_cast): Use complete_ctor_identifier.
19260         (build_modify_expr): Likewise.
19261         * typeck2.c (build_functional_cast): Likewise.
19262
19263         Under the new ABI, constructors don't return `this'.
19264         * cp-tree.h (warn_reorder): Declare.
19265         (special_function_kind): New enum.
19266         (global_base_init_list): Remove declaration.
19267         (emit_base_init): Don't return a value.
19268         (check_base_init): Don't declare.
19269         (is_aggr_typedef): Likewise.
19270         * decl.c (check_special_function_return_type): New function.
19271         (return_types): Remove.
19272         (grokdeclarator): Use check_special_function_return_type.
19273         (start_function): Don't initialize ctor_label under the new ABI.
19274         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
19275         * init.c (begin_init_stmts): Move to top of file.
19276         (finish_init_stmts): Likewise.
19277         (warn_reorder): Don't declare.
19278         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
19279         value.
19280         (check_base_init): Remove.
19281         (is_aggr_typedef): Likewise.
19282         (build_new_1): Don't use the return value of a constructor.
19283         * semantics.c (setup_vtbl_ptr): Don't use the return value
19284         of emit_base_init.
19285         * typeck.c (check_return_expr): Don't magically convert return
19286         statements into `return this' in constructors under the new ABI.
19287
19288         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
19289         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
19290         (base_ctor_identifier): New macro.
19291         (base_dtor_identifier): Likewise.
19292         (deleting_dtor_identifier): Likewise.
19293         * decl.c: Don't include obstack.h.
19294         (obstack_chunk_alloc): Don't define.
19295         (obstack_chunk_free): Likewise.
19296         (struct predefined_identifier): New type.
19297         (initialize_predefined_identifiers): New function.
19298         (init_decl_processing): Use it.
19299         (debug_temp_inits): Remove.
19300         (start_method): Don't call preserve_data.
19301         (hack_incomplete_structures): Update comment.
19302         * init.c (init_init_processing): Don't initialize
19303         nelts_identifier.
19304         (build_offset_rf): Remove dead code.
19305         (build_delete): Use CLASSTYPE_N_BASECLASSES.
19306         * search.c (init_search_processing): Don't initialize
19307         vptr_identifier.
19308
19309 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
19310
19311         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
19312         some sign_compare warnings.
19313
19314 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
19315
19316         Rename abi::__vmi_class_type_info members.
19317         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
19318         base_list, detail_masks members to vmi_flags, vmi_base_count,
19319         vmi_bases and vmi_flags_masks respectively.
19320         (__vmi_class_type_info::vmi_flags_masks): Rename
19321         details_unknown_mask to flags_unknown_mask.
19322         * tinfo.cc (__class_type_info::do_upcast): Adjust.
19323         (__vmi_class_type_info::do_find_public_src): Adjust.
19324         (__vmi_class_type_info::do_dyncast): Adjust.
19325         (__vmi_class_type_info::do_upcast): Adjust.
19326
19327 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
19328
19329         * tinfo.cc (convert_to_base): New function.
19330         (get_vbase_offset): Remove. Move into convert_to_base.
19331         (__vmi_class_type_info::do_find_public_src): Adjust.
19332         (__vmi_class_type_info::do_dyncast): Adjust.
19333         (__vmi_class_type_info::do_upcast): Adjust.
19334
19335 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
19336
19337         * tinfo.cc (operator=): Use __builtin_strcmp.
19338         * tinfo2.cc (before): Likewise.
19339
19340 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
19341
19342         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
19343         (DECL_SAVED_INLINE): Rename to ...
19344         (DECL_DEFERRED_FN): ... this.
19345         (in_function_p): Remove declaration.
19346         (mark_inline_for_output): Rename to ...
19347         (defer_fn): ... this.
19348         * decl.c (finish_function): Adjust call to mark_inline_for_output.
19349         (in_function_p): Remove definition.
19350         * decl2.c (saved_inlines): Rename to ...
19351         (deferred_fns): ... this.
19352         (saved_inlines_used): Rename to ...
19353         (deferred_fns_used): ... this.
19354         (mark_inline_for_output): Rename to ...
19355         (defer_fn): ... this.
19356         (finish_file): Adjust accordingly.
19357         (init_decl2): Likewise.
19358         * lex.c (cons_up_default_function): Likewise.
19359         * pt.c (mark_decl_instantiated): Likewise.
19360         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
19361         circumstances.
19362         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
19363         * semantics.c (expand_body): Defer more functions.
19364
19365 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
19366
19367         * vec.cc: New file.
19368         * Make-lang.in (CXX_LIB2FUNCS): Add it.
19369         (vec.o): Build it.
19370         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
19371         __cxa_vec_delete): Declare.
19372
19373 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
19374
19375         * rtti.c (dfs_class_hint_mark): New static function.
19376         (dfs_class_hint_unmark): New static function.
19377         (class_hint_flags): Use them.
19378
19379 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
19380
19381         * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
19382
19383 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
19384
19385         * cp-tree.h (instantiate_decl): Change prototype.
19386         * decl2.c (mark_used): Adjust call.
19387         * optimize.c (inlinable_function_p): Adjust handling of templates.
19388         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
19389         (do_type_instantiation): Likewise.
19390         (instantiate_decl): Defer more templates.
19391         (instantiate_pending_templates): Adjust logic to handle inline
19392         friend functions.
19393
19394         * Makefile.in (GGC_H): New variable.  Use it throughout in place
19395         of ggc.h.
19396
19397         * call.c: Don't include obstack.h.  Include ggc.h.
19398         (obstack_chunk_alloc): Don't define.
19399         (obstack_chunk_free): Likewise.
19400         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
19401         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
19402         (pop_switch): Free it.
19403
19404         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
19405
19406         * dump.c (dequeue_and_dump): Don't try to print the bit_position
19407         if we don't have a DECL_FIELD_OFFSET.
19408
19409 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
19410
19411         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
19412         special_function_p.
19413
19414 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
19415
19416         * cfns.gperf (hash, libc_name_p): Prototype.
19417
19418         * rtti.c (build_dynamic_cast_1): Constification.
19419
19420         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
19421
19422         * semantics.c (deferred_type_access_control): Prototype.
19423
19424 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
19425
19426         Correct many new ABI issues regarding vbase and vcall offset
19427         layout.
19428         * cp-tree.h (BINFO_VTABLE): Document.
19429         (struct lang_type): Tweak formatting.
19430         (BINFO_PRIMARY_BINFO): Add to documentation.
19431         (CLASSTYPE_VSIZE): Fix typo in comment.
19432         (CLASSTYPE_VBASECLASSES): Update documentation.
19433         (BINFO_VBASE_MARKED): Remove.
19434         (SET_BINFO_VBASE_MARKED): Likewise.
19435         (CLEAR_BINFO_VBASE_MARKED): Likewise.
19436         (BINFO_FIELDS_MARKED): Remove.
19437         (SET_BINFO_FIELDS_MARKED): Likewise.
19438         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
19439         (enum access_kind): New enumeration.
19440         (num_extra_vtbl_entries): Remove declaration.
19441         (size_extra_vtbl_entries): Likewise.
19442         (get_vtbl_decl_for_binfo): New function.
19443         (dfs_vbase_unmark): Remove declaration.
19444         (mark_primary_bases): Likewise.
19445         * class.c (SAME_FN): Remove.
19446         (struct vcall_offset_data_s): Move definition.
19447         (build_vbase_pointer): Use `build', not `build_binary_op', to
19448         access the vbase pointer under the new ABI.
19449         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
19450         (build_primary_vtable): Likewise.
19451         (dfs_mark_primary_bases): Move here from search.c.
19452         (mark_primary_bases): Likewise.
19453         (determine_primary_bases): Under the new ABI, don't make a base
19454         class a primary base just because we don't yet have any virtual
19455         functions.
19456         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
19457         (num_vfun_entries): Remove.
19458         (dfs_count_virtuals): Likewise.
19459         (num_extra_vtbl_entries): Likewise.
19460         (size_extra_vtbl_entries): Likewise.
19461         (layout_virtual_bases): Iterate in inheritance graph order under
19462         the new ABI.
19463         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
19464         indicate that a vfield is present.
19465         (init_class_processing): Initialize access_public_node, etc., from
19466         ak_public, etc.
19467         (get_vtbl_decl_for_binfo): New function.
19468         (dump_class_hierarchy_r): Likewise.
19469         (dump_class_hierarchy): Use it.
19470         (finish_vtbls): Build the vtbls in inheritance graph order.
19471         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
19472         (initialize_vtable): Use get_vtbl_decl_for_binfo.
19473         (accumulate_vtbl_inits): Add comments explaining why a pre-order
19474         walk is required.
19475         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
19476         where the vptr points, even for primary vtables.
19477         (build_vtbl_initializer): Adjust handling of vbase and vcall
19478         offsets.
19479         (build_vcall_and_vbase_vtable_entries): New function.
19480         (dfs_build_vbase_offset_vtbl_entries): Remove.
19481         (build_vbase_offset_vtbl_entries): Reimplement.
19482         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
19483         were already handled in a primary base class vtable.
19484         (build_vcall_offset_vtbl_entries): Adjust.
19485         (build_rtti_vtbl_entries): Adjust.
19486         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
19487         * init.c (expand_virtual_init): Simplify.
19488         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
19489         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
19490         * search.c (BINFO_ACCESS): New macro.
19491         (SET_BINFO_ACCESS): Likewise.
19492         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
19493         (access_in_type): Likewise.
19494         (dfs_accessible_p): Likewise.
19495         (protected_accessible_p): Likewise.
19496         (lookup_fnfields_1): Adjust documentation.
19497         (dfs_mark_primary_bases): Move to class.c
19498         (mark_primary_bases): Likewise.
19499         (dfs_vbase_unmark): Remove.
19500         (virtual_context): Use BINFO_FOR_VBASE.
19501         (dfs_get_vbase_types): Simplify.
19502         (dfs_build_inheritance_graph_order): New function.
19503         (get_vbase_types): Use it.
19504         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
19505
19506         * tinfo.cc (get_vbase_offset): New function.
19507         (__vmi_class_type_info::do_find_public_src): Use it.
19508         (__vmi_class_type_info::do_dyncast): Likewise.
19509         (__vmi_class_type_info::do_upcast): Likewise.
19510
19511 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
19512
19513         * lang-specs.h: Pass -fno-show-column to the preprocessor.
19514
19515 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
19516
19517         * rtti.c (class_hint_flags): Rename flags.
19518         (class_initializer): Remove flags.
19519         (synthesize_tinfo_var): Combine offset and flags. Add flags
19520         for __vmi_class_type_info.
19521         (create_tinfo_types): Remove flags from __class_type_info and
19522         __si_class_type_info. Merge flags and offset from
19523         base_class_type_info.
19524         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
19525         (__base_class_info::is_virtual_p): Adjust.
19526         (__base_class_info::is_public_p): Adjust.
19527         (__base_class_info::offset): New accessor.
19528         (__class_type_info::details): Remove member.
19529         (__class_type_info::__class_type_info): Lose details.
19530         (__class_type_info::detail_masks): Remove.
19531         (__si_class_type_info::__si_class_type_info): Lose details.
19532         (__vmi_class_type_info::details): New member.
19533         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
19534         (__vmi_class_type_info::detail_masks): New member.
19535         * tinfo.cc (__class_type_info::do_upcast): Initialize result
19536         with unknown_details_mask.
19537         (__vmi_class_type_info::do_find_public_src): Adjust
19538         (__vmi_class_type_info::do_dyncast): Adjust.
19539         (__vmi_class_type_info::do_upcast): Set result details, if
19540         needed. Adjust.
19541         (__dynamic_cast): Temporarily #if out optimization.
19542
19543 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
19544
19545         * rtti.c (get_tinfo_decl): Mark used.
19546         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
19547         mark as dealt with, if we output it.
19548
19549 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
19550
19551         * class.c: Reorganize to put virtual function table initialization
19552         machinery at the end of the file.
19553
19554 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
19555
19556         * class.c (finish_struct): Use bitsize_zero_node.
19557         * pt.c (instantiate_class_template): Likewise.
19558
19559 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
19560
19561         Put RTTI entries at negative offsets in new ABI.
19562         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
19563         vbase offset at index -3, not -1.
19564         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
19565         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
19566         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
19567         (build_rtti_vtbl_entries): New function.
19568         (set_rtti_entry): Remove.
19569         (build_primary_vtable): Don't use it.
19570         (build_secondary_vtable): Likewise.
19571         (start_vtable): Remove.
19572         (first_vfun_index): New function.
19573         (set_vindex): Likewise.
19574         (add_virtual_function): Don't call start_vtable.  Do call
19575         set_vindex.
19576         (set_primary_base): Rename parameter.
19577         (determine_primary_base): Likewise.
19578         (num_vfun_entries): Don't use skip_rtti_stuff.
19579         (num_extra_vtbl_entries): Include RTTI information.
19580         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
19581         (skip_rtti_stuff): Remove.
19582         (dfs_modify_vtables): Don't use it.
19583         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
19584         (layout_nonempty_base_or_field): Update size handling.
19585         (create_vtable_ptr): Tweak.
19586         (layout_class_type): Adjust parameter names.
19587         (finish_struct_1): Simplify.
19588         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
19589         (skip_rtti_stuff): Remove.
19590         (first_vfun_index): New function.
19591         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
19592         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
19593         (marked_vtable_pathp): Declare.
19594         (unmarked_vtable_pathp): Likewise.
19595         * error.c (dump_expr): Use first_vfun_index to calculate vtable
19596         offsets.
19597         * rtti.c (build_headof): Look for RTTI at negative offsets.
19598         (get_tinfo_decl_dynamic): Likewise.
19599         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
19600         here.
19601         (create_pseudo_type_info): Do it here instead.  Adjust so that
19602         vptr points at first virtual function.
19603         * search.c (marked_vtable_pathp): Make it global.
19604         (unmarked_vtable_pathp): Likewise.
19605         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
19606         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
19607         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
19608         (get_pure_virtuals): Likewise.
19609         (expand_upcast_fixups): Likewise.
19610         * tree.c (debug_binfo): Likewise.
19611         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
19612         negative offset.
19613
19614 2000-03-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19615
19616         * class.c (check_field_decl): Fix typo.
19617         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
19618         (check_methods): Likewise.
19619         (check_field_decls): Likewise.
19620         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
19621         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
19622         Use DECL_RESULT_FLD, not DECL_RESULT.
19623         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
19624         * lex.c (identifier_type): Likewise.
19625         * pt.c (determine_specialization, lookup_template_class): Likewise.
19626         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
19627         (resolve_overloaded_unification, more_specialized): Likewise.
19628         * semantics.c (finish_member_declaration): Likewise.
19629         * typeck.c (build_x_function_call): Likewise.
19630
19631 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
19632
19633         * class.c (layout_empty_base): Handle empty bases with non-byte
19634         alignment.
19635         (build_base_field): Likewise.
19636         (layout_virtual_bases): Likewise.
19637
19638         * class.c (finish_struct_1): Fix typo in this change:
19639
19640         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19641
19642 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
19643
19644         * decl.c (grokdeclarator): Count partial specializations when
19645         keeping track of how many template classes have been seen.
19646
19647         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
19648
19649 2000-03-25  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19650
19651         * class.c (build_vbase_pointer_fields): layout_field now place_field.
19652         (get_vfield_offset): Use byte_position.
19653         (set_rtti_entry): Set OFFSET to ssizetype zero.
19654         (get_binfo_offset_as_int): Deleted.
19655         (dfs_record_base_offsets): Use tree_low_cst.
19656         (dfs_search_base_offsets): Likewise.
19657         (layout_nonempty_base_or_field): Reflect changes in RLI format
19658         and call byte_position.
19659         (layout_empty_base): Convert offset to ssizetype.
19660         (build_base_field): use rli_size_unit_so_far.
19661         (dfs_propagate_binfo_offsets): Do computation in proper type.
19662         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
19663         (layout_class_type): Reflect changes in RLI names and fields.
19664         (finish_struct_1): Set DECL_FIELD_OFFSET.
19665         * dump.c (dequeue_and_dump): Call bit_position.
19666         * expr.c (cplus_expand_constant): Use byte_position.
19667         * rtti.c (expand_class_desc): Use bitsize_one_node.
19668         * typeck.c (build_component_addr): Use byte_position and don't
19669         special case for zero offset.
19670
19671 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
19672
19673         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
19674
19675         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
19676         tinfo object.
19677         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
19678         vtable.
19679
19680 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
19681
19682         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
19683         DECL_P macros.
19684         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
19685         make_typename_type, check_initializer, cp_finish_decl,
19686         xref_tag): Likewise.
19687         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
19688         decl_namespace, arg_assoc_template_arg, arg_assoc,
19689         validate_nonmember_using_decl, do_class_using_decl): Likewise.
19690         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
19691         args_to_string): Likewise.
19692         * friend.c (is_friend): Likewise.
19693         * lex.c (note_got_semicolon, note_list_got_semicolon,
19694         is_global): Likewise.
19695         * method.c (build_overload_nested_name, build_overload_value,
19696         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
19697         * parse.y (typename_sub, typename_sub1): Likewise.
19698         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
19699         process_partial_specialization, convert_template_argument,
19700         template_args_equal, add_pending_template, lookup_template_class,
19701         for_each_template_parm_r, maybe_fold_nontype_arg,
19702         tsubst, instantiate_template, type_unification_real, unify,
19703         instantiate_pending_templates, set_mangled_name_for_template_decl):
19704         Likewise.
19705         * repo.c (repo_get_id, repo_template_used): Likewise.
19706         * search.c (lookup_field_1): Likewise.
19707         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
19708         * xref.c (classname): Likewise.
19709
19710 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
19711
19712         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
19713         (CANONICAL_BINFO): New macro.
19714         (BINFO_NEW_VTABLE_MARKED): Use it.
19715         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
19716         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
19717         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
19718         not TREE_TYPE.
19719         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
19720         (build_secondary_vtable): Likewise.
19721         (dfs_finish_vtbls): Likewise.
19722         (dfs_accumulate_vtbl_inits): Likewise.
19723         (accumulate_vtbl_inits): New function.
19724         (finish_vtbls): Make sure that virtual bases come after
19725         non-virtual bases in the vtable group.
19726         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
19727         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
19728         * search.c (struct vbase_info): Move definition.
19729         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
19730         (unmarked_new_vtable_p): Likewise.
19731         (dfs_mark_vtable_path): Remove.
19732         (dfs_mark_new_vtable): Remove.
19733         (dfs_unmark_new_vtable): Likewise.
19734         (dfs_clear_search_slot): Likewise.
19735         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
19736         (dfs_clear_vbase_slots): Likewise.
19737         (init_vbase_pointers): LIkewise.
19738
19739 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
19740
19741         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
19742         SIZETYPE to a non-SIZETYPE.
19743
19744 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
19745
19746         * class.c (layout_virtual_bases): Adjust names in conditionally
19747         compiled code.
19748
19749         * class.c (record_base_offsets): New function.
19750         (layout_conflict_p): Likewise.
19751         (layout_nonempty_base_or_field): Use it.
19752         (layout_empty_base): New function.
19753         (build_base_field): Use it.
19754         (build_base_fields): Update comment.
19755         (layout_virtual_bases): Fold in a little code form
19756         layout_basetypes.  Use layout_empty_base.
19757         (layout_basetypes): Remove.
19758         (end_of_class): New function.
19759         (layout_class_type): Use it.  Adjust.
19760
19761         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
19762         (fntype_p): Remove.
19763         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
19764         comment.
19765         (dfs_skip_nonprimary_vbases_markedp): Likewise.
19766         * typeck.c (fntype_p): Remove.
19767
19768         * cp-tree.h (TI_SPEC_INFO): Remove.
19769         (CLASSTYPE_TI_SPEC_INFO): Likewise.
19770         * pt.c (process_partial_specialization): Likewise.
19771
19772         * class.c (build_base_field): Fix thinko in computation of binfo
19773         offsets.
19774
19775         * tree.c (mark_local_for_remap_p): Mark variables declared in
19776         TARGET_EXPRs as well.
19777
19778 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
19779
19780         * typeck.c (require_complete_type, complete_type,
19781         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
19782         build_array_ref, convert_arguments, pointer_diff,
19783         build_x_unary_op, build_unary_op, build_c_cast,
19784         build_modify_expr): Use COMPLETE_TYPE_P etc.
19785         * call.c (is_complete, convert_like_real,
19786         build_new_method_call): Likewise.
19787         * class.c (build_vbase_pointer_fields, check_bases,
19788         build_base_field, finish_struct_1, pushclass): Likewise.
19789         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
19790         * decl.c (maybe_process_template_type_declaration, pushtag,
19791         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
19792         layout_var_decl, check_initializer, cp_finish_decl,
19793         grokdeclarator, require_complete_types_for_parms,
19794         grok_op_properties, xref_tag, xref_basetypes,
19795         check_function_type): Likewise.
19796         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
19797         * friend.c (do_friend): Likewise.
19798         * init.c (build_offset_ref): Likewise.
19799         * parse.y (structsp): Likewise.
19800         * pt.c (maybe_process_partial_specialization,
19801         tsubst_friend_function, instantiate_class_template, tsubst,
19802         do_type_instantiation, instantiate_pending_templates): Likewise.
19803         * repo.c (repo_get_id): Likewise.
19804         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
19805         synthesize_tinfo_var, emit_support_tinfos): Likewise.
19806         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
19807         * semantics.c (begin_class_definition): Likewise.
19808         * tree.c (build_cplus_method_type): Likewise.
19809         * typeck2.c (digest_init, build_functional_cast,
19810         add_exception_specifier): Likewise.
19811         * parse.h, parse.c: Regenerated.
19812
19813 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
19814
19815         * inc/cxxabi.h: New header file. Define new-abi entry points.
19816         (__pointer_type_info::target): Rename member to ...
19817         (__pointer_type_info::type): ... here.
19818         (__base_class_info::type): Rename member to ...
19819         (__base_class_info::base): ... here.
19820         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
19821         * cp-tree.h (CPTI_ABI): New global tree enumeration.
19822         (abi_node): New global tree node.
19823         * decl.c (abi_node): Document.
19824         (init_decl_processing): Initialize abi_node.
19825         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
19826         (get_vmi_pseudo_type_info): Likewise.
19827         (create_tinfo_types): Likewise.
19828         (emit_support_tinfos): Likewise.
19829         * tinfo.h (cxxabi.h): Include for new-abi.
19830         Move rtti class definitions to new header file.
19831         * tinfo.cc (abi): Use the namespace.
19832         (std): Move new abi rtti classes from here ...
19833         (__cxxabiv1): ... to here.
19834         * tinfo2.cc (cxxabi.h): Include for new-abi.
19835         Move rtti class definitions to new header file.
19836         (std): Move new abi rtti classes from here ...
19837         (__cxxabiv1): ... to here.
19838         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
19839         namespace.
19840
19841 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
19842             Jason Merrill  <jason@casey.cygnus.com>
19843
19844         * method.c (build_overload_int): Use host_integerp.
19845
19846 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
19847
19848         * init.c (build_offset_ref): Handle the case of a templated member
19849         function.
19850
19851 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
19852
19853         * except.c (expand_exception_blocks): Clear catch_clauses_last.
19854
19855 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
19856
19857         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
19858         * class.c (check_bitfield_decl): Turn illegal bitfields into
19859         non-bitfields.
19860         (dfs_propagate_binfo_offsets): Adjust for new size_binop
19861         semantics.
19862         (dfs_offset_for_unshared_vbases): Likewise.
19863         * cvt.c (cp_convert_to_pointer): Convert NULL to a
19864         pointer-to-member correctly under the new ABI.
19865         * expr.c (cplus_expand_constant): Don't use cp_convert when
19866         turning an offset into a pointer-to-member.
19867         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
19868         when dereferencing them under the new ABI.
19869         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
19870         of pointers-to-members under the new ABI.
19871
19872         * class.c (check_bitfield_decl): Remove restriction on really long
19873         bitfields.
19874         (layout_class_type): Implement new ABI handling of bitfields
19875         longer than their types.
19876
19877 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
19878
19879         * parse.y (extdefs): Call ggc_collect.
19880         * parse.c: Regenerated.
19881
19882 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
19883
19884         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
19885         (note_name_declared_in_class): Use OVL_CURRENT to get at a
19886         potential overload.
19887
19888 2000-03-17  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19889
19890         * class.c (build_vbase_path): Use integer_zerop.
19891         (build_vtable_entry): Use tree_low_cst.
19892         (get_vfield_offset): Use bit_position.
19893         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
19894         Use tree_low_cst.
19895         (check_bitfield_decl): Set DECL_SIZE using convert.
19896         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
19897         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
19898         Use tree_low_cst.
19899         (finish_struct_1): Use bit_position.
19900         (dump_class_hierarchy): Use tree_low_cst.
19901         * cp-tree.h (min_precision): Add declaration.
19902         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
19903         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
19904         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
19905         * expr.c (cplus_expand_constant): Use bit_position.
19906         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
19907         * rtti.c (get_base_offset): Use bit_position.
19908         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
19909         host_integerp, and tree_low_cst.
19910         (pointer_int_sum): Use integer_zerop.
19911         (build_component_addr): Use bit_position.
19912
19913 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
19914
19915         * typeck.c (require_complete_type): Don't assume size_zero_node.
19916         (complete_type_or_else): Likewise.
19917
19918 2000-03-16  Steven Grady <grady@digitaldeck.com>
19919             Jason Merrill  <jason@casey.cygnus.com>
19920
19921         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
19922
19923 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
19924
19925         * decl2.c (grokfield): Bail out if type is error_mark_node.
19926
19927 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
19928
19929         * tinfo2.cc (__ptr_to_member_data): Rename to ...
19930         (__pointer_to_member_data): ... here. Adjust.
19931         * rtti.c (create_tinfo_types): Adjust.
19932
19933 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
19934
19935         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
19936         * decl.c (ref_desc_type_node): Undocument.
19937         * rtti.c (ptr_ref_initializer): Rename to ...
19938         (ptr_initializer): ... here. Adjust comments.
19939         (ptmd_initializer): Fix comment thinko.
19940         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
19941         (create_tinfo_types): Remove ref_desc_type_node init.
19942         * tinfo2.cc (__reference_type_info): Remove.
19943
19944 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
19945
19946         * decl.c (cp_finish_decl): Remove obsolete comment.
19947
19948         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
19949
19950 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
19951
19952         * cp-tree.h: Tweak documentation.
19953         * class.c (build_vbase_pointer_fields): Layout the fields, too.
19954         (avoid_overlap): Remove.
19955         (get_binfo_offset_as_int): New function.
19956         (dfs_serach_base_offsets): Likewise.
19957         (layout_nonempty_base_or_field): Likewise.
19958         (build_base_field): Layout fields here.  Avoid placing two objects
19959         of the same type at the same address, under the new ABI.
19960         (build_base_fields): Adjust accordingly.
19961         (create_vtable_ptr): Return the new field, but don't attach it to
19962         TYPE_FIELDS.
19963         (remove_base_field): Remove.
19964         (remove_base_fields): Remove.
19965         (layout_basetypes): Adjust accordingly.
19966         (layout_class_type): Call layout_field for each field, rather than
19967         just making a wholesale call to layout_type.
19968
19969 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
19970
19971         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
19972
19973 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
19974
19975         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
19976
19977         * except.c (dtor_nothrow): New fn.
19978         (do_pop_exception): Use it.  Take type parm.
19979         (push_eh_cleanup): Take type parm.
19980         (expand_start_catch_block): Pass it.
19981         (build_eh_type_type_ref): Accept null type.
19982
19983 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
19984
19985         * cp-tree.h (revert_static_member_fn): Change prototype.
19986         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
19987         (grok_op_properties): Likewise.
19988         (start_function): Likewise.
19989         (revert_static_member_fn): Simplify.
19990         * pt.c (check_explicit_specialization): Adjust call to
19991         revert_static_member_fn.
19992
19993 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
19994
19995         * cp-tree.h (scope_kind): New type.
19996         (tmpl_spec_kind): Likewise.
19997         (declare_pseudo_global_level): Remove.
19998         (pseudo_global_level_p): Rename to template_parm_scope_p.
19999         (pushlevel): Remove declaration.
20000         (begin_scope): New function.
20001         (finish_scope): Likewise.
20002         (current_tmpl_spec_kind): Likewise.
20003         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
20004         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
20005         Add template_spec_p.
20006         (toplevel_bindings_p): Adjust.
20007         (declare_pseudo_global_level): Remove.
20008         (pseudo_global_level_p): Rename to template_parm_scope_p.
20009         (current_tmpl_spec_kind): New function.
20010         (begin_scope): Likewise.
20011         (finish_scope): Likewise.
20012         (maybe_push_to_top_level): Adjust.
20013         (maybe_process_template_type_declaration): Likewise.
20014         (pushtag): Likewise.
20015         (pushdecl_nonclass_level): Likewise.
20016         (lookup_tag): Likewise.
20017         (grokfndecl): Handle member template specializations.  Share
20018         constructor and non-constructor code.
20019         * decl2.c (check_classfn): Handle member template specializations.
20020         * pt.c (begin_template_parm_list): Use begin_scope.
20021         (begin_specialization): Likewise.
20022         (end_specialization): Likewise.
20023         (check_explicit_specialization): Use current_tmpl_spec_kind.
20024         Handle member template specializations.
20025         (end_template_decl): Use finish_scope.  Remove call to
20026         get_pending_sizes.
20027         (push_template_decl_real): Remove bogus error message.
20028         (tsubst_decl): Fix typo in code contained in comment.
20029         (instantiate_template): Handle member template specializations.
20030         (most_general_template): Likewise.
20031
20032 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
20033
20034         * lex.c (whitespace_cr): Compress consecutive calls to warning().
20035         (do_identifier): Ditto for error().
20036
20037         * pt.c (convert_nontype_argument): Ditto for cp_error().
20038         (convert_template_argument): Ditto for cp_pedwarn().
20039
20040 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
20041
20042         * exception.cc (__check_null_eh_spec): New fn.
20043         * except.c (expand_end_eh_spec): Call it if the spec is throw().
20044
20045 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
20046
20047         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
20048         * except.c (expand_end_eh_spec): Add the return type.
20049         * rtti.c (throw_bad_cast): Add the parmtypes.
20050         (throw_bad_typeid): Likewise.
20051
20052         * semantics.c (expand_stmt): Only leave out rtl for unused
20053         artificials, and set DECL_IGNORED_P on them as well.
20054         * decl.c (wrapup_globals_for_namespace): Likewise.
20055
20056 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
20057
20058         * decl.c (maybe_commonize_var): Skip all artificial decls.
20059         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
20060
20061 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
20062
20063         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
20064         * cp-tree.h: Declare flag_enforce_eh_specs.
20065         * decl.c (store_parm_decls, finish_function): Check it.
20066
20067         C library functions don't throw.
20068         * Makefile.in (cfns.h): New target.
20069         (except.o): Depend on it.
20070         * Make-lang.in (cc1plus): Depend on cfns.gperf.
20071         * cfns.gperf: New file.
20072         * cfns.h: Generated.
20073         * except.c: Include it.
20074         (nothrow_libfn_p): New fn.
20075         * decl.c (grokfndecl): Use it.
20076         * cp-tree.h: Declare it.
20077
20078         * decl.c (push_overloaded_decl_1, auto_function,
20079         define_function): Lose.
20080         (build_library_fn_1): New static fn.
20081         (builtin_function): Use it.
20082         (get_atexit_node): Use build_library_fn_ptr.
20083         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
20084         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
20085         push_void_library_fn, push_throw_library_fn): New fns.
20086         * cp-tree.h: Declare them.
20087         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
20088         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
20089         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
20090         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
20091         * rtti.c (build_runtime_decl): Lose.
20092         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
20093         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
20094         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
20095
20096         * call.c (build_call): Remove result_type parm.
20097         Call mark_used on unused artificial fns.
20098         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
20099
20100 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
20101
20102         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
20103         appropriate.
20104         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
20105         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
20106         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
20107         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
20108         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
20109         expand_generic_desc): Likewise.
20110
20111 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
20112
20113         * exception.cc (__cp_pop_exception): Cleanup the original object.
20114
20115 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
20116
20117         * decl.c (grok_op_properties): Merge conversion to void warning
20118         with other silly op warnings.
20119
20120 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
20121
20122         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
20123         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
20124
20125 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
20126
20127         * decl.c (cp_make_fname_decl): New function.
20128         (wrapup_globals_for_namespace): Don't emit unused static vars.
20129         (init_decl_processing): Remove comment about use of
20130         array_domain_type. Set make_fname_decl.
20131         (cp_finish_decl): Remove __FUNCTION__ nadgering.
20132         * semantics.c (begin_compound_stmt): Remove
20133         current_function_name_declared flagging.
20134         (expand_stmt): Don't emit unused local statics.
20135         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
20136         specially.
20137
20138 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
20139
20140         * typeck.c (convert_for_assignment): Don't look at array
20141         initializer.
20142         * call.c (convert_like_real): Likewise.
20143
20144 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
20145
20146         Add initial support for '\uNNNN' specifier.
20147         * lex.c (read_ucs): New fn.
20148         (readescape, skip_white_space): Call it.
20149         (is_extended_char, is_extended_char_1): New fns.
20150         (utf8_extend_token): New fn, #if 0'd out.
20151         (real_yylex): Treat extended chars like letters.
20152
20153         * search.c (note_debug_info_needed): Walk the bases even if we
20154         weren't deferring the type itself.
20155
20156 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
20157
20158         * decl2.c (finish_objects): Constify a char*.
20159
20160         * method.c (emit_thunk): Likewise.
20161
20162 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
20163
20164         * typeck.c (dubious_conversion_warnings): Look through
20165         REFERENCE_TYPE.
20166
20167 2000-03-06  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
20168
20169         * class.c (dfs_modify_vtables): I is now unsigned.
20170         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
20171         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
20172         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
20173         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
20174         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
20175         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
20176         Call integer_all_onesp.
20177         * typeck2.c (process_init_constructor): Use compare_tree_int.
20178
20179         * lang-specs.h (as): Don't call if -syntax-only.
20180
20181 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
20182
20183         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
20184         RTL_EXPR_HAS_NO_SCOPE after all.
20185
20186 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
20187
20188         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
20189         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
20190         RTL_EXPR_HAS_NO_SCOPE.
20191
20192         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
20193         later.
20194
20195         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
20196
20197 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
20198
20199         * call.c (convert_like): Macrofy.
20200         (convert_like_with_context): New macro.
20201         (convert_like_real): Renamed from convert_like.  Add calling
20202         context parameters, for diagnostics. Add recursive flag.  Call
20203         dubious_conversion_warnings for outer conversion.
20204         (build_user_type_conversion): Use convert_like_with_context.
20205         (build_over_call): Likewise. Don't warn about dubious
20206         conversions here. Adjust convert_default_arg calls.
20207         (convert_default_arg): Add context parameters for diagnostics.
20208         Pass through to convert_like_with_context.
20209         * cp-tree.h (convert_default_arg): Add context parameters.
20210         (dubious_conversion_warnings): Prototype new function.
20211         * typeck.c (convert_arguments): Adjust convert_default_arg call.
20212         (dubious_conversion_warnings): New function, broken
20213         out of convert_for_assignment.
20214         (convert_for_assignment): Adjust.
20215
20216 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
20217
20218         * decl2.c (key_method): Break out from...
20219         (import_export_vtable, import_export_class): ...here.
20220
20221         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
20222         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
20223
20224         * search.c (note_debug_info_needed, dfs_debug_mark,
20225         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
20226         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
20227
20228 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
20229
20230         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
20231         typos.
20232
20233 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
20234
20235         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
20236         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
20237         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
20238         (lang_type): Split gets_new into has_new and has_array_new.
20239         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20240         (TYPE_GETS_NEW): Split into ...
20241         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
20242         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
20243         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
20244         (build_op_new_call): Don't declare.
20245         (build_new_1): Likewise.
20246         * call.c (build_op_new_call): Remove.
20247         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
20248         instead of TYPE_NEEDS_DESTRUCTOR.
20249         (finish_struct_bits): Likewise.
20250         (add_implicitly_declared_members): Likewise.
20251         (check_field_decl): Likewise.
20252         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
20253         correctly under the new ABI.
20254         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
20255         instead of TYPE_NEEDS_DESTRUCTOR.
20256         (initialize_local_var): Likewise.
20257         (destroy_local_var): Likewise.
20258         (cp_finish_decl): Likewise.
20259         (register_dtor_fn): Likewise.
20260         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
20261         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
20262         TYPE_VEC_DELETE_TAKES_SIZE here.
20263         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
20264         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
20265         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20266         (finish_destructor_body): Likewise.
20267         (maybe_build_cleanup_1): Likewise.
20268         * decl2.c (do_static_destruction): Likewise.
20269         * init.c (build_new_1): Make it static.
20270         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20271         (expand_cleanup_for_base): Likewise.
20272         (get_cookie_size): New function.
20273         (build_new_1): Handle array-new cookies correctly under the new
20274         ABI.
20275         (build_vec_delete_1): Likewise.
20276         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20277         (build_delete): Likewise.
20278         (build_vec_delete): Handle array-new cookies correctly under the new
20279         ABI.
20280         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20281         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
20282         TYPE_HAS_ARRAY_NEW_OPERATOR.
20283         * ptree.c (print_lang_type): Check them.
20284         * search.c (context_for_name_lookup): Fix typo in comment.
20285         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20286         * tree.c (break_out_cleanups): Likewise.
20287         (build_cplus_array_test_1): Likewise.
20288         (cp_build_qualified_type_real): Likewise.
20289         * typeck.c (complete_type): Likewise.
20290
20291         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
20292         the command-line, not the end.
20293
20294 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
20295
20296         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
20297
20298 2000-03-02  Tom Tromey  <tromey@cygnus.com>
20299
20300         * cp-tree.h (build_java_class_ref): Declare.
20301         * init.c (build_java_class_ref): No longer static.
20302         * except.c (expand_throw): Generate a Java-style `throw' if the
20303         thrown object is a "Java" object.
20304         (initialize_handler_parm): Generate a Java-style lookup of
20305         exception info if the caught object is a "Java" object.
20306         (catch_language, catch_language_init): New globals.
20307         (decl_is_java_type): New function.
20308         (expand_start_catch_block): Don't call push_eh_info() or
20309         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
20310         class reference to build_catch_block.
20311
20312 2000-03-02  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
20313
20314         * typeck.c (comptypes): Treat sizetype like its language equivalent.
20315
20316 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
20317
20318         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
20319         to merge reference/pointer code and fix incorrect warnings.
20320
20321 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
20322
20323         * search.c (protected_accessible_p): Use context_for_name_lookup.
20324
20325         * init.c (construct_virtual_bases): Fix thinko.
20326         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
20327
20328 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
20329
20330         * decl.c (current_function_decl): Move to toplev.c.
20331
20332 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
20333
20334         * pt.c (fn_type_unification): Unify return type, whenever
20335         provided.
20336         (get_bindings_real): Only pass return type when necessary.
20337         Remove explicit return type check.
20338         * class.c (resolve_address_of_overloaded_function): Pass desired
20339         return type to fn_type_unification.
20340
20341 2000-02-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
20342
20343         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
20344         DECL_FIELD_SIZE.
20345         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
20346         DECL_FIELD_SIZE.
20347         * rtti.c (expand_class_desc): Likewise.
20348         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
20349         (THUNK_VCALL_OFFSET): Likewise.
20350         (THUNK_DELTA): Reflect changes in ../tree.h.
20351
20352 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
20353
20354         * search.c (protected_accessible_p): Also allow the access if
20355         the member is public in DERIVED.  Lose TYPE parm.
20356         (friend_accessible_p): Lose TYPE parm.
20357         (accessible_p): Adjust.
20358
20359 2000-02-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
20360
20361         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
20362         on things that are not sizes; ssize_binop deleted.
20363         Call size_diffop when appropriate.
20364         (dfs_build_vcall_offset_vtbl_entries): Likewise.
20365         (build_primary_vtable, build_secondary_vtable): Likewise.
20366         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
20367         Variable I is HOST_WIDE_INT.
20368         (get_vfield_offset): Pass proper types to size_binop.
20369         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
20370         (finish_struct_1): Likewise.
20371         (skip_rtti_stuff): Arg N is now pointer to signed.
20372         (layout_class_type): Use size_zero_node.
20373         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
20374         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
20375         * decl.c (complete_arry_type): Pass proper types to size_binop.
20376         (xref_basetypes): BINFO_OFFSET is sizetype.
20377         * error.c (dump_expr): Don't use size_binop non-sizes.
20378         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
20379         * init.c (construct_virtual_bases): Fix type error.
20380         (build_vec_delete_1): Pass proper type to size_binop and don't
20381         fold result.
20382         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
20383         * rtti.c (get_base_offset): Pass proper type to size_binop.
20384         * search.c (dfs_find_vbases): Fix type error.
20385         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
20386         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
20387         * tree.c (debug_binfo): Variable N is signed.
20388         Use HOST_WIDE_INT_PRINT_DEC.
20389         * typeck.c (comptypes): sizetype is same as equivalent integer type.
20390         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
20391         size_one_node and size_zero_node.
20392         (c_alignof): Use size_one_node.
20393         (build_component_addr): Pass proper types to size_binop.
20394         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
20395
20396 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
20397
20398         Implement class scope using-declarations for functions.
20399         * class.c (handle_using_decl): Call add_method for used functions.
20400         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
20401         (add_method): Used functions are hidden by local functions.
20402         (check_bases_and_members): Handle using-decls before finalizing
20403         CLASSTYPE_METHOD_VEC.
20404         * call.c (add_function_candidate): Add ctype parm; if nonzero,
20405         override the type of 'this' accordingly.
20406         (add_template_candidate, add_template_candidate_real): Add ctype parm.
20407         (convert_class_to_reference, build_user_type_conversion_1,
20408         build_new_function_call, build_object_call, build_new_op,
20409         build_new_method_call): Pass ctype parm.
20410
20411         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
20412         the baselink.
20413         * call.c (convert_class_to_reference, build_user_type_conversion_1,
20414         build_new_function_call, build_object_call, build_new_op,
20415         build_new_method_call, build_op_delete_call): Don't get basetype_path
20416         from a baselink.
20417         * typeck.c (build_component_ref): Likewise.
20418         * init.c (build_offset_ref): Likewise.
20419         (resolve_offset_ref): Don't call enforce_access.
20420         Call build_scoped_ref.
20421         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
20422         would cause an error or if -pedantic.
20423         * class.c (alter_access): Lose binfo parm.
20424
20425 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
20426
20427         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
20428         types.
20429
20430 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
20431
20432         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
20433         pseudo_type_info creation into the std namespace
20434
20435 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
20436
20437         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
20438         (import_export_class): Remove declaration.
20439         * decl2.c (import_export_class): Make it static.
20440         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
20441         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
20442         EXPR_WITH_FILE_LOCATION.
20443         * lex.c (check_newline): Tweak filename/lineno setting.
20444         * semantics.c (begin_while_stmt): Fix typo in comment.
20445
20446 2000-02-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
20447
20448         * lang-options.h (-fmessage-length=): Add missing option.
20449
20450         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
20451
20452 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
20453
20454         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
20455
20456 2000-02-25  Jim Wilson  <wilson@cygnus.com>
20457
20458         * optimize.c (expand_call_inline): Emit the return label before
20459         evaluating the return value.
20460
20461 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
20462
20463         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
20464         than duplicating functionality here.
20465         * optimize.c: Include input.h.
20466         (expand_call_inline): Use push_srcloc and pop_srcloc.
20467         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
20468         * parse.c: Regenerated.
20469         * Makefile.in (lex.o): Depend on input.h.
20470         (optimize.o): Likewise.
20471
20472 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
20473
20474         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
20475         function type, rather than ICE.
20476
20477 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
20478
20479         * decl.c (grokdeclarator): Call decl_type_access_control.
20480         * parse.y (parse_end_decl): Don't call decl_type_access_control if
20481         decl is null.
20482
20483 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
20484
20485         * decl.c (decls_match): Remove obsolete static member nadgering.
20486
20487 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
20488
20489         * decl.c (grokdeclarator): Change ANSI to ISO.
20490         * lex.c (consume_string, readescape, do_identifier): Likewise.
20491         (parse_float, real_yylex): Likewise.
20492         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
20493         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
20494         new_type_id, maybe_label_decls, simple_stmt,
20495         for.init.statement): Likewise.
20496         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
20497         * semantics.c (finish_named_return_value): Likewise.
20498         * parse.c: Regenerate.
20499
20500 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
20501
20502         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
20503         (CPTI_CLASS_STAR_TYPE): Remove.
20504         (vtable_index_type): Likewise.
20505         (class_star_type_node): Remove.
20506         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
20507         (build_binary_op_nodefault): Remove.
20508         * call.c (build_new_op): Use build_binary_op instead of
20509         build_binary_op_nodefault.
20510         * decl.c (init_decl_processing): Remove class_star_type_node
20511         initialization.  Make delta_type_node ptrdiff_type_node under the
20512         new ABI.  Initialize vtable_index_type.
20513         (build_ptrmemfunc_type): Build different structures for the new
20514         ABI.
20515         (build_enumerator): Use build_binary_op instead of
20516         build_binary_op_nodefault.
20517         * method.c (build_overload_value): Mangle pointers-to-members
20518         appropriately under the new ABI.
20519         * typeck.c (build_array_ref): Use build_binary_op instead of
20520         build_binary_op_nodefault.
20521         (get_member_function_from_ptrfunc): Adjust for the new ABI.
20522         (build_binary_op_nodefault): Rename to ...
20523         (build_binary_op): ... this.  Remove old version.  Adjust for
20524         pointer-to-member comparisons under the new ABI.
20525         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
20526         (build_ptrmemfunc): Adjust for the new ABI.
20527         (expand_ptrmemfunc_cst): Likewise.
20528         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
20529         (pfn_from_ptrmemfunc): Adjust for the new ABI.
20530
20531 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
20532
20533         * call.c (build_object_call): Compress consecutive calls to
20534         cp_error.
20535         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
20536         (build_op_delete_call): Adjust message formatting.
20537
20538         * class.c (check_bases): Compress consecutive calls to
20539         cp_pedwarn.
20540         (finish_struct_anon): Say 'ISO C++'.
20541
20542         * decl.c (start_decl): Same here.
20543         (grok_reference_init): Likewise.
20544         (grokfndecl): Correct message formatting.
20545         (grokfndecl): Improve diagnostic.
20546         (check_static_variable_definition): Likewise. Say 'ISO C++'
20547         (compute_array_index_type): Say 'ISO C++'
20548         (create_array_type_for_decl): Compress consecutive calls to
20549         cp_error.
20550         (grokdeclarator): Say 'ISO C++'
20551         (grok_op_properties): Likewise.
20552
20553         * decl2.c (delete_sanity): Clairify diagnostic.
20554         (check_member_template): Same here.
20555         (grok_function_init): Use consistent terminology.
20556
20557         * expr.c (do_case): Say 'ISO C++'
20558
20559         * friend.c (do_friend): Compress consecutive calls to warning.
20560
20561 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
20562
20563         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
20564         * class.c (build_secondary_vtable): Reorganize.  Don't create a
20565         new vtable under the new ABI.
20566         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
20567         computing the size.
20568         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
20569         the initializing elements.
20570         (initialize_vtable): New function.
20571         (dfs_finish_vtbls): Use it.
20572         (dfs_accumulate_vtbl_inits): New function.
20573         (finish_vtbls): Merge primary and secondary vtables under the new
20574         ABI.
20575         (finish_struct_1): Remove redundant call to layout_vtable_decl.
20576         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
20577         aren't VAR_DECLs.
20578
20579         * class.c (build_vtable): New function, split out from ...
20580         (get_vtable_decl): ... here, and ...
20581         (build_secondary_vtable): ... here.
20582
20583         * pt.c (tsubst_decl): Fix formatting.
20584
20585 2000-02-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
20586
20587         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
20588         (avoid_overlap, build_base_field): Likewise.
20589         (build_base_field, build_base_fields, is_empty_class):
20590         Test DECL_SIZE with integer_zero.
20591         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
20592         * cp-tree.h (struct lang_type): New field size_unit.
20593         (CLASSTYPE_SIZE_UNIT): New macro.
20594         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
20595         (cp_finish_decl): Delete -Wlarger-than processing.
20596         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
20597         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
20598         * tree.c (make_binfo): binfo vector is one entry longer.
20599         (walk_tree): Walk DECL_SIZE_UNIT.
20600
20601 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
20602
20603         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
20604         comment.
20605         (build_vtable_entry): Don't assume all vtable entries are
20606         functions.
20607         (build_vtbl_initializer): Adjust accordingly.
20608         (get_vtable_decl): Fix formatting.
20609
20610 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
20611
20612         * semantics.c (deferred_type_access_control): Walk the entire
20613         type_lookups list.
20614         (save_type_access_control): Rename from
20615         initial_deferred_type_access_control.  Just remember the value.
20616         (decl_type_access_control): New fn.
20617         (begin_function_definition): Use deferred_type_access_control, after
20618         we've started the function.  Set type_lookups to error_mark_node.
20619         * parse.y (frob_specs, fn.def1): Adjust.
20620         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
20621         (parse_end_decl, parse_bitfield0, parse_method): New fns.
20622         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
20623         (after_type_component_declarator0): Likewise.
20624         (after_type_component_declarator): Likewise.
20625         (notype_component_declarator): Likewise.
20626         * cp-tree.h: Adjust.
20627
20628         * decl.c (redeclaration_error_message): Allow redeclaration of
20629         namespace-scope decls.
20630
20631 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
20632
20633         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
20634
20635 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
20636
20637         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
20638         * decl2.c (grokclassfn): Likewise.
20639
20640         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
20641
20642         * decl2.c (lang_decode_option): Don't set default message length
20643         here.
20644         * lex.c (lang_init_options): Set it here.
20645
20646 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
20647
20648         Make DECL_CONTEXT mean the class in which a member function was
20649         declared, even for a virtual function.
20650         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
20651         (DECL_FRIEND_CONTEXT): New macro.
20652         (DECL_REAL_CONTEXT): Remove.
20653         (SET_DECL_FRIEND_CONTEXT): Likewise.
20654         (DECL_VIRTUAL_CONTEXT): Adjust.
20655         (DECL_CLASS_SCOPE_P): Use TYPE_P.
20656         (add_friends): Remove.
20657         (hack_decl_function_context): Likewise.
20658         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
20659         CP_DECL_CONTEXT.
20660         (build_over_call): Fix indentation.  Use DECL_CONTEXT
20661         instead of DECL_CLASS_CONTEXT.
20662         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
20663         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
20664         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20665         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
20666         (build_base_field): Likewise.
20667         (finish_struct_1): Likewise.
20668         (build_self_reference): Likewise.
20669         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
20670         DECL_REAL_CONTEXT.
20671         (pushtag): Use decl_function_context, not
20672         hack_decl_function_context.
20673         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
20674         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
20675         (pushdecl): Remove bogus code.
20676         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
20677         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
20678         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20679         Use decl_function_context, nothack_decl_function_context.
20680         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
20681         (grokdeclarator): Likewise.  Use decl_function_context, not
20682         hack_decl_function_context.
20683         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
20684         (start_function): Use DECL_FRIEND_CONTEXT, not
20685         DECL_CLASS_CONTEXT.  Use decl_function_context, not
20686         hack_decl_function_context.
20687         (finish_function): Use decl_function_context, not
20688         hack_decl_function_context.
20689         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
20690         DECL_CLASS_CONTEXT.
20691         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
20692         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
20693         (grokfield): Likewise.
20694         (finish_builtin_type): Likewise.
20695         (finish_vtable_vardec): Use decl_function_context, not
20696         hack_decl_function_context.
20697         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20698         (start_static_initialization_or_destruction): Likewise.
20699         (finish_static_initialization_or_destruction): Likewise.
20700         (mark_used): Adjust logic for deciding when to synthesize methods.
20701         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
20702         DECL_REAL_CONTEXT.
20703         * error.c (dump_function_decl): Use DECL_CONTEXT, not
20704         DECL_CLASS_CONTEXT.
20705         * friend.c (is_friend): Likewise.
20706         (add_friends): Remove.
20707         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
20708         * lex.c (begin_definition_of_inclass_inline): Use
20709         decl_function_context, not hack_decl_function_context.
20710         (process_next_inline): Likewise.
20711         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
20712         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
20713         DECL_CLASSS_CONTEXT.
20714         (hack_identifier): Likewise.
20715         (synthesize_method):  Use decl_function_context, not
20716         hack_decl_function_context.
20717         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
20718         DECL_REAL_CONTEXT.
20719         (is_member_template): Use decl_function_context, not
20720         hack_decl_function_context.  Use DECL_CONTEXT, not
20721         DECL_CLASS_CONTEXT.
20722         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
20723         DECL_CLASS_CONTEXT.
20724         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
20725         DECL_REAL_CONTEXT.
20726         (push_template_decl_real): Likewise.
20727         (instantiate_class_template): Don't call add_friends.
20728         (tsubst_default_argument): Use DECL_CONTEXT, not
20729         DECL_REAL_CONTEXT.
20730         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
20731         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20732         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
20733         DECL_CLASS_CONTEXT.
20734         * repo.c (repo_inline_used): Likewise.
20735         * search.c (current_scope): Adjust for new _CONTEXT macros.
20736         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
20737         DECL_REAL_CONTEXT.
20738         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20739         (lookup_fnfields_here):Likewise.
20740         (check_final_overrider): Likewise.
20741         (init_vbase_pointers): Likewise.
20742         (virtual_context): Likewise.
20743         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
20744         (expand_body): Use decl_function_context, not
20745         hack_decl_function_context.
20746         * tree.c (hack_decl_function_context): Remove.
20747         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
20748         DECL_CLASS_CONTEXT.
20749         * typeck2.c (error_not_base_type): Likewise.
20750
20751 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
20752
20753         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
20754
20755 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
20756
20757         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
20758
20759 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
20760
20761         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
20762
20763 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
20764
20765         * decl2.c (lang_decode_option): Enable automatic line wrapping.
20766
20767 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
20768
20769         * parse.y (frob_specs): Split out...
20770         (parse_decl): From here.
20771         (fn.def2): Call initial_deferred_type_access_control.
20772         (after_type_component_declarator0): Call frob_specs.
20773         (notype_component_declarator0): Likewise.
20774         * search.c (friend_accessible_p): Nested classes are friends of their
20775         enclosing classes.
20776
20777 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
20778
20779         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
20780         used to create an implicit temporary.
20781
20782         * class.c (dfs_modify_vtables): Tweak calculation of functions to
20783         override.
20784
20785 2000-02-08  Nathan Sidwell  <nathan@acm.org>
20786
20787         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
20788         strip array element qualifiers too.
20789
20790 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
20791
20792         * decl.c (store_parm_decls): Don't build cleanups for parameters
20793         while processing_template_decl.
20794
20795 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
20796
20797         * cp-tree.h (struct saved_scope): Add incomplete field.
20798         (namespace_scope_incomplete): New macro.
20799         * decl.c (pushdecl): Use it.
20800         (hack_incomplete_structures): Use it.  See through artificial
20801         binding levels.
20802         (mark_saved_scope): Mark it.
20803
20804         Implement access control for nested types.
20805         * search.c (type_access_control): New fn.
20806         (accessible_p): Now we do perform access control for types.
20807         * semantics.c (deferred_type_access_control): New fn.
20808         (initial_deferred_type_access_control): New fn.
20809         (begin_function_definition): Call it.  Add lookups parm.
20810         * decl.c (struct binding_level): Add this_class field.
20811         (pushlevel_class): Set it.
20812         (mark_binding_level): Mark it.
20813         (lookup_name_real): Use it.  Call type_access_control.
20814         (mark_saved_scope): Mark lookups field.
20815         * cp-tree.h (flagged_type_tree): Add lookups field.
20816         (struct saved_scope): Add lookups field.
20817         (type_lookups): New macro.
20818         * parse.y (declmods): Now <ftype>.
20819         (parse_decl): Add lookups parm.  Call
20820         initial_deferred_type_access_control.
20821         (lang_extdef): Clear type_lookups.
20822         (typed_declspecs, declmods, typespec): Set lookups field.
20823         (initdcl): Call deferred_type_access_control.
20824         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
20825         component_decl_1, named_parm): Adjust.
20826         * friend.c (is_friend): Nested classes are friends of their
20827         enclosing classes.
20828
20829         * class.c (currently_open_derived_class): New fn.
20830         * method.c (hack_identifier): Use it.
20831
20832         * lex.c (do_identifier): Remove obsolete code.
20833
20834         * parse.y (typed_typespecs): Propagate new_type_flag properly.
20835
20836 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
20837
20838         * tinfo.h: Remove apostrophes from C++ comment (xgettext
20839         thinks this file is plain C).
20840
20841 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
20842
20843         * Makefile.in (call.o): Depend on $(EXPR_H).
20844
20845         * call.c: Include "expr.h".
20846
20847         * class.c (dump_class_hierarchy): Add prototype.
20848
20849         * search.c (dfs_get_pure_virtuals): Likewise.
20850
20851 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
20852
20853         * parse.y (simple_stmt): Allow :: token in asm parameter list.
20854         * parse.c: Rebuilt.
20855
20856 2000-01-31  Jim Wilson  <wilson@cygnus.com>
20857
20858         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
20859         Store it in DECL_FCONTEXT.
20860         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
20861
20862 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
20863
20864         * tinfo.h (old abi): #include "tconfig.h".
20865         * tinfo.cc (convert_to_base): Move into old abi section.
20866
20867 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
20868
20869         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
20870         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
20871         (BINFO_PRIMARY_BINFO): New macro.
20872         (BF_DELTA): Rename to ...
20873         (BV_DELTA): ... this.
20874         (BF_VCALL_INDEX): Rename to ...
20875         (BV_VCALL_INDEX): ... this.
20876         (BF_FN): Rename to ...
20877         (BV_FN): ... this.
20878         * class.c (build_vbase_path): Adjust for changes to reverse_path.
20879         (set_rtti_entry): Rename BF_ macros to BV_ variants.
20880         (modify_vtable_entry): Simplify.
20881         (add_virtual_function): Rename BF_ macros to BV_ variants.
20882         (build_vtable_initializer): Likewise.
20883         (get_class_offset_1): Remove.
20884         (dfs_get_class_offset): Likewise.
20885         (get_class_offset): Likewise.
20886         (dfs_find_final_overrider): New function.
20887         (find_final_overrider): Likewise.
20888         (modify_one_vtable): Remove.
20889         (dfs_find_base): New function.
20890         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
20891         find_final_overrider.
20892         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
20893         virtuals.
20894         (dfs_fixup_vtable_deltas): Remove.
20895         (override_one_vtable): Remove.
20896         (merge_overrides): Likewise.
20897         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
20898         unreal chilren of virtual bases.
20899         (finish_struct_1): Don't use merge_overrides.  Don't use
20900         dfs_fixup_vtable_deltas.
20901         * tree.c (reverse_path): Return a TREE_LIST, not a chain of
20902         BINFOs.
20903
20904 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
20905             Jason Merrill  <jason@yorick.cygnus.com>
20906
20907         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
20908
20909 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
20910
20911         * exception.cc (__throw_bad_typeid): Add missing std::.
20912
20913 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
20914
20915         * cp-tree.h (make_thunk): PROTO -> PARAMS.
20916
20917 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
20918
20919         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
20920
20921         Runtime support for new-abi rtti.
20922         * inc/typeinfo (type_info::operator!=): Define in class.
20923         (type_info::before, type_info::name, type_info::operator==,
20924         type_info::operator!=): Define new ABI implementations.
20925         (type_info::is_pointer_p, type_info::is_function_p): Declare
20926         new virtual functions.
20927         (type_info::do_catch, type_info::do_upcast): Likewise.
20928
20929         * tinfo.h (__base_class_info): Define new class.
20930         (__class_type_info): Likewise.
20931         (__si_class_type_info): Likewise.
20932         (__vmi_class_type_info): Likewise.
20933         (__dynamic_cast): Prototype.
20934
20935         * tinfo.cc: Conditionalize old and new rtti mechanisms.
20936         (type_info::is_pointer_p): Define new function.
20937         (type_info::is_function_p): Likewise.
20938         (type_info::do_catch): Likewise.
20939         (type_info::do_upcast): Likewise.
20940         (vtable_prefix): New structure for vtable access.
20941         (adjust_pointer): Define new template function.
20942         (contained_p, public_p, virtual_p, contained_public_p,
20943         contained_nonpublic_p, contained_nonvirtual_p): Define new
20944         functions.
20945         (nonvirtual_base_type): New local variable.
20946         (__class_type_info::~__class_type_info): Define.
20947         (__si_class_type_info::~__si_class_type_info): Likewise.
20948         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
20949         (__class_type_info::do_catch): Define new function.
20950         (__class_type_info::do_upcast): Likewise.
20951         (__class_type_info::find_public_src): Likewise.
20952         (__class_type_info::do_find_public_src): Likewise.
20953         (__si_class_type_info::do_find_public_src): Likewise.
20954         (__vmi_class_type_info::do_find_public_src): Likewise.
20955         (__class_type_info::do_dyncast): Likewise.
20956         (__si_class_type_info::do_dyncast): Likewise.
20957         (__vmi_class_type_info::do_dyncast): Likewise.
20958         (__class_type_info::do_upcast): Likewise.
20959         (__si_class_type_info::do_upcast): Likewise.
20960         (__vmi_class_type_info::do_upcast): Likewise.
20961         (__dynamic_cast): Likewise.
20962
20963         * tinfo2.cc (__fundamental_type_info): Define new class.
20964         (__pointer_type_info): Likewise.
20965         (__reference_type_info): Likewise.
20966         (__array_type_info): Likewise.
20967         (__function_type_info): Likewise.
20968         (__enum_type_info): Likewise.
20969         (__ptr_to_member_type_info): Likewise.
20970         (__fundamental_type_info::~__fundamental_type_info): Define.
20971         (__pointer_type_info::~__pointer_type_info): Likewise.
20972         (__reference_type_info::~__reference_type_info): Likewise.
20973         (__array_type_info::~__array_type_info): Likewise.
20974         (__function_type_info::~__function_type_info): Likewise.
20975         (__enum_type_info::~__enum_type_info): Likewise.
20976         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
20977         (__pointer_type_info::do_catch): Define new function.
20978         (__ptr_to_member_type_info::do_catch): Define new function.
20979
20980         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
20981         (__is_pointer): Likewise.
20982
20983         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
20984
20985 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
20986
20987         * cp/class.c (build_vtable): Rename to build_primary_vtable.
20988         (prepare_fresh_vtable): Rename to build_secondary_vtable.
20989         (make_new_vtable): New function.
20990         (modify_vtable_entry): Handle generation of new vtables correctly.
20991         (modify_one_vtable): Remove unused parameter.
20992         (dfs_fixup_vtable_deltas): Likewise.
20993         (override_one_vtable): Use build_secondary_vtable.
20994         (finish_struct_1): Use build_primary_vtable and
20995         build_secondary_vtable.
20996
20997 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
20998
20999         * cp/decl.c: Adjust variable names, comments, help strings.
21000
21001 2000-01-29  Nathan Sidwell  <nathan@acm.org>
21002
21003         * new2.cc (operator delete[]): Use operator delete, don't assume
21004         implementation.
21005
21006 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
21007
21008         * class.c (build_vtbl_initializer): Add argument to
21009         build_vtable_entry call.
21010
21011 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
21012
21013         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
21014         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
21015         (BF_DELTA): New macro.
21016         (BF_VCALL_INDEX): Likewise.
21017         (BF_FN): Likewise.
21018         (THUNK_VCALL_OFFSET): Likewise.
21019         (make_thunk): Change prototype.
21020         * class.c (build_vtable_entry): Integrate
21021         build_vtable_entry_for_fn.  Handle vcall indices.
21022         (build_vtable_entry_for_fn): Remove.
21023         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
21024         BF_VCALL_INDEX, BF_FN.
21025         (modify_vtable_entry): Integrate common code from
21026         modify_one_vtable and dfs_fixup_vtable_deltas.
21027         (add_virtual_function): Set BF_VCALL_INDEX.
21028         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
21029         and BF_FN.
21030         (modify_one_vtable): Simplify.
21031         (dfs_fixup_vtable_deltas): Likewise.
21032         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
21033         * method.c (make_thunk): Handle vcall indices.
21034
21035 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
21036
21037         Compiler side new abi rtti (not enabled).
21038         * cp-tree.h (new_abi_rtti_p): New macro.
21039         (emit_support_tinfos): Prototype new function.
21040         (tinfo_decl_p): Likewise.
21041         (emit_tinfo_decl): Likwise.
21042         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
21043         macros.
21044         (doing_runtime): New local static.
21045         (init_rtti_processing): Add new-abi initializer.
21046         (get_tinfo_decl): Add new-abi logic.
21047         (tinfo_from_decl): Likewise.
21048         (build_dynamic_cast_1): Likewise.
21049         (qualifier_flags): New static function.
21050         (tinfo_base_init): Likewise.
21051         (generic_initializer): Likewise.
21052         (ptr_ref_initializer): Likewise.
21053         (ptmd_initializer): Likewise.
21054         (class_hint_flags): Likewise.
21055         (class_initializer): Likewise.
21056         (synthesize_tinfo_var): Likewise.
21057         (create_real_tinfo_var): Likewise.
21058         (create_pseudo_type_info): Likewise.
21059         (get_vmi_pseudo_type_info): Likewise.
21060         (create_tinfo_types): Likewise.
21061         (emit_support_tinfos): New global function.
21062         (tinfo_decl_p): New global predicate.
21063         (emit_tinfo_decl): New global function.
21064         * class.c (set_rtti_entry): Generalize for old and new rtti.
21065         (build_vtbl_initializer): Likewise.
21066         * decl2.c (finish_file): Likewise.
21067
21068 2000-01-27  Jim Wilson  <wilson@cygnus.com>
21069
21070         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
21071         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
21072
21073 2000-01-27  Mike Stump  <mrs@wrs.com>
21074
21075         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
21076         for scopes.
21077
21078 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
21079
21080         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
21081
21082 2000-01-26  J"orn Rennecke <amylaar@cygnus.co.uk>
21083
21084         * optimize.c (calls_setjmp_r): Supply new argument
21085         to special_function_p.
21086
21087 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
21088
21089         * call.c: PROTO -> PARAMS.
21090         * class.c: Likewise.
21091         * cp-tree.h: Likewise.
21092         * cvt.c: Likewise.
21093         * decl.c: Likewise.
21094         * decl.h: Likewise.
21095         * decl2.c: Likewise.
21096         * dump.c: Likewise.
21097         * errfn.c: Likewise.
21098         * error.c: Likewise.
21099         * except.c: Likewise.
21100         * expr.c: Likewise.
21101         * init.c: Likewise.
21102         * input.c: Likewise.
21103         * lex.c: Likewise.
21104         * lex.h: Likewise.
21105         * method.c: Likewise.
21106         * optimize.c: Likewise.
21107         * parse.y: Likewise.
21108         * pt.c: Likewise.
21109         * repo.c: Likewise.
21110         * rtti.c: Likewise.
21111         * search.c: Likewise.
21112         * semantics.c: Likewise.
21113         * spew.c: Likewise.
21114         * tree.c: Likewise.
21115         * typeck.c: Likewise.
21116         * typeck2.c: Likewise.
21117         * xref.c: Likewise.
21118
21119 2000-01-25  Richard Henderson  <rth@cygnus.com>
21120
21121         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
21122
21123 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
21124
21125         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
21126         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
21127         (struct vcall_offset_data_s): New type.
21128         (dfs_vcall_offset_queue_p): New function.
21129         (dfs_build_vcall_offset_vtbl_entries): Likewise.
21130         (build_vcall_offset_vtbl_entries): Likewise.
21131         (layout_vtable_decl): Likewise.
21132         (num_vfun_entries): Likewise.
21133         (num_extra_vtbl_entries): Add the entries for vcall offsets.
21134         (build_vtbl_initializer): Likewise.
21135         (dfs_finish_vtabls): Use layout_vtable_decl.
21136         (modify_one_vtables): Always duplicate vtables under the new ABI.
21137         (finish_struct_1): Use layout_vtable_decl.
21138
21139 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
21140
21141         * decl.c (member_function_or_else): Change third arg from a format
21142         specifier to an `enum overload_flags'.  Callers changed.
21143
21144 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
21145
21146         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
21147         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
21148         build_const_cast, get_delta_difference, check_return_expr): Avoid
21149         ANSI string concatenation usage.
21150
21151 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
21152
21153         * class.c (layout_class_type): Put the fields required to make a
21154         class non-empty at the end, not the beginning, of the TYPE_FIELDs
21155         list.
21156
21157 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
21158
21159         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
21160         template.
21161
21162         * decl2.c (mark_used): Do instantiate inlines that have been
21163         explicitly instantiated.
21164
21165 2000-01-24  Richard Henderson  <rth@cygnus.com>
21166
21167         * call.c (build_over_call): Use expand_tree_builtin.
21168         * typeck.c (build_function_call_real): Likewise.
21169         (build_binary_op_nodefault): Handle unordered compares.
21170
21171 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
21172
21173         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
21174         cp_tree_index values.
21175         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
21176         New global node #defines for them.
21177         * rtti.c (call_void_fn): Replace with ...
21178         (build_runtime_decl): ... new static function.
21179         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
21180         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
21181         (build_dynamic_cast_1): Always produce correctly typed result.
21182         Explicitly produce type_info addresses. Use dynamic_cast_node.
21183         * exception.cc (__throw_bad_cast): Return `void *'.
21184         (__throw_bad_typeid): Return `const type_info &'.
21185
21186 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
21187
21188         * cp-tree.h (get_vtable_decl): Prototype new function.
21189         * class.c (get_vtable_decl): New function. Broken out from ...
21190         (build_vtable): ... here. Use it.
21191         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
21192         by get_vtable_decl.
21193
21194 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
21195
21196         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
21197         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
21198         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
21199         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
21200         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
21201         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
21202         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
21203         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
21204         (CPTI_TINFO_VAR_ID): New enumeration.
21205         (__tp_desc_type_node, __access_mode_type_node,
21206         __bltn_desc_type_node, __user_desc_type_node,
21207         __class_desc_type_node, __ptr_desc_type_node,
21208         __attr_desc_type_node, __func_desc_type_node,
21209         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
21210         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
21211         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
21212         enum_desc_type_node, class_desc_type_node,
21213         si_class_desc_type_node, vmi_class_desc_type_node,
21214         ptmd_desc_type_node, base_desc_type_node): New #defines.
21215         (tinfo_fn_id, tinfo_fn_type): Rename to ...
21216         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
21217         (tinfo_var_id): New enumeration.
21218         (DECL_TINFO_FN_P): Augment comment.
21219         * decl.c (cp_global_trees): Adjust documentation.
21220         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
21221         tinfo_decl_type and tinfo_var_id.
21222         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
21223         (build_typeid): Remove unused variable.
21224         (get_tinfo_var): Use tinfo_var_id.
21225         (tinfo_name): New static function.
21226         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
21227         (tinfo_from_decl): Likewise.
21228         (get_base_offset): New static function, broken out of
21229         expand_class_desc.
21230         (expand_si_desc): Use tinfo_name.
21231         (expand_class_desc): Likewise. Lose local static variable.
21232         Use base_desc_type_node. Use get_base_offset.
21233         (expand_ptr_desc): Use tinfo_name.
21234         (expand_attr_desc): Likewise.
21235         (expand_generic_desc): Likewise.
21236
21237         * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
21238         * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
21239
21240 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
21241
21242         * cp-tree.h (__eprintf): Remove declaration.
21243         * tree.c (__eprintf): Remove definition.
21244
21245 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
21246             Mark Mitchell  <mark@codesourcery.com>
21247
21248         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
21249         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
21250
21251 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
21252
21253         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
21254
21255 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
21256
21257         * cp-tree.h (register_dtor_fn): New function.
21258         * decl.c (destroy_local_static): Rename to ...
21259         (register_dtor_fn): ... this.  Give it external linkage.
21260         (expand_static_init): Use it.
21261         * decl2.c (do_static_initialization): Likewise, if using
21262         __cxa_atexit.
21263         (do_static_destruction): Check that __cxa_atexit is not in use.
21264         (finish_file): Don't call do_static_destruction if using
21265         __cxa_atexit.
21266
21267         * typeck.c (convert_arguments): Restore two-message error
21268         reporting.
21269
21270 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
21271
21272         Remap dynamic cast hint values to be consistent across ABIs.
21273         * search.c (dynamic_cast_base_recurse): Remap generated value.
21274         (get_dynamic_cast_base_type): Adjust documentation.
21275         * tinfo.h (__user_type_info::dyncast): Likewise.
21276         (__user_type_info::find_public_subobj): Remap BOFF meaning.
21277         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
21278         (__class_type_info::do_dyncast): Likewise.
21279         (__class_type_info::do_find_public_subobj): Likewise.
21280         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
21281
21282 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
21283
21284         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
21285
21286         * typeck2.c (incomplete_type_error): Restore previous
21287         cp_error and cp_error_at call sequence.
21288
21289 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
21290
21291         * class.c (dump_class_hierarchy): Make format agree with argument;
21292         cast pointer to unsigned long and print with %lx.
21293
21294 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
21295
21296         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
21297
21298         * typeck.c (composite_pointer_type, common_type,
21299         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
21300         build_function_call_real, convert_arguments,
21301         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
21302         build_unary_op, mark_addressable, build_compound_expr,
21303         build_static_cast, build_reinterpret_cast, build_const_cast,
21304         build_c_cast, build_modify_expr, get_delta_difference,
21305         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
21306         'ISO C++'.  Fusion consecutive calls to diagnostic message routines
21307         into a single one.
21308         * typeck2.c (readonly_error, abstract_virtuals_error,
21309         process_init_constructor, check_for_new_type): Likewise.
21310
21311 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
21312
21313         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
21314         VAR_DECLs.
21315
21316 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
21317
21318         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
21319         (build_x_typeid): Likewise.
21320         (get_tinfo_fn): Likewise.
21321         (get_tinfo_fn_unused): Rename to ...
21322         (get_tinfo_decl): ... here.
21323         * rtti.c (build_headof): Replace logic error with assertion.
21324         (get_tinfo_fn_dynamic): Rename to ...
21325         (get_tinfo_decl_dynamic): ... here. Make static. Use
21326         complete_type_or_else.
21327         (build_x_typeid): Move into ...
21328         (build_typeid): ... here. Adjust call to
21329         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
21330         throw_bad_typeid expression.
21331         (get_tinfo_fn_unused): Rename to ...
21332         (get_tinfo_decl): ... here. Adjust comment.
21333         (get_tinfo_fn): Delete.
21334         (tinfo_from_decl): New static function.
21335         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
21336         (get_typeid): Use complete_type_or_else.
21337         (build_dynamic_cast_1): Adjust calls to
21338         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
21339         * parse.y (primary): Adjust call to build_typeid.
21340         * except.c (build_eh_type_type_ref): Adjust call to
21341         get_tinfo_decl. Mark as used.
21342         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
21343         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
21344         * parse.c: Regenerated.
21345
21346 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
21347
21348         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
21349         calling convention.
21350         (resolves_to_fixed_type_p): Document calling convention.
21351         * rtti.c (build_x_typeid): Initialize NONNULL.
21352
21353         * cp-tree.h (build_shared_int_cst): New function.
21354         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
21355         * class.c (modify_vtable_entry): Likewise.
21356         (add_virtual_function): Split out code to generated shared
21357         INTEGER_CSTs to build_share_int_cst.
21358         (modify_all_vtables): Handle all the overridden functions here.
21359         Add overridden functions from non-primary virtual bases to the
21360         primary vtable.
21361         (finish_struct_1): Adjust call to modify_all_vtables.  Add
21362         overridden functions from non-primary bases to the vtable.
21363         * tree.c (build_shared_int_cst): New function.
21364
21365         * cp-tree.h (scratchalloc): Remove.
21366         (build_scratch_list): Likewise.
21367         * call.c (convert_class_to_reference): Replace build_scratch_list
21368         and build_expr_list with build_tree_list.
21369         (add_candidate): Replace scratchalloc with expralloc.  Note memory
21370         leak.
21371         (build_user_type_conversion_1):  Replace build_scratch_list
21372         and build_expr_list with build_tree_list.
21373         (build_new_op): Likewise.
21374         (build_op_delete_call): Likewise.
21375         (convert_like): Likewise.
21376         * cvt.c (ocp_convert): Likewise.
21377         * decl.c (start_decl): Likewise.
21378         (start_function): Likewise.
21379         (finish_destructor_body): Likewise.
21380         (maybe_build_cleanup_1): Likewise.
21381         * decl2.c (reparse_decl_as_expr): Likewise.
21382         * init.c (perform_member_init): Likewise.
21383         (expand_cleanup_for_base): Likewise.
21384         (build_builtin_delete_call): Likewise.
21385         (build_new_1): Likewise.
21386         (build_delete): Likewise.
21387         * method.c (do_build_assign_ref): Likewise.
21388         * parse.y (already_scoped_stmt): Likewise.
21389         (nontrivial_exprlist): Likewise.
21390         (net_initializer): Likewise.
21391         (initlist): Likewise.
21392         * parse.c: Regenerated.
21393         * rtti.c (build_x_typeid): Likewise.
21394         (build_dynamic_cast_1): Likewise.
21395         * typeck.c (build_x_compound_expr): Likewise.
21396         (build_static_cast): Likewise.
21397         (build_modify_expr): Likewise.
21398
21399         * cp-tree.h (DECL_VINDEX): Add documentation.
21400         * class.c (build_vtable_entry): Likewise.
21401         (start_vtable): Add comment.
21402         (add_virtual_function): Replace pending_hard_virtuals with
21403         overridden_virtuals and pending_virtuals with new_virtuals.
21404         Replace redundant assignments with assertions.
21405         (check_for_override): Add comment.
21406         (check_bases_and_members): Replace pending_hard_virtuals with
21407         overridden_virtuals and pending_virtuals with new_virtuals.
21408         (create_vtbl_ptr): Likewise.
21409         (layout_class_type): Likewise.
21410         (finish_struct_1): Likewise.  Add comments.
21411
21412 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
21413
21414         * class.c (finish_struct_1): Replace redundant code with
21415         assertions.
21416
21417         * cp-tree.h (flag_new_abi): Move.
21418         (flag_use_cxa_atexit): Likewise.
21419         (flag_honor_std): Likewise.
21420         (flag_rtti): Likewise.
21421         (vbase_offsets_in_vtable_p): Define.
21422         (vptrs_present_everywhere_p): Likewise.
21423         (TYPE_CONTAINS_VPTR_P): Likewise.
21424         (dfs_walk_real): Declare.
21425         * class.c (build_vbase_pointer_fields): Check
21426         vbase_offsets_in_vtable_p.
21427         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
21428         BINFO_VPTR_FIELD.
21429         (build_vbase_offset_vtbl_entries): Simplify.
21430         (build_vbase_offset_vtbl_entries): Adjust.
21431         (build_vbase_pointer): Add ability to look up vbase offsets in
21432         vtable.
21433         (start_vtable): New function.
21434         (add_virtual_function): Use it.
21435         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
21436         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
21437         (build_vtbl_initializer): Take the type of the complete object as
21438         input.  Use it to correctly calculate vbase offsets.
21439         (dfs_finish_vtbls): Pass the complete type to
21440         build_vtbl_initializer.
21441         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
21442         (create_vtable_ptr): Create a vtable even if there are no
21443         new virtual functions, under the new ABI.
21444         (finish_struct_1): Likewise.
21445         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
21446         * decl.c (exapnd_static_init): Remove call to
21447         preserve_initializer.
21448         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
21449         vtables.
21450         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
21451         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
21452         (construct_virtual_bases): Don't initialize virtual base pointers
21453         under the new ABI.
21454         (build_aggr_init): Clean up comment.
21455         (expand_aggr_init_1): Likewise.
21456         * rtti.c (expand_class_desc): Store the virtual function table
21457         index where the vbase offset lives in the offset field.
21458         * search.c (dfs_walk_real): Make it global.
21459         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
21460         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
21461
21462         * tinfo.h (USItype): Make it signed under the new ABI.
21463         * tinfo.cc (convert_to_base): New function.  Encapsulate base
21464         conversion logic here.
21465         (__class_type_info::do_upcast): Use it.
21466         (__class_type_info::do_dyncast): Likewise.
21467         (__class_type_info::do_find_public_subobj): Likewise.
21468
21469         * init.c (construct_virtual_bases): Don't look up the addresses of
21470         virtual bases at run-time.
21471
21472         * class.c (build_vbase_pointer): Relocate.
21473         (build_vbase_pointer_fields): Likewise.
21474         (dfs_build_vbase_offset_vtbl_entries): Likewise.
21475         (build_vbase_offset_vtbl_entries): Likewise.
21476
21477         * decl.c (init_decl_processing): Complain if -fnew-abi
21478         -fno-vtable-thunks is used.
21479
21480         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
21481         flag_new_abi.
21482
21483 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
21484
21485         * cp-tree.h (num_extra_vtbl_entries): New function.
21486         (size_extra_vtbl_entries): Likewise.
21487         (dfs_vtable_path_unmark): Likewise.
21488         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
21489         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
21490         * class.c (num_extra_vtbl_entries): New function.
21491         (size_extra_vtbl_entries): Likewise.
21492         (dfs_build_vbase_offset_vtbl_entries): New function.
21493         (build_vbase_offset_vtbl_entries): Likewise.
21494         (build_vtbl_initializer): Use it.
21495         (finish_struct_1): Adjust vtable sizes (using
21496         num_extra_vtbl_entries).
21497         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
21498         THUNK_DECL is non-NULL before expanding it.
21499         * init.c (expand_virtual_init): Adjust the vtable pointer by
21500         size_extra_vtbl_entries before storing it.
21501         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
21502         Handle TREE_LIST parameters here, not in the dfs_* functions.
21503         (dfs_unmarked_real_bases_queue_p): Adjust.
21504         (dfs_marked_real_bases_queue_p): Likewise.
21505         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
21506         (dfs_vtable_path_marked_real_bases_queue_p): New function.
21507         (dfs_vtable_path_unmark): Likewise.
21508
21509 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
21510
21511         * optimize.c (copy_body_r): Clear the operand three of a
21512         TARGET_EXPR when copying it.
21513
21514 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
21515
21516         * method.c (build_decl_overload_real): Check whether we are in ::
21517         before returning __builtin_new/delete.
21518
21519 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
21520
21521         * pt.c (tsubst_friend_function): Improve comment.
21522         (instantiate_decl): Avoid crashing when a "nested" function is
21523         instantiated from the top level.
21524
21525         * dump.c (dqeueue_and_dump): Dump
21526         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
21527
21528 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
21529
21530         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
21531
21532 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
21533
21534         * g++spec.c (lang_specific_driver): Add -fnew-abi if
21535         ENABLE_NEW_GXX_ABI defined.
21536         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
21537         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
21538         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
21539
21540 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
21541
21542         * decl.c (start_cleanup_fn): Call pushdecl.
21543
21544         * call.c (convert_class_to_reference): Fix typos.
21545         (build_conditional_expr): Handle errors gracefully.
21546         * class.c (push_nested_class): Likewise.
21547         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
21548         (DECL_THIS_EXTERN): Use it.
21549         (DECL_THIS_STATIC): Likewise.
21550         * cvt.c (convert_to_void): Handle errors gracefully.
21551         (build_expr_type_conversion): Likewise.
21552         * decl.c (maybe_push_decl): Likewise.
21553         (start_decl_1): Likewise.
21554         (require_complete_types_for_parms): Likewise.
21555         * parse.y (structsp): Likewise.
21556         (base_class): Likewise.
21557         * parse.c: Regenerated.
21558         * pt.c (finish_member_template_decl): Likewise.
21559         * typeck.c (decay_conversion): Likewise.
21560
21561         * cp-tree.h (dfs_skip_vbases): New function.
21562         (find_vbase_instance): Likewise.
21563         * class.c (determine_primary_base): Allow a nearly empty base to
21564         serve as a primary base class under the new ABI.
21565         (get_class_offset_1): Rename to ...
21566         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
21567         messages here.
21568         (get_class_offset): Use it.  Issue error messages here.
21569         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
21570         find the right copies of virtual bases.
21571         (fixup_vtable_deltas1): Rename to ...
21572         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
21573         bases as primary bases.
21574         (fixup_vtable_deltas): Remove.
21575         (override_one_vtable): Handle virtual bases as primary bases.
21576         (merge_overrides): Likewise.
21577         (finish_struct_1): Likewise.
21578         (dump_class_hierarchy): Dump primary-ness of bases as well.
21579         * search.c (mark_primary_bases): Use a pre-order traversal to
21580         handle primary virtual bases.
21581         (dfs_skip_vbases): New fiunction.
21582         (expand_upcast_fixups): Adjust to handle primary virtual bases.
21583         (fixup_virtual_upcast_offsets): Likewise.
21584         (fixup_all_virtual_upcast_offsets): Likewise.
21585         (dfs_find_vbase_instances): New function.
21586         (find_vbase_instance): Likewise.
21587
21588 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
21589
21590         * lex.c (DIR_SEPARATOR): Delete macro.
21591
21592 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
21593
21594        * decl2.c (lang_decode_option): Handle automatic line wrapping
21595        option.
21596
21597 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
21598
21599         * friend.c (do_friend): Don't resolve scopes when processing
21600         template declarations, even if the qualifying scope doesn't
21601         involve template parameters.
21602
21603 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
21604
21605         * class.c (dfs_modify_vtables_queue_p): Remove.
21606         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
21607         and dfs_marked_real_bases_queue_p instead of
21608         dfs_modify_vtables_queue_p.
21609
21610         * class.c (build_vbase_path): Simplify.
21611         (dfs_propagate_binfo_offsets): New function.
21612         (propagate_binfo_offsets): Use it.
21613         (remove_base_field): Simplify.
21614         (dfs_set_offset_for_vbases): Remove.
21615         (dfs_set_offset_for_shared_vbases): New function.
21616         (dfs_set_offset_for_unshared_vbases): Likewise.
21617         (layout_virtual_bases): Use them.
21618         (layout_basetypes): Don't call propagate_binfo_offsets.
21619         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
21620         for the vbases.
21621
21622         * class.c (build_base_field): New function, split out from ...
21623         (build_base_fields): ... here.  Use it.  Allocate primary bases
21624         first, under the new ABI.
21625         (get_vtable_entry): Remove.
21626         (remove_base_field): New function, split out from ...
21627         (remove_base_fields): ... here.  Adjust since primary bases come
21628         first under the new ABI.
21629
21630         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
21631         (initialize_vtbl_ptrs): New function.
21632         (expand_indirect_vtbls_init): Change prototype.
21633         (convert_pointer_to_vbase): Declare.
21634         * init.c (expand_direct_vtbls_init): Remove.
21635         (dfs_initialize_vtbl_ptrs): New function.
21636         (initialize_vtbl_ptrs): Likewise.
21637         (emit_base_init): Use initialize_vtbl_ptrs.
21638         * search.c (convert_pointer_to_vbase): Make it global.
21639         (expand_indirect_vtbls_init): Remove vtable initialization code.
21640         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
21641
21642         * class.c (dfs_finish_vtbls): New function.
21643         (finish_vtbls): Use it.
21644         (dump_class_hierarchy): New function.
21645
21646         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
21647         (BINFO_VBASE_PRIMARY_P): New macro.
21648         (BINFO_VIRTUALS): Add to documentation.
21649         (SET_BINFO_PRIMARY_MARKED_P): Remove.
21650         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
21651         (dfs_mark_primary_bases_queue_p): Likewise.
21652         (dfs_unmarked_real_bases_queue_p): New function.
21653         (dfs_marked_real_bases_queue_p): Likewise.
21654         * search.c (dfs_mark_primary_bases): Adjust.
21655         (mark_primary_bases): Likewise.
21656         (get_shared_vbase_if_not_primary): New function.
21657         (dfs_unmarked_real_bases_queue_p): Likewise.
21658         (dfs_marked_real_bases_queue_p): Likewise.
21659         (dfs_get_pure_virtuals): Simplify.
21660         (get_pure_virtuals): Likewise.
21661
21662 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
21663
21664         * lex.c: Include tm_p.h.
21665
21666 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
21667
21668         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
21669
21670 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
21671
21672         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
21673         * pt.c (instantiate_decl): Defer comdat templates that might not be
21674         needed.
21675
21676         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
21677         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
21678         (finish_file): Likewise.
21679
21680         * decl2.c (import_export_class): Undo 12/14 change.
21681
21682         * error.c (dump_decl): operator new, not operatornew.
21683
21684         * class.c (field_decl_cmp): A nontype is "greater" than a type.
21685         * search.c (lookup_field_1): Look for the last field with the
21686         desired name.
21687
21688 2000-01-05  Nathan Sidwell  <nathan@acm.org>
21689
21690         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
21691         FUNCTION_DECL.
21692
21693 2000-01-05  Nathan Sidwell  <nathan@acm.org>
21694
21695         * typeck.c (build_static_cast): Don't strip target qualifiers
21696         when casting from a class.
21697
21698 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
21699
21700         * class.c (warn_hidden): Initialize variable `fndecl'.
21701
21702 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
21703
21704         * decl.c (flag_isoc9x): New variable to be able to use code in
21705         c-common.c.  For now always zero.
21706
21707 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
21708
21709         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
21710         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
21711         or unshare_base_binfos for virtual bases here.
21712         * search.c (dfs_get_vbase_types): Do it here.
21713         (get_vbase_types): Adjust.
21714
21715 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
21716
21717         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
21718         (BINFO_PRIMARY_MARKED_P): Use flag 5.
21719         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
21720         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
21721         (unmark_primary_bases): Remove declaration.
21722         (unmarkedp): Declare.
21723         (dfs_vbase_unmark): Likewise.
21724         * class.c (determine_primary_base): Return immediately if there
21725         are no base classes.  Call mark_primary_bases here.
21726         (modify_all_direct_vtables): Remove.
21727         (modify_all_indirect_vtables): Remove.
21728         (dfs_modify_vtables_queue_p): New function.
21729         (dfs_modify_vtables): New function.
21730         (modify_all_vtables): Use them.
21731         (build_base_fields): Build FIELD_DECLs for primary virtual base
21732         classes.
21733         (create_vtable_ptr): Don't call determine_primary_base here.
21734         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
21735         (dfs_set_offset_for_vbases): ... this.
21736         (layout_virtual_bases): Use it.
21737         (layout_class_type): Call determine_primary_base here.
21738         * search.c (unmarkedp): Make it global.
21739         (shared_marked_p): Simplify.
21740         (shared_unmarked_p): Likewise.
21741         (dfs_primary_bases_queue_p): Remove.
21742         (dfs_unmark_primary_bases): Likewise.
21743         (unmark_primary_bases): Likewise.
21744         (mark_primary_bases): Simplify.
21745         (get_pure_virtuals): Don't call mark_primary_bases here.
21746         (dfs_vbase_unmark): New function.
21747         (get_vbase_types): Simplify.
21748
21749         * class.c (struct base_info): Remove.
21750         (determine_primary_base): Take has_virtual_p rather than a
21751         base_info as input.  Don't calculate max_has_virtual.
21752         (finish_struct_bits): Remove max_has_virtual argument.
21753         (create_vtable_ptr): Remove max_has_virtual_p argument.
21754         (layout_virtual_bases): Remove max argument.
21755         (layout_basetypes): Likewise.
21756         (layout_class_type): Remove max_has_virtual_p argument.
21757         (finish_struct_1): Remove max_has_virtual.
21758
21759         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
21760         (layout_basetypes): Remove.
21761         * class.c (propagate_binfo_offsets): Moved here from tree.c.
21762         Update to handle primary virtual bases.
21763         (remove_base_fields): New function, split out from
21764         layout_basetypes.
21765         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
21766         (layout_virtual_bases): New function, split out from
21767         layout_basetypes.  Update to handle primary virtual bases.
21768         (layout_basetypes): Moved here from tree.c.  Use
21769         remove_base_fields and layout_virtual_bases.
21770         * search.c (dfs_mark_primary_bases_queue_p): New function.
21771         (mark_primary_bases): Use it.
21772         * tree.c (CEIL): Remove.
21773         (propagate_binfo_offsets): Remove.
21774         (layout_basetypes): Remove.
21775
21776 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
21777
21778         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
21779         (BINFO_PRIMARY_MARKED_P): New macro.
21780         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
21781         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
21782         (mark_primary_bases): New function.
21783         (unmark_primary_bases): Likewise.
21784         * search.c (get_abstract_virtuals_1): Remove.
21785         (dfs_mark_primary_bases): New function.
21786         (mark_primary_bases): Likewise.
21787         (dfs_unmark_primary_bases): Likewise.
21788         (unmark_primary_bases): Likewise.
21789         (dfs_get_pure_virtuals): Likewise.
21790
21791 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
21792
21793         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
21794         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
21795         (modify_one_vtable): Adjust.
21796         (fixup_vtable_deltas1): Likewise.
21797         (override_one_vtable): Likewise.
21798         * search.c (get_abstract_virtuals_1): Likewise.
21799         (get_pure_virtuals): Likewise.
21800         (expand_upcast_fixups): Likewise.
21801         * tree.c (debug_binfo): Likewise.
21802
21803         * class.c (build_vtable): Don't return a value.  Don't rebuild
21804         vtables for bases that have already been handled.
21805         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
21806         already been handled.
21807         (modify_one_vtable): Adjust accordingly.
21808         (fixup_vtable_deltas1): Likewise.
21809         (finish_struct_1): Likewise.
21810
21811 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
21812
21813         * call.c (build_new_method_call): Also check destructors.