OSDN Git Service

PR c++/9868
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2003-03-10  Jason Merrill  <jason@redhat.com>
2
3         PR c++/9868
4         * call.c (resolve_scoped_fn_name): Handle the case of a function
5         pointer member.
6
7         * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
8         argument in the pointer-to-member case.
9
10 2003-03-09  Mark Mitchell  <mark@codesourcery.com>
11
12         PR c++/9373
13         * cp-lang.c (cxx_get_alias_set): Use alias set zero for
14         pointers to member functions.
15
16         PR c++/8534
17         * decl.c (build_ptrmemfunc_type): Do not allow default arugments
18         in pointer-to-member-function types.
19
20 2003-03-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
21
22         * expr.c (cplus_expand_constant): Use C90 prototype style.
23         (cxx_expand_expr): Likewise.
24
25 2003-03-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
26
27         PR c++/9970
28         * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
29         functions.
30
31 2003-03-08  Geoffrey Keating  <geoffk@apple.com>
32
33         * lang-specs.h (c++-header): Change .pch to .gch.
34
35 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
36
37         * cp-tree.h (cxx_init): Update prototype.
38         * lex.c (cxx_init): Similarly.
39
40 2003-03-08  Mark Mitchell  <mark@codesourcery.com>
41
42         PR c++/9823
43         * cp-tree.h (begin_mem_initializers): Remove.
44         * parser.c (cp_parser_mem_initializer_list): Inline it here.
45         Do not call finish_mem_initializers if not in a constructor.
46         (cp_parser_class_head): Fix typo in error message.
47         * semantics.c (begin_mem_initializers): Remove.
48         * testsuite/g++.dg/parser/constructor1.C: New test.
49
50         PR c++/9809
51         * call.c (add_function_candidate): Skip builtin fuctions that have
52         not yet been declared.
53
54         PR c++/9982
55         * init.c (build_new_1): Correct logic for determining whether or
56         not to use an array cookie.
57
58         PR c++/9524
59         * parser.c (cp_parser_postfix_expression): Call
60         finish_non_static_data_member, even when processing_template_decl.
61
62         PR c++/9912
63         * cp-tree.h (is_ancestor): New function.
64         (handle_class_head): Change prototype.
65         * decl2.c (is_namespace_ancestor): Rename to ...
66         (namespace_anecestor): ... this.
67         (set_decl_namespace): Adjust accordingly.
68         (handle_class_head): Remove unncessary parameters.
69         * parser.c (cp_parser_class_head): Check that
70         nested-name-specifiers are used appropriately.
71         
72 2003-03-07  Mark Mitchell  <mark@codesourcery.com>
73
74         * call.c (reference_binding): Remove REF_IS_VAR parameter.
75         (implicit_conversion): Adjust call to reference_binding.
76         (make_temporary_var_for_ref_to_type): Add TYPE parameter.
77         (initialize_reference): Adjust handling for references bound to
78         rvalues.
79         * cp-tree.h (make_temporary_var_for_ref_to_temp): Change
80         prototype.
81         (real_non_cast_lvalue_p): New method.
82         * cvt.c (build_up_reference): Adjust use of
83         make_temporary_var_for_ref_to_temp.
84         * tree.c (real_non_cast_lvalue_p): New method.
85          
86 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
87
88         * except.c (init_exception_processing): Use C90 prototype style.
89         (cp_protect_cleanup_actions): Likewise.
90         (prepare_eh_type): Likewise.
91         (build_eh_type_type): Likewise.
92         (build_exc_ptr): Likewise.
93         (do_begin_catch): Likewise.
94         (dtor_nothrow): Likewise.
95         (do_end_catch): Likewise.
96         (push_eh_cleanup): Likewise.
97         (decl_is_java_type): Likewise.
98         (choose_personality_routine): Likewise.
99         (initialize_handler_parm): Likewise.
100         (expand_start_catch_block): Likewise.
101         (expand_end_catch_block): Likewise.
102         (begin_eh_spec_block): Likewise.
103         (finish_eh_spec_block): Likewise.
104         (do_allocate_exception): Likewise.
105         (do_free_exception): Likewise.
106         (wrap_cleanups_r): Likewise.
107         (stabilize_throw_expr): Likewise.
108         (build_throw): Likewise.
109         (complete_ptr_ref_or_void_ptr_p): Likewise.
110         (is_admissible_throw_operand): Likewise.
111         (nothrow_libfn_p): Likewise.
112         (can_convert_eh): Likewise.
113         (check_handlers_1): Likewise.
114         (check_handlers): Likewise.
115         
116 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
117
118         * call.c (merge_conversion_sequences): New function.
119         (build_conv): Set ICS_USER_FLAG for USER_CONVs.
120         (convert_class_to_reference): Correct handling of second
121         standard conversion sequence in a user-defined conversion
122         sequence.
123         (build_user_type_conversion_1): Use merge_conversion_sequences.
124         * cp-tree.def: Add comments for CONV nodes.
125         * rtti.c (get_tinfo_decl): Use build_address/build_nop.
126         
127 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
128
129         * error.c (init_error): Use C90 prototype style.
130         (dump_scope): Likewise.
131         (dump_qualifiers): Likewise.
132         (dump_template_argument): Likewise.
133         (dump_template_argument_list): Likewise.
134         (dump_template_parameter): Likewise.
135         (dump_template_bindings): Likewise.
136         (dump_type): Likewise.
137         (dump_typename): Likewise.
138         (class_key_or_enum): Likewise.
139         (dump_aggr_type): Likewise.
140         (dump_type_prefix): Likewise.
141         (dump_type_suffix): Likewise.
142         (dump_global_iord): Likewise.
143         (dump_simple_decl): Likewise.
144         (dump_decl): Likewise.
145         (dump_template_decl): Likewise.
146         (dump_function_decl): Likewise.
147         (dump_parameters): Likewise.
148         (dump_exception_spec): Likewise.
149         (dump_function_name): Likewise.
150         (dump_template_parms): Likewise.
151         (dump_char): Likewise.
152         (dump_expr_list): Likewise.
153         (dump_expr): Likewise.
154         (dump_binary_op): Likewise.
155         (dump_unary_op): Likewise.
156         (type_as_string): Likewise.
157         (expr_as_string): Likewise.
158         (decl_as_string): Likewise.
159         (context_as_string): Likewise.
160         (lang_decl_name): Likewise.
161         (cp_file_of): Likewise.
162         (cp_line_of): Likewise.
163         (decl_to_string): Likewise.
164         (expr_to_string): Likewise.
165         (fndecl_to_string): Likewise.
166         (code_to_string): Likewise.
167         (language_to_string): Likewise.
168         (parm_to_string): Likewise.
169         (op_to_string): Likewise.
170         (type_to_string): Likewise.
171         (assop_to_string): Likewise.
172         (args_to_string): Likewise.
173         (cv_to_string): Likewise.
174         (cxx_print_error_function): Likewise.
175         (cp_diagnostic_starter): Likewise.
176         (cp_diagnostic_finalizer): Likewise.
177         (cp_print_error_function): Likewise.
178         (function_category): Likewise.
179         (print_instantiation_full_context): Likewise.
180         (print_instantiation_partial_context): Likewise.
181         (maybe_print_instantiation_context): Likewise.
182         (print_instantiation_context): Likewise.
183         (cp_printer): Likewise.
184         (print_integer): Likewise.
185         (print_non_consecutive_character): Likewise.
186         (locate_error): Likewise.
187
188 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
189
190         PR c++/9965
191         * call.c (reference_binding): Add ref_is_var parameter.
192         (implicit_conversion): Adjust call to reference_binding.
193         (initialize_reference): Likewise.
194
195         PR c++/9400
196         * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
197         PARM_DECLs.
198
199         PR c++/9791
200         * class.c (get_basefndecls): Use lookup_fnfields_1.
201
202 2003-03-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
203
204         PR c++/9188
205         * parser.c (cp_parser_type_parameter): Remove redundant `expect'
206         in error message.
207         (cp_parser_single_declaration): Likewise.
208
209 2003-03-05  Jason Merrill  <jason@redhat.com>
210
211         PR c++/9440
212         * call.c (build_conditional_expr): Use convert rather than an
213         explicit NOP_EXPR.
214
215 2003-03-02  Matt Austern  <austern@apple.com>
216
217         * decl.c (cp_binding_level): Add static_decls varray member.
218         (add_decl_to_level): Add static/inline namespace scope
219         declarations to static_decls array.
220         (wrapup_global_for_namespace): Pass static_decls only, instead of
221         all decls, to wrapup_global_declarations/check_global_declarations.
222         (push_namespace): Initialize static_decls for ordinary namespaces.
223         (cxx_init_decl_processing): Initialize static_decls for global
224         namespace.
225         
226 2003-03-05  Mark Mitchell  <mark@codesourcery.com>
227
228         * class.c (end_of_class): Correct thinko.
229
230 2003-03-04  Nathanael Nerode  <neroden@gcc.gnu.org>
231
232         * config-lang.in: Replace ${libstdcxx_version} by its value.
233
234 2003-03-04  Gabriel Dos Reis <gdr@integrable-solutions.net>
235
236         * cp-tree.h (cxx_saved_binding): Declare.
237         (struct saved_scope): Adjust type of field 'old_binding'.
238         * decl.c (cxx_saved_binding_make): New macro.
239         (struct cxx_saved_binding): Define.
240         (store_bindings): Adjust prototype.  Use cxx_saved_binding to save
241         C++ bindings. 
242         (maybe_push_to_top_level): Adjust local variable type.
243         (pop_from_top_level): Likewise.
244         
245 2003-03-04  Tom Tromey  <tromey@redhat.com>
246
247         * Make-lang.in (c++.tags): New target.
248
249 2003-03-04  Neil Booth  <neil@daikokuya.co.uk>
250
251         * Make-lang.in: Update.
252
253 2003-03-03  Jason Merrill  <jason@redhat.com>
254
255         * decl.c (finish_enum): Do set the type in a template. Simplify.
256         * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
257
258 2003-03-03  Mark Mitchell  <mark@codesourcery.com>
259
260         PR c++/9878
261         * call.c (convert_class_to_reference): Correct conversion
262         sequences.
263         (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
264         (implicit_conversion): Adjust call to reference_binding.
265         (add_candidate): Change type of candidates parameter.
266         (add_function_candidate): Likewise.
267         (add_conv_candidate): Likewise.
268         (build_builtin_candidate): Likewise.
269         (add_builtin_candidate): Likewise.
270         (add_builtin_candidates): Likewise.
271         (add_template_candidate_real): Likewise.
272         (add_template_candidate): Likewise.
273         (add_template_conv_candidate): Likewise.
274         (build_user_type_conversion_1): Adjust accordingly.
275         (build_object_call): Likewise.
276         (build_conditional_expr): Likewise.
277         (add_candidates): Likewise.
278         (build_new_op): Likewise.
279         (convert_like_real): Use USER_CONV_CAND.  Use build_nop.
280         (build_new_method_call): Adjust calls to add_function_candidate.
281         (make_temporary_var_for_ref_to_temp): New function.
282         (initialize_reference): Add decl parameter.
283         * class.c (build_rtti_vtbl_entries): Use build_address and
284         build_nop.
285         * cp-tree.h (initialize_reference): Change prototype.
286         (make_temporary_var_for_ref_to_temp): New function.
287         (build_type_conversion): Change prototype.
288         (build_address): New function.
289         (build_nop): Likewise.
290         * cvt.c (cp_convert_to_pointer): Adjust call to
291         build_type_conversion.  Avoid indicating redundant NOP_EXPRs.
292         Use build_nop.
293         (convert_to_pointer_force): Use build_nop.
294         (build_up_reference): Use make_temporary_var_for_ref_to_temp.
295         (convert_to_reference): Adjust call to build_type_conversion.
296         (ocp_convert): Likewise.
297         (build_type_conversion): Remove for_sure parameter.
298         * decl.c (grok_reference_init): Use initialize_reference.
299         * typeck.c (build_address): New function.
300         (build_nop): Likewise.
301         (build_unary_op): Use them.
302         (build_ptrmemfunc): Tidy slightly.
303         (convert_for_initialization): Adjust call to
304         initialize_reference.
305         * typeck2.c (store_init_value): Remove #if 0'd code.
306         
307 2003-03-03  Jason Merrill  <jason@redhat.com>
308
309         * decl.c (start_function): Clear DECL_NUM_STMTS.
310
311         * class.c (get_vtable_decl): Use vtbl_type_node.
312         (build_primary_vtable): Check for it.
313
314 2003-03-02  Aldy Hernandez  <aldyh@redhat.com>
315
316         * decl.c (check_initializer): Check for vector_opaque_p.
317
318 2003-03-02  Ashif Harji  <asharji@uwaterloo.ca>
319
320         * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
321           invoke an external cpp during compilation.
322
323 2003-03-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
324
325         * decl.c (duplicate_decls): Convert use of warning_with_decl() to
326         that of warning().
327         (start_decl): Likewise.
328         (start_function): Likewise.
329
330 2003-03-01  Neil Booth  <neil@daikokuya.co.uk>
331
332         * Make-lang.in (CXX_C_OBJS): Update.
333
334 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
335
336         PR c++/9892
337         * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
338         instantiating it.
339
340 2003-02-28  Aldy Hernandez  <aldyh@redhat.com>
341
342         * parser.c (cp_parser_init_declarator): Revert opaque
343         vector_opaque_p change.
344         Do not include target.h.
345
346 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
347
348         PR c++/9879
349         * cp-tree.h (build_zero_init): Add parameter.
350         * decl.c (cp_finish_decl): Adjust call.
351         * init.c (build_zero_init): Add nelts parameter.  Adjust recursive
352         calls.
353         (build_default_init): Add nelts parameter.  Adjust calls to
354         build_zero_init.
355         (build_new_1): Adjust call to build_default_init.
356         * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
357         
358 2003-02-26  Devang Patel  <dpatel@apple.com>
359
360         * decl.c (finish_enum): Merge two 'for' loops. Copy value node if required.
361         Postpone enum setting for template decls.
362         (build_enumerator): Delay copying value node until finish_enum (). Remove
363         #if 0'ed code.
364         * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
365         (tsubst_copy): Add check for enum type.
366         
367 2003-02-25  Mark Mitchell  <mark@codesourcery.com>
368
369         PR c++/9683
370         * decl2.c (prune_vars_needing_no_initialization): Do not throw
371         away initializations for DECL_EXTERNAL VAR_DECLs.
372         (finish_file): Adjust accordingly.
373         * pt.c (instantiate_decl): Do not defer VAR_DECLs.
374
375 2003-02-24 Gabriel Dos Reis  <gdr@integrable-solutions.net>
376
377         * decl.c (add_binding): Time TV_NAME_LOOKUP.
378         (push_class_binding): Likewise.
379         (set_namespace_binding): Likewise.
380
381 2003-02-24  Mark Mitchell  <mark@codesourcery.com>
382
383         PR c++/9836
384         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
385         specializations back to the main template.
386         * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
387         * pt.c (resolve_typename_type): Likewise.
388
389 2003-02-24  Jeffrey D. Oldham  <oldham@codesourcery.com>
390
391         PR c++/9778
392         * pt.c (tsubst_copy_and_build): For a templated function inside a
393         scope, process template arguments.
394
395 2003-02-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
396
397         PR c++/9602
398         * typeck2.c (abstract_virtuals_error): Don't check when
399         TYPE is still template parameter dependent.
400
401 2003-02-23  Mark Mitchell  <mark@codesourcery.com>
402
403         PR c++/5333
404         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
405         * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
406         * pt.c (instantiate_class_template): Don't try to instantiate
407         dependent types.
408         (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
409         
410 2003-02-21  Mark Mitchell  <mark@codesourcery.com>
411
412         PR c++/9749
413         * decl.c (grokdeclarator): Do not allow parameters with variably
414         modified types.
415
416 2003-02-21  Nathan Sidwell  <nathan@codesourcery.com>
417
418         * search.c (bfs_walk_grow): Remove. Fold into ...
419         (bfs_walk): ... here, fix fencepost error. Fix merge lossage
420         in previous patch.
421
422 2003-02-20  Mark Mitchell  <mark@codesourcery.com>
423
424         PR c++/9729
425         * mangle.c (mangle_conv_op_name_for_type): Issue an error message
426         when the G++ 3.2 ABI prevents correct compilation.
427
428 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
429
430         Change base class access representation. Share virtual base
431         binfos.
432         * cp/call.c (build_special_member_call): Remove binfo_for_vbase
433         call.
434         * cp/class.c (build_base_path): Likewise.
435         (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
436         (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
437         (make_new_vtable): Adjust.
438         (force_canonical_binfo_r): Delete.
439         (force_canonical_binfo): Delete.
440         (mark_primary_virtual_base): Delete.
441         (dfs_unshared_virtual_bases): Delete.
442         (mark_primary_bases): Adjust.
443         (maybe_warn_about_overly_private_class): Adjust.
444         (dfs_base_derived_from): Delete.
445         (base_derived_from): Follow the inheritance chain.
446         (struct find_final_overrider_data): Add vpath member.
447         (dfs_find_final_overrider): Adjust.
448         (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
449         (find_final_overrider): Adjust.
450         (update_vtable_entry_for_fn): Adjust.
451         (modify_all_vtables): Adjust.
452         (walk_subobject_offsets): Adjust.
453         (layout_nonempty_base_or_field): Adjust.
454         (layout_empty_base): Remove last parameter. Adjust.
455         (build_base_field): Adjust.
456         (build_base_fields): Adjust.
457         (propagate_binfo_offsets): Remove last parameter. Adjust.
458         (dfs_set_offset_for_unshared_vbases): Delete.
459         (layout_virtual_bases): Adjust.
460         (finish_struct_1): Adjust.
461         (init_class_processing): Don't init access nodes.
462         (dfs_get_primary_binfo): Delete.
463         (get_primary_binfo): Adjust.
464         (dump_class_hierarchy_r): Remove most derived arg, add IGO
465         parameter. Adjust.
466         (dump_class_hierarchy): Adjust.
467         (finish_vtbls): Adjust.
468         (get_original_base): Delete.
469         (build_vtt_inits): Adjust.
470         (dfs_build_secondary_vptr_vtt_inits): Adjust.
471         (dfs_ctor_vtable_bases_queue_p): Adjust.
472         (build_ctor_vtbl_group): Adjust.
473         (dfs_accumulate_vtbl_inits): Adjust.
474         (build_vtbl_initializer): Adjust.
475         (build_vbase_offset_vtbl_entries): Adjust.
476         (add_vcall_offset_vtbl_entries_1): Adjust.
477         * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
478         (access_*_node): Remove.
479         (CANONICAL_BINFO): Delete.
480         (BINFO_UNSHARED_MARKED): Remove.
481         (BINFO_MARKED): Set LANG_FLAG_0 directly.
482         (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
483         (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
484         (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
485         Delete.
486         (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
487         (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
488         (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
489         Delete.
490         (BINFO_DEPENDENT_BASE_P): New.
491         (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
492         index.
493         (markedp, unmarkedp): Adjust.
494         (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
495         dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
496         find_vbase_instance, binfo_for_vbase): Delete.
497         (copied_binfo, original_binfo): Declare.
498         (finish_base_specifier): Add virtual_p arg.
499         (unshare_base_binfos): Delete.
500         (copy_base_binfos): Declare.
501         (reverse_path): Delete.
502         * cp/decl.c (xref_basetypes): Access and virtuality passed
503         differently. Don't copy direct base binfos here. Call
504         copy_base_binfos.
505         * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
506         (initialize_vtbl_ptrs): Adjust.
507         (expand_member_init): Adjust.
508         * cp/parser.c (cp_parser_base_specifier): Adjust.
509         * cp/pt.c (instantiate_class_template): Adjust.
510         (get_template_base_recursive): Adjust.
511         * cp/rtti.c (get_pseudo_ti_init): Adjust.
512         (get_pseudo_ti_desc): Adjust.
513         * cp/tree.c (unshare_base_binfos): Rename to ...
514         (copy_base_binfos): ... here, reimplement.
515         (make_binfo): Set BINFO_DEPENDENT_BASE_P.
516         (reverse_path): Remove.
517         * cp/typeck.c (get_delta_difference): Adjust error messages.
518         * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
519         * cp/search.c (lookup_base_r): Adjust.
520         (dynamic_cast_base_recurse): Adjust.
521         (canonical_binfo): Remove.
522         (dfs_canonical_queue): Remove.
523         (dfs_assert_unmarked_p): Remove.
524         (assert_canonical_unmarked): Remove.
525         (shared_marked_p, shared_unmarked_p): Remove.
526         (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
527         (dfs_access_in_type): Adjust.
528         (access_in_type): Adjust.
529         (dfs_accessible_queue_p): Adjust.
530         (dfs_accessible_p): Adjust.
531         (is_subobject_of_p_1, is_subobject_of_p): Remove.
532         (struct lookup_field_info): Remove from_dep_base_p field.
533         (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
534         (lookup_field_r): Remove dependent base code.
535         (lookup_member): Likewise.
536         (dfs_walk, dfs_walk_real): Add access arg to queue fn.
537         (dfs_unmarked_real_bases_queue_p): Remove.
538         (dfs_marked_real_bases_queue_p): Remove.
539         (dfs_skip_vbases): Remove.
540         (dfs_get_pure_virtuals): Adjust.
541         (markedp, unmarkedp): Adjust.
542         (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
543         (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
544         (dfs_unmark): Adjust.
545         (dfs_get_vbase_types):Remove.
546         (dfs_build_inheritance_graph_order): Remove.
547         (get_vbase_types): Remove
548         (dfs_find_vbase_instance): Remove.
549         (find_vbase_instance): Remove.
550         (dfs_debug_unmarkedp): Adjust.
551         (dependent_base_p): Remove.
552         (dfs_push_type_decls): Adjust.
553         (dfs_push_decls): Adjust.
554         (dfs_no_overlap_yet): Adjust.
555         (copied_binfo): New function.
556         (original_binfo): New function.
557         (binfo_for_vbase): Remove.
558
559 2003-02-18  Zack Weinberg  <zack@codesourcery.com>
560
561         * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
562         (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
563         vectors, for speed.
564
565 2003-02-18  Mark Mitchell  <mark@codesourcery.com>
566
567         PR c++/9704
568         * class.c (layout_class_type): In the 3.2 ABI, take into account
569         trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
570
571 2003-02-18  Matt Austern <austern@apple.com>
572         
573         * cp/cp-lang.c: Change lang hooks so that final_write_globals does
574         nothing for C++.
575         * cp/decl.c (wrapup_globals_for_namespace): Remove special
576         handling of global namespace.
577         
578 2003-02-18  Geoffrey Keating  <geoffk@apple.com>
579
580         * cp-tree.h (rid_to_yy): Delete.
581         (C_RID_YYCODE): Delete.
582         (finish_file): Delete redundant declaration.
583
584 2003-02-18  Jason Merrill  <jason@redhat.com>
585
586         PR c++/9623
587         * decl.c (reshape_init): Don't mess with initializer labels.
588
589         PR c++/9485
590         * parser.c (cp_parser_postfix_expression): Set idk properly for
591         object->scope::member.
592
593 2003-02-18  Ben Elliston  <bje@redhat.com>
594
595         PR other/7350
596         * decl.c (duplicate_decls): Fix typo in comment.
597
598 2003-02-17  Michael Elizabeth Chastain <mec@shout.net>
599
600         PR debug/9717
601         * class.c (build_base_field): Mark fields for base classes with
602         DECL_IGNORED_P.
603
604 2003-02-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
605
606         PR c++/9457
607         * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
608         CONSTRUCTOR_ELTS only once.
609
610 2003-02-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
611
612         PR c++/9459
613         * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
614         (dump_type_suffix): Likewise.
615
616 2003-02-14  Nathan Sidwell  <nathan@codesourcery.com>
617
618         * search.c: ANSIfy function declarations and definitions.
619         * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
620         * call.c (build_method_call, resolve_scoped_fn_name,
621         build_java_interface_fn_ref): Adjust lookup_field, lookup_member
622         calls.
623         * class.c (handle_using_decl): Likewise.
624         * decl.c (make_typename_type, make_unmound_class_template,
625         start_decl, compute_array_index_type): Likewise.
626         * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
627         * init.c (expand_member_init, build_member_call): Likewise.
628         * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
629         resolve_typename_type): Likewise.
630         * typeck.c (lookup_destructor, finish_class_member_access_exprm
631         build_prememfunc_access_expr): Likewise.
632
633 2003-02-13  Gabriel Dos Reis <gdr@integrable-solutions.net>
634
635         * decl2.c: Include "timevar.h".
636         (namespace_ancestor): Time name lookup.
637         (add_using_namespace): Likewise.
638         (lookup_using_namespace): Likewise.
639         (qualified_lookup_using_namespace): Likewise.
640         (decl_namespace): Likewise.
641         (lookup_arg_dependent): Likewise.
642         * lex.c (do_identifier): Likewise.
643         (do_scoped_id): Likewise.
644         * pt.c (lookup_template_class): Likewise.
645
646 2003-02-14   Andrew Pinski <pinskia@physics.uc.edu>
647
648         * decl.c: (define_label): Fix warning for return 0 instead of NULL.
649         
650 2003-02-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
651
652         * decl.c: Include "timevar.h".
653         (poplevel): Time name lookup.
654         (find_binding): Likewise.
655         (push_namespace): Likewise.
656         (pop_nested_namespace): Likewise.
657         (store_bindings): Likewise.
658         (maybe_push_to_top_level): Likewise.
659         (pop_from_top_level): Likewise.
660         (push_local_name): Likewise.
661         (pushtag): Likewise.
662         (pushdecl): Likewise.
663         (pushdecl_with_scope): Likewise.
664         (pushdecl_namespace_level): Likewise.
665         (pushdecl_top_level): Likewise.
666         (pushdecl_class_level): Likewise.
667         (push_class_level_binding): Likewise.
668         (push_using_decl): Likewise.
669         (push_using_directive): Likewise.
670         (push_overloaded_decl): Likewise.
671         (lookup_label): Likewise.
672         (define_label): Likewise.
673         (lookup_tag): Likewise.
674         (lookup_tag_reverse): Likewise.
675         (lookup_namespace_name): Likewise.
676         (select_decl): Likewise.
677         (unqualified_namespace_lookup): Likewise.
678         (lookup_name_real): Likewise.
679         (lookup_name_current_level): Likewise.
680         (lookup_type_current_level): Likewise.
681         (maybe_inject_for_scope_var): Likewise.
682         (xref_tag): Likewise.
683
684         * Make-lang.in (cp/decl.o): Add dependency on timevar.h
685         
686 2003-02-12  Phil Edwards  <pme@gcc.gnu.org>
687
688         * decl.c (build_enumerator):  Remove unneeded test.
689
690 2003-02-09  Dan Nicolaescu  <dann@ics.uci.edu>
691
692         * cp-tree.h (struct lang_type_header): Make all fields unsigned
693         char.
694
695 2003-02-03  Mark Mitchell  <mark@codesourcery.com>
696
697         PR c++/7129
698         * call.c (z_candidate): Add args.
699         (convert_class_to_reference): Set it.
700         (implicit_conversion): Tidy.
701         (add_candidate): Add args parameter.
702         (add_function_candidate): Adjust call to add_candidate.
703         (add_conv_candidate): Likewise.
704         (build_builtin_candidate): Likewise.
705         (build_user_type_conversion_1): Eliminate wasteful tree_cons
706         usage.
707         (build_new_function_call): Likewise.
708         (build_object_call): Likewise.
709         (add_candidates): New function.
710         (build_new_op): Use it.
711         (covert_like_real): Adjust call to build_over_call.
712         (build_over_call): Remove args parameter.
713         * operators.def: Add <?= and >?=.
714
715 2003-02-01  Richard Sandiford  <rsandifo@redhat.com>
716
717         * typeck.c (build_indirect_ref): Don't check flag_volatile.
718
719 2003-01-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
720
721         PR c++/8849
722         * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
723
724 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
725
726         * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
727         BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
728         (BINFO_LANG_ELTS): New #define.
729         * tree.c (make_binfo): Use BINFO_LANG_ELTS.
730
731 2003-01-30  Geoffrey Keating  <geoffk@apple.com>
732
733         * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
734
735 2003-01-30  Mark Mitchell  <mark@codesourcery.com>
736
737         * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
738         for class types.
739         * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
740         rather than TYPE_LANG_FLAG_0.
741         (TYPE_BUILT_IN): Remove.
742         (TYPE_DEPENDENT_P): New macro.
743         (TYPE_DEPENDENT_P_VALID): Likewise.
744         (lang_type_class): Add fields_readonly.
745         * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
746         * pt.c (dependent_type_p_r): New function, split out from ...
747         (dependent_type_p): ... here.  Memoize results.
748         * search.c (dependent_base_p): Use dependent_type_p, not
749         uses_template_parms.
750         * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
751         for class types.
752
753 2003-01-29  Mark Mitchell  <mark@codesourcery.com>
754
755         * call.c (build_field_call): Use build_new_op, not build_opfncall.
756         (prep_operand): New function.
757         (build_new_op): Use it.  Remove dead code.
758         * class.c (pushclass): Change "modify" parameter type from int to
759         bool.
760         (currently_open_class): Use same_type_p, not pointer equality.
761         (push_nested_class): Adjust calls to pushclass, remove modify
762         parameter.
763         * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
764         (pushclass): Change prototype.
765         (push_nested_class): Likewise.
766         (grokoptypename): Remove.
767         (build_opfncall): Remove.
768         (value_dependent_expression_p): Declare.
769         (resolve_typename_type): Likewise.
770         (resolve_typename_type_in_current_instantiation): Likewise.
771         (enter_scope_of): Remove.
772         (tsubst): Remove.
773         (tsubst_expr): Likewise.
774         (tsubst_copy): Likewise.
775         (tsubst_copy_and_build): Likewise.
776         * decl.c (warn_about_implicit_typename_lookup): Remove.
777         (finish_case_label): Return error_mark_node for erroneous labels.
778         (start_decl): Adjust calls to push_nested_class.
779         (grokfndecl): Call push_scope/pop_scope around call to
780         duplicate_decls.
781         (grokdeclarator): Do not call tsubst.
782         (start_function): Adjust calls to push_nested_class.
783         * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
784         (check_classfn): Use push_scope/pop_scope around type comparisions.
785         (grokoptypename): Remove.
786         (push_sscope): Adjust call to push_nested_class.
787         * error.c (dump_type): Show cv-qualification of typename types.
788         * init.c (build_member_call): Use build_new_op, not
789         build_opfncall.
790         * method.c (build_opfncall): Remove.
791         * parser.c (cp_parser): Add allow_non_constant_expression_p and
792         non_constant_expression_p.
793         (cp_parser_constant_expression): Adjust prototype.
794         (cp_parser_resolve_typename_type): Remove.
795         (cp_parser_non_constant_expression): New function.
796         (cp_parser_non_constant_id_expression): Likewise.
797         (cp_parser_new): Set allow_non_constant_expression_p and
798         non_constant_expression_p.
799         (cp_parser_primary_expression): Reject `this' and `va_arg' in
800         constant-expressions.  Note that dependent names aren't really
801         constant.
802         (cp_parser_postfix_expression): Reject conversions to non-integral
803         types in constant-expressions.  Neither are increments or
804         decrements.
805         (cp_parser_unary_expression): Reject increments and decrements in
806         constant-expressions.
807         (cp_parser_direct_new_declarator): Adjust call to
808         cp_parser_constant_expression.
809         (cp_parser_cast_expression): Reject conversions to non-integral
810         types in constant-expressions.
811         (cp_parser_assignment_expression): Rejects assignments in
812         constant-expressions.
813         (cp_parser_expression): Reject commas in constant-expressions.
814         (cp_parser_labeled_statement): Adjust call to
815         cp_parser_constant_expression.
816         (cp_parser_direct_declarator): Simplify array bounds, even in
817         templates, when they are non-dependent.  Use
818         resolve_typename_type, not cp_parser_resolve_typename_type.
819         (cp_parser_class_head): Use resolve_typename_type, not
820         cp_parser_resolve_typename_type.
821         (cp_parser_member_declaration): Adjust call to
822         cp_parser_constant_expression.
823         (cp_parser_constant_initializer): Likewise.
824         (cp_parser_constructor_declarator): Use resolve_typename_type, not
825         cp_parser_resolve_typename_type.
826         (cp_parser_late_parsing_default_args): Adjust call to
827         push_nested_class.
828         * pt.c (tsubst): Give it internal linkage.
829         (tsubst_expr): Likewise.
830         (tsubst_copy): Likewise.
831         (tsubst_copy_and_build): Likewise.
832         (push_access_scope_real): Likewise.
833         (tsubst_friend_class): Likewise.
834         (instantiate_class_template): Adjust call to pushclass.
835         (value_dependent_expression_p): Give it external linkage.
836         Robustify.
837         (resolve_typename_type): New function.
838         * semantics.c (finish_call_expr): Use build_new_op, not
839         build_opfncall.
840         (begin_constructor_declarator): Remove.
841         (begin_class_definition): Adjust call to pushclass.
842         (enter_scope_of): Remove.
843         * typeck.c (comptypes): Resolve typename types as appropriate.
844         (build_x_indirect_ref): Use build_new_op, not build_opfncall.
845         (build_x_compound_expr): Likewise.
846         (build_modify_expr): Likewise.
847         (build_x_modify_expr): Likewise.
848         * typeck2.c (build_x_arrow): Likewise.
849         
850 2003-01-29  Fariborz Jahanian  <fjahanian@apple.com>
851
852         * pt.c (last_pending_template) Declare GTY().
853
854 2003-01-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
855
856         PR c++/8591
857         * parser.c (cp_parser_elaborated_type_specifier): Convert
858         TEMPLATE_DECL to TYPE_DECL only when processing template friends.
859         (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
860
861 2003-01-28  Nathan Sidwell  <nathan@codesourcery.com>
862
863         PR c++/9437
864         * pt.c (unify): Don't unify '*T' with 'U C::*'.
865
866         PR c++/3902
867         * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
868         inside a declarator.
869
870 2003-01-27  Nathan Sidwell  <nathan@codesourcery.com>
871
872         * class.c (update_vtable_entry_for_fn): Add index parameter.
873         Generate vcall thunk for covariant overriding from a virtual
874         primary base.
875         (dfs_modify_vtables): Adjust.
876
877 2003-01-25  Nathan Sidwell  <nathan@codesourcery.com>
878
879         PR c++/9403
880         * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
881         template keyword.
882         (cp_parser_base_specifier): Look for and consume a
883         TEMPLATE keyword. Replace switch with array index.
884
885         PR c++/795
886         * semantics.c (finish_non_static_data_member): Remember the
887         field's type even in a template.
888
889         PR c++/9415
890         * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
891         already scoped.
892         
893         PR c++/8545
894         * parser.c (cp_parser_cast_expression): Be more tentative.
895
896 2003-01-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
897
898         * cp-tree.h (flagged_type_tree_s): Remove.
899         (check_for_new_type): Likewise.
900         * typeck2.c (check_for_new_type): Likewise.
901
902 2003-01-23  Nathanael Nerode  <neroden@gcc.gnu.org>
903
904         * dump.c: ANSIfy function declarations and definitions.
905
906         * cp-tree.h, decl.h: Get rid of PARAMS.  Again.
907
908 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
909
910         PR c++/9354
911         * init.c (build_new): Set the type of the new-expression, even
912         when processing_templte_decl.
913
914         PR c++/9216
915         * parser.c (cp_parser_primary_expression): Improve error message
916         for templates used in an expression context.
917
918         PR c++/8696
919         * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
920         parse when encountering "typedef".
921
922 2003-01-22  Nathanael Nerode  <neroden@gcc.gnu.org>
923
924         * class.c, parser.c: ANSIfy function definitions and declarations.
925
926 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
927
928         PR c++/9328
929         * error.c (dump_decl): For an OVERLOAD, just print the name of the
930         function; it doesn't make sense to try to print its type.
931         * semantics.c (finish_typeof): Issue errors about invalid uses.
932
933         PR c++/9298
934         * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
935         function.
936         (cp_parser_expression_statement): Use it.
937         (cp_parser_explicit_instantiation): Likewise.
938         * pt.c (do_decl_instantiation): Improve error handling logic.
939         
940 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
941
942         PR c++/9384
943         * parser.c (cp_parser_using_declaration): Issue error messages
944         about name resolution failures here.
945
946         PR c++/9388
947         * class.c (currently_open_derived_class): Use dependent_type_p.
948         * cp-tree.h (dependent_type_p): New function.
949         (dependent_template_arg_p): Likewise.
950         (dependent_template_p): Likewise.
951         (type_dependent_expression_p): Likewise.
952         * parser.c (cp_parser_dependent_type_p): Remove.
953         (cp_parser_value_dependent_type_p): Likewise.
954         (cp_parser_type_dependent_expression_p): Likewise.
955         (cp_parser_dependent_template_arg_p): Likewise.
956         (cp_parser_dependent_template_id_p): Likewise.
957         (cp_parser_dependent_template_p): Likewise.
958         (cp_parser_diagnose_invalid_type_name): Replace
959         cp_parser_dependent_type_p with dependent_type_p, etc.
960         (cp_parser_primary_expresion): Likewise.
961         (cp_parser_nested_name_specifier_opt): Likewise.
962         (cp_parser_postfix_expression): Likewise.
963         (cp_parser_unary_expression): Likewise.
964         (cp_parser_template_name): Likewise.
965         (cp_parser_class_name): Likewise.
966         (cp_parser_lookup_name): Likewise.
967         * pt.c (dependent_type_p): New function.
968         (value_dependent_expression_p): Likewise.
969         (type_dependent_expression_p): Likewise.
970         (dependent_template_arg_p): Likewise.
971         (dependent_template_id_p): Likewise.
972         (dependent_template_p): Likewise.
973         
974         PR c++/9285
975         PR c++/9294
976         * parser.c (cp_parser_simple_declaration): Return quickly when
977         encountering errors.
978
979 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
980
981         Make-lang.in (cp/decl.o-warn): Add -Wno-error.
982
983 2003-01-17  Jason Merrill  <jason@redhat.com>
984
985         PR c++/9167, c++/9358
986         * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
987
988 2003-01-17  Jason Merrill  <jason@redhat.com>
989
990         PR c++/9342
991         * call.c (build_conditional_expr): Always do lvalue-rvalue
992         conversion.
993
994 2003-01-17  Mark Mitchell  <mark@codesourcery.com>
995
996         PR c++/9294
997         * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
998         * cp-tree.h (BASELINK_BINFO): Adjust.
999         (BASELINK_FUNCTIONS): Likewise.
1000         (BASELINK_ACCESS_BINFO): Likewise.
1001         (tree_baselink): New structure.
1002         (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
1003         (lang_tree_node): Add baselink.
1004         * decl.c (cp_tree_node_structure): Add BASELINK case.
1005         * search.c (build_baselink): Adjust.
1006         * tree.c (cp_walk_subtrees): Add BASELINK case.  Remove BASELINK_P
1007         test from TREE_LIST case.
1008
1009         PR c++/9272
1010         * parser.c (cp_parser_constructor_declarator_p): Do not assume
1011         that a constructor cannot be declared outside of its own class.
1012         
1013         * parser.c (cp_parser_resolve_typename_type): If the scope cannot
1014         be resolved, neither can the qualified name.
1015
1016         * rtti.c (get_pseudo_ti_desc): Fix thinko.
1017
1018 2003-01-16  Jason Merrill  <jason@redhat.com>
1019
1020         PR c++/8564
1021         * init.c (build_vec_init): Re-add maxindex parm.
1022         (perform_member_init, build_aggr_init): Pass it.
1023         (build_new_1): Pass it. Use an incomplete array type for full_type.
1024         * typeck.c (build_modify_expr): Pass it.
1025         * cp-tree.h: Adjust.
1026
1027 2003-01-16  Jeffrey D. Oldham  <oldham@codesourcery.com>
1028
1029         * cp-tree.h (tsubst_copy_and_build): New declaration.
1030         * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
1031         (tsubst_expr): Use 'tsubst_copy_and_build'.  Update initial comment.
1032         (tsubst_copy_and_build): New function.
1033
1034 2003-01-16  Mark Mitchell  <mark@codesourcery.com>
1035
1036         * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
1037         (PARTIAL_INSTANTIATION_P): Remove.
1038         (IMPLICIT_TYPENAME_P): Likewise.
1039         (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
1040         (build_typename_type): Remove declaration.
1041         (parmlist_is_exprlist): Likewise.
1042         * decl.c (build_typename_type): Make it static, remove third
1043         parameter.
1044         (push_class_binding): Don't do implicit typename stuff.
1045         (make_typename_type): Likewise.
1046         (lookup_name_real): Likewise.
1047         (grokdeclarator): Don't try to convert declarations into
1048         initializations.  Don't do implicit typename stuff.
1049         (parmlist_is_exprlist): Remove.
1050         (xref_basetypes): Simplify.
1051         * decl2.c (grokfield): Don't try to convert declarations into
1052         initializations.
1053         (build_anon_union_vars): Do this while processing templates, too.
1054         (finish_anon_union): Likewise.
1055         * error.c (dump_type): Remove implicit typename handling.
1056         * parser.c (cp_parser_diagnose_invalid_type_name): New method.
1057         (cp_parser_primary_expression): Correct handling of names not
1058         found by unqualified name lookup in templates.
1059         (cp_parser_nested_name_specifier_opt): Avoid checking dependency
1060         of types when possible.
1061         (cp_parser_simple_declaration): Complain intelligently about some
1062         invalid declarations.
1063         (cp_parser_member_declaration): Likewise.
1064         (cp_parser_constructor_declarator_p): Don't check when we're in a
1065         function scope.
1066         * pt.c (instantiate_class_template): Remove
1067         PARTIAL_INSTANTIATION_P gunk.
1068         * search.c (lookup_field_r): Don't build implicit typenames.
1069         (marked_pushdecls_p): Don't enter dependent base types.
1070         (unmarked_pushdecls_p): Likewise.
1071         * semantics.c (begin_class_definition): Remove implicit typename
1072         stuff.
1073
1074 2003-01-16  Nathan Sidwell  <nathan@codesourcery.com>
1075
1076         PR c++/9212
1077         * parser.c (cp_parser_direct_declarator): If accepting either
1078         abstract or named, the name must be an unqualified-id.
1079
1080 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1081
1082         * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
1083
1084 2003-01-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1085
1086         * decl2.c (check_classfn): Fix uninitialized warning.
1087         (build_anon_union_vars): Likewise.
1088         * pt.c (tsubst_copy): Likewise.
1089
1090 2003-01-14  Jeffrey D. Oldham  <oldham@codesourcery.com>
1091
1092         Further conform g++'s __vmi_class_type_info to the C++ ABI
1093         specification.
1094         * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
1095         the specification.
1096         (class_hint_flags): Likewise.
1097
1098 2003-01-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1099
1100         * config-lang.in: Add semantics.c to gtfiles.
1101         * cp-tree.h (flagged_type_tree_s): Remove lookups field.
1102         (saved_scope): Likewise.
1103         (type_lookups): Remove.
1104         (deferred_access): New structure.
1105         (type_access_control): Remove.
1106         (save_type_access_control): Likewise.
1107         (reset_type_access_control): Likewise.
1108         (decl_type_access_control): Likewise.
1109         (push_deferring_access_checks): Declare.
1110         (resume_deferring_access_checks): Likewise.
1111         (stop_deferring_access_checks): Likewise.
1112         (pop_deferring_access_checks): Likewise.
1113         (get_deferred_access_checks): Likewise.
1114         (pop_to_parent_deferring_access_checks): Likewise.
1115         (perform_deferred_access_checks): Likewise.
1116         (perform_or_defer_access_check): Likewise.
1117         * decl.c (make_typename_type): Use perform_or_defer_access_check.
1118         (make_unbound_class_template): Likewise.
1119         (grokdeclarator): Don't call decl_type_access_control.
1120         * parser.c (cp_parser_context): Remove deferred_access_checks
1121         and deferring_access_checks_p fields.
1122         (cp_parser_context_new): Adjust.
1123         (cp_parser): Remove access_checks_lists.
1124         (cp_parser_defer_access_check): Remove.
1125         (cp_parser_start_deferring_access_checks): Remove.
1126         (cp_parser_stop_deferring_access_checks): Remove.
1127         (cp_parser_perform_deferred_access_checks): Remove.
1128         (cp_parser_nested_name_specifier_opt): Use new deferred access
1129         functions.
1130         (cp_parser_simple_declaration): Likewise.
1131         (cp_parser_template_id): Likewise.
1132         (cp_parser_function_definition): Likewise.
1133         (cp_parser_class_specifier): Likewise.
1134         (cp_parser_lookup_name): Likewise.
1135         (cp_parser_single_declaration): Likewise.
1136         (cp_parser_pre_parsed_nested_name_specifier): Likewise.
1137         (cp_parser_parse_tentatively): Likewise.
1138         (cp_parser_parse_definitely): Likewise.
1139         (yyparse): Likewise.
1140         (cp_parser_init_declarator): Remove access_checks parameter.
1141         Use new deferred access functions.
1142         (cp_parser_function_definition_from_specifiers_and_declarator):
1143         Likewise.
1144         (cp_parser_class_head): Remove deferring_access_checks_p and
1145         saved_access_checks parameters.  Use new deferred access functions.
1146         (cp_parser_member_specification_opt): Don't call
1147         reset_type_access_control.
1148         * search.c (type_access_control): Remove.
1149         * semantics.c: Include "gt-cp-semantics.h".
1150         (deferred_type_access_control): Remove.
1151         (deferred_access_stack): New variable.
1152         (deferred_access_free_list): Likewise.
1153         (push_deferring_access_checks): New function.
1154         (resume_deferring_access_checks): Likewise.
1155         (stop_deferring_access_checks): Likewise.
1156         (pop_deferring_access_checks): Likewise.
1157         (get_deferred_access_checks): Likewise.
1158         (pop_to_parent_deferring_access_checks): Likewise.
1159         (perform_deferred_access_checks): New function, adapted from
1160         cp_parser_perform_deferred_access_checks.
1161         (perform_or_defer_access_check): New function, adapted from
1162         cp_parser_defer_access_check.
1163         (current_type_lookups): Remove.
1164         (deferred_type_access_control): Likewise.
1165         (decl_type_access_control): Likewise.
1166         (save_type_access_control): Likewise.
1167         (reset_type_access_control): Likewise.
1168         (begin_function_definition): Adjust.
1169         (begin_class_definiton): Likewise.
1170
1171 2003-01-13  Jason Merrill  <jason@redhat.com>
1172
1173         PR c++/8748
1174         * class.c (build_base_path): Take the address before calling save_expr.
1175
1176         * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
1177         all the ambiguous conversions are bad.
1178
1179         * class.c (maybe_warn_about_overly_private_class): Don't stop
1180         searching when we find a nonprivate method.
1181
1182         * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
1183
1184 2003-01-12  Mark Mitchell  <mark@codesourcery.com>
1185
1186         * cp-tree.h (get_arglist_len_in_bytes): Remove.
1187
1188         PR c++/9264
1189         * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
1190         typeame types more robustly.
1191
1192 2003-01-11  Phil Edwards  <pme@gcc.gnu.org>
1193
1194         * parser.c:  Fix comment typos.
1195
1196 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
1197
1198         PR c++/9099
1199         * parser.c (cp_parser_scope_through_which_access_occurs): Handle
1200         an object_type which is not a class type.
1201
1202 2003-01-10  Geoffrey Keating  <geoffk@apple.com>
1203
1204         * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
1205         (cp_parser_late_parsing_default_args): Likewise.
1206
1207 2003-01-10  Nathanael Nerode  <neroden@gcc.gnu.org>
1208
1209         * cfns.gperf: ANSIfy function declarations.
1210         * cfns.h: Regenerate.
1211         * cp-tree.h: ANSIfy function declarations.
1212
1213 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
1214
1215         * cp-tree.h (reparse_absdcl_as_expr): Remove.
1216         (reparse_absdcl_as_casts): Likewise.
1217         (reparse_decl_as_expr): Likewise.
1218         (finish_decl_parsing): Likewise.
1219         * decl2.c (reparse_absdcl_as_expr): Remove.
1220         (reparse_absdcl_as_casts): Likewise.
1221         (repase_decl_as_expr): Likewise.
1222         (finish_decl_parsing): Likewise.
1223
1224         PR c++/9128
1225         PR c++/9153
1226         PR c++/9171
1227         * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
1228         function.
1229         (cp_parser_nested_name_specifier_opt): Correct the
1230         check_dependency_p false.
1231         (cp_parser_postfix_expression): Fix formatting.
1232         (cp_parser_decl_specifier_seq): Avoid looking for constructor
1233         declarators when possible.
1234         (cp_parser_template_id): Avoid performing name-lookup when
1235         possible.
1236         (cp_parser_class_head): Do not count specializations when counting
1237         levels of templates.
1238         (cp_parser_constructor_declarator_p): Return immediately if
1239         there's no chance that the tokens form a constructor declarator.
1240         * rtti.c (throw_bad_typeid): Add comment.  Do not return an
1241         expression with reference type.
1242         (get_tinfo_decl_dynamic): Do not return an expression with
1243         reference type.
1244         (build_typeid): Add comment.  Do not return an expression with
1245         reference type.
1246         * typeck.c (build_class_member_access_expr): Improve handling of
1247         conditionals and comma-expressions as objects.
1248
1249 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
1250
1251         * cfns.gperf: ANSIfy function declarations.
1252         * cfns.h: Regenerate.
1253         * cp-tree.h: ANSIfy function declarations.
1254         * parser.c: ANSIfy function declarations & definitions.
1255
1256         * decl.c (bad_specifiers): Fix parameter order error I introduced.
1257
1258 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
1259
1260         Merge from pch-branch:
1261
1262         2003-01-09  Geoffrey Keating  <geoffk@apple.com>
1263
1264         Merge to tag pch-merge-20030102:
1265         
1266         * semantics.c (finish_translation_unit): Don't call finish_file.
1267         * parser.c: Don't include ggc.h.
1268         (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
1269         read first token here.  Don't allow PCH files after the first
1270         token is read.
1271         (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
1272         (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
1273         (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
1274         (cp_parser_late_parsing_for_member): Don't duplicate call to
1275         cp_lexer_set_source_position_from_token.
1276         (cp_parser_late_parsing_default_args): Likewise.
1277         (yyparse): Call finish_file after clearing the_parser.
1278
1279         2002-12-11  Geoffrey Keating  <geoffk@apple.com>
1280
1281         * Make-lang.in: Remove $(GGC_H) from all dependencies.
1282         (CXX_TREE_H): Add $(GGC_H).
1283         * class.c: Don't include ggc.h. 
1284         (field_decl_cmp): Make parameters be 'const void *' to match qsort.
1285         (method_name_cmp): Likewise.
1286         (resort_data): New variable.
1287         (resort_field_decl_cmp): New.
1288         (resort_method_name_cmp): New.
1289         (resort_sorted_fields): New.
1290         (resort_type_method_vec): New.
1291         (finish_struct_methods): Delete cast.
1292         (finish_struct_1): Delete cast.
1293         * cp-tree.h: Include ggc.h.
1294         (struct lang_type_class): Add reorder attribute to field `methods'.
1295         (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
1296         (resort_sorted_fields): New prototype.
1297         (resort_type_method_vec): New prototype.
1298         * call.c: Don't include ggc.h.
1299         * decl.c: Likewise.
1300         * decl2.c: Likewise.
1301         * init.c: Likewise.
1302         * lex.c: Likewise.
1303         * method.c: Likewise.
1304         * optimize.c: Likewise.
1305         * parse.y: Likewise.
1306         * pt.c: Likewise.
1307         * repo.c: Likewise.
1308         * search.c: Likewise.
1309         * semantics.c: Likewise.
1310         * spew.c: Likewise.
1311         * tree.c: Likewise.
1312
1313         * lang-specs.h: Remove comment.
1314
1315         2002-12-03  Geoffrey Keating  <geoffk@apple.com>
1316
1317         * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
1318         (operator_name_info): Mark to be saved for PCH, specify size.
1319         (assignment_operator_name_info): Likewise.
1320
1321         2002-11-19  Geoffrey Keating  <geoffk@apple.com>
1322
1323         * decl.c (anon_cnt): Mark to be saved for PCH.
1324
1325         2002-10-25  Geoffrey Keating  <geoffk@apple.com>
1326
1327         * lex.c  (init_reswords): Delete now-untrue comment.
1328         Allocate ridpointers using GGC.
1329
1330         2002-10-04  Geoffrey Keating  <geoffk@apple.com>
1331
1332         * cp-tree.h (union lang_decl_u2): Add tags to all fields.
1333
1334         * g++spec.c (lang_specific_driver): Don't include standard
1335         libraries in `added'.
1336
1337         2002-08-27  Geoffrey Keating  <geoffk@redhat.com>
1338
1339         * decl2.c (finish_file): Call c_common_write_pch.
1340         * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
1341
1342         2002-08-17  Geoffrey Keating  <geoffk@redhat.com>
1343
1344         * g++spec.c (lang_specific_driver): Treat .h files as C++ header
1345         files when using g++.
1346         * lang-specs.h: Handle compiling C++ header files.
1347
1348 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
1349
1350         * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
1351
1352 2003-01-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1353
1354         * pt.c (push_access_scope_real): Call push_to_top_level for
1355         function in namespace scope.
1356         (pop_access_scope): Call pop_from_top_level for function in
1357         namespace scope.
1358
1359 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
1360
1361         * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
1362
1363 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
1364
1365         * Make-lang.in (c++.install-common, c++.install-man,
1366         c++.uninstall): Prepend $(DESTDIR) to destination paths in
1367         all (un)installation commands.
1368         (c++.install-common): Rewrite $(LN) commands to support
1369         DESTDIR with "ln" as well as with "ln -s".
1370
1371 2003-01-08  Jason Merrill  <jason@redhat.com>
1372
1373         * parser.c (cp_parser_primary_expression): See through explicitly
1374         scoped ALIAS_DECLs, too.
1375
1376 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
1377
1378         * decl.c: Remove some #if 0 code.
1379
1380         * decl.c: ANSIfy function declarations.
1381
1382 2003-01-07  Mark Mitchell  <mark@codesourcery.com>
1383
1384         * parser.c (cp_parser_asm_definition): Correct handling of omitted
1385         operands.
1386
1387 2003-01-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1388
1389         PR c++/9030
1390         * decl.c (make_typename_type): Check access only when tf_error.
1391         (make_unbound_class_template): Likewise.
1392         * pt.c (saved_access_scope): New variable.
1393         (push_access_scope_real): New function.
1394         (push_access_scope): Likewise.
1395         (pop_access_scope): Likewise.
1396         (tsubst_default_argument): Use them.
1397         (instantiate_template): Likewise.
1398         (regenerate_decl_from_template): Likewise.
1399         (instantiate_decl): Likewise.
1400         (get_mostly_instantiated_function_type): Likewise.
1401
1402 2003-01-07  Nathanael Nerode <neroden@gcc.gnu.org>
1403
1404         * tree.c: Delete bogus #if 0 code.
1405
1406 2003-01-07  Andreas Schwab  <schwab@suse.de>
1407
1408         * class.c (layout_class_type): Don't use
1409         PCC_BITFIELD_TYPE_MATTERS if not defined.
1410
1411 2003-01-06  Mark Mitchell  <mark@codesourcery.com>
1412
1413         PR c++/9165
1414         * decl2.c (build_cleanup): Mark the object as used.
1415
1416         * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
1417         (hash_local_specialization): New function.
1418         (register_local_specialization): Revert 2003-01-05 change.
1419         (instantiate_decl): Use hash_local_specialization when creating
1420         the local_specializations table.
1421         
1422         * decl2.c (mark_used): Do not synthesize thunks.
1423
1424         * class.c (layout_class_type): Correct handling of unnamed
1425         bitfields wider than their types.
1426
1427         PR c++/9189
1428         * parser.c (cp_parser): Remove default_arg_types.  Update
1429         documentation for unparsed_functions_queues.
1430         (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
1431         parameter.
1432         (cp_parser_new): Don't set parser->default_arg_types.
1433         (cp_parser_function_definition): Adjust usage of
1434         unparsed_funtions_queues.
1435         (cp_parser_class_specifier): Don't mess with
1436         parser->default_arg_types.  Handle default argument processing in
1437         a separate phase from function body processing.
1438         (cp_parser_template_declaration_after_export): Adjust usage of
1439         unparsed_functions_queues.
1440         (cp_parser_late_parsing_for_member): Do not handle default
1441         arguments.
1442
1443 2003-01-06  Nathan Sidwell  <nathan@codesourcery.com>
1444
1445         PR c++/9109
1446         * parser.c (cp_parser_declarator_kind): New enum.
1447         (cp_parser_declarator): Adjust.
1448         (cp_parser_direct_declarator): Adjust. Allow for either named or
1449         abstract declarator. Prefer abstract, if possible. Allow
1450         parenthesized function name.
1451         (cp_parser_condition): Adjust cp_parser_declarator call.
1452         (cp_parser_explicit_instantiation): Likewise.
1453         (cp_parser_init_declarator): Likewise.
1454         (cp_parser_type_id): Likewise.
1455         (cp_parser_function_definition): Likewise.
1456         (cp_parser_member_declaration): Likewise.
1457         (cp_parser_parameter_declaration): Use cp_parser_declarator to do
1458         the tentative parsing.
1459         (cp_parser_exception_declaration): Likewise.
1460
1461 2003-01-05  Mark Mitchell  <mark@codesourcery.com>
1462
1463         * parser.c (cp_parser_template_parameter): Adjust call to
1464         cp_parser_parameter_declaration.
1465         (cp_parser_parameter_declaration_list): Likewise.
1466         (cp_parser_parameter_declaration): Replace
1467         greater_than_is_operator_p with template_parm_p parameter.  Do not
1468         cache tokens for template default arguments.
1469
1470         * pt.c (retrieve_local_specialization): Use htab_find, not
1471         htab_find_with_hash.
1472         (register_local_specialization): Use htab_find_slot, not
1473         htab_find_slot_with_hash.
1474         (instantiate_decl): Pass a hash function to htab_create.
1475         
1476 2003-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1477
1478         * parser.c (cp_parser_binary_expression,
1479         cp_parser_multiplicative_expression,
1480         cp_parser_additive_expression, cp_parser_shift_expression,
1481         cp_parser_relational_expression, cp_parser_equality_expression,
1482         cp_parser_and_expression, cp_parser_exclusive_or_expression,
1483         cp_parser_inclusive_or_expression,
1484         cp_parser_logical_and_expression, cp_parser_logical_or_expression,
1485         cp_parser_binary_expression): Const-ify.
1486
1487 2003-01-04  Mark Mitchell  <mark@codesourcery.com>
1488
1489         * method.c (use_thunk): Disable access control while building the
1490         body of the thunk.
1491
1492 2003-01-03  Nathanael Nerode  <neroden@gcc.gnu.org>
1493
1494         * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C 
1495         front end.
1496
1497 2003-01-03  Matt Austern  <austern@apple.com>
1498
1499         * cp-tree.h (struct lang_type_class): add field for key method
1500         (cp_global_trees): rename dynamic_classes to keyed_classes
1501         (key_method): add definition
1502         * class.c (finish_struct_1): compute class's key method, and add
1503         the class to keyed_classes list if there is no key method.
1504         * decl.c (finish_function): add class to keyed_classes list if we
1505         see a definition of the class's key method.
1506         * pt.c (instantiate_class_template): add template specialization
1507         of a dynamic class to keyed_classes list.
1508         * decl2.c (key_method): remove
1509         (finish_file): iterate only through keyed_classes list when
1510         deciding whether to emit vtables, remove class from its list after
1511         we do the emission.
1512         
1513 2003-01-02  Jason Merrill  <jason@redhat.com>
1514
1515         * call.c (build_conditional_expr): Stabilize lvalues properly.
1516         * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
1517         * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
1518         Don't allow CALL_EXPR or VA_ARG_EXPR, either.
1519
1520         * call.c (convert_like_real): Call decl_constant_value for an
1521         IDENTITY_CONV even if there are no more conversions.
1522
1523         * cvt.c (build_up_reference): Don't push unnamed temps.
1524
1525         * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
1526
1527         * dump.c (cp_dump_tree): Don't try to dump class-specific fields
1528         for a backend struct.
1529
1530         * except.c (wrap_cleanups_r, build_throw): Make
1531         MUST_NOT_THROW_EXPRs void.
1532         * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
1533
1534         * init.c (build_vec_delete_1): Pre-evaluate the base address.
1535
1536         * init.c (get_temp_regvar): Simplify logic.
1537
1538         * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
1539         our replacement is a decl.
1540
1541         * decl.c (cp_make_fname_decl): Push the decls inside the
1542         outermost scope.
1543
1544 2003-01-03  Nathan Sidwell  <nathan@codesourcery.com>
1545
1546         PR c++/45, c++/3784
1547         * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
1548         the same too.
1549
1550 2003-01-03  Graham Stott  <graham.stott@btinternet.com>
1551
1552         * parser.c (struct cp_parser): Add access_checks_lists field
1553         (cp_parser_simple_declaration): Use.
1554         (cp_parser_init_declarator): Likewise. 
1555
1556 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
1557
1558         * parser.c (cp_parser_declaration): Accept the __extension__
1559         keyword before the declaration.
1560
1561         PR c++/2843
1562         * parser.c (cp_parser_parameter_declaration): Allow attributes to
1563         appear after the declarator.
1564
1565         * call.c (build_new_method_call): Fix typo in message format
1566         string.
1567
1568 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
1569
1570         * parser.c (cp_lexer_next_token_is): Declare it inline.
1571         (cp_lexer_set_source_position_from_token): Likewise.
1572         (cp_lexer_debugging_p): Likewise.
1573         (cp_parser_parsing_tentatively): Likewise.
1574         (cp_parser_nested_name_specifier_opt): Reduce the number of calls
1575         to the cp_lexer_peek_token.
1576
1577         * parser.c (cp_parser_sizeof_operand): Do not evaluate the
1578         expression.
1579
1580 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
1581
1582         * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
1583         cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
1584         cp/repo.c: Fix copyright years.
1585
1586 2003-01-01  Neil Booth  <neil@daikokuya.co.uk>
1587
1588         * lex.c: Remove superfluous include of cpplib.h.
1589         (CONSTRAINT): Define without conditions.
1590         (init_cp_pragma): Use c_register_pragma.
1591
1592 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
1593
1594         * .cvsignore: Remove.
1595
1596 2002-12-31  Steven Bosscher  <s.bosscher@student.tudelft.nl>
1597
1598         * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
1599           except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
1600           lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
1601           pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
1602           typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
1603           copyright header.
1604         * lex.h: parse.y is dead, so don't mention it.  Also replace the
1605           copyright header with the default GNU copyright header.
1606
1607 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
1608
1609         * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
1610         (lookup_name_namespace_only): Likewise.
1611         (begin_only_namespace_names): Likewise.
1612         (end_only_namespace_names): Likewise.
1613         * decl.c (only_namespace_names): Remove.
1614         (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
1615         (lookup_name_real): Do not check only_namespace_names.
1616         (lookup_name_namespace_only): Remove.
1617         (begin_only_namespace_names): Likewise.
1618         (end_only_namespace_names): Likewise.
1619         * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
1620         nested-name-specifiers more gracefully.
1621         (cp_parser_class_or_namespace_name): Avoid looking up namespace
1622         names when they cannot possibly appear.
1623         (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
1624         (cp_parser_elaborated_type_specifier): Likewise.
1625         (cp_parser_namespace_name): Only look for namespace names.
1626         (cp_parser_lookup_name): Add is_namespace parameter.
1627         (cp_parser_lookup_name_simple): Adjust call to
1628         cp_parser_lookup_name.
1629
1630         * parser.c (cp_parser_dependent_type_p): Fix thinko.
1631
1632 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
1633
1634         * .cvsignore: Update.
1635
1636 2002-12-31  Nathan Sidwell  <nathan@codesourcery.com>
1637
1638         * class.c (modify_vtable_entry): Remove unused variable.
1639         (get_vcall_index): Always expect a non-thunk.
1640         (update_vtable_entry_for_fn): Combine covariant adjustments, when
1641         overriding a thunk. Pass get_vcall_index a non-thunk.
1642
1643         * decl2.c (finish_file): Mark undefined inlines as extern.
1644
1645 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
1646
1647         * cp-tree.def (RETURN_INIT): Remove.
1648         * cp-tree.h (DECL_IN_MEMORY_P): Remove.
1649         (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
1650         (note_level_for_for): Remove.
1651         (note_level_for_try): Likewise.
1652         (note_level_for_catch): Likewise.
1653         (finish_named_return_value): Likewise.
1654         (do_pushlevel): Change prototype.
1655         (pending_lang_change): Remove.
1656         * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
1657         sk_for.
1658         (note_level_for_for): Remove.
1659         (note_level_for_try): Likewise.
1660         (note_level_for_catch): Likewise.
1661         (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
1662         * parser.c (cp_parser_context_free_list): Make it "deletable".
1663         (cp_parser_template_argument): Remove misleading comment.
1664         * pt.c (tsubst_expr): Remove RETURN_INIT code.
1665         * semantics.c (genrtl_named_return_value): Remove.
1666         (do_pushlevel): Take a scope kind as an argument.
1667         (begin_if_stmt): Adjust.
1668         (begin_while_stmt): Likewise.
1669         (begin_for_stmt): Likewise.
1670         (finish_for_init_stmt): Likewise.
1671         (begin_switch_stmt): Likewise.
1672         (begin_handler): Likewise.
1673         (begin_compound_stmt): Likewise.
1674         (finish_named_return_value): Remove.
1675         (cp_expand_stmt): Remove RETURN_INIT case.
1676         * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
1677
1678 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
1679
1680         PR c++/9112
1681         * parser.c (cp_parser_direct_declarator): Handle erroneous
1682         parenthesized declarators correctly.
1683
1684 2002-12-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1685
1686         * cp-tree.h (pending_lang_change): Declare.
1687
1688 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
1689
1690         * parser.c (cp_parser_context_free_list): New variable.
1691         (cp_parser_context_new): Use it.
1692         (cp_parser_error): Check return code from
1693         cp_parser_simulate_error.
1694         (cp_parser_simulate_error): Return a value.
1695         (cp_parser_id_expression): Optimize common case.
1696         (cp_parser_class_name): Likewise.
1697         (cp_parser_class_specifier): Adjust call to
1698         cp_parser_late_parsing_default_args.
1699         (cp_parser_lookup_name): Optimize common case.
1700         (cp_parser_late_parsing_for_member): Adjust call to
1701         cp_parser_late_parsing_default_args.
1702         (cp_parser_late_parsing_default_args): Add scope parameter.
1703         (cp_parser_require): Avoid creating the error message unless it's
1704         needed.
1705         (cp_parser_parse_definitely): Place free'd contexts on the free
1706         list.
1707
1708         * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
1709
1710 2002-12-30  David Edelsohn  <edelsohn@gnu.org>
1711
1712         * parser.c (cp_parser_parameter_declaration_clause): Treat system
1713         header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
1714
1715 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
1716
1717         * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
1718         GCC, not GNU CC.
1719
1720 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
1721
1722         * parse.y: Remove.
1723         * spew.c: Likewise.
1724         * Make-lang.in (gt-cp-spew.h): Remove.
1725         * cp-tree.h (do_pending_lang_change): Remove.
1726         (do_identifier): Change prototype.
1727         (finish_id_expr): Remove.
1728         * decl.c (lookup_name_real): Remove yylex variable.
1729         * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
1730         * lex.c (init_cpp_parse): Remove.
1731         (reduce_cmp): Likewise.
1732         (token_cmp): Likewise.
1733         (yychar): Likewise.
1734         (lastiddecl): Likewise.
1735         (token_count): Likewise.
1736         (reduce_count): Likewise.
1737         (yyhook): Likewise.
1738         (print_parse_statistics): Likewise.
1739         (do_pending_lang_change): Likewise.
1740         (do_identifier): Remove parsing parameter.
1741         * lex.h (lastiddecl): Remove.
1742         (looking_for_typename): Remove.
1743         (looking_for_template): Likewise.
1744         (pending_lang_change): Likewise.
1745         (yylex): Likewise.
1746         * semantics.c (finish_id_expr): Remove.
1747
1748         * decl.c (grokdeclarator): Diagnost "extern thread" and "static
1749         thread" correctly.
1750
1751 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
1752
1753         * decl.c, decl2.c, decl.h:  GCC, not GNU CC.  This is the C++ front
1754         end, not the C front end.
1755
1756 2002-12-30  Nathan Sidwell  <nathan@codesourcery.com>
1757
1758         * cp-tree.h (THUNK_TARGET): New macro.
1759         (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
1760         (finish_thunk): Remove offset parms.
1761         * class.c (find_final_overrider): Look through thunks.
1762         (get_vcall_index): Use THUNK_TARGET.
1763         (update_vtable_entry_for_fn): Look through thunks. Set covariant
1764         fixed offset here. Adjust finish_thunk call.
1765         (build_vtbl_initializer): Adjust finish_thunk calls.
1766         * mangle.c (mangle_call_offset): Remove superfluous if.
1767         (mangle_thunk): Adjust.
1768         * method.c (make_thunk): Adjust.
1769         (finish_thunk): Adjust.
1770         (thunk_adjust): Remove assert.
1771         (use_thunk): Use THUNK_TARGET
1772         * dump1.c (cp_dump_tree): Adjust thunk dumping.
1773
1774         PR c++/9054
1775         * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
1776         * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
1777
1778 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1779
1780         Remove traditional C constructs 4/n.
1781         * decl2.c (grok_method_quals, warn_if_unknown_interface,
1782         grok_x_components, cp_build_parm_decl, build_artificial_parm,
1783         maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
1784         delete_sanity, check_member_template, check_java_method,
1785         check_classfn, finish_static_data_member_decl, grokfield,
1786         grokbitfield, grokoptypename, grok_function_init,
1787         cplus_decl_attributes, constructor_name, defer_fn,
1788         build_anon_union_vars, finish_anon_union, coerce_new_type,
1789         coerce_delete_type, comdat_linkage, maybe_make_one_only,
1790         key_method, import_export_vtable, import_export_class,
1791         output_vtable_inherit, import_export_decl, import_export_tinfo,
1792         build_cleanup, get_guard, get_guard_bits, get_guard_cond,
1793         set_guard, start_objects, finish_objects,
1794         start_static_storage_duration_function,
1795         finish_static_storage_duration_function, get_priority_info,
1796         start_static_initialization_or_destruction,
1797         finish_static_initialization_or_destruction,
1798         do_static_initialization, do_static_destruction,
1799         prune_vars_needing_no_initialization, write_out_vars,
1800         reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
1801         add_using_namespace, merge_functions, ambiguous_decl,
1802         lookup_using_namespace, lookup_using_namespace,
1803         qualified_lookup_using_namespace, set_decl_namespace,
1804         decl_namespace, current_decl_namespace, push_decl_namespace,
1805         pop_decl_namespace, push_scope, pop_scope, add_function,
1806         arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
1807         lookup_arg_dependent, do_namespace_alias,
1808         validate_nonmember_using_decl, do_nonmember_using_decl,
1809         do_toplevel_using_decl, do_local_using_decl,
1810         do_class_using_decl, do_using_directive, check_default_args,
1811         mark_used, handle_class_head): Use C90 prototypings.  Use booleans.
1812         * parser.c (cp_parser_class_head): Use booleanss.
1813         * decl.c (walk_globals, walk_vtables): Likewise.
1814         * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
1815         walk_globals): Change return type from 'int' to 'bool'.
1816         * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
1817         throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
1818         build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
1819         get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
1820         qualifier_flags, tinfo_base_init, generic_initializer,
1821         ptr_initializer, dfs_class_hint_mark, ptm_initializer,
1822         dfs_class_hint_unmark, class_hint_flags, class_initializer,
1823         typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
1824         get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
1825         unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
1826         * repo.c (repo_compile_flags, repo_template_declared,
1827         repo_template_defined, repo_class_defined, repo_get_id,
1828         repo_template_used, repo_vtable_used, repo_inline_used,
1829         repo_tinfo_used, repo_template_instantiated, extract_string,
1830         open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
1831         finish_repo): Likewise.
1832         * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
1833         cxx_print_xnode): Likewise..
1834         * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
1835         cxx_warn_unused_global_decl, cp_expr_size): Likewise.
1836         * cxxfilt.c (demangle_it, print_demangler_list, usage,
1837         standard_symbol_characters, hp_symbol_characters, main, fatal):
1838         Likewise.
1839         (strip_underscore):  Change type from 'int' to 'bool'.
1840         (main): Use boolean constants.
1841
1842 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1843
1844         Remove traditional C constructs 3/n.
1845         * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
1846         build_up_reference, warn_ref_binding, convert_to_reference,
1847         convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
1848         convert_to_void, convert, convert_force, build_type_conversion,
1849         build_expr_type_conversion, type_promotes_to,
1850         perform_qualification_conversions): Use C90 prototyping style.
1851         * decl2.c (grok_array_decl): Use boolean constant.
1852         (delete_sanity): Likewise.
1853         * typeck.c (build_unary_op): Likewise.
1854         * semantics.c (finish_switch_cond): Likewise.
1855         * parser.c (cp_parser_direct_new_declarator): Likewise.
1856         * init.c (build_new): Likewise.
1857
1858 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
1859
1860         * Make-lang.in (po-generated): Remove parse.c.
1861         (CXX_OBJS): Remove parse.o and spew.o.  Add parser.o.
1862         ($(srcdir)/cp/parse.h): Remove target.
1863         ($(srcdir)/cp/parse.c): Likewise.
1864         (gt-cp-parse.h): Likewise.
1865         (gt-cp-parser.h): New target.
1866         (c++.distclean): Do not remove parse.output.
1867         (c++.maintainer-clean): Do not remove parse.c or parse.h.
1868         (cp/spew.o): Remove target.
1869         (cp/lex.o): Adjust dependencies.
1870         (cp/pt.o): Likewise.
1871         (cp/parse.o): Likewise.
1872         (cp/TAGS): Do not mention parse.c.
1873         (cp/parser.o): New target.
1874         * NEWS: Mention the new parser.
1875         * call.c (build_scoped_method_call): Simplify.
1876         (build_method_call): Likewise.
1877         (build_new_function_call): Adjust calls to add_function_candidate
1878         and add_template_candidate.
1879         (build_new_op): Improve handling of erroroneous operands.
1880         (convert_default_arg): Remove circular argument processing.
1881         (name_as_c_string): New function.
1882         (build_new_method_call): Use it.
1883         (perform_implicit_conversion): Use error_operand_p.
1884         * class.c (finish_struct_anon): Use constructor_name_p.
1885         (check_field_decls): Likewise.
1886         (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
1887         (resolve_address_of_overloaded_function): Likewise.
1888         (instantiate_type): Tweak pointer-to-member handling.
1889         (get_primary_binfo): Remove incorrect assertion.
1890         * config-lang.in (gtfiles): Add parser.c, remove parse.c.
1891         * cp-tree.h (DEFARG_TOKENS): New macro.
1892         (default_arg): New structure.
1893         (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
1894         (lang_tree_node): Add default_arg.
1895         (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
1896         (type_info_ref_type): New macro.
1897         (saved_scope): Make processing_explicit_instantiation a boolean.
1898         (check_access): New field.
1899         (unparsed_text): Remove.
1900         (language_function): Remove unparsed_inlines.
1901         (error_operand_p): New macro.
1902         (lang_decl): Adjust pending_inline_info.
1903         (DEFARG_POINTER): Remove.
1904         (tag_types): Add typenames.
1905         (lookup_ualified_name): Declare.
1906         (lookup_name_real): Likewise.
1907         (shadow_tag): Adjust prototype.
1908         (get_scope_of_declarator): Declare it.
1909         (process_next_inline): Remove it.
1910         (check_for_missing_semicolon): Likewise.
1911         (maybe_get_template_decl_from_type_decl): Declare it.
1912         (finish_label_stmt): Adjust prototype.
1913         (finish_non_static_data_meber): Declare it.
1914         (finish_pseudo_destructor_call_expr): Rename to ...
1915         (finish_pseudo_destructor_expr): ... this.
1916         (finish_compound_literal): Declare it.
1917         (begin_inline_definitions): Remove it.
1918         (init_spew): Remove.
1919         (peekyylex): Likewise.
1920         (arbitrate_lookup): Likewise.
1921         (frob_opname): Likewise.
1922         (maybe_snarf_defarg): Likewise.
1923         (add_defarg_fn): Likewise.
1924         (do_pending_defargs): Likewise.
1925         (done_pending_defargs): Likewise.
1926         (unprocessed_defarg_fn): Likewise.
1927         (replace_defarg): Likewise.
1928         (end_input): Likewise.
1929         (get_overloaded_fn): Likewise.
1930         * cvt.c (convert_to_reference): Improve error handling.
1931         * decl.c (lookup_name_real): Do not declare it static.
1932         (maybe_push_to_top_level): Set check_access.
1933         (identifier_type_value): Adjust call to lookup_name_real.
1934         (lookup_qualified_name): New method.
1935         (lookup_name_real): Remove special-case parsing code.
1936         (lookup_name-nonclass): Adjust call to lookup_name_real.
1937         (lookup_name_namespace_only): Likewise.
1938         (lookup_name): Likewise.
1939         (check_tag_decl): Return the type declared.
1940         (shadow_tag): Likewise.
1941         (register_dtor_fn): Tweak check_access.
1942         (grokfndecl): Use constructor_name_p.
1943         (get_scope_of_declarator): New function.
1944         (grokdeclarator): Obscure tweaks for slightly different declarator
1945         representations.
1946         (start_method): Return error_mark_node to indicate failure.
1947         (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
1948         * decl2.c (constructor_name_full): Simplify.
1949         (constructor_name): Use it.
1950         (build_expr_from_tree): Adjust for changes to do new parser.
1951         (push_scope): Improve robustness.
1952         (validate_nonmember_using_decl): Process declarations, not names.
1953         (do_class_using_decl): Likewise.
1954         (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
1955         here.
1956         * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
1957         * expr.c (cxx_expand_expr): Handle BASELINKs.
1958         * init.c (member_init_ok_or_else): Issue more errors.
1959         (build_offset_ref): Tweak handling of FUNCTION_DECLs.
1960         * lex.c: Do not include parse.h.
1961         (yypring): Do not declare.
1962         (yylval): Likewise.
1963         (make_reference_declarator): Remove error-generating code.
1964         (rid_to_yy): Remove.
1965         (cxx_init): Do not call init_spew.
1966         (yypring): Remove.
1967         (check_for_missing_semicolon): Remove.
1968         * lex.h (got_scope): Remove.
1969         (got_object): Remove.
1970         * method.c (hack_identifier): Use finish_non_static_data_member.
1971         (implicitly_declare_fn): Adjust use of constructor_name.
1972         * parser.c: New file.
1973         * pt.c (parse.h): Do not include it.
1974         (maybe_get_template_decl_from_template): Do not declare it.
1975         (finish_member_template_decl): Tweak.
1976         (begin_explicit_instantiation): Adjust for
1977         processing_explicit_instantiation being boolean.
1978         (end_explicit_instantiation): Likewise.
1979         (maybe_process_partial_specialization): Tighten specialization
1980         test.
1981         (retrieve_local_specialization): Adjust ue of hash table.
1982         (eq_local_specializations): New function.
1983         (register_local_specialization): Likewise.
1984         (push_template_decl_real): Remove unnecessary test.
1985         (maybe_get_template_decl_from_type_decl): Don't make it static.
1986         (for_each_template_parm_r): Handle TYPEOF_TYPE.
1987         (tsubst_copy): Use retrieive_local_specialization to handle
1988         PARM_DECL.  Adjust handling of CONST_DECLs.  Handle BASELINKs.
1989         Handle COMPONENT_REFs with pseudo-destructor-expressions.
1990         Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
1991         (tsubst_expr): Pass decls, not names, to do_local_using_decl.
1992         (unify): Tweak handling of CONST_DECLs.
1993         (regenerate_decl_from_template): Use push_nested_class.
1994         (template_for_substitution): New funciton.
1995         (instantiate_decl): Use it.  Register parameters as local
1996         specializations.
1997         * rtti.c (init_rtti_processing): Set type_info_ref_type.
1998         (build_typeid): Use it.
1999         (get_typeid): Likeise.
2000         * search.c (accessible_p): Use check_access, not
2001         flag_access_control.
2002         (adjust_result_of_qualified_name_lookup): Pay attention to the
2003         context_class.
2004         * semantics.c (finish_asm_stmt): Adjust error handling.
2005         (finish_label_stmt): Return the statement.
2006         (finish_non_static_data_member): New function.
2007         (finish_class_expr): Handle BASELINKs.
2008         (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
2009         (finish_object_call_expr): Simplify handling during templates.
2010         (finish_pseudo_destructor_call_expr): Rename to ...
2011         (finish_pseudo_dtor_expr): ... this.
2012         (finish_compound_literal): New function.
2013         (begin_inline_definitions): Remove.
2014         (finish_sizeof): Remove special template handling.
2015         * spew.c: Do not include parse.h.
2016         * tree.c (get_overloaded_fn): Remove.
2017         * typeck.c (build_class_member_access_expr): Handle
2018         PSEUDO_DTOR_EXPR.  Adjust handling of static member functions.
2019         (lookup_destructor): New function.
2020         (finish_class_member_access_expr): Use it.
2021         (convert_arguments): Simplify.
2022         (build_unary_op): Handle BASELINKs.
2023
2024 2002-12-26  Nathan Sidwell  <nathan@codesourcery.com>
2025
2026         PR c++/4803
2027         * decl2.c (mark_used): Defer inline functions.
2028         (finish_file): Merge deferred_fns loops. Check all used
2029         inline functions have a definition.
2030         * method.c (make_thunk): Thunks are not inline.
2031
2032         PR c++/5116, c++/764
2033         * call.c (build_new_op): Make sure template class operands are
2034         instantiated.
2035
2036 2002-12-24  Nathan Sidwell  <nathan@codesourcery.com>
2037
2038         PR C++/7964
2039         * cp-tree.h (resolve_scoped_fn_name): Prototype.
2040         * call.c (resolve_scoped_fn_name): New function. Deal with
2041         more template expansion. Broken out of ...
2042         * parse.y (parse_finish_call_expr): ... here. Call it.
2043         * decl2.c (build_expr_from_tree, CALL_EXPR): Use
2044         resolve_scoped_fn_name and build_call_from_tree.
2045
2046         PR c++/9053
2047         * decl.c (duplicate_decls): Templates may be disambiguated by
2048         return type.
2049
2050         PR c++/8702
2051         * decl2.c (check_classfn): Use lookup_fnfield_1. List all
2052         conversion operators on failure.
2053
2054 2002-12-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2055
2056         Remove traditional C constructs 2/n.
2057         * call.c (tourney, build_field_call, equal_functions, joust,
2058         compare_ics, build_over_call, build_java_interface_fn_ref,
2059         convert_like_real, op_error, build_object_call, resolve_args,
2060         build_vfield_ref, check_dtor_name, build_scoped_method_call,
2061         build_addr_func, build_call, build_method_call, null_ptr_cst_p,
2062         sufficient_parms_p, build_conv, non_reference, strip_top_quals,
2063         standard_conversion, reference_related_p,
2064         reference_compatible_p, convert_class_to_reference,
2065         direct_reference_binding, reference_binding,
2066         ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
2067         add_template_conv_candidate, any_viable, any_strictly_viable,
2068         build_this, splice_viable, print_z_candidates,
2069         build_user_type_conversion, build_new_function_call,
2070         conditional_conversion, build_conditional_expr, build_new_op,
2071         build_op_delete_call, enforce_access, call_builtin_trap,
2072         convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
2073         convert_default_arg, type_passed_as, convert_for_arg_passing,
2074         in_charge_arg_for_name, is_properly_derived_from,
2075         maybe_handle_implicit_object, maybe_handle_ref_bind,
2076         source_type, add_warning, can_convert, can_convert_arg,
2077         perform_implicit_conversion, can_convert_arg_bad,
2078         initialize_reference, add_conv_candidate,
2079         add_template_candidate_real, add_template_candidate): Ansify.
2080
2081 2002-12-22  Nathan Sidwell  <nathan@codesourcery.com>
2082
2083         PR c++/8572
2084         * cp-tree.h (grokoptypename): Add SCOPE parameter.
2085         * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
2086         if in a template scope.
2087         * parse.y (unoperator): Return the scope.
2088         (operator_name): Adjust grokoptypename call.
2089
2090 2002-12-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2091
2092         * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
2093         * decl.c (make_unbound_class_template): Adjust.  Check for tf_error.
2094         * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
2095
2096 2002-12-20  Kazu Hirata  <kazu@cs.umass.edu>
2097
2098         * ChangeLog: Fix a typo.
2099         * class.c: Fix comment typos.
2100         * cp-tree.h: Likewise.
2101
2102 2002-12-18  Jason Merrill  <jason@redhat.com>
2103
2104         Handle anonymous unions at the tree level.
2105         C++ ABI change: Mangle anonymous unions using the name of their
2106         first named field (by depth-first search).  Should not cause
2107         binary compatibility problems, though, as the compiler previously
2108         didn't emit anything for affected unions.
2109         * cp-tree.def (ALIAS_DECL): New tree code.
2110         * decl2.c (build_anon_union_vars): Build ALIAS_DECLs.  Return the
2111         first field, not the largest.
2112         (finish_anon_union): Don't mess with RTL.  Do set DECL_ASSEMBLER_NAME,
2113         push the decl, and write it out at namespace scope.
2114         * decl.c (lookup_name_real): See through an ALIAS_DECL.
2115         (pushdecl): Add namespace bindings for ALIAS_DECLs.
2116         * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
2117         of a decl which doesn't have one.
2118         * typeck.c (build_class_member_access_expr): Don't recurse if
2119         we already have the type we want.
2120
2121 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2122
2123         PR c++/8099
2124         * friend.c (make_friend_class): Allow partial specialization
2125         when declaration is not a template friend.
2126
2127 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2128
2129         PR c++/3663
2130         * pt.c (lookup_template_class): Copy TREE_PRIVATE and
2131         TREE_PROTECTED to created decl nodes.
2132
2133 2002-12-18  Mark Mitchell  <mark@codesourcery.com>
2134
2135         * class.c (build_base_field): Do not set DECL_PACKED on the
2136         FIELD_DECL.
2137
2138 2002-12-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2139
2140         * cp-tree.h (struct tree_srcloc): Use location_t.
2141         (SOURCE_LOCUS): New.
2142         (SRCLOC_FILE, SRCLOC_LINE): Adjust.
2143
2144 2002-12-17  Jason Merrill  <jason@redhat.com>
2145
2146         * decl.c (finish_function): Also complain about no return in
2147         templates.
2148         * semantics.c (finish_return_stmt): Also call check_return_expr in
2149         templates.
2150         * typeck.c (check_return_expr): In a template, just remember that we
2151         saw a return.
2152
2153 2002-12-16  Jason Merrill  <jason@redhat.com>
2154
2155         * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
2156         of the CALL_EXPR.
2157
2158         * semantics.c (do_pushlevel): Call pushlevel after adding the
2159         SCOPE_STMT.
2160         (do_poplevel): Call poplevel before adding the SCOPE_STMT.
2161         * parse.y (function_body): Go back to using compstmt.
2162         * decl.c (pushdecl): Skip another level to get to the parms level.
2163
2164         * call.c (build_new_method_call): Use is_dummy_object to determine
2165         whether or not to evaluate the object parameter to a static member
2166         function.
2167
2168 2002-12-14  Jason Merrill  <jason@redhat.com>
2169
2170         * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
2171         return slot for normal functions.  Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
2172         * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
2173         don't bother with an AGGR_INIT_EXPR.
2174         (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
2175         just generate a new decl normally.  Take return slot parm.
2176         * cp-tree.h: Adjust prototype.
2177
2178 2002-12-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2179
2180         PR C++/8031
2181         * cvt.c (convert_to_pointer_force): Don't try comparing against
2182         erronous type.
2183
2184 2002-12-13  Geoffrey Keating  <geoffk@apple.com>
2185
2186         * cp-tree.h: Have the multiple-include guards around
2187         the entire file.
2188
2189 2002-12-10  David Edelsohn  <edelsohn@gnu.org>
2190
2191         * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
2192         for SPEW_DEBUG.
2193         (snarf_method): Same.
2194         (snarf_defarg): Same.
2195
2196 2002-12-10  Mark Mitchell  <mark@codesourcery.com>
2197
2198         PR c++/8372
2199         * pt.c (tsubst_copy): Handle destructor names more correctly.
2200
2201 2002-12-10  Matt Austern   <austern@apple.com>
2202
2203         * cp-tree.h: get rid of needs_virtual_reinit bit.
2204
2205 2002-12-09  Mark Mitchell  <mark@codesourcery.com>
2206
2207         * NEWS: Document removal of in-class initialization extension for
2208         static data members of non-arithmetic, non-enumeration type.
2209         * decl.c (check_static_variable_definition): Do not allow that
2210         extension.
2211         * decl2.c (grokfield): Do not call digest_init when processing
2212         templates.
2213
2214 2002-12-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2215
2216         * error.c (dump_expr): Fix format specifier warning.
2217
2218 2002-12-04  Geoffrey Keating  <geoffk@apple.com>
2219
2220         * class.c (finish_struct_1): Correct comment.
2221         * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
2222
2223 2002-12-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2224
2225         PR C++/8799
2226         * error.c (dump_expr): Don't ever try to dump a non-existent
2227         expression.
2228
2229 2002-12-03  Nathan Sidwell  <nathan@codesourcery.com>
2230
2231         Implement covariant returns.
2232         * cp-tree.h (IS_AGGR_TYPE_2): Remove.
2233         (struct lang_decl_flags): Add this_thunk_p flag.
2234         Rename vcall_offset to virtual_offset.
2235         (struct lang_decl): Rename delta to fixed_offset.
2236         (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
2237         (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
2238         (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
2239         (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
2240         (make_thunk): Add this_adjusting arg.
2241         (finish_thunk): Declare.
2242         (mangle_thunk): Add this_adjusting arg.
2243         * class.c (get_vcall_index): Use base function for lookup.
2244         (update_vtable_entry_for_fn): Generate covariant thunk.
2245         (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
2246         (build_vtbl_initializer): Use base function for lookup.
2247         Finish covariant thunk here. Adjust thunk generation.
2248         * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
2249         Adjust thunk dumping.
2250         * mangle.c (mangle_call_offset): New function.
2251         (mangle_thunk): Adjust for covariant thunks.
2252         * method.c (make_thunk): Adjust. Do not set name here.
2253         (finish_thunk): New function. Set name here.
2254         (use_thunk): Generate covariant thunks too.
2255         (thunk_adjust): New function.
2256         * search.c (covariant_return_p): Remove. Fold into ...
2257         (check_final_overrider): ... here. Simplify.
2258         * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
2259
2260 2002-12-03  Jason Merrill  <jason@redhat.com>
2261
2262         PR c++/8674
2263         * call.c (build_over_call): Check specifically for TARGET_EXPR
2264         when eliding.
2265
2266         PR c++/8461, c++/8625
2267         * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
2268         (cp_convert_parm_for_inlining): Remove.
2269         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
2270         Remove.
2271         * cp-tree.h (ADDR_IS_INVISIREF): Remove.
2272         * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
2273
2274         * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
2275         an ambiguous conversion.
2276
2277 2002-12-03  Mark Mitchell  <mark@codesourcery.com>
2278
2279         PR c++/8688
2280         * decl.c (reshape_init): Handle erroneous initializers.
2281
2282 2002-12-02  Mark Mitchell  <mark@codesourcery.com>
2283
2284         PR c++/8720
2285         * spew.c (remove_last_token): Make sure that last_chunk is set
2286         correctly.
2287
2288         PR c++/8615
2289         * error.c (dump_expr): Handle character constants with
2290         TREE_OVERFLOW set.
2291
2292 2002-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2293
2294         DR 180
2295         * decl.c (grokdeclarator): Require class-key for all friend class.
2296         Output the correct type and context in the error message.
2297
2298 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
2299
2300         PR c++/5919
2301         * pt.c (unify): Use variably_modified_type_p to test validity of
2302         template argument types.
2303
2304         PR c++/8727
2305         * cp-tree.h (lang_type_class): Add typeinfo_var.
2306         (CLASSTYPE_TYPEINFO_VAR): New macro.
2307         * rtti.c (get_tinfo_decl): Use it.
2308
2309         PR c++/8663
2310         * init.c (expand_member_init): Always get the main variant of a
2311         base class.
2312
2313 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
2314
2315         PR c++/8332
2316         PR c++/8493
2317         * decl.c (cxx_init_decl_processing): Use size_type_node, not
2318         c_size_type_node.
2319         * decl2.c (coerce_new_type): Likewise.
2320         * except.c (do_allocate_exception): Likewise.
2321
2322 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
2323
2324         * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
2325         dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
2326         lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
2327         repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
2328         typeck2.c: Include coretypes.h and tm.h.
2329         * Make-lang.in: Update dependencies.
2330
2331 2002-11-30  Mark Mitchell  <mark@codesourcery.com>
2332
2333         PR c++/8227
2334         * decl.c (layout_var_decl): Deal gracefully with erroneous types.
2335         (check_initializer): Validate the type of the initialized
2336         variable, even if the initializer is absent.
2337         * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
2338
2339         PR c++/8214
2340         * typeck.c (convert_for_assignment): Do not use
2341         decl_constant_value on the operand.
2342
2343         PR c++/8511
2344         * pt.c (instantiate_decl): Handle template friends defined outside
2345         of the class correctly.
2346
2347 2002-11-29  Joe Buck <jbuck@synopsys.com>
2348
2349         * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
2350         anonymous structs.
2351
2352 2002-11-29  Mark Mitchell  <mark@codesourcery.com>
2353
2354         * class.c (walk_subobject_offsets): Recur on binfos as well as on
2355         types.
2356         (layout_nonempty_base_or_field): Pass it a binfo when processing a
2357         base class.
2358         (layout_empty_base): Likewise.
2359         (build_base_field): Likewise.
2360
2361 2002-11-27  Mark Mitchell  <mark@codesourcery.com>
2362
2363         * class.c (build_base_field): Make sure we get the canonical base
2364         when descending through primary bases.
2365
2366 2002-11-26  Geoffrey Keating  <geoffk@apple.com>
2367
2368         * decl.c (check_initializer): Don't error on initialisation of
2369         a scalar with a brace-enclosed expression.
2370
2371 2002-11-26  Nathan Sidwell  <nathan@codesourcery.com>
2372
2373         * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
2374         (template_parms_equal): Remove prototype.
2375         * typeck.c (buuld_indirect_ref): Reformat.
2376
2377 2002-11-25  Jason Merrill  <jason@redhat.com>
2378
2379         * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
2380         and a DO_STMT.
2381
2382 2002-11-25  Mark Mitchell  <mark@codesourcery.com>
2383
2384         * tree.c (cp_build_qualified_type_real): Correct handling of
2385         array types.
2386         * class.c (walk_subobject_offsets): Fix thinko.
2387         (build_base_field): Record offsets of empty bases in primary
2388         virtual bases.
2389         (layout_class_type): Record offsets of empty bases in fields.
2390
2391         * search.c (is_subobject_of_p_1): Fix thinko.
2392         (lookup_field_queue_p): Likewise.
2393
2394 2002-11-24  Mark Mitchell  <mark@codesourcery.com>
2395
2396         * class.c (layout_class_type): Reuse tail padding when laying out
2397         virtual bases.
2398
2399 2002-11-22  Mark Mitchell  <mark@codesourcery.com>
2400
2401         * rtti.c (qualifier_flags): Fix thinko.
2402
2403 2002-11-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2404
2405         Remove traditional C constructs 1/n.
2406         * cp-tree.h (init_method, set_mangled_name_for_decl,
2407         build_opfncall, hack_identifier, make_thunk, use_thunk,
2408         synthesize_method, implicitly_declare_fn,
2409         skip_artificial_parms_for, optimize_function, calls_setjmp_p,
2410         maybe_clone_body): Remove use of PARAMS.
2411
2412         * method.c (do_build_assign_ref, do_build_copy_constructor,
2413         synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
2414         Likewise.
2415         (synthesize_method): Use 'bool' type and constants instead of
2416         'int'.
2417         (locate_copy): Likewise.
2418         (implicitly_declare_fn): Likewise.
2419
2420         * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
2421         Remove old-style declaration.
2422         (maybe_clone_body): Use 'bool' type and constants.
2423
2424 2002-11-21  Glen Nakamura  <glen@imodulo.com>
2425
2426         PR c++/8342
2427         * typeck.c (get_member_function_from_ptrfunc): Make sure that a
2428         SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
2429         of the branches of a COND_EXPR.
2430
2431 2002-11-19  Mark Mitchell  <mark@codesourcery.com>
2432
2433         * pt.c (for_each_template_parm): Free allocated memory.
2434         * search.c (is_subobject_of_p_1): New function.
2435         (is_subobject_of_p): Avoid walking virtual bases multiple times.
2436
2437 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
2438
2439         * g++spec.c (lang_specific_spec_functions): New.
2440
2441 2002-11-15  Kazu Hirata  <kazu@cs.umass.edu>
2442
2443         * ChangeLog: Follow spelling conventions.
2444         * class.c: Likewise.
2445         * decl2.c: Likewise.
2446
2447 2002-11-14  Zack Weinberg  <zack@codesourcery.com>
2448
2449         * search.c (dfs_push_decls): Do not try to reorder elements
2450         3..n of method_vec if method_vec has only two elements.
2451         Reverse order of two tests to avoid accessing unallocated
2452         memory.
2453
2454 2002-11-14  Mark Mitchell  <mark@codesourcery.com>
2455
2456         * class.c (dfs_find_final_overrider): Adjust so that the most
2457         derived object is a binfo, rather than a class type.
2458         (find_final_overrider): Likewise.
2459         (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
2460         (add_vcall_offset): Likewise.
2461
2462 2002-11-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2463
2464         PR c++/8389
2465         * pt.c (instantiate_template): Push class scope for member
2466         functions.
2467         (get_mostly_instantiated_function_type): Likewise.  Don't call
2468         tsubst on context.  Remove CONTEXTP and TPARMSP parameters.
2469         * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
2470         * mangle.c (write_encoding, write_unqualified_name): Adjust.
2471
2472 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
2473
2474         * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
2475         vcall offfsets.  Split out ...
2476         (add_vcall_offset): ... new function.
2477
2478         PR c++/8338
2479         * pt.c (for_each_template_parm): Add htab parameter.
2480         (process_partial_specialization): Adjust call.
2481         (push_template_decl_real): Likewise.
2482         (pair_fn_data): Add visited.
2483         (for_each_template_parm_r): Avoid walking duplicates more than
2484         once.
2485         (uses_template_parms): Adjust call to for_each_template_parm.
2486
2487 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
2488
2489         * class.c (add_implicitly_declared_members): Put implicitly
2490         declared functions at the end of TYPE_METHODs when -fabi-version
2491         is at least 2.
2492
2493 2002-11-05  Geoffrey Keating  <geoffk@apple.com>
2494
2495         * decl2.c (finish_file): Correct spelling.
2496
2497 2002-11-03  Mark Mitchell  <mark@codesourcery.com>
2498
2499         * call.c (build_special_member_call): Do not try to lookup VTTs by
2500         name.
2501         * class.c (vtbl_init_data): Add generate_vcall_entries.
2502         (get_vtable_decl): Do not look up virtual tables by name.
2503         (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
2504         (set_primary_base): Do not set CLASSTYPE_RTTI.
2505         (determine_primary_base): Likewise.
2506         (get_matching_virtual): Remove.
2507         (get_vcall_index): New function.
2508         (update_vtable_entry_for_fn): Do not try to use virtual thunks
2509         when they are not required.  Assign vcall indices at this point.
2510         (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
2511         Do update dynamic_classes.
2512         (build_vtt): Do not add VTTs to the symbol table.
2513         (build_ctor_vtbl_group): Likewise.
2514         (build_vtbl_initializer): Simplify handling of vcall indices.
2515         (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
2516         for the most derived class.
2517         (add_vcall_offset_vtbl_entries_1): But do not actually add them to
2518         the vtable.
2519         * cp-tree.h (dynamic_classes): New macro.
2520         (lang_type_class): Remove rtti.  Add vtables.  Add vcall_indices.
2521         (CLASSTYPE_RTTI): Remove.
2522         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
2523         (CLASSTYPE_VCALL_INDICES): New macro.
2524         (CLASSTYPE_VTABLES): Likewise.
2525         (BV_USE_VCALL_INDEX_P): Remove.
2526         (build_vtable_path): Remove.
2527         * decl2.c (finish_vtable_vardecl): Remove.
2528         (key_method): Remove #if 0'd code.
2529         (finish_vtable_vardecl): Rename to ...
2530         (maybe_emit_vtables): ... this.
2531         (finish_file): Use it.
2532         * search.c (look_for_overrides_here): Update comment.
2533
2534 2002-11-01  Zack Weinberg  <zack@codesourcery.com>
2535
2536         PR c/7353 redux
2537         * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
2538
2539 2002-10-30  Jason Merrill  <jason@redhat.com>
2540
2541         PR c++/8186
2542         * cp-tree.h (ADDR_IS_INVISIREF): New macro.
2543         * call.c (convert_for_arg_passing): Set it.
2544         * except.c (stabilize_throw_expr): Recurse for such an arg.
2545
2546 2002-10-31  Mark Mitchell  <mark@codesourcery.com>
2547
2548         * cp-tree.h (lang_decl_flags): Remove init_priority.
2549         (lang_decl): Add delta.
2550         (GLOBAL_INIT_PRIORITY): Remove.
2551         (THUNK_DELTA): Revise definition.
2552         * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
2553         * dump.c (cp_dump_tree): Don't dump it.
2554
2555 2002-10-30  Mark Mitchell  <mark@codesourcery.com>
2556
2557         PR c++/8160
2558         * typeck2.c (process_init_constructor): Call complete_array_type.
2559
2560         PR c++/8149
2561         * decl.c (make_typename_type): Issue errors about invalid results.
2562
2563 2002-10-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2564
2565         Core issue 287, PR c++/7639
2566         * cp-tree.h (lang_type_class): Add decl_list field.
2567         (CLASSTYPE_DECL_LIST): New macro.
2568         (maybe_add_class_template_decl_list): Add declaration.
2569         * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
2570         (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
2571         (maybe_add_class_template_decl_list): New function.
2572         (add_implicitly_declared_members): Use it.
2573         * decl.c (maybe_process_template_type_declaration): Likewise.
2574         (pushtag): Likewise.
2575         * friend.c (add_friend): Likewise.
2576         (make_friend_class): Likewise.
2577         * semantics.c (finish_member_declaration): Likewise.
2578         (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
2579         * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
2580         to process members and friends in the order of declaration.
2581
2582 2002-10-29  Mark Mitchell  <mark@codesourcery.com>
2583
2584         PR c++/8287
2585         * decl.c (finish_destructor_body): Create the label to jump to
2586         when returning from a destructor here.
2587         (finish_function_body): Rather than here.
2588
2589 2002-10-25  Zack Weinberg  <zack@codesourcery.com>
2590
2591         PR c++/7266
2592         * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
2593         SCOPE_REF is not null before dereferencing it.
2594
2595 2002-10-25  Mark Mitchell  <mark@codesourcery.com>
2596
2597         * call.c (build_over_call): Use DECL_CONTEXT, not
2598         DECL_VIRTUAL_CONTEXT.
2599         * class.c (modify_vtable_entry): Don't mess with
2600         DECL_VIRTUAL_CONTEXT.
2601         (set_vindex): Remove.
2602         (set_primary_base): Remove vfuns_p parameter.
2603         (determine_primary_base): Likewise.
2604         (modify_all_vtables): Likewise.
2605         (layout_class_type): Likewise.  Adjust calls to other functions
2606         accordingly.
2607         (finish_struct_1): Adjust calls to modified functions.  Set
2608         DECL_VINDEX here.
2609         * cp-tree.h (lang_type_class): Remove vsize.
2610         (CLASSTYPE_VSIZE): Remove.
2611         (lang_decl): Remove thunks.
2612         (DECL_THUNKS): Adjust.
2613         (DECL_VIRTUAL_CONTEXT): Remove.
2614         (duplicate_decls): Don't copy it.
2615         * pt.c (build_template_decl): Don't set it.
2616         (tsubst_decl): Likewise.
2617         * typeck.c (expand_ptrmemfunc_cst): Don't use it.
2618
2619         * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
2620         (build_vtable_entry): Remove.
2621         * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
2622         (lang_decl): Add thunks.
2623         (DECL_THUNKS): New macro.
2624         * decl.c (duplicate_decls): Copy it.
2625         * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
2626         * semantics.c (emit_associated_thunks): Simplify.
2627
2628 2002-10-24  David Edelsohn  <edelsohn@gnu.org>
2629
2630         PR c++/7228
2631         * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
2632         lang_type structure exists before accessing field.
2633         (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
2634         (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
2635         (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
2636         * class.c (check_field_decls): Use new macros.
2637         * typeck2.c (process_init_constructor): Remove redundant check for
2638         existence of lang_type structure.
2639
2640 2002-10-24  Mark Mitchell  <mark@codesourcery.com>
2641
2642         * class.c (end_of_base): New method.
2643         (end_of_class): Use it.  Check indirect virtual bases.
2644
2645         * class.c (check_field_decls): Fix typo.
2646
2647 2002-10-23  Mark Mitchell  <mark@codesourcery.com>
2648
2649         PR c++/8067
2650         * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
2651         related variables.
2652
2653         PR c++/7679
2654         * spew.c (next_token): Do not return an endless stream of
2655         END_OF_SAVED_INPUT tokens.
2656         (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
2657         the cached token stream.
2658         (snarf_defarg): Likewise.
2659
2660 2002-10-23  Zack Weinberg  <zack@codesourcery.com>
2661
2662         * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
2663         variably_modified_type_p.
2664         * cp-tree.h: Remove prototype of variably_modified_type_p.
2665         * tree.c (variably_modified_type_p): Remove; now implemented
2666         in language-independent code.
2667
2668 2002-10-22  Mark Mitchell  <mark@codesourcery.com>
2669
2670         PR c++/6579
2671         * spew.c (snarf_parenthesized_expression): New function.
2672         (snarf_block): Use it.
2673
2674 2002-10-22  Richard Henderson  <rth@redhat.com>
2675
2676         * method.c (use_thunk): Always compute vcall_value; assert that
2677         it is not zero.  Use can_output_mi_thunk; use output_mi_thunk
2678         for vcall thunks as well.
2679
2680 2002-10-21  Mark Mitchell  <mark@codesourcery.com>
2681
2682         * class.c (empty_base_at_nonzero_offset_p): New function.
2683         (layout_nonempty_base_or_field): Do not check for conflicts when
2684         laying out a virtual base using the GCC 3.2 ABI.
2685         (build_base_field): Correct checking for presence of empty classes
2686         at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
2687
2688         * class.c (include_empty_classes): Use normalize_rli.
2689         (layout_class_type): Likewise.
2690
2691         * decl.c (reshape_init): Tweak handling of character arrays.
2692
2693         PR c++/8218
2694         * cp-tree.h (lang_type_class): Add contains_empty_class_p.
2695         (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
2696         * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
2697         (check_field_decls): Likewise.
2698         (layout_class_type): Likewise.
2699         (finish_struct_1): Initialize it.
2700         (walk_subobject_offsets): Use it to prune searches.
2701
2702 2002-10-20  Mark Mitchell  <mark@codesourcery.com>
2703
2704         * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
2705         * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
2706         TARGET_ASM_OUTPUT_MI_THUNK in comments.
2707
2708 2002-10-18  Zack Weinberg  <zack@codesourcery.com>
2709
2710         * decl.c (start_decl): Point users of the old initialized-
2711         typedef extension at __typeof__.
2712
2713 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
2714
2715         * Make-lang.in (method.o): Depend on TARGET_H.
2716         * method.c (target.h): Include it.
2717         (use_thunk): Use target hooks.  Use vcall thunks, if available.
2718
2719 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
2720
2721         * class.c (base_derived_from): Make sure return value is a bool.
2722
2723 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
2724
2725         * class.c (find_final_overrider_data_s): Remove overriding_fn and
2726         overriding_base.
2727         (dfs_base_derived_from): New function.
2728         (base_derived_from): Likewise.
2729         (dfs_find_final_overrider): Use base_derived_from.
2730         (find_final_overrider): Adjust.
2731
2732 2002-10-18  Jason Merrill  <jason@redhat.com>
2733
2734         PR c++/8080
2735         * semantics.c (finish_for_cond, finish_while_cond): Don't mess
2736         with condition decls in a template.
2737
2738 2002-10-17  Nathan Sidwell  <nathan@codesourcery.com>
2739
2740         * class.c (add_method): Compare template parms too.
2741
2742 2002-10-17  Mark Mitchell  <mark@codesourcery.com>
2743
2744         PR c++/7584
2745         * class.c (handle_using_decl): Allow the declaration used to be
2746         from an ambiguous base.
2747
2748         * pt.c (convert_template_argument): Revert this change:
2749                 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
2750                 * pt.c (convert_template_argument): Do not fold non-type
2751                 template rguments when inside a template.
2752
2753         * init.c (expand_default_init): Handle brace-enclosed initializers
2754         correctly.
2755
2756 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
2757
2758         * mangle.c (write_expression): Correct handling of enumeration
2759         constants.
2760         (write_template_arg): Likewise.
2761         * pt.c (convert_template_argument): Do not fold non-type template
2762         arguments when inside a template.
2763
2764         PR c++/7478
2765         * cvt.c (convert_to_reference): Allow references as the incoming
2766         type.
2767
2768 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
2769
2770         PR c++/7524
2771         * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
2772         build_qualified_type.
2773
2774 2002-10-15  Richard Henderson  <rth@redhat.com>
2775
2776         * error.c (dump_expr): Use real_to_decimal directly, and with
2777         the new arguments.
2778
2779 2002-10-15  Mark Mitchell  <mark@codesourcery.com>
2780
2781         * decl.c (reshape_init): Fix typo.
2782
2783         * cp-tree.h (operator_name_info_t): Add arity.
2784         * lex.c (init_operators): Initialize it.
2785         * mangle.c (write_conversion_operator_name): New function.
2786         (write_unqualified_name): Use it.
2787         (write_template_args): Accept template arguments as a TREE_LIST.
2788         (write_expression): Adjust handling of qualified names to match
2789         specification.
2790
2791 2002-10-15  Jason Merrill  <jason@redhat.com>
2792
2793         * call.c (call_builtin_trap): New fn.
2794         (convert_arg_to_ellipsis): Use it.  Downgrade error to warning.
2795         (build_call): Don't set current_function_returns_abnormally outside
2796         a function.
2797
2798 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
2799
2800         * class.c (check_field_decls): Remove empty_p parameter.  Instead,
2801         clear CLASSTYPE_EMPTY_P.
2802         (build_base_field): Likewise.
2803         (build_base_fields): Likewise.
2804         (check_bases_and_members): Likewise.
2805         (create_vtbl_ptr): Likewise.
2806         (layout_class_type): Likewise.  Ensure that empty classes have
2807         size zero when used as base classes in the 3.2 ABI.
2808         (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
2809         CLASSTYPE_NEARLY_EMPTY_P.  Adjust calls to avoid passing empty_p
2810         parameter.
2811         (is_empty_class): Correct definition when using post-3.2 ABI.
2812         * cp-tree.h (lang_type_class): Add empty_p.
2813         (CLASSTYPE_EMPTY_P): New macro.
2814
2815 2002-10-12  Nathan Sidwell  <nathan@codesourcery.com>
2816
2817         * init.c (build_delete): Do not apply save_expr for arrays.
2818         (build_vec_delete): Likewise.
2819
2820 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
2821
2822         * decl.c (layout_var_decl): Call layout_decl even for variables
2823         whose type is an array with unspecified bounds.
2824
2825         PR c++/7176
2826         * lex.c (do_identifier): Add another option for the parsing
2827         parameter.
2828         * parse.y (do_id): Use it.
2829
2830 2002-10-11  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2831
2832         PRs C++/6803, C++/7721 and C++/7803
2833         * decl.c (grokdeclarator): Gracefully handle template-name as
2834         decl-specifier.
2835
2836 2002-10-11  Jason Molenda  <jmolenda@apple.com>
2837
2838         * init.c (build_field_list): Provide uses_unions_p with a default
2839         value.
2840
2841 2002-10-11  Mark Mitchell  <mark@codesourcery.com>
2842
2843         PR c++/5661
2844         * cp-tree.h (variably_modified_type_p): New function.
2845         (grokdeclarator) Tighten check for variably modified types as
2846         fields.
2847         * pt.c (convert_template_argument): Do not allow variably modified
2848         types as template arguments.
2849         * tree.c (variably_modified_type_p): New function.
2850
2851         * NEWS: Document removal of "new X = ..." extension.
2852         * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
2853         brace-enclosed initializers.
2854         * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
2855         (initialize_local_var): Remove declaration.
2856         (expand_static_init): Likewise.
2857         * decl.c (next_initializable_field): New function.
2858         (reshape_init): Likewise.
2859         (check_initializer): Use them.  Build dynamic initializer for
2860         aggregates here too.
2861         (initialize_local_var): Simplify, and incorporate cleanup
2862         insertion code as well.
2863         (destroy_local_var): Remove.
2864         (cp_finish_decl): Tidy.
2865         (expand_static_init): Fold checks for whether or not a variable
2866         needs initialization into this function.  Simplify.
2867         * decl2.c (do_static_initialization): Simplify.
2868         * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
2869         be done for us automatically.
2870         (expand_default_init): Handle brace-enclosed initializers
2871         correctly.
2872         (expand_aggr_init_1): Remove RTL-generation code.
2873         (build_vec_init): Remove "new X = ..." support.
2874         * parse.y (new_initializer): Likewise.
2875         * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
2876         brace-enclosed initializer.
2877         (create_pseudo_type_info): Likewise.
2878         * typeck2.c (store_init_value): Don't try to handle digest_init
2879         being called more than once.
2880         (digest_init): Tidy handling of brace-enclosed initializers.
2881
2882 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2883
2884         * decl.c (typename_hash): Use htab_hash_pointer.
2885
2886 2002-10-10  Jim Wilson  <wilson@redhat.com>
2887
2888         * decl.c (duplicate_decls): Don't call decl_attributes.
2889
2890 2002-10-09  Zack Weinberg  <zack@codesourcery.com>
2891
2892         PR c/7353
2893         * decl.c (start_decl): Unconditionally issue error for
2894         'typedef foo = bar'.
2895         (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
2896         (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
2897
2898 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2899
2900         * decl2.c (prune_vtable_vardecl): Delete unused function.
2901
2902 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
2903
2904         PR c++/7754
2905         * decl2.c (finish_anon_union): Do not expand anonymous unions when
2906         procesing template functions.
2907         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
2908         type. Call layout_decl.
2909         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
2910
2911 2002-10-07  Richard Henderson  <rth@redhat.com>
2912
2913         * decl2.c, pt.c: Revert c++/7754 fix.
2914
2915 2002-10-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2916
2917         PR c++/7804
2918         * error.c (dump_expr) [REAL_CST]: Output in decimal format.
2919
2920 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
2921
2922         PR c++/7931
2923         * pt.c (for_each_template_parm_r): Handle BASELINKs.
2924
2925         PR c++/7754
2926         * decl2.c (finish_anon_union): Do not expand anonymous unions when
2927         procesing template functions.
2928         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
2929         type. Call layout_decl.
2930         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
2931
2932 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
2933
2934         PR c++/8006
2935         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
2936         template parameters.
2937         (globals): Add entity and need_abi_warning.
2938         (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
2939         CLASSTYPE_TEMPLATE_INFO.
2940         (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
2941         TYPE_TI_TEMPLATE.
2942         (write_prefix): Handle typename types correctly.
2943         (write_template_prefix): Handle template template parameters
2944         correctly.
2945         (start_mangling): Add entity parameter.
2946         (finish_mangling): Warn about names whose mangling will change.
2947         (mangle_decl_string): Adjust.
2948         (mangle_type_string): Likewise.
2949         (mangle_special_for_type): Likewise.
2950         (mangle_ctor_vtbl_for_type): Likewise.
2951         (mangle_thunk): Likewise.
2952         (mangle_guard_variable): Likewise.
2953         (mangle_ref_init_variable): Likewise.
2954
2955 2002-10-02  Mark Mitchell  <mark@codesourcery.com>
2956
2957         PR c++/7188.
2958         * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
2959         * cp-tree.h (emit_base_init): Rename to ....
2960         (emit_mem_initializers): ... this.
2961         (expand_member_init): Change prototype.
2962         * init.c (perform_member_init): Compute explicit, rather than
2963         requiring it as a parameter.
2964         (sort_member_init): Rename to ...
2965         (sort_mem_initializers): ... this.  Process bases and data members
2966         together.
2967         (sort_base_init): Remove.
2968         (emit_base_init): Rename to ...
2969         (emit_mem_initializers): ... this.
2970         (expand_aggr_vbase_init_1): Remove.
2971         (construct_virtual_bases): Rename to ...
2972         (construct_virtual_base): ... this.
2973         (expand_member_init): Rework handling of base initializers.
2974         * method.c (do_build_copy_constructor): Use
2975         finish_mem_initializers.
2976         * parse.y (member_init): Adjust calls to expand_member_init.
2977         * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
2978         (tsubst_initializer_list): Use expand_member_init.
2979         * semantics.c (finish_mem_intiailizers): Simplify.
2980
2981 2002-10-02  Matt Austern  <austern@apple.com>
2982         * decl.c (walk_vtables_r): Fixed typo that caused result to
2983         never get a nonzero value.
2984
2985 2002-10-02  Roger Sayle  <roger@eyesopen.com>
2986
2987         PR optimization/6627
2988         * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
2989         from here, and move it to tree.h.
2990         * decl.c (cxx_init_decl_processing): If storing the vbit
2991         in function pointers, ensure that force_align_functions_log
2992         is atleast one.
2993
2994 2002-10-02  Matt Austern  <austern@apple.com>
2995
2996         * class.c (check_field_decls): Changed warning about const member
2997         variables so that it doesn't get issued for a class aggregate.
2998
2999 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
3000
3001         * decl.c (cp_finish_decl): Make sure array types are laid out,
3002         even if the array bounds are unknown.
3003
3004 2002-10-01  Steve Ellcey  <sje@cup.hp.com>
3005
3006         * class.c (build_vtbl_initializer): Change build_c_cast
3007         to build1.
3008
3009 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
3010
3011         * decl.c (cp_finish_decl): Make sure array types are laid out,
3012         even if the array bounds are unknown.
3013
3014         * decl.c (cp_finish_decl): Correct check for dynamic
3015         initialization of thread-local storage.
3016
3017 2002-09-30  Nathan Sidwell  <nathan@codesourcery.com>
3018
3019         * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
3020         overloaded.
3021
3022 2002-09-30  Steve Ellcey  <sje@cup.hp.com>
3023
3024         * class.c (build_vtbl_initializer): Add cast.
3025         (add_vcall_offset_vtbl_entries_1):
3026         Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
3027
3028 2002-09-30  Mark Mitchell  <mark@codesourcery.com>
3029
3030         * class.c (walk_subobject_offsets): Correct the calculation of
3031         offsets for virtual bases.  Correct the counting of array
3032         elements.
3033         (layout_nonempty_base_or_field): Simplify.  Correct the
3034         calculation of offsets to be propagated through the binfo
3035         hierarchy.
3036         (build_base_field): Avoid creating a FIELD_DECL for empty bases.
3037         Add the FIELD_DECL to TYPE_FIELDS.
3038         (build_base_fields): Adjust accordingly.
3039         (layout_virtual_bases): Use build_base_field.
3040         (end_of_class): Return a tree, not an integer.
3041         (warn_about_ambiguous_direct_bases): Rename to ...
3042         (warn_about_ambiguous_bases): ... this.
3043         (include_empty_classes): New function.
3044         (layout_class_type): Create an alternative version of the type to
3045         be used when as a base class type.  Do not call
3046         finish_record_layout until we are done laying out the class.
3047         * cp-tree.h (lang_type_class): Remove size, size_unit.  Add
3048         as_base.
3049         (CLASSTYPE_SIZE): Reimplement.
3050         (CLASSTYPE_SIZE_UNIT): Likewise.
3051         (CLASSTYPE_ALIGN): Likweise.
3052         (CLASSTYPE_USER_ALIGN): Likewise.
3053         (CLASSTYPE_AS_BASE): New macro.
3054         (DECL_INITIALIZED_P): Likewise.
3055         (extract_init): Remove prototype.
3056         (build_forced_zero_init): Rename to ...
3057         (build_zero_init): ... this.
3058         (force_store_init_value): Remove.
3059         * decl.c (obscure_complex_init): Remove.
3060         (duplicate_decls): Copy DECL_INITIALIZED_P.
3061         (check_initializer): Do not leave junk in DECL_INITIAL.
3062         (cp_finish_decl): Handle zero-initialization of entities with
3063         static storage duration.
3064         * expr.c (extract_init): Remove.
3065         * init.c (build_forced_zero_init): Remove.
3066         (build_zero_init): New function.
3067         (build_default_init): Use it.
3068         (build_field_list): Skip FIELD_DECLs for base subobjects.
3069         (push_base_cleanups): Likewise.
3070         * method.c (do_build_assign_ref): Likewise.
3071         (synthesize_exception_spec): Likewise.
3072         * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
3073         (regenerate_decl_from_template): To not set DECL_INITIAL for a
3074         static data member whose initialization took place in its class.
3075         (instantiate_decl): Do not pass an initializer to cp_finish_decl
3076         in that situation.
3077         * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
3078         (dfs_unuse_fields): Likewise.
3079         * tree.c (pod_type_p): Handle error_mark_node.
3080         (zero_init_p): Likewise.
3081         * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
3082         subobjects.
3083         * typeck2.c (store_init_value): Remove #if 0'd code.
3084         (force_store_init_value): Remove.
3085         (process_init_constructor): Use build_zero_init.
3086
3087 2002-09-29  Nathan Sidwell  <nathan@codesourcery.com>
3088
3089         PR c++/7788
3090         * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
3091
3092 2002-09-29  Kazu Hirata  <kazu@cs.umass.edu>
3093
3094         * cp-tree.h: Fix comment typos.
3095         * decl.c: Likewise.
3096         * pt.c: Likewise.
3097
3098 2002-09-25  Mark Mitchell  <mark@codesourcery.com>
3099
3100         * cp/class.c (contains_empty_class_p): New method.
3101         (walk_subobject_offsets): Correct computation of field offset.
3102         (layout_empty_base): Correct placement of emtpy base classes.
3103         (layout_class_type): Warn about ABI changes.
3104
3105 2002-09-23  Mark Mitchell  <mark@codesourcery.com>
3106
3107         * cp/class.c (layout_virtual_bases): Do not round the size of the
3108         type to a multiple of the alignment before laying out virtual bases.
3109         (layout_class_type): Correct handling of bit-fields that are wider
3110         than their type inside unions.  Round the size of the type to a
3111         even number of bytes when computing the size without virtual
3112         bases.
3113         * cp/cp-tree.h (abi_version_at_least): New macro.
3114
3115 2002-09-21  Kazu Hirata  <kazu@cs.umass.edu>
3116
3117         * ChangeLog: Follow spelling conventions.
3118         * ChangeLog.2: Likewise.
3119         * call.c: Likewise.
3120         * class.c: Likewise.
3121         * cp-tree.h: Likewise.
3122         * cvt.c: Likewise.
3123         * decl.c: Likewise.
3124         * decl2.c: Likewise.
3125         * except.c: Likewise.
3126         * friend.c: Likewise.
3127         * g++spec.c: Likewise.
3128         * init.c: Likewise.
3129         * lex.c: Likewise.
3130         * mangle.c: Likewise.
3131         * method.c: Likewise.
3132         * operators.def: Likewise.
3133         * optimize.c: Likewise.
3134         * pt.c: Likewise.
3135         * rtti.c: Likewise.
3136         * search.c: Likewise.
3137         * semantics.c: Likewise.
3138         * spew.c: Likewise.
3139         * tree.c: Likewise.
3140         * typeck.c: Likewise.
3141
3142 2002-09-18  Devang Patel  <dpatel@apple.com>
3143
3144         * cp/cp-tree.h: New prototype for walk_vtabls().
3145         * cp/decl.c (walk_vtables_r): New function.
3146         (struct cp_binding_level): Add new members, namespaces,
3147         names_size and vtables.
3148         (add_decl_to_level): Add decl in namespaces or vtables
3149         chain, if conditions match.
3150         (walk_vtables): New function.
3151         (walk_namespaces_r): Travers separate namespace chain
3152         for namespace decls.
3153         (wrapup_globals_for_namespace): Use names_size instead
3154         of list_length().
3155         * cp/decl2.c (finish_file): Use walk_vtables() instead of
3156         walk_globals() to walk vtable decls.
3157
3158 2002-09-18  Nathan Sidwell  <nathan@codesourcery.com>
3159
3160         * decl.c (grokdeclarator): Use assert, not internal_error. Don't
3161         ICE with invalid pointers & references.
3162
3163 2002-09-17  Zack Weinberg  <zack@codesourcery.com>
3164
3165         * Make-lang.in: Remove all references to the demangler.
3166         * cxxfilt.c: Moved to binutils.
3167
3168 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
3169
3170         PR c++/7718
3171         * pt.c (tsubst_decl): Remove assert.
3172
3173         Remove DR 295 implementation.
3174         * pt.c (check_cv_quals_for_unify): Disable function & method cases.
3175         * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
3176         about ignoring volatile qualifiers.
3177
3178         * search.c (lookup_member): Correct documentation.
3179
3180 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
3181
3182         * cp-tree.h (union lang_tree_node): Add chain_next option.
3183
3184 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
3185
3186         * parse.y (parse_finish_call_expr): Check lookup_member result.
3187
3188         PR c++/7015
3189         * semantic.c (finish_asm_stmt): Fix operand/output_operands
3190         thinko.
3191         * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
3192
3193 2002-09-15  Nathan Sidwell  <nathan@codesourcery.com>
3194
3195         PR c++/7919
3196         * call.c (build_over_call): Convert this pointer for fns found by
3197         using decls.
3198
3199 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
3200
3201         * ChangeLog: Follow spelling conventions.
3202         * ChangeLog.1: Likewise.
3203
3204 2002-09-14  Nathan Sidwell  <nathan@codesourcery.com>
3205
3206         PR c++/7768
3207         * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
3208
3209 2002-09-14  Kazu Hirata  <kazu@cs.umass.edu>
3210
3211         * error.c: Fix comment formatting.
3212         * except.c: Likewise.
3213         * expr.c: Likewise.
3214         * friend.c: Likewise.
3215         * g++spec.c: Likewise.
3216         * init.c: Likewise.
3217         * lex.c: Likewise.
3218         * mangle.c: Likewise.
3219         * method.c: Likewise.
3220         * optimize.c: Likewise.
3221         * pt.c: Likewise.
3222         * rtti.c: Likewise.
3223         * search.c: Likewise.
3224         * semantics.c: Likewise.
3225         * spew.c: Likewise.
3226         * tree.c: Likewise.
3227         * typeck.c: Likewise.
3228         * typeck2.c: Likewise.
3229
3230 2002-09-13  Matt Austern  <austern@apple.com>
3231
3232         PR C++/7828
3233         * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
3234         * cp/call.c: Change call-by-const-reference mechanism to use
3235         non_cast_lvalue_p when deciding whether the create a temporary.
3236         We need a temporary when passing, e.g. (long) x by const ref.
3237
3238 2002-09-13  Nathan Sidwell  <nathan@codesourcery.com>
3239
3240         * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
3241
3242 2002-09-13  Kazu Hirata  <kazu@cs.umass.edu>
3243
3244         * decl.c: Fix comment formatting.
3245         * decl2.c: Likewise.
3246
3247 2002-09-12  Kazu Hirata  <kazu@cs.umass.edu>
3248
3249         * call.c: Fix comment formatting.
3250         * class.c: Likewise.
3251         * cp-lang.c: Likewise.
3252         * cp-tree.h: Likewise.
3253         * cvt.c: Likewise.
3254
3255 2002-09-11  Zack Weinberg  <zack@codesourcery.com>
3256
3257         * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
3258         and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
3259         * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
3260         minor adjustments (use version_string, eliminate yet another
3261         duplicate of xmalloc)
3262
3263 2002-09-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3264
3265         * cp-tree.h (require_complete_eh_spec_types): Add prototype.
3266
3267 2002-09-05  Jason Merrill  <jason@redhat.com>
3268
3269         * typeck2.c (add_exception_specifier): Only pedwarn for an
3270         incomplete type.
3271         (require_complete_eh_spec_types): New fn.
3272         (cxx_incomplete_type_diagnostic): Also support pedwarning.
3273         * typeck.c (complete_type_or_diagnostic): Likewise.
3274         * call.c (build_call): Call require_complete_eh_spec_types.
3275         * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
3276         on an incomplete type.
3277
3278 2002-09-04  Jakub Jelinek  <jakub@redhat.com>
3279
3280         * decl.c (start_cleanup_fn): Clear interface_only before
3281         start_function, restore it afterwards.
3282
3283 2002-09-02  Nathan Sidwell  <nathan@codesourcery.com>
3284
3285         * cp-tree.h (finish_builtin_type): Remove.
3286         * decl2.c (finish_builtin_type): Move to common code.
3287         * decl.c (build_ptrmemfunc_type): Adjust.
3288         * rtti.c (create_pseudo_type_info): Adjust.
3289         (create_tinfo_types): Adjust.
3290
3291 2002-08-31  Jason Merrill  <jason@redhat.com>
3292
3293         * cp-lang.c (cp_expr_size): Allow initialization from a
3294         CONSTRUCTOR.
3295
3296 2002-08-30  Richard Henderson  <rth@redhat.com>
3297
3298         PR opt/7515
3299         * tree.c: Include target.h.
3300         (cp_cannot_inline_tree_fn): Don't auto-inline functions that
3301         don't bind locally.
3302         * Makefile.in (tree.o): Update.
3303
3304 2002-08-27  Mark Mitchell  <mark@codesourcery.com>
3305
3306         * class.c (layout_virtual_bases): Warn about bugs in G++ that
3307         result in incorrect object layouts.
3308         (layout_class_type): Likewise.
3309
3310 2002-08-24  Matt Austern  <austern@apple.com>
3311
3312         * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
3313         are allowable.
3314         (real_lvalue_p): Update caller.
3315         (lvalue_p): Ditto.
3316         (non_cast_lvalue_or_else): New.
3317         * tree.h: Declare it.
3318         * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
3319
3320 2002-08-22  Mark Mitchell  <mark@codesourcery.com>
3321
3322         * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
3323         and COND_EXPR specially; fix error message output.
3324
3325 2002-08-22  Jason Merrill  <jason@redhat.com>
3326
3327         * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
3328         * semantics.c (nullify_returns_r): Likewise.
3329
3330 2002-08-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3331
3332         Fix PR/7621
3333         * typeck.c (finish_class_member_access_expr): Diagnose cases where
3334         name lookup finds nothing.
3335
3336 2002-08-15  Jason Merrill  <jason@redhat.com>
3337
3338         * semantics.c (finish_then_clause): Remove redundant assignment.
3339         (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
3340         extra binding level outside the if/switch statement.
3341         (finish_while_cond, finish_for_cond): Rewrite complex condition
3342         into the loop body.
3343
3344 2002-08-15  Alexandre Oliva  <aoliva@redhat.com>
3345
3346         * parse.y (sizeof, alignof, typeof): New non-terminals to
3347         increment skip_evaluation.  Replace terminals with them and
3348         decrement skip_evaluation at the end of rules using them.
3349         * decl2.c (mark_used): Don't assemble_external if
3350         skipping evaluation.
3351
3352 2002-08-15  Gabriel Dos Reis  <gdr@nerim.net>
3353
3354         Fix PR/7504
3355         * parse.y (parse_finish_call_expr): Handle incomplete
3356         type used to name a scope.
3357
3358 2002-08-15  Nathan Sidwell  <nathan@codesourcery.com>
3359
3360         PR c++/7598
3361         * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
3362         regression caused by my 2002-08-08 patch.
3363
3364 2002-08-13  Mark Mitchell  <mark@codesourcery.com>
3365
3366         * decl.c (pushdecl_class_level): Honor requests to bind names to
3367         OVERLOADs.
3368
3369 2002-08-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3370
3371         * decl2.c (build_call_from_tree): Fix uninitialized variable.
3372         * parse.y (parse_finish_call_expr): Likewise.
3373         * repo.c (old_args, old_dir, old_main): Const-ify.
3374
3375 2002-08-11  Gabriel Dos Reis  <gdr@nerim.net>
3376
3377         * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE +
3378         DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
3379         * optimize.c (maybe_clone_body): Likewise.
3380         * pt.c (tsubst_enum): Likewise.
3381         (lookup_template_class): Likewise.
3382         * tree.c (cp_copy_res_decl_for_inlining): Likewise.
3383
3384 2002-08-10  Neil Booth  <neil@daikokuya.co.uk>
3385
3386         * lang-specs.h: Remove -ansi.
3387
3388 2002-08-10  Nathan Sidwell  <nathan@codesourcery.com>
3389
3390         * tree.c (maybe_dummy_object): Replace // with /* */
3391
3392 2002-08-09  Mark Mitchell  <mark@codesourcery.com>
3393
3394         * call.c (standard_conversion): Use build_ptrmem_type.
3395         * cp-tree.h (build_ptrmem_type): New function.
3396         (adjust_result_of_qualified_name_lookup): Likewise.
3397         * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
3398         static data members.
3399         (build_ptrmem_type): New function.
3400         (grokdeclarator): Do not use build_offset_type when encountering a
3401         qualified name.
3402         * parse.y (parse_finish_call_expr): Use
3403         adjust_result_of_qualified_name_lookup.
3404         * search.c (adjust_result_of_qualified_name_lookup): New function.
3405         * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
3406         accessing OFFSET_TYPEs directly.
3407
3408 2002-08-08  Mike Stump  <mrs@apple.com>
3409
3410         * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
3411         (type_decays_to): Likewise.
3412         * class.c (find_final_overrider): Likewise.
3413         (maybe_note_name_used_in_class): Likewise.
3414         * decl.c (current_tmpl_spec_kind): Likewise.
3415         (add_binding): Likewise.
3416         (push_class_binding): Likewise.
3417         (duplicate_decls): Likewise.
3418         (layout_var_decl): Likewise.
3419         (grokfndecl): Likewise.
3420         (grokdeclarator): Likewise.
3421         (check_default_argument): Likewise.
3422         * decl2.c (handle_class_head): Likewise.
3423         * error.c (dump_template_decl): Likewise.
3424         * init.c (build_offset_ref): Likewise.
3425         * pt.c (check_specialization_scope): Likewise.
3426         (determine_specialization): Likewise.
3427         (check_explicit_specialization): Likewise.
3428         (maybe_check_template_type): Likewise.
3429         (process_partial_specialization): Likewise.
3430         (check_default_tmpl_args): Likewise.
3431         (push_template_decl_real): Likewise.
3432         (convert_template_argument): Likewise.
3433         (try_class_unification): Likewise.
3434         (get_bindings_real): Likewise.
3435         (do_decl_instantiation): Likewise.
3436         * semantics.c (begin_function_definition): Likewise.
3437         (finish_member_declaration): Likewise.
3438         (check_multiple_declarators): Likewise.
3439         * typeck.c (comp_array_types): Likewise.
3440         (comptypes): Likewise.
3441         (expr_sizeof): Likewise.
3442         (build_binary_op): Likewise.
3443         (dubious_conversion_warnings): Likewise.
3444         (check_return_expr): Likewise.
3445
3446 2002-08-08  Mark Mitchell  <mark@codesourcery.com>
3447
3448         * typeck.c (build_class_member_access_expr): Do not return
3449         error_mark_node when no error has occurred.
3450
3451 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
3452
3453         * typeck.c (build_component_addr): Remove.
3454         (build_unary_op): Just check it's not a bitfield, and then build
3455         an ADDR_EXPR.
3456
3457 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
3458
3459         * class.c (convert_to_base): Correct check for error_mark_node.
3460         (create_vtable_ptr): Remove unused VFUNS_P parm.
3461
3462 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
3463
3464         * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
3465
3466 2002-08-07  Mark Mitchell  <mark@codesourcery.com>
3467
3468         Rework build_component_ref.
3469         * call.c (build_vfield_ref): Do not go through build_component_ref.
3470         (build_field_call): Use build_class_member_access_expr.
3471         (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
3472         (build_object_call): Likewise.
3473         * class.c (convert_to_base): New function.
3474         (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
3475         (instantiate_type): Handle BASELINKs.
3476         * cp-tree.def (BASELINK): New tree code.
3477         * cp-tree.h (BASELINK_P): Reimplement.
3478         (SET_BASELINK_P): Remove.
3479         (BASELINK_BINFO): Reimplement.
3480         (BASELINK_FUNCTIONS): Likewise.
3481         (BASELINK_ACCESS_BINFO): Likewise.
3482         (BASELINK_OPTYPE): Likewise.
3483         (convert_to_base): New function.
3484         (name_p): Likewise.
3485         (build_object_ref): Remove.
3486         (build_component_ref_1): Likewise.
3487         (build_component_ref): Likewise.
3488         (build_x_component_ref): Likewise.
3489         (build_class_member_access_expr): New function.
3490         (finish_class_member_access_expr): Likewise.
3491         (build_ptrmemfunc_access_expr): Likewise.
3492         * decl.c (grokdeclarator): Handle BASELINKs.
3493         * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
3494         finish_class_member_access_expr.
3495         (arg_assoc): Handle BASELINKs.
3496         (do_class_using_decl): Likewise.
3497         * error.c (dump_decl): Likewise.
3498         (dump_expr): Use build_ptrmemfunc_access_expr.
3499         * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
3500         destructors.
3501         (build_throw): Use BASELINK_FUNCTIONS.
3502         * init.c (perform_member_init): Use
3503         build_class_member_access_expr.
3504         (build_offset_ref): Handle BASELINKs.  Use
3505         build_class_member_access_expr.
3506         * method.c (hack_identifier): Likewise.
3507         * parse.y (do_id): Use BASELINK, not TREE_LIST.
3508         (primary): Remove uses of build_object_ref.
3509         * pt.c (lookup_template_function): Handle BASELINKs.
3510         (resolve_overloaded_unification): Likewise.
3511         * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
3512         (lookup_field): Use BASELINK, not TREE_LIST.
3513         (lookup_fnfiels): Likewise.
3514         (setup_class_bindings): Likewise.
3515         * semantics.c (finish_object_call_expr): Do not use
3516         build_method_call when we already know what function is being
3517         called.
3518         * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
3519         * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
3520         TREE_CHAIN.
3521         (name_p): New function.
3522         * typeck.c (build_object_ref): Remove.
3523         (build_component_ref_1): Likewise.
3524         (build_x_component_ref): Likewise.
3525         (build_class_member_access_expr): New function.
3526         (finish_class_member_access_expr): Likewise.
3527         (build_ptrmemfunc_access_expr): Likewise.
3528         (get_member_function_from_ptrfunc): Use
3529         build_ptrmemfunc_access_expr.
3530         (build_binary_op): Likewise.
3531         (build_unary_op): Likewise.
3532         (build_ptrmemfunc): Likewise.
3533         (pfn_from_ptrmemfunc): Likewise.
3534         * typeck2.c (build_m_component_ref): Adjust comment.
3535
3536 2002-08-07  Neil Booth  <neil@daikokuya.co.uk>
3537
3538         * Make-lang.in (CXX_C_OBJS): Update.
3539         * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
3540         * cp-tree.h (cxx_decode_option): Remove.
3541         * decl2.c (compare_options, lang_f_options, unsupported_options,
3542         cxx_decode_option): Remove.
3543
3544 2002-08-06  Gabriel Dos Reis  <gdr@nerim.net>
3545
3546         * typeck.c (build_x_unary_op): Handle pointer-to-member.
3547
3548 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
3549
3550         * class.c: Don't include obstack.h.
3551         (popclass):
3552         * decl2.c: Delete bogus comment.
3553         * error.c: Don't include obstack.h.
3554         * except.c: Likewise.
3555         (dump_type): Correct comment.
3556         * method.c: Don't include obstack.h.
3557         * tree.c: Likewise.
3558
3559 2002-08-04  Gabriel Dos Reis  <gdr@nerim.net>
3560
3561         Fix PR/2213
3562         * cvt.c (cp_convert_to_pointer): Reject conversions from integral
3563         expressions to pointer-to-data-member of pointer-to-member-functions.
3564
3565 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
3566
3567         * cvt.c (ocp_convert): Delete obsolete code.
3568         * parse.y (permanent_obstack): Delete declaration.
3569         * pt.c (permanent_obstack): Delete declaration.
3570         * repo.c (permanent_obstack): Delete declaration.
3571         (open_repo_file): Use xmalloc instead of permanent_obstack.
3572         (init_repo): Use xstrdup instead of permanent_obstack.
3573
3574 2002-08-04  Nathan Sidwell  <nathan@codesourcery.com>
3575
3576         * cp-tree.h (VF_DERIVED_VALUE): Remove.
3577         * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
3578
3579 2002-08-03  Nathan Sidwell  <nathan@codesourcery.com>
3580
3581         PR 7470.
3582         C++ ABI change - vfunc ordering.
3583         * class.c (add_virtual_function): Remove.
3584         (dfs_modify_all_vtables): Take list of all declared
3585         virtuals. Assign all that are not in primary base.
3586         (check_for_override): Adjust comments.
3587         (create_vtable_ptr): Take single list of virtuals. Build chain
3588         of declared virtuals here.
3589         (layout_class_type): Take single list of virtuals. Adjust.
3590         (finish_struct_1): Keep virtuals on single list. Adjust.
3591
3592 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
3593
3594         * init.c (build_member_call): Use build_new_method_call, not
3595         build_method_call.
3596
3597 2002-08-02  Krister Walfridsson  <cato@df.lth.se>
3598
3599         * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
3600
3601 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
3602
3603         * call.c (build_method_call): Issue a more helpful error message
3604         about ambiguous method names.
3605
3606 2002-08-02  Nathan Sidwell  <nathan@codesourcery.com>
3607
3608         * tree.c (build_shared_int_cst): Make cache file scope, and
3609         GTY it.
3610
3611 2002-08-02  Jason Merrill  <jason@redhat.com>
3612
3613         * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
3614         (cp_expr_size): New fn.
3615         * call.c (build_over_call): Lose empty class hackery.
3616         (convert_arg_to_ellipsis): Promote non-POD warning to error.
3617         * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
3618
3619         * semantics.c (expand_body): Do tree optimization in the function
3620         context, too.
3621
3622 2002-08-01  Neil Booth  <neil@daikokuya.co.uk>
3623
3624         * cp-tree.h: Move all warning and flag declarations to c-common.h.
3625         * decl.c: Move all warning and flag variables to c-common.c.
3626         * decl2.c: Move all warning and flag variables to c-common.c.
3627         * lex.c (flag_digraphs): Remove.
3628         (warn_traditional): Now in c-common.c.
3629
3630 2002-07-31  Mark Mitchell  <mark@codesourcery.com>
3631
3632         * call.c (build_field_call): Do not look up the field by name.
3633         (build_method_call): Simplify.
3634         (struct z_candidate): Add access_path and conversion_path.  Remove
3635         basetype_path.
3636         (convert_class_to_reference): Adjust use of
3637         add_function_candidate.
3638         (add_candidate): Add conversion_path argument.
3639         (add_function_candidate): Use it.
3640         (add_conv_dndidate): Likewise.
3641         (build_builtin_candidate): Likewise.
3642         (add_template_candidate_real): Add conversion_path argument.
3643         (add_template_conv_candidate): Likewise.
3644         (add_template_candidate): Likewise.
3645         (build_user_type_conversion_1): Use it.
3646         (build_new_function_call): Remove name lookup code.  Adjust use of
3647         add_template_candidate and add_function_candidate.
3648         (build_new_op): Likewise.
3649         (convert_like_real): Use build_special_member_call.
3650         (build_over_call): Use cand->conversion_path.
3651         (build_special_member_call): New method.
3652         (build_new_method_call): Remove name lookup code.
3653         * cp-tree.def (OFFSET_REF): Update documentation.
3654         (TEMPLATE_ID_EXPR): Likewise.
3655         * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
3656         (BASELINK_OPTYPE): Likewise.
3657         (build_new_method_call): Adjust prototype.
3658         (build_special_member_call): New method.
3659         (build_baselink): New method.
3660         (build_offset_ref_call_from_tree): Likewise.
3661         (build_call_from_tree): Likewise.
3662         (finish_qualified_call_expr): Remove.
3663         (finish_call_expr): Adjust prototype.
3664         (build_x_function_call): Remove.
3665         * cvt.c (ocp_convert): Use build_special_member_call.
3666         * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
3667         (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
3668         CALL_EXPR.
3669         (build_offset_ref_call_from_tree): New function.
3670         (build_call_from_tree): Likewise.
3671         * init.c (expand_cleanup): Use build_special_member_call.
3672         (expand_default_init): Likewise.
3673         (build_member_call): Use finish_call_expr.
3674         (build_new_1): Use build_special_member_call.
3675         (push_base_cleanups): Likewise.
3676         * method.c (do_build_assign_ref): Likewise.
3677         * parse.y (template_id): Do not pass a COMPONENT_REF to
3678         lookup_template_function.
3679         (primary): Use parse_finish_call_epxr, not finish_call_expr.
3680         (parse_finish_call_expr): New function.
3681         * pt.c (lookup_template_function): Add assertions.
3682         * search.c (lookup_base): Allow T to be a binfo.
3683         (build_baselink): New function.
3684         (lookup_member): Use it.
3685         * semantics.c (finish_call_expr): Do not do name lookup.
3686         (finish_object_call_expr): Remove #if 0'd code.
3687         (finish_qualified_call_expr): Remove.
3688         * typeck.c (build_x_function_call): Remove.
3689         (build_static_case): Use build_special_member_call.
3690         * typeck2.c (build_functional_cast): Likewise.
3691
3692 2002-07-30  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
3693
3694         * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
3695
3696 2002-07-30  Gabriel Dos Reis  <gdr@nerim.net>
3697
3698         * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
3699
3700 2002-07-30  Nathan Sidwell  <nathan@codesourcery.com>
3701
3702         * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
3703         documentation.
3704
3705 2002-07-29  Alan Modra  <amodra@bigpond.net.au>
3706
3707         * cp-tree.h: Comment typo fix.
3708
3709 2002-07-29  Richard Earnshaw  <rearnsha@arm.com>
3710
3711         * spew.c (space_for_token): Allocate zeroed memory for a new token
3712         chunk.
3713
3714 2002-07-27  Roger Sayle  <roger@eyesopen.com>
3715
3716         * decl.c (builtin_function_1): No need to explicitly mark
3717         BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
3718
3719 2002-07-27  Roger Sayle  <roger@eyesopen.com>
3720
3721         * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
3722
3723 2002-07-26  Jason Merrill  <jason@redhat.com>
3724
3725         * call.c (build_over_call): Likewise.
3726         (cp_convert_parm_for_inlining): New fn.
3727         (convert_for_arg_passing): New fn.
3728         (convert_default_arg, build_over_call): Use it.
3729         (type_passed_as): New fn.
3730         * pt.c (tsubst_decl): Use it.
3731         * decl2.c (cp_build_parm_decl): New fn.
3732         (build_artificial_parm): Use it.
3733         (start_static_storage_duration_function): Likewise.
3734         * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
3735         (grokparms): Don't mess with DECL_ARG_TYPE.
3736         * typeck.c (convert_arguments): Use convert_for_arg_passing.
3737         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
3738         Define.
3739         * cp-tree.h: Declare new fns.
3740
3741 2002-07-26  Neil Booth  <neil@daikokuya.co.uk>
3742
3743         * cp-tree.h (flag_operator_names): Remove.
3744         * decl2.c (flag_operator_names): Remove.
3745         (lang_f_options): Remove operator-names.
3746         * lex.c (D_OPNAME): Remove.
3747         (reswords): Remove operator names.
3748         (rid_to_yy): Remove operator names.
3749         (init_reswords): No need to handle D_OPNAME.
3750         * spew.c (read_process_identifier): There are no operator
3751         names.
3752
3753 2002-07-26  Jason Merrill  <jason@redhat.com>
3754
3755         * dump.c (cp_dump_tree): Call c_dump_tree.
3756         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
3757
3758 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
3759
3760         * error.c (print_whitespace): Remove.
3761         * g++spec.c (LIBUNWIND): Move.
3762         * mangle.c (mangled_position, write_signed_number): Remove.
3763
3764 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
3765
3766         * decl2.c (cxx_decode_option): Similarly.
3767
3768 2002-07-25  Gabriel Dos Reis  <gdr@nerim.net>
3769
3770         * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
3771         (cxx_sizeof_or_alignof_type): Take a third argument.
3772         (cxx_sizeof): Adjust definition.
3773         (cxx_alignof): Likewise.
3774         * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
3775         * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
3776         complaining.
3777         (c_sizeof_nowarn): Remove definition.
3778         (build_unary_op): Use cxx_sizeof_nowarn.
3779
3780 2002-07-24  Geoffrey Keating  <geoffk@redhat.com>
3781
3782         * tree.c (cp_build_qualified_type_real): When copying
3783         pointer-to-method types, unshare the record that holds
3784         the cached pointer-to-member-function type.
3785
3786 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
3787
3788         * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
3789
3790 2002-07-23  Gabriel Dos Reis  <gdr@nerim.net>
3791
3792         Fix PR/7363:
3793         * typeck.c (cxx_sizeof_or_alignof_type): New function.
3794         (c_sizeof): Remove definition.
3795         (expr_sizeof): Use cxx_sizeof.
3796         * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
3797         * decl.c (finish_destructor_body): Use cxx_sizeof.
3798         * semantics.c (finish_alignof): Likewise.
3799         (finish_alignof): Use cxx_alignof.
3800         * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
3801         (cxx_sizeof_or_alignof_type): Declare.
3802         (my_friendly_assert): Move to ../c-common.h.
3803
3804 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
3805
3806         * class.c, method.c, pt.c, search.c: Don't define obstack macros.
3807
3808 2002-07-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3809
3810         PR c++/7347, c++/7348
3811         * cp-tree.h (tsubst_flags_t): Add tf_parsing.
3812         * decl.c (make_typename_type): Use it.
3813         (make_unbound_class_template): Likewise.
3814         (lookup_name_real): Don't call type_access_control if scope is
3815         template parameter dependent.
3816         * parse.y (template_arg): Call make_unbound_class_template with
3817         tf_parsing set.
3818         (nest_name_specifier): Call make_typename_type with tf_parsing set.
3819         (typename_sub0): Likewise.
3820         (typename_sub1): Likewise.
3821         (instantiate_decl): Push class scope.
3822         * pt.c (regenerate_decl_from_template): Call pushclass and popclass
3823         for both static variable and member function template.
3824         (instantiate_decl) Call pushclass and popclass when tsubst'ing type
3825         and arguments.
3826         * search.c (type_access_control): Do type access for TEMPLATE_DECL
3827         too.
3828
3829 2002-07-20  Roger Sayle  <roger@eyesopen.com>
3830
3831         * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
3832         test by using positive_option.  Make whitespace consistent.
3833
3834 2002-07-20  Gabriel Dos Reis  <gdr@nerim.net>
3835
3836         * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
3837         members with 'locus'.  Adjust use throughout.
3838         (struct feed):  Likewise.
3839         (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
3840         Adjust use.
3841         (snarf_defarg): Use error(), not error_with_file_and_line().
3842
3843 2002-07-19  Chris Demetriou  <cgd@broadcom.com>
3844
3845         * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
3846         cpp_options is included.
3847
3848 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3849
3850         PR c++/2862, c++/2863
3851         * pt.c (determine_specialization): Compare the length of
3852         TYPE_ARG_TYPES.  Tidy.
3853
3854 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3855
3856         PR c++/3797
3857         * decl.c (duplicate_decls): Don't propagate inlining parameters from
3858         olddecl to newdecl when newdecl is a specialization of the
3859         instantiation olddecl.
3860
3861 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3862
3863         PR c++/4802, c++/5387
3864         * decl.c (make_typename_type): Use enforce_access.
3865
3866 2002-07-17  Scott Snyder <snyder@fnal.gov>
3867
3868         PR c++/7320
3869         * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
3870
3871 2002-07-12  Mark Mitchell  <mark@codesourcery.com>
3872
3873         * class.c (add_method): Correct handling of conversion operators.
3874
3875 2002-07-11  Mark Mitchell  <mark@codesourcery.com>
3876
3877         PR c++/7224
3878         * class.c (add_method): Simplify.
3879
3880 2002-07-11  Jason Merrill  <jason@redhat.com>
3881
3882         PR c++/7279
3883         * tree.c (cp_copy_res_decl_for_inlining): Also copy
3884         TREE_ADDRESSABLE.
3885
3886 2002-07-10  Graham Stott  <graham.stott@btinternet.com>
3887
3888         * pt.c (template_parm_this_level_p, push_template_decl_real):
3889         Pass depth as int pointer.
3890
3891 2002-07-11  Tim Josling  <tej@melbpc.org.au>
3892
3893         Remove front end hard coding from gengtype.c.
3894
3895         * config-lang.in (gtfiles): Add files needed for this front end.
3896
3897 2002-07-10  Mark Mitchell  <mark@codesourcery.com>
3898
3899         * cp-tree.h (unqualified_name_lookup_error): Declare it.
3900         (begin_function_definition): Adjust prototype.
3901         * lex.c (unqualified_name_lookup_error): New function, split out
3902         from ...
3903         (do_identifier): ... here.
3904         * parse.y (parse_begin_function_definition): New function.
3905         (fn.def1): Use it.
3906         * semantics.c (begin_function_definition): Accept decl-specifiers
3907         and attributes as separate parameters.
3908
3909 2002-07-10  Jason Merrill  <jason@redhat.com>
3910
3911         PR c++/6255
3912         * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
3913         modifying the old one.
3914
3915 2002-07-09  Mark Mitchell  <mark@codesourcery.com>
3916
3917         * cp-tree.h (constructor_name_p): Declare it.
3918         (check_template_template_default_arg): Likewise.
3919         * class.c (handle_using_decl): Use constructor_name_p.
3920         * decl.c (grokdeclarator): Likewise.
3921         * decl2.c (constructor_name_p): Define it.
3922         * init.c (build_member_call): Use constructor_name_p.
3923         * parse.y (template_parm): Use check_template_template_default_arg.
3924         * pt.c (check_explicit_specialization): Use constructor_name_p.
3925         * semantics.c (check_template_template_default_arg): New function.
3926
3927 2002-07-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3928
3929         * pt.c (can_complete_type_without_circularity): Add static to
3930         function definition.
3931
3932 2002-07-08  Mark Mitchell  <mark@codesourcery.com>
3933
3934         * cp-tree.h (have_extern_spec): Declare it
3935         * decl.c (have_extern_spec): Define it.
3936         (start_decl): Eliminate use of used_extern_spec.
3937         (start_function): Likewise.
3938         * parse.y (have_extern_spec): Remove declaration.
3939         (used_extern_spec): Likewise.
3940         (frob_specs): Eliminate use of used_extern_spec.
3941         (.hush_warning): Likewise.
3942
3943 2002-07-07  Mark Mitchell  <mark@codesourcery.com>
3944
3945         * Make-lang.in (cp/parse.o): Depend on decl.h.
3946         * cp-tree.h (do_decl_instantiation): Change prototype.
3947         * parse.y: Include decl.h.
3948         (parse_decl_instantiation): New function.
3949         (explicit_instantiation): Use it.
3950         * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
3951         and DECLSPECS.
3952
3953 2002-07-07  Roger Sayle  <roger@eyesopen.com>
3954
3955         * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
3956         constructor and destructor tests when passed a TEMPLATE_DECL.
3957
3958 2002-07-05  Jason Merrill  <jason@redhat.com>
3959
3960         * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
3961         pointers.
3962
3963         PR optimization/7145
3964         * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
3965
3966 2002-07-05  Nathan Sidwell  <nathan@codesourcery.com>
3967
3968         Repair damage on weak-impared targets caused by my previous patch.
3969         * cp-tree.h (import_export_tinfo): Add parameter.
3970         * decl2.c (import_export_tinfo): Add parameter, post adjust
3971         DECL_COMDAT.
3972         * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
3973         import_export_tinfo.
3974
3975 2002-07-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3976
3977         PR c++/6944
3978         * init.c (build_aggr_init): Remove qualifiers of init before calling
3979         build_vec_init.
3980         (build_vec_init): Flatten multi-dimensional array during cleanup.
3981         (build_vec_delete_1): Abort if the type of each element is array.
3982
3983 2002-07-03  Graham Stott  <graham.stott@btinternet.com>
3984
3985         * pt.c (instantiate_class_template): Fix typo.
3986
3987 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3988
3989         * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
3990         by CVS conflict in my last patch.
3991
3992 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3993
3994         PR c++/6716
3995         * pt.c (can_complete_type_without_circularity): New function.
3996         (instantiate_class_template): Use it.
3997         * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
3998         message due to incomplete fields.
3999
4000 2002-07-01  Mark Mitchell  <mark@codesourcery.com>
4001
4002         PR c++/7112
4003         * mangle.c (write_expression): Add mangling for sizeof when
4004         applied to a type.
4005         * operators.def: Remove stale comment.
4006
4007 2002-06-30  Nathan Sidwell  <nathan@codesourcery.com>
4008
4009         * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
4010         (CPTI_TYPE_INFO_PTR_TYPE): ... this.
4011         (tinfo_decl_type): Replace with ...
4012         (type_info_ptr_type): ... this.
4013         (import_export_tinfo): Declare.
4014         (tinfo_decl_p): Rename to ...
4015         (unemitted_tinfo_decl_p): ... this.
4016         * decl2.c (import_export_decl): Break out tinfo handling into ...
4017         (import_export_tinfo): ... here. New function.
4018         (finish_file): Adjust.
4019         * rtti.c (TINFO_REAL_NAME): New macro.
4020         (init_rtti_processing): Create the tinfo types.
4021         (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
4022         (get_tinfo_decl): Adjust.
4023         (get_tinfo_ptr): New function.
4024         (get_type_id): Use it.
4025         (tinfo_base_init): Create vtable decl here, if it doesn't exist.
4026         (ptr_initializer): Use get_tinfo_ptr.
4027         (ptm_initializer): Likewise.
4028         (synthesize_tinfo_var): Break into ...
4029         (get_pseudo_ti_init): ... this. Just create the initializer.
4030         (get_pseudo_ti_desc): .. and this.
4031         (create_real_tinfo_var): Remove.
4032         (create_pseudo_type_info): Don't create the vtable decl here.
4033         (get_vmi_pseudo_type_info): Remove.
4034         (create_tinfo_types): Adjust.
4035         (tinfo_decl_p): Rename to ...
4036         (unemitted_tinfo_decl_p): ... here. Adjust.
4037         (emit_tinfo_decl): Adjust. Create the initializer.
4038
4039 2002-06-27  Mark Mitchell  <mark@codesourcery.com>
4040
4041         PR c++/6695
4042         * pt.c (tsubst_friend_class): Substitute into the context of the
4043         friend before using it.
4044
4045 2002-06-26  Mark Mitchell  <mark@codesourcery.com>
4046
4047         * cp-tree.h (xref_tag): Change prototype.
4048         (handle_class_head): Likewise.
4049         (build_x_component_ref): Likewise.
4050         * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
4051         (xref_tag): Take attributes as a separate parameter.
4052         (xref_tag_from_type): Adjust call to xref_tag.
4053         * decl2.c (build_expr_from_tree): Adjust call to
4054         build_x_component_ref.
4055         (handle_class_head): Take attributes as a separate parameter.
4056         * parse.y (parse_xref_tag): New function.
4057         (parse_handle_class_head): Likewise.
4058         (primary): Use parse_xref_tag.
4059         (class_head_decl): Use parse_handle_class_head.
4060         (class_head_defn): Likewise.
4061         * rtti.c (init_rtti_processing): Adjust call to xref_tag.
4062         (build_dynamic_cast_1): Likewise.
4063         (create_pseudo_type_info): Likewise.
4064         (emit_support_tinfos): Likewise.
4065         * typeck.c (build_object_ref): Adjust call to
4066         build_x_component_ref.
4067         (build_x_component_ref): Remove protect parameter.
4068
4069 2002-06-25  Mark Mitchell  <mark@codesourcery.com>
4070
4071         * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
4072         * class.c (handle_using_decl): Likewise.
4073         (instantiate_type): Likewise.
4074         * cp-tree.h (BASELINK_FUNCTIONS): New macro.
4075         (xref_basetypes): Change prototype.
4076         (begin_mem_initializers): New function.
4077         (get_overloaded_fn): Likewise.
4078         * decl.c (xref_basetypes): Simplify.
4079         * error.c (dump_expr): Use BASELINK_FUNCTIONS.
4080         * init.c (build_offset_ref): Likewise.
4081         * parse.y (base_init): Use begin_mem_initializers().
4082         (structsp): Adjust call to xref_basetypes.
4083         * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
4084         (instantiate_class_template): Adjust call to xref_basetypes.
4085         * semantics.c (begin_mem_initializers): New function.
4086         * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
4087         (really_overlaoded_fn): Likewise.
4088         (get_overloaded_fn): New function.'
4089         (get_first_fn): USe BASELINK_FUNCTIONS.
4090
4091 2002-06-24  Mark Mitchell  <mark@codesourcery.com>
4092
4093         * cp-tree.h (SCALAR_TYPE_P): New macro.
4094         (check_for_out_of_scope_variable): New function.
4095         (at_class_scope_p): Likewise.
4096         (finish_fname): Likewise.
4097         * class.c (finish_struct): Use at_function_scope_p.
4098         * decl.c (check_for_out_of_scope_variable): New function, split
4099         out from do_identifier.
4100         (finish_enum): Use at_function_scope_p.
4101         * lex.c (do_identifier): Use check_for_out_of_scope_variable.
4102         * parse.y (VAR_FUNC_NAME): Give it <ttype>.  Use finish_fname.
4103         (primary): Use at_function_scope_p.
4104         * search.c (at_class_scope_p): New function.
4105         * semantics.c (finish_fname): Likewise.
4106         (check_multiple_declarators): Use at_function_scope_p.
4107
4108 2002-06-23  Mark Mitchell  <mark@codesourcery.com>
4109
4110         * parse.y (parse_scoped_id): New function.
4111         (primary): Use it.
4112         * cp-tree.h (do_scoped_id): Adjust declaration.
4113         * lex.c (do_scoped_id): Remove call to yylex.
4114         * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
4115         * typeck2.c (add_exception_specifier): Use tree_cons, rather than
4116         expanding it inline.
4117
4118 2002-06-23  Matt Thomas  <matt@3am-software.com>
4119
4120         * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
4121         "#if VMS_TARGET".
4122
4123 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4124
4125         * mangle.c (integer_type_codes): Const-ify.
4126
4127 2002-06-20  Richard Henderson  <rth@redhat.com>
4128
4129         PR c++/6747
4130         * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
4131         Call put_var_into_stack.
4132
4133 2002-06-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4134
4135         * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
4136         array size calculation.
4137
4138 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4139
4140         PR c++/6892
4141         * pt.c (tsubst_expr): Handle FILE_STMT.
4142
4143 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4144
4145         PR c++/6723
4146         * pt.c (lookup_template_class): Don't build complete argument of
4147         BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
4148         argument.
4149
4150 2002-06-19  Akim Demaille  <akim@epita.fr>
4151
4152         * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
4153         decl.h's TYPENAME.
4154         * spew.c, lex.c: Adjust.
4155         * parse.y (explicit_instantiation): Add empty action to override
4156         the default $$ = $1 where it introduces a type clash.
4157
4158 2002-06-14  Jason Merrill  <jason@redhat.com>
4159
4160         * semantics.c (begin_for_stmt): Push the 'for' scope before
4161         adding the FOR_STMT.
4162
4163         C++ ABI changes.
4164         * class.c (build_base_field): Set DECL_PACKED.
4165         (layout_class_type): Don't use tail padding of PODs.
4166         * mangle.c (write_unqualified_name): Fix template conversion op
4167         mangling.
4168
4169 2002-06-16  Richard Henderson  <rth@redhat.com>
4170
4171         PR opt/6793
4172         * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
4173         after template instantiation.
4174
4175 2002-06-16  Richard Henderson  <rth@redhat.com>
4176
4177         * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
4178
4179 2002-06-15  Gabriel Dos Reis  <gdr@codesourcery.com>
4180
4181         * cp-tree.h (compiler_error): Remove declaration.
4182         * lex.c (compiler_error): Remove definition.
4183
4184 2002-06-14  Steve Ellcey  <sje@cup.hp.com>
4185
4186         * g++spec.c (LIBUNWIND): New.
4187         (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
4188
4189 2002-06-13  Jessica Han  <jessica@cup.hp.com>
4190
4191         * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
4192         (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
4193         (build_vbase_offset_vtbl_entries): Likewise.
4194         * rtti.c (build_headof): Likewise.
4195         (get_tinfo_decl_dynamic): Likewise.
4196         (create_pseudo_type_info): Likewise.
4197
4198 2002-06-12  Stan Shebs  <shebs@apple.com>
4199
4200         * mpw-config.in: Remove file, no longer used.
4201         * mpw-make.sed: Ditto.
4202
4203 2002-06-07  Zack Weinberg  <zack@codesourcery.com>
4204
4205         * decl2.c: Update call to cpp_handle_option.
4206
4207 2002-06-07  H.J. Lu  (hjl@gnu.org)
4208
4209         * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
4210
4211 2002-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
4212
4213         * error.c (cp_error_at): Fix typo.
4214
4215 2002-06-04  Gabriel Dos Reis  <gdr@codesourcery.com>
4216
4217         * error.c (cp_diagnostic_starter): Adjust call.
4218         (maybe_print_instantiation_context): Change prototype to take a
4219         'diagnostic_info *'.
4220         (print_instantiation_full_context): Likewise.
4221         (print_instantiation_partial_context): Likewise.
4222         (cp_diagnostic_starter): Likewise.
4223         (cp_diagnostic_finalizer): Likewise.
4224         (cp_print_error_function): Likewise.
4225         (cp_printer): Take a secondary parameter as a 'text_info *'.
4226         Remove output_state savings.  Adjust calls.
4227
4228 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
4229
4230         * pt.c (inline_parm_levels): Mark for GC.
4231
4232         * mangle.c (start_mangling): Allocate G.substitutions here...
4233         (init_mangle): ... rather than here.
4234         (finish_mangling): Clear the varray pointer when done with it.
4235         * spew.c (yylexstring): Don't use VARRAY_FREE.
4236         * search.c (bfs_walk): Don't use VARRAY_FREE.
4237         * decl2.c (pending_statics): Use gengtype to mark.
4238         (deferred_fns): Likewise.
4239         (ssdf_decls): Likewise.
4240         (init_decl2): Delete.
4241         * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
4242         (cxx_init_decl_processing): Don't call init_decl2.
4243         (cxx_pop_function_context): Don't use VARRAY_FREE.
4244         * cp-tree.h (struct saved_scope): No need for special marking
4245         of varrays.
4246         (struct language_function): Likewise.
4247         (local_classes): Use gengtype to mark.
4248         (init_decl2): Delete prototype.
4249         * class.c (init_class_processing): Don't use
4250         ggc_add_tree_varray_root.
4251         (build_vtbl_initializer): Don't use VARRAY_FREE.
4252
4253         * decl.c (typename_compare): Don't use same_type_p.
4254
4255         * decl.c: Include hashtab.h instead of hash.h.
4256         (typename_hash): Update to use htab_h.
4257         (typename_compare): Likewise.
4258         (typename_htab): Use gengtype to mark.
4259         (build_typename_type): Update to use htab_h.
4260         * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
4261
4262         * Make-lang.in (gt-cp-tree.h): New rule.
4263         (cp/tree.o): Depend on gt-cp-tree.h.
4264         * config-lang.in (gtfiles): Add cp/tree.c.
4265         * tree.c: Include gt-cp-tree.h.
4266         (list_hash_table): Use gengtype to mark.
4267         (init_tree): Use gengtype to mark trees.
4268
4269         * Make-lang.in (cp/decl.o): Add debug.h dependency.
4270         * call.c (struct z_candidate): Use gengtype.
4271         (USER_CONV_CAND): Use WRAPPER_ZC.
4272         (convert_class_to_reference): Use build_zc_wrapper.
4273         (build_type_conversion_1): Likewise.
4274         (build_over_call): Use WRAPPER_ZC.
4275         (add_warning): Use build_zc_wrapper.
4276         * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
4277         * cp-tree.h (struct lang_identifier): Use gengtype.
4278         (struct template_parm_index_s): Likewise.
4279         (struct ptrmem_cst): Likewise.
4280         (struct tree_binding): Likewise.
4281         (struct tree_overload): Likewise.
4282         (struct tree_srcloc): Likewise.
4283         (struct tree_wrapper): Likewise.  Also modify to have a pointer
4284         to struct z_candidate rather than void.
4285         (enum cp_tree_node_structure_enum): New.
4286         (union lang_tree_node): New.
4287         (cxx_mark_tree): Delete prototype.
4288         (cp_tree_node_structure): New prototype.
4289         (build_ptr_wrapper): Delete prototype.
4290         (build_int_wrapper): Delete prototype.
4291         (build_zc_wrapper): New prototype.
4292         * decl.c: Include debug.h
4293         (cxx_mark_tree): Delete.
4294         (cp_tree_node_structure): New.
4295         * tree.c (build_ptr_wrapper): Delete.
4296         (build_int_wrapper): Delete.
4297         (build_zc_wrapper): New.
4298
4299         * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
4300         Correct typo.  Patch from k_fukui@highway.ne.jp.
4301
4302         * semantics.c (current_stmt_tree): Update for change to
4303         struct language_function.
4304         (finish_mem_initializers): Likewise.
4305         * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
4306         * cp-tree.h (struct language_function): Rename from
4307         cp_language_function.  Change all uses.
4308         (cp_function_chain): Don't need to cast.
4309
4310         * class.c (duplicate_tag_error): Reset discriminator.
4311         (check_bases_and_members): Update for data structure changes.
4312         * cp-tree.h (struct lang_id2): Use gengtype.
4313         (flagged_type_tree): Likewise.
4314         (SET_LANG_ID): Use GGC on struct lang_id2.
4315         (struct cp_language_function): Use gengtype.  Remove field
4316         'x_vcalls_possible_p'.
4317         (current_vcalls_possible_p): Delete.
4318         (struct lang_type_header): New.
4319         (struct lang_type_class): Rename from struct lang_type.  Include
4320         struct lang_type_header.
4321         (struct lang_type_ptrmem): New.
4322         (struct lang_type): New.
4323         (LANG_TYPE_CLASS_CHECK): New.  Use it in all the appropriate macros.
4324         (LANG_TYPE_PTRMEM_CHECK): New.  Use it in all the appropriate macros.
4325         (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
4326         (struct lang_decl_flags): Use gengtype.  Add discriminators.
4327         (struct lang_decl): Use gengtype.  Add and use discriminators.
4328         Update the macros that reference moved fields.
4329         (LANG_DECL_U2_CHECK): New function.  Use it when appropriate.
4330         (SET_DECL_THUNK_P): Set discriminator too.
4331         (clear_inline_text_obstack): Delete prototype.
4332         (finish_inline_definitions): Delete prototype.
4333         (mark_pending_inlines): Delete prototype.
4334         (lang_check_failed): New prototype.
4335         * decl.c (struct named_label_use_list): Use gengtype.
4336         (struct named_label_list): Likewise.
4337         (mark_binding_level): Delete.
4338         (mark_named_label_lists): Delete.
4339         (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
4340         (cxx_init_decl_processing): Use generated marker routine.
4341         (begin_destructor_body): Delete dead set to
4342         current_vcalls_possible_p.
4343         (mark_lang_function): Delete.
4344         (mark_cp_function_context): Delete.
4345         (lang_mark_tree): Use generated marker routines.
4346         * decl2.c (start_objects): Set discriminator when setting
4347         GLOBAL_INIT_PRIORITY.
4348         * lex.c (retrofit_lang_decl): Set discriminators.
4349         (copy_lang_type): Update for changes to lang_type structure.
4350         (cp_make_lang_type): Set discriminator.
4351         * parse.y: Use gengtype on YYLVAL.  Don't use dots in identifiers.
4352         * search.c: Include ggc.h.
4353         * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
4354         (finish_inline_definitions): Delete.
4355         * spew.c (struct token): Use gengtype.
4356         (struct token_chunk): New.
4357         (struct unparsed_text): Use gengtype.  Store tokens in chunks.
4358         (struct feed): Use gengtype.
4359         (feed_obstack): Delete.
4360         (feed): Mark as GC root.
4361         (pending_inlines): Mark as GC root.
4362         (pending_inlines_tail): Likewise.
4363         (processing_these_inlines): Likewise.
4364         (token_obstack): Make static.
4365         (first_token): Likewise.
4366         (init_spew): Don't initialize deleted things; use gengtype for roots.
4367         (clear_inline_text_obstack): Delete.
4368         (feed_input): Use GC for struct feed.  Update for changes to
4369         struct unparsed_text.
4370         (mark_pending_inlines): Delete.
4371         (next_token): Rename from add_token.  Change all callers.  Update
4372         for changes to struct unparsed_text.
4373         (space_for_token): New.
4374         (remove_last_token): New.
4375         (alloc_unparsed_text): New.
4376         (snarf_block): Take an unparsed_text.  Update for changes to struct
4377         unparsed_text.
4378         (snarf_method): Update for changes to struct unparsed_text.
4379         (snarf_defarg): Update for changes to struct unparsed_text.
4380         * tree.c (lang_check_failed): New.
4381
4382         * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
4383         gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
4384         (cp/spew.o): Add dependency on gt-<filename>.h.
4385         (cp/decl2.o): Add dependency on gt-<filename>.h.
4386         (cp/call.o): Add dependency on gt-<filename>.h.
4387         (cp/pt.o): Add dependency on gt-<filename>.h.
4388         (cp/repo.o): Add dependency on gt-<filename>.h.
4389         (cp/parse.o): Add dependency on gt-<filename>.h.
4390         * call.c: Use gengtype for roots.
4391         * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
4392         decl2.c parse.y pt.c repo.c spew.c.
4393         * cp-tree.h: Use gengtype for roots.
4394         (struct saved_scope): Use GGC, gengtype.
4395         (cp_parse_init): Delete prototype.
4396         (init_pt): Delete prototype.
4397         * decl.c: Use gengtype for roots.
4398         (mark_saved_scope): Delete.
4399         (cxx_init_decl_processing): Don't call deleted initilisation
4400         routines.
4401         (signed_size_zero_node): Delete, unused.
4402         * decl.h: Use gengtype for roots.
4403         * decl2.c: Use gengtype for roots.
4404         * lex.h: Use gengtype for roots.
4405         * parse.y: Use gengtype for roots.
4406         (cp_parse_init): Delete.
4407         * pt.c: Use gengtype for roots.
4408         (init_pt): Delete.
4409         * repo.c: Use gengtype for roots.
4410         * spew.c: Use gengtype for roots.
4411
4412         * Make-lang.in: Allow for filename changes.  Add gtype-cp.h.
4413         (cp/decl.o): Add dependency on gtype-cp.h.
4414         * decl.c: Remove use of add_deletable_root, use GTY marker instead.
4415         Include gtype-cp.h.  Allow for filename changes.
4416
4417         * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
4418         (cp/decl.o): Add cp/gt-decl.h dependency.
4419         * config-lang.in (gtfiles): New.
4420         * tree.h: Rename struct binding_level to struct cp_binding_level.
4421         * decl.c: Rename struct binding_level to struct cp_binding_level.
4422         Include cp/gt-decl.h.
4423         (struct cp_binding_level): Use gengtype.
4424         (make_binding_level): Use GGC on struct cp_binding_level.
4425         (mark_binding_level): Use gt_ggc_m_cp_binding_level.
4426         (cxx_init_decl_processing): Mark free_binding_level as
4427         deletable.
4428
4429         * decl.c (mark_cp_function_context): Update calling sequence.
4430
4431         * decl.c (start_function): Don't free 'struct
4432         cp_language_function'.
4433         (pop_cp_function_context): Likewise.
4434         (save_function_data): Allocate it using GC.
4435         * semantics.c (genrtl_start_function): Don't free 'struct
4436         cp_language_function'.
4437
4438 2002-05-31  Matthew Woodcraft  <mattheww@chiark.greenend.org.uk>
4439
4440         * lang-specs.h: Use cpp_debug_options.
4441
4442 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
4443
4444         * mangle.c, tree.c: Include real.h.
4445         * Make-lang.in: Update dependency lists.
4446
4447 2002-05-25  Neil Booth  <neil@daikokuya.demon.co.uk>
4448
4449         * lex.c: Don't include c-lex.h.
4450         * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
4451
4452 2002-05-23  Neil Booth  <neil@daikokuya.demon.co.uk>
4453
4454         * spew.c (yyungetc, snarf_block): Remove indent_level handling.
4455
4456 2002-05-22  Richard Henderson  <rth@redhat.com>
4457
4458         * decl.c (obscure_complex_init): Check for VAR_DECL
4459         before using DECL_THREAD_LOCAL.
4460
4461 2002-05-22  Richard Henderson  <rth@redhat.com>
4462
4463         * decl.c (check_tag_decl): Handle RID_THREAD.
4464         (obscure_complex_init): Reject run-time init of tls.
4465         (grokvardecl, grokdeclarator): Handle RID_THREAD.
4466         * lex.c (reswords): Add __thread.
4467         (rid_to_yy): Map RID_THREAD to SCSPEC.
4468
4469 2002-05-22  Neil Booth  <neil@daikokuya.demon.co.uk>
4470
4471         * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
4472         * cp-tree.h (cxx_post_options): Kill.
4473         * cp-lex.c (cxx_post_options): Kill.
4474
4475 2002-05-21  Richard Henderson  <rth@redhat.com>
4476
4477         * lex.c (rid_to_yy): Add RID_THREAD.
4478
4479 2002-05-21  Alexandre Oliva  <aoliva@redhat.com>
4480
4481         * init.c (build_vec_init): Test for trivial copy-assignment when
4482         copy-assigning arrays.
4483
4484 2002-05-20  Andreas Jaeger  <aj@suse.de>
4485
4486         * init.c (build_default_init): Remove unused variable.
4487
4488 2002-05-20  Alexandre Oliva  <aoliva@redhat.com>
4489
4490         * call.c (any_strictly_viable): New.
4491         (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
4492
4493 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4494
4495         * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
4496
4497 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4498
4499         PR c++/186, DR 259
4500         * pt.c (do_decl_instantiation): Don't complain explicit
4501         instantiation after explicit specialization.
4502         (do_type_instantiation): Likewise.
4503
4504 2002-05-19  Alexandre Oliva  <aoliva@redhat.com>
4505
4506         * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
4507         renamed from...
4508         (complete_type_or_else): ... this.  Redefined as macro.
4509         (cxx_incomplete_type_diagnostic): Declare.
4510         (cxx_incomplete_type_error): Define as macro.
4511         * init.c (build_delete): Warn about incomplete types other than
4512         void, and use the built-in operator delete for them.
4513         * typeck.c (complete_type_or_diagnostic): Renamed from
4514         complete_type_or_else.  Added warn_only argument, passed to...
4515         * typeck2.c (cxx_incomplete_type_diagnostic): ... this.  Print
4516         warnings or errors depending on new warn_only argument.  Renamed
4517         from...
4518         (cxx_incomplete_type_error): ... this.  New implementation in
4519         terms of cxx_incomplete_type_diagnostic.
4520
4521 2002-05-18  Jason Merrill  <jason@redhat.com>
4522
4523         PR c++/6611
4524         * decl2.c (import_export_decl): If we clear
4525         DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
4526
4527 2002-05-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4528
4529         PR c++/6620
4530         * pt.c (verify_class_unification): Don't check if PARM is template
4531         parameter dependent.  Simplify.
4532         (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
4533         parameter dependent expression.
4534
4535 2002-05-14  Jason Merrill  <jason@redhat.com>
4536
4537         * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
4538         Do set DECL_COMDAT.
4539         (synthesize_tinfo_var): Take the public decl.
4540         (create_real_tinfo_var): Likewise.  Check DECL_COMDAT.
4541         (emit_tinfo_decl): Adjust.  Call import_export_decl.
4542         * decl2.c (import_export_decl): Simplify tinfo decl handling.
4543
4544 2002-05-14  Alexandre Oliva  <aoliva@redhat.com>
4545
4546         * cp-tree.h (struct lang_type): Added non_zero_init.
4547         (CLASSTYPE_NON_ZERO_INIT_P): New macro.
4548         (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
4549         * class.c (check_field_decls): Test non_zero_init.
4550         * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
4551         zero-to-NULL conversions.
4552         * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
4553         type that needs zero-initialization without zeros.
4554         (check_initializer_decl): Compute zero-initializer for types
4555         that require a non-trivial one.
4556         * init.c (build_forced_zero_init): New function.
4557         (build_default_init): Use it.
4558         * tree.c (zero_init_p): New function.
4559         * typeck2.c (force_store_init_value): New function.
4560         (process_init_constructor): Create non-trivial zero-initializers
4561         for array members and class fields.
4562
4563 2002-05-14  Neil Booth  <neil@daikokuya.demon.co.uk>
4564
4565         * lang-specs.h: Remove redundant -lang-c++.
4566
4567 2002-05-13  Jason Merrill  <jason@redhat.com>
4568
4569         * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
4570         (fixed_type_or_null): See through reference vars.
4571         (build_base_path): Vtable contents are constant.
4572         * typeck.c (get_member_function_from_ptrfunc): Likewise.
4573
4574 2002-05-12  Jason Merrill  <jason@redhat.com>
4575
4576         * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
4577         structs are safe.
4578
4579 2002-05-09  Neil Booth  <neil@daikokuya.demon.co.uk>
4580
4581         * cp-tree.h (flag_ansi): Remove.
4582         * decl2.c (flag_ansi): Remove.
4583         (cxx_decode_option): Set flag_iso and flag_undef.
4584
4585 2002-05-09  Jason Merrill  <jason@redhat.com>
4586
4587         * typeck.c (get_member_function_from_ptrfunc): Reorganize.
4588         Use subtraction rather than a bitmask to get the index.
4589         * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
4590
4591         * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
4592
4593 2002-05-07  Neil Booth  <neil@daikokuya.demon.co.uk>
4594
4595         * Make-lang.in (decl2.o): Update.
4596         * cp-tree.h (warn_multichar): Remove.
4597         * decl2.c: Include c-common.h.
4598         (warn_multichar): Remove.
4599
4600 2002-05-03  Jason Merrill  <jason@redhat.com>
4601
4602         * tree.c (build_cplus_array_type): Only const and volatile get
4603         special handling.
4604
4605         * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
4606
4607 2002-04-30  Mark Mitchell  <mark@codesourcery.com>
4608
4609         ABI change, returning simple classes from functions.
4610         * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
4611         TYPE_HAS_TRIVIAL_INIT_REF is false or
4612         TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
4613
4614 2002-04-30  Jason Merrill  <jason@redhat.com>
4615
4616         PR debug/6436
4617         * decl.c (grokdeclarator): Don't override TYPE_NAME of an
4618         anonymous class with a typedef if there are attributes.
4619
4620 2002-04-29  Paul Eggert  <eggert@twinsun.com>
4621
4622         * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
4623
4624 2002-04-29  Jakub Jelinek  <jakub@redhat.com>
4625
4626         PR c++/6477
4627         * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
4628         non-NULL first.
4629
4630 2002-04-29  Mark Mitchell  <mark@codesourcery.com>
4631
4632         PR c++/6492
4633         * pt.c (tsubst_friend_class): If the friend has an explicit scope,
4634         enter that scope before name lookup.
4635
4636         PR c++/6486
4637         * method.c (do_build_copy_constructor): Avoid building
4638         cv-qualified reference types.
4639
4640 2002-04-29  Nathan Sidwell  <nathan@codesourcery.com>
4641
4642         PR c++/5719
4643         * decl.c (grok_op_properties): Assignment ops don't have to return
4644         by value. operator% should.
4645
4646 2002-04-28  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
4647
4648         PR c/6343
4649         * decl.c (duplicate_decls): Call merge_weak.
4650
4651 2002-04-26  Richard Henderson  <rth@redhat.com>
4652
4653         * parse.y (malloced_yyss, malloced_yyvs): New.
4654         (yyoverflow): Re-add.  Set them.
4655         (free_parser_stacks): New.
4656
4657 2002-04-26  Mark Mitchell  <mark@codesourcery.com>
4658
4659         PR c++/6497
4660         * method.c (do_build_assign_ref): Pass a derivation to
4661         build_method_call when calling base class assignment operators.
4662
4663 2002-04-26  Richard Henderson  <rth@redhat.com>
4664
4665         * parse.y (yyoverflow): Revert.
4666
4667 2002-04-26  Richard Henderson  <rth@redhat.com>
4668
4669         PR c/3581
4670         * parse.y (string): Remove.  Update all uses to use STRING
4671         instead, and not call combine_strings.
4672         * rtti.c (tinfo_name): Use fix_string_type.
4673         * semantics.c (finish_asm_stmt): Don't call combine_strings.
4674         * spew.c (yylexstring): New.
4675         (read_token): Use it.
4676
4677 2002-04-25  Richard Henderson  <rth@redhat.com>
4678
4679         PR c/2161
4680         * parse.y (yyoverflow): New.
4681
4682 2002-04-25  Jason Merrill  <jason@redhat.com>
4683
4684         PR c++/5607
4685         * search.c (check_final_overrider): No longer static.
4686         * class.c (update_vtable_entry_for_fn): Call it.
4687         * cp-tree.h: Adjust.
4688
4689 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
4690
4691         * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
4692         * cp-tree.h (cxx_set_yydebug): Die.
4693         * lex.c (YYDEBUG): Get from c-lex.h.
4694         (cxx_set_yydebug): Remove.
4695         * parse.y: Include c-lex.h.
4696         (YYDEBUG): Get from c-lex.h.
4697
4698 2002-04-24  Mark Mitchell  <mark@codesourcery.com>
4699
4700         PR c++/6438.
4701         * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
4702         void.
4703
4704 2002-04-24  Neil Booth  <neil@daikokuya.demon.co.uk>
4705
4706         * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
4707         LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
4708         Redefine.
4709         * cp-tree.h (cp_attribute_table): Rename.
4710         * decl.c (lang_attribute_table): Remove declaration.
4711         (cxx_init_decl_processing): Don't set it.
4712         * tree.c (cp_attribute_table): Rename.
4713
4714 2002-04-24  Jason Merrill  <jason@redhat.com>
4715
4716         PR c++/6331
4717         * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
4718         * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
4719         The pedwarn for array assignment is now unconditional.
4720         * tree.c (build_cplus_array_type_1): Still process simple array types
4721         normally in templates.
4722
4723         PR c++/6395
4724         * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
4725         stuff for comdats.
4726
4727 2002-04-23  Jakub Jelinek  <jakub@redhat.com>
4728
4729         * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
4730         node with attributes.
4731
4732 2002-2-23  David O'Brien  <obrien@FreeBSD.org>
4733
4734         * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
4735         Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
4736
4737 2002-04-23  Mark Mitchell  <mark@codesourcery.com>
4738
4739         PR c++/6256:
4740         * pt.c (tsubst_friend_class): Handle templates with explicit
4741         nested names.
4742
4743         PR c++/6331:
4744         * typeck.c (merge_types): Remember the cv-qualification of pointer
4745         types when merging them.
4746
4747 2002-04-20  Neil Booth  <neil@daikokuya.demon.co.uk>
4748
4749         * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
4750         LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
4751         * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
4752         cxx_mark_function_context): New.
4753         * decl.c (push_cp_function_context, pop_cp_function_context,
4754         mark_cp_function_context): Rename for consistency.
4755         (cxx_init_decl_processing): Don't set old hooks.
4756
4757 2002-04-19  Neil Booth  <neil@daikokuya.demon.co.uk>
4758
4759         * call.c (convert_type_from_ellipsis): Rename, update.
4760         * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
4761         * cp-tree.h (convert_type_from_ellipsis): Rename.
4762         * decl.c (cxx_init_decl_processing): Don't set hook.
4763
4764 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
4765
4766         * call.c (build_new_method_call): Update.
4767         * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
4768         * cp-tree.h (cxx_incomplete_type_error): New.
4769         * decl.c (grokdeclarator, grokparms): Update.
4770         * decl2.c (check_classfn): Update.
4771         * pt.c (tsubst): Update.
4772         * typeck.c (complete_type_or_else, expr_sizeof,
4773         decay_conversion): Update.
4774         * typeck2.c (incomplete_type_error): Rename.
4775         (add_exception_specifier): Update.
4776
4777 2002-04-18  Jason Merrill  <jason@redhat.com>
4778
4779         PR c++/5658
4780         * search.c (setup_class_bindings): A class template qualifies as a
4781         type binding.
4782
4783 2002-04-17  Jakub Jelinek  <jakub@redhat.com>
4784
4785         PR c++/6316
4786         * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
4787         before expanding.
4788
4789 2002-04-16  Mark Mitchell  <mark@codesourcery.com>
4790
4791         * init.c (begin_init_stmts): Remove commented out code.
4792         (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
4793         * semantics.c (begin_gobal_stmt_expr): Adjust call to
4794         expand_start_stmt_expr.
4795
4796 2002-04-15  Mark Mitchell  <mark@codesourcery.com>
4797
4798         * decl.c (register_dtor_fn): Pass the address of dso_handle, not
4799         dso_handle itself, to __cxa_atexit.
4800
4801 2002-04-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
4802
4803         * error.c (cxx_print_error_function): Adjust call to macros.
4804
4805 2002-04-14  Jakub Jelinek  <jakub@redhat.com>
4806
4807         * class.c (layout_virtual_bases): Do all dsize computation on trees.
4808
4809 2002-04-14  Jason Merrill  <jason@redhat.com>
4810
4811         * typeck.c (get_member_function_from_ptrfunc): Don't do
4812         gratuitious division and multiplication on
4813         ptrmemfunc_vbit_in_delta targets.
4814
4815 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
4816
4817         PR c++/5373.
4818         * semantics.c (finish_expr_stmt): Remember the type of the
4819         expression before any conversions are performed.
4820
4821 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
4822
4823         PR c++/5189.
4824         * call.c (add_template_candidate_real): Do not treat member
4825         templates as copy constructors.
4826
4827 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
4828
4829         * decl.c (duplicate_decls): Do not copy the RTL for a variable
4830         declaration if the old variable had an incomplete type and the new
4831         variable does not.
4832         (complete_vars): Do not call layout_decl for completed variables.
4833
4834 2002-04-12  Richard Sandiford  <rsandifo@redhat.com>
4835
4836         * decl.c (duplicate_decls): Don't try to unify an implicit typedef
4837         with an explicit one.
4838         (follow_tag_typedef): New.
4839         (lookup_tag): Use it to extract the tag of an explicit typedef.
4840         (xref_tag): Likewise.
4841
4842 2002-04-11  Andrew Haley  <aph@redhat.com>
4843
4844         * typeck.c (type_after_usual_arithmetic_conversions):
4845         If two types have the same variant, return immediately.
4846         When two floating-point operands are the same precision:
4847           convert to float if one of the operands is float;
4848           if neither operand is one of the standard types, return the type
4849           of the first operand.
4850
4851 2002-04-10  Nathan Sidwell  <nathan@codesourcery.com>
4852
4853         PR c++/5507
4854         * decl.c (make_typename_type): Remove implicit typenameness.
4855
4856 2002-04-09  Jason Merrill  <jason@redhat.com>
4857
4858         PR optimization/6189
4859         * semantics.c (genrtl_start_function): Don't free
4860         DECL_SAVED_FUNCTION_DATA for inline functions.
4861
4862         * init.c (build_member_call): For now, don't convert to
4863         intermediate base if it would cause an error.
4864
4865 2002-04-08  Paolo Carlini  <pcarlini@unitus.it>
4866
4867         * parse.y (namespace_qualifier, maybe_identifier,
4868         begin_explicit_instantiation, end_explicit_instantiation,
4869         apparent_template_type, .finish_template_type,
4870         do_id, maybe_init, defarg_again, component_decl_1):
4871         Add ending ';', in accordance with POSIX.
4872
4873 2002-04-06  Mark Mitchell  <mark@codesourcery.com>
4874
4875         PR c++/5571
4876         * class.c (layout_class_type): Remember incomplete static
4877         variables.
4878         (finish_struct_1): Call complete_vars, not
4879         hack_incomplete_structures.
4880         * cp-tree.h (hack_incomplete_structures): Rename to ...
4881         (complete_vars): ... this.
4882         (struct saved_scope): Remove incomplete.
4883         (namespace_scope_incomplete): Remove.
4884         * decl.c (struct binding_level): Remove incomplete.
4885         (incomplete_vars): New variable.
4886         (mark_binding_level): Don't mark incomplete.
4887         (print_binding_level): Don't print it.
4888         (mark_saved_scope): Don't mark incomplete.
4889         (pushdecl): Use maybe_register_incopmlete_var.
4890         (cxx_init_decl_processing): Register incomplete_vars for GC.
4891         (start_decl_1): Clarify error message.
4892         (hack_incomplete_vars): Remove.
4893         (maybe_register_incomplete_var): New function.
4894         (complete_vars): Likewise.
4895
4896 2002-04-06  Jason Merrill  <jason@redhat.com>
4897
4898         PR c++/4934
4899         * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
4900         set before checking it.
4901
4902         PR c++/525
4903         * init.c (build_member_call): Use build_scoped_ref.
4904         (resolve_offset_ref): Likewise.
4905         * call.c (build_scoped_method_call): Likewise.
4906         * tree.c (maybe_dummy_object): Kludge around current_class_type being
4907         wrong.
4908         * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
4909         * cp-tree.h: Adjust.
4910
4911         * init.c (push_base_cleanups): Just use build_scoped_method_call.
4912
4913         PR c++/6179
4914         * method.c (implicitly_declare_fn): Pass unqualified type to
4915         synthesize_exception_spec.
4916
4917 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
4918
4919         * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
4920         * cvt.c: Update comment.
4921         * init.c (expand_cleanup_for_base): Update.
4922         * semantics.c (finish_parenthesized_expr): Update.
4923         * typeck.c (cp_truthvalue_conversion): Update.
4924
4925 2002-04-04  Jason Merrill  <jason@redhat.com>
4926
4927         * semantics.c (finish_eh_cleanup): New fn.
4928         * cp-tree.h: Add prototype.
4929         * init.c (perform_member_init, expand_cleanup_for_base): Use
4930         finish_eh_cleanup.
4931         * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
4932         * cp-tree.h: Remove references.
4933         * decl.c (begin_constructor_body, end_constructor_body): Likewise.
4934         * dump.c (cp_dump_tree): Likewise.
4935         * pt.c (tsubst_expr): Likewise.
4936         * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
4937         (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
4938         * tree.c (cp_statement_code_p): Likewise.
4939
4940         * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
4941
4942         PR c++/5636
4943         * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
4944         cleanup for nrv.
4945
4946         PR c++/5104
4947         * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
4948         specifiers.
4949         [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
4950
4951 2002-04-03  Richard Henderson  <rth@redhat.com>
4952
4953         * cp-lang.c (cxx_warn_unused_global_decl): New.
4954         (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
4955
4956 2002-04-03  Neil Booth  <neil@daikokuya.demon.co.uk>
4957
4958         * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
4959         * tree.c (init_tree): Don't set hook.
4960
4961 2002-04-03  Roger Sayle  <roger@eyesopen.com>
4962
4963         PR c++/5998:
4964         * decl.c (duplicate_decls): Don't mess with assembler names when
4965         redeclaring builtin functions as static.
4966
4967 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
4968
4969         * call.c (build_addr_func): Update.
4970         * class.c (resolve_address_of_overloaded_function): Update.
4971         * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
4972         * cp-tree.h (cxx_mark_addressable): New.
4973         * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
4974         * decl2.c (build_cleanup): Update.
4975         * except.c (build_throw): Update.
4976         * init.c (resolve_offset_ref): Update.
4977         * pt.c (convert_nontype_argument): Update.
4978         * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
4979         * typeck.c (decay_conversion, build_array_ref, build_unary_op,
4980         unary_complex_lvalue): Update.
4981         (mark_addressable): Rename.
4982
4983 2002-04-01  Roger Sayle  <roger@eyesopen.com>
4984
4985         PR c++/5998:
4986         * decl.c (duplicate_decls):  Overwrite the RTL when (and only
4987         when) overwriting a built-in function.  Don't use COPY_DECL_RTL,
4988         but follow the SET_DECL_RTL idiom used elsewhere in the function.
4989
4990 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
4991
4992         * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
4993         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
4994         * decl.c (grokdeclarator): Update.
4995         * mangle.c (write_integer_cst): Update.
4996         * typeck.c (build_binary_op): Update.
4997
4998 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
4999
5000         * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
5001         * lex.c (cxx_init): Don't set hook.
5002
5003 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
5004
5005         * Make-lang.in (error.o): Update.
5006         * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
5007         * cp-tree.h (struct diagnostic_context): Predeclare.
5008         (cxx_print_error_function): New.
5009         * error.c: Include langhooks-def.h.
5010         (lang_print_error_function): Rename.  Update.
5011         (init_error): Don't set hook.
5012
5013 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
5014
5015         * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
5016         Redefine.
5017         * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
5018         * decl.c (finish_enum): Similarly.
5019         * error.c (dump_type): Similarly.
5020         * lex.c (cxx_init): Similarly.
5021         * mangle.c (write_builtin_type): Similarly.
5022         * typeck.c (comptypes): Similarly.
5023
5024 2002-03-28  Roger Sayle  <roger@eyesopen.com>
5025
5026         PR c++/5998:
5027         * decl.c (cxx_init_decl_processing): Re-enable built-in functions
5028         in the g++ front-end.
5029         (duplicate_decl): Allow redefinition of anticipated built-ins.
5030         Fix inlining problem by over-writing the old DECL_RTL.
5031         (lookup_namespace_name): Fail to find an identifier in the
5032         specified namespace if its still anticipated.
5033         (builtin_function_1): New function split out from builtin_function
5034         to create a builtin in the current namespace with given context.
5035         (builtin_function): Call builtin_function_1 to define the
5036         appropriate builtins in both the std and global namespaces.
5037         (select_decl): Don't test for anticipated decls here.
5038         (unqualified_namespace_lookup): Instead ignore them whilst
5039         searching through scopes and namespaces.
5040         * decl2.c (do_nonmember_using_decl): If a using declaration
5041         specifies an anticipated built-in function, mark it as no longer
5042         anticipated in that scope.
5043         (ambiguous_decl):  Avoid resolving to an anticipated decl.
5044         * lex.c (do_scoped_id): Fail to find an identifier in the global
5045         namespace if its still anticipated.
5046
5047 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
5048
5049         * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
5050         * cp-tree.h (cp_make_lang_type): Rename.
5051         * lex.c (cp_make_lang_type): Rename.
5052         (make_aggr_type): Update.
5053         * tree.c (init_tree): Don't set make_lang_type_fn.
5054
5055 2002-03-29  Jakub Jelinek  <jakub@redhat.com>
5056
5057         PR c++/6073
5058         * class.c (finish_struct_1): Update static field's DECL_MODE even
5059         if its type is a variant of t.
5060
5061 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
5062
5063         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
5064         * cp-tree.h (cxx_insert_default_attributes): New.
5065         * decl.c (insert_default_attributes): Rename.
5066
5067 2002-03-27  Mark Mitchell  <mark@codesourcery.com>
5068
5069         PR c++/4884
5070         * call.c (build_op_delete_call): Allow for the fact the placement
5071         may be a COMPOUND_EXPR.
5072
5073 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
5074
5075         * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
5076         * cp-tree.h (init_cplus_expand): Remove.
5077         (cxx_expand_expr): New.
5078         * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
5079         fix prototype.
5080         (init_cplus_expand): Remove.
5081         * lex.c (cxx_init): Don't call init_cplus_expand.
5082
5083 2002-03-26  Mark Mitchell  <mark@codesourcery.com>
5084
5085         PR c++/4884.
5086         * init.c (build_new_1): Allow for the fact the result of
5087         build_function_call may be a COMPOUND_EXPR.
5088
5089 2002-03-26  Nathan Sidwell  <nathan@codesourcery.com>
5090
5091         PR c++/5682
5092         * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
5093         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
5094         (dfs_skip_nonprimary_vbases_markedp): Remove.
5095         * search.c (get_shared_vbase_if_not_primary): Remove.
5096         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
5097         (dfs_skip_nonprimary_vbases_markedp): Remove.
5098         (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
5099         (dfs_marked_real_bases_queue_p): Likewise.
5100
5101 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
5102
5103         * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
5104         * cp-tree.h (cxx_mark_tree): New.
5105         * decl.c (lang_mark_tree): Rename cxx_mark_tree.
5106
5107 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
5108
5109         * cp-tree.h (cxx_maybe_build_cleanup): New.
5110         * decl.c (destroy_local_var, hack_incomplete_structures): Update.
5111         (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
5112         * tree.c (build_target_expr): Update.
5113         * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
5114
5115 2002-03-24  Neil Booth  <neil@daikokuya.demon.co.uk>
5116
5117         * decl2.c (cxx_decode_option): Handle -E.
5118         * lang-specs.h (default_compilers): Preprocess with cc1plus.
5119         * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
5120
5121 2002-03-23  Jakub Jelinek  <jakub@redhat.com>
5122
5123         PR c++/6037
5124         * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
5125
5126 2002-03-23  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
5127
5128         * error.c (dump_type): Be careful about implicit typenames.
5129
5130 2002-03-21  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
5131
5132         PR C++/3656
5133         * semantics.c (finish_base_specifier): Handle erronous base
5134         classes.
5135
5136 2002-03-22  Zack Weinberg  <zack@codesourcery.com>
5137
5138         * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
5139         REAL_IS_NOT_DOUBLE.
5140
5141 2002-03-22  Jeff Knaggs  <jknaggs@redhat.com>
5142
5143         * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
5144         an index into the vtable_entry array regardless of
5145         TARGET_PTRMEMFUNC_VBIT_LOCATION.
5146
5147 2002-03-21  Aldy Hernandez  <aldyh@redhat.com>
5148
5149         * tree.c (cp_cannot_inline_tree_fn): Same.
5150
5151 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
5152
5153         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
5154         insert_block, getdecls, global_bindings_p): New.
5155
5156 2002-03-20  Nathan Sidwell  <nathan@codesourcery.com>
5157
5158         PR c++/4361
5159         * mangle.c (struct globals) Add internal_mangling_p member.
5160         (write_template_param): Do internal mangling, if needed.
5161         (mangle_conv_op_name_for_type): Request internal mangling.
5162
5163 2002-03-20  Jason Merrill  <jason@redhat.com>
5164
5165         PR c++/2136
5166         * init.c (build_delete): Check access for a member op delete here.
5167         * decl2.c (delete_sanity): Not here.
5168
5169 2002-03-19  Jason Merrill  <jason@redhat.com>
5170
5171         PR c++/5118
5172         * class.c (get_vfield_name): Use the constructor_name.
5173
5174 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
5175
5176         * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
5177         * cp-tree.h (lang_printable_name): Rename.
5178         * error.c (lang_decl_name): Use new hook.
5179         * lex.c (cxx_init): Remove old hook.
5180         * pt.c (tsubst_decl): Use new hook.
5181         * tree.c (lang_printable_name): Rename.
5182
5183 2002-03-18  Eric Botcazou  <ebotcazou@multimania.com>
5184
5185         PR c++/3882
5186         * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
5187         (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
5188         only after recording the declaration.
5189
5190 2002-03-18  Jason Merrill  <jason@redhat.com>
5191
5192         PR c++/2039
5193         * init.c (resolve_offset_ref): Hand off to build_component_ref.
5194
5195         PR c++/4222, c++/5995
5196         * call.c (build_over_call): Fix empty class logic.
5197
5198         PR c++/3870
5199         * cp-tree.h (struct saved_scope): Add last_parms field.
5200         * decl.c (maybe_push_to_top_level): Save last_function_parms.
5201         (pop_from_top_level): Restore it.
5202
5203         PR c++/4377
5204         * mangle.c (write_expression): Strip NOP_EXPRs sooner.  Also strip
5205         NON_LVALUE_EXPRs.
5206
5207         PR c++/4003
5208         * pt.c (tsubst_friend_function): Use decl_namespace_context.
5209
5210         PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
5211         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
5212         type with a nontrivial destructor.
5213
5214 2002-03-17  Jason Merrill  <jason@redhat.com>
5215
5216         PR c++/4460
5217         * class.c (build_base_path): Virtual base layout is fixed in
5218         in-charge [cd]tors.
5219
5220 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
5221
5222         * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
5223         * parse.y (yyparse): Remove macro.
5224
5225 2002-03-17  Jason Merrill  <jason@redhat.com>
5226
5227         PR c++/5757
5228         * init.c (build_new_1): Pass the right pointer to op delete.
5229
5230 2002-03-16  Nathan Sidwell  <nathan@codesourcery.com>
5231
5232         PR c++/4361
5233         * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
5234         conversion operators go.
5235         (struct lang_decl_flags): Add template_conv_p and unused
5236         bitfields.
5237         (DECL_TEMPLATE_CONV_FN_P): New macro.
5238         * call.c (build_user_type_conversion_1): Don't check second type
5239         conversion of overload set first.
5240         * class.c (add_method): Make sure templated conversion operators
5241         all end up on slot 2.
5242         * lex.c (do_identifier): A conversion operator token might be
5243         satisfied by a templated conversion operator.
5244         * pt.c (check_explicit_specialization): Use
5245         CLASSTYPE_FIRST_CONVERSION_SLOT.
5246         (template_parm_this_level_p): New function.
5247         (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
5248         * search.c (lookup_fnfields_1): Template conversions will be on
5249         the first slot.
5250         * typeck.c (build_component_ref): Preserve the type of an
5251         conversion operator name on the overload type.
5252         (build_x_function_call): Retrieve the conversion operator name.
5253
5254 2002-03-15  Richard Henderson  <rth@redhat.com>
5255
5256         * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
5257
5258 2002-03-15  Mark Mitchell  <mark@codesourcery.com>
5259
5260         * cp-tree.h (CLEANUP_DECL): Remove.
5261         (CLEANUP_EXPR): Likewise.
5262         * decl.c (destroy_local_var): Simplify.
5263         (maybe_build_cleanup): Tidy.
5264         * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
5265         * semantics.c (cp_expand_stmt): Likewise.
5266         * cp/tree.c (cp_statement_code_p): Likewise.
5267
5268 2002-03-15  Jason Merrill  <jason@redhat.com>
5269
5270         PR c++/5857
5271         * decl.c (duplicate_decls): Use merge_types instead of common_type.
5272         * typeck.c (common_type): Just hand off to
5273         type_after_usual_arithmetic_conversions and
5274         composite_pointer_type.
5275         (merge_types): New fn.
5276         (commonparms): Use it instead of common_type.
5277         (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
5278         (composite_pointer_type): Also handle attributes.
5279         * cp-tree.h: Declare merge_types.
5280
5281         * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
5282         variables.
5283         * decl2.c (maybe_make_one_only): Also mark the decl as needed.
5284
5285 2002-03-14  Richard Henderson  <rth@redhat.com>
5286
5287         * decl.c: Include c-pragma.h.
5288         (start_decl, start_function): Invoke maybe_apply_pragma_weak.
5289         * Make-lang.in: Update dependencies.
5290
5291 2002-03-14  Jakub Jelinek  <jakub@redhat.com>
5292
5293         PR c++/5908
5294         * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
5295         * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
5296
5297 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
5298
5299         * mangle.c (write_builtin_type): Handle 128-bit integers even if
5300         they are not a standard integer type.
5301
5302 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
5303
5304         * cp-tree.h (init_init_processing): Remove declaration.
5305         * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
5306         * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
5307
5308 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5309
5310         * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
5311         Define.
5312         * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
5313         tree_code_length.
5314         * lex.c (cplus_tree_code_type, cplus_tree_code_length,
5315         cplus_tree_code_name): Delete.
5316         (cxx_init): Don't call add_c_tree_codes, instead set
5317         lang_unsafe_for_reeval.  Don't try to copy into the various
5318         tree_code arrays.
5319
5320 2002-03-12  Nathan Sidwell  <nathan@codesourcery.com>
5321
5322         PR c++/5659
5323         * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
5324         * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
5325         definitions.
5326
5327 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
5328
5329         Revert 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>,
5330         DR209 is now not a defect.
5331         * cp-tree.h (skip_type_access_control): Remove.
5332         * decl.c (grokdeclarator): Do type access control for friend
5333         declarations.
5334         * semantics.c (decl_type_access_control): Don't reset
5335         current_type_lookups.
5336         (save_type_access_control): Always save the lookups.
5337         (skip_type_access_control): Remove.
5338         (finish_class_definition): Don't change type_lookups.
5339
5340 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
5341
5342         Revert 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>,
5343         It is incorrect.
5344         * typeck.c (build_static_cast): Compare non-qualified types
5345         with pointer to member conversions.
5346
5347 2002-03-11  Dan Nicolaescu  <dann@ics.uci.edu>
5348             Daniel Berlin  <dan@dberlin.org>
5349
5350         * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
5351         (cxx_get_alias_set): Use it.
5352
5353 2002-03-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5354
5355         * cp-tree.h (stabilize_expr): Prototype.
5356
5357 2002-03-08  Craig Rodrigues  <rodrigc@gcc.gnu.org>
5358
5359         * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
5360         conditional return void.
5361
5362 2002-03-08  Neil Booth  <neil@daikokuya.demon.co.uk>
5363
5364         * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
5365         * cp-tree.h (cxx_unsave): New.
5366         * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
5367         (init_tree): Update.
5368
5369 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5370
5371         * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
5372         explicit sizeof/sizeof.
5373         * decl2.c (cxx_decode_option): Likewise.
5374         * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
5375
5376 2002-03-02  Nathan Sidwell  <nathan@codesourcery.com>
5377
5378         PR c++/775
5379         * decl.c (lookup_tag): Only reject enum/class mismatch, not
5380         class/union mismatch.
5381         * parse.y (check_class_key): New function.
5382         (structsp): Call it.
5383
5384 2002-03-01  Michael Matz  <matz@suse.de>
5385
5386         * typeck.c (cp_pointer_int_sum): Complete inner type which is
5387         used later by size_in_bytes().
5388
5389 2002-03-01  Phil Edwards  <pme@gcc.gnu.org>
5390
5391         * cp-tree.h:  Require __GNUC__ to be #defined.
5392         (build_init):  Add missing prototype.
5393
5394 2002-03-01  Jason Merrill  <jason@redhat.com>
5395
5396         * except.c: Don't include decl.h or obstack.h.  Do include
5397         tree-inline.h.
5398         (build_throw): Destroy temporaries from the thrown
5399         expression before calling __cxa_throw.  Construct a thrown
5400         temporary directly into the exception object.
5401         (stabilize_throw_expr): New function.
5402         (wrap_cleanups_r): New function.
5403         * tree.c (stabilize_expr): New function.
5404         * init.c (build_init): New function.
5405         * Make-lang.in (cp/except.o): Adjust .h deps.
5406
5407 2002-02-28  Jason Merrill  <jason@redhat.com>
5408
5409         * search.c (lookup_base_r): Don't clear is_non_public just because
5410         we found a friendly scope.
5411
5412         * decl.c (finish_function): Only warn about missing return
5413         statement with -Wreturn-type.
5414
5415 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
5416
5417         * class.c (build_clone): Update.
5418         * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
5419         * cp-tree.h (cxx_dup_lang_specific_decl): New.
5420         * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
5421         (copy_decl): Update.
5422         * method.c (make_thunk): Update.
5423
5424 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
5425
5426         * decl2.c: Delete traditional-mode-related code copied from
5427         the C front end but not used, or used only to permit the
5428         compiler to link.
5429
5430 2002-02-24 Craig Rodrigues  <rodrigc@gcc.gnu.org>
5431
5432         PR c++/4093
5433         * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
5434         to void.
5435
5436 2002-02-22  Jakub Jelinek  <jakub@redhat.com>
5437
5438         PR other/5746
5439         * semantics.c (finish_switch_cond): Don't call get_unwidened
5440         if error_mark_node.
5441
5442 2002-02-22  Nathan Sidwell  <nathan@codesourcery.com>
5443
5444         PR c++/2645, DR 295
5445         * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
5446         tf_keep_type_decl.
5447         (make_typename_type): Use tsubst_flags_t.
5448         * decl.c (make_typename_type): Adjust. Return non-artificial
5449         TYPE_DECLs, if required.
5450         (grokdeclarator): Simplify CVR qualification handling. Allow bad
5451         qualifiers on typedef types.
5452         * decl2.c (handle_class_head): Adjust make_typename_type call.
5453         * parse.y (nested_name_specifier): Likewise.
5454         (typename_sub0): Likewise.
5455         (typename_sub1): Likewise.
5456         * pt.c (convert_template_argument): Adjust make_typename_type
5457         return value.
5458         (tsubst): Adjust cp_build_qualified_type_real calls.
5459         (check_cv_quals_for_unify): Cope with allowing bad qualifications
5460         on template type parms.
5461         (instantiate_decl): Recheck substitutions to give warnings on bad
5462         qualifications.
5463         * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
5464
5465 2002-02-21  Aldy Hernandez  <aldyh@redhat.com>
5466
5467         * cp/decl.c (duplicate_decls): Merge always_inline attribute.
5468
5469         * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
5470         unless DECL_ALWAYS_INLINE.
5471
5472 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
5473
5474         * typeck.c (cp_pointer_int_sum): Renamed from
5475         pointer_int_sum, call pointer_int_sum.
5476
5477 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
5478
5479         * decl.c (duplicate_decls): Return 0 if issued error about
5480         redeclaration.
5481
5482 2002-02-19  Jason Merrill  <jason@redhat.com>
5483
5484         ABI change: Mangle `void (A::*)() const' as
5485         M1AKFvvE, not MK1AFvvE.
5486         * mangle.c (write_function_type): Write cv-quals for member
5487         function type here.
5488         (write_pointer_to_member_type): Not here.
5489
5490 2002-02-18  Jason Merrill  <jason@redhat.com>
5491
5492         * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
5493         (do_decl_instantiation): Likewise.
5494
5495 2002-02-17  Craig Rodrigues  <rodrigc@gcc.gnu.org>
5496
5497         PR c++/5685
5498         * decl.c (duplicate_decls): Make warning unconditional
5499         if duplicate default argument declarations are present.
5500
5501 2002-02-17  Jakub Jelinek  <jakub@redhat.com>
5502
5503         * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
5504         shortening.
5505
5506 2002-02-15  Nathan Sidwell  <nathan@codesourcery.com>
5507
5508         * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
5509         remove incorrect comment. Move #if 0'd code to common path. Use
5510         IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
5511
5512 2002-02-13  Jason Merrill  <jason@redhat.com>
5513
5514         * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
5515         (finish_function): Don't warn if current_function_returns_null.
5516
5517         * typeck2.c (digest_init): Do handle values of vector type.
5518
5519         * typeck2.c (digest_init, process_init_constructor): Treat vectors
5520         like arrays.
5521
5522 2002-02-11  Jason Merrill  <jason@redhat.com>
5523
5524         * parse.y (reserved_declspecs): Don't handle attributes.
5525         (reserved_typespecquals): Handle them here.
5526         * Make-lang.in (parse.c): Adjust expected conflicts.
5527
5528 2002-02-08  Jakub Jelinek  <jakub@redhat.com>
5529
5530         * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
5531         instead of compstmt.
5532         (compstmt_or_stmtexpr): Renamed from compstmt.
5533         (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
5534
5535 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
5536
5537         Rename instantiate_type_flags to tsubst_flags_t & expand use.
5538         * cp-tree.h (instantiate_type_flags): Rename to ...
5539         (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
5540         add tf_warning flag.
5541         (instantiate_type): Adjust prototype.
5542         (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
5543         do_type_instantiation, cp_build_qualified_type_real): Likewise.
5544         cp_build_qualified_type: Adjust.
5545         * class.c (instantiate_type): Adjust parameter. Rename itf_* to
5546         tf_*.
5547         * call.c (standard_conversion): Rename itf_* to tf_*.
5548         (reference_binding): Likewise.
5549         (convert_like_real): Likewise.
5550         * cvt.c (cp_convert_to_pointer): Likewise.
5551         (convert_to_reference): Likewise.
5552         * decl.c (lookup_namespace_name): Use tf_* flags.
5553         (make_typename_type): Likewise.
5554         (grokdeclarator): Likewise.
5555         * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
5556         (coerce_template_template_parms, convert_template_argument,
5557         coerce_template_parms, maybe_get_template_decl_from_type_decl,
5558         lookup_template_class, tsubst_friend_function, tsubst_friend_class,
5559         instantiate_class_template, tsubst_template_arg_vector,
5560         tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
5561         tsubst_decl, tsubst_arg_types, tsubst_function_type,
5562         tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
5563         instantiate_template, fn_type_unification,
5564         resolve_overloaded_unification, verify_class_unification,
5565         unify, get_bindings_real, do_type_instantiation,
5566         regenerate_decl_from_template, instantiate_decl,
5567         tsubst_initializer_list, tsubst_enum,
5568         get_mostly_instantiated_function_type,
5569         invalid_nontype_parm_type_p): Likewise.
5570         * tree.c (cp_build_qualified_type_real): Likewise.
5571         * typeck.c (build_binary_op): Rename itf_* to tf_*.
5572         (build_ptrmemfunc): Likewise.
5573         (convert_for_assignment): Likewise.
5574
5575 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
5576
5577         PR c++/109
5578         * decl.c (grokdeclarator): Allow friend declarations from
5579         dependent types.
5580         * decl2.c (handle_class_head): Don't push into template parm contexts.
5581         * pt.c (push_template_decl_real): Template parm contexts are never
5582         being defined.
5583
5584 2002-02-05  Alexandre Oliva  <aoliva@redhat.com>
5585
5586         * class.c: Include target.h.
5587         (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
5588         BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
5589         bit-field layout.
5590         * Make-lang.in: Adjust deps.
5591
5592 2002-02-05  Jason Merrill  <jason@redhat.com>
5593
5594         * error.c (dump_type): Be more helpful about VECTOR_TYPE.
5595
5596 2002-02-04  Jakub Jelinek  <jakub@redhat.com>
5597
5598         * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
5599         (finish_switch_cond): Set SWITCH_TYPE.
5600
5601 2002-02-04  Richard Henderson  <rth@redhat.com>
5602
5603         * method.c (use_thunk): Always initialize the block tree.  Reindent.
5604         * semantics.c (expand_body): Emit thunks after function, not before.
5605
5606 2002-02-04  Jason Merrill  <jason@redhat.com>
5607
5608         * decl.c (start_function): Call cplus_decl_attributes immediately
5609         after grokdeclarator.
5610
5611         * decl.c (start_function): Combine DECL_RESULT handling code.
5612
5613 2002-02-03  Jason Merrill  <jason@redhat.com>
5614
5615         * xref.c: Remove.
5616         * Make-lang.in (CXX_OBJS): Remove cp/xref.o
5617         (cp/xref.o): Remove dependencies.
5618         * class.c (finish_struct_1, check_methods): Don't call xref fns.
5619         (finish_struct_1): Likewise.
5620         * friend.c (make_friend_class): Likewise.
5621         * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
5622         * spew.c (read_process_identifier): Likewise.
5623
5624 2002-02-01  Jason Merrill  <jason@redhat.com>
5625
5626         PR c++/4872
5627         * decl.c (finish_function): Warn about a non-void function with
5628         no return statement and no abnormal exit.
5629         * cp-tree.h (struct cp_language_function): Add returns_abnormally.
5630         (current_function_returns_abnormally): New macro.
5631         * call.c (build_call): Set it.
5632
5633         * typeck.c (build_component_ref): Always complain about offsetof
5634         constructs on non-PODs.  Only make it an error for members of
5635         virtual bases.
5636
5637         * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
5638         (dump_function_decl): Always dump parms.
5639
5640         * decl2.c (finish_static_data_member_decl): Complain about a local
5641         class with a static data member.
5642
5643         PR c++/4286
5644         * search.c (lookup_field_1): Don't xref a static data member
5645         just because we looked it up.
5646
5647 2002-01-31  Jason Merrill  <jason@redhat.com>
5648
5649         * Make-lang.in (parse.c): Handle .output file.
5650
5651         PR c++/3395
5652         * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
5653         not TREE_TYPE.
5654         * semantics.c (finish_class_definition): Adjust.
5655
5656         Allow attributes in parms and casts.
5657         * parse.y (named_parm): Don't strip attrs.
5658         (declmods): Remove 'attributes' production.
5659         (nonempty_cv_qualifiers): Accept attributes.
5660         (ATTRIBUTE): Give precedence.
5661         * decl.c (groktypename): Handle attributes.
5662         (grokparms): Likewise.
5663
5664 2002-01-29  Jakub Jelinek  <jakub@redhat.com>
5665
5666         * decl2.c (cxx_decode_option): Pass 0 as last argument to
5667         cpp_handle_option.
5668         * lang-specs.h: Use cpp_unique_options instead of cpp_options
5669         when used together with cc1_options.
5670
5671 2002-01-29  Nathan Sidwell  <nathan@codesourcery.com>
5672
5673         PR c++/5132
5674         * typeck2.c (digest_init): Make sure non-array core type is
5675         instantiated.
5676         * decl2.c (reparse_absdcl_as_casts): Just store the type in the
5677         constructor, rather than build a new one.
5678         (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
5679         PURPOSE of constructor elts.
5680
5681 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
5682
5683         * Make-lang.in (parse.c): Adjust expected number of
5684         shift-reduce conflicts.
5685         (decl.o): Depend on diagnostic.h.
5686         * decl.c: Include diagnostic.h.
5687         (grokdeclarator): Check for null pointer.
5688         (finish_function): Don't abort when
5689         current_binding_level->parm_flag != 1, if errors have
5690         occurred; throw away the statement tree and extra binding
5691         levels, and continue.
5692         * lex.c (note_list_got_semicolon): Check for null pointer.
5693         * method.c (hack_identifier): Just return error_mark_node if
5694         value is error_mark_node.
5695         * parse.y (primary: TYPEID(type_id)): No need to use
5696         TYPE_MAIN_VARIANT here.
5697         (handler_seq): Accept an empty list of catch clauses and
5698         generate a fake handler block to avoid later crashes.
5699         (ansi_raise_identifier): Accept the error token too.
5700         * semantics.c (begin_class_definition,
5701         finish_class_definition): Check for error_mark_node.
5702
5703 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
5704
5705         * typeck2.c (friendly_abort): Delete definition.
5706         * cp-tree.h (friendly_abort): Don't prototype.
5707         (my_friendly_assert): Use fancy_abort.
5708
5709 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
5710
5711         * cp-tree.h (my_friendly_abort): Remove.
5712
5713 2002-01-23  Jakub Jelinek  <jakub@redhat.com>
5714
5715         * spew.c (pending_inlines, pending_inlines_tail,
5716         processing_these_inlines): Make static.
5717         (mark_pending_inlines): Remove static.
5718         (begin_parsing_inclass_inline): If in function, save pi
5719         for GC to cp_function_chain->unparsed_inlines instead.
5720         (process_next_inline): Likewise.
5721         * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
5722         (mark_pending_inlines): Add prototype.
5723         * decl.c (spew_debug): Remove unused extern.
5724         (mark_lang_function): Call mark_pending_inlines.
5725
5726 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
5727
5728         * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
5729         init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
5730         semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
5731         Change my_fancy_abort() to abort().
5732
5733 2002-01-23  Jason Merrill  <jason@redhat.com>
5734
5735         PR c++/5453
5736         * class.c (fixed_type_or_null): Fix thinko.
5737
5738         PR c++/3331
5739         * init.c (resolve_offset_ref): Use build_indirect_ref.
5740
5741         * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
5742
5743 2002-01-22  Jason Merrill  <jason@redhat.com>
5744
5745         * parse.y (function_body): Suppress the block for the outermost
5746         curly braces.
5747         * decl.c (pushdecl): Don't try to skip it.
5748         (begin_function_body): Keep the block we create, not the next one.
5749         * init.c (emit_base_init): Don't mess with keep_next_level.
5750
5751         * class.c (build_base_path): Tweak formatting.
5752
5753 2002-01-19  Nathan Sidwell  <nathan@codesourcery.com>
5754
5755         Fix regression introduced with patch for c++/775
5756         * parse.y (class_head_defn): Check for template specializations
5757         with a different class-key.
5758
5759 2002-01-17  Jason Merrill  <jason@redhat.com>
5760
5761         * decl.c (begin_constructor_body, begin_destructor_body): New fns.
5762         (begin_function_body): Call them and keep_next_level.
5763         * init.c (emit_base_init): Call keep_next_level.
5764         * semantics.c (setup_vtbl_ptr): Lose.
5765         * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
5766         (vtbls_set_up_p): Lose.
5767         * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
5768         * method.c (do_build_copy_constructor): Likewise.
5769         (synthesize_method): Call finish_mem_initializers.
5770         * parse.y (nodecls): Likewise.
5771
5772         * error.c (dump_type_suffix): Print the exception specs before
5773         recursing.
5774         (dump_function_decl): Here, too.
5775
5776         * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
5777
5778 2002-01-10  Ira Ruben   <ira@apple.com>
5779
5780         PR c++/907
5781         * decl.c (start_method): Handle attrlist.
5782
5783 2002-01-10  Jakub Jelinek  <jakub@redhat.com>
5784
5785         * decl2.c (max_tinst_depth): Increase default limit to 500.
5786
5787 2002-01-10  Graham Stott  <grahams@redhat.com>
5788
5789         * spew.c (YYCHAR): Uppercase macro parameter and add
5790         parenthesis.
5791         (YYCODE): Likewise.
5792         (NAME): Uppercase macro parameter.
5793
5794 2002-01-09  Graham Stott  <grahams@redhat.com>
5795
5796         * decl.h (grokdeclarator): Wrap long line.
5797
5798         * semantics.c (FINISH_COND): Uppercase macro paramaters and
5799         add parenthesis.
5800
5801 2002-01-08  Graham Stott  <grahams@redhat.com>
5802
5803         * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
5804         (PALLOC): Uppercase macro parameter and whitespace.
5805         (SALLOC): Uppercase macro parameter.
5806         (SFREE): Uppercase macros parameter, add parenthese and
5807         whitespace.
5808         (STREQL): Uppercase macro parameter and whitespace.
5809         (STRNEQ): Likewise.
5810         (STRLSS): Likewise.
5811         (STRLEQ): Likewise.
5812         (STRGTR): Likewise.
5813         (STRGEQ): Likewise.
5814
5815         * call.c (convert_like): Add parenthesis and wrap.
5816         (convert_like_with_context): Likewise.
5817         (ICS_RANK): Whitespace.
5818         (NEED_TEMPORARY_P): Remove parenthesis.
5819
5820         * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
5821         whitespace.
5822         (VTT_MARKED_BINFO_P): Likewise.
5823
5824         * decl.c (BINDING_LEVEL): Add parenthesis.
5825         (DEF_OPERATOR): Likewise.
5826
5827         * mangle.c (MANGLE_TRACE): Add parenthesis.
5828         (MANGLE_TRACE_TREE): Likewise.
5829         (write_signed_number): Likewise.
5830         (write_unsigned_number): Likewise.
5831
5832         * pt.c (ccat): Uppercase macro parameter.
5833         (cat): Likewise
5834
5835         * search.c (SET_BINFO_ACCESS): Add parenthesis.
5836
5837 2002-01-07  Jason Merrill  <jason@redhat.com>
5838
5839         * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
5840         to pedwarn.
5841
5842         PR c++/3536
5843         * method.c (make_thunk): If !flag_weak, give the thunk the
5844         function's linkage.
5845         (use_thunk): Here, too.
5846
5847 2002-01-07  Graham Stott  <grahams@redhat.com>
5848
5849         * error.c: Update copyright date.
5850         (print_scope_operator): Add parenthesis.
5851         (print_left_paren): Likewise.
5852         (print_right_paren): Likewise.
5853         (print_left_bracket): Likewise.
5854         (print_right_bracket): Likewise.
5855         (print_template_argument_list_start): Likewise.
5856         (print_template_argument_list_end): Likewise.
5857         (print_non_consecutive_character): Likewise.
5858         (print_tree_identifier): Likewise.
5859         (print_identifier): Likewise.
5860         (NEXT_CODE): Uppercase macro parameter.
5861         (ident_fndecl): Delete unused.
5862         (GLOBAL_THING): Likewise.
5863
5864 2002-01-06  Graham Stott  <grahams@redhat.com>
5865
5866         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
5867         (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
5868         (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
5869         (RECORD_OR_UNION_TYPE_CHECK): Likewise.
5870         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
5871         (C_IS_RESERVED_WORD): Uppercase macro parameter.
5872         (C_RID_YYCODE) Likewise.
5873         (ptrmem_cst): Use rtx.
5874         (LOCAL_BINDING_P): Add whitespace.
5875         (INHERITED_VALUE_BINDING_P): Likewise.
5876         (BINDING_SCOPE): Wrap long line.
5877         (BINDING_HAS_LEVEL_P): Remove parenthesis.
5878         (BINDING_VALUE): Wrap long line.
5879         (BINDING_TYPE): Whitespace.
5880         (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
5881         (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
5882         (IDENTIFIER_NAMESPACE_VALUE): Likewise.
5883         (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
5884         (same_type_p): Uppercase macro parameters.
5885         (same_type_ignoring_top_level_qualifiers_p): Likewise.
5886         (OVL_FUNCTION): Wrap long line.
5887         (OVL_CHAIN): Whitespace.
5888         (OVL_CURRENT): Add parenthesis and whitespace.
5889         (OVL_NEXT): Whitespace.
5890         (OVL_USED): Likewise.
5891         (IDENTIFIER_TYPE_VALUE): Likewise.
5892         (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
5893         (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
5894         (LANG_ID_FIELD): Whitespace.
5895         (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
5896         (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
5897         (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
5898         (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
5899         (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
5900         (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
5901         (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
5902         (IDENTIFIER_VIRTUAL_P): Likewise.
5903         (IDENTIFIER_OPNAME_P): Likewise.
5904         (IDENTIFIER_TYPENAME_P): Remove parenthesis.
5905         (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
5906         (C_SET_EXP_ORIGINAL_CODE): Likewise.
5907         (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
5908         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
5909         (IS_AGGR_TYPE): Uppercase macro parameter.
5910         (CLASS_TYPE_P): Likewise.
5911         (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
5912         (IS_AGGR_TYPE_2): Whitespace.
5913         (TAGGED_TYPE_P): Uppercase macro parameter.
5914         (TYPE_BUILT_IN): Whitespace.
5915         (TYPE_FOR_JAVA): Likewise.
5916         (FUNCTION_ARG_CHAIN): Remove parenthesis.
5917         (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
5918         (FUNCTION_FIRST_USER_PARAM): Likewise.
5919         (PROMOTES_TO_AGGR_TYPE): Whitespace.
5920         (DERIVED_FROM_P): Add parenthesis and wrap.
5921         (UNIQUELY_DERIVED_FROM_P): Likewise.
5922         (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
5923         (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
5924         (CLASSTYPE_USE_TEMPLATE): Whitespace.
5925         (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
5926         (TYPE_GETS_DELETE): Add parenthesis.
5927         (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
5928         (TYPE_HAS_ASSIGN_REF): Likewise,
5929         (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
5930         (TYPE_HAS_INIT_REF): Likewise.
5931         (TYPE_HAS_CONST_INIT_REF): Likewise.
5932         (TYPE_BEING_DEFINED): Likewise.
5933         (TYPE_LANG_SPECIFIC): Likewise.
5934         (CLASSTYPE_RTTI): Likewise.
5935         (TYPE_OVERLOADS_CALL_EXPR): Likewise.
5936         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
5937         (TYPE_OVERLOADS_ARROW): Likewise.
5938         (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
5939         (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
5940         (CLASSTYPE_METHOD_VEC): Likewise.
5941         (CLASSTYPE_MARKED_N): Likewise.
5942         (CLASSTYPE_MARKED): Likewise.
5943         (CLASSTYPE_MARKED2): Likewise.
5944         (CLASSTYPE_MARKED3): Likewise.
5945         (CLASSTYPE_MARKED4): Likewise.
5946         (CLASSTYPE_MARKED5): Likewise.
5947         (CLASSTYPE_MARKED6): Likewise.
5948         (SET_CLASSTYPE_MARKED): Whitespace.
5949         (CLEAR_CLASSTYPE_MARKED): Likewise.
5950         (SET_CLASSTYPE_MARKED2): Likewise.
5951         (CLEAR_CLASSTYPE_MARKED2): Likewise.
5952         (SET_CLASSTYPE_MARKED3): Likewise.
5953         (CLEAR_CLASSTYPE_MARKED3): Likewise.
5954         (SET_CLASSTYPE_MARKED4): Likewise.
5955         (CLEAR_CLASSTYPE_MARKED4): Likewise.
5956         (SET_CLASSTYPE_MARKED5): Likewise.
5957         (CLEAR_CLASSTYPE_MARKED5): Likewise.
5958         (SET_CLASSTYPE_MARKED6): Likewise.
5959         (CLEAR_CLASSTYPE_MARKED6): Likewise.
5960         (CLASSTYPE_TAGS): Likewise.
5961         (CLASSTYPE_VSIZE): Likewise.
5962         (CLASSTYPE_VBASECLASSES): Likewise.
5963         (CANONICAL_BINFO): Add parenthesis.
5964         (CLASSTYPE_SIZE(NODE): Likewise.
5965         (CLASSTYPE_SIZE_UNIT): Likewise.
5966         (CLASSTYPE_ALIGN(NODE): Likewise.
5967         (CLASSTYPE_USER_ALIGN): Likewise.
5968         (TYPE_JAVA_INTERFACE): Likewise.
5969         (CLASSTYPE_PURE_VIRTUALS): Likewise.
5970         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
5971         (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
5972         (CLASSTYPE_HAS_MUTABLE): Likewise.
5973         (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
5974         (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
5975         (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
5976         (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
5977         (CLASSTYPE_INTERFACE_ONLY): Likewise.
5978         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
5979         (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
5980         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
5981         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
5982         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
5983         (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
5984         (BINFO_UNSHARED_MARKED): Whitespace.
5985         (BINFO_MARKED): Whitespace and wrap.
5986         (SET_BINFO_MARKED): Likewise.
5987         (CLEAR_BINFO_MARKED): Likewise.
5988         (BINFO_VTABLE_PATH_MARKED): Likewise.
5989         (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
5990         (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
5991         (BINFO_SUBVTT_INDEX): Remove parenthesis.
5992         (BINFO_VPTR_INDEX): Likewise.
5993         (BINFO_PRIMARY_BASE_OF): Likewise,
5994         (CLASSTYPE_VFIELDS): Whitespace.
5995         (VF_DERIVED_VALUE): Wrap long line.
5996         (NAMESPACE_LEVEL): Whitespace.
5997         (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
5998         (DEFARG_POINTER): Whitespace.
5999         (DECL_NEEDED_P): Remove parenthesis.
6000         (DECL_LANGUAGE): Whitespace.
6001         (SET_DECL_LANGUAGE): Add parenthesis.
6002         (DECL_CONSTRUCTOR_P): Whitespace and wrap.
6003         (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
6004         (DECL_IN_AGGR_P): Whitespace.
6005         (DECL_FRIEND_P): Likewise.
6006         (DECL_BEFRIENDING_CLASSES): Likewise.
6007         (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
6008         (DECL_NONCONVERTING_P): Whitespace.
6009         (DECL_PURE_VIRTUAL_P): Likewise.
6010         (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
6011         (DECL_PENDING_INLINE_INFO): Whitespace.
6012         (DECL_SORTED_FIELDS): Likewise.
6013         (DECL_DEFERRED_FN): Likewise.
6014         (DECL_TEMPLATE_INFO): Likewise.
6015         (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
6016         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
6017         (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
6018         (TMPL_ARGS_LEVEL): Likewise.
6019         (SET_TMPL_ARGS_LEVEL): Likewise.
6020         (INNERMOST_TEMPLATE_PARMS): Whitespace.
6021         (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
6022         (INTEGRAL_CODE_P(CODE): Add parenthesis.
6023         (CP_INTEGRAL_TYPE_P): Remove parenthesis.
6024         (TYPE_HAS_CONSTRUCTOR): Whitespace.
6025         (TREE_HAS_CONSTRUCTOR): Likewise.
6026         (TYPE_HAS_DESTRUCTOR): Likewise.
6027         (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
6028         (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
6029         (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
6030         (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
6031         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
6032         (TYPE_PTRMEMFUNC_P): Likewise.
6033         (TYPE_PTRMEMFUNC_FLAG): Likewise.
6034         (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
6035         (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
6036         (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
6037         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
6038         (DECL_ACCESS): Whitespace.
6039         (DECL_GLOBAL_CTOR_P): Remove parenthesis.
6040         (DECL_GLOBAL_DTOR_P): Likewise.
6041         (GLOBAL_INIT_PRIORITY): Likewise.
6042         (DECL_TEMPLATE_PARMS): Likewise.
6043         (DECL_TEMPLATE_RESULT): Likewise.
6044         (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
6045         (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
6046         (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
6047         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
6048         (PRIMARY_TEMPLATE_P): Add parenthesis.
6049         (DECL_USE_TEMPLATE): Whitespace.
6050         (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
6051         (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
6052         (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
6053         (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
6054         (CALL_DECLARATOR_PARMS): Remove parenthesis.
6055         (CALL_DECLARATOR_QUALS): Likewise.
6056         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
6057         (TEMP_NAME_P): Wrap.
6058         (VFIELD_NAME_P): Likewise.
6059         (B_SET): Uppercase macro parameters and add parenthesis.
6060         (B_CLR): Likewise.
6061         (B_TST): Likewise.
6062         (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
6063         (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
6064         (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
6065         (same_or_base_type_p): Likewise.
6066         (cp_deprecated): Likewise.
6067
6068 2002-01-05  Richard Henderson  <rth@redhat.com>
6069
6070         * semantics.c (expand_body): Revert last change.
6071
6072 2002-01-04  Jason Merrill  <jason@redhat.com>
6073
6074         PR c++/4122
6075         * class.c (update_vtable_entry_for_fn): Set delta to zero for a
6076         lost primary.
6077
6078         * class.c (build_vtbl_initializer): Check for a lost primary
6079         before calculating the vtable entry to throw away.
6080
6081 2002-01-02  Jason Merrill  <jason@redhat.com>
6082
6083         * semantics.c (expand_body): Call outlining_inline_function when
6084         emitting an inline function out of line.
6085
6086 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6087
6088         PR c++/5116, c++/764 reversion
6089         * call.c (build_new_op): Revert the instantiations. They are
6090         incorrect.
6091
6092 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6093
6094         PR c++/5089
6095         * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
6096
6097 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6098
6099         PR c++/3716
6100         * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
6101         (tsubst, case POINTER_TYPE): Handle pmfs here.
6102         (tsubst, case OFFSET_TYPE): Check it is not an offset to
6103         reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
6104
6105 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6106
6107         PR c++/35
6108         * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
6109         (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
6110         * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
6111         PARM_DECL.
6112         (tsubst_template_parms): Break up loop statements.
6113         (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
6114         parm PARM_DECLs don't get promoted.
6115
6116 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6117
6118         PR c++/5123
6119         * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
6120         (build_x_function_call): Cope with a COMPONENT_REF containing a
6121         TEMPLATE_ID_EXPR.
6122
6123 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6124
6125         PR c++/5213
6126         * pt.c (convert_template_argument): Be more careful determining
6127         when RECORD_TYPE templates are or are not templates.
6128
6129 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6130
6131         PR c++/775
6132         * cp-tree.h (handle_class_head): Adjust prototype.
6133         * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
6134         parameters. Use for all class heads.
6135         * parse.y (named_class_head_sans_basetype, named_class_head,
6136         named_complex_class_head_sans_basetype,
6137         named_class_head_sans_basetype_defn,
6138         unnamed_class_head): Remove.
6139         (class_head, class_head_apparent_template): Recognize class heads
6140         (class_head_decl, class_head_defn): New reductions. Process class
6141         heads.
6142         (structsp): Adjust class definition and class declaration
6143         reductions.
6144         (maybe_base_class_list): Give diagnostic on empty list.
6145
6146 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6147
6148         PR c++/4379
6149         * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
6150         single non-static member.
6151         (unary_complex_lvalue): If it cannot be a pointer to member, don't
6152         make it so. Check it is not pointer to reference.
6153
6154 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6155
6156         PR c++/5132
6157         * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
6158         are processing a template decl.
6159
6160 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6161
6162         PR c++/5116, c++/764
6163         * call.c (build_new_op): Make sure template class operands are
6164         instantiated. Simplify arglist construction.
6165
6166 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
6167
6168         * call.c (build_user_type_conversion_1): Use my_friendly_assert
6169         rather than if ... abort.
6170         * cvt.c (convert_to_reference): Likewise.
6171         * semantics.c (setup_vtbl_ptr): Likewise.
6172         * pt.c (lookup_template_class): Comment typo.
6173
6174 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
6175
6176         PR c++/5125
6177         * pt.c (push_template_decl_real): Make sure DECL has
6178         DECL_LANG_SPECIFIC.
6179
6180 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
6181
6182         PR c++/335
6183         * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
6184         for non-reference fields.
6185         * typeck.c (require_complete_type): Use resolve_offset_ref).
6186
6187 2001-12-26  Nathan Sidwell  <nathan@codesourcery.com>
6188
6189         PR c++/196
6190         * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
6191
6192 2001-12-24  Nathan Sidwell  <nathan@codesourcery.com>
6193
6194         PR c++/160
6195         * typeck.c (build_modify_expr): Remove old unreachable code & tidy
6196         up. Don't stabilize_references when initializing a reference.
6197
6198 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6199
6200         * decl2.c (lang_f_options): Const-ify.
6201
6202 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
6203
6204         * config-lang.in (diff_excludes): Remove.
6205
6206 2001-12-19  Nathan Sidwell  <nathan@codesourcery.com>
6207
6208         PR c++/90
6209         * typeck.c (build_function_call_real): Use original function
6210         expression for errors.
6211
6212 2001-12-18  Jason Merrill  <jason@redhat.com>
6213
6214         PR c++/3242
6215         * class.c (add_method): Do compare 'this' quals when trying to match a
6216         used function.  Don't defer to another used function.
6217
6218 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
6219
6220         * pt.c (instantiate_clone): Remove, fold into ...
6221         (instantiate_template): ... here. Simplify by removing mutual
6222         recursion.
6223         * typeck2.c (build_m_component_ref): Don't cv qualify the function
6224         pointed to by a pointer to function.
6225         * class.c (delete_duplicate_fields_1): Typo.
6226
6227 2001-12-18  Jason Merrill  <jason@redhat.com>
6228
6229         C++ ABI change: destroy value arguments in caller.
6230         * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
6231         create an extra binding level for the parameters.
6232         * decl.c (store_parm_decls): Don't do parameter cleanups.
6233
6234 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
6235
6236         * call.c (build_new_method_call): Use '%#V'.
6237         * error.c (cv_to_string): Use V parameter to determine padding.
6238
6239 2001-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
6240
6241         * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
6242         spellings in messages.
6243
6244 2001-12-17  Zack Weinberg  <zack@codesourcery.com>
6245
6246         * cp-tree.h: Delete #defines for cp_error, cp_warning,
6247         cp_pedwarn, and cp_compiler_error.
6248         * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
6249         except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
6250         rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
6251         typeck2.c: Change calls to the above macros to use their
6252         language-independent equivalents: error, warning, pedwarn, and
6253         internal_error respectively.
6254
6255 2001-12-16  Neil Booth  <neil@daikokuya.demon.co.uk>
6256
6257         * decl2.c (finish_file): Remove back_end_hook.
6258
6259 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
6260
6261         * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
6262         cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
6263         pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
6264
6265 2001-12-15  Joseph S. Myers  <jsm28@cam.ac.uk>
6266
6267         * lang-options.h: Use American spelling in messages.
6268
6269 2001-12-13  Jason Merrill  <jason@redhat.com>
6270
6271         * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
6272
6273         Use cleanups to run base and member destructors.
6274         * init.c (push_base_cleanups): New function, split out from...
6275         (build_delete): ...here.  Lose !TYPE_HAS_DESTRUCTOR code.
6276         * decl.c (finish_destructor_body): Move vbase destruction code to
6277         push_base_cleanups.
6278         (begin_function_body, finish_function_body): New fns.
6279         (finish_function): Move [cd]tor handling and call_poplevel to
6280         finish_function_body.
6281         (pushdecl): Skip the new level.
6282         * semantics.c (genrtl_try_block): Don't call end_protect_partials.
6283         (setup_vtbl_ptr): Call push_base_cleanups.
6284         * method.c (synthesize_method): Call {begin,end}_function_body.
6285         * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
6286         * cp-tree.h: Declare new fns.
6287         * parse.y (function_body, .begin_function_body): New nonterminals.
6288         (fndef, pending_inline, function_try_block): Use function_body.
6289         (ctor_initializer_opt, function_try_block): No longer has a value.
6290         (base_init): Remove .set_base_init token.
6291         (.set_base_init, compstmt_or_error): Remove.
6292         * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
6293
6294         * optimize.c (maybe_clone_body): Fix parameter updating.
6295
6296 2001-12-12  Jason Merrill  <jason@redhat.com>
6297
6298         * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
6299         * semantics.c (genrtl_start_function): Don't pass
6300         parms_have_cleanups or push an extra binding level.
6301         (genrtl_finish_function): Lose cleanup_label cruft.
6302
6303         * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
6304         (ctor_label): Remove.
6305         * semantics.c (finish_return_stmt): Lose ctor_label support.
6306         * decl.c (finish_constructor_body, mark_lang_function): Likewise.
6307         * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
6308         dtor_label.
6309
6310         * call.c (build_new_method_call): Let resolves_to_fixed_type_p
6311         check for [cd]tors.
6312         * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
6313
6314         * decl.c (finish_function): Check VMS_TARGET, not VMS.
6315
6316         * decl.c (start_cleanup_fn): Remove redundant pushlevel.
6317         (end_cleanup_fn): And poplevel.
6318
6319         * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
6320         if we're in a template.
6321
6322 2001-12-12  Jakub Jelinek  <jakub@redhat.com>
6323
6324         * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
6325         ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
6326         THIS_NAME_P): Delete.
6327         * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
6328         THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
6329         with internal naming scheme.
6330         * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
6331
6332 2001-12-12  Nathan Sidwell  <nathan@codesourcery.com>
6333
6334         * decl.c (grokdeclarator): Deprecated implicit typename use.
6335
6336 2001-12-11  Nathan Sidwell  <nathan@codesourcery.com>
6337
6338         PR g++/51
6339         * parse.y (frob_specs): Indicate it is a language linkage which
6340         contained the extern.
6341         * decl.c (grokdeclarator): Allow extern language linkage with
6342         other specifiers.
6343
6344 2001-12-10  Nathan Sidwell  <nathan@codesourcery.com>
6345
6346         PR g++/72
6347         * decl.c (add_binding): Don't reject duplicate typedefs involving
6348         template parameters.
6349
6350 2001-12-10  Neil Booth  <neil@daikokuya.demon.co.uk>
6351
6352         * parse.y, semantics.c: Similarly.
6353
6354 2001-12-09  Nathan Sidwell  <nathan@codesourcery.com>
6355
6356         PR g++/87
6357         * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
6358         (copy_args_p): Rename to ...
6359         (copy_fn_p): ... here.
6360         (grok_special_member_properties): New function.
6361         (grok_op_properties): Lose VIRTUALP parameter.
6362         (copy_assignment_arg_p): Remove.
6363         * call.c (build_over_call): Use copy_fn_p.
6364         * decl.c (grokfndecl): Reformat. Adjust call to
6365         grok_op_properties.
6366         (copy_args_p): Rename to ...
6367         (copy_fn_p): ... here. Reject template functions. Check for pass
6368         by value.
6369         (grok_special_member_properties): Remember special functions.
6370         (grok_ctor_properties): Don't remember them here, just check.
6371         (grok_op_properties): Likewise.
6372         (start_method): Call grok_special_member_properties.
6373         * decl2.c (grokfield): Likewise.
6374         (copy_assignment_arg_p): Remove.
6375         (grok_function_init): Don't remember abstract assignment here.
6376         * pt.c (instantiate_class_template): Call
6377         grok_special_member_properties.
6378         (tsubst_decl): Adjust grok_op_properties call.
6379
6380 2001-12-08  Aldy Hernandez  <aldyh@redhat.com>
6381
6382         * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
6383         RID_TYPES_COMPATIBLE_P.
6384
6385 2001-12-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
6386
6387         * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
6388         call to build_aggr_init.
6389         * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
6390
6391 2001-12-08  Neil Booth  <neil@daikokuya.demon.co.uk>
6392
6393         * parse.y: Replace uses of the string non-terminal with STRING.
6394         Don't perform string concatentaion here.
6395         (string): Remove non-terminal.
6396         * semantics.c (finish_asm_stmt): Don't concatenate strings here.
6397
6398 2001-12-05  Jason Merrill  <jason@redhat.com>
6399
6400         * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
6401         (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
6402         * tree.c (cp_start_inlining, cp_end_inlining): New fns.
6403         * pt.c (push_tinst_level): No longer static.
6404         * cp-tree.h: Declare them.
6405
6406         * init.c (resolve_offset_ref): Don't check access for the base
6407         conversion to access a FIELD_DECL.
6408
6409         * cp-tree.h (TYPE_REFFN_P): New macro.
6410         * decl.c (bad_specifiers): Check it, too.
6411
6412         * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
6413         on the __*_type_info type if we haven't seen a definition.
6414
6415 2001-12-05  Neil Booth  <neil@daikokuya.demon.co.uk>
6416
6417         * decl.c: Include c-common.h.
6418         (shadow_warning): Move to c-common.c.
6419
6420 Wed Dec  5 17:00:49 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6421
6422         * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
6423
6424 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
6425
6426         * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
6427
6428 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
6429
6430         PR g++/164
6431         * init.c (sort_base_init): Allow binfos to be directly specified.
6432         * method.c (do_build_copy_constructor): Explicitly convert to the
6433         base instance.
6434         (do_build_assign_ref): Likewise.
6435
6436 2001-12-03  Hans-Peter Nilsson  <hp@bitrange.com>
6437
6438         * decl.c (xref_basetypes): Don't use C99 construct in tag_code
6439         declaration and initialization.
6440
6441 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
6442
6443         * typeck2.c: Remove leading capital from diagnostic messages, as
6444         per GNU coding standards.
6445
6446 2001-12-03  Mumit Khan  <khan@nanotech.wisc.edu>
6447
6448         PR c++/3394
6449         * decl.c (xref_basetypes): Handle attributes between
6450         'class' and name.
6451
6452 2001-12-03  Nathan Sidwell  <nathan@codesourcery.com>
6453
6454         PR g++/3381
6455         * parse.y (named_complex_class_head_sans_basetype): Add new
6456         reduction.
6457         * Make-lang.in (parse.c): Adjust expected conflict count.
6458
6459 2001-12-03  Jason Merrill  <jason@redhat.com>
6460
6461         * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
6462         immediate binfos for our virtual bases.
6463
6464 2001-12-02  Neil Booth  <neil@daikokuya.demon.co.uk>
6465
6466         * call.c (build_java_interface_fn_ref): Similarly.
6467         * except.c (is_admissible_throw_operand): Similarly.
6468         * init.c (build_java_class_ref): Similarly.
6469         * xref.c (open_xref_file): Similarly.
6470
6471 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
6472
6473         * class.c (finish_struct): Remove trailing periods from messages.
6474         * decl.c (check_tag_decl): Similarly.
6475         * lex.c (cxx_set_yydebug): Similarly.
6476         * typeck2.c (friendly_abort): Similarly.
6477
6478 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
6479
6480         PR c++/3048
6481         * cp-tree.h (ovl_member): Remove.
6482         * decl2.c (merge_functions): Handle extern "C" functions
6483         specially.
6484         * tree.c (ovl_member): Remove.
6485
6486 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
6487
6488         PR c++/4842
6489         * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
6490         FUNCTION_DECL, as input.
6491         (mark_overriders): Remove.
6492         (warn_hidden): Rework for the new ABI.
6493
6494 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
6495
6496         PR c++/3471
6497         * call.c (convert_like_real): Do not build additional temporaries
6498         for rvalues of class type.
6499
6500 2001-11-28  Nathan Sidwell  <nathan@codesourcery.com>
6501
6502         * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
6503         (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
6504         (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
6505         (DERIVED_FROM_P): Likewise.
6506         (enum base_access): Renumber, add ba_quiet bit mask.
6507         (get_binfo): Remove.
6508         (get_base_distance): Remove.
6509         (binfo_value): Remove.
6510         (ACCESSIBLY_DERIVED_FROM_P): Remove.
6511         * call.c (standard_conversion): Use lookup_base.
6512         * class.c (strictly_overrides): Likewise.
6513         (layout_virtual_bases): Likewise.
6514         (warn_about_ambiguous_direct_bases): Likewise.
6515         (is_base_of_enclosing_class): Likewise.
6516         (add_vcall_offset_vtbl_entries_1): Likewise.
6517         * cvt.c (build_up_reference): Adjust comment.
6518         * init.c (build_member_call): Reformat.
6519         * search.c (get_binfo): Remove.
6520         (get_base_distance_recursive): Remove.
6521         (get_base_distance): Remove.
6522         (lookup_base_r): Tweak.
6523         (lookup_base): Add ba_quiet control. Complete the types here.
6524         (covariant_return_p): Use lookup_base.
6525         * tree.c (binfo_value): Remove.
6526         (maybe_dummy_object): Use lookup_base.
6527         * typeck.c (build_static_cast): Use lookup_base.
6528         (get_delta_difference): Likewise.
6529         * typeck2.c (binfo_or_else): Use lookup_base.
6530         (build_scoped_ref): Add back error_mark_check.
6531         (build_m_component_ref): Use lookup_base.
6532
6533 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
6534
6535         * Make-lang.in (c++.generated-manpages): New dummy target.
6536
6537 Tue Nov 27 09:03:47 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6538
6539         * Make-lang.in (cp-lang.o): Depends on c-common.h.
6540         * cp-lang.c (c-common.h): Include.
6541         (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
6542         * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
6543         * expr.c (init_cplus_expand): Don't set lang_expand_constant.
6544
6545 2001-11-26  Neil Booth  <neil@daikokuya.demon.co.uk>
6546
6547         * decl2.c (c_language): Move to c-common.c.
6548         * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
6549         functions.
6550         (cxx_init): Update.
6551
6552 2001-11-26  Jason Merrill  <jason@redhat.com>
6553
6554         * call.c (joust): Remove COND_EXPR hack.
6555
6556 2001-11-25  Aldy Hernandez  <aldyh@redhat.com>
6557
6558         * search.c (lookup_base_r): Declare bk in variable declaration
6559         space.
6560
6561 2001-11-25  Nathan Sidwell  <nathan@codesourcery.com>
6562
6563         PR g++/3145
6564         * class.c (build_vbase_pointer): Remove.
6565         (build_vbase_path): Remove.
6566         (build_base_path): New function.
6567         * cp-tree.h (base_access, base_kind): New enumerations.
6568         (build_base_path): Declare.
6569         (convert_pointer_to_real): Remove.
6570         (convert_pointer_to): Remove.
6571         (lookup_base): Declare.
6572         (convert_pointer_to_vbase): Remove.
6573         * call.c (build_scoped_method_call): Use lookup_base &
6574         build_base_path instead of convert_pointer_to_real,
6575         get_base_distance & get_binfo.
6576         (build_over_call): Likewise.
6577         * cvt.c (cp_convert_to_pointer): Likewise.
6578         (convert_to_pointer_force): Likewise.
6579         (build_up_reference): Likewise.
6580         (convert_pointer_to_real): Remove.
6581         (convert_pointer_to): Remove.
6582         * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
6583         instead of convert_pointer_to_vbase & build_vbase_path.
6584         (emit_base_init): Use build_base_path instead of
6585         convert_pointer_to_real.
6586         (expand_virtual_init): Lose unrequired conversions.
6587         (resolve_offset_ref): Use lookup_base and build_base_path
6588         instead of convert_pointer_to.
6589         * rtti.c (build_dynamic_cast_1): Use lookup_base &
6590         build_base_path instead of get_base_distance & build_vbase_path.
6591         * search.c (get_vbase_1): Remove.
6592         (get_vbase): Remove.
6593         (convert_pointer_to_vbase): Remove.
6594         (lookup_base_r): New function.
6595         (lookup_base): New function.
6596         * typeck.c (require_complete_type): Use lookup_base &
6597         build_base_path instead of convert_pointer_to.
6598         (build_component_ref): Likewise.
6599         (build_x_function_call): Likewise.
6600         (get_member_function_from_ptrfunc): Likewise.
6601         (build_component_addr): Likewise.
6602         * typeck2.c (build_scoped_ref): Likewise.
6603
6604 2001-11-22  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6605
6606         * cp-tree.h (CP_TYPE_QUALS): Removed.
6607         * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
6608         * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
6609         LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
6610         * dump.c (cp_dump_tree): Use void* dump_info argument to match
6611         lang-hooks prototype.
6612         * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
6613         rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
6614         CP_TYPE_QUALS changed to cp_type_quals.
6615         * Make-lang.in: References to c-dump.h changed to tree-dump.h.
6616         (CXX_C_OBJS): Remove c-dump.o.
6617
6618 2001-11-21  Mark Mitchell  <mark@codesourcery.com>
6619
6620         PR c++/3637
6621         * pt.c (lookup_template_class): Ensure that all specializations
6622         are registered on the list corresponding to the most general
6623         template.
6624
6625 2001-11-20  Mark Mitchell  <mark@codesourcery.com>
6626
6627         * call.c (non_reference): Add documentation.
6628         (convert_class_to_reference): Do not strip reference types
6629         from conversion operators.
6630         (maybe_handle_ref_bind): Simplify.
6631         (compare_ics): Correct handling of references.
6632
6633 2001-11-19  John Wilkinson <johnw@research.att.com>
6634
6635         * dump.c (dump_op): New function.
6636         (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION.  Use
6637         dump_op.  Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
6638         DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
6639
6640 2001-11-19  Mark Mitchell  <mark@codesourcery.com>
6641
6642         PR4629
6643         * semantics.c (finish_sizeof): Make sure that expression created
6644         while processing a template do not have a type.
6645         (finish_alignof): Likewise.
6646         * typeck.c (c_sizeof): Likewise.
6647         (expr_sizeof): Likewise.
6648
6649 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
6650
6651         * lex.c (cxx_finish): Call c_common_finish.
6652         (finish_parse): Remove.
6653
6654 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6655
6656         * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
6657         when displaying error message about missing array bounds.
6658
6659 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6660
6661         * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
6662         CONST_CAST_EXPR.
6663         * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
6664
6665 2001-11-16  Neil Booth  <neil@daikokuya.demon.co.uk>
6666
6667         * cp-tree.h (print_class_statistics): Restore.
6668
6669 2001-11-15  Jason Merrill  <jason@redhat.com>
6670
6671         * method.c (use_thunk): Don't emit debugging information for thunks.
6672
6673         * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
6674         * decl.c (make_typename_type): Handle getting a class template.
6675         * search.c (lookup_field_r): A class template is good enough for
6676         want_type.
6677
6678         * call.c (convert_like_real): Only use cp_convert for the bad part.
6679         (standard_conversion): Also allow bad int->enum.
6680         * typeck.c (ptr_reasonably_similar): Also allow functions to
6681         interconvert.  Pointers to same-size integers are reasonably
6682         similar.
6683
6684         * cvt.c (convert_to_void): If we build a new COND_EXPR, always
6685         give it void type.
6686
6687 2001-11-15  Nathan Sidwell  <nathan@codesourcery.com>
6688
6689         PR g++/3154
6690         * init.c (sort_base_init): Remove unreachable code.
6691         (expand_member_init): Adjust comment to reflect reality. Simplify
6692         and remove unreachable code.
6693
6694 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
6695
6696         * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
6697         (cxx_init): Update prototype.
6698         * decl.c (init_decl_processing): Rename.  Move null node init
6699         to its creation time.
6700         * lex.c (cxx_init_options): Update.
6701         (cxx_init): Combine with old init_parse; also call
6702         cxx_init_decl_processing.
6703
6704 2001-11-14  Richard Sandiford  <rsandifo@redhat.com>
6705
6706         * decl.c (check_initializer): Try to complete the type of an
6707         array element before checking whether it's complete.  Don't
6708         complain about arrays with complete element types but an
6709         unknown size.
6710         (cp_finish_decl): Build the hierarchical constructor before
6711         calling maybe_deduce_size_from_array_init.
6712
6713 2001-11-14  Joseph S. Myers  <jsm28@cam.ac.uk>
6714
6715         * Make-lang.in: Change all uses of $(manext) to $(man1ext).
6716
6717 2001-11-13  Nathan Sidwell  <nathan@codesourcery.com>
6718
6719         PR g++/4206
6720         * parse.y (already_scoped_stmt): Remove.
6721         (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
6722
6723 2001-11-12  H.J. Lu <hjl@gnu.org>
6724
6725         * cvt.c (ocp_convert): Don't warn the address of a weak
6726         function is always `true'.
6727
6728 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
6729
6730         * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
6731         LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
6732         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
6733         * cp-tree.h (print_class_statistics): Remove.
6734         (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
6735         cxx_print_identifier, cxx_set_yydebug): New.
6736         * lex.c (set_yydebug): Rename c_set_yydebug.
6737         * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
6738         lang_print_xnode): Rename.
6739         * tree.c (print_lang_statistics): Rename.
6740
6741 2001-11-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6742
6743         * class.c (dump_array): Fix format specifier warning.
6744
6745 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
6746
6747         * cp-lang.c (LANG_HOOKS_NAME): Override.
6748         (struct lang_hooks): Constify.
6749         * lex.c (cxx_init_options): Update.
6750         (lang_identify): Remove.
6751         * parse.y (language_string): Remove.
6752
6753 2001-11-08  Andreas Franck  <afranck@gmx.de>
6754
6755         * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
6756         DEMANGLER_CROSS_NAME): Handle program_transform_name the way
6757         suggested by autoconf.
6758         (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
6759         (c++.install-common): Use the transformed target alias names.
6760
6761 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
6762
6763         * Make-lang.in: Update.
6764         * cp-lang.c: Include langhooks-def.h.
6765
6766 2001-11-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6767
6768         * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
6769
6770 2001-11-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6771
6772         * lex.c (copy_lang_type): Add static prototype.
6773
6774 2001-11-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6775
6776         * pt.c (unify): Handle SCOPE_REF.
6777
6778 2001-11-01  Jakub Jelinek  <jakub@redhat.com>
6779
6780         * tree.c (cp_copy_res_decl_for_inlining): Adjust
6781         DECL_ABSTRACT_ORIGIN for the return variable.
6782
6783 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
6784
6785         *  Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
6786
6787 2001-10-28  Joseph S. Myers  <jsm28@cam.ac.uk>
6788
6789         * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
6790         semantics.c, spew.c: Fix spelling errors.
6791
6792 2001-10-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6793
6794         * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
6795
6796 2001-10-25  Zack Weinberg  <zack@codesourcery.com>
6797
6798         * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
6799         pop_everything.
6800
6801 Tue Oct 23 14:00:20 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6802
6803         * cp-lang.c (cxx_get_alias_set): New function.
6804         Point LANG_HOOKS_GET_ALIAS_SET to it.
6805
6806 2001-10-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6807
6808         * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
6809         * cp-tree.h (make_unbound_class_template): Prototype new function.
6810         * decl.c (make_unbound_class_template): New function.
6811         * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
6812         * error.c (dump_type): Likewise.
6813         * mangle.c (write_type): Likewise.
6814         * parse.y (template_parm): Likewise.
6815         (template_argument): Use make_unbound_class_template.
6816         * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
6817         (tsubst): Likewise.
6818         (tsubst_copy): Likewise.
6819         (unify): Likewise.
6820         * tree.c (walk_tree): Likewise.
6821         * typeck.c (comptypes): Likewise.
6822
6823 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6824
6825         * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
6826         extra calls into fewer ones.
6827
6828 2001-10-18  Alexandre Oliva  <aoliva@redhat.com>
6829
6830         * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
6831         Warn when merging inline with attribute noinline.
6832         (start_decl, start_function): Warn if inline and attribute
6833         noinline appear in the same declaration.
6834
6835 2001-10-16  H.J. Lu <hjl@gnu.org>
6836
6837         * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
6838         for tree checking disabled.
6839
6840 2001-10-16  Hans-Peter Nilsson  <hp@axis.com>
6841
6842         * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
6843         NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
6844
6845 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
6846
6847         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
6848         (unify): Only handle MINUS_EXPR specially if the above flag is set
6849         and the subtracted constant is 1.  Clear the flag on recursive calls.
6850         Set it when unifying the maximum value in an INTEGER_TYPE's range.
6851
6852 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
6853
6854         * decl.c (bad_specifiers): Don't allow exception specifications
6855         on any typedefs.
6856
6857 2001-10-14  Neil Booth  <neil@daikokuya.demon.co.uk>
6858
6859         * cp/lex.c (init_cp_pragma): Similarly.
6860
6861 2001-10-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6862
6863         * pt.c (lookup_template_class): Build complete template arguments
6864         for BOUND_TEMPLATE_TEMPLATE_PARM.
6865
6866 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6867
6868         * cp-tree.h (TYPE_BINFO): Update comment.
6869         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
6870         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
6871         (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
6872         (copy_type): Prototype new function.
6873         * lex.c (copy_lang_decl): Gather tree node statistics.
6874         (copy_lang_type): New function.
6875         (copy_type): Likewise.
6876         (cp_make_lang_type): Create lang_type for
6877         BOUND_TEMPLATE_TEMPLATE_PARM.  Set TYPE_BINFO for TYPENAME_TYPE
6878         and BOUND_TEMPLATE_TEMPLATE_PARM.
6879         * pt.c (tsubst): Use copy_type instead of copy_node.
6880         * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
6881
6882 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6883
6884         * pt.c (determine_specialization): Ignore functions without
6885         DECL_TEMPLATE_INFO.
6886
6887 2001-10-12  Nathan Sidwell  <nathan@codesourcery.com>
6888
6889         PR g++/4476
6890         * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
6891
6892 2001-10-11  Jason Merrill  <jason_merrill@redhat.com>
6893
6894         * typeck2.c (store_init_value): Don't re-digest a bracketed
6895         initializer.
6896
6897         * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
6898         ANON_AGGR_TYPE_P.
6899
6900 2001-10-11  Richard Henderson  <rth@redhat.com>
6901
6902         * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
6903         of an asm statement.
6904         (build_vtbl_ref_1): Split out from build_vtbl_ref.
6905         (build_vfn_ref): Use it to handle vtable descriptors before
6906         calling build_vtable_entry_ref.
6907         * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
6908
6909 2001-10-10  Richard Henderson  <rth@redhat.com>
6910
6911         * parse.y (asm_operand): Allow named operands.
6912         * semantics.c (finish_asm_stmt): Tweek for changed location
6913         of the operand constraint.
6914
6915 2001-10-09  Jason Merrill  <jason_merrill@redhat.com>
6916
6917         * call.c (standard_conversion): Add bad conversion between
6918         integers and pointers.
6919         (convert_like_real): Don't use convert_for_initialization for bad
6920         conversions; complain here and use cp_convert.
6921         (build_over_call): Don't handle bad conversions specially.
6922         (perform_implicit_conversion): Allow bad conversions.
6923         (can_convert_arg_bad): New fn.
6924         * cp-tree.h: Declare it.
6925         * typeck.c (convert_for_assignment): Use it.
6926         (ptr_reasonably_similar): Any target type is similar to void.
6927
6928 2001-10-08  Alexandre Oliva  <aoliva@redhat.com>
6929
6930         * Make-lang.in (CXX_OBJS): Added cp-lang.o.
6931         (cp/cp-lang.o): New rule.
6932         * cp-tree.h: Declare hooks.
6933         * tree.c: Make hooks non-static.
6934         (init_tree): Don't initialize hooks here.
6935         * lex.c: Likewise.  Move definition of lang_hooks to...
6936         * cp-lang.c: ... new file.
6937
6938 2001-10-08  Richard Henderson  <rth@redhat.com>
6939
6940         * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
6941         (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
6942
6943 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6944
6945         * class.c (build_vtable_entry_ref): Const-ify.
6946         * decl.c (predefined_identifier,
6947         initialize_predefined_identifiers): Likewise.
6948         * init.c (build_new_1): Likewise.
6949         * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
6950         Likewise.
6951
6952 2001-10-05  Alexandre Oliva  <aoliva@redhat.com>
6953
6954         * optimize.c (struct inline_data): Moved to ../tree-inline.c.
6955         (INSNS_PER_STMT): Likewise.
6956         (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
6957         (copy_body, initialize_inlined_parameters): Likewise.
6958         (declare_return_variable, inlinable_function_p): Likewise.
6959         (expand_call_inline, expand_calls_inline): Likewise.
6960         (optimize_inline_calls, clone_body): Likewise.
6961         * tree.c (walk_tree): Moved to ../tree-inline.c.
6962         (walk_tree_without_duplicates): Likewise.
6963         (copy_tree_r, remap_save_expr): Likewise.
6964
6965 2001-10-04  Alexandre Oliva  <aoliva@redhat.com>
6966
6967         * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
6968         (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
6969         * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
6970         (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
6971         (flag_inline_trees): Moved declaration to ../tree-inline.h.
6972         (walk_tree): Moved declaration to ../tree-inline.h.
6973         (walk_tree_without_duplicates, copy_tree_r): Likewise.
6974         (remap_save_expr): Likewise.
6975         * decl.c: Include tree-inline.h.
6976         (lang_mark_tree): Don't mark inlined_fns.
6977         * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
6978         * optimize.c: Include tree-inline.h.
6979         (optimize_inline_calls): Move declaration to ../tree.h, as
6980         non-static.
6981         (remap_decl): Use language-independent constructs and hooks.
6982         (remap_block, copy_body_r, declare_return_variable): Likewise.
6983         (inlinable_function_p): Likewise.  Don't test for
6984         DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
6985         no longer language-specific.
6986         (optimize_inline_calls): Likewise.  Make it non-static.  Moved
6987         call of dump_function to...
6988         (optimize_function): Here...
6989         (clone_body): New function, extracted from...
6990         (maybe_clone_body): ... here.  Build decl_map locally and pass
6991         it on to clone_body.
6992         * pt.c, semantics.c: Include tree-inline.h.
6993         * tree.c: Likewise.
6994         (cp_walk_subtrees): New language-specific hook for tree inlining.
6995         (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
6996         cp_is_overload_p, cp_auto_var_in_fn_p,
6997         cp_copy_res_decl_for_inlining): Likewise.
6998         (walk_tree): Move language-specific constructs into...
6999         (cp_walk_subtrees): this new function.
7000         (copy_tree_r): Use language-independent constructs and hooks.
7001         (init_tree): Initialize tree inlining hooks.
7002         (remap_save_expr): Adjust prototype so that the declaration
7003         does not require the definition of splay_tree.
7004
7005 2001-10-03  John David Anglin  <dave@hiauly1.hia.nrc.ca>
7006
7007         * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
7008         to build the declaration instead of the declaration itself.
7009
7010 2001-10-02  Jason Merrill  <jason_merrill@redhat.com>
7011
7012         * decl2.c (cxx_decode_option): Add 'else'.
7013
7014         * spew.c (end_input): No longer static.
7015         * cp-tree.h: Declare it.
7016         * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
7017
7018 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
7019
7020         * call.c (build_over_call), typeck.c (build_function_call_real):
7021         Pass type attributes to check_function_format rather than name or
7022         assembler name.  Don't require there to be a name or assembler
7023         name to check formats.
7024
7025 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
7026
7027         * decl.c (init_decl_processing): Don't call
7028         init_function_format_info.  Initialize lang_attribute_table
7029         earlier.
7030         (builtin_function): Call decl_attributes.
7031         (insert_default_attributes): New.
7032
7033 2001-10-01  Jason Merrill  <jason_merrill@redhat.com>
7034
7035         * decl.c (grokdeclarator): Copy array typedef handling from C
7036         frontend.
7037
7038         * decl.c (grokdeclarator): Copy too-large array handling from C
7039         frontend.
7040
7041 2001-09-29  Alexandre Oliva  <aoliva@redhat.com>
7042
7043         * config-lang.in (target_libs): Added target-gperf, so that we
7044         don't try to build it if C++ is disabled.
7045
7046 2001-09-23  Zack Weinberg  <zack@codesourcery.com>
7047
7048         * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
7049         (cp/errfn.o): Delete rule.
7050         (cp/error.o): Depend on flags.h.
7051         * errfn.c: Delete file.
7052         * cp-tree.h: Declare warn_deprecated.  Remove definitions of
7053         TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
7054         and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
7055         cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
7056         internal_error respectively.  Make cp_deprecated into a macro.
7057         Don't define cp_printer typedef or declare cp_printers.
7058         * error.c: Include flags.h.
7059         Delete: struct tree_formatting_info, print_function_argument_list,
7060         print_declaration, print_expression, print_function_declaration,
7061         print_function_parameter, print_type_id, print_cv_qualifier_seq,
7062         print_type_specifier_seq, print_simple_type_specifier,
7063         print_elaborated_type_specifier, print_rest_of_abstract_declarator,
7064         print_parameter_declaration_clause, print_exception_specification,
7065         print_nested_name_specifier, and definition of cp_printers.
7066         (locate_error): New function.
7067         (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
7068         rewritten in terms of locate_error and diagnostic.c.
7069         (cp_tree_printer): Rename cp_printer; wire up to *_to_string
7070         instead of deleted print_* routines.  Handle %C, %L, %O, %Q also.
7071         (init_error): Adjust to match.
7072
7073 Sat Sep 22 09:15:31 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7074
7075         * Make-lang.in (CXX_C_OBJS): Add attribs.o.
7076
7077 2001-09-21  Richard Henderson  <rth@redhat.com>
7078
7079         * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
7080         (build_vtbl_initializer): Likewise.
7081         (build_vfn_ref): New.
7082         * cp-tree.h: Declare it.
7083         * call.c (build_over_call): Use it.
7084         * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
7085         * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
7086
7087 Fri Sep 21 08:16:19 2001  J"orn Rennecke <amylaar@redhat.com>
7088
7089         * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
7090
7091 2001-09-21  Joseph S. Myers  <jsm28@cam.ac.uk>
7092
7093         Table-driven attributes.
7094         * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
7095         * decl2.c (cplus_decl_attributes): Only take one attributes
7096         parameter.
7097         * cp-tree.c (cplus_decl_attributes): Update prototype.
7098         * class.c (finish_struct), decl.c (start_decl, start_function),
7099         decl2.c (grokfield), friend.c (do_friend), parse.y
7100         (parse_bitfield): Update calls to cplus_decl_attributes.
7101         * decl.c (grokdeclarator): Take a pointer to a single ordinary
7102         attribute list.
7103         * decl.h (grokdeclarator): Update prototype.
7104         * decl2.c (grokfield): Take a single ordinary attribute list.
7105         * friend.c (do_friend): Likewise.
7106         * decl.c (shadow_tag, groktypename, start_decl,
7107         start_handler_parms, grokdeclarator, grokparms, start_function,
7108         start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
7109         parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
7110         (process_template_parm, do_decl_instantiation): Pass single
7111         ordinary attribute lists around.
7112         * decl.c (grokdeclarator): Correct handling of nested attributes.
7113         Revert the patch
7114         1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
7115                 * decl.c (grokdeclarator): Embedded attrs bind to the right,
7116                 not the left.
7117         .
7118         * cp-tree.h (cp_valid_lang_attribute): Remove declaration
7119         (cp_attribute_table): Declare.
7120         * decl.c (valid_lang_attribute): Don't define.
7121         (lang_attribute_table): Define.
7122         (init_decl_processing): Initialize lang_attribute_table instead of
7123         valid_lang_attribute.
7124         * tree.c (cp_valid_lang_attribute): Remove.
7125         (handle_java_interface_attribute, handle_com_interface_attribute,
7126         handle_init_priority_attribute): New functions.
7127         (cp_attribute_table): New array.
7128         * decl2.c (import_export_class): Don't use
7129         targetm.valid_type_attribute.
7130
7131 2001-09-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
7132
7133         * Make-lang.in (cp/error.o): Depend on real.h
7134         * error.c: #include "real.h"
7135
7136 2001-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7137
7138         * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
7139         xmalloc/strcpy/strcat.
7140
7141 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7142
7143         * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
7144         Const-ification.
7145         * pt.c (tsubst_decl): Likewise.
7146
7147 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7148
7149         * decl2.c (lang_f_options): Const-ification.
7150         * lex.c (cplus_tree_code_name): Likewise.
7151         * spew.c (yyerror): Likewise.
7152
7153 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
7154
7155         PR c++/3986
7156         * class.c (force_canonical_binfo_r): Check & move an indirect
7157         primary base first.
7158         (force_canonical_binfo): Check that it's not already
7159         canonical.
7160         (mark_primary_virtual_base): Remove BINFO parameter.
7161         (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
7162
7163 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
7164
7165         Remove TYPE_NONCOPIED_PARTS.
7166         * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
7167         CLASSTYPE_PURE_VIRTUALS.
7168         (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
7169         * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
7170         (layout_class_type): Don't call fixup_inline_methods here ...
7171         (finish_struct_1): ... call it here.
7172
7173 2001-09-04  Mark Mitchell  <mark@codesourcery.com>
7174
7175         * decl.c (duplicate_decls): Remove code deadling with
7176         DECL_SAVED_INSNS.
7177         * decl2.c (finish_file): Likewise.
7178         * pt.c (instantiate_decl): Likewise.
7179         * semantics.c (expand_body): Don't defer local functions if
7180         they wouldn't be deferred for some other reason.  Don't
7181         generate RTL for functions that will not be emitted.
7182         (genrtl_start_function): Remove code deadling with
7183         DECL_SAVED_INSNS.
7184         (genrtl_finish_function): Likewise.
7185
7186 2001-09-04  Nathan Sidwell  <nathan@codesourcery.com>
7187
7188         PR c++/4203
7189         * call.c (build_over_call): Do not optimize any empty base
7190         construction.
7191
7192 2001-08-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7193
7194         * error.c (dump_template_decl): Output template parameters
7195         together with their specifiers.
7196         Output `class' prefix for template template parameter.
7197         (dump_decl): Fix formatting.
7198
7199 2001-08-30  Kurt Garloff  <garloff@suse.de>
7200
7201         * optimize.c (inlinable_function_p): Allow only smaller single
7202         functions. Halve inline limit after reaching recursive limit.
7203
7204 2001-08-30  Joern Rennecke <amylaar@redhat.com>
7205             Jason Merrill  <jason_merrill@redhat.com>
7206
7207         * class.c (build_vtable_entry_ref): Subtract in char*, not
7208         ptrdiff_t.
7209
7210 2001-08-23  Jason Merrill  <jason_merrill@redhat.com>
7211
7212         * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
7213         (build_cplus_array_type): Use cp_build_qualified_type, not
7214         TYPE_MAIN_VARIANT, to get an unqualified version.
7215
7216         * decl2.c (grok_alignof): Lose.
7217         (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
7218         * typeck.c (c_alignof): Lose.
7219         * semantics.c (finish_sizeof, finish_alignof): New.
7220         * parse.y: Use them.
7221         * cp-tree.h: Declare them.
7222
7223 2001-08-22  Jason Merrill  <jason_merrill@redhat.com>
7224
7225         * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
7226         Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
7227         * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
7228
7229 2001-08-19  Jakub Jelinek  <jakub@redhat.com>
7230
7231         * typeck2.c (add_exception_specifier): Only require complete type if
7232         not in processing template declaration.
7233
7234 2001-08-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7235
7236         * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
7237         GNU_xref_start_scope and GNU_xref_end_scope.
7238
7239         * tree.c (TYPE_HASH): Moved to ../tree.h.
7240
7241 2001-08-16  Mark Mitchell  <mark@codesourcery.com>
7242
7243         * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
7244         on COMPOUND_EXPRs.
7245
7246 2001-08-14  Richard Henderson  <rth@redhat.com>
7247
7248         * class.c, cp-tree.h (build_vfn_ref): Remove.
7249         * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
7250
7251 2001-08-13  Mark Mitchell  <mark@codesourcery.com>
7252
7253         * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
7254         empty class assignment as having side-effects to avoid
7255         spurious warnings.
7256
7257 2001-08-13  Zack Weinberg  <zackw@panix.com>
7258
7259         * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
7260         * except.c: Include libfuncs.h.
7261
7262 2001-08-11  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
7263
7264         * decl.c (grokdeclarator): Clarify diagnostic message.
7265
7266 2001-08-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7267
7268         * decl2.c (do_nonmember_using_decl): Replace using directive
7269         with using declaration in the error message.
7270
7271 2001-08-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7272
7273         * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
7274         criterion to avoid rebuilding expression tree instead of
7275         processing_template_decl.
7276
7277 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
7278
7279         Support named return value optimization for inlines, too.
7280         * decl.c (finish_function): Nullify returns here.
7281         * semantics.c (genrtl_start_function): Not here.
7282         (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
7283         (nullify_returns_r): No longer static.  Just clear RETURN_EXPR.
7284         Also nullify the CLEANUP_STMT for the nrv.
7285         * cp-tree.h: Declare it.
7286         * optimize.c (declare_return_variable): Replace the nrv with the
7287         return variable.
7288         * typeck.c (check_return_expr): Be more flexible on alignment check.
7289         Ignore cv-quals when checking for a matching type.
7290
7291 2001-08-09  Richard Henderson  <rth@redhat.com>
7292
7293         * decl2.c (finish_objects): Use target hooks instead of
7294         assemble_constructor and assemble_destructor.
7295
7296 2001-08-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
7297
7298         * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
7299
7300 2001-08-07  Nathan Sidwell  <nathan@codesourcery.com>
7301
7302         PR c++/3820
7303         Stop using TYPE_NONCOPIED_PARTS.
7304         * call.c (build_over_call): Be careful when copy constructing
7305         or assigning to an empty class.
7306         * class.c (check_bases_and_members): It has a
7307         COMPLEX_ASSIGN_REF if it has a vptr.
7308         (layout_class_type): Don't add empty class padding to
7309         TYPE_NONCOPIED_PARTS.
7310         (finish_struct_1): Don't add the VFIELD either.
7311         * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
7312         initialization.
7313
7314 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
7315
7316         * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
7317
7318 2001-08-06  Richard Henderson  <rth@redhat.com>
7319
7320         * decl2.c (finish_objects): Pass a symbol_ref and priority to
7321         assemble_{constructor,destructor}.  Remove priority handling.
7322
7323 2001-08-05  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
7324
7325         Don't allow template-id in using-declaration.
7326         * decl2.c (validate_nonmember_using_decl): Handle template-ids.
7327         (do_class_using_decl): Likewise.
7328
7329 2001-08-04  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
7330
7331         * cp/spew.c (read_token): No need to pop buffers.
7332
7333 2001-08-02  Stan Shebs  <shebs@apple.com>
7334
7335         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
7336         (fnaddr_from_vtable_entry): Remove decl.
7337         * method.c (use_thunk): Update comment.
7338
7339 2001-08-01  Andrew Cagney  <ac131313@redhat.com>
7340
7341         * repo.c (get_base_filename): Change return value to const char
7342         pointer.
7343
7344 2001-08-02  Nathan Sidwell  <nathan@codesourcery.com>
7345
7346         Kill -fhonor-std.
7347         * NEWS: Document.
7348         * cp-tree.h (flag_honor_std): Remove.
7349         (CPTI_FAKE_STD): Remove.
7350         (std_node): Remove comment about it being NULL.
7351         (fake_std_node): Remove.
7352         * decl.c (in_fake_std): Remove.
7353         (walk_namespaces_r): Remove fake_std_node check.
7354         (push_namespace): Remove in_fake_std code.
7355         (pop_namespace): Likewise.
7356         (lookup_name_real): Remove fake_std_node check.
7357         (init_decl_processing): Always create std_node. Always add
7358         std:: things there.
7359         (builtin_function): Always put non '_' fns in std.
7360         * decl2.c (flag_honor_std): Remove.
7361         (lang_f_options): Remove honor-std.
7362         (unsupported_options): Add honor-std.
7363         (set_decl_namespace): Remove fake_std_node check.
7364         (validate_nonmember_using_decl): Likewise.
7365         (do_using_directive): Likewise.
7366         (handle_class_head): Likewise.
7367         * dump.c (cp_dump_tree): Likewise.
7368         * except.c (init_exception_processing): Adjust.
7369         * init.c (build_member_call): Remove fake_std_node check.
7370         (build_offset_ref): Likewise.
7371         * lang-options.h: Remove -fhonor-std, -fno-honor-std.
7372         * rtti.c (init_rtti_processing): Adjust.
7373
7374 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
7375
7376         * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
7377         operand while calling cp_tree_equal.
7378
7379 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
7380
7381         The 3.0 ABI no longer has vbase pointer fields.
7382         * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
7383         FORMAT_VBASE_NAME): Remove.
7384         * method.c (do_build_copy_constructor): Adjust.
7385         (do_build_assign_ref): Adjust.
7386         * search.c (lookup_field_r): Adjust.
7387         * typeck.c (build_component_ref): Adjust.
7388
7389         The 3.0 ABI always has a vtable pointer at the start of every
7390         polymorphic class.
7391         * rtti.c (build_headof_sub): Remove.
7392         (build_headof): Adjust.
7393         (get_tinfo_decl_dynamic): No need to check flag_rtti
7394         here. Adjust.
7395         (create_real_tinfo_var): Explain why we need a hidden name.
7396
7397 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
7398
7399         PR c++/3631
7400         * class.c (update_vtable_entry_for_fn): The fixed adjustment
7401         of a virtual thunk should be from declaring base.
7402
7403 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
7404
7405         * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
7406         the shared virtual base, so preserving inheritance graph order.
7407
7408 2001-07-30  Andreas Jaeger  <aj@suse.de>
7409
7410         * decl2.c: Remove unused var global_temp_name_counter.
7411
7412 2001-07-28  Richard Henderson  <rth@redhat.com>
7413
7414         * method.c (pending_inlines): Remove.
7415
7416 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
7417
7418         * class.c (mark_primary_virtual_base): Don't adjust base
7419         offsets here.
7420         (dfs_unshared_virtual_bases): Adjust them here.
7421         (mark_primary_bases): Explain why we adjust at the end.
7422
7423 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
7424
7425         * class.c (finish_struct_1): When copying the primary base's
7426         VFIELD, make sure we find it is at offset zero.
7427
7428 2001-07-26  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7429
7430         * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
7431         tsubst_expr for default template arguments.
7432
7433 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
7434
7435         PR c++/3621
7436         * spew.c (yylex): Only copy the token's lineno, if it is
7437         nonzero.
7438
7439 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
7440
7441         PR c++/3624
7442         * call.c (resolve_args): Simplify, call
7443         convert_from_reference.
7444         (build_new_op): Resolve and convert from reference ARG1
7445         earlier. Adjust ARG2 & ARG3 resolve and conversion.
7446
7447 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
7448
7449         * decl.c (last_function_parm_tags): Remove.
7450         (current_function_parm_tags): Remove.
7451         (init_decl_processing): Adjust.
7452         (start_function): Adjust.
7453         (store_parm_decls): Adjust.
7454
7455         PR c++/3152
7456         * decl.c (grokdeclarator): Detect when a function typedef is
7457         declaring a function, and create last_function_parms correctly.
7458
7459 2001-07-25  Jason Merrill  <jason_merrill@redhat.com>
7460
7461         * call.c (joust): Only prefer a non-builtin candidate to a builtin
7462         one if they have the same signature.
7463
7464         * cvt.c (build_up_reference): Take DECL parm.  Check TREE_STATIC on
7465         it rather than toplevel_bindings_p.  Give it a mangled name if static.
7466         (convert_to_reference): Adjust.
7467         * decl2.c (get_temp_name): Lose.
7468         * mangle.c (mangle_ref_init_variable): New fn.
7469         (mangle_guard_variable): Strip the ref-init header.
7470         * cp-tree.h: Adjust.
7471         * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
7472         initializer.
7473         (grok_reference_init): Always use DECL_INITIAL.
7474
7475 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
7476
7477         PR c++/3416
7478         * call.c (build_conditional_expr): Recheck args after
7479         conversions.
7480         * cp-tree.h (build_conditional_expr): Move to correct file.
7481         * typeck.c (decay_conversion): Diagnose any unknown types
7482         reaching here.
7483         (build_binary_op): Don't do initial decay or default
7484         conversions on overloaded functions.
7485         (build_static_cast): Don't do a decay conversion here.
7486
7487 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
7488
7489         PR c++/3543
7490         * typeck.c (condition_conversion): Resolve an OFFSET_REF.
7491         * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
7492
7493 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
7494
7495         * class.c (build_vtbl_or_vbase_field): Remove, move into ...
7496         (create_vtbl_ptr): ... here.
7497
7498 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
7499
7500         * class.c (build_vbase_offset_vbtl_entries): Look for
7501         non-primary base of which we are a sub vtable.
7502
7503 2001-07-24  Phil Edwards  <pme@sources.redhat.com>
7504
7505         * semantics.c (finish_this_expr):  Remove unused code.
7506
7507 2001-07-24  Nathan Sidwell  <nathan@codesourcery.com>
7508
7509         Simplify rtti, now we've only one ABI.
7510         * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
7511         CPTI_TINFO_VAR_ID.
7512         (tinfo_decl_id, tinfo_var_id): Remove.
7513         (get_typeid_1): Remove.
7514         * rtti.c
7515         (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
7516         (typeid_ok_p): New function.
7517         (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
7518         (get_tinfo_decl): Remove old abi documentation.
7519         (tinfo_from_decl): Remove.
7520         (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
7521         (get_typeid_1): Remove.
7522         (get_base_offset): Remove.
7523         (synthesize_tinfo_var): Absorb get_base_offset.
7524         (create_real_tinfo_var): Don't use tinfo_decl_id.
7525
7526 2001-07-23  Graham Stott  <grahams@redhat.com>
7527
7528         * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
7529         variable has_two_argument_delete_p.
7530
7531 2001-07-21  Nathan Sidwell  <nathan@codesourcery.com>
7532
7533         Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
7534         * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
7535         (CPTI_INDEX_IDENTIFIER): Remove.
7536         (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
7537         (delta2_identifier): Remove.
7538         (index_identifier): Remove.
7539         (pfn_or_delta2_identifier): Remove.
7540         (flag_vtable_thunks): Remove.
7541         (VTABLE_DELTA2_NAME): Remove.
7542         (VTABLE_INDEX_NAME): Remove.
7543         (FNADDR_FROM_VTABLE_ENTRY): Adjust.
7544         (vfunc_ptr_type_node): Adjust.
7545         (VTABLE_NAME_PREFIX): Adjust.
7546         (build_vfn_ref): Lose first parameter.
7547         (fixup_all_virtual_upcast_offsets): Remove.
7548         * decl.c (initialize_predefined_identifiers): Remove
7549         delta2_identifier, index_identifier, pfn_or_delta2_identifier.
7550         (init_decl_processing): Remove no-vtable-thunk code.
7551         * decl2.c (flag_vtable_thunks): Remove.
7552         (mark_vtable_entries): Remove no-vtable-thunk code.
7553         * error.c (dump_decl): Remove no-vtable-thunk code.
7554         (dump_expr): Adjust ptr to member function code.
7555         * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
7556         code.
7557         * rtti.c (build_headof): Remove no-vtable-thunk code.
7558         (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
7559         * search.c (get_base_distance): Remove expand_upcast_fixups case.
7560         (virtual_context) Remove.
7561         (expand_upcast_fixups): Remove.
7562         (fixup_virtual_upcast_offsets): Remove.
7563         (fixup_all_virtual_upcast_offsets): Remove.
7564         * typeck.c (get_member_function_from_ptrfunc): Remove
7565         no-vtable-thunk code.
7566         * call.c (build_over_call): Adjust call to build_vfn_ref.
7567         * class.c (build_vfn_ref): Lose first parameter. Remove
7568         no-vtable-thunk code.
7569         (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
7570         (build_vtable_entry): Remove no-vtable-thunk code.
7571
7572 2001-07-20  Nathan Sidwell  <nathan@codesourcery.com>
7573
7574         Remove old-abi remnants. Remove comments about old abi
7575         behavior. Remove references to 'new-abi' in comments.
7576         * cp-tree.h: Adjust comments.
7577         (vbase_offsets_in_vtable_p): Delete.
7578         (vcall_offsets_in_vtable_p): Delete.
7579         (vptrs_present_everywhere_p): Delete.
7580         (all_overridden_vfuns_in_vtables_p): Delete.
7581         (merge_primary_and_secondary_vtables_p): Delete.
7582         (TYPE_CONTAINS_VPTR_P): Adjust.
7583         (VTT_NAME_PREFIX): Remove.
7584         (CTOR_VTBL_NAME_PREFIX): Remove.
7585         (init_vbase_pointers): Remove.
7586         * class.c: Adjust coments.
7587         (build_vbase_pointer_fields): Delete.
7588         (build_vbase_pointer): Remove old-abi code.
7589         (build_secondary_vtable): Likewise.
7590         (modify_all_vtables): Likewise.
7591         (create_vtable_ptr): Likewise.
7592         (layout_class_type): Likewise.
7593         (finish_struct_1): Likewise.
7594         (finish_vtbls): Likewise.
7595         (dfs_finish_vtbls): Delete.
7596         (build_vbase_offset_vtbl_entries): Remove old-abi code.
7597         * cvt.c: Adjust comments.
7598         * decl.c: Adjust comments.
7599         * decl2.c: Adjust comments.
7600         * init.c: Adjust comments.
7601         (construct_virtual_bases): Remove old-abi code.
7602         * lang-specs.h: Remove -fno-new-abi.
7603         * mangle.c: Adjust comments.
7604         * rtti.c: Adjust comments.
7605         (get_base_offset): Remove old-abi-code.
7606         * search.c: Adjust comments.
7607         (dfs_init_vbase_pointers): Remove.
7608         (dfs_vtable_path_unmark): Remove.
7609         (init_vbase_pointers): Remove.
7610         * semantics.c: Adjust comments.
7611         (emit_associated_thunks): Remove old-abi code.
7612         * typeck.c: Adjust comments.
7613
7614 2001-07-20  Daniel Berlin  <dan@cgsoftware.com>
7615
7616         * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
7617         params.h.
7618
7619 2001-07-19  Mark Mitchell  <mark@codesourcery.com>
7620
7621         * class.c (finish_struct_anon): Forbid nested classes.
7622
7623 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
7624
7625         * decl2.c: Don't include dwarfout.h and dwarf2out.h.
7626         * optimize.c: Include debug.h.
7627         (maybe_clone_body): Use debug hook.
7628         * semantics.c: Include debug.h.
7629         (expand_body): Use debug hook.
7630
7631 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
7632
7633         * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
7634
7635 2001-07-18  Mark Mitchell  <mark@codesourcery.com>
7636
7637         * class.c (type_requires_array_cookie): New function.
7638         (check_methods): Don't try to figure out whether the type needs a
7639         cookie here.
7640         (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
7641         * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
7642         (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
7643         * pt.c (instantiate_class_template): Don't set
7644         TYPE_VEC_DELETE_TAKES_SIZE.
7645         * NEWS: Document ABI changes from GCC 3.0.
7646
7647 2001-07-18  Xavier Delacour <xavier@fmaudio.net>,
7648             Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
7649
7650         * NEWS (Changes in GCC 3.0): Fix typo.
7651
7652 2001-07-13  Joseph S. Myers  <jsm28@cam.ac.uk>
7653
7654         * decl2.c (cplus_decl_attributes): Take a pointer to the node to
7655         which attributes are to be attached, and a flags argument.  Update
7656         call to decl_attributes.
7657         (grokfield): Update call to decl_attributes.
7658         * class.c (finish_struct): Update call to cplus_decl_attributes.
7659         * cp-tree.h (cplus_decl_attributes): Update prototype.
7660         * decl.c (start_decl, grokdeclarator, start_function): Update
7661         calls to decl_attributes and cplus_decl_attributes.
7662         * friend.c (do_friend): Update call to cplus_decl_attributes.
7663         * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
7664
7665 2001-07-12  Mark Mitchell  <mark@codesourcery.com>
7666
7667         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
7668         for `register' variables with an asm-specification.
7669
7670 2001-07-11  Mark Mitchell  <mark@codesourcery.com>
7671
7672         * semantics.c (finish_asm_stmt): Mark the output operands
7673         to an asm addressable, if necessary.
7674
7675 2001-07-11  Ben Elliston  <bje@redhat.com>
7676
7677         * Revert this change -- there is a subtle bug.
7678
7679         PR c++/80
7680         * decl.c (finish_enum): New "attributes" argument; pass it to
7681         cplus_decl_attributes.  Use a narrower type if the enum is packed.
7682         * cp-tree.h (finish_enum): Adjust prototype.
7683         * parse.y (enum_head): New non-terminal.
7684         (structsp): Use it. Enums now may be preceded or followed by
7685         optional attributes -- pass their chained tree to finish_enum().
7686         * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
7687
7688 2001-07-10  Mark Mitchell  <mark@codesourcery.com>
7689
7690         * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
7691         variables.
7692
7693 2001-07-10  Jason Merrill  <jason_merrill@redhat.com>
7694
7695         * semantics.c (cp_expand_stmt): Fix for null
7696         current_function_return_value.
7697
7698 2001-07-10  Jan van Male  <jan.vanmale@fenk.wau.nl>
7699
7700         * call.c (build_op_delete_call): Initialize fn.
7701         (convert_like_real): Delete conditional.
7702         (joust): Initialize *w and *l.
7703         * class.c: Add prototype for binfo_ctor_vtable.
7704         (get_primary_binfo): Initialize result.
7705         * init.c (build_java_class_ref): Initialize name.
7706
7707 2001-07-09  Erik Rozendaal  <dlr@acm.org>
7708
7709         * typeck.c (unary_complex_lvalue): Do not duplicate the
7710         argument to modify, pre-, or post-increment when used as an
7711         lvalue and when the argument has side-effects.
7712
7713 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
7714
7715         * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
7716         (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES.  Call
7717         cplus_decl_attributes even if attrs is NULL.
7718         * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
7719
7720 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
7721
7722         * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
7723         calls to decl_attributes.
7724
7725 2001-07-06  Ira Ruben   <ira@apple.com>
7726
7727         * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
7728         be DECL_TEMPLATE_RESULT.
7729
7730 2001-07-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7731
7732         * cp-tree.h (copy_template_template_parm): Rename to ...
7733         (bind_template_template_parm): ... here.
7734         * tree.c (copy_template_template_parm): Rename to ...
7735         (bind_template_template_parm): ... here.  Remove the case when
7736         NEWARGS is NULL_TREE.
7737         (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
7738         BOUND_TEMPLATE_TEMPLATE_PARM.
7739         * pt.c (lookup_template_class): Adjust.
7740
7741 2001-07-05  Jason Merrill  <jason_merrill@redhat.com>
7742
7743         * cvt.c (convert_lvalue): New fn.
7744         * cp-tree.h: Declare it.
7745         * method.c (do_build_assign_ref): Use it.
7746         (do_build_copy_constructor): Convert parm to base types
7747         before calling base constructors.
7748
7749         * typeck.c (check_return_expr): Check DECL_ALIGN instead of
7750         DECL_USER_ALIGN.  Check flag_elide_constructors instead of
7751         optimize.
7752         * semantics.c (cp_expand_stmt): Don't destroy the named return value.
7753
7754 2001-07-02  Nathan Sidwell  <nathan@codesourcery.com>
7755
7756         * optimize.c (optimize_inline_calls): New function, broken out
7757         of ...
7758         (optimize_function): ... here. Call it. Don't inline if it is
7759         a thunk.
7760         (dump_function): Print name of dump flag causing this dump.
7761         * semantics.c (expand_body): Move thunk inline check to
7762         optimize_function.
7763
7764 2001-06-29  Joseph S. Myers  <jsm28@cam.ac.uk>
7765
7766         * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
7767         (comptypes): Use target.comp_type_attributes.
7768
7769 2001-06-29  Nathan Sidwell  <nathan@codesourcery.com>
7770
7771         * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
7772
7773 2001-06-28  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
7774
7775         * error.c (lang_print_error_function): Add a `diagnostic_context *'
7776         parameter. Tweak.
7777
7778 2001-06-27  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
7779
7780         * decl2.c (import_export_class): Update.
7781
7782 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
7783
7784         * error.c (init_error): Adjust settings.
7785
7786 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
7787
7788         * error.c (init_error): Adjust settings.
7789
7790 2001-06-19  Richard Sandiford  <rsandifo@redhat.com>
7791
7792         * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
7793         return pointers to data members by reference rather than by value.
7794
7795 2001-06-18  Jason Merrill  <jason_merrill@redhat.com>
7796
7797         Implement the Named Return Value optimization.
7798         * cp-tree.h (struct cp_language_function): Add x_return_value.
7799         (current_function_return_value): Now a macro.
7800         * decl.c: Don't define it.
7801         (define_label, finish_case_label): Don't clear it.
7802         (init_decl_processing): Don't register it with GC.
7803         * semantics.c (genrtl_finish_function): Don't check it for
7804         no_return_label.  Copy the RTL from the return value to
7805         current_function_return_value and walk, calling...
7806         (nullify_returns_r): ...this new fn.
7807         * typeck.c (check_return_expr): Set current_function_return_value.
7808
7809 2001-06-15  Jason Merrill  <jason_merrill@redhat.com>
7810
7811         * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
7812         sharing a ctor vtable with.  Merge code for cases 1 and 2.
7813         (binfo_ctor_vtable): New fn.
7814         (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
7815
7816 2001-06-14  Jason Merrill  <jason_merrill@redhat.com>
7817
7818         * class.c (dfs_find_final_overrider): Fix logic.
7819
7820         * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
7821         virtual thunk instead of non-virtual.
7822         (get_matching_virtual): Uncomment.
7823
7824         * pt.c (unify): Don't recurse between the POINTER_TYPE and the
7825         OFFSET_TYPE.  If we're adding cv-quals, the extra ones would be on
7826         PARM, not ARG.
7827
7828 2001-06-14  Nathan Sidwell  <nathan@codesourcery.com>
7829
7830         * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
7831         we've not emerged from the hierarchy of RTTI_BINFO on reaching
7832         a non-virtual base.
7833
7834 2001-06-13  Mark Mitchell  <mark@codesourcery.com>
7835
7836         * NEWS: Update release number.
7837
7838 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
7839
7840         PR c++/3130, c++/3131, c++/3132
7841         * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
7842         * class.c (force_canonical_binfo_r): Move
7843         BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
7844         virtual bases unless they're primary and what they're primary
7845         too has been moved.
7846         (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
7847         with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
7848         BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
7849         derived binfo.
7850         (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
7851         (layout_nonempty_base_or_field): Add most derived type
7852         parameter. Adjust.
7853         (layout_empty_base): Likewise.
7854         (build_base_field): Likewise.
7855         (build_base_fields): Likewise.
7856         (propagate_binfo_offsets): Add most derived type
7857         parameter. Skip non canonical virtual bases too.
7858         (dfs_set_offset_for_unshared_vbases): Don't skip primary
7859         bases. Do skip canonical bases.
7860         (layout_virtual_bases): Adjust.
7861         (layout_class_type): Adjust.
7862         (dfs_get_primary_binfo): Build list of virtual primary base
7863         candidates.
7864         (get_primary_binfo): Check that the shared virtual primary
7865         base candidate was found first.
7866         (accumulate_vtbl_inits): Don't do anything for non-vptr
7867         containing binfos. For case 1 primary virtual bases, keep
7868         checking that we've not emerged from the hierarchy of RTTI_BINFO.
7869
7870 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
7871
7872         PR c++/3089
7873         * class.c (dfs_accumulate_vtbl_inits): Always walk down the
7874         hierarchy looking for primary bases for a ctor
7875         vtable. Recursively call oneself, if we meet our primary via
7876         this route and haven't met it yet via inheritance graph order.
7877
7878 2001-06-11  Mark Mitchell  <mark@codesourcery.com>
7879
7880         * lang-options.h: Emit documentation for -fno-honor-std, not
7881         -fhonor-std.
7882
7883 2001-06-10  Alexandre Oliva  <aoliva@redhat.com>
7884
7885         * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
7886         Don't clobber delta.
7887         (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
7888
7889 2001-06-10  Mark Mitchell <mark@codesourcery.com>
7890             Gabriel Dos Reis  <gdr@codesourcery.com>
7891
7892         * Make-lang.in (cp/call.o): Depend on diagnostic.h
7893         (cp/typeck.o): Depend on diagnostic.h
7894         (cp/typeck2.o): Depend on diagnostic.h
7895         (cp/repo.o): Depend on dignostic.h
7896         * typeck.c: #include diagnostic.h
7897         (convert_for_initialization): Remove extern declaration for
7898         warningcount and errorcount.
7899
7900         * call.c: #include diagnostic.h
7901         (convert_like_real): Remove extern declaration for warnincount and
7902         errorcount.
7903
7904         * repo.c: #include diagnostic.h
7905         * typeck2.c: #include diagnostic.h
7906
7907 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
7908
7909         * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
7910         in previous change.
7911
7912 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
7913
7914         PR c++/2929
7915         * friend.c (do_friend): Use push_decl_namespace for classes at
7916         namespace scope.
7917
7918 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
7919             Jason Merrill <jason_merrill@redhat.com>
7920
7921         PR c++/3061
7922         * class.c (build_secondary_vtable): Use assert, rather than an error
7923         message.
7924         (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
7925         (dfs_accumulate_vtbl_inits): A lost primary virtual base may
7926         be between ORIG_BINFO and RTTI_BINFO, but neither of them.
7927         Don't set BINFO_VTABLE for a primary virtual base.
7928
7929 2001-06-07  Mark Mitchell  <mark@codesourcery.com>
7930
7931         * decl.c (duplicate_decls): Update source position information
7932         when a template function is defined.
7933
7934 2001-06-07  Phil Edwards  <pme@sources.redhat.com>
7935
7936         * lang-specs.h:  Move -D_GNU_SOURCE to config/linux.h.
7937
7938 2001-06-07  Nathan Sidwell  <nathan@codesourcery.com>
7939
7940         PR c++/2914
7941         * decl.c (pushtag): Don't push into a complete type's scope.
7942
7943 2001-06-06  Jason Merrill  <jason_merrill@redhat.com>
7944
7945         * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
7946         (struct lang_decl_flags): Lose generate_with_vtable_p.
7947         (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
7948         * class.c (copy_virtuals): Adjust.
7949         * decl2.c (mark_vtable_entries): Adjust.
7950         * method.c (make_thunk, build_vtable_entry): Adjust.
7951         * class.c (update_vtable_entry_for_fn): Only look as far as the
7952         first defining class.
7953         (build_vtbl_initializer): Put nothing in the slot for a function only
7954         defined in a lost primary virtual base.
7955         (add_vcall_offset_vtbl_entries_1): Use the same code for
7956         the lost primary case and the normal case.
7957         (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
7958         (get_vfield_offset, get_derived_offset): Lose.
7959         (dfs_find_final_overrider): Use look_for_overrides_here.
7960         (get_matching_virtual): New fn.
7961         * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
7962         not BV_VCALL_INDEX.
7963         * search.c (look_for_overrides_here): Split out from...
7964         (look_for_overrides_r): Here.
7965
7966         * class.c (find_final_overrider): Return error_mark_node on error.
7967
7968         * decl2.c (key_method): #if 0 accidental change.
7969
7970 2001-06-06  John David Anglin  <dave@hiauly1.hia.nrc.ca>
7971
7972         * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
7973         (build_over_call): Likewise.
7974         * decl.c (grokparms): Likewise.
7975         * pt.c (tsubst_decl): Likewise.
7976         * typeck.c (convert_arguments): Likewise.
7977
7978 2001-06-05  Mark Mitchell  <mark@codesourcery.com>
7979
7980         * semantics.c (begin_class_definition): Robustify.
7981
7982         * pt.c (instantiate_decl): Tell the repository code about the
7983         clones, not the cloned functions.
7984         * repo.c (repo_template_used): Explicitly instantiate the cloned
7985         function, not the clones.
7986
7987 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
7988
7989         * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
7990         ICS_BAD_FLAG on created conversion.
7991         (compare_ics): Break out rank.
7992
7993 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
7994
7995         * decl.c (xref_tag): Remove extraneous %s on dependent name
7996         lookup warning.
7997
7998 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
7999
8000         * class.c (layout_vtable_decl): Fix off by one error on
8001         build_index_type.
8002         (build_vtt): Likewise.
8003         (build_ctor_vtbl_group): Likewise.
8004
8005 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
8006
8007         * class.c (maybe_indent_hierarchy): New function.
8008         (dump_class_hierarchy_r): Add flags. Dump extra binfo
8009         information, if enabled. Use maybe_indent_hierarchy. Adjust
8010         output format.
8011         (dump_class_hierarchy): Adjust prototype. Adjust output format.
8012         (dump_array, dump_vtable, dump_vtt): New functions.
8013         (finish_struct_1): Adjust hierarchy dumping.
8014         (initialize_vtable): Call dump_vtable.
8015         (build_vtt): Call dump_vtt.
8016         (build_ctor_vtbl_group): Call dump_vtable.
8017         * decl2.c (flag_dump_class_layout): Remove.
8018         (cxx_decode_option): Remove dump translation unit
8019         and dump class hierarchy check. Call dump_switch_p.
8020         (finish_file): Adjust dumping.
8021         (dump.c): Only dump base classes if not TDF_SLIM.
8022         Only dump namespace members if not TDF_SLIM.
8023         * optimize.c (dump_function): New function.
8024         (optimize_function): Call dump_function.
8025         * semantics.c (expand_body): Use dump_enabled_p.
8026
8027 2001-06-01  Nathan Sidwell  <nathan@codesourcery.com>
8028
8029         PR g++/2936
8030         Part missed from first commit
8031         * decl2.c (finish_anon_union): Copy context.
8032
8033 2001-05-30  Nathan Sidwell  <nathan@codesourcery.com>
8034
8035         PR g++/2936
8036         * optimize.c (remap_decl): Remap anonymous aggregate members too.
8037
8038 2001-05-26  Nathan Sidwell  <nathan@codesourcery.com>
8039
8040         PR g++/2823
8041         * semantics.c (expand_body): Don't optimize thunks.
8042
8043 2001-05-25  Sam TH  <sam@uchicago.edu>
8044
8045         * cp-tree.h lex.h: Fix header include guards.
8046
8047 2001-05-25  Mark Mitchell <mark@codesourcery.com>
8048
8049         * decl.c (init_decl_processing): Tweak.
8050
8051 2001-05-24  Mark Mitchell  <mark@codesourcery.com>
8052
8053         * decl.c (duplicate_decls): Tidy.
8054         (init_decl_processing): Always set flag_no_builtin.
8055
8056 2001-05-24  Nathan Sidwell  <nathan@codesourcery.com>
8057
8058         PR c++/2184
8059         * decl2.c (do_local_using_decl): Push the decls, even in a
8060         template.
8061
8062 2001-05-22  Mark Mitchell  <mark@codesourcery.com>
8063
8064         * optimize.c (initialize_inlined_parameters): Don't set
8065         TREE_READONLY for a VAR_DECL taking the place of an inlined
8066         PARM_DECL.
8067
8068 2001-05-22  Jason Merrill  <jason_merrill@redhat.com>
8069
8070         * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
8071         * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
8072         attribute.
8073
8074 2001-05-22  Joseph S. Myers  <jsm28@cam.ac.uk>
8075
8076         * parse.y: Refer to compound literals as such, not as
8077         constructor-expressions.
8078
8079 2001-05-21  Mark Mitchell  <mark@codesourcery.com>
8080
8081         * call.c (build_op_delete_call): Ignore exception-specifications
8082         when looking for matching delete operators.
8083         * init.c (build_new_1): Compute whether or not the allocation
8084         function used is a placement allocation function or not, and
8085         communicate this information to build_op_delete_call.
8086
8087 2001-05-21  Jason Merrill  <jason_merrill@redhat.com>
8088
8089         * class.c (build_vtable_entry_ref): Lose vtbl parm.  Fix for new abi.
8090         (build_vtbl_ref): Adjust.
8091         (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
8092         * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
8093         Re-add vtable-gc.
8094         (unsupported_options): Correspondingly.
8095
8096         * decl2.c (maybe_make_one_only): Check flag_weak, not
8097         supports_one_only().
8098
8099         * cp-tree.def (START_CATCH_STMT): Lose.
8100         * dump.c (cp_dump_tree): Don't dump it.  Do dump HANDLER_PARMS.
8101         * tree.c (cp_statement_code_p): Don't case it.
8102         * semantics.c (cp_expand_stmt): Likewise.
8103         * cp-tree.h (START_CATCH_TYPE): Lose.
8104         (HANDLER_TYPE): New.
8105         * except.c (expand_start_catch_block): Don't start any blocks.
8106         Return the type.
8107         (expand_end_catch_block): Don't end any blocks.
8108         * parse.y (handler): Don't pass anything from finish_handler_parms
8109         to finish_handler.
8110         * pt.c (tsubst_expr): Likewise.
8111         * semantics.c (begin_handler): Call note_level_for_catch here.
8112         (finish_handler_parms): Don't return anything.
8113         (genrtl_catch_block, begin_catch_block): Lose.
8114         (genrtl_handler): Call expand_start_catch here.
8115
8116 2001-05-18  Jason Merrill  <jason_merrill@redhat.com>
8117
8118         * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
8119         (get_vtable_decl, build_vtt): Not here.
8120
8121 2001-05-20  Nathan Sidwell  <nathan@codesourcery.com>
8122
8123         PR c++/2781
8124         * optimize.c (update_cloned_parm): Copy addressability and other
8125         flags.
8126
8127 2001-05-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8128
8129         * pt.c (determine_specialization): Ignore artificial functions.
8130
8131 2001-05-20  Neil Booth  <neil@daikokuya.demon.co.uk>
8132
8133         * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
8134         (C_RID_CODE): Remove.
8135         * lex.c (cxx_init_options): Call set_identifier_size.  Update.
8136         (init_parse): Don't do it here.
8137
8138 2001-05-18  Diego Novillo  <dnovillo@redhat.com>
8139
8140         * decl2.c (finish_objects): Use the original SYMBOL_REF from the
8141         function declaration to avoid stripping the symbol's attributes.
8142
8143 2001-05-18  Nathan Sidwell  <nathan@codesourcery.com>
8144
8145         * decl.c (pushdecl): Adjust error string.
8146         (xref_tag): Adjust friend class injection warning. Remove the
8147         inherited name from the class shadowed scope.
8148
8149 2001-05-17  Mark Mitchell  <mark@codesourcery.com>
8150
8151         * except.c (cp_protect_cleanup_actions): New function.
8152         (init_exception_processing): Don't set protect_cleanup_actions
8153         here.  Do set lang_protect_cleanup_actions.
8154
8155 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
8156
8157         * spew.c (read_token): Call yyerror on all unexpected tokens.
8158
8159 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
8160
8161         * init.c (member_init_ok_or_else): Take a tree rather than
8162         string for name.
8163         (expand_member_init): Adjust.
8164
8165 2001-05-14  Nick Clifton  <nickc@cambridge.redhat.com>
8166
8167         * decl.c (duplicate_decls): Suppress warning about duplicate
8168         decls if the first decl is a friend.
8169
8170 2001-05-12  Zack Weinberg  <zackw@stanford.edu>
8171
8172         * except.c (choose_personality_routine): Export.  Add
8173         explanatory comment.  Take an enum languages, not a boolean.
8174         (initialize_handler_parm): Adjust to match.
8175         * cp-tree.h: Prototype choose_personality_routine.
8176         * lex.c (handle_pragma_java_exceptions): New function.
8177         (init_cp_pragma): Register #pragma GCC java_exceptions.
8178
8179 2001-05-12  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
8180
8181         * method.c (build_mangled_C99_name): Remove unused prototype.
8182
8183 2001-05-12  Alexandre Oliva  <aoliva@redhat.com>
8184
8185         * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
8186         * typeck.c (get_member_function_from_ptrfunc,
8187         build_ptrmemfunc, expand_ptrmemfunc_cst): Take
8188         TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
8189
8190         Reverted Geoff Keating's 2001-05-03's patch.
8191
8192 2001-05-11  Ira Ruben   <ira@apple.com>
8193
8194         * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
8195
8196 2001-05-11  Neil Booth  <neil@daikokuya.demon.co.uk>
8197
8198         * cp-tree.h (finish_label_expr, lookup_label): Delete.
8199         * parse.y: Update for '&&'; don't issue warning here.
8200         * semantics.c (finish_label_expr): Delete.
8201
8202 2001-05-07  Mark Mitchell  <mark@codesourcery.com>
8203
8204         * splay-tree.h (splay_tree_max): New function.
8205         (splay_tree_min): Likewise.
8206
8207 2001-05-03  Geoffrey Keating  <geoffk@redhat.com>
8208
8209         * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
8210         (pfn_vflag_identifier): Define.
8211         Update comment about layout of pointer functions.
8212         (build_ptrmemfunc1): Update prototype.
8213         (expand_ptrmemfunc_cst): Update prototype.
8214         * decl.c (initialize_predefined_identifiers): Initialize
8215         pfn_vflag_identifier.
8216         (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
8217         an extra field to the type.
8218         * expr.c (cplus_expand_constant): Pass 'flag' between
8219         expand_ptrmemfunc_cst and build_ptrmemfunc1.
8220         * typeck.c (get_member_function_from_ptrfunc): When
8221         FUNCTION_BOUNDARY < 16, look at additional field to determine
8222         if a pointer-to-member is a real pointer or a vtable offset.
8223         (build_ptrmemfunc1): Add new parameter to contain extra field.
8224         (build_ptrmemfunc): Pass the extra field around.
8225         (expand_ptrmemfunc_cst): Add new parameter to return extra field.
8226         (pfn_from_ptrmemfunc): Ignore the extra field.
8227
8228 2001-05-03  Mark Mitchell  <mark@codesourcery.com>
8229
8230         * cp-tree.h (flag_inline_trees): Update documentation.
8231         * decl.c (init_decl_processing): Adjust handling of
8232         flag_inline_functions and flag_inline_trees to support -O3.
8233         (grokfndecl): Set DECL_INLINE on all functions if that's what
8234         the user requested.
8235         (save_function_data): Clear DECL_INLINE in
8236         current_function_cannot_inline is non-NULL.
8237         * decl2.c (flag_inline_trees): Update documentation.
8238
8239 2001-05-03  Nathan Sidwell  <nathan@codesourcery.com>
8240
8241         * dump.c (cp_dump_tree, USING_STMT case): New case.
8242         * tree.c (cp_statement_code_p): Add USING_STMT.
8243         * decl2.c (do_using_directive): Add the using directive statement.
8244
8245         * tree.c (walk_tree): Reformat an if block.
8246
8247 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
8248
8249         * decl.c (compute_array_index_type): Don't try to do anything with
8250         the indices when processing a template.
8251
8252 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8253
8254         * call.c: NULL_PTR -> NULL.
8255         * class.c: Likewise.
8256         * cvt.c: Likewise.
8257         * decl.c: Likewise.
8258         * decl2.c: Likewise.
8259         * except.c: Likewise.
8260         * init.c: Likewise.
8261         * rtti.c: Likewise.
8262         * search.c: Likewise.
8263         * tree.c: Likewise.
8264         * typeck.c: Likewise.
8265         * typeck2.c: Likewise.
8266
8267 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
8268
8269         * decl2.c (do_using_directive): Revert previous patch.
8270
8271 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
8272
8273         * cp-tree.def (USING_STMT): New statement node.
8274         * cp-tree.h (USING_STMT_NAMESPACE): New macro.
8275         * decl2.c (do_using_directive): Add USING_STMT to statement
8276         tree. Don't emit errors when processing template decl.
8277         * pt.c (tsubst_expr, USING_STMT case): New case.
8278         * semantics.c (cp_expand_stmt, USING_STMT case): New case.
8279
8280 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
8281
8282         * call.c (build_new_op): Convert args from reference here.
8283         (build_conditional_expr): Don't convert here.
8284
8285 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
8286
8287         * spew.c (last_token_id): New static variable.
8288         (read_token): Set it here.
8289         (yyerror): Use it here.
8290
8291 2001-04-30  Richard Henderson  <rth@redhat.com>
8292
8293         * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
8294         * decl.c: Likewise.
8295
8296 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
8297
8298         * gxxint.texi: Remove.
8299         * Make-lang.in: Remove all traces of gxxint.texi.
8300
8301 Mon Apr 30 16:14:10 2001  Mark P Mitchell  <mark@codesourcery.com>
8302
8303         * decl2.c (start_static_initialization_or_destruction): Correct
8304         logic to handle the -fno-use-cxa-atexit case.
8305
8306 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
8307
8308         * optimize.c (update_cloned_parm): New function.
8309         (maybe_clone_body): Use it.  Update the `this' parameter too.
8310
8311 2001-04-29  Joseph S. Myers  <jsm28@cam.ac.uk>
8312
8313         * decl2.c (unsupported_options): Add new-abi.
8314         * lang-options.h: Remove no longer supported options.
8315
8316 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
8317
8318         * except.c (can_convert_eh): Don't check template parms,
8319         typename types etc.
8320
8321 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
8322
8323         * optimize.c (maybe_clone_body): Copy parameter names and locations.
8324
8325 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
8326
8327         * cp-tree.h (adjust_clone_args): Prototype new function.
8328         * class.c (adjust_clone_args): New function.
8329         * decl.c (start_function): Call it for in charge ctors.
8330
8331 2001-04-26  Mark Mitchell  <mark@codesourcery.com>
8332
8333         * method.c (use_thunk): Make sure that thunks really are emitted
8334         when requested.
8335
8336 2001-04-26  Nathan Sidwell <nathan@codesourcery.com>
8337
8338         * mangle.c (write_chars): New macro.
8339         (hwint_to_ascii): New function
8340         (write_number): Use it.
8341         (write_integer_cst): Deal with really big numbers.
8342
8343 2001-04-25  Mark Mitchell  <mark@codesourcery.com>
8344
8345         * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
8346         the clone.
8347
8348 2001-04-25  Nathan Sidwell  <nathan@codesourcery.com>
8349
8350         * decl.c (grokdeclarator): Set context of namespace scope
8351         TYPE_DECLS.
8352
8353 2001-04-24  Zack Weinberg  <zackw@stanford.edu>
8354
8355         * cp/optimize.c: Include hashtab.h.
8356         (struct inline_data): Add tree_pruner.
8357         (expand_call_inline, expand_calls_inline): Use it when calling
8358         walk_tree.
8359         (optimize_function): Initialize and free tree_pruner.
8360
8361 2001-04-24  Nathan Sidwell <nathan@codesourcery.com>
8362
8363         Lazy __FUNCTION__ generation.
8364         * cp-tree.def (FUNCTION_NAME): Remove.
8365         * cp-tree.h (function_name_declared_p): Remove.
8366         (cp_fname_init): Prototype.
8367         * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
8368         don't call declare_function_name. Call start_fname_decls.
8369         (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
8370         clobber the line number.
8371         (cp_fname_init): New function.
8372         (start_function): Call start_fname_decls.
8373         (finish_function): Call finish_fname_decls.
8374         * lex.c (reswords): Add slots for __FUNCTION__ et al.
8375         (rid_to_yy): Add mappings for __FUNCTION__ et al.
8376         * optimize.c (maybe_clone_body): Remove function_name_declared_p.
8377         * parse.y (VAR_FUNC_NAME): New token.
8378         (primary): Add VAR_FUNC_NAME.
8379         * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
8380         generation.
8381         (tsubst, FUNCTION_NAME case): Remove.
8382         (tsubst_copy, FUNCTION_NAME case): Remove.
8383         (tsubst_expr, DECL_STMT case): Be careful with a
8384         DECL_PRETTY_FUNCTION_P.
8385         (instantiate_decl): Remove function_name_declared_p.
8386         * semantics.c (begin_compound_statement): Don't call
8387         declare_function_name here.
8388         (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
8389         (finish_translation_unit): Call finish_fname_decls.
8390         (expand_body): Remove function_name_declared_p.
8391         * typeck2.c (digest_init): Allow any ERROR_MARK.
8392
8393 2001-04-24  Nathan Sidwell  <nathan@codesourcery.com>
8394
8395         * pt.c (tsubst_decl): Use VOID_TYPE_P.
8396         * semantics.c: Fix some typos.
8397
8398 2001-04-23  Phil Edwards  <pme@sources.redhat.com>
8399
8400         * cp/decl2.c (flag_honor_std):  Always initialize to 1.
8401
8402 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8403
8404         * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
8405
8406 2001-04-23  Jason Merrill  <jason_merrill@redhat.com>
8407
8408         * except.c (build_throw): Wrap the initialization of the exception
8409         object in a MUST_NOT_THROW_EXPR.
8410         (do_free_exception): #if 0.
8411
8412 2001-04-20  Mark Mitchell  <mark@codesourcery.com>
8413
8414         * cp-tree.h (finish_enum): Change prototype.
8415         * decl.c (finish_enum): Reorganize.
8416         * parse.y (structsp): Adjust calls to finish_enum.
8417
8418 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
8419
8420         * tree.c (cp_tree_equal): Adjust final switch formatting. Add
8421         't' case.
8422
8423 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
8424
8425         * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
8426         (layout_empty_base): Return at end flag.
8427         (build_base_field): Likewise.
8428         (build_base_fields): Likewise.
8429         (layout_virtual_bases): Don't add 1 to eoc value.
8430         (end_of_class): Use full size for empty bases.
8431         (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
8432         empty bases. Don't add 1 to eoc value. Only add trailing padding
8433         if we're an empty class with no empty bases.
8434         (dump_class_hierarchy): Dump size and alignment.
8435
8436 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
8437
8438         * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
8439         ICS_BAD_FLAG.
8440
8441 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
8442
8443         * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
8444         is found, look first if name does not match the structure name.
8445
8446 2001-04-19  Mark Mitchell  <mark@codesourcery.com>
8447
8448         * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
8449         set.
8450         (SET_DECL_LANGUAGE): New macro.
8451         * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
8452         (pushdecl): Likewise.
8453         (build_library_fn_1): Likewise.
8454         (build_cp_library_fn): Likewise.
8455         (grokfndecl): Likewise.
8456         (grokvardecl): Mark `extern "C"' variables as having C linkage.
8457         * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
8458         * lex.c (retrofit_lang_decl): Likewise.
8459         * mangle.c (mangle_decl_string): Don't mangle the names of
8460         variables declared with C language linkage.
8461         * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
8462
8463 2001-04-18  John David Anglin  <dave@hiauly1.hia.nrc.ca>
8464
8465         * semantics.c (simplify_aggr_init_exprs_r): Don't restore
8466         flag_access_control from uninitialized storage.
8467
8468 2001-04-15  Mark Mitchell  <mark@codesourcery.com>
8469
8470         * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
8471         * mangle.c (write_pointer_to_member_type): Fix mangling of
8472         pointers to cv-qualified member function types.
8473
8474         * init.c (build_delete): Create a SAVE_EXPR for the address if
8475         we're going to use it more than once.
8476
8477 2001-04-13  Mark Mitchell  <mark@codesourcery.com>
8478
8479         * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
8480         (expand_ptremfunc_cst): Change prototype.
8481         (delta2_from_ptrmemfunc): Remove.
8482         * expr.c (cplus_expand_constant): Adjust call to
8483         expand_ptrmemfunc_cst.
8484         * typeck.c (build_ptrmemfunc1): Simplify.
8485         (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
8486         results in a constant.
8487         (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
8488         (delta2_from_ptrmemfunc): Remove.
8489         (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
8490
8491 2001-04-12  Jason Merrill  <jason_merrill@redhat.com>
8492
8493         * cp-tree.h (decl_namespace_list): New macro.
8494         (struct saved_scope): Add decl_ns_list.
8495         * decl.c (mark_saved_scope): Mark it.
8496         * decl2.c: Lose static decl_namespace_list.
8497         (init_decl2): Don't save it.
8498
8499 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8500
8501         * cp-tree.h (warn_return_type, yylex): Delete redundant
8502         declarations.
8503
8504         * decl.c (current_class_depth, global_namespace): Likewise.
8505
8506         * decl2.c (current_class_depth, flag_gnu_xref): Likewise
8507
8508         * repo.c (flag_use_repository): Likewise.
8509
8510 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8511
8512         * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
8513         set_block, pushdecl, getdecls, gettags, init_decl_processing,
8514         maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
8515         lvalue_or_else, print_lang_statistics, comp_target_types,
8516         unsigned_type, signed_type, signed_or_unsigned_type,
8517         build_function_call, mark_addressable, incomplete_type_error):
8518         Delete redundant declarations.
8519
8520 2001-04-11  Jason Merrill  <jason_merrill@redhat.com>
8521
8522         * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
8523         (TYPE_ANONYMOUS_P): New macro.
8524         (TAGGED_TYPE_P): New macro.
8525         * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
8526         (grokfndecl, grokvardecl, grokdeclarator): Likewise.
8527         * tree.c (no_linkage_helper): Likewise.
8528         * semantics.c (begin_class_definition): Likewise.
8529         * pt.c (convert_template_argument): Likewise.
8530         * lex.c (check_for_missing_semicolon): Likewise.
8531
8532 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
8533
8534         * class.c (dfs_unshared_virtual_bases): New function.
8535         (mark_primary_bases): Call it.
8536         (check_bases): Ignore virtual bases when determining
8537         nearly-emptiness.
8538
8539 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
8540
8541         * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
8542
8543 2001-04-11  Mark Mitchell  <mark@codesourcery.com>
8544
8545         * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
8546         cloned function to the clone.
8547
8548 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8549
8550         * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
8551
8552         * semantics.c: Include expr.h.
8553
8554 2001-04-11  Nathan Sidwell  <nathan@codesourcery.com>
8555
8556         * method.c (implicitly_declare_fn): Commonize code for copy ctor
8557         and assignment op. Set TREE_USED for parameter.
8558
8559 2001-04-10  Mark Mitchell  <mark@codesourcery.com>
8560
8561         * class.c (find_final_overrider_data): Add `candidates'.
8562         (dfs_find_final_overrider): Don't issue error messages
8563         prematurely.
8564         (find_final_overrider): Issue error messages here.
8565         (build_base_field): Don't warn about amgibuous direct bases here.
8566         (warn_about_ambiguous_direct_bases): New function.
8567         (layout_class_type): Use it.
8568
8569 2001-04-10  Richard Henderson  <rth@redhat.com>
8570
8571         * typeck.c (build_array_ref): Push the array reference inside
8572         COMPOUND_EXPR and COND_EXPR.
8573
8574 2001-04-05  Mark Mitchell  <mark@codesourcery.com>
8575
8576         * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
8577         * decl.c (duplicate_decls): Adjust accordingly.
8578         (maybe_commonize_var): Likewise.
8579         (grokfndecl): Likewise.
8580         (start_function): Likewise.
8581         (start_method): Likewise.
8582         * decl2.c (key_method): Likewise.
8583         (import_export_decl): Likewise.
8584         * method.c (implicitly_declare_fn): Likewise.
8585         * optimize.c (maybe_clone_body): Likewise.
8586
8587 2001-04-05  Benjamin Kosnik  <bkoz@redhat.com>
8588
8589         * lang-specs.h: Add __DEPRECATED.
8590
8591 Thu Apr  5 16:54:29 2001  J"orn Rennecke <amylaar@redhat.com>
8592
8593         * search.c (get_dynamic_cast_base_type): When building a new
8594         constant, set its type to ssizetype.
8595
8596 2001-04-04  Jakub Jelinek  <jakub@redhat.com>
8597
8598         * optimize.c (expand_call_inline): Only add newly inlined statements
8599         into inlined_stmts.
8600
8601 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
8602
8603         * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
8604         (OPERATOR_FORMAT): Likewise.
8605         (OPERATOR_TYPENAME_FORMAT): Likewise.
8606         * operators.def: Remove old name-mangling information.
8607         * decl.c (grok_op_properties): Adjust accordingly.
8608         * lex.c (init_operators): Likewise.
8609         * rtti.c (get_tinfo_decl): Issue error messages about types that
8610         have variable size.
8611
8612 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
8613
8614         * decl2.c (import_export_decl): Don't call import_export_class
8615         when processing an inline member function.
8616         * semantics.c (expand_body): Call import_export_decl before
8617         emitting inline functions.
8618
8619 2001-03-28  Richard Henderson  <rth@redhat.com>
8620
8621         IA-64 ABI Exception Handling:
8622         * cp-tree.def (EH_SPEC_BLOCK): New.
8623         (MUST_NOT_THROW_EXPR): New.
8624         * cp-tree.h: Update changed function declarations.
8625         (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
8626         (CPTI_CALL_UNEXPECTED): New.
8627         (struct cp_language_function): Rename x_eh_spec_try_block
8628         to x_eh_spec_block.
8629         (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
8630         * decl.c (current_binding_level): If no current function
8631         bindings, revert to scope_chain.
8632         (initialize_predefined_identifiers): Remove __cp_push_exception.
8633         (store_parm_decls): Use begin_eh_spec_block.
8634         (finish_function): Use finish_eh_spec_block.
8635         (mark_lang_function): Update for name changes.
8636         * decl2.c (finish_file): No mark_all_runtime_matches.
8637         * dump.c (cp_dump_tree): Handle new tree codes.
8638         * error.c (dump_expr) [BIND_EXPR]: Fix typo.
8639         * except.c (catch_language_init, catch_language): Remove.
8640         (init_exception_processing): Don't set language code.
8641         Initialize call_unexpected_node, protect_cleanup_actions,
8642         eh_personality_libfunc, lang_eh_runtime_type.
8643         (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
8644         (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
8645         (prepare_eh_type): Split out type canonicalizations ...
8646         (build_eh_type_type): ... from here.
8647         (build_eh_type_type_ref): Remove.
8648         (mark_all_runtime_matches): Remove.
8649         (build_exc_ptr): New.
8650         (do_begin_catch, do_end_catch): New.
8651         (do_pop_exception): Remove.
8652         (build_terminate_handler): Remove.
8653         (choose_personality_routine): Split out language choice from ...
8654         (initialize_handler_parm): ... here.
8655         Use MUST_NOT_THROW_EXPR.
8656         (expand_start_catch_block): Use do_begin_catch.  Simplify Java
8657         exception object handling.
8658         (expand_start_eh_spec, expand_end_eh_spec): Remove.
8659         (expand_exception_blocks, alloc_eh_object): Remove.
8660         (begin_eh_spec_block, finish_eh_spec_block): New.
8661         (do_allocate_exception, do_free_exception): New.
8662         (expand_throw): Merge into ...
8663         (build_throw): ... here.  Update for abi.
8664         * expr.c (cplus_expand_expr): No expand_internal_throw.
8665         Handle MUST_NOT_THROW_EXPR.
8666         * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
8667         * semantics.c (*) Update for except.h name changes.
8668         (genrtl_try_block): No protect_with_terminate.
8669         (genrtl_eh_spec_block): New.
8670         (genrtl_handler): Don't emit the goto here.
8671         (cp_expand_stmt): Handle EH_SPEC_BLOCK.
8672         (genrtl_finish_function): Don't expand_exception_blocks.
8673         * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
8674
8675 2001-03-28  Richard Henderson  <rth@redhat.com>
8676
8677         * decl.c (struct named_label_list): Rename eh_region to
8678         in_try_scope, add in_catch_scope.
8679         (struct binding_level): Rename eh_region to is_try_scope,
8680         add is_catch_scope.
8681         (note_level_for_try): Rename from note_level_for_eh.
8682         (note_level_for_catch): New.
8683         (poplevel): Copy both is_try_scope and is_catch_scope to
8684         the named_label_list struct.
8685         (check_previous_goto_1): Don't check for catch block via
8686         DECL_ARTIFICIAL; use in_try_scope instead.
8687         (check_goto): Likewise.
8688         * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
8689         * except.c (expand_start_catch_block): Call note_level_for_catch.
8690         * semantics.c (begin_compound_stmt): Update for note_level_for_try.
8691
8692 2001-03-27  Richard Henderson  <rth@redhat.com>
8693
8694         * except.c: Use USING_SJLJ_EXCEPTIONS instead of
8695         exceptions_via_longjmp.
8696
8697 2001-03-27  Phil Edwards  <pme@sources.redhat.com>
8698
8699         * pt.c (check_default_tmpl_args):  Make error messages clearer.
8700
8701 2001-03-26  Phil Edwards  <pme@sources.redhat.com>
8702
8703         * error.c:  Also undefine 'A' macro used for cp_printers definition.
8704
8705 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8706
8707         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
8708
8709 2001-03-26  Mike Yang <yang@research.att.com>
8710             Mark Mitchell  <mark@codesourcery.com>
8711
8712         * dump.c (dump_access): New function.
8713         (cp_dump_tree): Use it.  Dump basetype information for class
8714         types.
8715
8716 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
8717
8718         * Makefile.in (optimize.o): Depend on params.h.
8719         (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
8720         (init_decl_processing): Set flag_no_inline when doing
8721         inlining-on-trees.
8722         * optimize.c: Include params.h.
8723         (struct inline_data): Improve documentation of FNS.  Add
8724         FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
8725         (INSNS_PER_STMT): New macro.
8726         (remap_block): Use CLONING_P.
8727         (inlinable_function_p): Don't inline big functions.
8728         (expand_call_inline): Keep track of how much inlining we've done.
8729         (optimize_function): Set FIRST_INLINED_FN.
8730         (maybe_clone_body): Set CLONING_P.
8731         * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
8732         tree nodes.
8733         (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
8734         rest_of_compilation.  Clear DECL_RTL for local variables
8735         afterwards.
8736         (clear_decl_rtl): New function.
8737
8738 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>
8739
8740         Implement DR 209
8741         * cp-tree.h (skip_type_access_control,
8742         reset_type_access_control): Prototype.
8743         * decl.c (grokdeclarator): Access of friends is not checked.
8744         * parse.y (component_decl_list): Reset type access control.
8745         * semantics.c (decl_type_access_control): Clear
8746         current_type_lookups.
8747         (save_type_access_control): Don't save if not deferring.
8748         (skip_type_access_control, reset_type_access_control): New
8749         functions.
8750         (begin_class_definition): Do type access control for basetypes.
8751         Start deferred access control.
8752         (finish_class_definition): Resume immediate access control if
8753         this is a local class.
8754
8755 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8756
8757         * class.c (add_method): Use memcpy/memmove, not bcopy.
8758
8759         * decl.c (duplicate_decls): Likewise.
8760
8761 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
8762
8763         * mangle.c (write_discriminator): Use `_0' for discriminator 1,
8764         not `_'.
8765
8766 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
8767
8768         * decl.c (local_names): Define.
8769         (push_local_name): New.
8770         (grok_reference_init): Return init if initializing static reference
8771         variable with non-constant instead of emitting it.
8772         Move expand_static_init call to cp_finish_decl.
8773         (layout_var_decl): Call push_local_name.
8774         (maybe_commonize_var): Allow inlining functions even if they have
8775         static local variables, use comdat_linkage for them if flag_weak.
8776         (check_initializer): Call obscure_complex_init if
8777         grok_reference_init returned nonzero.
8778         (save_function_data): Clear x_local_names.
8779         (pop_cp_function_context): Free x_local_names.
8780         (mark_inlined_fns): Remove.
8781         (mark_lang_function): Mark x_local_names.
8782         (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
8783         Mark inlined_fns as tree, remove call to mark_inlined_fns.
8784         * class.c (alter_access): Ensure DECL_ACCESS is never set if
8785         DECL_DISCRIMINATOR_P.
8786         * cp-tree.h (cp_language_function): Add x_local_names.
8787         (lang_decl_flags): Add discriminator into u2.
8788         (lang_decl_inlined_fns): Remove.
8789         (lang_decl): inlined_fns is now a TREE_VEC.
8790         (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
8791         * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
8792         TREE_VEC, not a custom structure.
8793         (optimize_function): Likewise.
8794         * mangle.c (discriminator_for_local_entity): Discriminate among
8795         VAR_DECL local entities.
8796         * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
8797         is not valid.
8798
8799 2001-03-22  Bryce McKinlay  <bryce@albatross.co.nz>
8800
8801         Add support for Java interface method calls.
8802         * cp-tree.h (struct lang_type): Add java_interface flag.
8803         (TYPE_JAVA_INTERFACE): New macro.
8804         * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
8805         by setting TYPE_JAVA_INTERFACE.
8806         * call.c (java_iface_lookup_fn): New static.
8807         (build_over_call): If calling a method declared in a
8808         TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
8809         expression which resolves the function address.
8810         (build_java_interface_fn_ref): New function.
8811
8812 2001-03-22  Richard Henderson  <rth@redhat.com>
8813
8814         * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
8815         * except.c: Don't include it.
8816
8817 2001-03-22  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
8818             based on an idea from Joe Buck <jbuck@synopsys.com>
8819
8820         * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
8821         New nonterminals.
8822         (data_def, component_decl): Add reductions to bad_decl.
8823
8824 2001-03-22  Jakub Jelinek  <jakub@redhat.com>
8825
8826         * method.c (do_build_assign_ref): Don't use build_modify_expr for
8827         anonymous aggregates, since they don't have assignment operator
8828         method.
8829         * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
8830         assignment operators for anonymous structure fields.
8831
8832 2001-03-21  Jason Merrill  <jason@redhat.com>
8833
8834         * pt.c (instantiate_decl): Abort if we see a member constant
8835         instantiation that doesn't already have its initializer.
8836         Downgrade explicit instantiation without definition to pedwarn.
8837
8838         * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
8839         * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
8840         (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
8841
8842         * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
8843         (pending_vtables): Remove.
8844         * decl2.c (pending_vtables): Remove.
8845         (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
8846         CLASSTYPE_VTABLE_NEEDS_WRITING.
8847         (import_export_class): Likewise.
8848         (init_decl2): Don't mark pending_vtables.
8849         * lex.c (handle_pragma_vtable): Just sorry.
8850         * pt.c (instantiate_class_template): Don't mess with
8851         CLASSTYPE_VTABLE_NEEDS_WRITING.
8852         (mark_class_instantiated): Likewise.
8853         * ptree.c (print_lang_type): Don't print it.
8854         * semantics.c (begin_class_definition): Don't set it.
8855
8856         * pt.c (template_tail): Replace with last_pending_template.
8857         (maybe_templates, maybe_template_tail): Remove.
8858         (add_pending_template): Adjust.
8859         (instantiate_pending_templates): Adjust.
8860
8861         * cp-tree.h (struct saved_scope): Remove lang_stack field.
8862         (current_lang_stack): Remove.
8863         * decl.c (maybe_push_to_top_level): Don't initialize it.
8864         (duplicate_decls): Use current_lang_depth.
8865         (xref_basetypes): Likewise.
8866         * class.c (current_lang_depth): New fn.
8867         (push_lang_context): Use more varray functionality.
8868         (pop_lang_context): Likewise.
8869
8870         * error.c (GLOBAL_THING): Always use '__'.
8871
8872 2001-03-21  Mark Mitchell  <mark@codesourcery.com>
8873
8874         * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
8875
8876         * mangle.c (mangle_decl_string): Mangle the names of overloaded
8877         operators, even when they have `extern "C"' linkage.
8878
8879 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
8880
8881         * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
8882         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
8883         where it's not necessary.
8884         (add_method): Remove optimization involving comparison of
8885         DECL_ASSEMBLER_NAME.
8886         (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
8887         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
8888         where it's not necessary.
8889         (check_methods): Likewise.
8890         (build_clone): Likewise.
8891         (built_vtt): Likewise.
8892         * cp-tree.h (DECL_NEEDED_P): Likewise.
8893         * decl.c (pushtag): Likewise.
8894         (duplicate_decls): Likewise.
8895         (pushdecl): Likewise.
8896         (builtin_function): Likewise.
8897         (build_library_fn_1): Set DECL_LANGUAGE for library functions.
8898         (build_cp_library_fn): Likewise.
8899         (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
8900         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
8901         where it's not necessary.
8902         (make_rtl_for_nonlocal_decl): Likewise.
8903         (cp_finish_decl): Likewise.
8904         (grokfndecl): Likewise.
8905         (grokvardecl): Likewise.
8906         (grokdeclarator): Likewise.
8907         (start_function): Likewise.
8908         (cp_missing_return_ok_p): Likewise.
8909         * decl2.c (grokclassfn): Likewise.
8910         (check_classfn): Likewise.
8911         (finish_static_data_member_decl): Likewise.
8912         (grokfield): Likewise.
8913         * error.c (GLOBAL_IORD_P): Remove.
8914         (dump_global_iord): Improve output.
8915         (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
8916         * except.c (nothrow_libfn_p): Summarily reject any function not in
8917         namespace-scope.
8918         * init.c (build_java_class_ref): Don't explicitly set
8919         DECL_ASSEMBLER_NAME after calling mangle_decl.
8920         * mangle.c (mangle_decl_string): Handle extern "C" functions.
8921         (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
8922         * method.c (set_mangled_name_for_decl): Don't explicitly set
8923         DECL_ASSEMBLER_NAME after calling mangle_decl.
8924         (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
8925         IDENTIFIER_GLOBAL_VALUE for the thunk.
8926         * pt.c (set_mangled_name_for_template_decl): Remove.
8927         (check_explicit_specialization): Don't use it.
8928         (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
8929         (tsubst_friend_function): Likewise.
8930         (tsubst_decl): Likewise.
8931         (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
8932         * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
8933         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
8934         where it's not necessary.
8935         (tinfo_base_init): Likewise.
8936         (create_real_tinfo_var): Likewise.
8937         * search.c (looup_field_1): Likewise.
8938         * semantics.c (finish_named_return_value): Likewise.
8939         * tree.c (init_tree): Set lang_set_decl_assembler_name.
8940
8941 2001-03-15  Gabriel Dos Reis  <gdr@codesourcery.com>
8942
8943         Correct semantics restrictions checking in throw-expression.
8944         * except.c (is_admissible_throw_operand): New function.
8945         (build_throw): Use it.
8946
8947 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
8948
8949         * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
8950         and its ilk.
8951
8952 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
8953
8954         * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
8955         * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
8956         * decl.c (duplicate_decls): Likewise.
8957         (builtin_function): Likewise.
8958         (build_library_fn): Likewise.
8959         (build_cp_library_fn): Likewise.
8960         (check_initializer): Likewise.
8961         (cp_finish_decl): Likewise.
8962         * decl2.c (grokfield): Likewise.
8963         (grok_function_init): Remove #if 0'd code.
8964         (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
8965         * friend.c (do_friend): Likewise.
8966         * init.c (get_temp_regvar): Likewise.
8967         * method.c (make_thunk): Likewise.
8968         * pt.c (tsubst_friend_function): Likewise.
8969         (tsubst_decl): Likewise.
8970         (regenerate_decl_from_template): Likewise.
8971         * semantics.c (genrtl_named_return_value): Likewise.
8972         (expand_body): Likewise.
8973         (genrtl_finish_function): Likewise.
8974         * tree.c (cp_tree_equal): Likewise.
8975
8976 2001-03-12  Nathan Sidwell  <nathan@codesourcery.com>
8977
8978         * call.c (convert_like_real): Add extra semantics to INNER
8979         parameter. Don't convert to temporary if a user conversion
8980         gives us an lvalue that we're about to bind to a reference.
8981         Set INNER to indicate pending reference binding on recursive
8982         calls.
8983
8984 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
8985
8986         * cp/lex.c: Delete duplicate pending_lang_change.
8987
8988 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
8989
8990         * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
8991         Similarly.
8992         * cp/repo.c (get_base_filename, open_repo_file): Similarly.
8993         * cp/cp-tree.h: Remove file_name_nondirectory prototype.
8994
8995 2001-03-09  Zack Weinberg  <zackw@stanford.edu>
8996
8997         * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
8998
8999 2001-03-08  Stan Shebs  <shebs@apple.com>
9000
9001         * cp-tree.h (set_identifier_local_value): Remove unused decl.
9002
9003 2001-03-06  Zack Weinberg  <zackw@stanford.edu>
9004
9005         * spew.c: Remove references to CPP_OSTRING.
9006
9007 2001-03-06  Andrew Haley  <aph@redhat.com>
9008
9009         * typeck.c (convert_arguments): Check that we have an fndecl.
9010
9011 2001-03-05  Andrew Haley  <aph@redhat.com>
9012
9013         * typeck.c (convert_arguments): Don't do ellipsis conversion for
9014         __built_in_constant_p.
9015
9016 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
9017
9018         * typeck.c (build_static_cast): Allow enum to enum conversions
9019         as per DR 128.
9020
9021 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
9022
9023         * class.c (check_field_decls): Pointers to member do not a
9024         non-pod struct make, as per DR 148.
9025
9026 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
9027
9028         * call.c (joust): cp_pedwarn when using gnu extension concerning
9029         worst conversion sequences.
9030
9031 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
9032
9033         * decl.c: Replace all uses of 'boolean' with 'bool'.
9034
9035 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
9036
9037         * lang-specs.h: Add zero initializer for cpp_spec field to
9038         all array elements that need one.  Don't put an #ifdef inside
9039         the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
9040         use it.
9041
9042 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
9043
9044         Implement using decls inside template functions.
9045         * decl2.c (validate_nonmember_using_decl): Don't special case
9046         fake_std_node in the global namespace. Don't reject early when
9047         processing a template.
9048         (do_local_using_decl): Add to statement tree. Don't do further
9049         processing when building a template.
9050         * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
9051
9052 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
9053
9054         * decl2.c (do_nonmember_using_decl): Don't complain if we find
9055         same function. Do complain about ambiguating extern "C"
9056         declarations.
9057
9058 2001-02-28  Nathan Sidwell  <nathan@codesourcery.com>
9059
9060         Remove floating point and complex type template constant parms.
9061         * pt.c (convert_nontype_argument): Remove REAL_TYPE and
9062         COMPLEX_TYPE extensions.
9063         (invalid_nontype_parm_type_p): Likewise.
9064
9065 2001-02-27  Jeffrey Oldham  <oldham@codesourcery.com>
9066
9067         * except.c (call_eh_info): Revert "match_function"'s type.
9068
9069 2001-02-27  Nathan Sidwell  <nathan@codesourcery.com>
9070
9071         Fix ctor vtable vcall offsets.
9072         * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
9073         (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
9074         (get_matching_base): Remove.
9075         (get_original_base): New function.
9076         (build_vtbl_initializer): Initialize vid.rtti_binfo.
9077         Use a virtual thunk for a ctor vtable with an index
9078         (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
9079         primary base within a constructor vtable. Only set
9080         BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
9081         when primary base has been lost.
9082         * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
9083
9084 2001-02-26  Jeffrey Oldham  <oldham@codesourcery.com>
9085
9086         * call.c (joust): Ensure more_specialized()'s argument length
9087         parameter has correct value for constructors.
9088
9089 2001-02-26  Nathan Sidwell  <nathan@codesourcery.com>
9090
9091         * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
9092
9093         * decl.c (mark_inlined_fns): Prototype.
9094
9095 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
9096
9097         * spew.c (yylex): Correct handling of friends.
9098
9099 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
9100
9101         * mangle.c (write_encoding): Pass write_function_type the
9102         FUNCTION_DECL for the function being encoded.
9103         (write_function_type): Pass it along to write_bare_function_type.
9104         (write_bare_function_type): Pass it along to write_method_parms.
9105         (write_method_parms): Don't mangle the compiler-generated
9106         parameters to a constructor or destructor.
9107
9108 2001-02-22  Andreas Jaeger  <aj@suse.de>
9109
9110         * optimize.c: Include toplev.h for
9111         note_deferral_of_defined_inline_function prototype.
9112
9113 2001-02-22  Jakub Jelinek  <jakub@redhat.com>
9114
9115         * cp-tree.h (struct lang_decl_inlined_fns): New.
9116         (struct lang_decls): Add inlined_fns.
9117         (DECL_INLINED_FNS): New macro.
9118         * optimize.c (struct inline_data): Add inlined_fns.
9119         (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
9120         (inlinable_function_p): Likewise, fix typo in comment,
9121         function is not inlinable if it already inlined function currently
9122         being optimized.
9123         (expand_call_inline): Add fn to inlined_fns if necessary.
9124         (optimize_function): Initialize inlined_fns.
9125         Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
9126         * decl.c (mark_inlined_fns): New function.
9127         (lang_mark_tree): Call it.
9128
9129 2001-02-21  Jason Merrill  <jason@redhat.com>
9130
9131         * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
9132         (DECL_UNINLINABLE): Move to middle-end.
9133
9134         * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
9135         * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
9136         * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
9137         * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
9138         parms and outer BLOCK.  note_deferral_of_defined_inline_function.
9139
9140         * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
9141         second parm of op=.
9142
9143 2001-02-19  Mark Mitchell  <mark@codesourcery.com>
9144
9145         * decl2.c (set_decl_namespace): Allow explicit instantiations in
9146         any namespace.
9147
9148 2001-02-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9149
9150         * optimize.c (expand_call_inline): Don't walk subtrees of type
9151         nodes.
9152
9153 2001-02-18  Mark Mitchell  <mark@codesourcery.com>
9154
9155         * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
9156         for a destructor.
9157
9158 2001-02-18  Jason Merrill  <jason@redhat.com>
9159
9160         Do put the VTT parameter in DECL_ARGUMENTS.
9161         * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
9162         (current_vtt_parm): New macro.
9163         (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
9164         (DECL_HAS_VTT_PARM_P): New macro.
9165         (DECL_VTT_PARM): Remove.
9166         (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
9167         * decl.c (duplicate_decls): Only copy the operator code if
9168         appropriate.
9169         (start_function): Set current_vtt_parm.
9170         (lang_mark_tree): Don't mark vtt_parm.
9171         * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
9172         DECL_ARGUMENTS.  Set DECL_HAS_VTT_PARM_P.
9173         * class.c (build_clone): Maybe remove the VTT parm.
9174         * optimize.c (maybe_clone_body): Set up the VTT parm.
9175         * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
9176         * call.c (build_over_call): Just allow the VTT arg.
9177         * method.c (make_thunk): Don't set DECL_VTT_PARM.
9178         (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
9179         (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
9180         * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
9181         * error.c (dump_function_decl): Likewise.
9182         * call.c (build_user_type_conversion_1, convert_like_real): Abort
9183         if we try to call a constructor with in-charge or VTT parms.
9184         * method.c (skip_artificial_parms_for): New fn.
9185         * call.c (add_function_candidate, build_over_call): Call it.
9186         * call.c (build_new_method_call): Use current_vtt_parm.
9187         * init.c (expand_virtual_init): Likewise.
9188         * class.c (same_signature_p): No longer static.
9189         * cp-tree.h: Declare it.
9190         * search.c (look_for_overrides_r): Use it.
9191
9192 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
9193
9194         * cp-tree.h (new_abi_rtti_p): Remove.
9195         (name_mangling_version): Likewise.
9196         (flag_do_squangling): Likewise.
9197         * class.c (build_rtti_vtbl_entries): Remove old ABI support.
9198         * decl.c (grokfndecl): Likewise.
9199         * decl2.c (name_mangling_version): Remove.
9200         (flag_do_squangling): Likewise.
9201         (lang_f_options): Remove `squangle'.
9202         (unsupported_options): Add `squangle'.
9203         (cxx_decode_option): Issue a warning about uses of
9204         -fname-mangling-version.
9205         (finish_file): Remove old ABI support.
9206         * pt.c (check_explicit_specialization): Likewise.
9207         (tsubst_decl): Likewise.
9208         * rtti.c (init_rtti_processing): Likewise.
9209         (build_headof): Likewise.
9210         (get_tinfo_decl_dynamic): Likewise.
9211         (tinfo_from_decl): Likewise.
9212         (build_dynamic_cast_1): Likewise.
9213         (synthesize_tinfo_var): Likewise.
9214         * init.c (build_new): Allow enumeration types for the array-bounds
9215         in a direct-new-declarator.
9216
9217         * semantics.c (finish_typeof): Resolve OFFSET_REFs.
9218
9219         * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
9220         TREE_PROTECTED from the template being specialized.
9221
9222 2001-02-17  Jason Merrill  <jason@redhat.com>
9223
9224         * decl2.c (build_artificial_parm): Set TREE_READONLY.
9225
9226         * decl.c (bad_specifiers): Allow throw specs on things with
9227         pointer-to-function or -member-function type.
9228         * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
9229         a pmf.
9230
9231 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
9232
9233         * call.c (check_dtor_name): Handle template names correctly.
9234
9235 2001-02-16  Jason Merrill  <jason@redhat.com>
9236
9237         * cp-tree.h (DECL_USE_VTT_PARM): Remove.
9238         * decl2.c (maybe_retrofit_in_chrg): Don't create it.
9239         * optimize.c (maybe_clone_body): Don't substitute it.
9240         * call.c (build_new_method_call): Check in_chrg instead.
9241         * init.c (expand_virtual_init): Likewise.
9242
9243 2001-02-16  Gabriel Dos Reis  <gdr@codesourcery.com>
9244
9245         * decl.c (check_tag_decl): Make sure a typedef for an anonymous
9246         class-type introduces at least a type-name.
9247
9248 2001-02-16  Jakub Jelinek  <jakub@redhat.com>
9249
9250         * call.c (convert_like_real): Create a temporary for non-lvalue.
9251
9252 2001-02-16  Jeffrey Oldham  <oldham@codesourcery.com>
9253
9254         * cp-tree.h: Fix typos in comments.
9255
9256 2001-02-16  Jason Merrill  <jason@redhat.com>
9257
9258         * optimize.c (remap_block): If we're compiling a clone, pass the
9259         new block to insert_block.
9260
9261 2001-02-16  Mark Mitchell  <mark@codesourcery.com>
9262
9263         * semantics.c (finish_asm_stmt): Robustify.
9264
9265 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
9266
9267         * pt.c (push_template_decl_real): Don't remangle the name of a
9268         class template.
9269
9270 2001-02-15  Jim Meyering  <meyering@lucent.com>
9271
9272         * Make-lang.in (c++.install-common): Depend on installdirs.
9273         (c++.install-info): Likewise.
9274         (c++.install-man): Likewise.
9275
9276 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
9277
9278         * typeck2.c (build_m_component_ref): Robustify.
9279
9280 2001-02-15  Alexandre Oliva  <aoliva@redhat.com>
9281
9282         * friend.c (do_friend): Don't take the nested [template] class
9283         into account when deciding whether to warn about the friend
9284         function not referring to a template function.
9285
9286 2001-02-14  Jakub Jelinek  <jakub@redhat.com>
9287
9288         * typeck.c (build_unary_op): Clarify error message.
9289
9290 2001-02-08  Aldy Hernandez  <aldyh@redhat.com>
9291
9292         * parse.y (component_constructor_declarator): allow optional
9293         parentheses around constructor class name.
9294
9295 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
9296
9297         * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
9298         section.
9299         * init.c (emit_base_init): Remove incorrect comment about
9300         virtual bases.
9301         * method.c (make_thunk): Fix comment alignment.
9302
9303 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
9304
9305         Kill remnants of this is variable.
9306         * cp-tree.h (flag_this_is_variable): Remove.
9307         * decl2.c (flag_this_is_variable): Remove.
9308         * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
9309         (build_vbase_path): The path is non-static, even in a cdtor.
9310         (resolves_to_fixed_type_p): Add additional return value.
9311         * search.c (init_vbase_pointers): Adjust.
9312         * tree.c (lvalue_p_1): Adjust.
9313         * typeck.c (mark_addressable): Adjust.
9314
9315 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
9316
9317         * pt.c (unify): Don't check cv quals of array types.
9318
9319 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
9320
9321         * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
9322         check whether we already have the type.
9323
9324 2001-02-13  Mark Mitchell  <mark@codesourcery.com>
9325
9326         * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
9327         * call.c (build_op_delete_call): Simplify to remove duplicate
9328         code.
9329         * class.c (clone_function_decl): Don't build the deleting variant
9330         of a non-virtual destructor.
9331         * decl.c (finish_destructor_body): Don't call delete if this is a
9332         non-virtual destructor.
9333         * init.c (build_delete): Explicitly call `operator delete' when
9334         deleting an object with a non-virtual destructor.
9335
9336 2001-02-13  Jason Merrill  <jason@redhat.com>
9337
9338         * lang-specs.h: Add more __EXCEPTIONS.
9339
9340 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
9341
9342         * typeck2.c (process_init_constructor): Check
9343         TREE_HAS_CONSTRUCTOR before issuing missing init warning.
9344
9345 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
9346
9347         * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
9348         Remove spurious information in comment. Allow further
9349         adjustments of REFERENCE_TYPE args.
9350
9351 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
9352
9353         * errfn.c (cp_deprecated): Tweak diagnostic text.
9354         * parse.y (new_initializer): Deprecate initializer lists
9355         extension.
9356
9357 2001-02-12  Mark Mitchell  <mark@codesourcery.com>
9358
9359         Remove old ABI support.
9360
9361 2001-02-11  Mark Mitchell  <mark@codesourcery.com>
9362
9363         * decl2.c (flag_vtable_thunks): Always set it to 1.
9364         (flag_new_abi): Likewise.
9365         * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
9366
9367         * Makefile.in (g++spec.o): Fix typo.
9368
9369 2001-02-09  Jason Merrill  <jason@redhat.com>
9370
9371         * lang-specs.h: Restore definition of __EXCEPTIONS.
9372
9373 2001-02-08  Jason Merrill  <jason@redhat.com>
9374
9375         * search.c (shared_member_p): New function.
9376         (lookup_field_r): Use it.
9377         * cp-tree.h (SHARED_MEMBER_P): Remove.
9378
9379         * method.c (process_overload_item): Handle template-dependent array
9380         bounds.
9381         * pt.c (type_unification_real): If we end up with undeduced nontype
9382         parms, try again.
9383
9384         * decl.c (lookup_name_real): Tweak warning to refer to decls, not
9385         types.
9386
9387         * typeck2.c (friendly_abort): Don't say anything if we have
9388         earlier errors or sorries.
9389
9390         * decl.c (check_tag_decl): Notice attempts to redefine bool and
9391         wchar_t.  Ignore if in_system_header.
9392
9393         * decl.c (maybe_push_cleanup_level): New fn...
9394         (start_decl_1): ...split out from here.
9395         * cvt.c (build_up_reference): Use it.
9396         * cp-tree.h: Declare it.
9397
9398 2001-02-07  Mark Mitchell  <mark@codesourcery.com>
9399
9400         * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
9401         spec.
9402
9403 2001-02-06  Nathan Sidwell  <nathan@codesourcery.com>
9404
9405         * pt.c (lookup_template_class): Make sure it's a primary
9406         template or template_template_parm when called from the parser.
9407         (instantiate_template_class): Add assertion.
9408
9409 2001-02-05  Alexandre Oliva  <aoliva@redhat.com>
9410
9411         * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
9412         from error_mark_node.
9413
9414 2001-02-05  Nathan Sidwell  <nathan@codesourcery.com>
9415
9416         Fix specification and implementation bugs in V3 ABI
9417         construction vtables.
9418         * cp-tree.h (flag_dump_class_layout): New flag.
9419         (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
9420         (BINFO_LOST_PRIMARY_P): New flag.
9421         (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
9422         (BINFO_PRIMARY_MARKED_P): Rename to ...
9423         (BINFO_PRIMARY_P): ... here.
9424         (binfo_via_virtual): New prototype.
9425         * decl2.c (flag_dump_class_layout): New flag.
9426         (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
9427         use `=' as a file name separator.
9428         * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
9429         bases.
9430         (build_vtbl_address): If this is a virtual primary base, then
9431         get the vtbl of what it is ultimately primary for.
9432         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
9433         for BINFO_PRIMARY_P.
9434         (dfs_skip_nonprimary_vbases_markedp): Likewise.
9435         (get_shared_vbase_if_not_primary): Likewise.
9436         (dfs_get_pure_virtuals): Likewise.
9437         (expand_upcast_fixups): Likewise.
9438         (fixup_virtual_upcast_offsets): Likewise.
9439         (dfs_find_vbase_instance): Likewise.
9440         (find_vbase_instance): Likewise.
9441         (binfo_from_vbase): Adjust comment to reflect reality.
9442         (binfo_via_virtual): New function.
9443         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
9444         for binfo walking during VTT construction.
9445         (dfs_mark_primary_bases): Remove.
9446         (force_canonical_binfo_r): New function.
9447         (force_canonical_binfo): New function.
9448         (mark_primary_virtual_base): New function.
9449         (mark_primary_bases): Walk in inheritance graph order, use
9450         mark_primary_virtual_base.
9451         (determine_primary_base): Use some more intermediate variables.
9452         (dfs_find_final_overrider): Don't check for overriding along a
9453         virtual path.
9454         (dfs_modify_vtables): Walk into primary virtual bases too.
9455         (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
9456         (build_base_fields): Likewise.
9457         (dfs_set_offset_for_unshared_vbases): Likewise.
9458         (layout_virtual_bases): Likewise.
9459         (end_of_class): Likewise.
9460         (finish_struct_1): Call dump_class_hierarchy, if requested.
9461         (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
9462         (dump_class_hierarchy_r): Add stream parameter. Emit more information.
9463         (dump_class_hierarchy): Add file parameter. Append to file, if
9464         required.
9465         (finish_vtbls): Adjust accumulate_vtbl_inits call.
9466         Use canonical base for virtual bases.
9467         (build_vtt): Add more comments. Adjust build_vtt_inits call.
9468         (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
9469         Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
9470         VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
9471         virtual VTTs.
9472         (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
9473         from DATA.  We want virtual primary bases and all bases via virtual.
9474         Only set BINFO_VPTR_INDEX for top level. Look up from a primary
9475         virtual base when not a construction vtable.
9476         (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
9477         (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
9478         Use canonical bases when processing virtual bases.
9479         (accumulate_vtbl_inits): We're interested in any base via a
9480         virtual path.
9481         (dfs_accumulate_vtbl_inits): If this is a primary virtual base
9482         within a construction vtable, determine what is being overridden.
9483         (build_vtbl_initializer): Add more comments
9484         (add_vcall_offset_vtbl_entries_1): Adjust comment.
9485         (build_rtti_vtbl_entries): Check if the base has lost its
9486         primary.
9487
9488 2001-02-05  Mark Mitchell  <mark@codesourcery.com>
9489
9490         * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
9491
9492 Sun Feb  4 15:52:44 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9493
9494         * decl.c (pushdecl): Call abort instead of fatal.
9495         * except.c (decl_is_java_type): Call fatal_error instead of fatal.
9496         * init.c (build_new_1): Likewise.
9497         (build_java_class_ref): Call internal_error and fatal_error, not fatal.
9498         * decl.c (build_typename_type): hash_table_init now returns void.
9499         decl.c (init_decl_processing): Make an error non-fatal.
9500
9501 2001-02-04  Mark Mitchell  <mark@codesourcery.com>
9502
9503         * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
9504         Document.
9505         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
9506         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
9507         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
9508         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
9509         * decl.c (maybe_commonize_var): Use the new name-mangling where
9510         appropriate.
9511         * decl2.c (comdat_linkage): Enhance comments.  Make all
9512         compiler-generated things static, if COMDAT is not available.
9513         (get_tinfo_decl): Do not make typeinfo objects that belong in the
9514         library COMDAT.
9515         (tinfo_base_init): Use the correct mangled name for typeinfo
9516         strings, and push them into the global scope.
9517         (typeinfo_in_lib_p): New function.
9518         (synthesize_tinfo_var): Use it.
9519         (create_real_tinfo_var): Likewise.
9520
9521 2001-02-03  Jakub Jelinek  <jakub@redhat.com>
9522
9523         * decl.c (push_class_binding): Use context_for_name_lookup instead
9524         of CP_DECL_CONTEXT.
9525         * search.c (context_for_name_lookup): Remove static.  Check for NULL
9526         context in the loop.
9527         * cp-tree.h (context_for_name_lookup): Add prototype.
9528
9529 2001-02-02  Jakub Jelinek  <jakub@redhat.com>
9530
9531         * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
9532         * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
9533         Remove.
9534         * call.c (convert_class_to_reference, build_user_type_conversion_1,
9535         add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
9536
9537 2001-02-02  Mark Mitchell  <mark@codesourcery.com>
9538
9539         * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
9540         of macros used when compiling g++spec.c.
9541         * g++spec.c (lang_specific_driver): Link with the shared
9542         libgcc by default.
9543
9544 2001-01-29  Joseph S. Myers  <jsm28@cam.ac.uk>
9545
9546         * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
9547         make_reference_declarator, make_call_declarator), method.c
9548         (implicitly_declare_fn), parse.y (namespace_using_decl,
9549         notype_unqualified_id, expr_or_declarator, new_type_id,
9550         after_type_declarator, direct_after_type_declarator,
9551         notype_declarator, complex_notype_declarator,
9552         complex_direct_notype_declarator, qualified_id,
9553         notype_qualified_id, overqualified_id, direct_new_declarator,
9554         absdcl, direct_abstract_declarator, conversion_declarator), pt.c
9555         (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
9556         instead of build_parse_node.
9557
9558 2001-01-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9559
9560         * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
9561         (minus_one_node): Moved to top level gcc directory.  Renamed
9562         to integer_minus_one_node.
9563
9564         * init.c (init_init_processing): Don't set minus_one_node.
9565         (build_vec_init): Use integer_minus_one_node.
9566
9567         * rtti.c (get_tinfo_decl_dynamic): Likewise.
9568
9569 2001-01-28  Jakub Jelinek  <jakub@redhat.com>
9570
9571         * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
9572         identical and they would be replaced with constant, remove
9573         MODIFY_EXPR from the tree.
9574
9575 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9576
9577         * Make-lang.in: Remove all dependencies on defaults.h.
9578         * call.c: Don't include defaults.h.
9579         * decl.c: Likewise.
9580         * decl2.c: Likewise.
9581         * except.c: Likewise.
9582         * pt.c: Likewise.
9583         * rtti.c: Likewise.
9584         * tree.c: Likewise.
9585         * typeck.c: Likewise.
9586
9587 2001-01-25  Jakub Jelinek  <jakub@redhat.com>
9588
9589         * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
9590         operators even in "C" linkage.
9591         * method.c (set_mangled_name_for_decl): Likewise.
9592         * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
9593         overloaded operators in "C" linkage.
9594
9595 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
9596
9597         * pt.c (tsubst_decl): Remove IN_DECL parameter.
9598         (tsubst_arg_types): Check parameter is not void.
9599         (tsubst): Adjust tsubst_decl call.
9600
9601 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
9602
9603         * call.c (add_builtin_candidate): Quote std properly, from
9604         previous change.
9605
9606 2001-01-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9607
9608         * pt.c (check_explicit_specialization): Clone constructors and
9609         destructors.
9610
9611 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
9612
9613         * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
9614         indicates anything special about template depth. Make sure we
9615         only count the user visible template classes.
9616
9617 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
9618
9619         * call.c (build_conv): Typo in comment.
9620         (add_builtin_candidate): Add more explanation.
9621         Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
9622         Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
9623         when we have enumeral types.
9624         (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
9625         candidates for relops and eqops.
9626         (joust): Simplify control flow. Allow a non-template user
9627         function to hide a builtin.
9628
9629 2001-01-22  Nathan Sidwell  <nathan@codesourcery.com>
9630
9631         * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
9632         (more_specialized): Add deduction parameter.
9633         * call.c (joust): Adjust more_specialized call.
9634         * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
9635         UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
9636         (get_bindings_order): Remove.
9637         (get_bindings_real): Add DEDUCE parameter.
9638         (maybe_adjust_types_for_deduction): Return extra unify flags. Do
9639         REFERENCE_TYPE jig for DEDUCE_ORDER.
9640         (type_unification_real): Deal with DEDUCE_ORDER. Use result of
9641         maybe_adjust_types_for_deduction.
9642         (more_specialized): Add DEDUCE parameter. Call get_bindings_real
9643         directly.
9644         (try_one_overload): Use result of maybe_adjust_types_for_deduction.
9645         (check_cv_quals_for_unify): Use new unify qualifier flags.
9646         (unify): Clear new unify qualifier flags.
9647         (get_bindings_real): Add DEDUCE parameter.
9648         (get_bindings): Adjust call to get_bindings_real.
9649         (get_bindings_overload): Likewise.
9650         (most_specialized_instantiation): Adjust call to
9651         more_specialized.
9652
9653 2001-01-19  Jason Merrill  <jason@redhat.com>
9654
9655         * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
9656
9657         * decl.c (init_decl_processing): Just force -fvtable-thunks on if
9658         -fnew-abi.
9659
9660 2001-01-19  Ute Pelkmann  <scope.muc@t-online.de>
9661
9662         * decl2.c (arg_assoc_class): Fix double iteration logic.
9663
9664 2001-01-19  Jason Merrill  <jason@redhat.com>
9665
9666         * init.c (build_delete): Always call convert_force to strip cv-quals.
9667
9668         * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
9669         * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
9670         * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
9671
9672 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
9673
9674         * search.c (get_vbase_1): Count only virtual bases.
9675
9676 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
9677
9678         * class.c (duplicate_tag_error): Robustify flag clearing.
9679
9680 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
9681
9682         * cp-tree.h (lookup_template_class): Add complain parm.
9683         * decl.c (lookup_namespace_name): Adjust call to
9684         lookup_template_class.
9685         (make_typename_type): Likewise.
9686         * semantics.c (finish_template_type): Likewise.
9687         * pt.c (lookup_template_class): Add complain parm. Adjust.
9688         (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
9689         (tsubst): Likewise.
9690
9691 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
9692
9693         * pt.c (copy_default_args_to_explicit_spec): Preserve
9694         object's CV quals. Reorganize.
9695
9696 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
9697
9698         * typeck.c (build_modify_expr): Say `initialization' for
9699         INIT_EXPRs.
9700         * init.c (build_default_init): Convert to enumeral type, if
9701         needed.
9702
9703 2001-01-18  Jakub Jelinek  <jakub@redhat.com>
9704
9705         * parse.y (nomods_initdcl0): Properly set things up for
9706         initdcl0_innards.
9707
9708 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
9709
9710         * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
9711         (type_unification_real): Set it.
9712         (unify): Use it.
9713
9714 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
9715
9716         * decl.c (finish_destructor_body): Convert to vbase pointer here.
9717
9718 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
9719
9720         * semantics.c (begin_class_definition): Check we're not inside a
9721         template parm list.
9722
9723 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
9724
9725         * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
9726         BASELINK_P.
9727
9728 2001-01-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9729
9730         * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
9731         * call.c (build_over_call): Add comment.
9732
9733 2001-01-16 Daniel Berlin <dberlin@redhat.com>
9734
9735         * cvt.c (ocp_convert): Handle vector type conversion
9736         * typeck2.c (digest_init): Handle vector type initializations
9737
9738 2001-01-16  Phil Edwards  <pme@sources.redhat.com>
9739
9740         * g++spec.c:  Don't add libraries needlessly if -fsyntax-only
9741           was given.
9742
9743 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
9744
9745         * pt.c (check_nontype_parm): Rename to ...
9746         (invalid_nontype_parm_type_p): ... here.
9747         (process_template_parm): Adjust.
9748         (convert_template_argument): Adjust.
9749
9750 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
9751
9752         * pt.c (check_nontype_parm): New function.
9753         (process_template_parm): Use it.
9754         (convert_template_argument): Use it.
9755         (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
9756         member.
9757
9758 2001-01-14  Jeffrey Oldham  <oldham@codesourcery.com>
9759
9760         * tree.c: Add defaults.h
9761         (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
9762         * Make-lang.in (cp/tree.o): Add defaults.h.
9763
9764 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
9765
9766         * Make-lang.in (CXX_C_OBJS): Add c-format.o.
9767
9768 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
9769
9770         * g++.1: Change to be ".so man1/gcc.1".
9771
9772 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
9773
9774         * Make-lang.in (c++.info, c++.install-info): Build and install g++
9775         internals info.
9776         (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
9777         ($(srcdir)/cp/g++int.info): New target.
9778         * gxxint.texi: Add info directory entry.  Use @@ in email address.
9779         * .cvsignore: Update.
9780
9781 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
9782
9783         * typeck.c (build_c_cast): Do template processing earlier.
9784         Always pedwarn on array casts.
9785
9786 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
9787
9788         * friend.c (make_friend_class): Make sure a templated class is
9789         actually a template.
9790
9791 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
9792
9793         * decl2.c (get_guard): Set linkage from guarded decl.
9794
9795 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
9796
9797         * call.c (convert_default_arg): Check for unprocessed
9798         DEFAULT_ARG.
9799         * cp-tree.h (replace_defarg): Move to spew.c.
9800         (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
9801         spew.c, which is where they really are.
9802         (done_pending_defargs): Declare.
9803         (unprocessed_defarg_fn): Declare.
9804         * decl.c (replace_defarg): Move to spew.c
9805         * parse.y (structsp): Call done_pending_defargs.
9806         * spew.c (defarg_fns): Rearrange list structure.
9807         (defarg_fnsdone): New static variable.
9808         (defarg_depfns): New static variable.
9809         (init_spew): Adjust.
9810         (add_defarg_fn): Store the type in TREE_TYPE.
9811         (do_pending_defargs): Detect and deal with ordering constraints
9812         and circularity.
9813         (done_pending_defargs): New function.
9814         (unprocessed_defarg_fn): New function.
9815         (replace_defarg): Moved from decl.c. Robustify. Don't save
9816         if circularity detected.
9817
9818 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
9819
9820         * pt.c (unify): Check array has a domain, before checking
9821         whether it is variable sized.
9822
9823 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
9824
9825         * decl.c (grokparms): Unobfuscate and get correct diagnostic for
9826         parameters with pointers to arrays of unknown bound.
9827
9828 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
9829
9830         * parse.y (template_parm_header, template_spec_header): New
9831         reductions. Split out from ...
9832         (template_header): ... here. Use them.
9833         (template_template_parm): Use template_parm_header.
9834         * semantics.c (finish_template_template_parm): Add assert.
9835
9836 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
9837
9838         * mangle.c (write_builtin_type): Fix thinko.
9839
9840         * pt.c (copy_default_args_to_explicit_spec_1): New function.
9841         (copy_default_args_to_explicit_spec): Likewise.
9842         (check_explicit_specialization): Use it.
9843
9844         * class.c (finish_struct_1):  Remove last argument in call to
9845         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
9846         * decl.c (builtin_function): Likewise.
9847         (build_cp_library_fn): Likewise.
9848         (check_initializer): Likewise.
9849         (make_rtl_for_nonlocal_decl): Likewise.
9850         (cp_finish_decl): Likewise.
9851         (start_function): Likewise.
9852         * decl2.c (finish_anon_union): Likewise.
9853         * friend.c (do_friend): Likewise.
9854         * init.c (build_java_class_ref): Likewise.
9855         * method.c (make_thunk): Likewise.
9856         * pt.c (tsubst_friend_function): Likewise.
9857         * semantics.c (expand_body): Likewise.
9858
9859 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
9860
9861         * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
9862         looking at DECL_CLONED_FUNCTION for non-functions.
9863
9864 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
9865
9866         * error.c (dump_template_parameter): Use parm to determine how
9867         to print default value.
9868
9869 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
9870
9871         * class.c (duplicate_tag_error): Clear more flags.
9872
9873 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
9874
9875         * call.c (build_new_method_call): Use binfo_for_vbase.
9876
9877 2001-01-10  Joseph S. Myers  <jsm28@cam.ac.uk>
9878
9879         * cp-tree.h (flag_cond_mismatch): Don't declare.
9880         * decl2.c (flag_cond_mismatch): Don't define.
9881         (lang_f_options): Remove cond-mismatch.
9882         (unsupported_options): Add cond-mismatch.
9883
9884 2001-01-09  Nathan Sidwell  <nathan@codesourcery.com>
9885
9886         * class.c (handle_using_decl): Reject using of constructor name
9887         of sourcing class. Allow injecting of a method with same name as
9888         nested class. Fixup error messages.
9889
9890 2001-01-09  Joseph S. Myers  <jsm28@cam.ac.uk>
9891
9892         * decl2.c (lang_decode_option): Handle -Wformat=2.
9893
9894 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
9895
9896         * cp-tree.h (lang_decl_flags): Rename defined_in_class to
9897         initialized_in_class.
9898         (DECL_DEFINED_IN_CLASS_P): Rename to ...
9899         (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
9900         * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
9901         (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
9902         * pt.c (check_default_tmpl_args): Adjust for
9903         DECL_INITIALIZED_IN_CLASS_P.
9904         (instantiate_class_template): Likewise.
9905         (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
9906
9907         * class.c (finish_struct): Constify saved_filename.
9908
9909 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
9910
9911         * class.c (duplicate_tag_error): Adjust diagnostic.
9912         (finish_struct): Locally set location to start of struct.
9913         * decl.c (fixup_anonymous_aggr): Use cp_error_at.
9914
9915 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
9916
9917         * decl.c (struct binding_level): Adjust class_shadowed comments
9918         to reflect reality.
9919         (push_class_level_binding): Adjust comments to reflect reality.
9920         Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
9921         Don't set TREE_VALUE on the class_shadowed list.
9922
9923 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9924
9925         * decl2.c (acceptable_java_type): Allow references too.
9926         * init.c (build_java_class_ref): When using the new ABI, search
9927         `class$' and have it mangled with `mangle_decl.'
9928         * mangle.c (write_java_integer_type_codes): New function.
9929         (write_builtin_type): Detect and mangle Java integer and real
9930         types.
9931
9932 2001-01-07  Mark Mitchell  <mark@codesourcery.com>
9933
9934         * decl2.c (grokfield): Don't accept `asm' specifiers for
9935         non-static data members.
9936
9937 2001-01-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9938
9939         * expr.c (cplus_expand_expr): Don't reset `target'.
9940
9941 2001-01-07  Neil Booth  <neil@daikokuya.demon.co.uk>
9942
9943         * cp/decl2.c (cxx_post_options): Call cpp_post_options.
9944
9945 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
9946
9947         * parse.y (template_datadef): Check for error_mark_node.
9948
9949 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
9950
9951         * cp-tree.def (DEFAULT_ARG): Make `x' class.
9952
9953 2001-01-04  Joseph S. Myers  <jsm28@cam.ac.uk>
9954
9955         * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
9956         (record_builtin_type): Make non-static.
9957         (flag_short_double): Don't declare.
9958         (init_decl_processing): Remove the creation of many tree nodes now
9959         in c_common_nodes_and_builtins.
9960         (build_void_list_node): New function.
9961         * decl2.c (flag_short_double, flag_short_wchar): Don't define.
9962         * cp-tree.h (flag_short_wchar): Don't declare.
9963
9964 2001-01-04  Mark Mitchell  <mark@codesourcery.com>
9965
9966         * call.c (build_conv): Don't use build1 for USER_CONV.
9967         * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
9968
9969 2001-01-03  Joseph S. Myers  <jsm28@cam.ac.uk>
9970
9971         * lex.c (lang_init): Call c_common_lang_init.
9972
9973 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
9974
9975         * search.c (lookup_fnfields_here): Remove.
9976         (look_for_overrides_r): Use lookup_fnfields_1.
9977         Ignore functions from using declarations.
9978
9979 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
9980
9981         Implement exceptions specifiers for implicit member functions.
9982         * cp-tree.h (merge_exceptions_specifiers): Declare new function.
9983         * method.c (synthesize_exception_spec): New function.
9984         (locate_dtor, locate_ctor, locate_copy): New functions.
9985         (implicitly_declare_fn): Generate the exception spec too.
9986         * search.c (check_final_overrider): Check artificial functions
9987         too.
9988         * typeck2.c (merge_exception_specifiers): New function.
9989
9990 2001-01-03  Jason Merrill  <jason@redhat.com>
9991
9992         * init.c (build_default_init): New fn.
9993         (perform_member_init): Split out from here.
9994         (build_new_1): Use it.  Simplify initialization logic.
9995         (build_vec_init): Take an array, rather than a pointer and maxindex.
9996         Speed up simple initializations.  Don't clean up if we're assigning.
9997         * cp-tree.h: Adjust.
9998         * decl2.c (do_static_initialization): Remove TREE_VEC case.
9999         * parse.y (new_initializer): Return void_zero_node for ().
10000         * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
10001         * typeck2.c (digest_init): Only complain about user-written
10002         CONSTRUCTORs.
10003
10004 2000-12-22  Mike Stump  <mrs@wrs.com>
10005
10006         * decl2.c: (max_tinst_depth): Increase to 50.
10007
10008 2001-01-02  Mark Mitchell  <mark@codesourcery.com>
10009
10010         * class.c (invalidate_class_lookup_cache): Zero the
10011         previous_class_values.
10012         * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
10013         TREE_INT_CST_HIGH.
10014         (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
10015         * decl.c (free_bindings): New variable.
10016         (push_binding): Don't create a new binding if we have one on the
10017         free list.
10018         (pop_binding): Put old bindings on the free list.
10019         (init_decl_processing): Use size_int, not build_int_2.
10020         Register free_bindings as a GC root.
10021         (cp_make_fname_decl): Use size_int, not build_int_2.
10022         (push_inline_template_parms_recursive): Likewise.
10023         (end_template_parm_list): Likewise.
10024         (for_each_template_parm): Do not use walk_tree_without_duplicates.
10025         (tsubst_template_parms): Use size_int, not build_int_2.
10026         (tsubst): Likewise.
10027         * rtti.c (get_vmi_pseudo_type_info): Likewise.
10028
10029 2001-01-02  Richard Henderson  <rth@redhat.com>
10030
10031         * parse.y (asm): Set ASM_INPUT_P.
10032
10033 2001-01-02  Jason Merrill  <jason@redhat.com>
10034
10035         * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
10036         for v3 ABI.
10037
10038         * typeck.c (cp_truthvalue_conversion): New fn.
10039         * cvt.c (ocp_convert): Use it.
10040
10041         * cp-tree.h: Lose c-common.c decls.
10042
10043         * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
10044         * cvt.c (convert_to_void): Use type_unknown_p.
10045
10046         * typeck.c (strip_all_pointer_quals): Also strip quals from
10047         pointer-to-member types.
10048
10049         * Make-lang.in (cp/TAGS): Use --no-globals.  Ignore parse.c, and treat
10050         parse.y as C.
10051
10052         * call.c (build_new_method_call): Do evaluate the object parameter
10053         when accessing a static member.
10054         * typeck.c (build_component_ref): Likewise.
10055
10056 2001-01-02  Andreas Jaeger  <aj@suse.de>
10057
10058         * decl.c (cp_missing_noreturn_ok_p): New.
10059         (init_decl_processing): Set lang_missing_noreturn_ok_p.
10060
10061 2000-12-29  Jakub Jelinek  <jakub@redhat.com>
10062
10063         * decl.c (init_decl_processing): Fix sign of wchar_type_node.
10064
10065 2000-12-29  Mark Mitchell  <mark@codesourcery.com>
10066
10067         * class.c (pushclass): Remove #if 0'd code.
10068         * cp-tree.h (overload_template_name): Remove.
10069         * decl.c (store_bindings): Simplify.
10070         (pop_from_top_level): Likewise.
10071         * pt.c (overload_template_name): Remove.
10072         (instantiate_decl): Don't call push_to_top_level if it's not
10073         needed.
10074
10075 2000-12-28  Mark Mitchell  <mark@codesourcery.com>
10076
10077         * pt.c (register_local_specialization): Don't return a value.
10078         (lookup_template_class): Use move-to-front heuristic when looking
10079         up template instantiations.
10080         (instantiate_decl): Only push_to_top_level when we're actually
10081         going to instantiate the template.
10082
10083 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
10084
10085         * search.c (binfo_for_vtable): Return least derived class, not
10086         most.  Handle secondary vtables.
10087
10088 2000-12-22  Jason Merrill  <jason@redhat.com>
10089
10090         * pt.c (more_specialized): Don't optimize len==0.
10091         (fn_type_unification): If we're adding the return type, increase len.
10092
10093         * typeck.c (build_binary_op): Fix pmf comparison logic.
10094
10095         * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
10096         DECL_STATIC_FUNCTION_P.
10097
10098         * semantics.c (genrtl_finish_function): Don't try to jump to
10099         return_label unless it exists.
10100
10101         In partial ordering for a call, ignore parms for which we don't have
10102         a real argument.
10103         * call.c (joust): Pass len to more_specialized.
10104         (add_template_candidate_real): Strip 'this', pass len.
10105         * pt.c (more_specialized): Pass len down.  Lose explicit_args parm.
10106         (get_bindings_order): New fn.  Pass len down.
10107         (get_bindings_real): Strip 'this', pass len.
10108         (fn_type_unification): Likewise.
10109         (type_unification_real): Succeed after checking 'len' args.
10110         (most_specialized_instantiation): Lose explicit_args parm.
10111         * class.c (resolve_address_of_overloaded_function): Strip 'this',
10112         pass len.
10113
10114 2000-12-21  Jason Merrill  <jason@redhat.com>
10115
10116         * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
10117         DECL_TEMPLATE_RESULT.
10118
10119         * search.c (lookup_field_r): Call lookup_fnfields_1, not
10120         lookup_fnfields_here.
10121
10122         * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
10123
10124         * call.c (build_object_call): Also allow conversions that return
10125         reference to pointer to function.
10126         (add_conv_candidate): Handle totype being ref to ptr to fn.
10127         (build_field_call): Also allow members of type reference to function.
10128         Lose support for calling pointer to METHOD_TYPE fields.
10129
10130         * error.c (dump_expr): Handle *_CAST_EXPR.
10131
10132         * typeck2.c (build_scoped_ref): Always convert to the naming class.
10133
10134         * tree.c (break_out_cleanups): Lose.
10135         * cp-tree.h: Remove prototype.
10136         * typeck.c (build_component_ref): Don't break_out_cleanups.
10137         (build_compound_expr): Likewise.
10138         * semantics.c (finish_expr_stmt): Likewise.
10139
10140 2000-12-20  Richard Henderson  <rth@redhat.com>
10141
10142         * cp-tree.h: Update declarations.
10143         * decl.c (finish_case_label): Return the new stmt node.
10144         * semantics.c (finish_goto_stmt): Likewise.
10145         (finish_expr_stmt, finish_return_stmt): Likewise.
10146         (finish_break_stmt, finish_continue_stmt): Likewise.
10147         (finish_asm_stmt): Likewise.
10148         * parse.y (already_scoped_stmt): Set STMT_LINENO.
10149         (compstmt, implicitly_scoped_stmt, stmt): Likewise.
10150         (simple_if, simple_stmt): Return the new stmt node.
10151         (save_lineno): New.
10152
10153 2000-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
10154
10155         * cp-tree.h: Don't declare warn_long_long.
10156
10157 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10158
10159         * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
10160         IS_AGGR_TYPE.
10161
10162 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10163
10164         * pt.c (unify): Handle when both ARG and PARM are
10165         BOUND_TEMPLATE_TEMPLATE_PARM.
10166
10167 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10168
10169         * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
10170         DECL_TEMPLATE_PARM_P.
10171
10172 2000-12-15  Jason Merrill  <jason@redhat.com>
10173
10174         * init.c (build_new_1): Reorganize.  Now with 100% fewer SAVE_EXPRs!
10175
10176         * init.c (build_new_1): Don't strip quals from type.
10177
10178         * decl.c (pushdecl): Don't check for linkage on a non-decl.
10179
10180         * call.c (build_op_delete_call): See through ARRAY_TYPEs.
10181
10182         * call.c (build_new_function_call): Lose space before paren in
10183         error message.
10184         (build_new_method_call): Likewise.
10185
10186         * typeck2.c (build_m_component_ref): Propagate quals from datum.
10187
10188 2000-12-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10189
10190         * pt.c (check_explicit_specialization): Propagate default
10191         function arguments to explicit specializations.
10192
10193 2000-12-13  DJ Delorie  <dj@redhat.com>
10194
10195         * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
10196         and <? operators.
10197
10198 2000-12-08  Jason Merrill  <jason@redhat.com>
10199
10200         * error.c (dump_function_name): Don't let the user see __comp_ctor.
10201
10202         Clean up copy-initialization in overloading code.
10203         * call.c (build_user_type_conversion_1): Die if we are asked to
10204         convert to the same or a base type.
10205         (implicit_conversion): Avoid doing so.  Lose reference binding code.
10206         (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
10207         direct-initialization.  Also do direct-init part of copy-init.
10208         (build_user_type_conversion): Don't provide context to convert_like.
10209         * cvt.c (ocp_convert): build_user_type_conversion will now provide
10210         the constructor call for copy-init.
10211
10212         * pt.c (tsubst_decl): Call clone_function_decl here if this is an
10213         instantiation of a member template.
10214         (do_decl_instantiation): Not here.
10215
10216 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
10217
10218         * class.c (check_field_decls): Don't special case anonymous
10219         fields in error messages.
10220         (note_name_declared_in_class): Use %D on diagnostic.
10221
10222         * tree.c (pod_type_p): Use strip_array_types.
10223         (cp_valid_lang_attribute): Likewise.
10224         * typeck.c (cp_type_quals): Strip arrays separately, to avoid
10225         multiple evaluations.
10226         (cp_has_mutable_p): Use strip_array_types.
10227
10228 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
10229
10230         * cp-tree.h (sufficient_parms_p): Declare new function.
10231         * call.c (sufficient_parms_p): New function, broken out of ...
10232         (add_function_candidate): ... here. Use it.
10233         (add_conv_candidate): Use it.
10234         * decl.c (grok_ctor_properties): Use it.
10235
10236 2000-12-07  Jakub Jelinek  <jakub@redhat.com>
10237
10238         * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
10239
10240 2000-12-07  Joseph S. Myers  <jsm28@cam.ac.uk>
10241
10242         * decl2.c (lang_decode_option): Handle -Wformat-security.
10243
10244 2000-12-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10245
10246         * pt.c (verify_class_unification): New function.
10247         (get_class_bindings): Use it.
10248         (try_class_unification): Tidy.
10249         (unify): Handle when argument of a template-id is not
10250         template parameter dependent.
10251         (template_args_equal): Handle when TREE_CODE's do not match.
10252
10253 2000-12-06  Alexandre Oliva  <aoliva@redhat.com>
10254
10255         * lang-specs.h (c++): When invoking the stand-alone preprocessor
10256         for -save-temps, pass all relevant -Defines to it, and then don't
10257         pass them to cc1plus.
10258
10259 2000-12-05  Will Cohen  <wcohen@redhat.com>
10260
10261         * decl.c (finish_case_label): Cleared
10262         more_cleanups_ok in surrounding function scopes.
10263         (define_label): Likewise.
10264
10265 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
10266
10267         * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
10268         (get_matching_virtual): Remove.
10269         (look_for_overrides): Declare new function.
10270         * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
10271         DECL_VINDEX here.
10272         * class.c (check_for_override): Move base class iteration code
10273         to look_for_overrides.
10274         * search.c (next_baselink): Remove.
10275         (get_virtuals_named_this): Remove.
10276         (get_virtual_destructor): Remove.
10277         (tree_has_any_destructors_p): Remove.
10278         (struct gvnt_info): Remove.
10279         (check_final_overrider): Remove `virtual' from error messages.
10280         (get_matching_virtuals): Remove. Move functionality to ...
10281         (look_for_overrides): ... here, and ...
10282         (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
10283         to be overriding.
10284
10285 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
10286
10287         * typeck.c (get_delta_difference): If via a virtual base,
10288         return zero.
10289         * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
10290         adjustment.
10291
10292 2000-12-04  Richard Henderson  <rth@redhat.com>
10293
10294         * error.c (dump_tree): Use output_add_string not OB_PUTS.
10295
10296 2000-12-04  Jason Merrill  <jason@redhat.com>
10297
10298         * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
10299         (write_builtin_type): Pass intSI_type_node and the like through
10300         type_for_mode.
10301         * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
10302         Pass intSI_type_node and the like through type_for_mode.
10303         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
10304         * pt.c (tsubst, unify): Likewise.
10305         * tree.c (walk_tree): Likewise.
10306         * error.c (dump_type): Likewise.
10307         (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
10308
10309         * Make-lang.in: Tweak top comment for emacs.
10310         (cp/TAGS): Restore.
10311
10312         * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
10313
10314         * class.c (clone_function_decl): Robustify.
10315
10316 2000-12-04  Michael Matz  <matzmich@cs.tu-berlin.de>
10317
10318         * decl.c (store_bindings): Only search in the non modified
10319         old_bindings for duplicates.
10320
10321 2000-12-04  Nathan Sidwell  <nathan@codesourcery.com>
10322
10323         * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
10324         TYPE_POLYMORPHIC_P.
10325
10326         * typeck.c (build_static_cast): Remove unused variable.
10327
10328 2000-12-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10329
10330         * pt.c: Fix typo in comment.
10331
10332 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
10333
10334         * decl2.c (warn_format): Remove definition.
10335         (lang_decode_option): Handle -Wformat-nonliteral,
10336         -Wno-format-extra-args and -Wno-format-y2k.  Use set_Wformat.
10337
10338 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
10339
10340         * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
10341         (init_decl_processing): Don't create string_type_node,
10342         const_string_type_node, wint_type_node, intmax_type_node,
10343         uintmax_type_node, default_function_type, ptrdiff_type_node and
10344         unsigned_ptrdiff_type_node.  Adjust position of call to
10345         c_common_nodes_and_builtins.
10346         (identifier_global_value): New function.
10347
10348 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>
10349
10350         * call.c (standard_conversion): Reject pointer to member
10351         conversions from ambiguous, inaccessible or virtual bases.
10352         * typeck.c (build_static_cast): Don't check pointers to members
10353         specially.
10354
10355 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
10356
10357         * method.c (do_build_copy_constructor): Preserve cv
10358         qualifications when accessing source object members.
10359         (do_build_assign_ref): Likewise. Remove separate diagnostics for
10360         unnamed fields.
10361
10362 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
10363
10364         * method.c (do_build_assign_ref): Construct appropriately
10365         CV-qualified base reference. Don't allow const casts in base
10366         conversion.
10367
10368 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
10369
10370         * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
10371         incomplete return type.
10372
10373 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
10374
10375         * parse.y (base_class.1): Produce a _TYPE not a _DECL.
10376         * semantics.c (finish_base_specifier): Accept a _TYPE not a
10377         _DECL.
10378
10379 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
10380
10381         * spew.c (yyerror): Cope if yylval.ttype is NULL.
10382
10383 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
10384
10385         * decl.c (grokdeclarator): Diagnose undefined template contexts.
10386
10387 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
10388
10389         * decl.c (grokdeclarator): Do type access control on friend
10390         class.
10391
10392 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
10393
10394         * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
10395         bison parser ickiness.
10396         * pt.c (tsubst_friend_function): Enter namespace scope when
10397         tsubsting the function name.
10398         * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
10399
10400 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
10401
10402         * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
10403         * cvt.c (cp_convert_to_pointer): Add force parameter.
10404         Allow conversions via virtual base if forced.
10405         (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
10406         (ocp_convert): Likewise.
10407         * search.c (binfo_from_vbase): Return the virtual base's binfo.
10408         * typeck.c (get_delta_difference): Adjust handling of virtual
10409         bases.
10410
10411 2000-11-26  Mark Mitchell  <mark@codesourcery.com>
10412
10413         * tree.c (struct list_hash): Remove.
10414         (list_hash_table): Make it be an htab.
10415         (struct list_proxy): New type.
10416         (list_hash_eq): New function.
10417         (list_hash_pieces): Renamed from ...
10418         (list_hash): ... this.
10419         (list_hash_lookup): Remove.
10420         (list_hash_add): Remove.
10421         (hash_tree_cons): Use the generic hashtable.
10422         (mark_list_hash): Remove.
10423         (init_tree): Create the hashtable.
10424
10425 2000-11-25  Joseph S. Myers  <jsm28@cam.ac.uk>
10426
10427         * method.c (build_mangled_C9x_name): Rename to
10428         build_mangled_C99_name.  Change C9X references in comments to
10429         refer to C99.
10430
10431 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
10432
10433         * parse.y (unary_expr): Move VA_ARG from here ...
10434         (primary): ... to here.
10435
10436 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
10437
10438         * semantics.c (finish_id_expr): If type is error_mark, return
10439         error_mark.
10440
10441 2000-11-23  Nathan Sidwell  <nathan@codesourcery.com>
10442
10443         * pt.c (lookup_template_class): Simplify loop exit constructs.
10444         Cope when there is no partial instantiation of a template
10445         template member.
10446
10447 Thu Nov 23 02:16:47 2000  J"orn Rennecke <amylaar@redhat.com>
10448
10449         * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
10450
10451 2000-11-22  Mark Mitchell  <mark@codesourcery.com>
10452
10453         * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
10454         prefix.
10455
10456         * pt.c (do_decl_instantiate): Explicitly clone constructors and
10457         destructors that haven't already been cloned.
10458
10459 2000-11-20  Richard Henderson  <rth@redhat.com>
10460
10461         * parse.y (yyparse_1): Rename the parser entry point.
10462
10463 2000-11-20  Alex Samuel  <samuel@codesourcery.com>
10464
10465         * mangle.c (write_name): Use <unscoped-name> for names directly in
10466         function scope.
10467         (write_unscoped_name): Accept names directly in function scope.
10468
10469 2000-11-20  Nathan Sidwell  <nathan@codesourcery.com>
10470
10471         * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
10472         * parse.y (extdef): Add EXPORT reduction.
10473         * spew.c (yylex): Don't skip export here.
10474
10475 2000-11-19  Mark Mitchell  <mark@codesourcery.com>
10476
10477         * decl.c (init_decl_processing): Correct name of pure virtual
10478         function under the new ABI.
10479         * rtti.c (throw_bad_cast): Likewise, for bad cast function.
10480         (throw_bad_typeid): Likewise for bad typeid function.
10481
10482 2000-11-18  Mark Mitchell  <mark@codesourcery.com>
10483
10484         * decl.c (grokparms): Don't even function types of `void' type,
10485         either.
10486         * mangle.c (write_type): Don't crash when confronted with the
10487         error_mark_node.
10488
10489         * decl.c (grokparms): Don't create parameters of `void' type.
10490
10491 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
10492
10493         * lex.c (mark_impl_file_chain): Delete.
10494         (init_parse): Remove call to ggc_add_string_root.  No need to
10495         ggc_strdup a string constant.  Do not add impl_file_chain to GC
10496         roots.
10497         (handle_pragma_implementation): No need to ggc_strdup main_filename.
10498
10499 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
10500
10501         * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
10502
10503 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
10504
10505         * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
10506         * decl.c (grokdeclarator): Don't reject void parms here.
10507         (require_complete_types_for_parms): Simplify, use
10508         complete_type_or_else.
10509         (grokparms): Remove bitrot. Remove funcdef parm.
10510         Deal with ellipsis parm lists here.
10511         * semantics.c (finish_parmlist): Don't append void_list_node
10512         here. Set PARMLIST_ELLIPSIS_P.
10513
10514 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
10515
10516         * typeck2.c (incomplete_type_error): Reorganize to avoid
10517         excessive diagnostics.
10518
10519 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
10520
10521         * lex.c (struct impl_files, internal_filename): Constify a char *.
10522
10523 2000-11-16  Mark Mitchell  <mark@codesourcery.com>
10524
10525         * mangle.c (write_special_name_constructor): Don't generate
10526         assembler junk when confronted with an old-style constructor.
10527         (write_special_name_destructor): Likewise.
10528         (mangle_decl_string): Do it here instead.
10529
10530 2000-11-16  Nathan Sidwell  <nathan@codesourcery.com>
10531
10532         * call.c (op_error): Make error messages clearer.
10533
10534 2000-11-15  Mark Mitchell  <mark@codesourcery.com>
10535
10536         * decl.c (wrapup_globals_for_namespace): Don't mark things
10537         TREE_ASM_WRITTEN when they're not.
10538
10539 2000-11-15  Jason Merrill  <jason@redhat.com>
10540
10541         * typeck2.c (friendly_abort): Uncount the error before handing
10542         off to fancy_abort.
10543
10544 2000-11-15  Nathan Sidwell  <nathan@codesourcery.com>
10545
10546         * typeck.c (lookup_anon_field): Cope with qv qualifiers.
10547
10548 2000-11-14  Mark Mitchell  <mark@codesourcery.com>
10549
10550         * class.c (build_vtbl_initializer): Fix typo in comment.
10551         * typeck.c (expr_sizeof): Don't crash on errors.
10552
10553 2000-11-14  Jim Wilson  <wilson@redhat.com>
10554
10555         * lang-specs.h: Add %2 after %(cc1_options).
10556
10557 2000-11-14  Richard Henderson  <rth@redhat.com>
10558
10559         * typeck.c (c_sizeof): Be strict about casting result value
10560         back to c_size_type_node.
10561         (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
10562
10563 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
10564
10565         * typeck.c (build_unary_op): Use boolean_increment from
10566         c-common.c, moving the relevant code there.
10567
10568 2000-11-11  Jason Merrill  <jason@redhat.com>
10569
10570         * typeck.c (mark_addressable): Don't call put_var_into_stack.
10571
10572         * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
10573         in inlines.
10574
10575 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10576
10577         * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
10578         * lex.c (copy_lang_decl): Likewise.
10579
10580 2000-11-09  Mark Mitchell  <mark@codesourcery.com>
10581
10582         * dump.c (cp_dump_tree): Don't dump function bodies here.
10583
10584         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
10585         (dump.o): Update dependency list.
10586         * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
10587         (flag_dump_translation_unit): Likewise.
10588         (CP_TYPE_QUALS): Adjust definition.
10589         (DECL_C_BIT_FIELD): Remove.
10590         (SET_DECL_C_BIT_FIELD): Likewise.
10591         (CLEAR_DECL_C_BIT_FIELD): Likewise.
10592         (add_maybe_template): Likewise.
10593         (strip_array_types): Likewise.
10594         (dump_node_to_file): Likewise.
10595         (cp_dump_tree): New function.
10596         * decl.c (init_decl_processing): Set lang_dump_tree.
10597         * decl2.c (flag_dump_translation_unit): Remove.
10598         * dump.c: Move most of it to ../c-dump.c.
10599         (cp_dump_tree): New function.
10600         * pt.c (add_maybe_template): Remove.
10601         * typeck.c (strip_array_types): Likewise.
10602
10603 2000-11-07  Eric Christopher  <echristo@redhat.com>
10604
10605         * decl.c (init_decl_processing): Change definition of
10606         __wchar_t to wchar_t.  Remove artificial declaration of
10607         wchar_t.
10608         * lex.c: Change instances of __wchar_t to wchar_t.
10609
10610 2000-11-09  Nathan Sidwell  <nathan@codesourcery.com>
10611
10612         * lex.c (do_identifier): Don't lookup_name for operators.
10613         * parse.y (operator): Save looking_for_typename.
10614         (unoperator): Restore it.
10615         * spew.c (frob_opname): Use nth_token for lookahead.
10616
10617 2000-11-08  Nathan Sidwell  <nathan@codesourcery.com>
10618
10619         * decl.c (grok_op_properties): Always use coerce_new_type and
10620         coerce_delete_type.
10621         * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
10622         exception specification. Tidy up.
10623         (coerce_delete_type): Preserve exception specification. Tidy up.
10624
10625 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
10626
10627         * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
10628         (push_binding_level), error.c (cp_tree_printer), pt.c
10629         (process_partial_specialization, tsubst_template_arg_vector),
10630         search.c (lookup_member): Use memset () instead of bzero ().
10631
10632 2000-11-07  Nathan Sidwell  <nathan@codesourcery.com>
10633
10634         * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
10635
10636 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
10637
10638         * Make-lang.in (c++.distdir): Remove.
10639
10640 2000-11-04  Mark Mitchell  <mark@codesourcery.com>
10641
10642         * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
10643         declarations from different namespaces to be combined.
10644
10645 2000-11-03  Zack Weinberg  <zack@wolery.stanford.edu>
10646
10647         * decl.c: Include tm_p.h.
10648
10649 2000-11-03  Joseph S. Myers  <jsm28@cam.ac.uk>
10650
10651         * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
10652
10653 2000-11-02  Joseph S. Myers  <jsm28@cam.ac.uk>
10654
10655         * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
10656         (build_overload_value), repo.c (open_repo_file), xref.c
10657         (open_xref_file): Use strchr () and strrchr () instead of index ()
10658         and rindex ().
10659
10660 2000-11-01  Bernd Schmidt  <bernds@redhat.co.uk>
10661
10662         * call.c (build_over_call): Call fold on the CALL_EXPR.
10663
10664 2000-11-01  Gabriel Dos Reis  <gdr@codesourcery.com>
10665
10666         * error.c (dump_template_decl): Separate template hearders with
10667         space not comma.
10668
10669 2000-10-31  Gabriel Dos Reis  <gdr@codesourcery.com>
10670
10671         * error.c: Move TFF_ macros into cp-tree.h.  Throughout, replace
10672         TS_* flags with corresponding TFF_*.  Adjust prototypes of
10673         functions (which used to take a tree_string_flags) to take an int.
10674
10675         * cp-tree.h (enum tree_string_flags): Remove
10676         (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
10677         TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
10678         TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
10679         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
10680         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
10681         TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
10682         (type_as_string, decl_as_string, expr_as_string,
10683         context_as_string): Adjust prototype.
10684
10685         * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
10686         instead of TS_PLAIN.
10687
10688         * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
10689         instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
10690         plain `0'.
10691
10692 2000-10-30  Mark Mitchell  <mark@codesourcery.com>
10693
10694         * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
10695         (linkage_kind): New enumeration.
10696         (decl_linkage): New function.
10697         * decl2.c (comdat_linkage): Extend comment.
10698         * error.c (dump_function_decl): Print the arguments used to
10699         instantiate a template, even when not printing the type of the
10700         function.
10701         * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
10702         not TREE_PUBLIC, to test for external linkage.
10703         * tree.c (decl_linkage): New function.
10704
10705 2000-10-28  Mark Mitchell  <mark@codesourcery.com>
10706
10707         * pt.c (instantiate_decl): Always instantiate static data members
10708         initialized in-class.
10709
10710 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
10711
10712         * Make-lang.in: Move all build rules here from Makefile.in,
10713         adapt to new context.  Wrap all rules that change the current
10714         directory in parentheses.  Expunge all references to $(P).
10715         When one command depends on another and they're run all at
10716         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
10717         all object-file generation rules.  Delete obsolete variables.
10718
10719         * Makefile.in: Delete.
10720         * config-lang.in: Delete outputs= line.
10721
10722 2000-10-26  Gabriel Dos Reis  <gdr@codesourcery.com>
10723
10724         * error.c (dump_function_decl): Print no space between
10725         `ptr-operator' the `type-specifier' of the return type.
10726         (dump_type_prefix): Make sure we put space at the appropriate
10727         place.
10728
10729 2000-10-23  Jason Merrill  <jason@redhat.com>
10730
10731         * call.c (equal_functions): Also call decls_match for extern "C" fns.
10732
10733 2000-10-22  Jason Merrill  <jason@redhat.com>
10734
10735         * call.c (build_conditional_expr): Use ocp_convert to force
10736         rvalue conversion.
10737
10738 2000-10-22  Mark Mitchell  <mark@codesourcery.com>
10739
10740         * call.c (standard_conversion): Use RVALUE_CONVs for all
10741         expressions that satisfy lvalue_p, not just those that satisfy
10742         real_lvalue_p.
10743
10744         * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
10745
10746         * typeck.c (c_sizeof): Return an expression of `size_t' type,
10747         not one with TYPE_IS_SIZETYPE set.
10748         (dubious_conversion_warnings): Remove special-case code.
10749
10750 2000-10-21  Geoffrey Keating  <geoffk@cygnus.com>
10751
10752         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
10753         * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
10754         (dump_type_prefix): Print vector-of-int as 'int vector'.
10755         (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
10756         * tree.c (walk_tree): Handle VECTOR_TYPE.
10757
10758         * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
10759
10760 2000-10-21  Jason Merrill  <jason@redhat.com>
10761
10762         * parse.y (operator): Set got_object from got_scope.
10763         Set looking_for_typename.
10764         * decl.c (lookup_name_real): Clear val after setting from_obj.
10765         Reorganize diagnostic.
10766
10767 2000-10-20  Jason Merrill  <jason@redhat.com>
10768
10769         * tree.c (walk_tree): Don't walk into default args.
10770
10771         * error.c (dump_expr): Use host_integerp.
10772
10773 2000-10-20  David Edelsohn  <edelsohn@gnu.org>
10774
10775         * typeck2.c (abstract_virtuals_error): Use "because" instead of
10776         "since" in error message.
10777
10778 Fri Oct 20 13:54:59 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10779
10780         * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
10781
10782 2000-10-20  Jeffrey Oldham  <oldham@codesourcery.com>
10783
10784         * decl.c (revert_static_member_fn): Fixed typo.
10785
10786 2000-10-19  Mark Mitchell  <mark@codesourcery.com>
10787
10788         * class.c (subobject_offset_fn): New type.
10789         (dfs_record_base_offsets): Remove.
10790         (record_base_offsets): Likewise.
10791         (dfs_search_base_offsets): Likewise.
10792         (record_subobject_offset): New function.
10793         (check_subobject_offset): Likewise.
10794         (walk_subobject_offsets): Likewise.
10795         (record_subobject_offsets): Likewise.
10796         (layout_conflict_p): Reimplement.
10797         (layout_nonempty_base_or_field): Correct handling of type
10798         conflicts during layout.
10799         (layout_empty_base): Likewise.
10800         (build_base_field): Adjust to handle new representation of empty
10801         base offset table.
10802         (build_base_fields): Likewise.
10803         (layout_virtual_bases): Likewise.
10804         (splay_tree_compare_integer_csts): New function.
10805         (layout_class_type): Use a splay_tree, rather than a varray, to
10806         represent the offsets of empty bases.
10807
10808         * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
10809         * decl.c (select_decl): Don't return declarations that are
10810         DECL_ANTICIPATED.
10811
10812 2000-10-18  Mark Mitchell  <mark@codesourcery.com>
10813
10814         * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
10815         (fake_std_node): New macro.
10816         * decl.c (in_std): Rename to ...
10817         (in_fake_std): ... this.
10818         (flag_no_builtin): Remove.
10819         (flag_no_nonansi_builtin): Likewise.
10820         (walk_namespaces_r): Use fake_std_node.
10821         (push_namespace): Use std_identifier.
10822         (pop_namespace): Use in_fake_std.
10823         (lookup_name_real): Use fake_std_node.
10824         (init_decl_processing): When -fhonor-std, create the `std'
10825         namespace.  Don't create a dummy fake_std_node in that case.
10826         Adjust call to c_common_nodes_and_builtins.  Use std_identifier.
10827         (builtin_function): Put builtins whose names don't begin
10828         with `_' in the std namespace.
10829         * decl2.c (flag_no_builtin): Remove.
10830         (flag_no_nonansi_builtin): Likewise.
10831         (set_decl_namespace): Use fake_std_node.
10832         (validate_nonmember_using_decl): Likewise.
10833         (do_using_directive): Likewise.
10834         (handle_class_head): Likewise.
10835         * dump.c (dequeue_and_dump): Likewise.
10836         * except.c (init_exception_processing): Use std_identifier.
10837         * init.c (build_member_call): Use fake_std_node.
10838         * rtti.c (init_rtti_processing): Use std_identifier.
10839
10840 2000-10-17  Mark Mitchell  <mark@codesourcery.com>
10841
10842         * cp-tree.h (back_end_hook): Remove declaration.
10843         * decl2.c (back_end_hook): Remove definition.
10844
10845         * dump.c (dequeue_and_dump): Dump TREE_USED.
10846
10847 Tue Oct 17 20:19:06 2000  Brad Lucier <lucier@math.purdue.edu>
10848
10849         * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
10850
10851 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
10852
10853         * decl.c (WINT_TYPE): Define.
10854         (init_decl_processing): Create types unsigned_ptrdiff_type_node,
10855         c_size_type_node, signed_size_type_node and wint_type_node.
10856
10857 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
10858
10859         * decl2.c (warn_missing_format_attribute): New variable.
10860         (lang_decode_option): Decode -Wmissing-format-attribute.
10861
10862 2000-10-16  Mark Mitchell  <mark@codesourcery.com>
10863
10864         * typeck.c (qualify_type): Remove.
10865         (composite_pointer_type): Fix handling of conversions to `cv void*'.
10866
10867 2000-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10868
10869         * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
10870
10871 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10872
10873         * Makefile.in (parse.c, parse.h): Create atomically.
10874
10875 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
10876
10877         * class.c (current_obstack): Remove.
10878         * decl.c (ggc_p): Remove.
10879         (start_decl): Don't use decl_tree_cons.
10880         (grokdeclarator): Don't use build_decl_list.
10881         (start_function): Don't use decl_tree_cons.
10882         (finish_function): Don't mess with obstacks.
10883         * decl2.c (grok_x_components): Don't use build_decl_list.
10884         * lex.c (make_call_declarator): Don't call decl_tree_cons.
10885         (implicitly_declare_fn): Don't call build_decl_list.
10886         * parse.y (frob_specs): Don't call build_decl_list or
10887         decl_tree_cons.
10888         (expr_or_declarator_intern): Don't call decl_tree_cons.
10889         (primary): Don't call build_decl_list.
10890         (fcast_or_absdcl): Likewise.
10891         (typed_declspecs): Don't call decl_tree_cons.
10892         (reserved_declspecs): Don't call build_decl_list.
10893         (declmods): Likewise.
10894         (reserved_typespecquals): Likewise.
10895         (aggr): Likewise.
10896         (new_type_id): Likewise.
10897         (cv_qualifiers): Likewise.
10898         (after_type_declarator_intern): Likewise.
10899         (notype_declarator_intern): Likewise.
10900         (absdcl_intern): Likewise.
10901         (named_parm): Likewise.
10902         * pt.c (most_specialized_class): Likewise.
10903         * repo.c (temporary_obstack): Make it a structure, not a pointer.
10904         (init_repo): Initialize it.
10905         * search.c (current_obstack): Remove.
10906         * typeck2.c (add_exception_specifier): Don't call build_decl_list.
10907
10908 2000-10-09  Richard Henderson  <rth@cygnus.com>
10909
10910         * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
10911         (c++ language support bits for libgcc): Remove.
10912         (c++.clean): Remove cplib2.txt cleanup.
10913         * config-lang.in (headers, lib2funcs): Remove.
10914
10915         * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
10916         * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
10917         * inc/cxxabi.h, inc/exception, inc/new: Remove files.
10918         * inc/new.h, inc/typeinfo: Remove files.
10919
10920 2000-10-08  Joseph S. Myers  <jsm28@cam.ac.uk>
10921
10922         * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
10923         defined.
10924         (init_decl_processing): Initialize intmax_type_node and
10925         uintmax_type_node.
10926
10927 2000-10-06  Richard Henderson  <rth@cygnus.com>
10928
10929         * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
10930         (original_result_rtx): Remove.
10931         * decl.c (save_function_data): Don't clear x_result_rtx.
10932         (mark_lang_function): Don't mark it either.
10933         * expr.c (fixup_result_decl): Remove.
10934         * semantics.c (genrtl_named_return_value): Frob the return decl
10935         before calling emit_local_var.
10936         (genrtl_finish_function): Don't call fixup_result_decl.
10937         Always emit the jump to return_label.
10938
10939 2000-10-06  Nathan Sidwell  <nathan@codesourcery.com>
10940
10941         * pt.c (lookup_template_class): Set current access for enum.
10942         (tsubst_enum): Set file & line for enum decl.
10943
10944         * spew.c (yylex): Remove unused variable.
10945
10946 2000-10-05  Richard Henderson  <rth@cygnus.com>
10947
10948         * semantics.c (genrtl_finish_function): Don't init or check
10949         can_reach_end; remove noreturn and return value checks.
10950
10951 2000-10-05  Tom Tromey  <tromey@cygnus.com>
10952
10953         * init.c (build_java_class_ref): Use `build_static_name' with a
10954         suffix, not a prefix, to build the class object's name.
10955
10956 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
10957
10958         * cp-tree.h (access_kind): Fix comment typo.
10959         * decl2.c (grokfield): Fix diagnostic typo.
10960         * semantics.c (finish_template_type): Fix comment typo.
10961         (finish_qualified_object_call_expr): Likewise.
10962
10963 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
10964
10965         * pt.c (tsubst_expr, DECL_STMT case): Don't process if
10966         tsubsting fails.
10967
10968 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
10969
10970         * spew.c (frob_id): New static function.
10971         (frob_opname): Use it.
10972         (yylex): Use it.
10973
10974 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
10975
10976         * decl.c (lang_mark_false_label_stack): Remove.
10977         * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
10978
10979 2000-09-30  Joseph S. Myers  <jsm28@cam.ac.uk>
10980
10981         * gxxint.texi: Use @email for formatting email addresses.
10982
10983 2000-09-29  Gabriel Dos Reis  <gdr@codesourcery.com>
10984
10985         * error.c: Remove direct obstack manipulation.  Replace with
10986         output_buffer-based formatting.  Adjust calls to removed macros.
10987         (obstack_chunk_alloc, obstack_chunk_free): Remove.
10988         (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
10989         OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
10990
10991 2000-09-24  Mark Mitchell  <mark@codesourcery.com>
10992
10993         * ir.texi: Move to ../c-tree.texi.
10994
10995 2000-09-20  Jason Merrill  <jason@redhat.com>
10996
10997         * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
10998
10999 2000-09-21  Andreas Jaeger  <aj@suse.de>
11000
11001         * errfn.c: Move declaration of cp_printer and cp_printers to ...
11002         * cp-tree.h: ... here.
11003
11004         * error.c: Remove declaration of cp_printer.
11005
11006 2000-09-20  Mark Mitchell  <mark@codesourcery.com>
11007
11008         * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
11009
11010 2000-09-20  Hans-Peter Nilsson  <hp@axis.com>
11011
11012         * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
11013         users.
11014
11015 2000-09-18  Mark Mitchell  <mark@codesourcery.com>
11016
11017         * decl.c (start_function): Robustify.
11018
11019 2000-09-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11020
11021         * cp-tree.h (check_function_format): Accept a `status' parameter.
11022
11023         * call.c, typeck.c: Updates calls to `check_function_format'.
11024
11025 2000-09-17  Geoffrey Keating  <geoffk@cygnus.com>
11026
11027         * decl2.c (handle_class_head): Always push some scope even
11028         in the error case.
11029
11030 2000-09-16  Mark Mitchell  <mark@codesourcery.com>
11031
11032         * cp-tree.h (struct cp_language_function): Remove
11033         x_scope_stmt_stack and name_declared.
11034         (current_scope_stmt_stack): Remove.
11035         (function_name_declared_p): New macro.
11036         (struct lang_decl_flags): Use c_lang_decl as a base class.
11037         (context): Remove.
11038         (struct lang_decl): Replace saved_tree with context.
11039         (DECL_FRIEND_CONTEXT): Adjust accordingly.
11040         (SET_DECL_FRIEND_CONTEXT): Likewise.
11041         (DECL_VIRTUAL_CONTEXT): Likewise.
11042         (DECL_SAVED_TREE): Remove.
11043         (C_DECLARED_LABEL_FLAG): Likewise.
11044         (cplus_expand_expr_stmt): Don't declare.
11045         (add_decl_stmt): Likewise.
11046         (add_scope_stmt): Likewise.
11047         * decl.c (mark_stmt_tree): Remove.
11048         (case_compare): Likewise.
11049         (finish_case_label): Use c_add_case_label.
11050         (init_decl_processing): Set more language-specific hooks.
11051         (build_enumerator): Fix typo in comment.
11052         (cplus_expand_expr_stmt): Remove.
11053         (mark_lang_function): Use mark_c_language_function.
11054         (lang_mark_tree): Use c_mark_lang_decl.
11055         * decl2.c: Change order of inclusion.
11056         * except.c: Likewise.
11057         * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR.  Fall
11058         back on c_expand_expr.
11059         * friend.c: Include expr.h.
11060         * init.c: Change order of inclusion.
11061         * Makefile.in: Update dependencies.
11062         * lex.h (free_lang_decl_chain): Remove.
11063         * optimize.c (maybe_clone_body): Use function_name_declared_p.
11064         * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
11065         it doesn't exist.
11066         (instantiate_decl): Use function_name_declared_p.
11067         * semantics.c (lang_expand_expr_stmt): Remove.
11068         (set_current_function_name_declared): Likewise.
11069         (current_function_name_declared): Likewise.
11070         (begin_compound_stmt): Use function_name_declared_p.
11071         (add_decl_stmt): Remove.
11072         (setup_vtbl_ptr): Use function_name_declared_p.
11073         (add_scope_stmt): Remove.
11074         (current_scope_stmt_stack): New function.
11075         (cp_expand_stmt): Don't handle SCOPE_STMTs.
11076         (expand_body): Use function_name_declared_p.
11077         * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
11078         * typeck.c: Change order of includes.
11079         (convert_sequence): Remove.
11080
11081 2000-09-14  Joseph S. Myers  <jsm28@cam.ac.uk>
11082
11083         * lex.c (reswords): Add _Complex.
11084
11085 Thu Sep 14 12:10:45 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11086
11087         * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
11088
11089 2000-09-13  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
11090
11091         * init.c (begin_init_stmts): Don't use // comments.
11092
11093 2000-09-12  Jason Merrill  <jason@redhat.com>
11094
11095         * decl.c (maybe_deduce_size_from_array_init): Set do_default for
11096         all non-extern arrays.
11097
11098         * decl.c (grokdeclarator): Complain about 'friend T' for implicit
11099         typenames, too.  Downgrade complaint to pedwarn.
11100         (xref_tag): Warn about surprising behavior of 'friend struct T'.
11101         * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
11102         'class This::Inherited'.
11103
11104 2000-09-12  Mark Mitchell  <mark@codesourcery.com>
11105
11106         * decl.c (finish_case_label): Given the LABEL_DECL a
11107         DECL_CONTEXT.
11108
11109 2000-09-12  Gabriel Dos Reis  <gdr@codesourcery.com>
11110
11111         * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
11112         TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
11113         TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
11114         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
11115         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
11116         New macros.
11117         (sorry_for_unsupported_tree, print_scope_operator,
11118         print_left_paren, print_right_paren, print_left_bracket,
11119         print_right_bracket, print_whitespace): Likewise.
11120         (aggr_variety): Rename to class_key_or_enum.
11121         (print_type): Rename to print_type_id.
11122         (print_type_specifier_seq, print_simple_type_specifier,
11123         print_elaborated_type_specifier,
11124         print_rest_of_abstract_declarator,
11125         print_parameter_declaration_clause, print_exception_specification,
11126         print_nested_name_specifier, print_template_id,
11127         typedef_original_name,  print_template_argument_list_start,
11128         print_template_argument_list_end): New functions.
11129
11130 2000-09-11  Gabriel Dos Reis  <gdr@codesourcery.com>
11131
11132         * ir.texi: Add more documentation.
11133
11134 2000-09-11  Mark Mitchell  <mark@codesourcery.com>
11135
11136         * cp-tree.h (struct saved_scope): Remove x_function_parms.
11137         (current_function_parms): Don't define.
11138         (struct cp_language_function): Remove parms_stored.
11139         (current_function_just_assigned_this): Don't define.
11140         (current_function_parms_stored): Likewise.
11141         (static_ctors): Declare.
11142         (static_dtors): Likewise.
11143         (SF_EXPAND): Don't define.
11144         (expand_start_early_try_stmts): Remove declaration.
11145         (store_parm_decls): Likewise.
11146         * decl.c (static_ctors): Don't declare.
11147         (static_dtors): Likewise.
11148         (struct binding_level): Remove this_block.
11149         (poplevel): Remove dead code.
11150         (set_block): Likewise.
11151         (mark_binding_level): Don't mark this_block.
11152         (mark_saved_scope): Don't mark x_function_parms.
11153         (init_decl_processing): Don't add current_function_parms as a GC
11154         root.
11155         (check_function_type): Change prototype.
11156         (start_function): Remove RTL-generation code.
11157         (expand_start_early_try_stmts): Remove.
11158         (store_parm_decls): Give it internal linkage.  Remove
11159         RTL-generation code.
11160         (finish_function): Remove RTL-generation code.
11161         * decl2.c (static_ctors): Fix formatting.
11162         (static_dtors): Likewise.
11163         * method.c (use_thunk): Don't call store_parm_decls.
11164         (synthesize_method): Likewise.
11165         * optimize.c (maybe_clone_body): Likewise.
11166         * parse.y (fn.def2): Likewise.
11167         (.set_base_init): Likewise.
11168         (nodecls): Likewise.
11169         * pt.c (instantiate_decl): Likewise.
11170         * rtti.c (synthesize_tinfo_fn): Likewise.
11171         * semantics.c (genrtl_try_block): Simplify.
11172         (expand_body): Use genrtl_start_function and
11173         genrtl_finish_function.
11174         (genrtl_start_function): New function.
11175         (genrtl_finish_function): Likewise.
11176
11177 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
11178
11179         * error.c (cp_tree_printer, case 'P'): Append break.
11180
11181 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
11182
11183         * cp-tree.h (frob_opname): Declare.
11184         * parse.y (saved_scopes): New static variable.
11185         (cp_parse_init): Adjust.
11186         (do_id): If lastiddecl is NULL, do do_identifier.
11187         (operator): Save scope information.
11188         (unoperator): New reduction. Restore scope information.
11189         (operator_name): Append unoperator. Call frob_opname.
11190         * spew.c (frob_opname): Define.
11191
11192 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
11193
11194         * decl.c, rtti.c: Include defaults.h if not already included.
11195         Don't define the *_TYPE_SIZE macros.
11196
11197 2000-09-09  Mark Mitchell  <mark@codesourcery.com>
11198
11199         * cp-tree.h (push_switch): Change prototype.
11200         (check_cp_case_value): Remove declaration.
11201         (decl_constant_value): Likewise.
11202         * decl.c (struct cp_switch): Add switch_stmt and cases.
11203         (case_compare): New function.
11204         (push_switch): Set switch_stmt.  Initialize cases.
11205         (pop_switch): Clean up cases.
11206         (define_case_label): Rename to ...
11207         (finish_case_label): ... this.  Do semantic analysis for case
11208         labels here.
11209         (start_function): Correct comment.
11210         * decl2.c (check_cp_case_value): Remove.
11211         * expr.c (do_case): Remove.
11212         * pt.c (tsubst_expr): Adjust call to finish_case_label.
11213         * semantics.c (genrtl_do_poplevel): Remove declaration.
11214         (RECHAIN_STMTS): Remove.
11215         (finish_break_stmt): Use build_break_stmt.
11216         (finish_continue_stmt): Use build_continue_stmt.
11217         (finish_switch_cond): Adjust condition here, rater than in
11218         c_expand_start_case.
11219         (finish_case_label): Remove.
11220         * typeck.c (c_expand_return): Remove.
11221         (c_expand_start_case): Likewise.
11222
11223 2000-09-07  Gabriel Dos Reis  <gdr@codesourcery.com>
11224
11225         * ir.texi: Document type nodes.
11226
11227 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
11228
11229         * cp-tree.h (init_cp_semantics): Declare.
11230         (genrtl_try_block): Don't declare.
11231         (genrtl_handler): Likewise.
11232         (genrtl_catch_block): Likewise.
11233         (genrtl_ctor_stmt): Likewise.
11234         (genrtl_subobject): Likewise.
11235         (genrtl_do_poplevel): Likewise.
11236         (genrtl_named_return_value): Likewise.
11237         * lex.c (init_parse): Call init_cp_semantics.
11238         * semantics.c (genrtl_try_block): Give it internal linkage.
11239         (genrtl_handler): Likewise.
11240         (genrtl_catch_block): Likewise.
11241         (genrtl_ctor_stmt): Likewise.
11242         (genrtl_subobject): Likewise.
11243         (genrtl_do_poplevel): Likewise.
11244         (genrtl_named_return_value): Likewise.
11245         (lang_expand_stmt): Rename to ...
11246         (cp_expand_stmt): ... this.  Only handle C++-specific nodes.
11247         (init_cp_semantics): Define.
11248
11249         * decl.c (initialize_local_var): Remove RTL-generating code.
11250         * semantics.c (genrtl_try_block): Fix formatting.
11251
11252         Move statement-tree facilities from C++ to C front-end.
11253         * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
11254         (void_zero_node): Remove.
11255         (stmt_tree): Likewise.
11256         (scope_chain): Adjust.
11257         (language_function): Rename to cp_language_function.
11258         (cp_function_chain): Adjust.
11259         (current_stmt_tree): Remove.
11260         (last_tree): Likewise.
11261         (last_expr_type): Likewise.
11262         (struct lang_decl): Adjust.
11263         (STMT_IS_FULL_EXPR_P): Remove.
11264         (add_tree): Remove.
11265         (begin_stmt_tree): Likewise.
11266         (finish_stmt_tree): Likewise.
11267         (walk_tree_fn): Likewise.
11268         (walk_stmt_tree): Likewise.
11269         * class.c (finish_struct): Replace use of add_tree with add_stmt.
11270         * decl.c (mark_stmt_tree): Adjust type.
11271         (init_decl_processing): Don't build void_zero_node.
11272         (initialize_local_var): Adjust usage of current_stmt_tree.
11273         (finish_enum): Use add_stmt, not add_tree.
11274         (save_function_data): Adjust use of language_function.
11275         (finish_constructor_body): Use add_stmt, not add_tree.
11276         (finish_destructor_body): Likewise.
11277         (push_cp_function_context): Adjust use of language_function.
11278         (pop_cp_function_context): Likewise.
11279         (mark_lang_function): Likewise.
11280         (mark_cp_function_context): Likewise.
11281         * init.c (build_aggr_init): Adjust use of current_stmt_tree.
11282         (build_vec_init): Likewise.
11283         * semantics.c (SET_LAST_STMT): Remove.
11284         (RECHAIN_STMTS): Don't use it.
11285         (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
11286         (current_stmt_tree): Define.
11287         (add_tree): Remove.
11288         (finish_goto_stmt): Use add_stmt, not add_tree.
11289         (finish_expr_stmt): Likewise.
11290         (begin_if_stmt): Likewise.
11291         (finish_then_clause): Likewise.
11292         (begin_while_stmt): Likewise.
11293         (begin_do_stmt): Likewise.
11294         (finish_return_stmt): Likewise.
11295         (begin_for_stmt): Likewise.
11296         (finish_break_stmt): Likewise.
11297         (finish_continue_stmt): Likewise.
11298         (begin_switch_stmt): Likewise.
11299         (finish_case_label): Likewise.
11300         (begin_try_block): Likewise.
11301         (begin_function_try_block): Likewise.
11302         (begin_handler): Likewise.
11303         (begin_catch_block): Likewise.
11304         (begin_compound_stmt): Likewise.
11305         (begin_asm_stmt): Likewise.
11306         (finish_asm_stmt): Likewise.
11307         (finish_label_stmt): Likewise.
11308         (add_decl_stmt): Likewise.
11309         (finish_subobject): Likewise.
11310         (finish_decl_cleanup): Likewise.
11311         (finish_named_return_value): Likewise.
11312         (setup_vtbl_ptr): Likewise.
11313         (add_scope_stmt): Likewise.
11314         (finish_stmt_expr): Likewise.
11315         (prune_unused_decls): Remove.
11316         (begin_stmt_tree): Likewise.
11317         (finish_stmt_tree): Likewise.
11318         (prep_stmt): Adjust use of current_stmt_tree.
11319         (lang_expand_stmt): Likewise.
11320         * tree.c (statement_code_p): Remove.
11321         (cp_statement_code_p): New function.
11322         (walk_stmt_tree): Remove.
11323         (init_tree): Set lang_statement_code_p.
11324
11325 2000-09-06  Zack Weinberg  <zack@wolery.cumb.org>
11326
11327         Integrated preprocessor.
11328
11329         * Make-lang.in, Makefile.in: Remove all references to input.c,
11330         gxx.gperf, and hash.h.  Add ../c-lex.o to C_OBJS.
11331         * gxx.gperf, hash.h, input.c: Delete.
11332         * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
11333         initialized properly.
11334
11335         * class.c (fixup_pending_inline): Take a tree, not a
11336         struct pending_inline *.  All callers changed.
11337         (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
11338         RID_PROTECTED entries in ridpointers[] array here.
11339         * decl.c (duplicate_decls): Do not refer to struct
11340         pending_inline.
11341         (record_builtin_type, init_decl_processing): Use RID_MAX not
11342         CP_RID_MAX.
11343         (grokdeclarator): Use C_IS_RESERVED_WORD.
11344         * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
11345         cpplib.
11346         (grok_x_components): Do not inspect pending_inlines chain.
11347
11348         * cp-tree.h (struct lang_identifier): Add rid_code entry.
11349         (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
11350         (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
11351         (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
11352         TIME_IDENTIFIER_FILEINFO): Kill.
11353         Update prototypes.
11354         * lex.h: Expunge cp_rid.  Rewrite RIDBIT macros to use just a
11355         single 32-bit word.
11356         * parse.y: Call do_pending_inlines unconditionally.
11357         reinit_parse_for_method is now snarf_method.  fn.defpen is no
11358         longer necessary.  Remove unnecessary <itype> annotation on
11359         SCOPE.  Do not refer to end_of_file or struct pending_inline.
11360         * semantics.c (begin_inline_definitions): Call
11361         do_pending_inlines unconditionally.
11362
11363         * lex.c: Remove all code now shared with C front end.
11364         Initialize cpplib properly if USE_CPPLIB.  Put reserved words
11365         into the get_identifier table.  Rewrite pragma handling to
11366         work with the registry.  Move code to save tokens for later
11367         processing to spew.c.
11368
11369         * spew.c: Rewrite everything in terms of token streams instead
11370         of text.  Move routines here from lex.c / input.c as
11371         appropriate.  GC-mark trees hanging off the pending inlines
11372         chain.
11373
11374 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
11375
11376         * NEWS: Mention that the named return value extension has been
11377         deprecated.
11378         * cp-tree.h (original_result_rtx): Define.
11379         (TREE_REFERENCE_EXPR): Remove.
11380         (DECL_VPARENT): Likewise.
11381         (pushdecl_nonclass_level): Likewise.
11382         (store_return_init): Likewise.
11383         (reinit_lang_specific): Likewise.
11384         (genrtl_named_return_value): Change prototype.
11385         * decl.c (original_result_rtx): Remove.
11386         (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
11387         Do not generate RTL for local variables here.
11388         (store_return_init): Remove.
11389         * semantics.c (genrtl_named_return_value): Simplify.  Fold in
11390         store_return_init.
11391         (finish_named_return_value): Adjust accordingly.  Warn that this
11392         extension is deprecated.
11393         (lang_expand_stmt): Adjust call to genrtl_named_return_value.
11394
11395 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
11396
11397         * pt.c (type_unification_real): Replace switch with if.
11398         (unify): Tsubst non-type parms before comparing.
11399
11400 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
11401
11402         * error.c (dump_typename): New function, broken out of ...
11403         (dump_type): ... here. Use it.
11404         * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
11405
11406 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
11407
11408         * init.c (build_offset_ref): Deal with namespace scoped
11409         TEMPLATE_ID_EXPRs.
11410
11411 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
11412
11413         * class.c (resolve_address_of_overloaded_function): Add
11414         explanation message.
11415         * decl.c (define_case_label): Reformat explanation.
11416         * decl2.c (finish_static_data_member_decl): Likewise.
11417         (grokfield): Likewise.
11418         * friend.c (do_friend): Likewise.
11419
11420 2000-09-05  Zack Weinberg  <zack@wolery.cumb.org>
11421
11422         * tree.c (walk_tree): Expose tail recursion.
11423         (walk_stmt_tree): New function.
11424         * cp-tree.h: Prototype walk_stmt_tree.
11425         * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
11426         the BLOCKs directly.  If a BLOCK has no variables after
11427         pruning, discard it.
11428         (finish_stmt_tree): Use walk_stmt_tree.  No need to save and
11429         restore the line number.
11430
11431 2000-09-05  Mark Mitchell  <mark@codesourcery.com>
11432
11433         * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
11434         (pt.o): Remove dependency on HTAB_H.
11435         * cp-tree.h: Include hashtab.h.
11436         (walk_tree): Change prototype.
11437         (walk_tree_without_duplicates): New function.
11438         * decl.c (check_default_argument): Use it.
11439         * optimize.c (remap_decl): Adjust calls to walk_tree.
11440         (copy_body): Likewise.
11441         (expand_calls_inline): Likewise.
11442         (calls_setjmp_p): Use walk_tree_without_duplicates.
11443         * pt.c: Don't include hashtab.h.
11444         (for_each_template_parm): Use walk_tree_without_duplicates.
11445         * semantics.c (finish-stmt_tree): Likewise.
11446         (expand_body): Likewise.
11447         * tree.c (walk_tree): Add additional parameter.
11448         (walk_tree_without_duplicates): New function.
11449         (count_trees): Use it.
11450         (verify_stmt_tree): Adjust call to walk_tree.
11451         (find_tree): Use walk_tree_without_duplicates.
11452         (no_linkage_check): Likewise.
11453         (break_out_target_exprs): Adjust call to walk_tree.
11454         (cp_unsave): Likewise.
11455
11456 2000-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11457
11458         * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
11459         (TEMPLATE_TEMPLATE_PARM): Adjust comment.
11460         * cp-tree.h (TYPE_BINFO): Adjust comment.
11461         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
11462         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
11463         (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
11464         (TYPE_TEMPLATE_INFO): Likewise.
11465         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
11466         * class.c (push_nested_class): Likewise.
11467         * decl.c (lookup_name_real): Likewise.
11468         (grokdeclarator): Likewise.
11469         (grok_op_properties): Likewise.
11470         (xref_tag): Likewise.
11471         (xref_basetypes): Likewise.
11472         * decl2.c (constructor_name_full): Likewise.
11473         (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
11474         (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
11475         * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
11476         (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
11477         (dump_type_suffix): Likewise.
11478         * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
11479         instead.
11480         (get_aggr_from_typedef): Likewise.
11481         * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
11482         (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
11483         (write_template_parm): Likewise.
11484         (write_template_template_parm): Check tree code instead of
11485         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
11486         * method.c (build_overload_nested_name): Add
11487         BOUND_TEMPLATE_TEMPLATE_PARM.
11488         (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
11489         * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
11490         * pt.c (convert_template_argument): Check tree code instead of
11491         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
11492         (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
11493         (for_each_template_parm): Adjust comment.
11494         (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.
11495         (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
11496         (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.  Use
11497         template_args_equal to compare template template parameter cases.
11498         * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
11499         * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
11500         instead.
11501         * tree.c (copy_template_template_parm): Decide whether to create
11502         a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
11503         (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
11504         (copy_tree_r): Likewise.
11505         * typeck.c (comptypes): Likewise.  Check tree code instead of
11506         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
11507
11508 2000-09-04  Mark Elbrecht  <snowball3@bigfoot.com>
11509
11510         * decl.c (finish_function): Move the code for handling functions
11511         marked with the constructor and destructor attributes inside the
11512         expand_p block.
11513
11514 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
11515
11516         * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
11517
11518 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
11519
11520         * pt.c (lookup_template_class): Remove abort.
11521         * tree.c (get_type_decl): Allow error_mark_node.
11522
11523 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
11524
11525         * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
11526         TEMPLATE_ID_EXPRs.
11527
11528 2000-09-03  Mark Mitchell  <mark@codesourcery.com>
11529
11530         * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
11531         new ABI mangling.
11532
11533 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
11534
11535         * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
11536         union tag mismatch error reporting.
11537
11538 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
11539
11540         * call.c (build_scoped_method_call): Check it is not a namespace.
11541
11542 2000-08-30  Jason Merrill  <jason@redhat.com>
11543
11544         * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
11545
11546         * tree.c (bot_manip): Check TREE_CONSTANT rather than
11547         !TREE_SIDE_EFFECTS.  Call break_out_target_exprs and
11548         build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
11549
11550         * decl.c (start_function): Always call make_function_rtl.
11551
11552 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
11553
11554         * semantics.c (prune_unused_decls): New function.
11555         (finish_stmt_tree): Call it via walk_tree.
11556
11557 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
11558
11559         * class.c (build_secondary_vtable): Constify a char *.
11560         * decl.c (init_decl_processing): Initialize function_id_node,
11561         pretty_function_id_node, and func_id_node.
11562         * input.c (struct input_source): Constify 'str'.
11563         (feed_input): Constify first argument.
11564         * mangle.c (write_identifier): Constify argument.
11565         * pt.c (mangle_class_name_for_template): Constify argument.
11566
11567 2000-08-29  Mark Mitchell  <mark@codesourcery.com>
11568
11569         * typeck.c (mark_addressable): Remove code that pokes around in
11570         RTL.
11571
11572 2000-08-28  Jason Merrill  <jason@redhat.com>
11573
11574         * lex.c (file_name_nondirectory): Move to toplev.c.
11575
11576         * cp-tree.h (LOCAL_CLASS_P): New macro.
11577         * class.c (finish_struct_1): Use it.
11578
11579 2000-08-27  Alex Samuel  <samuel@codesourcery.com>
11580
11581         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
11582         (write_encoding): Pass another argument to write_name.
11583         (write_name): Add ignore_local_scope parameter.  Fix handling of
11584         local names.
11585         (write_nested_name): Use write_unqualified_name.
11586         (write_prefix): Likewise.  Skip out on FUNCTION_DECLs.
11587         (write_template_prefix): Use write_unqualified_name.
11588         (write_component): Remove.
11589         (write_local_name): Add parameter.  Use direct local entity to
11590         discriminator calculation.
11591         (write_class_enum_type): Pass another argument to write_name.
11592         (write_template_template_arg): Likewise.
11593         (make_guard_variable): Likewise.
11594
11595 2000-08-27  Jason Merrill  <jason@redhat.com>
11596
11597         * decl.c (pushdecl): Matching decls for local externs are found in
11598         the current level.  Propagate linkage information from previous
11599         declarations.
11600
11601 2000-08-26  Gabriel Dos Reis  <gdr@codesourcery.com>
11602
11603         * ir.texi (Expressions): Fix typo.
11604
11605 2000-08-25  Greg McGary  <greg@mcgary.org>
11606
11607         * tree.c (init_tree): Use ARRAY_SIZE.
11608
11609 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
11610
11611         * error.c (cp_tree_printer): Rework.
11612
11613 2000-08-25  Mark Mitchell  <mark@codesourcery.com>
11614
11615         * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
11616         dyn-string.o.
11617         (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
11618         (cp-demangle.o): Remove target.
11619         (dyn-string.o): Likewise.
11620
11621         * decl.c (grokfndecl): Require that `main' return an `int'.
11622         * mangle.c (write_encoding): Don't mangle return types for
11623         conversion functions.
11624
11625 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
11626
11627         * error.c (tree_formatting_info): New data type.
11628         (tree_being_formatted): New macro.
11629         (tree_formatting_flags): Likewise.
11630         (put_whitespace): Likewise.
11631         (print_tree_identifier): Likewise.
11632         (print_identifier): Likewise.
11633         (cp_tree_printer, print_function_argument_list, print_declaration,
11634         print_expression, print_function_declaration,
11635         print_function_parameter, print_type, print_cv_qualifier): New
11636         functions.
11637         (init_error): Initialize lang_printer.
11638
11639 2000-08-24  Jason Merrill  <jason@redhat.com>
11640
11641         * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
11642         adjustment necessary.
11643
11644 2000-08-24  Greg McGary  <greg@mcgary.org>
11645
11646         * cp-tree.h (MAIN_NAME_P): Remove macro.
11647
11648 2000-08-24  Gabriel Dos Reis  <gdr@codesourcery.com>
11649
11650         * error.c (print_instantiation_context): Don't forget to flush the
11651         buffer.
11652
11653 2000-08-23  Jason Merrill  <jason@redhat.com>
11654
11655         * typeck.c (build_ptrmemfunc): Save the input pmf.
11656
11657         * method.c (process_modifiers): Use same_type_p.
11658
11659 2000-08-23  Mark Mitchell  <mark@codesourcery.com>
11660
11661         * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
11662         * mangle.c (write_function_type): Change prototype.
11663         (write_encoding): Don't mangle return types for
11664         constructors or destructors.
11665         (write_type): Adjust call to write_function_type.
11666         * pt.c (instantiate_template): Instantiate alternate entry points
11667         when instantiating the main function.
11668
11669 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
11670
11671         * error.c (cp_print_error_function): Don't use embedded '\n' in
11672         output_printf.
11673
11674 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
11675
11676         * decl.c (init_decl_processing): Remove bogus initialization.
11677         * error.c (lang_print_error_function): Restore here.
11678         (init_error): Initialize print_error_function.
11679
11680 2000-08-22  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
11681
11682         * decl2.c (arg_assoc): Revert my 2000-08-11 change.
11683
11684 2000-08-22  Gabriel Dos Reis  <gdr@codesourcery.com>
11685
11686         * Makefile.in (error.o): Depends on diagnostic.h
11687
11688         * cp-tree.h (problematic_instantiation_changed,
11689         record_last_problematic_instantiation, current_instantiation,
11690         print_instantiation_context): Declare.
11691         (maybe_print_template_context): Remove.
11692
11693         * decl.c (init_decl_processing): Set print_error_function to NULL.
11694         (lang_print_error_function): Remove, since we're using a new
11695         machinery.
11696
11697         * error.c: #include diagnostic.h
11698         (function_category): New function.
11699         (cp_diagnostic_starter): Likewise.
11700         (cp_diagnostic_finalizer): Likewise.
11701         (cp_print_error_function): Likewise.
11702         (maybe_print_instantiation_context): Likewise.
11703         (print_instantiation_full_context): Likewise.
11704         (print_instantiation_partial_context): Likewise.
11705         (print_instantiation_context): Define.
11706         (init_error): Initialize diagnostic pager and finalizer.
11707
11708         * pt.c (problematic_instantiation_changed): Define.
11709         (record_last_problematic_instantiation): Likewise.
11710         (current_instantiation): Likewise.
11711         (maybe_print_template_context): Remove.
11712         (print_template_context): Likewise.
11713         (current_tinst_level): Make static to reflect Brendan Kehoe's
11714         change of 1995-04-13.
11715         (push_tinst_level): Call print_instantiation_context.
11716
11717 2000-08-21  Nix  <nix@esperi.demon.co.uk>
11718
11719         * lang-specs.h: Do not process -o or run the assembler if
11720         -fsyntax-only.
11721
11722 2000-08-21  Joseph S. Myers  <jsm28@cam.ac.uk>
11723
11724         * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
11725         variables.
11726         * decl2.c (lang_decode_option): Disable gettext attributes for
11727         -ansi.
11728
11729 2000-08-21  Gabriel Dos Reis  <gdr@codesourcery.com>
11730
11731         * lex.c (lang_init_options): Default diagnostic message maximum
11732         length to 80, when line-wrapping.
11733
11734 2000-08-20  Mark Mitchell  <mark@codesourcery.com>
11735
11736         * class.c (build_vtbl_initializer): Clear the entire
11737         vtbl_init_data.  Start keeping track of the functions for which we
11738         have created vcall offsets here.
11739         (dfs_build_vcall_offset_vtbl_entries): Remove.
11740         (build_vcall_offset_vtbl_entries): Reimplement.
11741         (add_vcall_offset_vtbl_entries_r): New function.
11742         (add_vcall_offset_vtbl_entries_1): Likewise.  Tweak logic for
11743         computing when vcall offsets are necessary.
11744
11745 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
11746
11747         * decl.c (member_function_or_else): Use cp_error ... %T.
11748         (grokdeclarator): Likewise.
11749         (start_method): Likewise.
11750         * friend.c (make_friend_class): Use cp_pedwarn ... %T.
11751
11752 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
11753
11754         * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
11755         TYPE_DECLs.
11756
11757 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
11758
11759         * cp-tree.h (PTRMEM_OK_P): New macro.
11760         (itf_ptrmem_ok): New enumeration value.
11761         * class.c (resolve_address_of_overloaded_function): Add PTRMEM
11762         argument. Diagnose implicit pointer to member.
11763         (instantiate_type): Don't diagnose implicit pointer to member
11764         here. Pass itf_ptrmem_ok if ok. Adjust calls to
11765         resolve_address_of_overloaded_function.
11766         * init.c (build_offset_ref): Set PTRMEM_OK_P.
11767         (resolve_offset_ref): Don't diagnose implicit pointer to member here.
11768         * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
11769         * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
11770         (build_unary_op): Deal with single non-static member in
11771         microsoft-land.
11772
11773 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
11774
11775         * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
11776
11777 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
11778
11779         * cp-tree.h (enum_name_string): Remove prototype.
11780         (report_case_error): Remove prototype.
11781         * cp/typeck2.c (enum_name_string): Remove.
11782         (report_case_error): Remove.
11783         * error.c (dump_expr): Deal with enum values directly.
11784         Correctly negate integer constant.
11785
11786 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
11787
11788         * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
11789         (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
11790         * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
11791         (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
11792         (__cxa_vec_new): Use __cxa_vec_new2.
11793         (__cxa_vec_delete): Use __cxa_vec_delete2.
11794
11795 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
11796
11797         * vec.cc (__cxa_vec_new): Set "C" linkage.
11798         (__cxa_vec_ctor): Likewise.
11799         (__cxa_vec_cctor): Likewise.
11800         (__cxa_vec_dtor): Likewise.
11801         (__cxa_vec_delete): Likewise.
11802         * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
11803         (__cxa_vec_ctor): Likewise.
11804         (__cxa_vec_cctor): Likewise.
11805         (__cxa_vec_dtor): Likewise.
11806         (__cxa_vec_delete): Likewise.
11807
11808 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
11809
11810         * class.c (instantiate_type): Reinstate local variable
11811         deleted in previous change.
11812
11813         * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
11814         itf_no_attributes.
11815
11816 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
11817
11818         * cp-tree.h (instantiate_type_flags): New enumeration.
11819         (instantiate_type): Change parameter.
11820         * class.c (instantiate_type): Adjust prototype. Adjust.
11821         * call.c (standard_conversion): Adjust instantiate_type call.
11822         (reference_binding): Likewise.
11823         (build_op_delete_call): Likewise.
11824         (convert_like_real): Likewise.
11825         * cvt.c (cp_convert_to_pointer): Likewise.
11826         (convert_to_reference): Likewise.
11827         * pt.c (convert_nontype_argument): Likewise.
11828         * typeck.c (build_binary_op): Likewise.
11829         (build_ptrmemfunc): Likewise.
11830         (convert_for_assignment): Likewise.
11831
11832 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
11833
11834         * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
11835         (current_aggr): Define.
11836         * decl.c (grokdeclarator): Make sure a friend class is an
11837         elaborated type specifier.
11838         * parse.y (current_aggr): Remove static definition.
11839         (cp_parse_init): Adjust.
11840         (structsp): Clear and restore current_aggr.
11841         (component_decl_list): Clear current_aggr.
11842
11843         * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
11844         aggregate tag on the typename's context.
11845
11846         * pt.c (tsubst_friend_class): Return error_mark_node, if
11847         parms becomes NULL.
11848         (instantiate_class_template): Ignore error_mark_node friend types.
11849
11850 2000-08-14  Nathan Sidwell  <nathan@codesourcery.com>
11851
11852         * cvt.c (warn_ref_binding): New static function, broken out of ...
11853         (convert_to_reference): ... here. Use it.
11854
11855 2000-08-11  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
11856
11857         * parse.y (template_arg): Add rule for template qualified with
11858         global scope.
11859
11860 2000-08-11  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
11861
11862         * decl2.c (add_function): Reorganize.
11863         (arg_assoc): Do not consider function template decls.
11864
11865 2000-08-11  Jason Merrill  <jason@redhat.com>
11866
11867         * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
11868         looking inside.
11869
11870 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
11871
11872         * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
11873         (lookup_nested_tag): Likewise.
11874
11875         * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
11876         can be produced.
11877
11878 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
11879
11880         * parse.y (named_complex_class_head_sans_basetype): Remove
11881         always true if.
11882
11883 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
11884
11885         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
11886         explicit TEMPLATE_ID_EXPR args.
11887         (build_expr_from_tree, case CALL_EXPR): Likewise.
11888
11889 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
11890
11891         * decl.c (check_tag_decl): Diagnose typename's which don't
11892         declare anything.
11893
11894 2000-08-10  Nathan Sidwell  <nathan@codesourcery.com>
11895
11896         * init.c (build_aggr_init): Reject bogus array initializers
11897         early.
11898
11899 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
11900
11901         * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
11902         runtime.
11903         * cp/tinfo.cc (__dynamic_cast): Likewise.
11904         * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
11905
11906 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
11907
11908         * cvt.c (convert_to_pointer_force): Fix error message when
11909         attempting to cast from ambiguous base.
11910
11911 2000-08-08  Jason Merrill  <jason@redhat.com>
11912
11913         * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
11914         (tsubst_template_arg_vector): Likewise.
11915
11916         * decl2.c (build_anon_union_vars): Choose the largest field; don't
11917         assume that one will be as large as the union.
11918
11919 2000-08-07  Kazu Hirata  <kazu@hxi.com>
11920
11921         * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
11922         * decl.c (pop_labels): Likewise.
11923
11924 2000-08-04  Jeffrey Oldham  <oldham@codesourcery.com>
11925
11926         * inc/cxxabi.h (__pbase_type_info): Changed member names to match
11927         specifications.
11928         (__pointer_to_member_type_info): Likewise.
11929         (__base_class_info): Likewise.
11930         (__class_type_info): Likewise.
11931         (__si_class_type_info): Likewise.
11932         (__vmi_class_type_info): Likewise.
11933         * tinfo.cc (__si_class_type_info::__do_find_public_src):
11934         Changed member names to match specifications.
11935         (__vmi_class_type_info::__do_find_public_src): Likewise.
11936         (__si_class_type_info::__do_dyncast): Likewise.
11937         (__vmi_class_type_info::__do_dyncast): Likewise.
11938         (__si_class_type_info::__do_upcast): Likewise.
11939         (__vmi_class_type_info::__do_upcast): Likewise.
11940         * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
11941         (__pbase_type_info::__pointer_catch): Likewise.
11942         (__pointer_type_info::__pointer_catch): Likewise.
11943         (__pointer_to_member_type_info::__pointer_catch): Likewise.
11944
11945 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
11946
11947         * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
11948         * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
11949         (cc1plus): Link with $(BACKEND) and $(C_OBJS).
11950
11951 2000-08-04  Mark Mitchell  <mark@codesourcery.com>
11952
11953         * cp-tree.h (add_method): Change prototype.
11954         * class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
11955         Don't double the size of the method vector in the error case.
11956         (handle_using_decl): Adjust call to add_method.
11957         (add_implicitly_declared_members): Likewise.
11958         (clone_function_decl): Likewise.
11959         * decl2.c (check_classfn): Likewise.
11960         * semantics.c (finish_member_declaration): Likewise.
11961
11962 2000-08-04  Joseph S. Myers  <jsm28@cam.ac.uk>
11963
11964         * decl.c (flag_isoc94): New variable.
11965
11966 2000-08-02  Jason Merrill  <jason@redhat.com>
11967
11968         * pt.c (do_type_instantiation): Add complain parm; don't complain
11969         if called recursively.
11970         * cp-tree.h, parse.y: Adjust.
11971
11972 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
11973
11974         * decl2.c: Silently ignore -Wstrict-prototypes; warn about
11975         -Wno-strict-prototypes.
11976
11977         * g++spec.c: Adjust type of second argument to
11978         lang_specific_driver, and update code as necessary.
11979
11980         * cp-tree.h: Don't prototype min_precision here.
11981         (my_friendly_assert): Cast expression to void.
11982         * semantics.c (do_poplevel): Initialize scope_stmts.
11983
11984 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
11985
11986         * cp-tree.h (DECL_NEEDED_P): Tweak.
11987
11988 2000-07-28  Jason Merrill  <jason@redhat.com>
11989
11990         * lang-specs.h: Use %i in rule for .ii files.
11991
11992 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
11993
11994         * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
11995
11996 2000-07-30  Mark Mitchell  <mark@codesourcery.com>
11997
11998         Allow indirect primary bases.
11999         * cp-tree.h (struct lang_type): Remove vfield_parent.  Add
12000         primary_base.
12001         (CLASSTYPE_VFIELD_PARENT): Remove.
12002         (CLASSTYPE_PRIMARY_BINFO): Reimplement.
12003         (BINFO_PRIMARY_BINFO): Remove.
12004         (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
12005         (BINFO_VBASE_PRIMARY_P): Likewise.
12006         (BINFO_PRIMARY_BASE_OF): New macro.
12007         (BINFO_INDIRECT_PRIMARY_P): Likewise.
12008         (get_primary_binfo): New function.
12009         * decl.c (lang_mark_tree): Make lang_type::primary_base.
12010         * class.c (vcall_offset_data_s): Rename to ...
12011         (vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
12012         and add ctor_vtbl_p.
12013         (get_derived_offset): Use get_primary_binfo.
12014         (dfs_mark_primary_bases): Adjust handling of virtual primary
12015         bases.
12016         (mark_primary_bases): Likewise.
12017         (set_primary_base): Take a binfo, not an integer, as a
12018         representation of the primary base.
12019         (indirect_primary_base_p): Remove.
12020         (determine_primary_base): Adjust for indirect primary bases.
12021         (dfs_find_final_overrider): Fix typo in coment.
12022         (update_vtable_entry_for_fn): Use get_primary_binfo.
12023         (layout_nonempty_base_or_field): Tweak.
12024         (build_base_fields): Adjust for new primary base semantics.
12025         (dfs_propagate_binfo_offsets): Remove.
12026         (propagate_binfo_offsets): Rewrite.
12027         (dfs_set_offset_for_shared_vbases): Remove.
12028         (layout_virtual_bases): Don't use it.
12029         (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
12030         ABI.
12031         (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
12032         CLASSTYPE_VFIELD_PARENT.
12033         (dfs_get_primary_binfo): New function.
12034         (get_primary_binfo): Likewise.
12035         (dump_class_hierarchy_r): Tweak printing of primary bases.
12036         (build_vtbl_initializer): Fix typo in comments.  Use
12037         vtbl_init_data.
12038         (build_vcall_and_vbase_vtbl_entries): Likewise.
12039         (build_vbaes_offset_vtbl_entries): Likewise.
12040         (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
12041         BV_VCALL_INDEX to handle indirect primary bases.
12042         (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
12043         (build_rtti_vtbl_entries): Likewise.
12044         * search.c (get_shared_vbase_if_not_primary): Tweak.
12045         (find_vbase_instance): Likewise.
12046         (binfo_for_vtable): Simplify.
12047         * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
12048         (make_binfo): Make it have 11 entries.
12049
12050 2000-07-30  Alex Samuel  <samuel@codesourcery.com>
12051
12052         * mangle.c (DECL_TEMPLATE_ID_P): Remove.
12053         (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
12054         ascertaining primaryness.
12055         (G): Remove template_args.
12056         (decl_is_template_id): New function.
12057         (write_encoding): Use decl_is_template_id.
12058         (write_name): Likewise.  Handle type_decls.  Get main variant of
12059         type decls.
12060         (write_nested_name): Likewise.
12061         (write_prefix): Likewise.
12062         (write_template_prefix): Likewise.
12063         (write_special_name_constructor): Remove defunct production from
12064         comment.
12065         (write_bare_function_type): Remove comment about absent parameter.
12066         (write_template_template_arg): Add missing grammar production to
12067         comment.
12068
12069 2000-07-27  Jason Merrill  <jason@redhat.com>
12070
12071         * decl.c (duplicate_decls): If common_type produces a non-typedef
12072         type for a typedef, just use the old type.
12073
12074 2000-07-27  Mark Mitchell  <mark@codesourcery.com>
12075
12076         * cp-tree.h (function_depth): Declare.
12077         (verify_stmt_tree): Likewise.
12078         (find_tree): Likewise.
12079         * decl.c (function_depth): Give it external linkage.
12080         * optimize.c (optimize_function): Increment and decrement it.
12081         * tree.c (verify_stmt_tree_r): New function.
12082         (verify_stmt_tree): Likewise.
12083         (find_tree_r): Likewise.
12084         (find_tree): Likewise.
12085
12086 2000-07-27  Jason Merrill  <jason@redhat.com>
12087
12088         * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
12089         TYPE_PTRMEMFUNC_P.
12090         * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
12091
12092 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
12093
12094         * decl.c (start_cleanup_fn): Mark the function as `inline'.
12095         * decl2.c (get_guard): Call cp_finish_decl, not
12096         rest_of_decl_compilation, for local guards.
12097         * lex.c (do_identifier): Remove unused variable.
12098
12099 Wed Jul 26 15:05:51 CEST 2000   Marc Espie <espie@cvs.openbsd.org>
12100
12101         * parse.y:  Add missing ';'.
12102
12103 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
12104
12105         * parse.y (empty_parms): Use `()', not `(...)', when in the scope
12106         of `extern "C++"'.
12107
12108 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
12109
12110         Kill strict_prototype. Backwards compatibility only for
12111         non NO_IMPLICIT_EXTERN_C systems.
12112         * cp-tree.h (flag_strict_prototype): Remove.
12113         (strict_prototype): Remove.
12114         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
12115         * decl.c (maybe_push_to_top_level): Adjust.
12116         (pop_from_top_level): Adjust.
12117         (decls_match): Only allow sloppy parm matching for ancient
12118         system headers.
12119         (init_decl_processing): Adjust.
12120         (grokdeclarator): Adjust.
12121         * decl2.c (flag_strict_prototype): Remove.
12122         (strict_prototype): Remove.
12123         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
12124         (lang_f_options): Remove "strict-prototype".
12125         (unsupported-options): Add "strict-prototype".
12126         * lex.c (do_identifier): Adjust.
12127         (do_scoped_id): Adjust.
12128         * parse.y (empty_parms): Adjust.
12129         * class.c (push_lang_context): Adjust.
12130         (pop_lang_context): Adjust.
12131         * typeck.c (comp_target_parms): Adjust.
12132
12133 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
12134
12135         * decl.c (poplevel): Deal with anonymous variables at for scope.
12136         (maybe_inject_for_scope_var): Likewise.
12137
12138 2000-07-25  Zack Weinberg  <zack@wolery.cumb.org>
12139
12140         * decl.c: Remove all signal handling code, now done in toplev.c.
12141
12142 2000-07-23  Mark Mitchell  <mark@codesourcery.com>
12143
12144         * decl.c (make_rtl_for_nonlocal_decl): Rework.
12145
12146         * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
12147         correctly.
12148
12149 2000-07-20  Zack Weinberg  <zack@wolery.cumb.org>
12150
12151         * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
12152         Define my_friendly_assert and my_friendly_abort as macros
12153         which may call friendly_abort.  Prototype friendly abort, not
12154         my_friendly_abort or my_friendly_assert.
12155         * decl.c (signal_catch): Report the signal caught in the error
12156         message.  Call fatal directly.
12157         * typeck2.c (ack, my_friendly_assert): Delete.
12158         (my_friendly_abort): Rename to friendly_abort.  Expect file,
12159         line, and function parameters.  Report the abort code, then
12160         call fancy_abort.  Do not mask an abort if errors have
12161         already occurred.
12162
12163 2000-07-18  Nathan Sidwell  <nathan@codesourcery.com>
12164
12165         * typeck.c (comp_target_parms): Remove obsolete parameter.
12166         (comp_target_types): Adjust.
12167
12168 2000-07-17  Jason Merrill  <jason@redhat.com>
12169
12170         * typeck.c (mark_addressable): Never set TREE_USED.
12171         * call.c (build_call): Don't abort on calls to library functions
12172         that have been declared normally.
12173
12174         * typeck.c (build_binary_op): Fix grammar in warning.
12175
12176         * exception.cc (__eh_free): Fix prototype.
12177
12178         * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
12179
12180         * decl.c (pushdecl): Handle seeing an OVERLOAD in
12181         IDENTIFIER_NAMESPACE_VALUE.
12182
12183 2000-07-16  Mark Mitchell  <mark@codesourcery.com>
12184
12185         * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
12186         * method.c (use_thunk): Correct handling of vcall offsets.
12187
12188 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
12189
12190         * .cvsignore: parse.h and parse.c have no cp- prefix.
12191
12192 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
12193
12194         * .cvsignore: New file.
12195
12196 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
12197
12198         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
12199
12200 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
12201
12202         * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
12203         * parse.c: Remove.
12204         * parse.h: Likewise.
12205
12206 2000-07-11  Mark Mitchell  <mark@codesourcery.com>
12207
12208         * class.c (layout_class_type): Add pointers to virtual bases after
12209         base classes under the old ABI.
12210
12211 2000-07-10  Benjamin Chelf  <chelf@codesourcery.com>
12212
12213         * semantics.c (finish_for_stmt): Remove call to emit_line_note.
12214         (finish_continue_stmt): Likewise.
12215         (begin_for_stmt): Remove call to note_level_for_for.
12216         (finish_goto_stmt): Change call from build_min_nt
12217         to build_stmt.
12218         (finish_expr_stmt): Likewise.
12219         (begin_if_stmt): Likewise.
12220         (begin_while_stmt): Likewise.
12221         (finish_while_stmt): Likewise.
12222         (finish_return_stmt): Likewise.
12223         (begin_for_stmt): Likewise.
12224         (finish_for_stmt): Likewise.
12225         (finish_break_stmt): Likewise.
12226         (begin_switch_stmt): Likewise.
12227         (finish_case_label): Likewise.
12228         (genrtl_try_block): Likewise.
12229         (begin_try_block): Likewise.
12230         (begin_handler): Likewise.
12231         (begin_compound_stmt): Likewise.
12232         (finish_asm_stmt): Likewise.
12233         (finish_label_stmt): Likewise.
12234         (add_decl_stmt): Likewise.
12235         (finish_subobject): Likewise.
12236         (finish_decl_cleanup): Likewise.
12237         (finish_named_return_value): Likewise.
12238         (setup_vtbl_ptr): Likewise.
12239         (add_scope_stmt): Likewise.
12240         * decl.c (finish_constructor_body): Likewise.
12241         (finish_destructor_body): Likewise.
12242         * optimize.c (copy_body_r): Likewise.
12243         (initialize_inlined_parameters): Likewise.
12244         (declare_return_variable): Likewise.
12245         (expand_call_inline): Likewise.
12246
12247 2000-07-10  Jakub Jelinek  <jakub@redhat.com>
12248
12249         * semantics.c (expand_body): Sync interface information
12250         at the end of function body expansion.
12251
12252 2000-07-09  Jason Merrill  <jason@redhat.com>
12253
12254         * init.c (build_new_1): Bail early if the call to new fails.
12255
12256         * decl.c (compute_array_index_type): Check specifically for
12257         an INTEGER_CST, not just TREE_CONSTANT.
12258
12259         * decl.c (duplicate_decls): Don't call duplicate_decls on
12260         the DECL_TEMPLATE_RESULT.
12261         (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
12262         codes.
12263
12264         * error.c (dump_template_bindings): Don't crash if we had an
12265         invalid argument list.
12266
12267         * typeck.c (c_expand_start_case): Do narrowing here.
12268         * semantics.c (finish_switch_cond): Not here.
12269
12270 2000-07-09  Hidvegi Zoli  <hzoli@austin.ibm.com>
12271
12272         * parse.y (asm_clobbers): Do string concatenation.
12273
12274 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
12275
12276         * decl.c (pushtag): Don't put local classes in template functions
12277         on the local_classes list.
12278
12279 2000-07-04  Scott Snyder  <snyder@fnal.gov>
12280
12281         * decl2.c (get_guard): Add missing return for old ABI local
12282         variable case.
12283
12284 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
12285
12286         * cp-tree.h (char_type_p): New function.
12287         * decl.c (init_decl_processing): Don't initialize
12288         signed_wchar_type_node or unsigned_wchar_type_node.
12289         (complete_array_type): Handle brace-enclosed string-constants.
12290         * rtti.c (emit_support_tinfos): Remove #if 0'd code.
12291         * tree.c (char_type_p): New function.
12292         * typeck2.c (digest_init): Use char_type_p.
12293
12294 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
12295
12296         * pt.c (tsubst): Don't layout type, if it's error_mark.
12297
12298 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
12299
12300         * pt.c (instantiate_pending_templates): Reset template level.
12301
12302 2000-07-05  Jason Merrill  <jason@redhat.com>
12303
12304         * call.c (joust): Don't complain about `operator char *()' beating
12305         `operator const char *() const'.
12306
12307 2000-07-04  scott snyder  <snyder@fnal.gov>
12308             Jason Merrill  <jason@redhat.com>
12309
12310         * repo.c (repo_get_id): Handle the case where a class with virtual
12311         bases has a null TYPE_BINFO_VTABLE.
12312
12313 2000-07-04  Kevin Buhr  <buhr@stat.wisc.edu>
12314             Jason Merrill  <jason@redhat.com>
12315
12316         * parse.y (member_init): Just pass in the type.
12317         * init.c (expand_member_init): Handle getting a type.
12318
12319 2000-07-04  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
12320             Jason Merrill  <jason@redhat.com>
12321
12322         * decl.c (finish_function): Warn if a function has no return
12323         statement.
12324         Suggested by Andrew Koenig.
12325         * typeck.c (check_return_expr): Do set current_function_returns_value
12326         if we got an error_mark_node.
12327
12328 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
12329
12330         * decl2.c (push_decl_namespace): Push the original namespace.
12331
12332 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
12333
12334         * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
12335         * semantics.c (begin_class_definition): Clear it.
12336
12337 2000-07-02  Benjamin Chelf  <chelf@codesourcery.com>
12338
12339         * cp-tree.h (genrtl_goto_stmt): Remove declaration.
12340         (genrtl_expr_stmt): Likewise.
12341         (genrtl_decl_stmt): Likewise.
12342         (genrtl_if_stmt): Likewise.
12343         (genrtl_while_stmt): Likewise.
12344         (genrtl_do_stmt): Likewise.
12345         (genrtl_return_stmt): Likewise.
12346         (genrtl_for_stmt): Likewise.
12347         (genrtl_break_stmt): Likewise.
12348         (genrtl_continue_stmt): Likewise.
12349         (genrtl_scope_stmt): Likewise.
12350         (genrtl_switch_stmt): Likewise.
12351         (genrtl_case_label): Likewise.
12352         (genrtl_begin_compound_stmt): Likewise.
12353         (genrtl_finish_compound_stmt): Likewise.
12354         (genrtl_compound_stmt): Likewise.
12355         (genrtl_asm_stmt): Likewise.
12356
12357         * init.c (begin_init_stmts): Remove call to
12358         genrtl_begin_compound_stmt.
12359         (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
12360
12361         * semantics.c (lang_expand_stmt): Changed call to
12362         genrtl_compound_stmt to ignore return value.
12363
12364 2000-07-02  Mark Mitchell  <mark@codesourcery.com>
12365
12366         * mangle.c (canonicalize_for_substitution): Return the canonical
12367         variant of a type.
12368
12369         * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
12370         TYPE_DECL.
12371         * typeck.c (commonparms): Remove obstack manipulations.
12372
12373 2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>
12374
12375         * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
12376
12377         * Makefile.in (OBJS): Added ../c-semantics.o.
12378         (OBJDEPS): Likewise.
12379
12380         * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
12381         ../c-common.h.
12382         (struct stmt_tree): Added comment.
12383         (current_function_name_declared): Removed.
12384         (stmts_are_full_exprs_p): Likewise.
12385         (genrtl_do_pushlevel): Likewise.
12386         (genrtl_clear_out_block): Likewise.
12387         (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
12388         (DECL_ANON_UNION_ELEMS): Likewise.
12389         (emit_local_var): Likewise.
12390         (make_rtl_for_local_static): Likewise.
12391         (do_case): Likewise.
12392         (expand_stmt): Likewise.
12393         (genrtl_decl_cleanup): Likewise.
12394         (c_expand_asm_operands): Likewise.
12395         (c_expand_return): Likewise.
12396         (c_expand_start_case): Likewise.
12397
12398         * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
12399         (emit_local_var): Likewise.
12400         (initialize_local_var): Change reference to
12401         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
12402         Change reference to stmts_are_full_exprs_p to
12403         current_stmt_tree->stmts_are_full_exprs_p.
12404         (push_cp_function_context): Likewise.
12405
12406         * expect.c (expand_throw): Change reference to
12407         stmts_are_full_exprs_p.
12408
12409         * init.c (build_aggr_init): Change reference to
12410         stmts_are_full_exprs_p.
12411         (build_vec_init): Likewise.
12412
12413         * optimize.c (maybe_clone_body): Change reference to
12414         current_function_name_declared to
12415         cp_function_chain->name_declared.
12416
12417         * pt.c (instantiate_decl): Change reference to
12418         current_function_name_declared to
12419         cp_function_chain->name_declared.
12420
12421         * semantics.c (expand_cond): Moved declaration to c-common.h.
12422         (genrtl_do_pushlevel): Moved to c-semantics.c.
12423         (genrtl_clear_out_block): Likewise.
12424         (genrtl_goto_stmt): Likewise.
12425         (genrtl_expr_stmt): Likewise.
12426         (genrtl_decl_stmt): Likewise.
12427         (gerntl_if_stmt): Likewise.
12428         (genrtl_while_stmt): Likewise.
12429         (genrtl_do_stmt): Likewise.
12430         (genrtl_return_stmt): Likewise.
12431         (genrtl_for_stmt): Likewise.
12432         (genrtl_break_stmt): Likewise.
12433         (genrtl_continue_stmt): Likewise.
12434         (genrtl_scope_stmt): Likewise.
12435         (genrtl_switch_stmt): Likewise.
12436         (genrtl_case_label): Likewise.
12437         (genrtl_begin_compound_stmt): Likewise.
12438         (genrtl_finish_compound_stmt): Likewise.
12439         (genrtl_compound_stmt): Likewise.
12440         (genrtl_asm_stmt): Likewise.
12441         (genrtl_decl_cleanup): Likewise.
12442         (expand_cond): Likewise.
12443         (expand_stmt): Renamed to ...
12444         (lang_expand_stmt): ... this.
12445         (lang_expand_expr_stmt): Initialize.
12446         (set_current_function_name_declared): Likewise.
12447         (stmts_are_full_exprs_p): Likewise.
12448         (current_function_name_declared): Likewise.
12449         (anon_aggr_type_p): Likewise.
12450         (do_poplevel): Change reference to
12451         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
12452         Change reference to stmts_are_full_exprs_p to
12453         current_stmt_tree->stmts_are_full_exprs_p.
12454         (add_tree): Likewise.
12455         (finish_expr_stmt): Likewise.
12456         (prep_stmt): Likewise.
12457         (lang_expand_stmt): Likewise.
12458         (begin_compound_stmt): Change reference to
12459         current_function_name_declared to
12460         cp_function_chain->name_declared and call to
12461         current_function_name_declared().
12462         (setup_vtbl_ptr): Likewise.
12463         (genrtl_do_poplevel): Removed.
12464
12465 2000-06-30  Jason Merrill  <jason@redhat.com>
12466
12467         * init.c (init_init_processing): Go back to aligning like
12468         double_type_node for old ABI.
12469         (get_cookie_size): Make cookie larger if we get a type that needs
12470         more alignment.
12471         (build_vec_delete): Call it.
12472
12473         * typeck.c (qualify_type_recursive): New fn.
12474         (composite_pointer_type): Use it.
12475         (build_binary_op): Use composite_pointer_type.
12476
12477 2000-06-24  Carlos O'Ryan  <coryan@cs.wustl.edu>
12478             Jason Merrill  <jason@redhat.com>
12479
12480         * typeck.c (check_return_expr): Don't complain about returning
12481         NULL from operator new if -fcheck-new.
12482         * cp-tree.h: Declare flag_check_new here.
12483         * init.c: Not here.
12484
12485 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
12486
12487         * mangle.c (find_substitution): Use same_type_p.
12488         (write_encoding): Don't check for substitutions.
12489
12490 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
12491
12492         * parse.y (expr_no_comma_rangle): New non-terminal.
12493         (template_parm): Use it for default parameter case.
12494         (template_arg): Use it.
12495         (expr_no_commas): Remove commented out undefined extensions.
12496         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
12497         * parse.h, parse.c: Rebuilt.
12498
12499 2000-06-30  Mark Mitchell  <mark@codesourcery.com>
12500
12501         * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
12502         (finish_asm_stmt): Do it here, instead.
12503
12504         * cp-tree.h (ridpointers): Don't declare.
12505         * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
12506         (record_builtin_java_type): Likewise.
12507         (init_decl_processing): Likewise.
12508         * lex.c: Move inclusion of lex.h.
12509         (ridpointers): Don't define.
12510         (init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
12511         RID_MAX.
12512         * lex.h (enum rid): Rename to ...
12513         (enum cp_rid): ... this.
12514         (ridpointers): Don't declare.
12515         * parse.y: Move inclusion of lex.h.
12516         * parse.c: Regenerated.
12517         * spew.c: Move inclusion of lex.h.
12518
12519         * cp-tree.h (struct language_function): Remove temp_name_counter.
12520         (temp_name_counter): Remove.
12521         (get_temp_name): Change prototype.
12522         (get_guard): New function.
12523         (get_guard_cond): Likewise.
12524         (set_guard): Likewise.
12525         * cvt.c (build_up_reference): Adjust call to get_temp_name.
12526         * decl.c (expand_static_init): Use get_guard and friends to
12527         implement guard variables.
12528         * decl2.c (get_temp_name): Assume that the variables created are
12529         always static.
12530         (get_sentry): Rename to ...
12531         (get_guard): ... this.  Implement new ABI guard variables.
12532         (get_guard_bits): New function.
12533         (get_guard_cond): Likewise.
12534         (set_guard): Likewise.
12535         (start_static_initialization_or_destruction): Use them.
12536         (do_static_initialization): Replace sentry with guard throughout.
12537         (do_static_destruction): Likewise.
12538         * init.c (create_temporary_var): Add comment.
12539
12540 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
12541
12542         * mangle.c (find_substitution): Use same_type_p.
12543         (write_encoding): Don't check for substitutions.
12544
12545 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
12546
12547         * parse.y (expr_no_comma_rangle): New non-terminal.
12548         (template_parm): Use it for default parameter case.
12549         (template_arg): Use it.
12550         (expr_no_commas): Remove commented out undefined extensions.
12551         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
12552         * parse.h, parse.c: Rebuilt.
12553
12554 2000-06-29  Mark Mitchell  <mark@codesourcery.com>
12555
12556         * cp-tree.h (flag_const_strings): Remove.
12557         (warn_parentheses): Likewise.
12558         (warn_format): Likewise.
12559         (common_type): Likewise.
12560         (default_conversion): Likewise.
12561         (build_binary_op): Likewise.
12562         (cp_build_binary_op): New macro.
12563         * call.c (build_new_op): Use cp_build_binary_op instead of
12564         build_binary_op.
12565         * class.c (build_vtable_entry_ref): Likewise.
12566         * decl.c (expand_static_init): Likewise.
12567         (compute_array_index_type): Likewise.
12568         (build_enumerator): Likewise.
12569         * decl2.c (delete_sanity): Likewise.
12570         (start_static_initialization_or_destruction): Likewise.
12571         * error.c (dump_type_suffix): Likewise.
12572         * init.c (resolve_offset_ref): Likewise.
12573         (build_new): Likewise.
12574         (build_new_1): Likewise.
12575         (build_vec_delete_1): Likewise.
12576         (build_vec_init): Likewise.
12577         (build_delete): Likewise.
12578         * rtti.c (synthesize_tinfo_fn): Likewise.
12579         (synthesize_tinfo_var): Likewise.
12580         * search.c (expand_upcast_fixups): Likewise.
12581         (fixup_all_virtual_upcast_offsets): Likewise.
12582         * typeck.c (build_array_ref): Likewise.
12583         (get_member_function_from_ptrfunc): Likewise.
12584         (build_binary_op): Add parameter.
12585         (pointer_int_sum): Use cp_build_binary_op.
12586         (pointer_diff): Likewise.
12587         (build_modify_expr): Likewise.
12588         (get_delta_difference): Likewise.
12589         (build_ptrmemfunc): Likewise.
12590
12591 2000-06-29  Nathan Sidwell  <nathan@codesourcery.com>
12592
12593         * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
12594         * decl.c (create_implicit_typedef): Adjust.
12595         * decl2.c (build_artificial_parm): Adjust.
12596         * method.c (implicitly_declare_fn): Adjust.
12597         * pt.c (push_inline_template_parms_recursive): Adjust.
12598         (process_template_parm): Adjust.
12599         (overloaded_template_name): Adjust.
12600         * semantics.c (finish_template_template_parm): Adjust.
12601
12602 2000-06-28  Mark Mitchell  <mark@codesourcery.com>
12603
12604         * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
12605         * class.c (update_vtable_entry_for_fn): Correct logic for deciding
12606         where to emit thunks.
12607         (build_vtt): Adjust call to build_vtt_inits.
12608         (build_vtt_inits): Add parameter to indicate whether or not
12609         sub-VTTs for virtual bases should be included.  Adjust handling of
12610         construction vtables.
12611         (get_matching_base): New function.
12612         (dfs_build_vtt_inits): Rename to ...
12613         (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
12614         construction vtables.
12615         (dfs_fixup_binfo_vtbls): Likewise.
12616         (build_ctor_vtbl_groups): Build construction vtables for virtual
12617         bases, too.
12618         (accumulate_vtbl_inits): Tweak logic for deciding whether or not
12619         to build construction vtbls.
12620         (dfs_accumulate_vtbl_inits): Adjust handling of
12621         construction vtables.
12622
12623         * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
12624         types correctly.
12625
12626 2000-06-27  Mark Mitchell  <mark@codesourcery.com>
12627
12628         * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
12629
12630 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
12631
12632         * search.c (hides): Remove.
12633         (is_subobject_of_p): Add most_derived parameter. Use
12634         CANONICAL_BINFO.
12635         (lookup_field_queue_p): Adjust.
12636         (lookup_field_r): Adjust.
12637
12638 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
12639
12640         * decl2.c (handle_class_head): Bash typedefs to the type's main
12641         decl.
12642
12643 2000-06-25  Mark Mitchell  <mark@codesourcery.com>
12644
12645         * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
12646         (begin_global_stmt_expr): ... this.
12647         (genrtl_finish_stmt_expr): Rename to ...
12648         (finish_global_stmt_expr): ... this.
12649         * init.c (begin_init_stmts): Adjust calls.
12650         (finish_init_stmts): Likewise.
12651         * semantics.c (genrtl_begin_stmt_expr): Rename to ...
12652         (begin_global_stmt_expr): ... this.
12653         (genrtl_finish_stmt_expr): Rename to ...
12654         (finish_global_stmt_expr): ... this.
12655
12656 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
12657
12658         * search.c (lookup_member): Fix typo in comment.
12659
12660 2000-06-24  Jason Merrill  <jason@redhat.com>
12661
12662         * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
12663         (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
12664
12665 2000-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
12666
12667         * parse.y (complex_direct_notype_declarator): Support global_scope.
12668         * Makefile.in: Adjust conflict count.
12669
12670 2000-06-23  Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
12671
12672         * parse.y (template_arg): Convert TEMPLATE_DECL
12673         that is a template template parameter to
12674         TEMPLATE_TEMPLATE_PARM here.
12675
12676         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
12677         * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
12678         (copy_template_template_parm): Adjust prototype.
12679         * decl.c (grokdeclarator): Remove dead code.
12680         * pt.c (process_template_parm): Tidy.
12681         (lookup_template_class): Construct nodes in
12682         copy_template_template_parm.
12683         (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
12684         lookup_template_class.  Use TYPE_TI_TEMPLATE.
12685         * tree.c (copy_template_template_parm): Add NEWARGS
12686         parameter.
12687         (mapcar): Adjust call to copy_template_template_parm.
12688         * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
12689         * method.c (build_template_template_parm_names): Change error
12690         code to avoid compilation warning.
12691
12692         * gxxint.texi: Document template template parameter
12693         name mangling.
12694
12695 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
12696
12697         * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
12698         (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
12699         (cp-demangle.o): New rule.
12700         (dyn-string.o): Likewise.
12701         * inc/cxxabi.h (__cxa_demangle): New declaration.
12702
12703 2000-06-22  Mark Mitchell  <mark@codesourcery.com>
12704
12705         * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
12706         (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
12707         (lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
12708         a tree, not an int.
12709         (THUNK_GENERATE_WITH_VTABLE_P): New macro.
12710         (make_thunk): Change prototype.
12711         (emit_thunk): Rename to use_thunk.
12712         (mangle_thunk): Change prototype.
12713         * class.c (get_derived_offset): Simplify.
12714         (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
12715         BV_GENERATE_THUNK_WITH_VTABLE_P.
12716         (build_primary_vtable): Simplify.
12717         (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
12718         (dfs_find_base): Remove.
12719         (update_vtable_entry_for_fn): Correct bug in finding the base
12720         where a virtual function was first declared.  Figure out whether
12721         or not to emit a vcall-thunk with the vtables in which it appears.
12722         Correct logic for deciding whether to use an ordinary thunk, or a
12723         vcall thunk.
12724         (finish_struct_1): Remove unnecssary code.
12725         (build_vtbl_initializer): Use ssize_int for the running counter of
12726         negative indices.
12727         (build_vtbl_initializer): Only use vcall thunks where necessary.
12728         Mark thunks as needing to be emitted with their vtables, or not.
12729         (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
12730         indices.  Use size_binop.
12731         (dfs_build_vcall_offset_vtbl_entries): Don't rely on
12732         BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
12733         size_binop.
12734         (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
12735         (build_vtable_entry): Mark thunks as needing to be emitted with
12736         their vtables, or not.
12737         * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
12738         * decl2.c (mark_vtable_entries): Use use_thunk instead of
12739         emit_thunk.
12740         * dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
12741         information.
12742         * error.c (dump_expr): Use BV_FN.
12743         * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
12744         not an int.
12745         * method.c (make_thunk): Likewise.
12746         (emit_thunk): Rename to use_thunk.  Allow callers to decide
12747         whether or not to actually emit the thunk.  Adjust for changes in
12748         representation of vcall offsets.
12749         * search.c (dfs_get_pure_virtuals): Use BV_FN.
12750         * semantics.c (emit_associated_thunks): New function.
12751         (expand_body): Use it.
12752         * ir.texi: Adjust decriptions of thunks.
12753
12754 2000-06-22  Jason Merrill  <jason@redhat.com>
12755
12756         * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
12757         (tsubst_friend_function): Copy it here.
12758
12759         * decl.c (grok_op_properties): Fix typo.
12760
12761         * decl2.c (delete_sanity): Clarify warning, avoid failure on
12762         deleting void*.
12763
12764         * pt.c (check_explicit_specialization): Clarify error.
12765
12766         * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
12767         an old OVERLOAD when we're declaring a non-function.
12768         (pushdecl, destroy_local_var): Check for error_mark_node.
12769         (warn_extern_redeclared_static): Also bail early if
12770         we're a CONST_DECL.
12771         (push_overloaded_decl): Ignore an old error_mark_node.
12772
12773 2000-06-22  Nathan Sidwell  <nathan@codesourcery.com>
12774
12775         * call.c (build_x_va_arg): Check if in a template decl.
12776         * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
12777
12778 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12779
12780         * class.c (push_lang_context): TYPE_NAME gets you to the Java
12781         types DECLs.
12782         * decl.c (check_goto): Computed gotos assumed OK.
12783
12784 2000-06-20  Jason Merrill  <jason@redhat.com>
12785
12786         * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
12787         for which we don't need to look for instantiations.
12788
12789 2000-06-21  Nathan Sidwell  <nathan@codesourcery.com>
12790
12791         * parse.y (program): Always call finish_translation_unit.
12792         * parse.c, parse.h: Rebuilt.
12793
12794 2000-06-20  Zack Weinberg  <zack@wolery.cumb.org>
12795
12796         * method.c: Don't include hard-reg-set.h.
12797
12798 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
12799
12800         * rtti.c (get_base_offset): Cope when vbase field is in a base.
12801
12802 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
12803
12804         * call.c (build_conditional_expr): Use VOID_TYPE_P.
12805         * cvt.c (cp_convert_to_pointer): Likewise.
12806         (convert_to_void): Likewise.
12807         * error.c (dump_expr): Likewise.
12808         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
12809         * init.c (build_delete): Likewise.
12810         * method.c (emit_thunk): Likewise.
12811         * optmize.c (declare_return_variable): Likewise.
12812         * rtti.c (get_tinfo_decl_dynamic): Likewise.
12813         (get_typeid): Likewise.
12814         (build_dynamic_cast_1): Likewise.
12815         * typeck.c (composite_pointer_type): Likewise.
12816         (common_type): Likewise.
12817         (build_indirect_ref): Likewise.
12818         (build_binary_op): Likewise.
12819         (build_x_compound_expr): Likewise.
12820         (check_return_expr): Likewise.
12821         * typeck2.c (add_exception_specifier): Likewise.
12822
12823         * mangle.c (write_method_parms): Use direct comparison for end
12824         of parmlist.
12825
12826 2000-06-19  Benjamin Chelf  <chelf@codesourcery.com>
12827
12828         * cp-tree.h (genrtl_try_block): Declare function.
12829         (genrtl_handler): Likewise.
12830         (genrtl_catch_block): Likewise.
12831         (genrtl_ctor_stmt): Likewise.
12832         (genrtl_subobject): Likewise.
12833         (genrtl_decl_cleanup): Likewise.
12834         (genrtl_do_poplevel): Likewise.
12835         (genrtl_do_pushlevel): Likewise.
12836         (genrtl_clear_out_block): Likewise.
12837         (genrtl_goto_stmt): Likewise.
12838         (genrtl_expr_stmt): Likewise.
12839         (genrtl_decl_stmt): Likewise.
12840         (genrtl_if_stmt): Likewise.
12841         (genrtl_while_stmt): Likewise.
12842         (genrtl_do_stmt): Likewise.
12843         (genrtl_return_stmt): Likewise.
12844         (genrtl_for_stmt): Likewise.
12845         (genrtl_break_stmt): Likewise.
12846         (genrtl_continue_stmt): Likewise.
12847         (genrtl_scope_stmt): Likewise.
12848         (genrtl_switch_stmt): Likewise.
12849         (genrtl_case_label): Likewise.
12850         (genrtl_begin_compound_stmt): Likewise.
12851         (genrtl_finish_compound_stmt): Likewise.
12852         (genrtl_compound_stmt): Likewise.
12853         (genrtl_asm_stmt): Likewise.
12854         (genrtl_named_return_value): Likewise.
12855         (genrtl_begin_stmt_expr): Likewise.
12856         (genrtl_finish_stmt_expr): Likewise.
12857         (finish_for_stmt): Removed first argument.
12858         (finish_switch_stmt): Likewise.
12859
12860         * semantics.c (genrtl_try_block): Define function.
12861         (genrtl_handler): Likewise.
12862         (genrtl_catch_block): Likewise.
12863         (genrtl_ctor_stmt): Likewise.
12864         (genrtl_subobject): Likewise.
12865         (genrtl_decl_cleanup): Likewise.
12866         (genrtl_do_poplevel): Likewise.
12867         (genrtl_do_pushlevel): Likewise.
12868         (genrtl_clear_out_block): Likewise.
12869         (genrtl_goto_stmt): Likewise.
12870         (genrtl_expr_stmt): Likewise.
12871         (genrtl_decl_stmt): Likewise.
12872         (genrtl_if_stmt): Likewise.
12873         (genrtl_while_stmt): Likewise.
12874         (genrtl_do_stmt): Likewise.
12875         (genrtl_return_stmt): Likewise.
12876         (genrtl_for_stmt): Likewise.
12877         (genrtl_break_stmt): Likewise.
12878         (genrtl_continue_stmt): Likewise.
12879         (genrtl_scope_stmt): Likewise.
12880         (genrtl_switch_stmt): Likewise.
12881         (genrtl_case_label): Likewise.
12882         (genrtl_begin_compound_stmt): Likewise.
12883         (genrtl_finish_compound_stmt): Likewise.
12884         (genrtl_compound_stmt): Likewise.
12885         (genrtl_asm_stmt): Likewise.
12886         (genrtl_named_return_value): Likewise.
12887         (genrtl_begin_stmt_expr): Likewise.
12888         (genrtl_finish_stmt_expr): Likewise.
12889         (finish_for_stmt): Removed first argument and generate rtl
12890         specific code.
12891         (finish_switch_stmt): Likewise.
12892         (do_poplevel): Removed generate rtl specific code.
12893         (do_pushlevel): Likewise.
12894         (add_tree): Likewise.
12895         (finish_goto_stmt): Likewise.
12896         (finish_expr_stmt): Likewise.
12897         (begin_if_stmt): Likewise.
12898         (finish_if_stmt_cond): Likewise.
12899         (finish_then_clause): Likewise.
12900         (begin_else_clause): Likewise.
12901         (finish_else_clause): Likewise.
12902         (finish_if_stmt): Likewise.
12903         (clear_out_block): Likewise.
12904         (begin_while_stmt): Likewise.
12905         (finish_while_stmt_cond): Likewise.
12906         (finish_while_stmt): Likewise.
12907         (begin_do_stmt): Likewise.
12908         (finish_do_body): Likewise.
12909         (finish_do_stmt): Likewise.
12910         (finish_return_stmt): Likewise.
12911         (begin_for_stmt): Likewise.
12912         (finish_for_init_stmt): Likewise.
12913         (finish_for_cond): Likewise.
12914         (finish_for_expr): Likewise.
12915         (finish_break_stmt): Likewise.
12916         (finish_continue_stmt): Likewise.
12917         (begin_switch_stmt): Likewise.
12918         (finish_switch_cond): Likewise.
12919         (finish_case_label): Likewise.
12920         (begin_try_block): Likewise.
12921         (begin_function_try_block): Likewise.
12922         (finish_try_block): Likewise.
12923         (finish_cleanup_try_block): Likewise.
12924         (finish_cleanup): Likewise.
12925         (finish_function_try_block): Likewise.
12926         (finish_handler_sequence): Likewise.
12927         (finish_function_handler_sequence): Likewise.
12928         (begin_handler): Likewise.
12929         (finish_handler_parms): Likewise.
12930         (begin_catch_block): Likewise.
12931         (finish_handler): Likewise.
12932         (begin_compound_stmt): Likewise.
12933         (finish_compound_stmt): Likewise.
12934         (finish_asm_stmt): Likewise.
12935         (finish_label_stmt): Likewise.
12936         (finish_label_decl): Likewise.
12937         (finish_subobject): Likewise.
12938         (finish_decl_cleanup): Likewise.
12939         (finish_named_return_value): Likewise.
12940         (begin_stmt_expr): Likewise.
12941         (finish_stmt_expr): Likewise.
12942
12943         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
12944         to call genrtl_expr_stmt when appropriate.
12945
12946         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
12947         begin_compound_expr to call genrtl_begin_stmt_expr and
12948         genrtl_begin_compound_expr when appropriate.
12949         (finish_init_stmts): Changed calls to finish_compound_expr and
12950         finish_stmt_expr to call genrtl_finish_compound_expr and
12951         genrtl_finish_stmt_expr when appropriate.
12952         (expand_default_init): Changed call to finish_expr_stmt to call
12953         genrtl_expr_stmt when appropriate.
12954         (build_vec_init): Likewise.
12955
12956         * parse.y (simple_stmt): Removed first argument from call to
12957         finish_for_stmt. Removed first argument from call to
12958         finish_switch_stmt.
12959
12960         * parse.c: Regenerated.
12961
12962         * pt.c (tsubst_expr): Removed first argument from call to
12963         finish_for_stmt. Removed first argument from call to
12964         finish_switch_stmt.
12965
12966 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
12967
12968         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
12969         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
12970
12971         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
12972         (cplus_tree_code_length[]): Likewise.
12973         (cplus_tree_code_name[]): Likewise.
12974         (init_parse): Added call to add_c_tree_codes. Changed
12975         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
12976
12977 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
12978
12979         * cp-tree.h (finish_mem_initializers): Declare.
12980         (count_trees): Likewise.
12981         * parse.y (base_init): Use finish_mem_initializers.
12982         * semantics.c (finish_mem_initializers): New function.
12983
12984         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
12985         the number of trees.
12986         (n_trees): Remove.
12987         (count_trees): Don't use it.
12988
12989 2000-06-15  Jason Merrill  <jason@redhat.com>
12990
12991         * tree.c (count_trees): New debugging function.
12992
12993         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
12994         * init.c (build_member_call): Pull out the name of a DECL.
12995
12996         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
12997         * semantics.c (expand_body): Push to TV_INTEGRATION here.
12998         * optimize.c (optimize_function): Not here.
12999         * pt.c (instantiate_decl): Push to TV_PARSE.
13000
13001 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
13002
13003         * cp-tree.h (struct language_function): Remove x_base_init_list
13004         and x_member_init_list.
13005         (current_base_init_list): Remove.
13006         (current_member_init_list): Likewise.
13007         (setup_vtbl_ptr): Change prototype.
13008         (emit_base_init): Likewise.
13009         (expand_member_init): Likewise.
13010         (reinit_parse_for_function): Remove.
13011         * decl.c (save_function_data): Don't clear x_base_init_list and
13012         x_member_init_list.
13013         (mark_language_function): Don't mark them.
13014         * init.c (perform_member_init): Tweak comment.
13015         (sort_member_init): Take the list of initializers as an argument.
13016         (sort_base_init): Likewise.
13017         (emit_base_init): Likewise.
13018         (expand_member_init): Return the initializer.  Don't use global
13019         variables.
13020         * lex.c (reinit_parse_for_function): Remove.
13021         * method.c (build_template_parm_names): Correct substitution.
13022         (do_build_copy_constructor): Don't use current_member_init_list
13023         and current_base_init_list.
13024         (synthesize_method): Likewise.
13025         * parse.y (base_init): Split mem-initializers into
13026         base-initializers and field-initializers.
13027         (member_init_list): Build up the list here.
13028         (member_init): Return the initializer.
13029         (fn.depfn): Don't use reinit_parse_for_function.
13030         * parse.c: Regenerated.
13031         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
13032         ERROR_MARK.
13033         (tsubst_expr): Don't use current_member_init_list
13034         and current_base_init_list.
13035         (tsubst_expr_values): Rename to ...
13036         (tsubst_initializer_list): ... this.  Use convert_from_reference.
13037         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
13038         and current_base_init_list.
13039         (begin_function_definition): Don't call reinit_parse_for_function.
13040
13041         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
13042
13043         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
13044         correctly.
13045
13046         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
13047
13048 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
13049
13050         * cp-tree.h (IF_COND): Move to c-common.h.
13051         (THEN_CLAUSE): Likewise.
13052         (ELSE_CLAUSE): Likewise.
13053         (WHILE_COND): Likewise.
13054         (WHILE_BODY): Likewise.
13055         (DO_COND): Likewise.
13056         (DO_BODY): Likewise.
13057         (RETURN_EXPR): Likewise.
13058         (EXPR_STMT_EXPR): Likewise.
13059         (FOR_INIT_STMT): Likewise.
13060         (FOR_COND): Likewise.
13061         (FOR_EXPR): Likewise.
13062         (FOR_BODY): Likewise.
13063         (SWITCH_COND): Likewise.
13064         (SWITCH_BODY): Likewise.
13065         (CASE_LOW): Likewise.
13066         (CASE_HIGH): Likewise.
13067         (GOTO_DESTINATION): Likewise.
13068         (COMPOUND_BODY): Likewise.
13069         (ASM_CV_QUAL): Likewise.
13070         (ASM_STRING): Likewise.
13071         (ASM_OUTPUTS): Likewise.
13072         (ASM_INPUTS): Likewise.
13073         (ASM_CLOBBERS): Likewise.
13074         (DECL_STMT_DECL): Likewise.
13075         (STMT_EXPR_STMT): Likewise.
13076         (LABEL_STMT_LABEL): Likewise.
13077         (SCOPE_BEGIN_P): Likewise.
13078         (SCOPE_END_P): Likewise.
13079         (SCOPE_STMT_BLOCK): Likewise.
13080         (SCOPE_NULLIFIED_P): Likewise.
13081         (SCOPE_NO_CLEANUPS_P): Likewise.
13082         (SCOPE_PARTIAL_P): Likewise.
13083         (ASM_VOLATILE_P): Likewise.
13084         (STMT_LINENO): Likewise.
13085         (STMT_LINENO_FOR_FN_P): Likewise.
13086
13087         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
13088         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
13089         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
13090         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
13091         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
13092
13093         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
13094
13095         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
13096         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
13097
13098         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
13099         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
13100         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
13101
13102 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
13103
13104         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
13105         * class.c (dfs_find_final_overrider): Set it appropriately.
13106         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
13107         avoid unneeded secondary vptrs.
13108
13109 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
13110
13111         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
13112         (check_bitfield_decl, check_field_decl): Likewise.
13113         (build_vtbl_or_vbase_field, build_base_field): Likewise.
13114         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
13115         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
13116         (xfer_tag, finish_enum): Likewise.
13117         * decl2.c (finish_builtin_type): Likewise.
13118         * init.c (init_init_processing): Likewise.
13119         * pt.c (instantiate_class_template): Likewise.
13120         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
13121         * cp-tree.h (struct lang_type): Add user_align member.
13122         (CLASSTYPE_USER_ALIGN): Define.
13123
13124 Tue Jun 13 15:48:03 2000  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
13125
13126         * Make-lang.in (c++.install-common): Install g++-cross in
13127         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
13128         $(target_alias)-g++ and $(target_alias)-c++.
13129
13130 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
13131
13132         * class.c (vcall_offset_data_s): Add last_init and fns.
13133         (overrides): Rename to same_signature_p.
13134         (dfs_find_final_overrider): Adjust accordingly.
13135         (mark_overriders): Likewise.
13136         (warn_hidden): Likewise.
13137         (build_vtbl_initializer): Reorganize machinery for building things
13138         at negative offsets.
13139         (build_vcall_and_vbase_vtbl_entries): Likewise.
13140         (build_vbase_offset_vtbl_entries): Likewise.
13141         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
13142         offset entries.  Do not create two entries for functions with the
13143         same signature.
13144         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
13145         (build_rtti_vtbl_entries): Reorganize machinery for building things
13146         at negative offsets.
13147
13148         * optimize.c (expand_call_inline): Don't recurse into the code
13149         used to initialize the parameters more than once.
13150
13151 2000-06-11  Mark Mitchell <mark@codesourcery.com>
13152
13153         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
13154         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
13155         (find_substitution): Only use the `Sa' substitution for
13156         std::allocator, not instantiations of it.
13157         (write_template_prefix): Move comment.  Only use a TREE_LIST to
13158         represent substitutions for a member template.
13159         (write_array_type): Mangle array dimensions correctly.
13160         * optimize.c (maybe_clone_body): Copy more information from the
13161         cloned function.
13162         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
13163         on the regenerated declaration.
13164
13165 2000-06-11  Chip Salzenberg  <chip@valinux.com>
13166             Mark Mitchell <mark@codesourcery.com>
13167
13168         * class.c (build_vtable): Clarify comment.
13169         (build_ctor_vtbl_group): Pass the most derived type to
13170         build_vtable.
13171
13172 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13173
13174         * decl2.c (compare_options): Don't needlessly cast away const-ness.
13175
13176 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
13177
13178         * decl.c (add_binding): Handle duplicate declarations of external
13179         variables.
13180
13181 2000-06-09  Chip Salzenberg  <chip@valinux.com>
13182             Mark Mitchell <mark@codesourcery.com>
13183
13184         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
13185         argument.
13186         (write_signed_number): New macro.
13187         (write_unsigned_number): Likewise.
13188         (write_source_name): Use them.
13189         (write_number): Handle signed and unsigned values.
13190         (write_integer_cst): Use tree_int_cst_sgn, and use
13191         write_unsigned_number or write_signed_number as appropriate.
13192         (write_discriminator): Use write_unsigned_number or
13193         write_signed_number as appropriate.
13194         (write_template_arg_literal): Likewise.
13195         (write_array_type): Use tree_low_cst.
13196         (write_template_parm):  Use write_unsigned_number or
13197         write_signed_number as appropriate.
13198         (write_substitution): Adjust call to write_number.
13199         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
13200         (write_expression): Handle non-type template arguments of
13201         reference type correctly.
13202         (mangle_thunk): Use write_signed_number.
13203
13204 2000-06-09  Chip Salzenberg  <chip@valinux.com>
13205
13206         * mangle.c (find_substition): Don't mangle objects with typename
13207         substitutions (e.g. "cin" as "Si").
13208
13209 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
13210
13211         * call.c (add_candidate): Use ggc_alloc_cleared.
13212         * decl.c (lookup_label): Likewise.
13213         * lex.c (retrofit_lang_decl): Likewise.
13214
13215 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
13216
13217         * semantics.c (expand_body): Push to TV_EXPAND.
13218         * optimize.c (optimize_function): Push to TV_INTEGRATION.
13219         * decl.c (start_function): Always call announce_function.
13220
13221         * tinfo2.cc: Just declare abort.
13222
13223 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
13224
13225         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
13226         whenever @ is a symbolic name.
13227
13228 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
13229
13230         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
13231
13232 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
13233
13234         * decl.c (pushdecl): Look up functions by DECL_NAME, not
13235         DECL_ASSEMBLER_NAME.
13236
13237 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
13238
13239         * decl2.c (c_language): Define.
13240
13241 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
13242
13243         * lex.c (lang_init_options): Tweak.
13244
13245         * decl2.c: Remove #inclusion of diagnostic.h
13246         (lang_decode_option): Move diagnostic formatting options to
13247         toplevel.
13248
13249         * lang-options.h: Remove documentation for diagnostic options.
13250
13251         * Makefile.in (lex.o): Depends upon diagnostic.h
13252
13253 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
13254
13255         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
13256         the same DECL_RESULT, it's not a redefinition.
13257         * pt.c (tsubst_decl): Remove code to handle illegal
13258         specializations.
13259
13260 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
13261
13262         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
13263
13264 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
13265
13266         * search.c (maybe_suppress_debug_info): Don't check
13267         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
13268
13269         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
13270         here if extern_p.
13271
13272         Remember instantiation context in deferred instantiations.
13273         * cp-tree.h (struct tinst_level): Remove.
13274         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
13275         * pt.c (current_tinst_level): Now a tree.
13276         (print_template_context, push_tinst_level, pop_tinst_level,
13277         tinst_for_decl): Adjust.
13278         (reopen_tinst_level): New fn.
13279         (init_pt): Register current_tinst_level as a root.
13280         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
13281         of the pending templates list.
13282         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
13283         * lex.c (extract_interface_info): Adjust.
13284         * decl2.c (warn_if_unknown_interface): Adjust.
13285
13286 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
13287
13288         * class.c (indirect_primary_base_p): New function.
13289         (determine_primary_base): Use it.
13290
13291 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
13292
13293         Update new-abi dynamic cast algorithm.
13294         * tinfo.cc (__class_type_info::__dyncast_result): Add
13295         whole_details. Adjust constructor.
13296         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
13297         Avoid unnecessary searching.
13298         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
13299
13300 Mon Jun  5 06:48:55 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13301
13302         * decl.c (init_decl_processing): Don't call record_component_aliases.
13303         * tree.c (build_cplus_array_type_1): Likewise.
13304
13305 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
13306
13307         * ir.texi: Correct typo.
13308         * mangle.c (write_expression): Handle non-type template arguments
13309         with reference type.
13310         * method.c (build_overload_value): Likewise.
13311         * pt.c (convert_nontype_argument): Explicitly represent conversion
13312         to a reference with an ADDR_EXPR.
13313         (unify): Always unify arguments in left-to-right order.
13314
13315 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
13316             Mark Mitchell  <mark@codesourcery.com>
13317
13318         * Make-lang.in (CXX_SRCS): Add mangle.c.
13319         * Makefile.in (CXX_OBJS): Add mangle.o.
13320         (mangle.o): New rule.
13321
13322         * class.c (local_classes): New variable.
13323         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
13324         (get_vtt_name): Use mangle_vtt_name for new ABI.
13325         (init_class_processing): Initialize local_classes.
13326         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
13327         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
13328         (std_identifier): New macro.
13329         (DECL_VOLATILE_MEMFUNC_P): New macro.
13330         (DECL_NAMESPACE_STD_P): Likewise.
13331         (local_classes): Declare.
13332         (get_mostly_instantiated_function_type): Declare.
13333         (init_mangle): Declare.
13334         (mangle_decl): Likewise.
13335         (mangle_type_string): Likewise.
13336         (mangle_type): Likewise.
13337         (mangle_typeinfo_for_type): Likewise.
13338         (mangle_typeinfo_string_for_type): Likewise.
13339         (mangle_vtbl_for_type): Likewise.
13340         (mangle_vtt_for_type): Likewise.
13341         (mangle_ctor_vtbl_for_type): Likewise.
13342         (mangle_thunk): Likewise.
13343         (mangle_conv_op_name_for_type): Likewise.
13344         (mangle_guard_variable): Likewise.
13345         * decl.c (pushtag): Keep track of local classes.
13346         (initialize_predefined_identifiers): Initialize std_identifier.
13347         (init_decl_processing): Use std_identifier.
13348         (start_decl): Don't treat instantiations as specializations.
13349         (grokdeclarator): Likewise.
13350         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
13351         name for fully-instantiated templates.
13352         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
13353         destructors with the new ABI.
13354         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
13355         (grokfield): Use mangle_type for new ABI.
13356         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
13357         (get_sentry): Use mangle_guard_variable for new ABI.
13358         (start_static_initialization_or_destruction): Likewise.
13359         * expr.c (extract_aggr_init): Remove.
13360         (extract_scalar_init): Likewise.
13361         (extract_init): Remove #if 0'd code.
13362         * mangle.c: New function.
13363         * method.c (build_mangled_name): Assert not flag_new_abi.
13364         (build_static_name): Likewise.
13365         (build_decl_overload_real): Likewise.
13366         (build_typename_overload): Likewise.
13367         (build_overload_with_type): Likewise.
13368         (build_overload_name): Likewise.
13369         (get_ctor_vtbl_name): Likewise.
13370         (start_squangling): Likewise.
13371         (get_id_2): Likewise.
13372         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
13373         (init_method): Call init_mangle for new ABI.
13374         (make_thunk): Call mangle_thunk for new ABI.
13375         * operators.def: Correct new ABI manglings for the `%' operator.
13376         Add `::' operator.
13377         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
13378         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
13379         (lookup_template_class): Call mangle_decl for new ABI.
13380         (get_mostly_instantiated_function_type): New function.
13381         (set_mangled_name_for_template_decl): Use it.
13382         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
13383         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
13384         conversion op names.
13385         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
13386         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
13387         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
13388         mangle_typeinfo_string_for_type.
13389
13390 2000-06-03  Mark Mitchell  <mark@codesourcery.com>
13391
13392         * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
13393         (INNERMOST_TEMPLATE_ARGS): New macro.
13394         (innermost_args): Remove.
13395         (get_innermost_template_args): New function.
13396         * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
13397         * error.c (dump_function_decl): Be caution when using
13398         most_general_template.
13399         * method.c (build_template_parm_names):  Use
13400         INNERMOST_TEMPLATE_ARGS.
13401         * pt.c (add_to_template_args): Tidy comment
13402         (get_innermost_template_args): New function.
13403         (check_explicit_specialization): Clear DECL_INITIAL for a new
13404         specialization.
13405         (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
13406         Tidy.
13407         (push_template_decl): Always register specializations of the most
13408         general template.
13409         (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
13410         (coerce_template_parms): Likewise.
13411         (lookup_template_class): Likewise.
13412         (innermost_args): Remove.
13413         (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
13414         (tsubst_decl): Handle tricky specializations.  Use
13415         get_innermost_template_args.
13416         (instantiate_template): Simplify handling of partial
13417         instantiations.
13418         (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
13419         (most_general_template): Reimplement, in a more straightforward
13420         manner.
13421         (regenerate_decl_from_template): Tweak formatting.  Use
13422         TMPL_ARGS_DEPTH for clarity.
13423         (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
13424
13425         * dump.c (dequeue_and_dump): Dump information about thunks.
13426
13427 2000-06-01  Richard Henderson  <rth@cygnus.com>
13428
13429         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
13430
13431 2000-06-01  Richard Henderson  <rth@cygnus.com>
13432
13433         * decl2.c (unsupported_options): Fix typo, make const.
13434         (lang_decode_option): Fix bsearch argument order.
13435
13436 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
13437
13438         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
13439         on FIELD_DECLs.
13440
13441 Wed May 31 14:09:00 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13442
13443         * cp-tree.h (c_get_alias_set): Deleted.
13444         * Makefile.in (decl.o): Include ../expr.h.
13445         * decl.c (expr.h): Include.
13446         (init_decl_processing): Call record_component_aliases for arrays.
13447         (grokdeclarator): Likewise.
13448         Set TREE_ADDRESSABLE for fields that aren't bitfields.
13449         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
13450
13451 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
13452
13453         Remove guiding declaration support.
13454         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
13455         (flag_guiding_decls): Remove.
13456         * call.c (build_user_type_conversion_1): Remove support for
13457         guiding decls.
13458         (build_new_function_call): Likewise.
13459         (build_new_op): Likewise.
13460         (build_new_method_call): Likewise.
13461         * decl.c (start_function): Likewise.
13462         * friend.c (is_friend): Likewise.
13463         (do_friend): Likewise.
13464         * decl2.c ((flag_dump_translation_unit): Make it const.
13465         (flag_guiding_decls): Remove.
13466         (unsupported_options): New variable
13467         (compare_options): New function.
13468         (lang_decode_option): Use them.
13469
13470         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
13471
13472         * method.c (mangle_expression): Adjust test for legal expression
13473         operators.
13474
13475         * pt.c (instantiate_decl): Save and restore the local
13476         specializations list.
13477
13478 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
13479
13480         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
13481
13482 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
13483
13484         * call.c (add_template_candidate_real): Handle member template
13485         constructors for classes with virtual bases.
13486         (build_user_type_conversion_1): Use in_charge_arg_for_name.
13487         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
13488
13489         * ir.texi: Update thunk documentation.
13490
13491         * call.c (joust): Fix handling of overloaded builtin operators.
13492
13493 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
13494
13495         * cp-tree.h (DECL_ANTICIPATED): New macro.
13496         Document new use of DECL_LANG_FLAG_7.
13497         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
13498         in the user namespace.
13499         * lex.c (do_identifier): If the identifier's declaration has
13500         DECL_ANTICIPATED on, it has not yet been declared.  But do not
13501         replace it with an ordinary implicit declaration.
13502
13503         * tinfo2.cc: Include stdlib.h.
13504
13505 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
13506
13507         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
13508         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
13509         CLASSTYPE_ALIGN.
13510
13511 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
13512
13513         * decl2.c (lang_decode_option): Use skip_leading_substring instead
13514         of plain strncmp.
13515
13516 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
13517
13518         * operators.def (<?): Duplicated, should have been...
13519         (>?): this.  Fixed.
13520
13521 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
13522             Mark Mitchell  <mark@codesourcery.com>
13523
13524         * cp-tree.h (ansi_opname): Make it a macro.
13525         (ansi_assopname): Likewise.
13526         (struct lang_decl_flags): Add assignment_operator_p.
13527         (struct lang_decl): Add operator_code.
13528         (DECL_VTT_PARM): Adjust.
13529         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
13530         overloaded operator.
13531         (SET_OVERLOADED_OPERATOR_CODE): New macro.
13532         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
13533         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
13534         (opname_tab): Remove.
13535         (assignop_tab): Likewise.
13536         (operator_name_info_t): New type.
13537         (operator_name_info): New variable.
13538         (assignment_operator_name_info): Likewise.
13539         (build_cp_library_fn): Remove declaration.
13540         (push_cp_library_fn): Likewise.
13541         (operator_name_string): Likewise.
13542         (build_decl_overload): Likewise.
13543         * call.c (print_z_candidates): Simplify.
13544         (build_object_call): Adjust usage of ansi_opname.  Use
13545         DECL_OVERLOADED_OPERATOR_P.
13546         (op_error): Adjust operator name lookup.
13547         (build_conditional_expr): Adjust usage of ansi_opname.
13548         (build_new_op): Likewise.
13549         (build_op_delete_call): Likewise.
13550         (build_over_call): Likewise.
13551         (joust): Use DECL_OVERLOADED_OPERATOR_P.
13552         * decl.c (duplicate_decls): Copy operator_code.
13553         (init_decl_processing): Adjust parameters to push_cp_library_fn.
13554         (builtin_function): Adjust parameters to build_library_fn_1.
13555         (build_library_fn_1): Accept an overloaded operator code.
13556         (build_library_fn): Pass ERROR_MARK.
13557         (build_cp_library_fn): Accept an overloaded operator code.
13558         (push_cp_library_fn): Likewise.
13559         (grokfndecl): Tweak.
13560         (grokdeclarator): Simplify code to compute names of overloaded
13561         operators.  Adjust use of ansi_opname.
13562         (ambi_op_p): Work on tree_codes, not identifiers.
13563         (unary_op_p): Likewise.
13564         (grok_op_properties): Likewise.
13565         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
13566         (lang_mark_tree): Don't try to mark the operator_code.
13567         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
13568         * error.c (dump_decl): Remove special handling for operator
13569         names.
13570         (dump_function_name): Likewise.
13571         (dump_expr): Adjust name lookup of operators.
13572         (op_to_string): Simplify.
13573         (assop_to_string): Likewise.
13574         * init.c (build_new_1): Adjust use of ansi_opname.
13575         * lex.c (opname_tab): Remove.
13576         (assignop_tab): Likewise.
13577         (ansi_opname): Likewise.
13578         (ansi_assopname): Likewise.
13579         (operator_name_string): Likewise.
13580         (reinit_lang_specific): Likewise.
13581         (operator_name_info): New variable.
13582         (assignment_operator_name_info): Likewise.
13583         (init_operators): New function.
13584         (init_parse): Use it.
13585         (do_identifier): Adjust use of ansi_opname.
13586         * method.c (mangle_expression): Don't use ansi_opname for
13587         mangling.
13588         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
13589         (build_decl_overload): Remove.
13590         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
13591         (do_build_assign_ref): Adjust use of ansi_opname.
13592         (synthesize_method): Likewise.
13593         (implicitly_declare_fn): Likewise.
13594         * operators.def: New file.
13595         * parse.y (operator): Adjust use of ansi_opname.
13596         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
13597         (set_mangled_name_for_template_decl): Don't play games with
13598         current_namespace.
13599         (special_function_p): Adjust use of ansi_opname.
13600         * typeck.c (check_return_expr): Likewise.
13601         * Make-lang.in (cc1plus): Depend on operators.def.
13602         * Makefile.in (lex.o): Likewise.
13603         (decl.o): Likewise.
13604
13605 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
13606
13607         * Make-lang.in (cplib2.ready): Eradicate.
13608
13609 Sat May 27 11:25:46 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13610
13611         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
13612         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
13613         (built_min, cp_tree_equal): Likewise.
13614
13615 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
13616
13617         * class.c (layout_nonempty_base_or_field): Replace
13618         `record_layout_info' with `record_layout_info_s'.
13619
13620 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
13621
13622         Fix goto checking.
13623         * cp-tree.h (struct language_function): x_named_labels is now
13624         a struct named_label_list*.
13625         * decl.c (struct named_label_use_list): Renamed from...
13626         (struct named_label_list): ...this.  New struct.
13627         (push_binding_level): Don't set eh_region.
13628         (note_level_for_eh): New fn.
13629         (pop_label): Take label and old value directly.
13630         (pop_labels): Adjust for new named_labels format.
13631         (lookup_label): Likewise.
13632         (poplevel): Note characteristics of a binding level containing a
13633         named label.  Mess with named label lists earlier.
13634         (mark_named_label_lists): New fn.
13635         (mark_lang_function): Call it.
13636         (use_label): New fn, split out from...
13637         (make_label_decl): ...here.  Don't call it.
13638         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
13639         check_previous_gotos): New fns, split out from...
13640         (define_label): ...here.
13641         (check_switch_goto): New fn.
13642         (define_case_label): Call it.
13643         (check_goto): New fn.
13644         * semantics.c (finish_goto_stmt): Call it and use_label.
13645         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
13646         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
13647
13648 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
13649
13650         * class.c (build_vtable_entry_ref): Correct usage of
13651         get_vtbl_decl_for_binfo.
13652
13653         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
13654         * method.c (implicitly_declare_fn): Not here.
13655
13656 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
13657
13658         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
13659         (CPTI_PTMD_DESC_TYPE): ... here.
13660         (ptmd_desc_type_node): Rename to ...
13661         (ptm_desc_type_node): ... here.
13662         * decl.c: Likewise.
13663         * rtti.c (ptmd_initializer): Rename to ...
13664         (ptm_initializer): ... here.
13665         (sythesize_tinfo_var): Adjust. Deal with pointer to member
13666         function.
13667         (create_tinfo_types): Adjust.
13668
13669 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
13670
13671         Finish implementation of VTTs.
13672         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
13673         CPTI_VTT_PARM_IDENTIFIER.
13674         (vtt_parm_identifier): New macro.
13675         (vtt_parm_type): Likewise.
13676         (BINFO_SUBVTT_INDEX): Likewise.
13677         (BINFO_VPTR_INDEX): Likewise.
13678         (struct lang_decl): Add vtt_parm.
13679         (DECL_VTT_PARM): New macro.
13680         (DECL_USE_VTT_PARM): Likewise.
13681         (DECL_NEEDS_VTT_PARM_P): Likewise.
13682         (get_vtt_name): Declare.
13683         (build_artificial_parm): Likewise.
13684         (fixup_all_virtual_upcast_offsets): Likewise.
13685         (expand_indirect_vtbls_init): Remove.
13686         * call.c (build_new_method_call): Pass the vtt to subobject
13687         constructors and destructors.
13688         * class.c (get_vtt_name): Give it external linkage.
13689         (build_clone): Handle the magic VTT parameters for clones.
13690         (clone_function_decl): Fix typo in comment.
13691         (build_vtt): Keep track of the indices in the VTTs where various
13692         entities are stored.
13693         (build_vtt_inits): Likewise.
13694         (dfs_build_vtt_inits): Likewise.
13695         (build_ctor_vtbl_group): Tweak type of construction vtables.
13696         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
13697         primary bases, when building construction vtables.
13698         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
13699         (initialize_predefined_identifiers): Add vtt_parm_identifier.
13700         (init_decl_processing): Initialize vtt_parm_type.
13701         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
13702         (lang_mark_tree): Make vtt_parm.
13703         * decl2.c (build_artificial_parm): New function.
13704         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
13705         (grokclassfn): Use build_artificial_parm.
13706         * init.c (initialize_vtbl_ptrs): Call
13707         fixup_all_virtual_upcast_offsets directly.
13708         (perform_member_init): Use the complete subobject destructor for
13709         member cleanups.
13710         (build_vtbl_address): New function.
13711         (expand_virtual_init): Handle VTTs.
13712         * optimize (maybe_clone_body): Likewise.
13713         * search.c (fixup_all_virtual_upcast_offsets): Give it external
13714         linkage.
13715         (expand_indirect_vtbls_init): Remove.
13716         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
13717         * tree.c (make_binfo): Make them bigger.
13718
13719 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
13720
13721         * inc/cxxabi.h (__pbase_type_info): Define, based on
13722         __pointer_type_info.
13723         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
13724         (__pointer_to_member_type_info): Likewise.
13725         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
13726         (__pointer_to_member_type_info::__is_pointer_p): Remove.
13727         (__pointer_type_info::__do_catch): Rename to ...
13728         (__pbase_type_info::__do_catch): ... here. Adjust.
13729         (__pbase_type_info::__pointer_catch): Implement.
13730         (__pointer_type_info::__pointer_catch): Adjust.
13731         (__pointer_to_member_type_info::__pointer_catch): Adjust.
13732
13733 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
13734
13735         * tinfo.h (__user_type_info::contained_virtual_p): New
13736         predicate.
13737         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
13738         shaped hierarchy.
13739         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
13740         diamond shaped hierarchy. Add early out for mixed diamond and
13741         duplicate shaped hierarchy.
13742
13743 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
13744
13745         * cp-tree.h (build_delete): Change prototype.
13746         (build_vec_delete): Likewise.
13747         * call.c (build_scoped_method_call): Use special_function_kind
13748         values to indicate the kind of destruction to be done.
13749         (build_method_call): Likewise.
13750         * decl.c (finish_destructor_body): Likewise.
13751         (maybe_build_cleanup_1): Likewise.  Rename to ...
13752         (maybe_build_cleanup): ... this.
13753         * decl2.c (delete_sanity): Use special_function_kind
13754         values to indicate the kind of destruction to be done.
13755         (build_cleanup): Likewise.
13756         * init.c (perform_member_init): Likewise.
13757         (build_vec_delete_1): Likewise.
13758         (build_dtor_call): Simplify.
13759         (build_delete): Use special_function_kind
13760         values to indicate the kind of destruction to be done.
13761         (build_vbase_delete): Likewise.
13762         (build_vec_delete): Likewise.
13763
13764         * init.c (sort_member_init): Fix typo in error message generation
13765         code.
13766
13767 Mon May 15 11:46:29 2000  Donald Lindsay  <dlindsay@cygnus.com>
13768
13769         * semantics.c (begin_class_definition): make the packed
13770         attribute be sensitive to the "-fpack-struct" command line flag
13771
13772 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
13773
13774         Update new-abi upcast algorithm.
13775         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
13776         prototype and meaning of return value.
13777         (__si_class_type_info::__do_upcast): Likewise.
13778         (__vmi_class_type_info::__do_upcast): Likewise.
13779         * tinfo.cc (__class_type_info::__upcast_result): Replace
13780         whole2dst with part2dst. Adjust ctor.
13781         (__class_type_info::__do_upcast): Adjust call of worker function.
13782         (__class_type_info::__do_upcast): Adjust.
13783         (__si_class_type_info::__do_upcast): Adjust. Use parent's
13784         __do_upcast.
13785         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
13786         virtual base in diamond hierarchy bug.
13787
13788 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
13789
13790         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
13791         and bitfield to tinfo_fn_p.
13792         (DECL_TINFO_FN_P): Adjust.
13793         (SET_DECL_TINFO_FN_P): Likewise.
13794         (DECL_MUTABLE_P): Likewise.
13795         (DECL_C_BIT_FIELD): Likewise.
13796         (SET_DECL_C_BIT_FIELD): Likewise.
13797         (CLEAR_DECL_C_BIT_FIELD): Likewise.
13798         (DECL_UNINLINABLE): Likewise.
13799         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
13800         (handle_using_decl): Remove assertion.
13801         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
13802         to build FIELD_DECLs.
13803         (build_base_field): Likewise.
13804         (layout_class_type): Likewise.
13805         * decl.c (init_decl_processing): Likewise.
13806         (build_ptrmemfunc_type): Likewise.
13807         (grokdeclarator): Likewise.
13808         * decl2.c (grok_x_components): Likewise.
13809         * except.c (call_eh_info): Likewise.
13810         * init.c (init_init_processing): Likewise.
13811         * rtti.c (expand_class_desc): Likewise.
13812         (create_pseudo_type_info): Likewise.
13813         (get_vmi_pseudo_type_info): Likewise.
13814         (create_tinfo_types): Likewise.
13815         * ptree.c (print_lang_decl): Adjust.
13816         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
13817         before checking DECL_MUTABLE_P.
13818
13819         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
13820         parameters for template functions.
13821         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
13822         destructors as well as constructors.
13823
13824 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
13825
13826         * class.c (build_ctor_vtbl_group): Set inits.
13827         * optimize.c (maybe_clone_body): Set DECL_INLINE and
13828         DECL_THIS_INLINE appropriately for clones.
13829
13830         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
13831         (DECL_CONV_FN_P): Simplify.
13832         (DECL_OPERATOR): Remove.
13833         (language_to_string): Declare.
13834         * decl.c (duplicate_decls): Fix typo in comment.
13835         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
13836         (grok_op_properties): Use DECL_CONV_FN_P instead of
13837         IDENTIFIER_TYPENAME_P.
13838         * dump.c (dequeue_and_dump): Dump the language linkage of
13839         declarations.
13840         * error.c (language_to_string): Give it external linkage.
13841         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
13842         (implicitly_declare_fn): Set DECL_LANGUAGE.
13843         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
13844         IDENTIFIER_TYPENAME_P.
13845         (tsubst_decl): Likewise.
13846         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
13847         * semantics.c (finish_member_declaration): Don't mark members of
13848         classes declared in an extern "C" region as extern "C".
13849
13850 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13851
13852         * decl2.c (qualified_lookup_using_namespace): Look through
13853         namespace aliases.
13854
13855         * decl.c (push_using_decl): Return the old decl on namespace level.
13856
13857 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
13858
13859         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
13860         (VTT_NAME_PREFIX): New macro.
13861         (CTOR_VTBL_NAME_PREFIX): Likewise.
13862         (get_ctor_vtbl_name): New function.
13863         * class.c (get_vtable_name): Simplify.
13864         (get_vtt_name): New function.
13865         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
13866         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
13867         when a virtual base becomes primary.
13868         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
13869         VTTs.
13870         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
13871         additional parameters.
13872         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
13873         (initialize_array): New function.
13874         (build_vtt): Likewise.
13875         (build_vtt_inits): Likewise.
13876         (dfs_build_vtt_inits): Likewise.
13877         (dfs_fixup_binfo_vtbls): Likewise.
13878         (build_ctor_vtbl_group): Likewise.
13879         (initialize_vtable): Use initialize_array.
13880         (accumulate_vtbl_inits): Reimplement to handle construction
13881         vtables.
13882         (dfs_accumulate_vtbl_inits): Likewise.
13883         (bulid_vtbl_initializer): Adjust parameter name.
13884         * method.c (build_typename_overload): Remove #if 0'd code.
13885         (get_ctor_vtbl_name): New function.
13886         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
13887         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
13888
13889         * cp-tree.h (struct lang_type): Remove search_slot.
13890         (CLASSTYPE_SEARCH_SLOT): Remove.
13891         (emit_base_init): Change prototype.
13892         (initialize_vtbl_ptrs): Likewise.
13893         (expand_indirect_vtbls_init): Likewise.
13894         (clear_search_slots): Remove.
13895         * decl.c (lang_mark_tree): Don't mark search_slot.
13896         * init.c (initialize_vtbl_ptrs): Simplify.
13897         (emit_base_init): Likewise.
13898         * search.c (struct vbase_info): Document decl_ptr.
13899         (convert_pointer_to_single_level): Remove.
13900         (dfs_find_vbases): Remove.
13901         (dfs_init_base_pointers): Simplify.
13902         (dfs_clear_vbase_slots): Remove.
13903         (dfs_vtable_path_unmark): New function.
13904         (init_vbase_pointers): Simplify.
13905         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
13906         (expand_indirect_vtbls_init): Simplify.  Don't call
13907         mark_all_temps_used.
13908         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
13909         initialize_vtbl_ptrs.
13910
13911 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
13912
13913         * except.c: Add static prototypes.
13914
13915 2000-05-20  H.J. Lu  <hjl@gnu.org>
13916
13917         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
13918
13919 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
13920
13921         Don't create a separate copy of virtual bases for the
13922         CLASSTYPE_VBASECLASSES list.
13923         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
13924         (BINFO_FOR_VBASE): Remove.
13925         (CANONICAL_BINFO): Adjust.
13926         (binfo_for_vbase): New function.
13927         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
13928         instead of BINFO_FOR_VBASE.
13929         (build_vbase_pointer): Likewise.
13930         (build_secondary_vtable): Likewise.
13931         (dfs_mark_primary_bases): Likewise.
13932         (mark_primary_bases): Likewise.
13933         (layout_nonempty_base_or_field): Likewise.
13934         (dfs_set_offset_for_shared_vbases): Likewise.
13935         (dfs_set_offset_for_unshared_vbases): Likewise.
13936         (layout_virtual_bases): Likewise.  Adjust for changes to the
13937         CLASSTYPE_VBASECLASSES list.
13938         (dump_class_hierarchy_r): Use binfo_for_vbase
13939         instead of BINFO_FOR_VBASE.
13940         (dump_class_hierarchy): Likewise.
13941         (finish_vtbls): Likewise.
13942         (build_vtbl_initializer): Adjust for changes to the
13943         CLASSTYPE_VBASECLASSES list.
13944         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
13945         * decl.c (finish_destructor_body): Adjust for changes to the
13946         CLASSTYPE_VBASECLASSES list.
13947         * init.c (sort_base_init): Use binfo_for_vbase.
13948         (construct_virtual_bases): Adjust for changes to the
13949         CLASSTYPE_VBASECLASSES list.
13950         (expand_member_init): Use binfo_for_vbase.
13951         (build_vbase_delete):  Adjust for changes to the
13952         CLASSTYPE_VBASECLASSES list.
13953         * method.c (do_build_copy_constructor): Likewise.
13954         * rtti.c (get_base_offset): Use binfo_for_vbase.
13955         (expand_class_desc): Remove #if 0'd code.
13956         * search.c (struct vbase_info): Remove vbase_types.
13957         (get_base_distance):  Use binfo_for_vbase.
13958         (lookup_field_queue_p): Use CANONICAL_BINFO.
13959         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
13960         (get_pure_virtuals): Adjust for changes to the
13961         CLASSTYPE_VBASECLASSES list.
13962         (dfs_find_vbases): Use binfo_for_vbase.
13963         (dfs_init_vbase_pointers): Likewise.
13964         (init_vbase_pointers): Don't initialize vi.vbase_types.
13965         (virtual_context): Use binfo_for_vbase.
13966         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
13967         CLASSTYPE_VBASECLASSES list.
13968         (expand_indirect_vtbls_init): Simplify.
13969         (dfs_get_vbase_types): Don't replicate virtual bases.
13970         (find_vbase_instance): Use binfo_for_vbase.
13971         (binfo_for_vbase): New function.
13972         * typeck.c (get_delta_difference): Use binfo_for_vbase.
13973
13974 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
13975
13976         * decl2.c (finish_anon_union): Generalize error messages to handle
13977         anonymous structures.
13978         * init.c (perform_member_init): Remove `name' parameter.
13979         (build_field_list): New function.
13980         (sort_member_init): Handle anonymous union initialization order
13981         correctly.  Check for multiple initializations of the same union.
13982         (emit_base_init): Don't look up fields by name here.
13983         (expand_member_init): Record the result of name lookup for future
13984         reference.
13985         * typeck.c (build_component_ref): Fix formatting.
13986
13987 Wed May 17 17:27:44 2000  Andrew Cagney  <cagney@b1.cygnus.com>
13988
13989         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
13990         * typeck.c (build_x_compound_expr): Replace warn_unused with
13991         warn_unused_value.
13992
13993         * decl2.c (lang_decode_option): Update -Wall unused flags by
13994         calling set_Wunused.
13995
13996 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
13997
13998         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
13999         * init.c (dfs_vtable_path_unmark): Remove.
14000         * search.c (marked_new_vtable_p): Likewise.
14001         (unmarked_new_vtable_p): Likewise.
14002         (dfs_search_slot_nonempty_p): Likewise.
14003         (dfs_mark): Likewise.
14004         (dfs_vtable_path_unmark): Likewise.
14005         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
14006         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
14007         (dfs_init_vbase_pointers): Remove special-case new ABI code.
14008         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
14009         (init_vbase_pointers): Simplify.
14010         (expand_indirect_vtbls_init): Likewise.
14011
14012         * class.c (copy_virtuals): New function.
14013         (build_primary_table): Use it.
14014         (build_secondary_vtable): Likewise.
14015         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
14016         indicate that no vcall offset is required.
14017         (add_virtual_function): Likewise.
14018         (modify_all_vtables): Likewise.
14019         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
14020         (dfs_accumulate_vtbl_inits): Likewise.
14021         (build_vtbl_initializer): Make changes to handle construction
14022         vtables.
14023         (dfs_build_vcall_offset_vtbl_entries): Likewise.
14024         (build_rtti_vtbl_entries): Likewise.
14025         (build_vtable_entries): Handle a NULL vcall_index.
14026
14027 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
14028
14029         * decl2.c (lang_decode_option): Fix thinko.
14030
14031 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
14032
14033         * except.c (check_handlers): New fn.
14034         * cp-tree.h: Declare it.
14035         * semantics.c (finish_handler_sequence): Call it.
14036         (finish_function_handler_sequence): Likewise.
14037         (finish_handler_parms): Set TREE_TYPE on the handler.
14038         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
14039         * search.c (get_base_distance_recursive): If protect>1, ignore
14040         special access.
14041         (get_base_distance): Don't reduce watch_access.
14042
14043 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
14044
14045         * lex.c: #include diagnostic.h.
14046         (lang_init_options): Set default prefixing rules.
14047
14048         * lang-options.h: Add -fdiagnostics-show-location=.
14049
14050         * decl2.c: #include diagnostic.h.
14051         (lang_decode_option): Handle -fdiagnostics-show-location=.
14052
14053 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
14054
14055         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
14056         * vec.cc: Revert my 2000-05-07 change.
14057
14058 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
14059
14060         * class.c (check_field_decls): Complain about non-static data
14061         members with same name as class in class with constructor.
14062
14063 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
14064
14065         * decl.c (grokdeclarator): Allow non-static data members with
14066         same name as class.
14067
14068 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
14069
14070         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
14071         and pending_inline.filename.  Update prototypes.
14072         * decl.c (define_label): Constify filename parameter.
14073         * decl2.c (warn_if_unknown_interface): Constify local char *.
14074         * input.c Constify input_source.filename. Don't declare
14075         input_filename or lineno.  Constify filename parameter to feed_input.
14076         * lex.c (init_parse): Constify parameter and return value.
14077         (cp_pragma_interface, cp_pragma_implementation): Constify
14078         filename argument.
14079         (reinit_parse_for_method, reinit_parse_for_block,
14080         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
14081         Constify local char *.
14082         * pt.c: Don't declare lineno or input_filename.
14083         (print_template_context, tsubst_friend_function, tsubst_decl,
14084         tsubst, instantiate_decl): Constify local char *.
14085         * semantics.c (expand_body): Constify local char *.
14086         * tree.c (build_srcloc): Constify filename parameter.
14087         * typeck.c (c_expand_asm_operands): Constify filename
14088         parameter.
14089
14090 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
14091
14092         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
14093         offsetof expansion.
14094
14095 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
14096
14097         * inc/cxxabi.h:  Fix typos in comment.
14098         (__base_class_info::__offset): Use a static_cast.
14099
14100 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
14101
14102         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
14103         of std::size_t and std::ptrdiff_t respectively.
14104         * tinfo.cc: Likewise.
14105         * vec.cc: Likewise.
14106
14107 2000-05-06  Richard Henderson  <rth@cygnus.com>
14108
14109         * typeck.c (build_c_cast): Don't warn integer->pointer size
14110         mismatch for constants.
14111
14112 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
14113
14114         * rtti.c (ptmd_initializer): Set non-public, if class is
14115         incomplete.
14116
14117         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
14118         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
14119         __cxa_vec_delete): Likewise.
14120         * tinfo.cc (__dynamic_cast): Likewise.
14121         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
14122         __cxa_vec_delete): Likewise.
14123
14124 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
14125
14126         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
14127         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
14128         (lang_decl_flags): Add vcall_offset.
14129         (THUNK_VCALL_OFFSET): Use it.
14130         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
14131         * method.c (make_thunk): Create the lang_decl here, not in
14132         emit_thunk.
14133         (emit_thunk): Make generic thunks into ordinary functions once
14134         they have been fed to expand_body.
14135         * semantics.c (expand_body): Set current_function_is_thunk here.
14136
14137 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14138
14139         * class.c (update_vtable_entry_for_fn): Prototype.
14140
14141         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
14142         and `tmpl'.
14143
14144         * search.c (dfs_build_inheritance_graph_order): Prototype.
14145
14146 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
14147
14148         * cp-tree.h (special_function_kind): Add various kinds of
14149         destructors.
14150         (special_function_p): New function.
14151         * class.c (overrides): Don't let one kind of destructor override
14152         another.
14153         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
14154         whether or not to instantiate a template.
14155         * tree.c (special_function_p): Define.
14156
14157 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
14158
14159         * cp-tree.def (THUNK_DECL): Remove.
14160         * cp-tree.h (DECL_THUNK_P): New macro.
14161         (DECL_NON_THUNK_FUNCTION_P): Likewise.
14162         (DECL_EXTERN_C_FUNCTION_P): Likewise.
14163         (SET_DECL_THUNK_P): Likewise.
14164         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
14165         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
14166         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
14167         * decl.c (decls_match): Use DECL_EXTERN_C_P.
14168         (duplicate_decls): Likewise.
14169         (pushdecl): Likewise.  Adjust thunk handling.
14170         (grokfndecl): Use DECL_EXTERN_C_P.
14171         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
14172         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
14173         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
14174         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
14175         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
14176         DECL_NO_STATIC_CHAIN.
14177         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
14178         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
14179         * search.c (covariant_return_p): Remove THUNK_DECL handling.
14180         * ir.texi: Update.
14181
14182 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
14183
14184         * tree.c (walk_tree): Set lineno.
14185
14186 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
14187
14188         * exception.cc: Update license notice.
14189         * new.cc: Likewise.
14190         * new1.cc: Likewise.
14191         * new2.cc: Likewise.
14192         * tinfo.cc: Likewise.
14193         * tinfo2.cc: Likewise.
14194         * vec.cc: Likewise.
14195         * inc/cxxabi.h: Likewise.
14196         * inc/exception: Likewise.
14197         * inc/new: Likewise.
14198         * inc/new.h: Likewise.
14199         * inc/typeinfo: Likewise.
14200
14201 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
14202
14203         * tree.c (build_target_expr_with_type): If we already have a
14204         TARGET_EXPR, just return it.
14205
14206         * optimize.c (initialize_inlined_parameters): Don't generate an
14207         EXPR_STMT if we can just use DECL_INITIAL.
14208         * decl.c (emit_local_var): Only make the initialization a
14209         full-expression if stmts_are_full_exprs_p.
14210
14211 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
14212
14213         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
14214         macro.
14215         * call.c (standard_conversion): Use it.
14216         (direct_reference_binding): Likewise.
14217         (build_over_call): Likewise.
14218         (is_properly_derived_from): Likewise.
14219         (compare_ics): Likewise.
14220         * class.c (resolves_to_fixed_type_p): Likewise.
14221         * optimize.c (declare_return_variable): Likewise.
14222         * pt.c (is_specialization_of): Likewise.
14223         (unify): Likewise.
14224         * typeck.c (comp_target_parms): Likeiwse.
14225         (build_static_cast): Likewise.
14226         (build_reinterpret_cast): Likewise.
14227         (build_const_cast): Likewise.
14228         (comp_ptr_ttypes_real): Likewise.
14229         (comp_ptr_ttypes_const): Likewise.
14230         * typeck2.c (process_init_constructor): Likewise.
14231
14232 2000-04-30  Scott Snyder <snyder@fnal.gov>
14233
14234         * decl.c (finish_destructor_body): Use the base destructor when
14235         destroying virtual bases.
14236
14237 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
14238
14239         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
14240         STMT_EXPRs.
14241         * optimize.c (struct inline_data): Add target_exprs field.
14242         (declare_return_variable): When a function returns an aggregate,
14243         use the variable declared in the TARGET_EXPR as the remapped
14244         DECL_RESULT.
14245         (expand_call_inline): Update the pending target_exprs stack.
14246         (optimize_function): Initialize the stack.
14247
14248         * decl2.c (finish_file): Fix typo in comment.
14249
14250         * method.c (emit_thunk): Don't try to return a `void' value.
14251
14252         * optimize.c (initialize_inlined_parameters): If the parameter is
14253         addressable, we need to make a new VAR_DECL, even if the
14254         initializer is constant.
14255
14256 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
14257
14258         * decl.c (grok_op_properties): Add an extra check of argtypes.
14259
14260 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
14261
14262         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
14263         variables.
14264         (initialize_inlined_parameters): Try to avoid creating new
14265         VAR_DECLs.
14266
14267 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
14268
14269         * lex.c (my_get_run_time): Remove.
14270         (init_filename_times): Use get_run_time instead of my_get_run_time.
14271         (check_newline): Likewise.
14272         (dump_time_statistics): Likewise.
14273         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
14274         of computing elapsed time explicitly.
14275
14276 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
14277
14278         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
14279         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
14280         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
14281         before calling decl_constant_value.
14282         * class.c (check_bitfield_decl): Likewise.
14283         * cvt.c (ocp_convert): Likewise.
14284         (convert): Likewise.
14285         * decl.c (compute_array_index_type): Likewise.
14286         (build_enumerator): Likewise.
14287         * decl2.c (check_cp_case_value): Likewise.
14288         * pt.c (convert_nontype_argument): Likewise.
14289         (tsubst): Likewise.
14290         * typeck.c (decay_conversion): Likewise.
14291         (build_compound_expr): Likewise.
14292         (build_reinterpret_cast): Likewise.
14293         (build_c_cast): Likewise.
14294         (convert_for_assignment): Likewise.
14295
14296 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
14297
14298         * decl.c (finish_function): Don't play games with DECL_INLINE.
14299
14300 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
14301
14302         * ir.texi: Correct typo.
14303
14304 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14305
14306         * decl.c (grokdeclarator): Reject VLAs as members.
14307
14308 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
14309
14310         * call.c (standard_conversion): Accept conversion between
14311         COMPLEX_TYPEs.
14312
14313         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
14314
14315 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
14316
14317         * decl2.c (finish_file): Remove double setup for accounting
14318         compile time.
14319
14320 2000-04-24  Robert Lipe <robertlipe@usa.net>
14321
14322         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
14323
14324 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
14325
14326         * new.cc (set_new_handler): Needs to be in std::.
14327
14328 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
14329
14330         * cp-tree.h (lang_decl): Remove pretty_function_p.
14331         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
14332         language-specific node.
14333         * decl.c (cp_make_fname_decl): Use build_decl, not
14334         build_lang_decl, to build the variables.
14335         (grokvardecl): Don't call build_lang_decl for local variables in
14336         templates.
14337         (grokdeclarator): Don't call build_lang_decl for local type
14338         declarations in templates.
14339         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
14340         zero'd memory, rather than calling memset.
14341         * pt.c: Include hashtab.h.
14342         (local_specializations): New variable.
14343         (retrieve_local_specialization): Use it.
14344         (register_local_specialization): Likewise.
14345         (tsubst_decl): Don't assume local variables have
14346         DECL_LANG_SPECIFIC.
14347         (instantiate_decl): Set up local_specializations.
14348         * Makefile.in (HTAB_H): New variable.
14349
14350 2000-04-23  Richard Henderson  <rth@cygnus.com>
14351
14352         * typeck.c (c_expand_asm_operands): Restore the original
14353         contents of the output list.
14354
14355 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
14356
14357         * ir.texi:  Document complex number representation.
14358
14359 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
14360
14361         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
14362         (target_incomplete_p): New function.
14363         (tinfo_base_init): Create comdat NTBS name variable.
14364         (ptr_initializer): Add non_public parameter. Calculate it.
14365         (ptmd_initializer): Likewise.
14366         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
14367         (create_real_tinfo_var): Add non_public parameter. Use it.
14368         Push proxy into global namespace.
14369         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
14370         New enumeration.
14371         * inc/typeinfo (type_info::before, type_info::operator==):
14372         Compare __name addresses.
14373
14374         * tinfo2.cc: Remove new-abi builtins comment.
14375
14376 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
14377
14378         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
14379
14380         * call.c (joust): Exit early if we get the same function, too.
14381
14382         * decl2.c (key_method): Return NULL_TREE for template classes.
14383         (import_export_class): Don't need to check for template classes.
14384
14385 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
14386
14387         * lex.c: Remove references to cccp.c.
14388
14389 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
14390
14391         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
14392         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
14393         (DECL_DESTRUCTOR_P): Use destructor_attr.
14394         (DECL_CONST_MEMFUNC_P): Reimplement.
14395         (DECL_VOLATILE_MEMFUNC_P): Remove.
14396         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
14397         (overrides): Use DECL_DESTRUCTOR_P.
14398         (check_for_override): Likewise.
14399         * decl.c (start_function): Likewise.
14400         * decl2.c (grokfclassfn): Likewise.
14401         (check_classfn): Likewise.
14402         (grok_function_init): Likewise.
14403
14404 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
14405
14406         * decl2.c (grokfield): Issue error on illegal data member
14407         declaration.
14408
14409 Mon Apr 17 17:11:16 2000  Mark P Mitchell  <mark@codesourcery.com>
14410
14411         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
14412
14413 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
14414
14415         * class.c (build_vtable_entry): Don't build thunks for type-info
14416         functions.
14417
14418 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
14419
14420         * decl.c (decls_match): Allow a redeclaration of a builtin to
14421         specify args while the builtin did not.
14422
14423 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
14424
14425         * cp-tree.def (THUNK_DECL): Add to documentation.
14426         * cp-tree.h (flag_huge_objects): Declare.
14427         * class.c (modify_vtable_entry): Tidy.
14428         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
14429         Calculate delta appropriately for the new ABI.
14430         (dfs_modify_vtables): Use it.
14431         (modify_all_vtables): Fix thinko in code to add overriding copies
14432         of functions to primary vtables.
14433         (build_clone): Fix typo in comment.
14434         (clone_function_decl): Correct order of destructors in vtable.
14435         (build_vbase_offset_vtbl_entries): Adjust comment.
14436         (dfs_vcall_offset_queue_p): Remove.
14437         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
14438         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
14439         (build_vtable_entry): Correct check for pure virtual functions.
14440         Don't declare flag_huge_objects.
14441         * decl.c (flag_huge_objects): Remove declaration.
14442         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
14443         Use int_size_in_bytes.
14444         (emit_thunk): Handle vcall offset thunks.
14445
14446 Sat Apr 15 16:00:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14447
14448         * decl2.c (parse_time, varconst_time): Delete declarations.
14449         (finish_file): Delete LINENO declaration.
14450         START_TIME and THIS_TIME now long.
14451
14452 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
14453
14454         * class.c (build_base_field): Reformat comment.
14455
14456         * inc/cxxabi.h (stddef.h): Comment inclusion.
14457         (__base_class_info::__offset): Comment shift.
14458
14459 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
14460
14461         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
14462         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
14463         (cp_push_exception_identifier): New macro.
14464         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
14465         (DECL_BASE_DESTRUCTOR_P): Likewise.
14466         (DECL_DELETING_DESTRUCTOR_P): Likewise.
14467         (get_vtbl_decl_for_binfo): Fix formatting.
14468         (in_charge_arg_for_name): New macro.
14469         (maybe_build_cleanup_and_delete): Remove declaration.
14470         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
14471         (in_charge_arg_for_name): New function.
14472         (build_new_method_call): Use it.  Handle cloned destructors.
14473         (build_clone): Don't make the base constructor virtual.
14474         Automatically defer generated functions.
14475         (clone_function_decl): Handle destructors, too.
14476         (clone_constructors_and_destructors): Likewise.
14477         (create_vtable_ptr): Don't create a vtable entry for a cloned
14478         function.
14479         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
14480         (initialize_predefined_identifiers): Update appropriately.
14481         (finish_destructor_body): Simplify.
14482         (maybe_build_cleanup_and_delete): Remove.
14483         * except.c (expand_throw): Handle new-ABI destructors.
14484         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
14485         (build_dtor_call): New function.
14486         (build_delete): Use it.  Simplify.
14487         * optimize.c (maybe_clone_body): Handle destructors.
14488         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
14489
14490         * exception.cc (cleanup_fn): New typedef.
14491         (CALL_CLEANUP): New macro.
14492         (cp_eh_info): Use them.
14493         (__cp_push_exception): Likewise.
14494         (__cp_pop_exception): Likewise.
14495
14496 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
14497
14498         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
14499         (complete_dtor_identifier): New macro.
14500         (CLASSTYPE_FIRST_CONVERSION): Remove.
14501         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
14502         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
14503         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
14504         (CLASSTYPE_CONSTRUCTORS): Likewise.
14505         (CLASSTYPE_DESTRUCTORS): Likewise.
14506         (lang_decl): Add cloned_function.
14507         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
14508         (DECL_BASE_CONSTRUCTOR_P): Likewise.
14509         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
14510         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
14511         (DECL_CLONED_FUNCTION_P): Likewise.
14512         (DECL_CLONED_FUNCTION): Likewise.
14513         (clone_function_decl): Declare.
14514         (maybe_clone_body): Likewise.
14515         * call.c (build_user_type_conversion_1): Call complete object
14516         constructors in the new ABI.
14517         (build_new_method_call): Don't add in-charge parameters under the
14518         new ABI.
14519         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
14520         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
14521         CLASSTYPE_DESTRUCTOR_SLOT.
14522         (build_clone): New function.
14523         (clone_function_decl): Likewise.
14524         (clone_constructors_and_destructors): Likewise.
14525         (check_bases_and_members): Use it.
14526         * decl.c (iniitialize_predefined_identifiers): Initialize
14527         complete_dtor_identifier.
14528         (finish_function): Don't add extra code to a clone.
14529         (lang_mark_tree): Mark cloned_function.
14530         * decl2.c (mark_used): Don't bother trying to instantiate things
14531         we synthesized.
14532         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
14533         * method.c (set_mangled_name_for_decl): Don't treat clones as
14534         constructors.
14535         (synthesize_method): Sythesize cloned functions, not the clones.
14536         * optimize.c (inline_data): Update comment on ret_label.
14537         (remap_block): Don't assume DECL_INITIAL exists.
14538         (copy_body_r): Allow ret_label to be NULL.
14539         (maybe_clone_body): Define.
14540         * pt.c (tsubst_decl): Handle clones.
14541         (instantiate_clone): New function.
14542         (instantiate_template): Use it.
14543         (set_mangled_name_for_template_decl): Don't treat clones as
14544         constructors.
14545         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
14546         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
14547         * semantics.c (expand_body): Clone function bodies as necessary.
14548
14549         * optimize.c (remap_decl): Avoid sharing structure for arrays
14550         whose size is only known at run-time.
14551         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
14552
14553         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
14554         to has_in_charge_parm_p.
14555         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
14556         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
14557         (DECL_COPY_CONSTRUCTOR_P): New macro.
14558         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
14559         (build_user_type_conversion_1): Likewise.
14560         (convert_like_real): Likewise.
14561         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
14562         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
14563         (copy_args_p): Likewise.
14564         (grok_ctor_properties): Likewise.
14565         (start_function): Likewise.
14566         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
14567         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
14568         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
14569         * method.c (do_build_copy_constructor): Use
14570         DECL_HAS_IN_CHARGE_PARM_P.
14571         (synthesize_method): Likewise.
14572         * pt.c (instantiate_template): Remove goto.
14573         * tree.c (build_cplus_method_type): Remove mention of obstacks in
14574         comment.
14575
14576         * cp-tre.h (finish_function): Change prototype.
14577         * decl.c (end_cleanup_fn): Adjust caller.
14578         (finish_function): Take only one parameter.
14579         * decl2.c (finish_objects): Adjust caller.
14580         (finish_static_storage_duration_function): Likewise.
14581         * method.c (emit_thunk): Likewise.
14582         * parse.y: Likewise.
14583         * parse.c: Regenerated.
14584         * pt.c (instantiate_decl): Likewise.
14585         * rtti.c (synthesize_tinfo_fn): Likewise.
14586         * semantics.c (expand_body): Likewise.
14587
14588         * cp-tree.h (copy_decl): New function.
14589         * class.c (finish_struct_1): Use it.
14590         * lex.c (copy_decl): Define it.
14591         * pt.c (tsubst_decl): Likewise.
14592         * tree.c (copy_template_template_parm): Likewise.
14593
14594         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
14595         has_nonpublic_assign_ref.
14596         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
14597         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
14598         * class.c (finish_struct_methods): Don't set
14599         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
14600         (interface_only): Don't declare.
14601         (interface_unknown): Likewise.
14602
14603 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14604
14605         * tree.h (HAVE_TEMPLATES): Remove definition.
14606         * lang-options.h (-fthis-is-variable): Remove documentation.
14607
14608 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
14609
14610         * class.c (instantiate_type): Handle object-relative template-id.
14611
14612         * semantics.c (finish_expr_stmt): Call convert_to_void here.
14613         * decl.c (cplus_expand_expr_stmt): Not here.
14614
14615         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
14616         Initialize exprtype earlier.
14617
14618         * parse.y (fn.def1): Check for defining types in return types.
14619
14620         * decl.c (check_tag_decl): Notice extra fundamental types.
14621         Diagnose empty decls in classes, too.
14622
14623         * decl.c (grokdeclarator): Don't override an anonymous name if no
14624         declarator was given.
14625
14626         * cvt.c (convert_to_void): Call resolve_offset_ref.
14627
14628         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
14629
14630         * decl2.c (decl_namespace): Handle getting a type.
14631
14632         * typeck.c (build_c_cast): Re-enable warning for cast between
14633         pointer and integer of different size.
14634
14635 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
14636
14637         * inc/cxxabi.h (__pointer_type_info): Add restrict and
14638         incomplete flags.
14639         (__pointer_type_info::__pointer_catch): New virtual function.
14640         (__pointer_to_member_type_info): Derive from
14641         __pointer_type_info. Adjust.
14642         (__pointer_to_member_type_info::__do_catch): Remove.
14643         (__pointer_to_member_type_info::__is_pointer_p): Declare.
14644         (__pointer_to_member_type_info::__pointer_catch): Declare.
14645         * rtti.c (qualifier_flags): Add restrict flag.
14646         (ptmd_initializer): Reorder members.
14647         (create_tinfo_types): Expand comments. Reorder
14648         ptmd_desc_type_node members.
14649         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
14650         Implement.
14651         (__pointer_type_info::__do_catch): Move specific code into
14652         __pointer_catch. Call it.
14653         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
14654         specific catch checking. Fix void conversion check.
14655         (__pointer_to_member_type_info::__do_catch): Remove.
14656         (__pointer_to_member_type_info::__pointer_catch): Implement.
14657
14658 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14659
14660         * lex.c (init_parse): Remove traces of classof and headof.
14661         * decl2.c (flag_operator_names): Default to 1.
14662         (lang_decode_option): Do not set it for -ansi.
14663
14664 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
14665
14666         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
14667         (DECL_MAIN_VARIANT): Remove.
14668         * decl.c (duplicate_decls): Don't set it.
14669         (start_function): Likewise.
14670         (lang_mark_tree): Don't mark it.
14671         * decl2.c (defer_fn): Don't use it.
14672         * lex.c (retrofit_lang_decl): Don't set it.
14673         * pt.c (tsubst_decl): Likewise.
14674         * ptree.c (print_lang_decl): Don't print it.
14675         * typeck.c (mark_addressable): Don't use it.
14676
14677 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
14678
14679         * vec.cc: Include <new> and <exception>.
14680         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
14681         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
14682         terminate.
14683         (__cxa_vec_delete): Catch dtor exceptions.
14684
14685 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
14686
14687         Prepend __ to implementation defined names.
14688         * inc/typeinfo (type_info): Rename _name to __name.
14689         (type_info::type_info): Rename parameter.
14690         (type_info::operator==, type_info::operator!=,
14691         type_info::before): Likewise.
14692         (type_info::is_pointer_p, type_info::is_function_p,
14693         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
14694         parameters.
14695         * inc/cxxabi.h
14696         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
14697         (__pointer_type_info::__pointer_type_info): Likewise.
14698         (__pointer_type_info::is_pointer_p,
14699         __pointer_type_info::do_catch): Prepend __. Rename parameters.
14700         (__array_type_info::__array_type_info): Rename parameters.
14701         (__function_type_info::__function_type_info): Likewise.
14702         (__function_type_info::is_function_p): Prepend __.
14703         (__enum_type_info::__enum_type_info): Rename parameters.
14704         (__pointer_to_member_type_info::__pointer_to_member_type_info):
14705         Likewise.
14706         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
14707         parameters.
14708         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
14709         (__class_type_info::__class_type_info): Rename parameters.
14710         (__class_type_info::sub_kind): Prepend __. Adjust member names.
14711         (__class_type_info::upcast_result,
14712         __class_type_info::dyncast_result): Prepend __. Move definition
14713         into tinfo.cc.
14714         (__class_type_info::do_upcast, __class_type_info::do_catch,
14715         __class_type_info::find_public_src,
14716         __class_type_info::do_dyncast,
14717         __class_type_info::do_find_public_src): Prepend __. Rename
14718         parameters.
14719         (__si_class_type_info::__si_class_type_info): Rename parameters.
14720         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
14721         __si_class_type_info::do_find_public_src): Prepent __. Rename
14722         parameters.
14723         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
14724         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
14725         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
14726         parameters.
14727         (__dynamic_cast): Rename parameters.
14728         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
14729         type_info::do_catch, type_info::do_upcast): Prepend __.
14730         (contained_p, public_p, virtual_p, contained_public_p,
14731         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
14732         (__class_type_info::do_catch,
14733         __class_type_info::do_upcast): Prepend __. Adjust.
14734         (__class_type_info::__upcast_result,
14735         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
14736         Adjust.
14737         (__class_type_info::find_public_src): Prepend __. Adjust.
14738         (__class_type_info::do_find_public_src,
14739         __si_class_type_info::do_find_public_src,
14740         __vmi_class_type_info::do_find_public_src): Likewise.
14741         (__class_type_info::do_dyncast,
14742         __si_class_type_info::do_dyncast,
14743         __vmi_class_type_info::do_dyncast): Likewise.
14744         (__class_type_info::do_upcast,
14745         __si_class_type_info::do_upcast,
14746         __vmi_class_type_info::do_upcast): Likewise.
14747         (__dynamic_cast): Adjust.
14748         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
14749         (__function_type_info::is_function_p): Likewise.
14750         (__pointer_type_info::do_catch): Likewise. Adjust.
14751         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
14752         (__throw_type_match_rtti_2): Adjust.
14753         (__is_pointer): Adjust.
14754
14755 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
14756
14757         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
14758         (complete_ctor_identifier): New macro.
14759         (special_function_kind): Add sfk_copy_constructor and
14760         sfk_assignment_operator.
14761         (LOOKUP_HAS_IN_CHARGE): Remove.
14762         (cons_up_default_function): Rename to ...
14763         (implicitly_declare_fn): ... this.
14764         * call.c (build_new_method_call): Add in-charge parameters for
14765         constructors here.
14766         * class.c (add_implicitly_declared_members): Change parameter name
14767         from cant_have_assignment to cant_have_const_assignment.
14768         Replace calls to cons_up_default_function to implicitly_declare_fn.
14769         * cvt.c (ocp_convert): Use complete_ctor_identifier.
14770         * decl.c (initialize_predefined_identifiers): Initialize it.
14771         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
14772         complex expression.
14773         * init.c (expand_default_init): Don't calculate the in-charge
14774         parameter here.
14775         (build_new_1): Likewise.
14776         * lex.c (cons_up_default_function): Move to method.c.
14777         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
14778         (implicitly_declare_fn): New function.
14779         * typeck.c (build_static_cast): Use complete_ctor_identifier.
14780         (build_modify_expr): Likewise.
14781         * typeck2.c (build_functional_cast): Likewise.
14782
14783         Under the new ABI, constructors don't return `this'.
14784         * cp-tree.h (warn_reorder): Declare.
14785         (special_function_kind): New enum.
14786         (global_base_init_list): Remove declaration.
14787         (emit_base_init): Don't return a value.
14788         (check_base_init): Don't declare.
14789         (is_aggr_typedef): Likewise.
14790         * decl.c (check_special_function_return_type): New function.
14791         (return_types): Remove.
14792         (grokdeclarator): Use check_special_function_return_type.
14793         (start_function): Don't initialize ctor_label under the new ABI.
14794         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
14795         * init.c (begin_init_stmts): Move to top of file.
14796         (finish_init_stmts): Likewise.
14797         (warn_reorder): Don't declare.
14798         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
14799         value.
14800         (check_base_init): Remove.
14801         (is_aggr_typedef): Likewise.
14802         (build_new_1): Don't use the return value of a constructor.
14803         * semantics.c (setup_vtbl_ptr): Don't use the return value
14804         of emit_base_init.
14805         * typeck.c (check_return_expr): Don't magically convert return
14806         statements into `return this' in constructors under the new ABI.
14807
14808         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
14809         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
14810         (base_ctor_identifier): New macro.
14811         (base_dtor_identifier): Likewise.
14812         (deleting_dtor_identifier): Likewise.
14813         * decl.c: Don't include obstack.h.
14814         (obstack_chunk_alloc): Don't define.
14815         (obstack_chunk_free): Likewise.
14816         (struct predefined_identifier): New type.
14817         (initialize_predefined_identifiers): New function.
14818         (init_decl_processing): Use it.
14819         (debug_temp_inits): Remove.
14820         (start_method): Don't call preserve_data.
14821         (hack_incomplete_structures): Update comment.
14822         * init.c (init_init_processing): Don't initialize
14823         nelts_identifier.
14824         (build_offset_rf): Remove dead code.
14825         (build_delete): Use CLASSTYPE_N_BASECLASSES.
14826         * search.c (init_search_processing): Don't initialize
14827         vptr_identifier.
14828
14829 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14830
14831         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
14832         some sign_compare warnings.
14833
14834 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
14835
14836         Rename abi::__vmi_class_type_info members.
14837         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
14838         base_list, detail_masks members to vmi_flags, vmi_base_count,
14839         vmi_bases and vmi_flags_masks respectively.
14840         (__vmi_class_type_info::vmi_flags_masks): Rename
14841         details_unknown_mask to flags_unknown_mask.
14842         * tinfo.cc (__class_type_info::do_upcast): Adjust.
14843         (__vmi_class_type_info::do_find_public_src): Adjust.
14844         (__vmi_class_type_info::do_dyncast): Adjust.
14845         (__vmi_class_type_info::do_upcast): Adjust.
14846
14847 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
14848
14849         * tinfo.cc (convert_to_base): New function.
14850         (get_vbase_offset): Remove. Move into convert_to_base.
14851         (__vmi_class_type_info::do_find_public_src): Adjust.
14852         (__vmi_class_type_info::do_dyncast): Adjust.
14853         (__vmi_class_type_info::do_upcast): Adjust.
14854
14855 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
14856
14857         * tinfo.cc (operator=): Use __builtin_strcmp.
14858         * tinfo2.cc (before): Likewise.
14859
14860 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
14861
14862         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
14863         (DECL_SAVED_INLINE): Rename to ...
14864         (DECL_DEFERRED_FN): ... this.
14865         (in_function_p): Remove declaration.
14866         (mark_inline_for_output): Rename to ...
14867         (defer_fn): ... this.
14868         * decl.c (finish_function): Adjust call to mark_inline_for_output.
14869         (in_function_p): Remove definition.
14870         * decl2.c (saved_inlines): Rename to ...
14871         (deferred_fns): ... this.
14872         (saved_inlines_used): Rename to ...
14873         (deferred_fns_used): ... this.
14874         (mark_inline_for_output): Rename to ...
14875         (defer_fn): ... this.
14876         (finish_file): Adjust accordingly.
14877         (init_decl2): Likewise.
14878         * lex.c (cons_up_default_function): Likewise.
14879         * pt.c (mark_decl_instantiated): Likewise.
14880         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
14881         circumstances.
14882         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
14883         * semantics.c (expand_body): Defer more functions.
14884
14885 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
14886
14887         * vec.cc: New file.
14888         * Make-lang.in (CXX_LIB2FUNCS): Add it.
14889         (vec.o): Build it.
14890         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
14891         __cxa_vec_delete): Declare.
14892
14893 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
14894
14895         * rtti.c (dfs_class_hint_mark): New static function.
14896         (dfs_class_hint_unmark): New static function.
14897         (class_hint_flags): Use them.
14898
14899 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
14900
14901         * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
14902
14903 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
14904
14905         * cp-tree.h (instantiate_decl): Change prototype.
14906         * decl2.c (mark_used): Adjust call.
14907         * optimize.c (inlinable_function_p): Adjust handling of templates.
14908         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
14909         (do_type_instantiation): Likewise.
14910         (instantiate_decl): Defer more templates.
14911         (instantiate_pending_templates): Adjust logic to handle inline
14912         friend functions.
14913
14914         * Makefile.in (GGC_H): New variable.  Use it throughout in place
14915         of ggc.h.
14916
14917         * call.c: Don't include obstack.h.  Include ggc.h.
14918         (obstack_chunk_alloc): Don't define.
14919         (obstack_chunk_free): Likewise.
14920         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
14921         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
14922         (pop_switch): Free it.
14923
14924         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
14925
14926         * dump.c (dequeue_and_dump): Don't try to print the bit_position
14927         if we don't have a DECL_FIELD_OFFSET.
14928
14929 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
14930
14931         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
14932         special_function_p.
14933
14934 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14935
14936         * cfns.gperf (hash, libc_name_p): Prototype.
14937
14938         * rtti.c (build_dynamic_cast_1): Constification.
14939
14940         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
14941
14942         * semantics.c (deferred_type_access_control): Prototype.
14943
14944 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
14945
14946         Correct many new ABI issues regarding vbase and vcall offset
14947         layout.
14948         * cp-tree.h (BINFO_VTABLE): Document.
14949         (struct lang_type): Tweak formatting.
14950         (BINFO_PRIMARY_BINFO): Add to documentation.
14951         (CLASSTYPE_VSIZE): Fix typo in comment.
14952         (CLASSTYPE_VBASECLASSES): Update documentation.
14953         (BINFO_VBASE_MARKED): Remove.
14954         (SET_BINFO_VBASE_MARKED): Likewise.
14955         (CLEAR_BINFO_VBASE_MARKED): Likewise.
14956         (BINFO_FIELDS_MARKED): Remove.
14957         (SET_BINFO_FIELDS_MARKED): Likewise.
14958         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
14959         (enum access_kind): New enumeration.
14960         (num_extra_vtbl_entries): Remove declaration.
14961         (size_extra_vtbl_entries): Likewise.
14962         (get_vtbl_decl_for_binfo): New function.
14963         (dfs_vbase_unmark): Remove declaration.
14964         (mark_primary_bases): Likewise.
14965         * class.c (SAME_FN): Remove.
14966         (struct vcall_offset_data_s): Move definition.
14967         (build_vbase_pointer): Use `build', not `build_binary_op', to
14968         access the vbase pointer under the new ABI.
14969         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
14970         (build_primary_vtable): Likewise.
14971         (dfs_mark_primary_bases): Move here from search.c.
14972         (mark_primary_bases): Likewise.
14973         (determine_primary_bases): Under the new ABI, don't make a base
14974         class a primary base just because we don't yet have any virtual
14975         functions.
14976         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
14977         (num_vfun_entries): Remove.
14978         (dfs_count_virtuals): Likewise.
14979         (num_extra_vtbl_entries): Likewise.
14980         (size_extra_vtbl_entries): Likewise.
14981         (layout_virtual_bases): Iterate in inheritance graph order under
14982         the new ABI.
14983         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
14984         indicate that a vfield is present.
14985         (init_class_processing): Initialize access_public_node, etc., from
14986         ak_public, etc.
14987         (get_vtbl_decl_for_binfo): New function.
14988         (dump_class_hierarchy_r): Likewise.
14989         (dump_class_hierarchy): Use it.
14990         (finish_vtbls): Build the vtbls in inheritance graph order.
14991         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
14992         (initialize_vtable): Use get_vtbl_decl_for_binfo.
14993         (accumulate_vtbl_inits): Add comments explaining why a pre-order
14994         walk is required.
14995         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
14996         where the vptr points, even for primary vtables.
14997         (build_vtbl_initializer): Adjust handling of vbase and vcall
14998         offsets.
14999         (build_vcall_and_vbase_vtable_entries): New function.
15000         (dfs_build_vbase_offset_vtbl_entries): Remove.
15001         (build_vbase_offset_vtbl_entries): Reimplement.
15002         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
15003         were already handled in a primary base class vtable.
15004         (build_vcall_offset_vtbl_entries): Adjust.
15005         (build_rtti_vtbl_entries): Adjust.
15006         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
15007         * init.c (expand_virtual_init): Simplify.
15008         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
15009         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
15010         * search.c (BINFO_ACCESS): New macro.
15011         (SET_BINFO_ACCESS): Likewise.
15012         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
15013         (access_in_type): Likewise.
15014         (dfs_accessible_p): Likewise.
15015         (protected_accessible_p): Likewise.
15016         (lookup_fnfields_1): Adjust documentation.
15017         (dfs_mark_primary_bases): Move to class.c
15018         (mark_primary_bases): Likewise.
15019         (dfs_vbase_unmark): Remove.
15020         (virtual_context): Use BINFO_FOR_VBASE.
15021         (dfs_get_vbase_types): Simplify.
15022         (dfs_build_inheritance_graph_order): New function.
15023         (get_vbase_types): Use it.
15024         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
15025
15026         * tinfo.cc (get_vbase_offset): New function.
15027         (__vmi_class_type_info::do_find_public_src): Use it.
15028         (__vmi_class_type_info::do_dyncast): Likewise.
15029         (__vmi_class_type_info::do_upcast): Likewise.
15030
15031 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
15032
15033         * lang-specs.h: Pass -fno-show-column to the preprocessor.
15034
15035 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
15036
15037         * rtti.c (class_hint_flags): Rename flags.
15038         (class_initializer): Remove flags.
15039         (synthesize_tinfo_var): Combine offset and flags. Add flags
15040         for __vmi_class_type_info.
15041         (create_tinfo_types): Remove flags from __class_type_info and
15042         __si_class_type_info. Merge flags and offset from
15043         base_class_type_info.
15044         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
15045         (__base_class_info::is_virtual_p): Adjust.
15046         (__base_class_info::is_public_p): Adjust.
15047         (__base_class_info::offset): New accessor.
15048         (__class_type_info::details): Remove member.
15049         (__class_type_info::__class_type_info): Lose details.
15050         (__class_type_info::detail_masks): Remove.
15051         (__si_class_type_info::__si_class_type_info): Lose details.
15052         (__vmi_class_type_info::details): New member.
15053         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
15054         (__vmi_class_type_info::detail_masks): New member.
15055         * tinfo.cc (__class_type_info::do_upcast): Initialize result
15056         with unknown_details_mask.
15057         (__vmi_class_type_info::do_find_public_src): Adjust
15058         (__vmi_class_type_info::do_dyncast): Adjust.
15059         (__vmi_class_type_info::do_upcast): Set result details, if
15060         needed. Adjust.
15061         (__dynamic_cast): Temporarily #if out optimization.
15062
15063 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
15064
15065         * rtti.c (get_tinfo_decl): Mark used.
15066         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
15067         mark as dealt with, if we output it.
15068
15069 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
15070
15071         * class.c: Reorganize to put virtual function table initialization
15072         machinery at the end of the file.
15073
15074 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
15075
15076         * class.c (finish_struct): Use bitsize_zero_node.
15077         * pt.c (instantiate_class_template): Likewise.
15078
15079 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
15080
15081         Put RTTI entries at negative offsets in new ABI.
15082         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
15083         vbase offset at index -3, not -1.
15084         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
15085         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
15086         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
15087         (build_rtti_vtbl_entries): New function.
15088         (set_rtti_entry): Remove.
15089         (build_primary_vtable): Don't use it.
15090         (build_secondary_vtable): Likewise.
15091         (start_vtable): Remove.
15092         (first_vfun_index): New function.
15093         (set_vindex): Likewise.
15094         (add_virtual_function): Don't call start_vtable.  Do call
15095         set_vindex.
15096         (set_primary_base): Rename parameter.
15097         (determine_primary_base): Likewise.
15098         (num_vfun_entries): Don't use skip_rtti_stuff.
15099         (num_extra_vtbl_entries): Include RTTI information.
15100         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
15101         (skip_rtti_stuff): Remove.
15102         (dfs_modify_vtables): Don't use it.
15103         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
15104         (layout_nonempty_base_or_field): Update size handling.
15105         (create_vtable_ptr): Tweak.
15106         (layout_class_type): Adjust parameter names.
15107         (finish_struct_1): Simplify.
15108         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
15109         (skip_rtti_stuff): Remove.
15110         (first_vfun_index): New function.
15111         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
15112         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
15113         (marked_vtable_pathp): Declare.
15114         (unmarked_vtable_pathp): Likewise.
15115         * error.c (dump_expr): Use first_vfun_index to calculate vtable
15116         offsets.
15117         * rtti.c (build_headof): Look for RTTI at negative offsets.
15118         (get_tinfo_decl_dynamic): Likewise.
15119         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
15120         here.
15121         (create_pseudo_type_info): Do it here instead.  Adjust so that
15122         vptr points at first virtual function.
15123         * search.c (marked_vtable_pathp): Make it global.
15124         (unmarked_vtable_pathp): Likewise.
15125         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
15126         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
15127         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
15128         (get_pure_virtuals): Likewise.
15129         (expand_upcast_fixups): Likewise.
15130         * tree.c (debug_binfo): Likewise.
15131         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
15132         negative offset.
15133
15134 Sun Mar 26 20:15:26 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15135
15136         * class.c (check_field_decl): Fix typo.
15137         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
15138         (check_methods): Likewise.
15139         (check_field_decls): Likewise.
15140         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
15141         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
15142         Use DECL_RESULT_FLD, not DECL_RESULT.
15143         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
15144         * lex.c (identifier_type): Likewise.
15145         * pt.c (determine_specialization, lookup_template_class): Likewise.
15146         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
15147         (resolve_overloaded_unification, more_specialized): Likewise.
15148         * semantics.c (finish_member_declaration): Likewise.
15149         * typeck.c (build_x_function_call): Likewise.
15150
15151 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
15152
15153         * class.c (layout_empty_base): Handle empty bases with non-byte
15154         alignment.
15155         (build_base_field): Likewise.
15156         (layout_virtual_bases): Likewise.
15157
15158         * class.c (finish_struct_1): Fix typo in this change:
15159
15160         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15161
15162 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
15163
15164         * decl.c (grokdeclarator): Count partial specializations when
15165         keeping track of how many template classes have been seen.
15166
15167         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
15168
15169 Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15170
15171         * class.c (build_vbase_pointer_fields): layout_field now place_field.
15172         (get_vfield_offset): Use byte_position.
15173         (set_rtti_entry): Set OFFSET to ssizetype zero.
15174         (get_binfo_offset_as_int): Deleted.
15175         (dfs_record_base_offsets): Use tree_low_cst.
15176         (dfs_search_base_offsets): Likewise.
15177         (layout_nonempty_base_or_field): Reflect changes in RLI format
15178         and call byte_position.
15179         (layout_empty_base): Convert offset to ssizetype.
15180         (build_base_field): use rli_size_unit_so_far.
15181         (dfs_propagate_binfo_offsets): Do computation in proper type.
15182         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
15183         (layout_class_type): Reflect changes in RLI names and fields.
15184         (finish_struct_1): Set DECL_FIELD_OFFSET.
15185         * dump.c (dequeue_and_dump): Call bit_position.
15186         * expr.c (cplus_expand_constant): Use byte_position.
15187         * rtti.c (expand_class_desc): Use bitsize_one_node.
15188         * typeck.c (build_component_addr): Use byte_position and don't
15189         special case for zero offset.
15190
15191 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
15192
15193         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
15194
15195         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
15196         tinfo object.
15197         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
15198         vtable.
15199
15200 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
15201
15202         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
15203         DECL_P macros.
15204         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
15205         make_typename_type, check_initializer, cp_finish_decl,
15206         xref_tag): Likewise.
15207         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
15208         decl_namespace, arg_assoc_template_arg, arg_assoc,
15209         validate_nonmember_using_decl, do_class_using_decl): Likewise.
15210         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
15211         args_to_string): Likewise.
15212         * friend.c (is_friend): Likewise.
15213         * lex.c (note_got_semicolon, note_list_got_semicolon,
15214         is_global): Likewise.
15215         * method.c (build_overload_nested_name, build_overload_value,
15216         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
15217         * parse.y (typename_sub, typename_sub1): Likewise.
15218         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
15219         process_partial_specialization, convert_template_argument,
15220         template_args_equal, add_pending_template, lookup_template_class,
15221         for_each_template_parm_r, maybe_fold_nontype_arg,
15222         tsubst, instantiate_template, type_unification_real, unify,
15223         instantiate_pending_templates, set_mangled_name_for_template_decl):
15224         Likewise.
15225         * repo.c (repo_get_id, repo_template_used): Likewise.
15226         * search.c (lookup_field_1): Likewise.
15227         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
15228         * xref.c (classname): Likewise.
15229
15230 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
15231
15232         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
15233         (CANONICAL_BINFO): New macro.
15234         (BINFO_NEW_VTABLE_MARKED): Use it.
15235         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
15236         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
15237         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
15238         not TREE_TYPE.
15239         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
15240         (build_secondary_vtable): Likewise.
15241         (dfs_finish_vtbls): Likewise.
15242         (dfs_accumulate_vtbl_inits): Likewise.
15243         (accumulate_vtbl_inits): New function.
15244         (finish_vtbls): Make sure that virtual bases come after
15245         non-virtual bases in the vtable group.
15246         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
15247         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
15248         * search.c (struct vbase_info): Move definition.
15249         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
15250         (unmarked_new_vtable_p): Likewise.
15251         (dfs_mark_vtable_path): Remove.
15252         (dfs_mark_new_vtable): Remove.
15253         (dfs_unmark_new_vtable): Likewise.
15254         (dfs_clear_search_slot): Likewise.
15255         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
15256         (dfs_clear_vbase_slots): Likewise.
15257         (init_vbase_pointers): LIkewise.
15258
15259 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
15260
15261         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
15262         SIZETYPE to a non-SIZETYPE.
15263
15264 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
15265
15266         * class.c (layout_virtual_bases): Adjust names in conditionally
15267         compiled code.
15268
15269         * class.c (record_base_offsets): New function.
15270         (layout_conflict_p): Likewise.
15271         (layout_nonempty_base_or_field): Use it.
15272         (layout_empty_base): New function.
15273         (build_base_field): Use it.
15274         (build_base_fields): Update comment.
15275         (layout_virtual_bases): Fold in a little code form
15276         layout_basetypes.  Use layout_empty_base.
15277         (layout_basetypes): Remove.
15278         (end_of_class): New function.
15279         (layout_class_type): Use it.  Adjust.
15280
15281         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
15282         (fntype_p): Remove.
15283         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
15284         comment.
15285         (dfs_skip_nonprimary_vbases_markedp): Likewise.
15286         * typeck.c (fntype_p): Remove.
15287
15288         * cp-tree.h (TI_SPEC_INFO): Remove.
15289         (CLASSTYPE_TI_SPEC_INFO): Likewise.
15290         * pt.c (process_partial_specialization): Likewise.
15291
15292         * class.c (build_base_field): Fix thinko in computation of binfo
15293         offsets.
15294
15295         * tree.c (mark_local_for_remap_p): Mark variables declared in
15296         TARGET_EXPRs as well.
15297
15298 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
15299
15300         * typeck.c (require_complete_type, complete_type,
15301         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
15302         build_array_ref, convert_arguments, pointer_diff,
15303         build_x_unary_op, build_unary_op, build_c_cast,
15304         build_modify_expr): Use COMPLETE_TYPE_P etc.
15305         * call.c (is_complete, convert_like_real,
15306         build_new_method_call): Likewise.
15307         * class.c (build_vbase_pointer_fields, check_bases,
15308         build_base_field, finish_struct_1, pushclass): Likewise.
15309         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
15310         * decl.c (maybe_process_template_type_declaration, pushtag,
15311         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
15312         layout_var_decl, check_initializer, cp_finish_decl,
15313         grokdeclarator, require_complete_types_for_parms,
15314         grok_op_properties, xref_tag, xref_basetypes,
15315         check_function_type): Likewise.
15316         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
15317         * friend.c (do_friend): Likewise.
15318         * init.c (build_offset_ref): Likewise.
15319         * parse.y (structsp): Likewise.
15320         * pt.c (maybe_process_partial_specialization,
15321         tsubst_friend_function, instantiate_class_template, tsubst,
15322         do_type_instantiation, instantiate_pending_templates): Likewise.
15323         * repo.c (repo_get_id): Likewise.
15324         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
15325         synthesize_tinfo_var, emit_support_tinfos): Likewise.
15326         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
15327         * semantics.c (begin_class_definition): Likewise.
15328         * tree.c (build_cplus_method_type): Likewise.
15329         * typeck2.c (digest_init, build_functional_cast,
15330         add_exception_specifier): Likewise.
15331         * parse.h, parse.c: Regenerated.
15332
15333 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
15334
15335         * inc/cxxabi.h: New header file. Define new-abi entry points.
15336         (__pointer_type_info::target): Rename member to ...
15337         (__pointer_type_info::type): ... here.
15338         (__base_class_info::type): Rename member to ...
15339         (__base_class_info::base): ... here.
15340         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
15341         * cp-tree.h (CPTI_ABI): New global tree enumeration.
15342         (abi_node): New global tree node.
15343         * decl.c (abi_node): Document.
15344         (init_decl_processing): Initialize abi_node.
15345         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
15346         (get_vmi_pseudo_type_info): Likewise.
15347         (create_tinfo_types): Likewise.
15348         (emit_support_tinfos): Likewise.
15349         * tinfo.h (cxxabi.h): Include for new-abi.
15350         Move rtti class definitions to new header file.
15351         * tinfo.cc (abi): Use the namespace.
15352         (std): Move new abi rtti classes from here ...
15353         (__cxxabiv1): ... to here.
15354         * tinfo2.cc (cxxabi.h): Include for new-abi.
15355         Move rtti class definitions to new header file.
15356         (std): Move new abi rtti classes from here ...
15357         (__cxxabiv1): ... to here.
15358         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
15359         namespace.
15360
15361 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
15362             Jason Merrill  <jason@casey.cygnus.com>
15363
15364         * method.c (build_overload_int): Use host_integerp.
15365
15366 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
15367
15368         * init.c (build_offset_ref): Handle the case of a templated member
15369         function.
15370
15371 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
15372
15373         * except.c (expand_exception_blocks): Clear catch_clauses_last.
15374
15375 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
15376
15377         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
15378         * class.c (check_bitfield_decl): Turn illegal bitfields into
15379         non-bitfields.
15380         (dfs_propagate_binfo_offsets): Adjust for new size_binop
15381         semantics.
15382         (dfs_offset_for_unshared_vbases): Likewise.
15383         * cvt.c (cp_convert_to_pointer): Convert NULL to a
15384         pointer-to-member correctly under the new ABI.
15385         * expr.c (cplus_expand_constant): Don't use cp_convert when
15386         turning an offset into a pointer-to-member.
15387         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
15388         when dereferencing them under the new ABI.
15389         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
15390         of pointers-to-members under the new ABI.
15391
15392         * class.c (check_bitfield_decl): Remove restriction on really long
15393         bitfields.
15394         (layout_class_type): Implement new ABI handling of bitfields
15395         longer than their types.
15396
15397 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
15398
15399         * parse.y (extdefs): Call ggc_collect.
15400         * parse.c: Regenerated.
15401
15402 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
15403
15404         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
15405         (note_name_declared_in_class): Use OVL_CURRENT to get at a
15406         potential overload.
15407
15408 Fri Mar 17 08:09:14 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15409
15410         * class.c (build_vbase_path): Use integer_zerop.
15411         (build_vtable_entry): Use tree_low_cst.
15412         (get_vfield_offset): Use bit_position.
15413         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
15414         Use tree_low_cst.
15415         (check_bitfield_decl): Set DECL_SIZE using convert.
15416         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
15417         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
15418         Use tree_low_cst.
15419         (finish_struct_1): Use bit_position.
15420         (dump_class_hierarchy): Use tree_low_cst.
15421         * cp-tree.h (min_precision): Add declaration.
15422         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
15423         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
15424         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
15425         * expr.c (cplus_expand_constant): Use bit_position.
15426         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
15427         * rtti.c (get_base_offset): Use bit_position.
15428         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
15429         host_integerp, and tree_low_cst.
15430         (pointer_int_sum): Use integer_zerop.
15431         (build_component_addr): Use bit_position.
15432
15433 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
15434
15435         * typeck.c (require_complete_type): Don't assume size_zero_node.
15436         (complete_type_or_else): Likewise.
15437
15438 2000-03-16  Steven Grady <grady@digitaldeck.com>
15439             Jason Merrill  <jason@casey.cygnus.com>
15440
15441         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
15442
15443 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
15444
15445         * decl2.c (grokfield): Bail out if type is error_mark_node.
15446
15447 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
15448
15449         * tinfo2.cc (__ptr_to_member_data): Rename to ...
15450         (__pointer_to_member_data): ... here. Adjust.
15451         * rtti.c (create_tinfo_types): Adjust.
15452
15453 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
15454
15455         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
15456         * decl.c (ref_desc_type_node): Undocument.
15457         * rtti.c (ptr_ref_initializer): Rename to ...
15458         (ptr_initializer): ... here. Adjust comments.
15459         (ptmd_initializer): Fix comment thinko.
15460         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
15461         (create_tinfo_types): Remove ref_desc_type_node init.
15462         * tinfo2.cc (__reference_type_info): Remove.
15463
15464 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
15465
15466         * decl.c (cp_finish_decl): Remove obsolete comment.
15467
15468         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
15469
15470 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
15471
15472         * cp-tree.h: Tweak documentation.
15473         * class.c (build_vbase_pointer_fields): Layout the fields, too.
15474         (avoid_overlap): Remove.
15475         (get_binfo_offset_as_int): New function.
15476         (dfs_serach_base_offsets): Likewise.
15477         (layout_nonempty_base_or_field): Likewise.
15478         (build_base_field): Layout fields here.  Avoid placing two objects
15479         of the same type at the same address, under the new ABI.
15480         (build_base_fields): Adjust accordingly.
15481         (create_vtable_ptr): Return the new field, but don't attach it to
15482         TYPE_FIELDS.
15483         (remove_base_field): Remove.
15484         (remove_base_fields): Remove.
15485         (layout_basetypes): Adjust accordingly.
15486         (layout_class_type): Call layout_field for each field, rather than
15487         just making a wholesale call to layout_type.
15488
15489 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
15490
15491         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
15492
15493 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
15494
15495         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
15496
15497         * except.c (dtor_nothrow): New fn.
15498         (do_pop_exception): Use it.  Take type parm.
15499         (push_eh_cleanup): Take type parm.
15500         (expand_start_catch_block): Pass it.
15501         (build_eh_type_type_ref): Accept null type.
15502
15503 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
15504
15505         * cp-tree.h (revert_static_member_fn): Change prototype.
15506         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
15507         (grok_op_properties): Likewise.
15508         (start_function): Likewise.
15509         (revert_static_member_fn): Simplify.
15510         * pt.c (check_explicit_specialization): Adjust call to
15511         revert_static_member_fn.
15512
15513 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
15514
15515         * cp-tree.h (scope_kind): New type.
15516         (tmpl_spec_kind): Likewise.
15517         (declare_pseudo_global_level): Remove.
15518         (pseudo_global_level_p): Rename to template_parm_scope_p.
15519         (pushlevel): Remove declaration.
15520         (begin_scope): New function.
15521         (finish_scope): Likewise.
15522         (current_tmpl_spec_kind): Likewise.
15523         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
15524         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
15525         Add template_spec_p.
15526         (toplevel_bindings_p): Adjust.
15527         (declare_pseudo_global_level): Remove.
15528         (pseudo_global_level_p): Rename to template_parm_scope_p.
15529         (current_tmpl_spec_kind): New function.
15530         (begin_scope): Likewise.
15531         (finish_scope): Likewise.
15532         (maybe_push_to_top_level): Adjust.
15533         (maybe_process_template_type_declaration): Likewise.
15534         (pushtag): Likewise.
15535         (pushdecl_nonclass_level): Likewise.
15536         (lookup_tag): Likewise.
15537         (grokfndecl): Handle member template specializations.  Share
15538         constructor and non-constructor code.
15539         * decl2.c (check_classfn): Handle member template specializations.
15540         * pt.c (begin_template_parm_list): Use begin_scope.
15541         (begin_specialization): Likewise.
15542         (end_specialization): Likewise.
15543         (check_explicit_specialization): Use current_tmpl_spec_kind.
15544         Handle member template specializations.
15545         (end_template_decl): Use finish_scope.  Remove call to
15546         get_pending_sizes.
15547         (push_template_decl_real): Remove bogus error message.
15548         (tsubst_decl): Fix typo in code contained in comment.
15549         (instantiate_template): Handle member template specializations.
15550         (most_general_template): Likewise.
15551
15552 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
15553
15554         * lex.c (whitespace_cr): Compress consecutive calls to warning().
15555         (do_identifier): Ditto for error().
15556
15557         * pt.c (convert_nontype_argument): Ditto for cp_error().
15558         (convert_template_argument): Ditto for cp_pedwarn().
15559
15560 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
15561
15562         * exception.cc (__check_null_eh_spec): New fn.
15563         * except.c (expand_end_eh_spec): Call it if the spec is throw().
15564
15565 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
15566
15567         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
15568         * except.c (expand_end_eh_spec): Add the return type.
15569         * rtti.c (throw_bad_cast): Add the parmtypes.
15570         (throw_bad_typeid): Likewise.
15571
15572         * semantics.c (expand_stmt): Only leave out rtl for unused
15573         artificials, and set DECL_IGNORED_P on them as well.
15574         * decl.c (wrapup_globals_for_namespace): Likewise.
15575
15576 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
15577
15578         * decl.c (maybe_commonize_var): Skip all artificial decls.
15579         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
15580
15581 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
15582
15583         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
15584         * cp-tree.h: Declare flag_enforce_eh_specs.
15585         * decl.c (store_parm_decls, finish_function): Check it.
15586
15587         C library functions don't throw.
15588         * Makefile.in (cfns.h): New target.
15589         (except.o): Depend on it.
15590         * Make-lang.in (cc1plus): Depend on cfns.gperf.
15591         * cfns.gperf: New file.
15592         * cfns.h: Generated.
15593         * except.c: Include it.
15594         (nothrow_libfn_p): New fn.
15595         * decl.c (grokfndecl): Use it.
15596         * cp-tree.h: Declare it.
15597
15598         * decl.c (push_overloaded_decl_1, auto_function,
15599         define_function): Lose.
15600         (build_library_fn_1): New static fn.
15601         (builtin_function): Use it.
15602         (get_atexit_node): Use build_library_fn_ptr.
15603         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
15604         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
15605         push_void_library_fn, push_throw_library_fn): New fns.
15606         * cp-tree.h: Declare them.
15607         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
15608         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
15609         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
15610         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
15611         * rtti.c (build_runtime_decl): Lose.
15612         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
15613         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
15614         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
15615
15616         * call.c (build_call): Remove result_type parm.
15617         Call mark_used on unused artificial fns.
15618         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
15619
15620 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
15621
15622         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
15623         appropriate.
15624         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
15625         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
15626         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
15627         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
15628         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
15629         expand_generic_desc): Likewise.
15630
15631 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
15632
15633         * exception.cc (__cp_pop_exception): Cleanup the original object.
15634
15635 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
15636
15637         * decl.c (grok_op_properties): Merge conversion to void warning
15638         with other silly op warnings.
15639
15640 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
15641
15642         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
15643         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
15644
15645 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
15646
15647         * decl.c (cp_make_fname_decl): New function.
15648         (wrapup_globals_for_namespace): Don't emit unused static vars.
15649         (init_decl_processing): Remove comment about use of
15650         array_domain_type. Set make_fname_decl.
15651         (cp_finish_decl): Remove __FUNCTION__ nadgering.
15652         * semantics.c (begin_compound_stmt): Remove
15653         current_function_name_declared flagging.
15654         (expand_stmt): Don't emit unused local statics.
15655         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
15656         specially.
15657
15658 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
15659
15660         * typeck.c (convert_for_assignment): Don't look at array
15661         initializer.
15662         * call.c (convert_like_real): Likewise.
15663
15664 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
15665
15666         Add initial support for '\uNNNN' specifier.
15667         * lex.c (read_ucs): New fn.
15668         (readescape, skip_white_space): Call it.
15669         (is_extended_char, is_extended_char_1): New fns.
15670         (utf8_extend_token): New fn, #if 0'd out.
15671         (real_yylex): Treat extended chars like letters.
15672
15673         * search.c (note_debug_info_needed): Walk the bases even if we
15674         weren't deferring the type itself.
15675
15676 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15677
15678         * decl2.c (finish_objects): Constify a char*.
15679
15680         * method.c (emit_thunk): Likewise.
15681
15682 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
15683
15684         * typeck.c (dubious_conversion_warnings): Look through
15685         REFERENCE_TYPE.
15686
15687 Mon Mar  6 08:46:47 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15688
15689         * class.c (dfs_modify_vtables): I is now unsigned.
15690         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
15691         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
15692         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
15693         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
15694         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
15695         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
15696         Call integer_all_onesp.
15697         * typeck2.c (process_init_constructor): Use compare_tree_int.
15698
15699         * lang-specs.h (as): Don't call if -syntax-only.
15700
15701 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
15702
15703         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
15704         RTL_EXPR_HAS_NO_SCOPE after all.
15705
15706 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
15707
15708         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
15709         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
15710         RTL_EXPR_HAS_NO_SCOPE.
15711
15712         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
15713         later.
15714
15715         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
15716
15717 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
15718
15719         * call.c (convert_like): Macrofy.
15720         (convert_like_with_context): New macro.
15721         (convert_like_real): Renamed from convert_like.  Add calling
15722         context parameters, for diagnostics. Add recursive flag.  Call
15723         dubious_conversion_warnings for outer conversion.
15724         (build_user_type_conversion): Use convert_like_with_context.
15725         (build_over_call): Likewise. Don't warn about dubious
15726         conversions here. Adjust convert_default_arg calls.
15727         (convert_default_arg): Add context parameters for diagnostics.
15728         Pass through to convert_like_with_context.
15729         * cp-tree.h (convert_default_arg): Add context parameters.
15730         (dubious_conversion_warnings): Prototype new function.
15731         * typeck.c (convert_arguments): Adjust convert_default_arg call.
15732         (dubious_conversion_warnings): New function, broken
15733         out of convert_for_assignment.
15734         (convert_for_assignment): Adjust.
15735
15736 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
15737
15738         * decl2.c (key_method): Break out from...
15739         (import_export_vtable, import_export_class): ...here.
15740
15741         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
15742         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
15743
15744         * search.c (note_debug_info_needed, dfs_debug_mark,
15745         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
15746         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
15747
15748 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
15749
15750         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
15751         typos.
15752
15753 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
15754
15755         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
15756         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
15757         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
15758         (lang_type): Split gets_new into has_new and has_array_new.
15759         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
15760         (TYPE_GETS_NEW): Split into ...
15761         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
15762         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
15763         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
15764         (build_op_new_call): Don't declare.
15765         (build_new_1): Likewise.
15766         * call.c (build_op_new_call): Remove.
15767         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
15768         instead of TYPE_NEEDS_DESTRUCTOR.
15769         (finish_struct_bits): Likewise.
15770         (add_implicitly_declared_members): Likewise.
15771         (check_field_decl): Likewise.
15772         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
15773         correctly under the new ABI.
15774         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
15775         instead of TYPE_NEEDS_DESTRUCTOR.
15776         (initialize_local_var): Likewise.
15777         (destroy_local_var): Likewise.
15778         (cp_finish_decl): Likewise.
15779         (register_dtor_fn): Likewise.
15780         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
15781         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
15782         TYPE_VEC_DELETE_TAKES_SIZE here.
15783         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
15784         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
15785         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
15786         (finish_destructor_body): Likewise.
15787         (maybe_build_cleanup_1): Likewise.
15788         * decl2.c (do_static_destruction): Likewise.
15789         * init.c (build_new_1): Make it static.
15790         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
15791         (expand_cleanup_for_base): Likewise.
15792         (get_cookie_size): New function.
15793         (build_new_1): Handle array-new cookies correctly under the new
15794         ABI.
15795         (build_vec_delete_1): Likewise.
15796         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
15797         (build_delete): Likewise.
15798         (build_vec_delete): Handle array-new cookies correctly under the new
15799         ABI.
15800         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
15801         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
15802         TYPE_HAS_ARRAY_NEW_OPERATOR.
15803         * ptree.c (print_lang_type): Check them.
15804         * search.c (context_for_name_lookup): Fix typo in comment.
15805         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
15806         * tree.c (break_out_cleanups): Likewise.
15807         (build_cplus_array_test_1): Likewise.
15808         (cp_build_qualified_type_real): Likewise.
15809         * typeck.c (complete_type): Likewise.
15810
15811         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
15812         the command-line, not the end.
15813
15814 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
15815
15816         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
15817
15818 2000-03-02  Tom Tromey  <tromey@cygnus.com>
15819
15820         * cp-tree.h (build_java_class_ref): Declare.
15821         * init.c (build_java_class_ref): No longer static.
15822         * except.c (expand_throw): Generate a Java-style `throw' if the
15823         thrown object is a "Java" object.
15824         (initialize_handler_parm): Generate a Java-style lookup of
15825         exception info if the caught object is a "Java" object.
15826         (catch_language, catch_language_init): New globals.
15827         (decl_is_java_type): New function.
15828         (expand_start_catch_block): Don't call push_eh_info() or
15829         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
15830         class reference to build_catch_block.
15831
15832 Thu Mar  2 13:32:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15833
15834         * typeck.c (comptypes): Treat sizetype like its language equivalent.
15835
15836 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
15837
15838         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
15839         to merge reference/pointer code and fix incorrect warnings.
15840
15841 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
15842
15843         * search.c (protected_accessible_p): Use context_for_name_lookup.
15844
15845         * init.c (construct_virtual_bases): Fix thinko.
15846         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
15847
15848 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
15849
15850         * decl.c (current_function_decl): Move to toplev.c.
15851
15852 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
15853
15854         * pt.c (fn_type_unification): Unify return type, whenever
15855         provided.
15856         (get_bindings_real): Only pass return type when necessary.
15857         Remove explicit return type check.
15858         * class.c (resolve_address_of_overloaded_function): Pass desired
15859         return type to fn_type_unification.
15860
15861 Mon Feb 28 08:15:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15862
15863         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
15864         DECL_FIELD_SIZE.
15865         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
15866         DECL_FIELD_SIZE.
15867         * rtti.c (expand_class_desc): Likewise.
15868         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
15869         (THUNK_VCALL_OFFSET): Likewise.
15870         (THUNK_DELTA): Reflect changes in ../tree.h.
15871
15872 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
15873
15874         * search.c (protected_accessible_p): Also allow the access if
15875         the member is public in DERIVED.  Lose TYPE parm.
15876         (friend_accessible_p): Lose TYPE parm.
15877         (accessible_p): Adjust.
15878
15879 Sun Feb 27 16:40:33 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15880
15881         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
15882         on things that are not sizes; ssize_binop deleted.
15883         Call size_diffop when appropriate.
15884         (dfs_build_vcall_offset_vtbl_entries): Likewise.
15885         (build_primary_vtable, build_secondary_vtable): Likewise.
15886         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
15887         Variable I is HOST_WIDE_INT.
15888         (get_vfield_offset): Pass proper types to size_binop.
15889         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
15890         (finish_struct_1): Likewise.
15891         (skip_rtti_stuff): Arg N is now pointer to signed.
15892         (layout_class_type): Use size_zero_node.
15893         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
15894         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
15895         * decl.c (complete_arry_type): Pass proper types to size_binop.
15896         (xref_basetypes): BINFO_OFFSET is sizetype.
15897         * error.c (dump_expr): Don't use size_binop non-sizes.
15898         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
15899         * init.c (construct_virtual_bases): Fix type error.
15900         (build_vec_delete_1): Pass proper type to size_binop and don't
15901         fold result.
15902         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
15903         * rtti.c (get_base_offset): Pass proper type to size_binop.
15904         * search.c (dfs_find_vbases): Fix type error.
15905         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
15906         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
15907         * tree.c (debug_binfo): Variable N is signed.
15908         Use HOST_WIDE_INT_PRINT_DEC.
15909         * typeck.c (comptypes): sizetype is same as equivalent integer type.
15910         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
15911         size_one_node and size_zero_node.
15912         (c_alignof): Use size_one_node.
15913         (build_component_addr): Pass proper types to size_binop.
15914         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
15915
15916 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
15917
15918         Implement class scope using-declarations for functions.
15919         * class.c (handle_using_decl): Call add_method for used functions.
15920         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
15921         (add_method): Used functions are hidden by local functions.
15922         (check_bases_and_members): Handle using-decls before finalizing
15923         CLASSTYPE_METHOD_VEC.
15924         * call.c (add_function_candidate): Add ctype parm; if nonzero,
15925         override the type of 'this' accordingly.
15926         (add_template_candidate, add_template_candidate_real): Add ctype parm.
15927         (convert_class_to_reference, build_user_type_conversion_1,
15928         build_new_function_call, build_object_call, build_new_op,
15929         build_new_method_call): Pass ctype parm.
15930
15931         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
15932         the baselink.
15933         * call.c (convert_class_to_reference, build_user_type_conversion_1,
15934         build_new_function_call, build_object_call, build_new_op,
15935         build_new_method_call, build_op_delete_call): Don't get basetype_path
15936         from a baselink.
15937         * typeck.c (build_component_ref): Likewise.
15938         * init.c (build_offset_ref): Likewise.
15939         (resolve_offset_ref): Don't call enforce_access.
15940         Call build_scoped_ref.
15941         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
15942         would cause an error or if -pedantic.
15943         * class.c (alter_access): Lose binfo parm.
15944
15945 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
15946
15947         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
15948         types.
15949
15950 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
15951
15952         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
15953         pseudo_type_info creation into the std namespace
15954
15955 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
15956
15957         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
15958         (import_export_class): Remove declaration.
15959         * decl2.c (import_export_class): Make it static.
15960         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
15961         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
15962         EXPR_WITH_FILE_LOCATION.
15963         * lex.c (check_newline): Tweak filename/lineno setting.
15964         * semantics.c (begin_while_stmt): Fix typo in comment.
15965
15966 Sat Feb 26 19:50:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15967
15968         * lang-options.h (-fmessage-length=): Add missing option.
15969
15970         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
15971
15972 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
15973
15974         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
15975
15976 Fri Feb 25 14:52:33 2000  Jim Wilson  <wilson@cygnus.com>
15977
15978         * optimize.c (expand_call_inline): Emit the return label before
15979         evaluating the return value.
15980
15981 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
15982
15983         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
15984         than duplicating functionality here.
15985         * optimize.c: Include input.h.
15986         (expand_call_inline): Use push_srcloc and pop_srcloc.
15987         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
15988         * parse.c: Regenerated.
15989         * Makefile.in (lex.o): Depend on input.h.
15990         (optimize.o): Likewise.
15991
15992 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
15993
15994         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
15995         function type, rather than ICE.
15996
15997 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
15998
15999         * decl.c (grokdeclarator): Call decl_type_access_control.
16000         * parse.y (parse_end_decl): Don't call decl_type_access_control if
16001         decl is null.
16002
16003 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
16004
16005         * decl.c (decls_match): Remove obsolete static member nadgering.
16006
16007 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
16008
16009         * decl.c (grokdeclarator): Change ANSI to ISO.
16010         * lex.c (consume_string, readescape, do_identifier): Likewise.
16011         (parse_float, real_yylex): Likewise.
16012         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
16013         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
16014         new_type_id, maybe_label_decls, simple_stmt,
16015         for.init.statement): Likewise.
16016         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
16017         * semantics.c (finish_named_return_value): Likewise.
16018         * parse.c: Regenerate.
16019
16020 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
16021
16022         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
16023         (CPTI_CLASS_STAR_TYPE): Remove.
16024         (vtable_index_type): Likewise.
16025         (class_star_type_node): Remove.
16026         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
16027         (build_binary_op_nodefault): Remove.
16028         * call.c (build_new_op): Use build_binary_op instead of
16029         build_binary_op_nodefault.
16030         * decl.c (init_decl_processing): Remove class_star_type_node
16031         initialization.  Make delta_type_node ptrdiff_type_node under the
16032         new ABI.  Initialize vtable_index_type.
16033         (build_ptrmemfunc_type): Build different structures for the new
16034         ABI.
16035         (build_enumerator): Use build_binary_op instead of
16036         build_binary_op_nodefault.
16037         * method.c (build_overload_value): Mangle pointers-to-members
16038         appropriately under the new ABI.
16039         * typeck.c (build_array_ref): Use build_binary_op instead of
16040         build_binary_op_nodefault.
16041         (get_member_function_from_ptrfunc): Adjust for the new ABI.
16042         (build_binary_op_nodefault): Rename to ...
16043         (build_binary_op): ... this.  Remove old version.  Adjust for
16044         pointer-to-member comparisons under the new ABI.
16045         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
16046         (build_ptrmemfunc): Adjust for the new ABI.
16047         (expand_ptrmemfunc_cst): Likewise.
16048         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
16049         (pfn_from_ptrmemfunc): Adjust for the new ABI.
16050
16051 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
16052
16053         * call.c (build_object_call): Compress consecutive calls to
16054         cp_error.
16055         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
16056         (build_op_delete_call): Adjust message formatting.
16057
16058         * class.c (check_bases): Compress consecutive calls to
16059         cp_pedwarn.
16060         (finish_struct_anon): Say 'ISO C++'.
16061
16062         * decl.c (start_decl): Same here.
16063         (grok_reference_init): Likewise.
16064         (grokfndecl): Correct message formatting.
16065         (grokfndecl): Improve diagnostic.
16066         (check_static_variable_definition): Likewise. Say 'ISO C++'
16067         (compute_array_index_type): Say 'ISO C++'
16068         (create_array_type_for_decl): Compress consecutive calls to
16069         cp_error.
16070         (grokdeclarator): Say 'ISO C++'
16071         (grok_op_properties): Likewise.
16072
16073         * decl2.c (delete_sanity): Clairify diagnostic.
16074         (check_member_template): Same here.
16075         (grok_function_init): Use consistent terminology.
16076
16077         * expr.c (do_case): Say 'ISO C++'
16078
16079         * friend.c (do_friend): Compress consecutive calls to warning.
16080
16081 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
16082
16083         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
16084         * class.c (build_secondary_vtable): Reorganize.  Don't create a
16085         new vtable under the new ABI.
16086         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
16087         computing the size.
16088         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
16089         the initializing elements.
16090         (initialize_vtable): New function.
16091         (dfs_finish_vtbls): Use it.
16092         (dfs_accumulate_vtbl_inits): New function.
16093         (finish_vtbls): Merge primary and secondary vtables under the new
16094         ABI.
16095         (finish_struct_1): Remove redundant call to layout_vtable_decl.
16096         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
16097         aren't VAR_DECLs.
16098
16099         * class.c (build_vtable): New function, split out from ...
16100         (get_vtable_decl): ... here, and ...
16101         (build_secondary_vtable): ... here.
16102
16103         * pt.c (tsubst_decl): Fix formatting.
16104
16105 Sat Feb 19 18:43:13 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16106
16107         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
16108         (avoid_overlap, build_base_field): Likewise.
16109         (build_base_field, build_base_fields, is_empty_class):
16110         Test DECL_SIZE with integer_zero.
16111         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
16112         * cp-tree.h (struct lang_type): New field size_unit.
16113         (CLASSTYPE_SIZE_UNIT): New macro.
16114         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
16115         (cp_finish_decl): Delete -Wlarger-than processing.
16116         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
16117         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
16118         * tree.c (make_binfo): binfo vector is one entry longer.
16119         (walk_tree): Walk DECL_SIZE_UNIT.
16120
16121 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
16122
16123         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
16124         comment.
16125         (build_vtable_entry): Don't assume all vtable entries are
16126         functions.
16127         (build_vtbl_initializer): Adjust accordingly.
16128         (get_vtable_decl): Fix formatting.
16129
16130 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
16131
16132         * semantics.c (deferred_type_access_control): Walk the entire
16133         type_lookups list.
16134         (save_type_access_control): Rename from
16135         initial_deferred_type_access_control.  Just remember the value.
16136         (decl_type_access_control): New fn.
16137         (begin_function_definition): Use deferred_type_access_control, after
16138         we've started the function.  Set type_lookups to error_mark_node.
16139         * parse.y (frob_specs, fn.def1): Adjust.
16140         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
16141         (parse_end_decl, parse_bitfield0, parse_method): New fns.
16142         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
16143         (after_type_component_declarator0): Likewise.
16144         (after_type_component_declarator): Likewise.
16145         (notype_component_declarator): Likewise.
16146         * cp-tree.h: Adjust.
16147
16148         * decl.c (redeclaration_error_message): Allow redeclaration of
16149         namespace-scope decls.
16150
16151 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
16152
16153         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
16154
16155 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
16156
16157         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
16158         * decl2.c (grokclassfn): Likewise.
16159
16160         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
16161
16162         * decl2.c (lang_decode_option): Don't set default message length
16163         here.
16164         * lex.c (lang_init_options): Set it here.
16165
16166 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
16167
16168         Make DECL_CONTEXT mean the class in which a member function was
16169         declared, even for a virtual function.
16170         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
16171         (DECL_FRIEND_CONTEXT): New macro.
16172         (DECL_REAL_CONTEXT): Remove.
16173         (SET_DECL_FRIEND_CONTEXT): Likewise.
16174         (DECL_VIRTUAL_CONTEXT): Adjust.
16175         (DECL_CLASS_SCOPE_P): Use TYPE_P.
16176         (add_friends): Remove.
16177         (hack_decl_function_context): Likewise.
16178         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
16179         CP_DECL_CONTEXT.
16180         (build_over_call): Fix indentation.  Use DECL_CONTEXT
16181         instead of DECL_CLASS_CONTEXT.
16182         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
16183         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
16184         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
16185         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
16186         (build_base_field): Likewise.
16187         (finish_struct_1): Likewise.
16188         (build_self_reference): Likewise.
16189         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
16190         DECL_REAL_CONTEXT.
16191         (pushtag): Use decl_function_context, not
16192         hack_decl_function_context.
16193         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
16194         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
16195         (pushdecl): Remove bogus code.
16196         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
16197         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
16198         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
16199         Use decl_function_context, nothack_decl_function_context.
16200         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
16201         (grokdeclarator): Likewise.  Use decl_function_context, not
16202         hack_decl_function_context.
16203         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
16204         (start_function): Use DECL_FRIEND_CONTEXT, not
16205         DECL_CLASS_CONTEXT.  Use decl_function_context, not
16206         hack_decl_function_context.
16207         (finish_function): Use decl_function_context, not
16208         hack_decl_function_context.
16209         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
16210         DECL_CLASS_CONTEXT.
16211         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
16212         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
16213         (grokfield): Likewise.
16214         (finish_builtin_type): Likewise.
16215         (finish_vtable_vardec): Use decl_function_context, not
16216         hack_decl_function_context.
16217         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
16218         (start_static_initialization_or_destruction): Likewise.
16219         (finish_static_initialization_or_destruction): Likewise.
16220         (mark_used): Adjust logic for deciding when to synthesize methods.
16221         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
16222         DECL_REAL_CONTEXT.
16223         * error.c (dump_function_decl): Use DECL_CONTEXT, not
16224         DECL_CLASS_CONTEXT.
16225         * friend.c (is_friend): Likewise.
16226         (add_friends): Remove.
16227         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
16228         * lex.c (begin_definition_of_inclass_inline): Use
16229         decl_function_context, not hack_decl_function_context.
16230         (process_next_inline): Likewise.
16231         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
16232         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
16233         DECL_CLASSS_CONTEXT.
16234         (hack_identifier): Likewise.
16235         (synthesize_method):  Use decl_function_context, not
16236         hack_decl_function_context.
16237         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
16238         DECL_REAL_CONTEXT.
16239         (is_member_template): Use decl_function_context, not
16240         hack_decl_function_context.  Use DECL_CONTEXT, not
16241         DECL_CLASS_CONTEXT.
16242         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
16243         DECL_CLASS_CONTEXT.
16244         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
16245         DECL_REAL_CONTEXT.
16246         (push_template_decl_real): Likewise.
16247         (instantiate_class_template): Don't call add_friends.
16248         (tsubst_default_argument): Use DECL_CONTEXT, not
16249         DECL_REAL_CONTEXT.
16250         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
16251         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
16252         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
16253         DECL_CLASS_CONTEXT.
16254         * repo.c (repo_inline_used): Likewise.
16255         * search.c (current_scope): Adjust for new _CONTEXT macros.
16256         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
16257         DECL_REAL_CONTEXT.
16258         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
16259         (lookup_fnfields_here):Likewise.
16260         (check_final_overrider): Likewise.
16261         (init_vbase_pointers): Likewise.
16262         (virtual_context): Likewise.
16263         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
16264         (expand_body): Use decl_function_context, not
16265         hack_decl_function_context.
16266         * tree.c (hack_decl_function_context): Remove.
16267         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
16268         DECL_CLASS_CONTEXT.
16269         * typeck2.c (error_not_base_type): Likewise.
16270
16271 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
16272
16273         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
16274
16275 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16276
16277         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
16278
16279 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
16280
16281         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
16282
16283 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
16284
16285         * decl2.c (lang_decode_option): Enable automatic line wrapping.
16286
16287 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
16288
16289         * parse.y (frob_specs): Split out...
16290         (parse_decl): From here.
16291         (fn.def2): Call initial_deferred_type_access_control.
16292         (after_type_component_declarator0): Call frob_specs.
16293         (notype_component_declarator0): Likewise.
16294         * search.c (friend_accessible_p): Nested classes are friends of their
16295         enclosing classes.
16296
16297 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
16298
16299         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
16300         used to create an implicit temporary.
16301
16302         * class.c (dfs_modify_vtables): Tweak calculation of functions to
16303         override.
16304
16305 2000-02-08  Nathan Sidwell  <nathan@acm.org>
16306
16307         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
16308         strip array element qualifiers too.
16309
16310 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
16311
16312         * decl.c (store_parm_decls): Don't build cleanups for parameters
16313         while processing_template_decl.
16314
16315 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
16316
16317         * cp-tree.h (struct saved_scope): Add incomplete field.
16318         (namespace_scope_incomplete): New macro.
16319         * decl.c (pushdecl): Use it.
16320         (hack_incomplete_structures): Use it.  See through artificial
16321         binding levels.
16322         (mark_saved_scope): Mark it.
16323
16324         Implement access control for nested types.
16325         * search.c (type_access_control): New fn.
16326         (accessible_p): Now we do perform access control for types.
16327         * semantics.c (deferred_type_access_control): New fn.
16328         (initial_deferred_type_access_control): New fn.
16329         (begin_function_definition): Call it.  Add lookups parm.
16330         * decl.c (struct binding_level): Add this_class field.
16331         (pushlevel_class): Set it.
16332         (mark_binding_level): Mark it.
16333         (lookup_name_real): Use it.  Call type_access_control.
16334         (mark_saved_scope): Mark lookups field.
16335         * cp-tree.h (flagged_type_tree): Add lookups field.
16336         (struct saved_scope): Add lookups field.
16337         (type_lookups): New macro.
16338         * parse.y (declmods): Now <ftype>.
16339         (parse_decl): Add lookups parm.  Call
16340         initial_deferred_type_access_control.
16341         (lang_extdef): Clear type_lookups.
16342         (typed_declspecs, declmods, typespec): Set lookups field.
16343         (initdcl): Call deferred_type_access_control.
16344         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
16345         component_decl_1, named_parm): Adjust.
16346         * friend.c (is_friend): Nested classes are friends of their
16347         enclosing classes.
16348
16349         * class.c (currently_open_derived_class): New fn.
16350         * method.c (hack_identifier): Use it.
16351
16352         * lex.c (do_identifier): Remove obsolete code.
16353
16354         * parse.y (typed_typespecs): Propagate new_type_flag properly.
16355
16356 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
16357
16358         * tinfo.h: Remove apostrophes from C++ comment (xgettext
16359         thinks this file is plain C).
16360
16361 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16362
16363         * Makefile.in (call.o): Depend on $(EXPR_H).
16364
16365         * call.c: Include "expr.h".
16366
16367         * class.c (dump_class_hierarchy): Add prototype.
16368
16369         * search.c (dfs_get_pure_virtuals): Likewise.
16370
16371 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
16372
16373         * parse.y (simple_stmt): Allow :: token in asm parameter list.
16374         * parse.c: Rebuilt.
16375
16376 Mon Jan 31 15:35:29 2000  Jim Wilson  <wilson@cygnus.com>
16377
16378         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
16379         Store it in DECL_FCONTEXT.
16380         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
16381
16382 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
16383
16384         * tinfo.h (old abi): #include "tconfig.h".
16385         * tinfo.cc (convert_to_base): Move into old abi section.
16386
16387 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
16388
16389         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
16390         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
16391         (BINFO_PRIMARY_BINFO): New macro.
16392         (BF_DELTA): Rename to ...
16393         (BV_DELTA): ... this.
16394         (BF_VCALL_INDEX): Rename to ...
16395         (BV_VCALL_INDEX): ... this.
16396         (BF_FN): Rename to ...
16397         (BV_FN): ... this.
16398         * class.c (build_vbase_path): Adjust for changes to reverse_path.
16399         (set_rtti_entry): Rename BF_ macros to BV_ variants.
16400         (modify_vtable_entry): Simplify.
16401         (add_virtual_function): Rename BF_ macros to BV_ variants.
16402         (build_vtable_initializer): Likewise.
16403         (get_class_offset_1): Remove.
16404         (dfs_get_class_offset): Likewise.
16405         (get_class_offset): Likewise.
16406         (dfs_find_final_overrider): New function.
16407         (find_final_overrider): Likewise.
16408         (modify_one_vtable): Remove.
16409         (dfs_find_base): New function.
16410         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
16411         find_final_overrider.
16412         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
16413         virtuals.
16414         (dfs_fixup_vtable_deltas): Remove.
16415         (override_one_vtable): Remove.
16416         (merge_overrides): Likewise.
16417         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
16418         unreal chilren of virtual bases.
16419         (finish_struct_1): Don't use merge_overrides.  Don't use
16420         dfs_fixup_vtable_deltas.
16421         * tree.c (reverse_path): Return a TREE_LIST, not a chain of
16422         BINFOs.
16423
16424 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
16425             Jason Merrill  <jason@yorick.cygnus.com>
16426
16427         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
16428
16429 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
16430
16431         * exception.cc (__throw_bad_typeid): Add missing std::.
16432
16433 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16434
16435         * cp-tree.h (make_thunk): PROTO -> PARAMS.
16436
16437 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
16438
16439         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
16440
16441         Runtime support for new-abi rtti.
16442         * inc/typeinfo (type_info::operator!=): Define in class.
16443         (type_info::before, type_info::name, type_info::operator==,
16444         type_info::operator!=): Define new ABI implementations.
16445         (type_info::is_pointer_p, type_info::is_function_p): Declare
16446         new virtual functions.
16447         (type_info::do_catch, type_info::do_upcast): Likewise.
16448
16449         * tinfo.h (__base_class_info): Define new class.
16450         (__class_type_info): Likewise.
16451         (__si_class_type_info): Likewise.
16452         (__vmi_class_type_info): Likewise.
16453         (__dynamic_cast): Prototype.
16454
16455         * tinfo.cc: Conditionalize old and new rtti mechanisms.
16456         (type_info::is_pointer_p): Define new function.
16457         (type_info::is_function_p): Likewise.
16458         (type_info::do_catch): Likewise.
16459         (type_info::do_upcast): Likewise.
16460         (vtable_prefix): New structure for vtable access.
16461         (adjust_pointer): Define new template function.
16462         (contained_p, public_p, virtual_p, contained_public_p,
16463         contained_nonpublic_p, contained_nonvirtual_p): Define new
16464         functions.
16465         (nonvirtual_base_type): New local variable.
16466         (__class_type_info::~__class_type_info): Define.
16467         (__si_class_type_info::~__si_class_type_info): Likewise.
16468         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
16469         (__class_type_info::do_catch): Define new function.
16470         (__class_type_info::do_upcast): Likewise.
16471         (__class_type_info::find_public_src): Likewise.
16472         (__class_type_info::do_find_public_src): Likewise.
16473         (__si_class_type_info::do_find_public_src): Likewise.
16474         (__vmi_class_type_info::do_find_public_src): Likewise.
16475         (__class_type_info::do_dyncast): Likewise.
16476         (__si_class_type_info::do_dyncast): Likewise.
16477         (__vmi_class_type_info::do_dyncast): Likewise.
16478         (__class_type_info::do_upcast): Likewise.
16479         (__si_class_type_info::do_upcast): Likewise.
16480         (__vmi_class_type_info::do_upcast): Likewise.
16481         (__dynamic_cast): Likewise.
16482
16483         * tinfo2.cc (__fundamental_type_info): Define new class.
16484         (__pointer_type_info): Likewise.
16485         (__reference_type_info): Likewise.
16486         (__array_type_info): Likewise.
16487         (__function_type_info): Likewise.
16488         (__enum_type_info): Likewise.
16489         (__ptr_to_member_type_info): Likewise.
16490         (__fundamental_type_info::~__fundamental_type_info): Define.
16491         (__pointer_type_info::~__pointer_type_info): Likewise.
16492         (__reference_type_info::~__reference_type_info): Likewise.
16493         (__array_type_info::~__array_type_info): Likewise.
16494         (__function_type_info::~__function_type_info): Likewise.
16495         (__enum_type_info::~__enum_type_info): Likewise.
16496         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
16497         (__pointer_type_info::do_catch): Define new function.
16498         (__ptr_to_member_type_info::do_catch): Define new function.
16499
16500         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
16501         (__is_pointer): Likewise.
16502
16503         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
16504
16505 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
16506
16507         * cp/class.c (build_vtable): Rename to build_primary_vtable.
16508         (prepare_fresh_vtable): Rename to build_secondary_vtable.
16509         (make_new_vtable): New function.
16510         (modify_vtable_entry): Handle generation of new vtables correctly.
16511         (modify_one_vtable): Remove unused parameter.
16512         (dfs_fixup_vtable_deltas): Likewise.
16513         (override_one_vtable): Use build_secondary_vtable.
16514         (finish_struct_1): Use build_primary_vtable and
16515         build_secondary_vtable.
16516
16517 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
16518
16519         * cp/decl.c: Adjust variable names, comments, help strings.
16520
16521 2000-01-29  Nathan Sidwell  <nathan@acm.org>
16522
16523         * new2.cc (operator delete[]): Use operator delete, don't assume
16524         implementation.
16525
16526 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
16527
16528         * class.c (build_vtbl_initializer): Add argument to
16529         build_vtable_entry call.
16530
16531 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
16532
16533         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
16534         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
16535         (BF_DELTA): New macro.
16536         (BF_VCALL_INDEX): Likewise.
16537         (BF_FN): Likewise.
16538         (THUNK_VCALL_OFFSET): Likewise.
16539         (make_thunk): Change prototype.
16540         * class.c (build_vtable_entry): Integrate
16541         build_vtable_entry_for_fn.  Handle vcall indices.
16542         (build_vtable_entry_for_fn): Remove.
16543         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
16544         BF_VCALL_INDEX, BF_FN.
16545         (modify_vtable_entry): Integrate common code from
16546         modify_one_vtable and dfs_fixup_vtable_deltas.
16547         (add_virtual_function): Set BF_VCALL_INDEX.
16548         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
16549         and BF_FN.
16550         (modify_one_vtable): Simplify.
16551         (dfs_fixup_vtable_deltas): Likewise.
16552         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
16553         * method.c (make_thunk): Handle vcall indices.
16554
16555 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
16556
16557         Compiler side new abi rtti (not enabled).
16558         * cp-tree.h (new_abi_rtti_p): New macro.
16559         (emit_support_tinfos): Prototype new function.
16560         (tinfo_decl_p): Likewise.
16561         (emit_tinfo_decl): Likwise.
16562         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
16563         macros.
16564         (doing_runtime): New local static.
16565         (init_rtti_processing): Add new-abi initializer.
16566         (get_tinfo_decl): Add new-abi logic.
16567         (tinfo_from_decl): Likewise.
16568         (build_dynamic_cast_1): Likewise.
16569         (qualifier_flags): New static function.
16570         (tinfo_base_init): Likewise.
16571         (generic_initializer): Likewise.
16572         (ptr_ref_initializer): Likewise.
16573         (ptmd_initializer): Likewise.
16574         (class_hint_flags): Likewise.
16575         (class_initializer): Likewise.
16576         (synthesize_tinfo_var): Likewise.
16577         (create_real_tinfo_var): Likewise.
16578         (create_pseudo_type_info): Likewise.
16579         (get_vmi_pseudo_type_info): Likewise.
16580         (create_tinfo_types): Likewise.
16581         (emit_support_tinfos): New global function.
16582         (tinfo_decl_p): New global predicate.
16583         (emit_tinfo_decl): New global function.
16584         * class.c (set_rtti_entry): Generalize for old and new rtti.
16585         (build_vtbl_initializer): Likewise.
16586         * decl2.c (finish_file): Likewise.
16587
16588 Thu Jan 27 20:53:36 2000  Jim Wilson  <wilson@cygnus.com>
16589
16590         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
16591         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
16592
16593 Thu Jan 27 13:54:12 2000  Mike Stump  <mrs@wrs.com>
16594
16595         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
16596         for scopes.
16597
16598 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
16599
16600         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
16601
16602 Wed Jan 26 22:19:14 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
16603
16604         * optimize.c (calls_setjmp_r): Supply new argument
16605         to special_function_p.
16606
16607 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16608
16609         * call.c: PROTO -> PARAMS.
16610         * class.c: Likewise.
16611         * cp-tree.h: Likewise.
16612         * cvt.c: Likewise.
16613         * decl.c: Likewise.
16614         * decl.h: Likewise.
16615         * decl2.c: Likewise.
16616         * dump.c: Likewise.
16617         * errfn.c: Likewise.
16618         * error.c: Likewise.
16619         * except.c: Likewise.
16620         * expr.c: Likewise.
16621         * init.c: Likewise.
16622         * input.c: Likewise.
16623         * lex.c: Likewise.
16624         * lex.h: Likewise.
16625         * method.c: Likewise.
16626         * optimize.c: Likewise.
16627         * parse.y: Likewise.
16628         * pt.c: Likewise.
16629         * repo.c: Likewise.
16630         * rtti.c: Likewise.
16631         * search.c: Likewise.
16632         * semantics.c: Likewise.
16633         * spew.c: Likewise.
16634         * tree.c: Likewise.
16635         * typeck.c: Likewise.
16636         * typeck2.c: Likewise.
16637         * xref.c: Likewise.
16638
16639 2000-01-25  Richard Henderson  <rth@cygnus.com>
16640
16641         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
16642
16643 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
16644
16645         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
16646         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
16647         (struct vcall_offset_data_s): New type.
16648         (dfs_vcall_offset_queue_p): New function.
16649         (dfs_build_vcall_offset_vtbl_entries): Likewise.
16650         (build_vcall_offset_vtbl_entries): Likewise.
16651         (layout_vtable_decl): Likewise.
16652         (num_vfun_entries): Likewise.
16653         (num_extra_vtbl_entries): Add the entries for vcall offsets.
16654         (build_vtbl_initializer): Likewise.
16655         (dfs_finish_vtabls): Use layout_vtable_decl.
16656         (modify_one_vtables): Always duplicate vtables under the new ABI.
16657         (finish_struct_1): Use layout_vtable_decl.
16658
16659 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16660
16661         * decl.c (member_function_or_else): Change third arg from a format
16662         specifier to an `enum overload_flags'.  Callers changed.
16663
16664 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
16665
16666         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
16667         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
16668         build_const_cast, get_delta_difference, check_return_expr): Avoid
16669         ANSI string concatenation usage.
16670
16671 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
16672
16673         * class.c (layout_class_type): Put the fields required to make a
16674         class non-empty at the end, not the beginning, of the TYPE_FIELDs
16675         list.
16676
16677 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
16678
16679         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
16680         template.
16681
16682         * decl2.c (mark_used): Do instantiate inlines that have been
16683         explicitly instantiated.
16684
16685 2000-01-24  Richard Henderson  <rth@cygnus.com>
16686
16687         * call.c (build_over_call): Use expand_tree_builtin.
16688         * typeck.c (build_function_call_real): Likewise.
16689         (build_binary_op_nodefault): Handle unordered compares.
16690
16691 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
16692
16693         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
16694         cp_tree_index values.
16695         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
16696         New global node #defines for them.
16697         * rtti.c (call_void_fn): Replace with ...
16698         (build_runtime_decl): ... new static function.
16699         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
16700         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
16701         (build_dynamic_cast_1): Always produce correctly typed result.
16702         Explicitly produce type_info addresses. Use dynamic_cast_node.
16703         * exception.cc (__throw_bad_cast): Return `void *'.
16704         (__throw_bad_typeid): Return `const type_info &'.
16705
16706 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
16707
16708         * cp-tree.h (get_vtable_decl): Prototype new function.
16709         * class.c (get_vtable_decl): New function. Broken out from ...
16710         (build_vtable): ... here. Use it.
16711         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
16712         by get_vtable_decl.
16713
16714 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
16715
16716         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
16717         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
16718         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
16719         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
16720         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
16721         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
16722         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
16723         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
16724         (CPTI_TINFO_VAR_ID): New enumeration.
16725         (__tp_desc_type_node, __access_mode_type_node,
16726         __bltn_desc_type_node, __user_desc_type_node,
16727         __class_desc_type_node, __ptr_desc_type_node,
16728         __attr_desc_type_node, __func_desc_type_node,
16729         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
16730         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
16731         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
16732         enum_desc_type_node, class_desc_type_node,
16733         si_class_desc_type_node, vmi_class_desc_type_node,
16734         ptmd_desc_type_node, base_desc_type_node): New #defines.
16735         (tinfo_fn_id, tinfo_fn_type): Rename to ...
16736         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
16737         (tinfo_var_id): New enumeration.
16738         (DECL_TINFO_FN_P): Augment comment.
16739         * decl.c (cp_global_trees): Adjust documentation.
16740         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
16741         tinfo_decl_type and tinfo_var_id.
16742         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
16743         (build_typeid): Remove unused variable.
16744         (get_tinfo_var): Use tinfo_var_id.
16745         (tinfo_name): New static function.
16746         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
16747         (tinfo_from_decl): Likewise.
16748         (get_base_offset): New static function, broken out of
16749         expand_class_desc.
16750         (expand_si_desc): Use tinfo_name.
16751         (expand_class_desc): Likewise. Lose local static variable.
16752         Use base_desc_type_node. Use get_base_offset.
16753         (expand_ptr_desc): Use tinfo_name.
16754         (expand_attr_desc): Likewise.
16755         (expand_generic_desc): Likewise.
16756
16757         * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
16758         * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
16759
16760 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
16761
16762         * cp-tree.h (__eprintf): Remove declaration.
16763         * tree.c (__eprintf): Remove definition.
16764
16765 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
16766             Mark Mitchell  <mark@codesourcery.com>
16767
16768         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
16769         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
16770
16771 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
16772
16773         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
16774
16775 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
16776
16777         * cp-tree.h (register_dtor_fn): New function.
16778         * decl.c (destroy_local_static): Rename to ...
16779         (register_dtor_fn): ... this.  Give it external linkage.
16780         (expand_static_init): Use it.
16781         * decl2.c (do_static_initialization): Likewise, if using
16782         __cxa_atexit.
16783         (do_static_destruction): Check that __cxa_atexit is not in use.
16784         (finish_file): Don't call do_static_destruction if using
16785         __cxa_atexit.
16786
16787         * typeck.c (convert_arguments): Restore two-message error
16788         reporting.
16789
16790 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
16791
16792         Remap dynamic cast hint values to be consistent across ABIs.
16793         * search.c (dynamic_cast_base_recurse): Remap generated value.
16794         (get_dynamic_cast_base_type): Adjust documentation.
16795         * tinfo.h (__user_type_info::dyncast): Likewise.
16796         (__user_type_info::find_public_subobj): Remap BOFF meaning.
16797         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
16798         (__class_type_info::do_dyncast): Likewise.
16799         (__class_type_info::do_find_public_subobj): Likewise.
16800         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
16801
16802 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
16803
16804         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
16805
16806         * typeck2.c (incomplete_type_error): Restore previous
16807         cp_error and cp_error_at call sequence.
16808
16809 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
16810
16811         * class.c (dump_class_hierarchy): Make format agree with argument;
16812         cast pointer to unsigned long and print with %lx.
16813
16814 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
16815
16816         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
16817
16818         * typeck.c (composite_pointer_type, common_type,
16819         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
16820         build_function_call_real, convert_arguments,
16821         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
16822         build_unary_op, mark_addressable, build_compound_expr,
16823         build_static_cast, build_reinterpret_cast, build_const_cast,
16824         build_c_cast, build_modify_expr, get_delta_difference,
16825         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
16826         'ISO C++'.  Fusion consecutive calls to diagnostic message routines
16827         into a single one.
16828         * typeck2.c (readonly_error, abstract_virtuals_error,
16829         process_init_constructor, check_for_new_type): Likewise.
16830
16831 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
16832
16833         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
16834         VAR_DECLs.
16835
16836 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
16837
16838         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
16839         (build_x_typeid): Likewise.
16840         (get_tinfo_fn): Likewise.
16841         (get_tinfo_fn_unused): Rename to ...
16842         (get_tinfo_decl): ... here.
16843         * rtti.c (build_headof): Replace logic error with assertion.
16844         (get_tinfo_fn_dynamic): Rename to ...
16845         (get_tinfo_decl_dynamic): ... here. Make static. Use
16846         complete_type_or_else.
16847         (build_x_typeid): Move into ...
16848         (build_typeid): ... here. Adjust call to
16849         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
16850         throw_bad_typeid expression.
16851         (get_tinfo_fn_unused): Rename to ...
16852         (get_tinfo_decl): ... here. Adjust comment.
16853         (get_tinfo_fn): Delete.
16854         (tinfo_from_decl): New static function.
16855         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
16856         (get_typeid): Use complete_type_or_else.
16857         (build_dynamic_cast_1): Adjust calls to
16858         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
16859         * parse.y (primary): Adjust call to build_typeid.
16860         * except.c (build_eh_type_type_ref): Adjust call to
16861         get_tinfo_decl. Mark as used.
16862         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
16863         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
16864         * parse.c: Regenerated.
16865
16866 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
16867
16868         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
16869         calling convention.
16870         (resolves_to_fixed_type_p): Document calling convention.
16871         * rtti.c (build_x_typeid): Initialize NONNULL.
16872
16873         * cp-tree.h (build_shared_int_cst): New function.
16874         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
16875         * class.c (modify_vtable_entry): Likewise.
16876         (add_virtual_function): Split out code to generated shared
16877         INTEGER_CSTs to build_share_int_cst.
16878         (modify_all_vtables): Handle all the overridden functions here.
16879         Add overridden functions from non-primary virtual bases to the
16880         primary vtable.
16881         (finish_struct_1): Adjust call to modify_all_vtables.  Add
16882         overridden functions from non-primary bases to the vtable.
16883         * tree.c (build_shared_int_cst): New function.
16884
16885         * cp-tree.h (scratchalloc): Remove.
16886         (build_scratch_list): Likewise.
16887         * call.c (convert_class_to_reference): Replace build_scratch_list
16888         and build_expr_list with build_tree_list.
16889         (add_candidate): Replace scratchalloc with expralloc.  Note memory
16890         leak.
16891         (build_user_type_conversion_1):  Replace build_scratch_list
16892         and build_expr_list with build_tree_list.
16893         (build_new_op): Likewise.
16894         (build_op_delete_call): Likewise.
16895         (convert_like): Likewise.
16896         * cvt.c (ocp_convert): Likewise.
16897         * decl.c (start_decl): Likewise.
16898         (start_function): Likewise.
16899         (finish_destructor_body): Likewise.
16900         (maybe_build_cleanup_1): Likewise.
16901         * decl2.c (reparse_decl_as_expr): Likewise.
16902         * init.c (perform_member_init): Likewise.
16903         (expand_cleanup_for_base): Likewise.
16904         (build_builtin_delete_call): Likewise.
16905         (build_new_1): Likewise.
16906         (build_delete): Likewise.
16907         * method.c (do_build_assign_ref): Likewise.
16908         * parse.y (already_scoped_stmt): Likewise.
16909         (nontrivial_exprlist): Likewise.
16910         (net_initializer): Likewise.
16911         (initlist): Likewise.
16912         * parse.c: Regenerated.
16913         * rtti.c (build_x_typeid): Likewise.
16914         (build_dynamic_cast_1): Likewise.
16915         * typeck.c (build_x_compound_expr): Likewise.
16916         (build_static_cast): Likewise.
16917         (build_modify_expr): Likewise.
16918
16919         * cp-tree.h (DECL_VINDEX): Add documentation.
16920         * class.c (build_vtable_entry): Likewise.
16921         (start_vtable): Add comment.
16922         (add_virtual_function): Replace pending_hard_virtuals with
16923         overridden_virtuals and pending_virtuals with new_virtuals.
16924         Replace redundant assignments with assertions.
16925         (check_for_override): Add comment.
16926         (check_bases_and_members): Replace pending_hard_virtuals with
16927         overridden_virtuals and pending_virtuals with new_virtuals.
16928         (create_vtbl_ptr): Likewise.
16929         (layout_class_type): Likewise.
16930         (finish_struct_1): Likewise.  Add comments.
16931
16932 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
16933
16934         * class.c (finish_struct_1): Replace redundant code with
16935         assertions.
16936
16937         * cp-tree.h (flag_new_abi): Move.
16938         (flag_use_cxa_atexit): Likewise.
16939         (flag_honor_std): Likewise.
16940         (flag_rtti): Likewise.
16941         (vbase_offsets_in_vtable_p): Define.
16942         (vptrs_present_everywhere_p): Likewise.
16943         (TYPE_CONTAINS_VPTR_P): Likewise.
16944         (dfs_walk_real): Declare.
16945         * class.c (build_vbase_pointer_fields): Check
16946         vbase_offsets_in_vtable_p.
16947         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
16948         BINFO_VPTR_FIELD.
16949         (build_vbase_offset_vtbl_entries): Simplify.
16950         (build_vbase_offset_vtbl_entries): Adjust.
16951         (build_vbase_pointer): Add ability to look up vbase offsets in
16952         vtable.
16953         (start_vtable): New function.
16954         (add_virtual_function): Use it.
16955         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
16956         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
16957         (build_vtbl_initializer): Take the type of the complete object as
16958         input.  Use it to correctly calculate vbase offsets.
16959         (dfs_finish_vtbls): Pass the complete type to
16960         build_vtbl_initializer.
16961         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
16962         (create_vtable_ptr): Create a vtable even if there are no
16963         new virtual functions, under the new ABI.
16964         (finish_struct_1): Likewise.
16965         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
16966         * decl.c (exapnd_static_init): Remove call to
16967         preserve_initializer.
16968         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
16969         vtables.
16970         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
16971         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
16972         (construct_virtual_bases): Don't initialize virtual base pointers
16973         under the new ABI.
16974         (build_aggr_init): Clean up comment.
16975         (expand_aggr_init_1): Likewise.
16976         * rtti.c (expand_class_desc): Store the virtual function table
16977         index where the vbase offset lives in the offset field.
16978         * search.c (dfs_walk_real): Make it global.
16979         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
16980         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
16981
16982         * tinfo.h (USItype): Make it signed under the new ABI.
16983         * tinfo.cc (convert_to_base): New function.  Encapsulate base
16984         conversion logic here.
16985         (__class_type_info::do_upcast): Use it.
16986         (__class_type_info::do_dyncast): Likewise.
16987         (__class_type_info::do_find_public_subobj): Likewise.
16988
16989         * init.c (construct_virtual_bases): Don't look up the addresses of
16990         virtual bases at run-time.
16991
16992         * class.c (build_vbase_pointer): Relocate.
16993         (build_vbase_pointer_fields): Likewise.
16994         (dfs_build_vbase_offset_vtbl_entries): Likewise.
16995         (build_vbase_offset_vtbl_entries): Likewise.
16996
16997         * decl.c (init_decl_processing): Complain if -fnew-abi
16998         -fno-vtable-thunks is used.
16999
17000         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
17001         flag_new_abi.
17002
17003 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
17004
17005         * cp-tree.h (num_extra_vtbl_entries): New function.
17006         (size_extra_vtbl_entries): Likewise.
17007         (dfs_vtable_path_unmark): Likewise.
17008         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
17009         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
17010         * class.c (num_extra_vtbl_entries): New function.
17011         (size_extra_vtbl_entries): Likewise.
17012         (dfs_build_vbase_offset_vtbl_entries): New function.
17013         (build_vbase_offset_vtbl_entries): Likewise.
17014         (build_vtbl_initializer): Use it.
17015         (finish_struct_1): Adjust vtable sizes (using
17016         num_extra_vtbl_entries).
17017         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
17018         THUNK_DECL is non-NULL before expanding it.
17019         * init.c (expand_virtual_init): Adjust the vtable pointer by
17020         size_extra_vtbl_entries before storing it.
17021         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
17022         Handle TREE_LIST parameters here, not in the dfs_* functions.
17023         (dfs_unmarked_real_bases_queue_p): Adjust.
17024         (dfs_marked_real_bases_queue_p): Likewise.
17025         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
17026         (dfs_vtable_path_marked_real_bases_queue_p): New function.
17027         (dfs_vtable_path_unmark): Likewise.
17028
17029 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
17030
17031         * optimize.c (copy_body_r): Clear the operand three of a
17032         TARGET_EXPR when copying it.
17033
17034 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
17035
17036         * method.c (build_decl_overload_real): Check whether we are in ::
17037         before returning __builtin_new/delete.
17038
17039 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
17040
17041         * pt.c (tsubst_friend_function): Improve comment.
17042         (instantiate_decl): Avoid crashing when a "nested" function is
17043         instantiated from the top level.
17044
17045         * dump.c (dqeueue_and_dump): Dump
17046         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
17047
17048 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17049
17050         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
17051
17052 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
17053
17054         * g++spec.c (lang_specific_driver): Add -fnew-abi if
17055         ENABLE_NEW_GXX_ABI defined.
17056         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
17057         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
17058         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
17059
17060 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
17061
17062         * decl.c (start_cleanup_fn): Call pushdecl.
17063
17064         * call.c (convert_class_to_reference): Fix typos.
17065         (build_conditional_expr): Handle errors gracefully.
17066         * class.c (push_nested_class): Likewise.
17067         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
17068         (DECL_THIS_EXTERN): Use it.
17069         (DECL_THIS_STATIC): Likewise.
17070         * cvt.c (convert_to_void): Handle errors gracefully.
17071         (build_expr_type_conversion): Likewise.
17072         * decl.c (maybe_push_decl): Likewise.
17073         (start_decl_1): Likewise.
17074         (require_complete_types_for_parms): Likewise.
17075         * parse.y (structsp): Likewise.
17076         (base_class): Likewise.
17077         * parse.c: Regenerated.
17078         * pt.c (finish_member_template_decl): Likewise.
17079         * typeck.c (decay_conversion): Likewise.
17080
17081         * cp-tree.h (dfs_skip_vbases): New function.
17082         (find_vbase_instance): Likewise.
17083         * class.c (determine_primary_base): Allow a nearly empty base to
17084         serve as a primary base class under the new ABI.
17085         (get_class_offset_1): Rename to ...
17086         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
17087         messages here.
17088         (get_class_offset): Use it.  Issue error messages here.
17089         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
17090         find the right copies of virtual bases.
17091         (fixup_vtable_deltas1): Rename to ...
17092         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
17093         bases as primary bases.
17094         (fixup_vtable_deltas): Remove.
17095         (override_one_vtable): Handle virtual bases as primary bases.
17096         (merge_overrides): Likewise.
17097         (finish_struct_1): Likewise.
17098         (dump_class_hierarchy): Dump primary-ness of bases as well.
17099         * search.c (mark_primary_bases): Use a pre-order traversal to
17100         handle primary virtual bases.
17101         (dfs_skip_vbases): New fiunction.
17102         (expand_upcast_fixups): Adjust to handle primary virtual bases.
17103         (fixup_virtual_upcast_offsets): Likewise.
17104         (fixup_all_virtual_upcast_offsets): Likewise.
17105         (dfs_find_vbase_instances): New function.
17106         (find_vbase_instance): Likewise.
17107
17108 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
17109
17110         * lex.c (DIR_SEPARATOR): Delete macro.
17111
17112 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
17113
17114        * decl2.c (lang_decode_option): Handle automatic line wrapping
17115        option.
17116
17117 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
17118
17119         * friend.c (do_friend): Don't resolve scopes when processing
17120         template declarations, even if the qualifying scope doesn't
17121         involve template parameters.
17122
17123 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
17124
17125         * class.c (dfs_modify_vtables_queue_p): Remove.
17126         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
17127         and dfs_marked_real_bases_queue_p instead of
17128         dfs_modify_vtables_queue_p.
17129
17130         * class.c (build_vbase_path): Simplify.
17131         (dfs_propagate_binfo_offsets): New function.
17132         (propagate_binfo_offsets): Use it.
17133         (remove_base_field): Simplify.
17134         (dfs_set_offset_for_vbases): Remove.
17135         (dfs_set_offset_for_shared_vbases): New function.
17136         (dfs_set_offset_for_unshared_vbases): Likewise.
17137         (layout_virtual_bases): Use them.
17138         (layout_basetypes): Don't call propagate_binfo_offsets.
17139         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
17140         for the vbases.
17141
17142         * class.c (build_base_field): New function, split out from ...
17143         (build_base_fields): ... here.  Use it.  Allocate primary bases
17144         first, under the new ABI.
17145         (get_vtable_entry): Remove.
17146         (remove_base_field): New function, split out from ...
17147         (remove_base_fields): ... here.  Adjust since primary bases come
17148         first under the new ABI.
17149
17150         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
17151         (initialize_vtbl_ptrs): New function.
17152         (expand_indirect_vtbls_init): Change prototype.
17153         (convert_pointer_to_vbase): Declare.
17154         * init.c (expand_direct_vtbls_init): Remove.
17155         (dfs_initialize_vtbl_ptrs): New function.
17156         (initialize_vtbl_ptrs): Likewise.
17157         (emit_base_init): Use initialize_vtbl_ptrs.
17158         * search.c (convert_pointer_to_vbase): Make it global.
17159         (expand_indirect_vtbls_init): Remove vtable initialization code.
17160         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
17161
17162         * class.c (dfs_finish_vtbls): New function.
17163         (finish_vtbls): Use it.
17164         (dump_class_hierarchy): New function.
17165
17166         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
17167         (BINFO_VBASE_PRIMARY_P): New macro.
17168         (BINFO_VIRTUALS): Add to documentation.
17169         (SET_BINFO_PRIMARY_MARKED_P): Remove.
17170         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
17171         (dfs_mark_primary_bases_queue_p): Likewise.
17172         (dfs_unmarked_real_bases_queue_p): New function.
17173         (dfs_marked_real_bases_queue_p): Likewise.
17174         * search.c (dfs_mark_primary_bases): Adjust.
17175         (mark_primary_bases): Likewise.
17176         (get_shared_vbase_if_not_primary): New function.
17177         (dfs_unmarked_real_bases_queue_p): Likewise.
17178         (dfs_marked_real_bases_queue_p): Likewise.
17179         (dfs_get_pure_virtuals): Simplify.
17180         (get_pure_virtuals): Likewise.
17181
17182 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17183
17184         * lex.c: Include tm_p.h.
17185
17186 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
17187
17188         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
17189
17190 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
17191
17192         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
17193         * pt.c (instantiate_decl): Defer comdat templates that might not be
17194         needed.
17195
17196         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
17197         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
17198         (finish_file): Likewise.
17199
17200         * decl2.c (import_export_class): Undo 12/14 change.
17201
17202         * error.c (dump_decl): operator new, not operatornew.
17203
17204         * class.c (field_decl_cmp): A nontype is "greater" than a type.
17205         * search.c (lookup_field_1): Look for the last field with the
17206         desired name.
17207
17208 2000-01-05  Nathan Sidwell  <nathan@acm.org>
17209
17210         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
17211         FUNCTION_DECL.
17212
17213 2000-01-05  Nathan Sidwell  <nathan@acm.org>
17214
17215         * typeck.c (build_static_cast): Don't strip target qualifiers
17216         when casting from a class.
17217
17218 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17219
17220         * class.c (warn_hidden): Initialize variable `fndecl'.
17221
17222 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
17223
17224         * decl.c (flag_isoc9x): New variable to be able to use code in
17225         c-common.c.  For now always zero.
17226
17227 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
17228
17229         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
17230         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
17231         or unshare_base_binfos for virtual bases here.
17232         * search.c (dfs_get_vbase_types): Do it here.
17233         (get_vbase_types): Adjust.
17234
17235 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
17236
17237         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
17238         (BINFO_PRIMARY_MARKED_P): Use flag 5.
17239         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
17240         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
17241         (unmark_primary_bases): Remove declaration.
17242         (unmarkedp): Declare.
17243         (dfs_vbase_unmark): Likewise.
17244         * class.c (determine_primary_base): Return immediately if there
17245         are no base classes.  Call mark_primary_bases here.
17246         (modify_all_direct_vtables): Remove.
17247         (modify_all_indirect_vtables): Remove.
17248         (dfs_modify_vtables_queue_p): New function.
17249         (dfs_modify_vtables): New function.
17250         (modify_all_vtables): Use them.
17251         (build_base_fields): Build FIELD_DECLs for primary virtual base
17252         classes.
17253         (create_vtable_ptr): Don't call determine_primary_base here.
17254         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
17255         (dfs_set_offset_for_vbases): ... this.
17256         (layout_virtual_bases): Use it.
17257         (layout_class_type): Call determine_primary_base here.
17258         * search.c (unmarkedp): Make it global.
17259         (shared_marked_p): Simplify.
17260         (shared_unmarked_p): Likewise.
17261         (dfs_primary_bases_queue_p): Remove.
17262         (dfs_unmark_primary_bases): Likewise.
17263         (unmark_primary_bases): Likewise.
17264         (mark_primary_bases): Simplify.
17265         (get_pure_virtuals): Don't call mark_primary_bases here.
17266         (dfs_vbase_unmark): New function.
17267         (get_vbase_types): Simplify.
17268
17269         * class.c (struct base_info): Remove.
17270         (determine_primary_base): Take has_virtual_p rather than a
17271         base_info as input.  Don't calculate max_has_virtual.
17272         (finish_struct_bits): Remove max_has_virtual argument.
17273         (create_vtable_ptr): Remove max_has_virtual_p argument.
17274         (layout_virtual_bases): Remove max argument.
17275         (layout_basetypes): Likewise.
17276         (layout_class_type): Remove max_has_virtual_p argument.
17277         (finish_struct_1): Remove max_has_virtual.
17278
17279         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
17280         (layout_basetypes): Remove.
17281         * class.c (propagate_binfo_offsets): Moved here from tree.c.
17282         Update to handle primary virtual bases.
17283         (remove_base_fields): New function, split out from
17284         layout_basetypes.
17285         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
17286         (layout_virtual_bases): New function, split out from
17287         layout_basetypes.  Update to handle primary virtual bases.
17288         (layout_basetypes): Moved here from tree.c.  Use
17289         remove_base_fields and layout_virtual_bases.
17290         * search.c (dfs_mark_primary_bases_queue_p): New function.
17291         (mark_primary_bases): Use it.
17292         * tree.c (CEIL): Remove.
17293         (propagate_binfo_offsets): Remove.
17294         (layout_basetypes): Remove.
17295
17296 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
17297
17298         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
17299         (BINFO_PRIMARY_MARKED_P): New macro.
17300         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
17301         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
17302         (mark_primary_bases): New function.
17303         (unmark_primary_bases): Likewise.
17304         * search.c (get_abstract_virtuals_1): Remove.
17305         (dfs_mark_primary_bases): New function.
17306         (mark_primary_bases): Likewise.
17307         (dfs_unmark_primary_bases): Likewise.
17308         (unmark_primary_bases): Likewise.
17309         (dfs_get_pure_virtuals): Likewise.
17310
17311 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
17312
17313         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
17314         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
17315         (modify_one_vtable): Adjust.
17316         (fixup_vtable_deltas1): Likewise.
17317         (override_one_vtable): Likewise.
17318         * search.c (get_abstract_virtuals_1): Likewise.
17319         (get_pure_virtuals): Likewise.
17320         (expand_upcast_fixups): Likewise.
17321         * tree.c (debug_binfo): Likewise.
17322
17323         * class.c (build_vtable): Don't return a value.  Don't rebuild
17324         vtables for bases that have already been handled.
17325         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
17326         already been handled.
17327         (modify_one_vtable): Adjust accordingly.
17328         (fixup_vtable_deltas1): Likewise.
17329         (finish_struct_1): Likewise.
17330
17331 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
17332
17333         * call.c (build_new_method_call): Also check destructors.