OSDN Git Service

PR c++/9924
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
2
3         PR c++/9924
4         * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
5
6 2003-03-11  Jason Merrill  <jason@redhat.com>
7
8         PR c++/9820
9         * search.c (lookup_member): Fix handling of functions in a class 
10         being defined.
11
12 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
13
14         PR c++/8700
15         * call.c (convert_class_to_reference): Adjust usage of
16         splice_viable.
17         (any_viable): Remove.
18         (splice_viable): Combine with any_viable.
19         (print_z_candidates): Avoid printing duplicates.
20         (build_user_type_conversion_1): Adjust usage of splice_viable.
21         (build_new_function_call): Likewise.
22         (build_operator_new_call): Likewise.
23         (build_object_call): Likewise.
24         (build_conditional_expr): Likewise.
25         (build_new_op): Likewise.
26         (build_new_method_call): Likewise.
27         (joust): Remove spurious comment.
28         * cp-tree.h (DECL_FRIENDLIST): Correct documentation.
29         * decl2.c (arg_assoc_class): Simplify.
30         * friend.c (add_friend): Likewise.
31
32 2003-03-11  Jason Merrill  <jason@redhat.com>
33
34         PR c++/8660
35         * decl2.c (check_classfn): A member template only matches a 
36         member template.
37
38 2003-03-11  Neil Booth  <neil@daikokuya.co.uk>
39
40         * Make-lang.in (CXX_C_OBJS): Update.
41         * lang-specs.h: Don't define __GNUG__ here.
42
43 2003-03-10  Mark Mitchell  <mark@codesourcery.com>
44
45         * call.c (perform_overload_resolution): New function.
46         (build_new_function_call): Use it.
47         (build_operator_new_call): Likewise.
48         (add_candidates): Add explicit_targs and template_only parameters.
49         (build_new_op): Adjust accordingly.
50         * cp-tree.h (build_operator_new_call): New function.
51         (build_function_call_real): Remove.
52         (build_function_call_maybe): Likewise.
53         * init.c (build_new_1): Use build_operator_new_call.
54         * typeck.c (build_function_call_real): Rename to ...
55         (build_function_call): ... this.
56
57 2003-03-10  Devang Patel  <dpatel@apple.com>
58         
59         PR c++/9394
60         * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
61
62 2003-03-10  Jason Merrill  <jason@redhat.com>
63
64         PR c++/9798
65         * decl.c (push_using_directive): Push before recursing.
66
67         PR c++/9868, c++/9524
68         * call.c (resolve_scoped_fn_name): Handle the case of a function
69         pointer member.
70
71         * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
72         argument in the pointer-to-member case.
73
74 2003-03-09  Mark Mitchell  <mark@codesourcery.com>
75
76         PR c++/9373
77         * cp-lang.c (cxx_get_alias_set): Use alias set zero for
78         pointers to member functions.
79
80         PR c++/8534
81         * decl.c (build_ptrmemfunc_type): Do not allow default arugments
82         in pointer-to-member-function types.
83
84 2003-03-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
85
86         * expr.c (cplus_expand_constant): Use C90 prototype style.
87         (cxx_expand_expr): Likewise.
88
89 2003-03-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
90
91         PR c++/9970
92         * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
93         functions.
94
95 2003-03-08  Geoffrey Keating  <geoffk@apple.com>
96
97         * lang-specs.h (c++-header): Change .pch to .gch.
98
99 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
100
101         * cp-tree.h (cxx_init): Update prototype.
102         * lex.c (cxx_init): Similarly.
103
104 2003-03-08  Mark Mitchell  <mark@codesourcery.com>
105
106         PR c++/9823
107         * cp-tree.h (begin_mem_initializers): Remove.
108         * parser.c (cp_parser_mem_initializer_list): Inline it here.
109         Do not call finish_mem_initializers if not in a constructor.
110         (cp_parser_class_head): Fix typo in error message.
111         * semantics.c (begin_mem_initializers): Remove.
112         * testsuite/g++.dg/parser/constructor1.C: New test.
113
114         PR c++/9809
115         * call.c (add_function_candidate): Skip builtin fuctions that have
116         not yet been declared.
117
118         PR c++/9982
119         * init.c (build_new_1): Correct logic for determining whether or
120         not to use an array cookie.
121
122         PR c++/9524
123         * parser.c (cp_parser_postfix_expression): Call
124         finish_non_static_data_member, even when processing_template_decl.
125
126         PR c++/9912
127         * cp-tree.h (is_ancestor): New function.
128         (handle_class_head): Change prototype.
129         * decl2.c (is_namespace_ancestor): Rename to ...
130         (namespace_anecestor): ... this.
131         (set_decl_namespace): Adjust accordingly.
132         (handle_class_head): Remove unncessary parameters.
133         * parser.c (cp_parser_class_head): Check that
134         nested-name-specifiers are used appropriately.
135         
136 2003-03-07  Mark Mitchell  <mark@codesourcery.com>
137
138         * call.c (reference_binding): Remove REF_IS_VAR parameter.
139         (implicit_conversion): Adjust call to reference_binding.
140         (make_temporary_var_for_ref_to_type): Add TYPE parameter.
141         (initialize_reference): Adjust handling for references bound to
142         rvalues.
143         * cp-tree.h (make_temporary_var_for_ref_to_temp): Change
144         prototype.
145         (real_non_cast_lvalue_p): New method.
146         * cvt.c (build_up_reference): Adjust use of
147         make_temporary_var_for_ref_to_temp.
148         * tree.c (real_non_cast_lvalue_p): New method.
149          
150 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
151
152         * except.c (init_exception_processing): Use C90 prototype style.
153         (cp_protect_cleanup_actions): Likewise.
154         (prepare_eh_type): Likewise.
155         (build_eh_type_type): Likewise.
156         (build_exc_ptr): Likewise.
157         (do_begin_catch): Likewise.
158         (dtor_nothrow): Likewise.
159         (do_end_catch): Likewise.
160         (push_eh_cleanup): Likewise.
161         (decl_is_java_type): Likewise.
162         (choose_personality_routine): Likewise.
163         (initialize_handler_parm): Likewise.
164         (expand_start_catch_block): Likewise.
165         (expand_end_catch_block): Likewise.
166         (begin_eh_spec_block): Likewise.
167         (finish_eh_spec_block): Likewise.
168         (do_allocate_exception): Likewise.
169         (do_free_exception): Likewise.
170         (wrap_cleanups_r): Likewise.
171         (stabilize_throw_expr): Likewise.
172         (build_throw): Likewise.
173         (complete_ptr_ref_or_void_ptr_p): Likewise.
174         (is_admissible_throw_operand): Likewise.
175         (nothrow_libfn_p): Likewise.
176         (can_convert_eh): Likewise.
177         (check_handlers_1): Likewise.
178         (check_handlers): Likewise.
179         
180 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
181
182         * call.c (merge_conversion_sequences): New function.
183         (build_conv): Set ICS_USER_FLAG for USER_CONVs.
184         (convert_class_to_reference): Correct handling of second
185         standard conversion sequence in a user-defined conversion
186         sequence.
187         (build_user_type_conversion_1): Use merge_conversion_sequences.
188         * cp-tree.def: Add comments for CONV nodes.
189         * rtti.c (get_tinfo_decl): Use build_address/build_nop.
190         
191 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
192
193         * error.c (init_error): Use C90 prototype style.
194         (dump_scope): Likewise.
195         (dump_qualifiers): Likewise.
196         (dump_template_argument): Likewise.
197         (dump_template_argument_list): Likewise.
198         (dump_template_parameter): Likewise.
199         (dump_template_bindings): Likewise.
200         (dump_type): Likewise.
201         (dump_typename): Likewise.
202         (class_key_or_enum): Likewise.
203         (dump_aggr_type): Likewise.
204         (dump_type_prefix): Likewise.
205         (dump_type_suffix): Likewise.
206         (dump_global_iord): Likewise.
207         (dump_simple_decl): Likewise.
208         (dump_decl): Likewise.
209         (dump_template_decl): Likewise.
210         (dump_function_decl): Likewise.
211         (dump_parameters): Likewise.
212         (dump_exception_spec): Likewise.
213         (dump_function_name): Likewise.
214         (dump_template_parms): Likewise.
215         (dump_char): Likewise.
216         (dump_expr_list): Likewise.
217         (dump_expr): Likewise.
218         (dump_binary_op): Likewise.
219         (dump_unary_op): Likewise.
220         (type_as_string): Likewise.
221         (expr_as_string): Likewise.
222         (decl_as_string): Likewise.
223         (context_as_string): Likewise.
224         (lang_decl_name): Likewise.
225         (cp_file_of): Likewise.
226         (cp_line_of): Likewise.
227         (decl_to_string): Likewise.
228         (expr_to_string): Likewise.
229         (fndecl_to_string): Likewise.
230         (code_to_string): Likewise.
231         (language_to_string): Likewise.
232         (parm_to_string): Likewise.
233         (op_to_string): Likewise.
234         (type_to_string): Likewise.
235         (assop_to_string): Likewise.
236         (args_to_string): Likewise.
237         (cv_to_string): Likewise.
238         (cxx_print_error_function): Likewise.
239         (cp_diagnostic_starter): Likewise.
240         (cp_diagnostic_finalizer): Likewise.
241         (cp_print_error_function): Likewise.
242         (function_category): Likewise.
243         (print_instantiation_full_context): Likewise.
244         (print_instantiation_partial_context): Likewise.
245         (maybe_print_instantiation_context): Likewise.
246         (print_instantiation_context): Likewise.
247         (cp_printer): Likewise.
248         (print_integer): Likewise.
249         (print_non_consecutive_character): Likewise.
250         (locate_error): Likewise.
251
252 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
253
254         PR c++/9965
255         * call.c (reference_binding): Add ref_is_var parameter.
256         (implicit_conversion): Adjust call to reference_binding.
257         (initialize_reference): Likewise.
258
259         PR c++/9400
260         * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
261         PARM_DECLs.
262
263         PR c++/9791
264         * class.c (get_basefndecls): Use lookup_fnfields_1.
265
266 2003-03-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
267
268         PR c++/9188
269         * parser.c (cp_parser_type_parameter): Remove redundant `expect'
270         in error message.
271         (cp_parser_single_declaration): Likewise.
272
273 2003-03-05  Jason Merrill  <jason@redhat.com>
274
275         PR c++/9440
276         * call.c (build_conditional_expr): Use convert rather than an
277         explicit NOP_EXPR.
278
279 2003-03-02  Matt Austern  <austern@apple.com>
280
281         * decl.c (cp_binding_level): Add static_decls varray member.
282         (add_decl_to_level): Add static/inline namespace scope
283         declarations to static_decls array.
284         (wrapup_global_for_namespace): Pass static_decls only, instead of
285         all decls, to wrapup_global_declarations/check_global_declarations.
286         (push_namespace): Initialize static_decls for ordinary namespaces.
287         (cxx_init_decl_processing): Initialize static_decls for global
288         namespace.
289         
290 2003-03-05  Mark Mitchell  <mark@codesourcery.com>
291
292         * class.c (end_of_class): Correct thinko.
293
294 2003-03-04  Nathanael Nerode  <neroden@gcc.gnu.org>
295
296         * config-lang.in: Replace ${libstdcxx_version} by its value.
297
298 2003-03-04  Gabriel Dos Reis <gdr@integrable-solutions.net>
299
300         * cp-tree.h (cxx_saved_binding): Declare.
301         (struct saved_scope): Adjust type of field 'old_binding'.
302         * decl.c (cxx_saved_binding_make): New macro.
303         (struct cxx_saved_binding): Define.
304         (store_bindings): Adjust prototype.  Use cxx_saved_binding to save
305         C++ bindings. 
306         (maybe_push_to_top_level): Adjust local variable type.
307         (pop_from_top_level): Likewise.
308         
309 2003-03-04  Tom Tromey  <tromey@redhat.com>
310
311         * Make-lang.in (c++.tags): New target.
312
313 2003-03-04  Neil Booth  <neil@daikokuya.co.uk>
314
315         * Make-lang.in: Update.
316
317 2003-03-03  Jason Merrill  <jason@redhat.com>
318
319         * decl.c (finish_enum): Do set the type in a template. Simplify.
320         * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
321
322 2003-03-03  Mark Mitchell  <mark@codesourcery.com>
323
324         PR c++/9878
325         * call.c (convert_class_to_reference): Correct conversion
326         sequences.
327         (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
328         (implicit_conversion): Adjust call to reference_binding.
329         (add_candidate): Change type of candidates parameter.
330         (add_function_candidate): Likewise.
331         (add_conv_candidate): Likewise.
332         (build_builtin_candidate): Likewise.
333         (add_builtin_candidate): Likewise.
334         (add_builtin_candidates): Likewise.
335         (add_template_candidate_real): Likewise.
336         (add_template_candidate): Likewise.
337         (add_template_conv_candidate): Likewise.
338         (build_user_type_conversion_1): Adjust accordingly.
339         (build_object_call): Likewise.
340         (build_conditional_expr): Likewise.
341         (add_candidates): Likewise.
342         (build_new_op): Likewise.
343         (convert_like_real): Use USER_CONV_CAND.  Use build_nop.
344         (build_new_method_call): Adjust calls to add_function_candidate.
345         (make_temporary_var_for_ref_to_temp): New function.
346         (initialize_reference): Add decl parameter.
347         * class.c (build_rtti_vtbl_entries): Use build_address and
348         build_nop.
349         * cp-tree.h (initialize_reference): Change prototype.
350         (make_temporary_var_for_ref_to_temp): New function.
351         (build_type_conversion): Change prototype.
352         (build_address): New function.
353         (build_nop): Likewise.
354         * cvt.c (cp_convert_to_pointer): Adjust call to
355         build_type_conversion.  Avoid indicating redundant NOP_EXPRs.
356         Use build_nop.
357         (convert_to_pointer_force): Use build_nop.
358         (build_up_reference): Use make_temporary_var_for_ref_to_temp.
359         (convert_to_reference): Adjust call to build_type_conversion.
360         (ocp_convert): Likewise.
361         (build_type_conversion): Remove for_sure parameter.
362         * decl.c (grok_reference_init): Use initialize_reference.
363         * typeck.c (build_address): New function.
364         (build_nop): Likewise.
365         (build_unary_op): Use them.
366         (build_ptrmemfunc): Tidy slightly.
367         (convert_for_initialization): Adjust call to
368         initialize_reference.
369         * typeck2.c (store_init_value): Remove #if 0'd code.
370         
371 2003-03-03  Jason Merrill  <jason@redhat.com>
372
373         * decl.c (start_function): Clear DECL_NUM_STMTS.
374
375         * class.c (get_vtable_decl): Use vtbl_type_node.
376         (build_primary_vtable): Check for it.
377
378 2003-03-02  Aldy Hernandez  <aldyh@redhat.com>
379
380         * decl.c (check_initializer): Check for vector_opaque_p.
381
382 2003-03-02  Ashif Harji  <asharji@uwaterloo.ca>
383
384         * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
385           invoke an external cpp during compilation.
386
387 2003-03-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
388
389         * decl.c (duplicate_decls): Convert use of warning_with_decl() to
390         that of warning().
391         (start_decl): Likewise.
392         (start_function): Likewise.
393
394 2003-03-01  Neil Booth  <neil@daikokuya.co.uk>
395
396         * Make-lang.in (CXX_C_OBJS): Update.
397
398 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
399
400         PR c++/9892
401         * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
402         instantiating it.
403
404 2003-02-28  Aldy Hernandez  <aldyh@redhat.com>
405
406         * parser.c (cp_parser_init_declarator): Revert opaque
407         vector_opaque_p change.
408         Do not include target.h.
409
410 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
411
412         PR c++/9879
413         * cp-tree.h (build_zero_init): Add parameter.
414         * decl.c (cp_finish_decl): Adjust call.
415         * init.c (build_zero_init): Add nelts parameter.  Adjust recursive
416         calls.
417         (build_default_init): Add nelts parameter.  Adjust calls to
418         build_zero_init.
419         (build_new_1): Adjust call to build_default_init.
420         * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
421         
422 2003-02-26  Devang Patel  <dpatel@apple.com>
423
424         * decl.c (finish_enum): Merge two 'for' loops. Copy value node if required.
425         Postpone enum setting for template decls.
426         (build_enumerator): Delay copying value node until finish_enum (). Remove
427         #if 0'ed code.
428         * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
429         (tsubst_copy): Add check for enum type.
430         
431 2003-02-25  Mark Mitchell  <mark@codesourcery.com>
432
433         PR c++/9683
434         * decl2.c (prune_vars_needing_no_initialization): Do not throw
435         away initializations for DECL_EXTERNAL VAR_DECLs.
436         (finish_file): Adjust accordingly.
437         * pt.c (instantiate_decl): Do not defer VAR_DECLs.
438
439 2003-02-24 Gabriel Dos Reis  <gdr@integrable-solutions.net>
440
441         * decl.c (add_binding): Time TV_NAME_LOOKUP.
442         (push_class_binding): Likewise.
443         (set_namespace_binding): Likewise.
444
445 2003-02-24  Mark Mitchell  <mark@codesourcery.com>
446
447         PR c++/9836
448         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
449         specializations back to the main template.
450         * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
451         * pt.c (resolve_typename_type): Likewise.
452
453 2003-02-24  Jeffrey D. Oldham  <oldham@codesourcery.com>
454
455         PR c++/9778
456         * pt.c (tsubst_copy_and_build): For a templated function inside a
457         scope, process template arguments.
458
459 2003-02-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
460
461         PR c++/9602
462         * typeck2.c (abstract_virtuals_error): Don't check when
463         TYPE is still template parameter dependent.
464
465 2003-02-23  Mark Mitchell  <mark@codesourcery.com>
466
467         PR c++/5333
468         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
469         * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
470         * pt.c (instantiate_class_template): Don't try to instantiate
471         dependent types.
472         (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
473         
474 2003-02-21  Mark Mitchell  <mark@codesourcery.com>
475
476         PR c++/9749
477         * decl.c (grokdeclarator): Do not allow parameters with variably
478         modified types.
479
480 2003-02-21  Nathan Sidwell  <nathan@codesourcery.com>
481
482         * search.c (bfs_walk_grow): Remove. Fold into ...
483         (bfs_walk): ... here, fix fencepost error. Fix merge lossage
484         in previous patch.
485
486 2003-02-20  Mark Mitchell  <mark@codesourcery.com>
487
488         PR c++/9729
489         * mangle.c (mangle_conv_op_name_for_type): Issue an error message
490         when the G++ 3.2 ABI prevents correct compilation.
491
492 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
493
494         Change base class access representation. Share virtual base
495         binfos.
496         * cp/call.c (build_special_member_call): Remove binfo_for_vbase
497         call.
498         * cp/class.c (build_base_path): Likewise.
499         (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
500         (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
501         (make_new_vtable): Adjust.
502         (force_canonical_binfo_r): Delete.
503         (force_canonical_binfo): Delete.
504         (mark_primary_virtual_base): Delete.
505         (dfs_unshared_virtual_bases): Delete.
506         (mark_primary_bases): Adjust.
507         (maybe_warn_about_overly_private_class): Adjust.
508         (dfs_base_derived_from): Delete.
509         (base_derived_from): Follow the inheritance chain.
510         (struct find_final_overrider_data): Add vpath member.
511         (dfs_find_final_overrider): Adjust.
512         (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
513         (find_final_overrider): Adjust.
514         (update_vtable_entry_for_fn): Adjust.
515         (modify_all_vtables): Adjust.
516         (walk_subobject_offsets): Adjust.
517         (layout_nonempty_base_or_field): Adjust.
518         (layout_empty_base): Remove last parameter. Adjust.
519         (build_base_field): Adjust.
520         (build_base_fields): Adjust.
521         (propagate_binfo_offsets): Remove last parameter. Adjust.
522         (dfs_set_offset_for_unshared_vbases): Delete.
523         (layout_virtual_bases): Adjust.
524         (finish_struct_1): Adjust.
525         (init_class_processing): Don't init access nodes.
526         (dfs_get_primary_binfo): Delete.
527         (get_primary_binfo): Adjust.
528         (dump_class_hierarchy_r): Remove most derived arg, add IGO
529         parameter. Adjust.
530         (dump_class_hierarchy): Adjust.
531         (finish_vtbls): Adjust.
532         (get_original_base): Delete.
533         (build_vtt_inits): Adjust.
534         (dfs_build_secondary_vptr_vtt_inits): Adjust.
535         (dfs_ctor_vtable_bases_queue_p): Adjust.
536         (build_ctor_vtbl_group): Adjust.
537         (dfs_accumulate_vtbl_inits): Adjust.
538         (build_vtbl_initializer): Adjust.
539         (build_vbase_offset_vtbl_entries): Adjust.
540         (add_vcall_offset_vtbl_entries_1): Adjust.
541         * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
542         (access_*_node): Remove.
543         (CANONICAL_BINFO): Delete.
544         (BINFO_UNSHARED_MARKED): Remove.
545         (BINFO_MARKED): Set LANG_FLAG_0 directly.
546         (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
547         (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
548         (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
549         Delete.
550         (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
551         (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
552         (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
553         Delete.
554         (BINFO_DEPENDENT_BASE_P): New.
555         (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
556         index.
557         (markedp, unmarkedp): Adjust.
558         (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
559         dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
560         find_vbase_instance, binfo_for_vbase): Delete.
561         (copied_binfo, original_binfo): Declare.
562         (finish_base_specifier): Add virtual_p arg.
563         (unshare_base_binfos): Delete.
564         (copy_base_binfos): Declare.
565         (reverse_path): Delete.
566         * cp/decl.c (xref_basetypes): Access and virtuality passed
567         differently. Don't copy direct base binfos here. Call
568         copy_base_binfos.
569         * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
570         (initialize_vtbl_ptrs): Adjust.
571         (expand_member_init): Adjust.
572         * cp/parser.c (cp_parser_base_specifier): Adjust.
573         * cp/pt.c (instantiate_class_template): Adjust.
574         (get_template_base_recursive): Adjust.
575         * cp/rtti.c (get_pseudo_ti_init): Adjust.
576         (get_pseudo_ti_desc): Adjust.
577         * cp/tree.c (unshare_base_binfos): Rename to ...
578         (copy_base_binfos): ... here, reimplement.
579         (make_binfo): Set BINFO_DEPENDENT_BASE_P.
580         (reverse_path): Remove.
581         * cp/typeck.c (get_delta_difference): Adjust error messages.
582         * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
583         * cp/search.c (lookup_base_r): Adjust.
584         (dynamic_cast_base_recurse): Adjust.
585         (canonical_binfo): Remove.
586         (dfs_canonical_queue): Remove.
587         (dfs_assert_unmarked_p): Remove.
588         (assert_canonical_unmarked): Remove.
589         (shared_marked_p, shared_unmarked_p): Remove.
590         (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
591         (dfs_access_in_type): Adjust.
592         (access_in_type): Adjust.
593         (dfs_accessible_queue_p): Adjust.
594         (dfs_accessible_p): Adjust.
595         (is_subobject_of_p_1, is_subobject_of_p): Remove.
596         (struct lookup_field_info): Remove from_dep_base_p field.
597         (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
598         (lookup_field_r): Remove dependent base code.
599         (lookup_member): Likewise.
600         (dfs_walk, dfs_walk_real): Add access arg to queue fn.
601         (dfs_unmarked_real_bases_queue_p): Remove.
602         (dfs_marked_real_bases_queue_p): Remove.
603         (dfs_skip_vbases): Remove.
604         (dfs_get_pure_virtuals): Adjust.
605         (markedp, unmarkedp): Adjust.
606         (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
607         (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
608         (dfs_unmark): Adjust.
609         (dfs_get_vbase_types):Remove.
610         (dfs_build_inheritance_graph_order): Remove.
611         (get_vbase_types): Remove
612         (dfs_find_vbase_instance): Remove.
613         (find_vbase_instance): Remove.
614         (dfs_debug_unmarkedp): Adjust.
615         (dependent_base_p): Remove.
616         (dfs_push_type_decls): Adjust.
617         (dfs_push_decls): Adjust.
618         (dfs_no_overlap_yet): Adjust.
619         (copied_binfo): New function.
620         (original_binfo): New function.
621         (binfo_for_vbase): Remove.
622
623 2003-02-18  Zack Weinberg  <zack@codesourcery.com>
624
625         * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
626         (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
627         vectors, for speed.
628
629 2003-02-18  Mark Mitchell  <mark@codesourcery.com>
630
631         PR c++/9704
632         * class.c (layout_class_type): In the 3.2 ABI, take into account
633         trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
634
635 2003-02-18  Matt Austern <austern@apple.com>
636         
637         * cp/cp-lang.c: Change lang hooks so that final_write_globals does
638         nothing for C++.
639         * cp/decl.c (wrapup_globals_for_namespace): Remove special
640         handling of global namespace.
641         
642 2003-02-18  Geoffrey Keating  <geoffk@apple.com>
643
644         * cp-tree.h (rid_to_yy): Delete.
645         (C_RID_YYCODE): Delete.
646         (finish_file): Delete redundant declaration.
647
648 2003-02-18  Jason Merrill  <jason@redhat.com>
649
650         PR c++/9623
651         * decl.c (reshape_init): Don't mess with initializer labels.
652
653         PR c++/9485
654         * parser.c (cp_parser_postfix_expression): Set idk properly for
655         object->scope::member.
656
657 2003-02-18  Ben Elliston  <bje@redhat.com>
658
659         PR other/7350
660         * decl.c (duplicate_decls): Fix typo in comment.
661
662 2003-02-17  Michael Elizabeth Chastain <mec@shout.net>
663
664         PR debug/9717
665         * class.c (build_base_field): Mark fields for base classes with
666         DECL_IGNORED_P.
667
668 2003-02-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
669
670         PR c++/9457
671         * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
672         CONSTRUCTOR_ELTS only once.
673
674 2003-02-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
675
676         PR c++/9459
677         * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
678         (dump_type_suffix): Likewise.
679
680 2003-02-14  Nathan Sidwell  <nathan@codesourcery.com>
681
682         * search.c: ANSIfy function declarations and definitions.
683         * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
684         * call.c (build_method_call, resolve_scoped_fn_name,
685         build_java_interface_fn_ref): Adjust lookup_field, lookup_member
686         calls.
687         * class.c (handle_using_decl): Likewise.
688         * decl.c (make_typename_type, make_unmound_class_template,
689         start_decl, compute_array_index_type): Likewise.
690         * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
691         * init.c (expand_member_init, build_member_call): Likewise.
692         * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
693         resolve_typename_type): Likewise.
694         * typeck.c (lookup_destructor, finish_class_member_access_exprm
695         build_prememfunc_access_expr): Likewise.
696
697 2003-02-13  Gabriel Dos Reis <gdr@integrable-solutions.net>
698
699         * decl2.c: Include "timevar.h".
700         (namespace_ancestor): Time name lookup.
701         (add_using_namespace): Likewise.
702         (lookup_using_namespace): Likewise.
703         (qualified_lookup_using_namespace): Likewise.
704         (decl_namespace): Likewise.
705         (lookup_arg_dependent): Likewise.
706         * lex.c (do_identifier): Likewise.
707         (do_scoped_id): Likewise.
708         * pt.c (lookup_template_class): Likewise.
709
710 2003-02-14   Andrew Pinski <pinskia@physics.uc.edu>
711
712         * decl.c: (define_label): Fix warning for return 0 instead of NULL.
713         
714 2003-02-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
715
716         * decl.c: Include "timevar.h".
717         (poplevel): Time name lookup.
718         (find_binding): Likewise.
719         (push_namespace): Likewise.
720         (pop_nested_namespace): Likewise.
721         (store_bindings): Likewise.
722         (maybe_push_to_top_level): Likewise.
723         (pop_from_top_level): Likewise.
724         (push_local_name): Likewise.
725         (pushtag): Likewise.
726         (pushdecl): Likewise.
727         (pushdecl_with_scope): Likewise.
728         (pushdecl_namespace_level): Likewise.
729         (pushdecl_top_level): Likewise.
730         (pushdecl_class_level): Likewise.
731         (push_class_level_binding): Likewise.
732         (push_using_decl): Likewise.
733         (push_using_directive): Likewise.
734         (push_overloaded_decl): Likewise.
735         (lookup_label): Likewise.
736         (define_label): Likewise.
737         (lookup_tag): Likewise.
738         (lookup_tag_reverse): Likewise.
739         (lookup_namespace_name): Likewise.
740         (select_decl): Likewise.
741         (unqualified_namespace_lookup): Likewise.
742         (lookup_name_real): Likewise.
743         (lookup_name_current_level): Likewise.
744         (lookup_type_current_level): Likewise.
745         (maybe_inject_for_scope_var): Likewise.
746         (xref_tag): Likewise.
747
748         * Make-lang.in (cp/decl.o): Add dependency on timevar.h
749         
750 2003-02-12  Phil Edwards  <pme@gcc.gnu.org>
751
752         * decl.c (build_enumerator):  Remove unneeded test.
753
754 2003-02-09  Dan Nicolaescu  <dann@ics.uci.edu>
755
756         * cp-tree.h (struct lang_type_header): Make all fields unsigned
757         char.
758
759 2003-02-03  Mark Mitchell  <mark@codesourcery.com>
760
761         PR c++/7129
762         * call.c (z_candidate): Add args.
763         (convert_class_to_reference): Set it.
764         (implicit_conversion): Tidy.
765         (add_candidate): Add args parameter.
766         (add_function_candidate): Adjust call to add_candidate.
767         (add_conv_candidate): Likewise.
768         (build_builtin_candidate): Likewise.
769         (build_user_type_conversion_1): Eliminate wasteful tree_cons
770         usage.
771         (build_new_function_call): Likewise.
772         (build_object_call): Likewise.
773         (add_candidates): New function.
774         (build_new_op): Use it.
775         (covert_like_real): Adjust call to build_over_call.
776         (build_over_call): Remove args parameter.
777         * operators.def: Add <?= and >?=.
778
779 2003-02-01  Richard Sandiford  <rsandifo@redhat.com>
780
781         * typeck.c (build_indirect_ref): Don't check flag_volatile.
782
783 2003-01-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
784
785         PR c++/8849
786         * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
787
788 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
789
790         * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
791         BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
792         (BINFO_LANG_ELTS): New #define.
793         * tree.c (make_binfo): Use BINFO_LANG_ELTS.
794
795 2003-01-30  Geoffrey Keating  <geoffk@apple.com>
796
797         * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
798
799 2003-01-30  Mark Mitchell  <mark@codesourcery.com>
800
801         * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
802         for class types.
803         * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
804         rather than TYPE_LANG_FLAG_0.
805         (TYPE_BUILT_IN): Remove.
806         (TYPE_DEPENDENT_P): New macro.
807         (TYPE_DEPENDENT_P_VALID): Likewise.
808         (lang_type_class): Add fields_readonly.
809         * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
810         * pt.c (dependent_type_p_r): New function, split out from ...
811         (dependent_type_p): ... here.  Memoize results.
812         * search.c (dependent_base_p): Use dependent_type_p, not
813         uses_template_parms.
814         * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
815         for class types.
816
817 2003-01-29  Mark Mitchell  <mark@codesourcery.com>
818
819         * call.c (build_field_call): Use build_new_op, not build_opfncall.
820         (prep_operand): New function.
821         (build_new_op): Use it.  Remove dead code.
822         * class.c (pushclass): Change "modify" parameter type from int to
823         bool.
824         (currently_open_class): Use same_type_p, not pointer equality.
825         (push_nested_class): Adjust calls to pushclass, remove modify
826         parameter.
827         * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
828         (pushclass): Change prototype.
829         (push_nested_class): Likewise.
830         (grokoptypename): Remove.
831         (build_opfncall): Remove.
832         (value_dependent_expression_p): Declare.
833         (resolve_typename_type): Likewise.
834         (resolve_typename_type_in_current_instantiation): Likewise.
835         (enter_scope_of): Remove.
836         (tsubst): Remove.
837         (tsubst_expr): Likewise.
838         (tsubst_copy): Likewise.
839         (tsubst_copy_and_build): Likewise.
840         * decl.c (warn_about_implicit_typename_lookup): Remove.
841         (finish_case_label): Return error_mark_node for erroneous labels.
842         (start_decl): Adjust calls to push_nested_class.
843         (grokfndecl): Call push_scope/pop_scope around call to
844         duplicate_decls.
845         (grokdeclarator): Do not call tsubst.
846         (start_function): Adjust calls to push_nested_class.
847         * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
848         (check_classfn): Use push_scope/pop_scope around type comparisions.
849         (grokoptypename): Remove.
850         (push_sscope): Adjust call to push_nested_class.
851         * error.c (dump_type): Show cv-qualification of typename types.
852         * init.c (build_member_call): Use build_new_op, not
853         build_opfncall.
854         * method.c (build_opfncall): Remove.
855         * parser.c (cp_parser): Add allow_non_constant_expression_p and
856         non_constant_expression_p.
857         (cp_parser_constant_expression): Adjust prototype.
858         (cp_parser_resolve_typename_type): Remove.
859         (cp_parser_non_constant_expression): New function.
860         (cp_parser_non_constant_id_expression): Likewise.
861         (cp_parser_new): Set allow_non_constant_expression_p and
862         non_constant_expression_p.
863         (cp_parser_primary_expression): Reject `this' and `va_arg' in
864         constant-expressions.  Note that dependent names aren't really
865         constant.
866         (cp_parser_postfix_expression): Reject conversions to non-integral
867         types in constant-expressions.  Neither are increments or
868         decrements.
869         (cp_parser_unary_expression): Reject increments and decrements in
870         constant-expressions.
871         (cp_parser_direct_new_declarator): Adjust call to
872         cp_parser_constant_expression.
873         (cp_parser_cast_expression): Reject conversions to non-integral
874         types in constant-expressions.
875         (cp_parser_assignment_expression): Rejects assignments in
876         constant-expressions.
877         (cp_parser_expression): Reject commas in constant-expressions.
878         (cp_parser_labeled_statement): Adjust call to
879         cp_parser_constant_expression.
880         (cp_parser_direct_declarator): Simplify array bounds, even in
881         templates, when they are non-dependent.  Use
882         resolve_typename_type, not cp_parser_resolve_typename_type.
883         (cp_parser_class_head): Use resolve_typename_type, not
884         cp_parser_resolve_typename_type.
885         (cp_parser_member_declaration): Adjust call to
886         cp_parser_constant_expression.
887         (cp_parser_constant_initializer): Likewise.
888         (cp_parser_constructor_declarator): Use resolve_typename_type, not
889         cp_parser_resolve_typename_type.
890         (cp_parser_late_parsing_default_args): Adjust call to
891         push_nested_class.
892         * pt.c (tsubst): Give it internal linkage.
893         (tsubst_expr): Likewise.
894         (tsubst_copy): Likewise.
895         (tsubst_copy_and_build): Likewise.
896         (push_access_scope_real): Likewise.
897         (tsubst_friend_class): Likewise.
898         (instantiate_class_template): Adjust call to pushclass.
899         (value_dependent_expression_p): Give it external linkage.
900         Robustify.
901         (resolve_typename_type): New function.
902         * semantics.c (finish_call_expr): Use build_new_op, not
903         build_opfncall.
904         (begin_constructor_declarator): Remove.
905         (begin_class_definition): Adjust call to pushclass.
906         (enter_scope_of): Remove.
907         * typeck.c (comptypes): Resolve typename types as appropriate.
908         (build_x_indirect_ref): Use build_new_op, not build_opfncall.
909         (build_x_compound_expr): Likewise.
910         (build_modify_expr): Likewise.
911         (build_x_modify_expr): Likewise.
912         * typeck2.c (build_x_arrow): Likewise.
913         
914 2003-01-29  Fariborz Jahanian  <fjahanian@apple.com>
915
916         * pt.c (last_pending_template) Declare GTY().
917
918 2003-01-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
919
920         PR c++/8591
921         * parser.c (cp_parser_elaborated_type_specifier): Convert
922         TEMPLATE_DECL to TYPE_DECL only when processing template friends.
923         (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
924
925 2003-01-28  Nathan Sidwell  <nathan@codesourcery.com>
926
927         PR c++/9437
928         * pt.c (unify): Don't unify '*T' with 'U C::*'.
929
930         PR c++/3902
931         * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
932         inside a declarator.
933
934 2003-01-27  Nathan Sidwell  <nathan@codesourcery.com>
935
936         * class.c (update_vtable_entry_for_fn): Add index parameter.
937         Generate vcall thunk for covariant overriding from a virtual
938         primary base.
939         (dfs_modify_vtables): Adjust.
940
941 2003-01-25  Nathan Sidwell  <nathan@codesourcery.com>
942
943         PR c++/9403
944         * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
945         template keyword.
946         (cp_parser_base_specifier): Look for and consume a
947         TEMPLATE keyword. Replace switch with array index.
948
949         PR c++/795
950         * semantics.c (finish_non_static_data_member): Remember the
951         field's type even in a template.
952
953         PR c++/9415
954         * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
955         already scoped.
956         
957         PR c++/8545
958         * parser.c (cp_parser_cast_expression): Be more tentative.
959
960 2003-01-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
961
962         * cp-tree.h (flagged_type_tree_s): Remove.
963         (check_for_new_type): Likewise.
964         * typeck2.c (check_for_new_type): Likewise.
965
966 2003-01-23  Nathanael Nerode  <neroden@gcc.gnu.org>
967
968         * dump.c: ANSIfy function declarations and definitions.
969
970         * cp-tree.h, decl.h: Get rid of PARAMS.  Again.
971
972 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
973
974         PR c++/9354
975         * init.c (build_new): Set the type of the new-expression, even
976         when processing_templte_decl.
977
978         PR c++/9216
979         * parser.c (cp_parser_primary_expression): Improve error message
980         for templates used in an expression context.
981
982         PR c++/8696
983         * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
984         parse when encountering "typedef".
985
986 2003-01-22  Nathanael Nerode  <neroden@gcc.gnu.org>
987
988         * class.c, parser.c: ANSIfy function definitions and declarations.
989
990 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
991
992         PR c++/9328
993         * error.c (dump_decl): For an OVERLOAD, just print the name of the
994         function; it doesn't make sense to try to print its type.
995         * semantics.c (finish_typeof): Issue errors about invalid uses.
996
997         PR c++/9298
998         * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
999         function.
1000         (cp_parser_expression_statement): Use it.
1001         (cp_parser_explicit_instantiation): Likewise.
1002         * pt.c (do_decl_instantiation): Improve error handling logic.
1003         
1004 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
1005
1006         PR c++/9384
1007         * parser.c (cp_parser_using_declaration): Issue error messages
1008         about name resolution failures here.
1009
1010         PR c++/9388
1011         * class.c (currently_open_derived_class): Use dependent_type_p.
1012         * cp-tree.h (dependent_type_p): New function.
1013         (dependent_template_arg_p): Likewise.
1014         (dependent_template_p): Likewise.
1015         (type_dependent_expression_p): Likewise.
1016         * parser.c (cp_parser_dependent_type_p): Remove.
1017         (cp_parser_value_dependent_type_p): Likewise.
1018         (cp_parser_type_dependent_expression_p): Likewise.
1019         (cp_parser_dependent_template_arg_p): Likewise.
1020         (cp_parser_dependent_template_id_p): Likewise.
1021         (cp_parser_dependent_template_p): Likewise.
1022         (cp_parser_diagnose_invalid_type_name): Replace
1023         cp_parser_dependent_type_p with dependent_type_p, etc.
1024         (cp_parser_primary_expresion): Likewise.
1025         (cp_parser_nested_name_specifier_opt): Likewise.
1026         (cp_parser_postfix_expression): Likewise.
1027         (cp_parser_unary_expression): Likewise.
1028         (cp_parser_template_name): Likewise.
1029         (cp_parser_class_name): Likewise.
1030         (cp_parser_lookup_name): Likewise.
1031         * pt.c (dependent_type_p): New function.
1032         (value_dependent_expression_p): Likewise.
1033         (type_dependent_expression_p): Likewise.
1034         (dependent_template_arg_p): Likewise.
1035         (dependent_template_id_p): Likewise.
1036         (dependent_template_p): Likewise.
1037         
1038         PR c++/9285
1039         PR c++/9294
1040         * parser.c (cp_parser_simple_declaration): Return quickly when
1041         encountering errors.
1042
1043 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1044
1045         Make-lang.in (cp/decl.o-warn): Add -Wno-error.
1046
1047 2003-01-17  Jason Merrill  <jason@redhat.com>
1048
1049         PR c++/9167, c++/9358
1050         * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
1051
1052 2003-01-17  Jason Merrill  <jason@redhat.com>
1053
1054         PR c++/9342
1055         * call.c (build_conditional_expr): Always do lvalue-rvalue
1056         conversion.
1057
1058 2003-01-17  Mark Mitchell  <mark@codesourcery.com>
1059
1060         PR c++/9294
1061         * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
1062         * cp-tree.h (BASELINK_BINFO): Adjust.
1063         (BASELINK_FUNCTIONS): Likewise.
1064         (BASELINK_ACCESS_BINFO): Likewise.
1065         (tree_baselink): New structure.
1066         (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
1067         (lang_tree_node): Add baselink.
1068         * decl.c (cp_tree_node_structure): Add BASELINK case.
1069         * search.c (build_baselink): Adjust.
1070         * tree.c (cp_walk_subtrees): Add BASELINK case.  Remove BASELINK_P
1071         test from TREE_LIST case.
1072
1073         PR c++/9272
1074         * parser.c (cp_parser_constructor_declarator_p): Do not assume
1075         that a constructor cannot be declared outside of its own class.
1076         
1077         * parser.c (cp_parser_resolve_typename_type): If the scope cannot
1078         be resolved, neither can the qualified name.
1079
1080         * rtti.c (get_pseudo_ti_desc): Fix thinko.
1081
1082 2003-01-16  Jason Merrill  <jason@redhat.com>
1083
1084         PR c++/8564
1085         * init.c (build_vec_init): Re-add maxindex parm.
1086         (perform_member_init, build_aggr_init): Pass it.
1087         (build_new_1): Pass it. Use an incomplete array type for full_type.
1088         * typeck.c (build_modify_expr): Pass it.
1089         * cp-tree.h: Adjust.
1090
1091 2003-01-16  Jeffrey D. Oldham  <oldham@codesourcery.com>
1092
1093         * cp-tree.h (tsubst_copy_and_build): New declaration.
1094         * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
1095         (tsubst_expr): Use 'tsubst_copy_and_build'.  Update initial comment.
1096         (tsubst_copy_and_build): New function.
1097
1098 2003-01-16  Mark Mitchell  <mark@codesourcery.com>
1099
1100         * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
1101         (PARTIAL_INSTANTIATION_P): Remove.
1102         (IMPLICIT_TYPENAME_P): Likewise.
1103         (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
1104         (build_typename_type): Remove declaration.
1105         (parmlist_is_exprlist): Likewise.
1106         * decl.c (build_typename_type): Make it static, remove third
1107         parameter.
1108         (push_class_binding): Don't do implicit typename stuff.
1109         (make_typename_type): Likewise.
1110         (lookup_name_real): Likewise.
1111         (grokdeclarator): Don't try to convert declarations into
1112         initializations.  Don't do implicit typename stuff.
1113         (parmlist_is_exprlist): Remove.
1114         (xref_basetypes): Simplify.
1115         * decl2.c (grokfield): Don't try to convert declarations into
1116         initializations.
1117         (build_anon_union_vars): Do this while processing templates, too.
1118         (finish_anon_union): Likewise.
1119         * error.c (dump_type): Remove implicit typename handling.
1120         * parser.c (cp_parser_diagnose_invalid_type_name): New method.
1121         (cp_parser_primary_expression): Correct handling of names not
1122         found by unqualified name lookup in templates.
1123         (cp_parser_nested_name_specifier_opt): Avoid checking dependency
1124         of types when possible.
1125         (cp_parser_simple_declaration): Complain intelligently about some
1126         invalid declarations.
1127         (cp_parser_member_declaration): Likewise.
1128         (cp_parser_constructor_declarator_p): Don't check when we're in a
1129         function scope.
1130         * pt.c (instantiate_class_template): Remove
1131         PARTIAL_INSTANTIATION_P gunk.
1132         * search.c (lookup_field_r): Don't build implicit typenames.
1133         (marked_pushdecls_p): Don't enter dependent base types.
1134         (unmarked_pushdecls_p): Likewise.
1135         * semantics.c (begin_class_definition): Remove implicit typename
1136         stuff.
1137
1138 2003-01-16  Nathan Sidwell  <nathan@codesourcery.com>
1139
1140         PR c++/9212
1141         * parser.c (cp_parser_direct_declarator): If accepting either
1142         abstract or named, the name must be an unqualified-id.
1143
1144 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1145
1146         * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
1147
1148 2003-01-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1149
1150         * decl2.c (check_classfn): Fix uninitialized warning.
1151         (build_anon_union_vars): Likewise.
1152         * pt.c (tsubst_copy): Likewise.
1153
1154 2003-01-14  Jeffrey D. Oldham  <oldham@codesourcery.com>
1155
1156         Further conform g++'s __vmi_class_type_info to the C++ ABI
1157         specification.
1158         * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
1159         the specification.
1160         (class_hint_flags): Likewise.
1161
1162 2003-01-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1163
1164         * config-lang.in: Add semantics.c to gtfiles.
1165         * cp-tree.h (flagged_type_tree_s): Remove lookups field.
1166         (saved_scope): Likewise.
1167         (type_lookups): Remove.
1168         (deferred_access): New structure.
1169         (type_access_control): Remove.
1170         (save_type_access_control): Likewise.
1171         (reset_type_access_control): Likewise.
1172         (decl_type_access_control): Likewise.
1173         (push_deferring_access_checks): Declare.
1174         (resume_deferring_access_checks): Likewise.
1175         (stop_deferring_access_checks): Likewise.
1176         (pop_deferring_access_checks): Likewise.
1177         (get_deferred_access_checks): Likewise.
1178         (pop_to_parent_deferring_access_checks): Likewise.
1179         (perform_deferred_access_checks): Likewise.
1180         (perform_or_defer_access_check): Likewise.
1181         * decl.c (make_typename_type): Use perform_or_defer_access_check.
1182         (make_unbound_class_template): Likewise.
1183         (grokdeclarator): Don't call decl_type_access_control.
1184         * parser.c (cp_parser_context): Remove deferred_access_checks
1185         and deferring_access_checks_p fields.
1186         (cp_parser_context_new): Adjust.
1187         (cp_parser): Remove access_checks_lists.
1188         (cp_parser_defer_access_check): Remove.
1189         (cp_parser_start_deferring_access_checks): Remove.
1190         (cp_parser_stop_deferring_access_checks): Remove.
1191         (cp_parser_perform_deferred_access_checks): Remove.
1192         (cp_parser_nested_name_specifier_opt): Use new deferred access
1193         functions.
1194         (cp_parser_simple_declaration): Likewise.
1195         (cp_parser_template_id): Likewise.
1196         (cp_parser_function_definition): Likewise.
1197         (cp_parser_class_specifier): Likewise.
1198         (cp_parser_lookup_name): Likewise.
1199         (cp_parser_single_declaration): Likewise.
1200         (cp_parser_pre_parsed_nested_name_specifier): Likewise.
1201         (cp_parser_parse_tentatively): Likewise.
1202         (cp_parser_parse_definitely): Likewise.
1203         (yyparse): Likewise.
1204         (cp_parser_init_declarator): Remove access_checks parameter.
1205         Use new deferred access functions.
1206         (cp_parser_function_definition_from_specifiers_and_declarator):
1207         Likewise.
1208         (cp_parser_class_head): Remove deferring_access_checks_p and
1209         saved_access_checks parameters.  Use new deferred access functions.
1210         (cp_parser_member_specification_opt): Don't call
1211         reset_type_access_control.
1212         * search.c (type_access_control): Remove.
1213         * semantics.c: Include "gt-cp-semantics.h".
1214         (deferred_type_access_control): Remove.
1215         (deferred_access_stack): New variable.
1216         (deferred_access_free_list): Likewise.
1217         (push_deferring_access_checks): New function.
1218         (resume_deferring_access_checks): Likewise.
1219         (stop_deferring_access_checks): Likewise.
1220         (pop_deferring_access_checks): Likewise.
1221         (get_deferred_access_checks): Likewise.
1222         (pop_to_parent_deferring_access_checks): Likewise.
1223         (perform_deferred_access_checks): New function, adapted from
1224         cp_parser_perform_deferred_access_checks.
1225         (perform_or_defer_access_check): New function, adapted from
1226         cp_parser_defer_access_check.
1227         (current_type_lookups): Remove.
1228         (deferred_type_access_control): Likewise.
1229         (decl_type_access_control): Likewise.
1230         (save_type_access_control): Likewise.
1231         (reset_type_access_control): Likewise.
1232         (begin_function_definition): Adjust.
1233         (begin_class_definiton): Likewise.
1234
1235 2003-01-13  Jason Merrill  <jason@redhat.com>
1236
1237         PR c++/8748
1238         * class.c (build_base_path): Take the address before calling save_expr.
1239
1240         * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
1241         all the ambiguous conversions are bad.
1242
1243         * class.c (maybe_warn_about_overly_private_class): Don't stop
1244         searching when we find a nonprivate method.
1245
1246         * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
1247
1248 2003-01-12  Mark Mitchell  <mark@codesourcery.com>
1249
1250         * cp-tree.h (get_arglist_len_in_bytes): Remove.
1251
1252         PR c++/9264
1253         * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
1254         typeame types more robustly.
1255
1256 2003-01-11  Phil Edwards  <pme@gcc.gnu.org>
1257
1258         * parser.c:  Fix comment typos.
1259
1260 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
1261
1262         PR c++/9099
1263         * parser.c (cp_parser_scope_through_which_access_occurs): Handle
1264         an object_type which is not a class type.
1265
1266 2003-01-10  Geoffrey Keating  <geoffk@apple.com>
1267
1268         * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
1269         (cp_parser_late_parsing_default_args): Likewise.
1270
1271 2003-01-10  Nathanael Nerode  <neroden@gcc.gnu.org>
1272
1273         * cfns.gperf: ANSIfy function declarations.
1274         * cfns.h: Regenerate.
1275         * cp-tree.h: ANSIfy function declarations.
1276
1277 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
1278
1279         * cp-tree.h (reparse_absdcl_as_expr): Remove.
1280         (reparse_absdcl_as_casts): Likewise.
1281         (reparse_decl_as_expr): Likewise.
1282         (finish_decl_parsing): Likewise.
1283         * decl2.c (reparse_absdcl_as_expr): Remove.
1284         (reparse_absdcl_as_casts): Likewise.
1285         (repase_decl_as_expr): Likewise.
1286         (finish_decl_parsing): Likewise.
1287
1288         PR c++/9128
1289         PR c++/9153
1290         PR c++/9171
1291         * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
1292         function.
1293         (cp_parser_nested_name_specifier_opt): Correct the
1294         check_dependency_p false.
1295         (cp_parser_postfix_expression): Fix formatting.
1296         (cp_parser_decl_specifier_seq): Avoid looking for constructor
1297         declarators when possible.
1298         (cp_parser_template_id): Avoid performing name-lookup when
1299         possible.
1300         (cp_parser_class_head): Do not count specializations when counting
1301         levels of templates.
1302         (cp_parser_constructor_declarator_p): Return immediately if
1303         there's no chance that the tokens form a constructor declarator.
1304         * rtti.c (throw_bad_typeid): Add comment.  Do not return an
1305         expression with reference type.
1306         (get_tinfo_decl_dynamic): Do not return an expression with
1307         reference type.
1308         (build_typeid): Add comment.  Do not return an expression with
1309         reference type.
1310         * typeck.c (build_class_member_access_expr): Improve handling of
1311         conditionals and comma-expressions as objects.
1312
1313 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
1314
1315         * cfns.gperf: ANSIfy function declarations.
1316         * cfns.h: Regenerate.
1317         * cp-tree.h: ANSIfy function declarations.
1318         * parser.c: ANSIfy function declarations & definitions.
1319
1320         * decl.c (bad_specifiers): Fix parameter order error I introduced.
1321
1322 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
1323
1324         Merge from pch-branch:
1325
1326         2003-01-09  Geoffrey Keating  <geoffk@apple.com>
1327
1328         Merge to tag pch-merge-20030102:
1329         
1330         * semantics.c (finish_translation_unit): Don't call finish_file.
1331         * parser.c: Don't include ggc.h.
1332         (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
1333         read first token here.  Don't allow PCH files after the first
1334         token is read.
1335         (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
1336         (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
1337         (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
1338         (cp_parser_late_parsing_for_member): Don't duplicate call to
1339         cp_lexer_set_source_position_from_token.
1340         (cp_parser_late_parsing_default_args): Likewise.
1341         (yyparse): Call finish_file after clearing the_parser.
1342
1343         2002-12-11  Geoffrey Keating  <geoffk@apple.com>
1344
1345         * Make-lang.in: Remove $(GGC_H) from all dependencies.
1346         (CXX_TREE_H): Add $(GGC_H).
1347         * class.c: Don't include ggc.h. 
1348         (field_decl_cmp): Make parameters be 'const void *' to match qsort.
1349         (method_name_cmp): Likewise.
1350         (resort_data): New variable.
1351         (resort_field_decl_cmp): New.
1352         (resort_method_name_cmp): New.
1353         (resort_sorted_fields): New.
1354         (resort_type_method_vec): New.
1355         (finish_struct_methods): Delete cast.
1356         (finish_struct_1): Delete cast.
1357         * cp-tree.h: Include ggc.h.
1358         (struct lang_type_class): Add reorder attribute to field `methods'.
1359         (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
1360         (resort_sorted_fields): New prototype.
1361         (resort_type_method_vec): New prototype.
1362         * call.c: Don't include ggc.h.
1363         * decl.c: Likewise.
1364         * decl2.c: Likewise.
1365         * init.c: Likewise.
1366         * lex.c: Likewise.
1367         * method.c: Likewise.
1368         * optimize.c: Likewise.
1369         * parse.y: Likewise.
1370         * pt.c: Likewise.
1371         * repo.c: Likewise.
1372         * search.c: Likewise.
1373         * semantics.c: Likewise.
1374         * spew.c: Likewise.
1375         * tree.c: Likewise.
1376
1377         * lang-specs.h: Remove comment.
1378
1379         2002-12-03  Geoffrey Keating  <geoffk@apple.com>
1380
1381         * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
1382         (operator_name_info): Mark to be saved for PCH, specify size.
1383         (assignment_operator_name_info): Likewise.
1384
1385         2002-11-19  Geoffrey Keating  <geoffk@apple.com>
1386
1387         * decl.c (anon_cnt): Mark to be saved for PCH.
1388
1389         2002-10-25  Geoffrey Keating  <geoffk@apple.com>
1390
1391         * lex.c  (init_reswords): Delete now-untrue comment.
1392         Allocate ridpointers using GGC.
1393
1394         2002-10-04  Geoffrey Keating  <geoffk@apple.com>
1395
1396         * cp-tree.h (union lang_decl_u2): Add tags to all fields.
1397
1398         * g++spec.c (lang_specific_driver): Don't include standard
1399         libraries in `added'.
1400
1401         2002-08-27  Geoffrey Keating  <geoffk@redhat.com>
1402
1403         * decl2.c (finish_file): Call c_common_write_pch.
1404         * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
1405
1406         2002-08-17  Geoffrey Keating  <geoffk@redhat.com>
1407
1408         * g++spec.c (lang_specific_driver): Treat .h files as C++ header
1409         files when using g++.
1410         * lang-specs.h: Handle compiling C++ header files.
1411
1412 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
1413
1414         * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
1415
1416 2003-01-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1417
1418         * pt.c (push_access_scope_real): Call push_to_top_level for
1419         function in namespace scope.
1420         (pop_access_scope): Call pop_from_top_level for function in
1421         namespace scope.
1422
1423 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
1424
1425         * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
1426
1427 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
1428
1429         * Make-lang.in (c++.install-common, c++.install-man,
1430         c++.uninstall): Prepend $(DESTDIR) to destination paths in
1431         all (un)installation commands.
1432         (c++.install-common): Rewrite $(LN) commands to support
1433         DESTDIR with "ln" as well as with "ln -s".
1434
1435 2003-01-08  Jason Merrill  <jason@redhat.com>
1436
1437         * parser.c (cp_parser_primary_expression): See through explicitly
1438         scoped ALIAS_DECLs, too.
1439
1440 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
1441
1442         * decl.c: Remove some #if 0 code.
1443
1444         * decl.c: ANSIfy function declarations.
1445
1446 2003-01-07  Mark Mitchell  <mark@codesourcery.com>
1447
1448         * parser.c (cp_parser_asm_definition): Correct handling of omitted
1449         operands.
1450
1451 2003-01-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1452
1453         PR c++/9030
1454         * decl.c (make_typename_type): Check access only when tf_error.
1455         (make_unbound_class_template): Likewise.
1456         * pt.c (saved_access_scope): New variable.
1457         (push_access_scope_real): New function.
1458         (push_access_scope): Likewise.
1459         (pop_access_scope): Likewise.
1460         (tsubst_default_argument): Use them.
1461         (instantiate_template): Likewise.
1462         (regenerate_decl_from_template): Likewise.
1463         (instantiate_decl): Likewise.
1464         (get_mostly_instantiated_function_type): Likewise.
1465
1466 2003-01-07  Nathanael Nerode <neroden@gcc.gnu.org>
1467
1468         * tree.c: Delete bogus #if 0 code.
1469
1470 2003-01-07  Andreas Schwab  <schwab@suse.de>
1471
1472         * class.c (layout_class_type): Don't use
1473         PCC_BITFIELD_TYPE_MATTERS if not defined.
1474
1475 2003-01-06  Mark Mitchell  <mark@codesourcery.com>
1476
1477         PR c++/9165
1478         * decl2.c (build_cleanup): Mark the object as used.
1479
1480         * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
1481         (hash_local_specialization): New function.
1482         (register_local_specialization): Revert 2003-01-05 change.
1483         (instantiate_decl): Use hash_local_specialization when creating
1484         the local_specializations table.
1485         
1486         * decl2.c (mark_used): Do not synthesize thunks.
1487
1488         * class.c (layout_class_type): Correct handling of unnamed
1489         bitfields wider than their types.
1490
1491         PR c++/9189
1492         * parser.c (cp_parser): Remove default_arg_types.  Update
1493         documentation for unparsed_functions_queues.
1494         (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
1495         parameter.
1496         (cp_parser_new): Don't set parser->default_arg_types.
1497         (cp_parser_function_definition): Adjust usage of
1498         unparsed_funtions_queues.
1499         (cp_parser_class_specifier): Don't mess with
1500         parser->default_arg_types.  Handle default argument processing in
1501         a separate phase from function body processing.
1502         (cp_parser_template_declaration_after_export): Adjust usage of
1503         unparsed_functions_queues.
1504         (cp_parser_late_parsing_for_member): Do not handle default
1505         arguments.
1506
1507 2003-01-06  Nathan Sidwell  <nathan@codesourcery.com>
1508
1509         PR c++/9109
1510         * parser.c (cp_parser_declarator_kind): New enum.
1511         (cp_parser_declarator): Adjust.
1512         (cp_parser_direct_declarator): Adjust. Allow for either named or
1513         abstract declarator. Prefer abstract, if possible. Allow
1514         parenthesized function name.
1515         (cp_parser_condition): Adjust cp_parser_declarator call.
1516         (cp_parser_explicit_instantiation): Likewise.
1517         (cp_parser_init_declarator): Likewise.
1518         (cp_parser_type_id): Likewise.
1519         (cp_parser_function_definition): Likewise.
1520         (cp_parser_member_declaration): Likewise.
1521         (cp_parser_parameter_declaration): Use cp_parser_declarator to do
1522         the tentative parsing.
1523         (cp_parser_exception_declaration): Likewise.
1524
1525 2003-01-05  Mark Mitchell  <mark@codesourcery.com>
1526
1527         * parser.c (cp_parser_template_parameter): Adjust call to
1528         cp_parser_parameter_declaration.
1529         (cp_parser_parameter_declaration_list): Likewise.
1530         (cp_parser_parameter_declaration): Replace
1531         greater_than_is_operator_p with template_parm_p parameter.  Do not
1532         cache tokens for template default arguments.
1533
1534         * pt.c (retrieve_local_specialization): Use htab_find, not
1535         htab_find_with_hash.
1536         (register_local_specialization): Use htab_find_slot, not
1537         htab_find_slot_with_hash.
1538         (instantiate_decl): Pass a hash function to htab_create.
1539         
1540 2003-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1541
1542         * parser.c (cp_parser_binary_expression,
1543         cp_parser_multiplicative_expression,
1544         cp_parser_additive_expression, cp_parser_shift_expression,
1545         cp_parser_relational_expression, cp_parser_equality_expression,
1546         cp_parser_and_expression, cp_parser_exclusive_or_expression,
1547         cp_parser_inclusive_or_expression,
1548         cp_parser_logical_and_expression, cp_parser_logical_or_expression,
1549         cp_parser_binary_expression): Const-ify.
1550
1551 2003-01-04  Mark Mitchell  <mark@codesourcery.com>
1552
1553         * method.c (use_thunk): Disable access control while building the
1554         body of the thunk.
1555
1556 2003-01-03  Nathanael Nerode  <neroden@gcc.gnu.org>
1557
1558         * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C 
1559         front end.
1560
1561 2003-01-03  Matt Austern  <austern@apple.com>
1562
1563         * cp-tree.h (struct lang_type_class): add field for key method
1564         (cp_global_trees): rename dynamic_classes to keyed_classes
1565         (key_method): add definition
1566         * class.c (finish_struct_1): compute class's key method, and add
1567         the class to keyed_classes list if there is no key method.
1568         * decl.c (finish_function): add class to keyed_classes list if we
1569         see a definition of the class's key method.
1570         * pt.c (instantiate_class_template): add template specialization
1571         of a dynamic class to keyed_classes list.
1572         * decl2.c (key_method): remove
1573         (finish_file): iterate only through keyed_classes list when
1574         deciding whether to emit vtables, remove class from its list after
1575         we do the emission.
1576         
1577 2003-01-02  Jason Merrill  <jason@redhat.com>
1578
1579         * call.c (build_conditional_expr): Stabilize lvalues properly.
1580         * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
1581         * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
1582         Don't allow CALL_EXPR or VA_ARG_EXPR, either.
1583
1584         * call.c (convert_like_real): Call decl_constant_value for an
1585         IDENTITY_CONV even if there are no more conversions.
1586
1587         * cvt.c (build_up_reference): Don't push unnamed temps.
1588
1589         * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
1590
1591         * dump.c (cp_dump_tree): Don't try to dump class-specific fields
1592         for a backend struct.
1593
1594         * except.c (wrap_cleanups_r, build_throw): Make
1595         MUST_NOT_THROW_EXPRs void.
1596         * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
1597
1598         * init.c (build_vec_delete_1): Pre-evaluate the base address.
1599
1600         * init.c (get_temp_regvar): Simplify logic.
1601
1602         * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
1603         our replacement is a decl.
1604
1605         * decl.c (cp_make_fname_decl): Push the decls inside the
1606         outermost scope.
1607
1608 2003-01-03  Nathan Sidwell  <nathan@codesourcery.com>
1609
1610         PR c++/45, c++/3784
1611         * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
1612         the same too.
1613
1614 2003-01-03  Graham Stott  <graham.stott@btinternet.com>
1615
1616         * parser.c (struct cp_parser): Add access_checks_lists field
1617         (cp_parser_simple_declaration): Use.
1618         (cp_parser_init_declarator): Likewise. 
1619
1620 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
1621
1622         * parser.c (cp_parser_declaration): Accept the __extension__
1623         keyword before the declaration.
1624
1625         PR c++/2843
1626         * parser.c (cp_parser_parameter_declaration): Allow attributes to
1627         appear after the declarator.
1628
1629         * call.c (build_new_method_call): Fix typo in message format
1630         string.
1631
1632 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
1633
1634         * parser.c (cp_lexer_next_token_is): Declare it inline.
1635         (cp_lexer_set_source_position_from_token): Likewise.
1636         (cp_lexer_debugging_p): Likewise.
1637         (cp_parser_parsing_tentatively): Likewise.
1638         (cp_parser_nested_name_specifier_opt): Reduce the number of calls
1639         to the cp_lexer_peek_token.
1640
1641         * parser.c (cp_parser_sizeof_operand): Do not evaluate the
1642         expression.
1643
1644 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
1645
1646         * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
1647         cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
1648         cp/repo.c: Fix copyright years.
1649
1650 2003-01-01  Neil Booth  <neil@daikokuya.co.uk>
1651
1652         * lex.c: Remove superfluous include of cpplib.h.
1653         (CONSTRAINT): Define without conditions.
1654         (init_cp_pragma): Use c_register_pragma.
1655
1656 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
1657
1658         * .cvsignore: Remove.
1659
1660 2002-12-31  Steven Bosscher  <s.bosscher@student.tudelft.nl>
1661
1662         * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
1663           except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
1664           lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
1665           pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
1666           typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
1667           copyright header.
1668         * lex.h: parse.y is dead, so don't mention it.  Also replace the
1669           copyright header with the default GNU copyright header.
1670
1671 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
1672
1673         * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
1674         (lookup_name_namespace_only): Likewise.
1675         (begin_only_namespace_names): Likewise.
1676         (end_only_namespace_names): Likewise.
1677         * decl.c (only_namespace_names): Remove.
1678         (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
1679         (lookup_name_real): Do not check only_namespace_names.
1680         (lookup_name_namespace_only): Remove.
1681         (begin_only_namespace_names): Likewise.
1682         (end_only_namespace_names): Likewise.
1683         * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
1684         nested-name-specifiers more gracefully.
1685         (cp_parser_class_or_namespace_name): Avoid looking up namespace
1686         names when they cannot possibly appear.
1687         (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
1688         (cp_parser_elaborated_type_specifier): Likewise.
1689         (cp_parser_namespace_name): Only look for namespace names.
1690         (cp_parser_lookup_name): Add is_namespace parameter.
1691         (cp_parser_lookup_name_simple): Adjust call to
1692         cp_parser_lookup_name.
1693
1694         * parser.c (cp_parser_dependent_type_p): Fix thinko.
1695
1696 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
1697
1698         * .cvsignore: Update.
1699
1700 2002-12-31  Nathan Sidwell  <nathan@codesourcery.com>
1701
1702         * class.c (modify_vtable_entry): Remove unused variable.
1703         (get_vcall_index): Always expect a non-thunk.
1704         (update_vtable_entry_for_fn): Combine covariant adjustments, when
1705         overriding a thunk. Pass get_vcall_index a non-thunk.
1706
1707         * decl2.c (finish_file): Mark undefined inlines as extern.
1708
1709 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
1710
1711         * cp-tree.def (RETURN_INIT): Remove.
1712         * cp-tree.h (DECL_IN_MEMORY_P): Remove.
1713         (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
1714         (note_level_for_for): Remove.
1715         (note_level_for_try): Likewise.
1716         (note_level_for_catch): Likewise.
1717         (finish_named_return_value): Likewise.
1718         (do_pushlevel): Change prototype.
1719         (pending_lang_change): Remove.
1720         * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
1721         sk_for.
1722         (note_level_for_for): Remove.
1723         (note_level_for_try): Likewise.
1724         (note_level_for_catch): Likewise.
1725         (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
1726         * parser.c (cp_parser_context_free_list): Make it "deletable".
1727         (cp_parser_template_argument): Remove misleading comment.
1728         * pt.c (tsubst_expr): Remove RETURN_INIT code.
1729         * semantics.c (genrtl_named_return_value): Remove.
1730         (do_pushlevel): Take a scope kind as an argument.
1731         (begin_if_stmt): Adjust.
1732         (begin_while_stmt): Likewise.
1733         (begin_for_stmt): Likewise.
1734         (finish_for_init_stmt): Likewise.
1735         (begin_switch_stmt): Likewise.
1736         (begin_handler): Likewise.
1737         (begin_compound_stmt): Likewise.
1738         (finish_named_return_value): Remove.
1739         (cp_expand_stmt): Remove RETURN_INIT case.
1740         * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
1741
1742 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
1743
1744         PR c++/9112
1745         * parser.c (cp_parser_direct_declarator): Handle erroneous
1746         parenthesized declarators correctly.
1747
1748 2002-12-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1749
1750         * cp-tree.h (pending_lang_change): Declare.
1751
1752 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
1753
1754         * parser.c (cp_parser_context_free_list): New variable.
1755         (cp_parser_context_new): Use it.
1756         (cp_parser_error): Check return code from
1757         cp_parser_simulate_error.
1758         (cp_parser_simulate_error): Return a value.
1759         (cp_parser_id_expression): Optimize common case.
1760         (cp_parser_class_name): Likewise.
1761         (cp_parser_class_specifier): Adjust call to
1762         cp_parser_late_parsing_default_args.
1763         (cp_parser_lookup_name): Optimize common case.
1764         (cp_parser_late_parsing_for_member): Adjust call to
1765         cp_parser_late_parsing_default_args.
1766         (cp_parser_late_parsing_default_args): Add scope parameter.
1767         (cp_parser_require): Avoid creating the error message unless it's
1768         needed.
1769         (cp_parser_parse_definitely): Place free'd contexts on the free
1770         list.
1771
1772         * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
1773
1774 2002-12-30  David Edelsohn  <edelsohn@gnu.org>
1775
1776         * parser.c (cp_parser_parameter_declaration_clause): Treat system
1777         header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
1778
1779 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
1780
1781         * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
1782         GCC, not GNU CC.
1783
1784 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
1785
1786         * parse.y: Remove.
1787         * spew.c: Likewise.
1788         * Make-lang.in (gt-cp-spew.h): Remove.
1789         * cp-tree.h (do_pending_lang_change): Remove.
1790         (do_identifier): Change prototype.
1791         (finish_id_expr): Remove.
1792         * decl.c (lookup_name_real): Remove yylex variable.
1793         * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
1794         * lex.c (init_cpp_parse): Remove.
1795         (reduce_cmp): Likewise.
1796         (token_cmp): Likewise.
1797         (yychar): Likewise.
1798         (lastiddecl): Likewise.
1799         (token_count): Likewise.
1800         (reduce_count): Likewise.
1801         (yyhook): Likewise.
1802         (print_parse_statistics): Likewise.
1803         (do_pending_lang_change): Likewise.
1804         (do_identifier): Remove parsing parameter.
1805         * lex.h (lastiddecl): Remove.
1806         (looking_for_typename): Remove.
1807         (looking_for_template): Likewise.
1808         (pending_lang_change): Likewise.
1809         (yylex): Likewise.
1810         * semantics.c (finish_id_expr): Remove.
1811
1812         * decl.c (grokdeclarator): Diagnost "extern thread" and "static
1813         thread" correctly.
1814
1815 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
1816
1817         * decl.c, decl2.c, decl.h:  GCC, not GNU CC.  This is the C++ front
1818         end, not the C front end.
1819
1820 2002-12-30  Nathan Sidwell  <nathan@codesourcery.com>
1821
1822         * cp-tree.h (THUNK_TARGET): New macro.
1823         (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
1824         (finish_thunk): Remove offset parms.
1825         * class.c (find_final_overrider): Look through thunks.
1826         (get_vcall_index): Use THUNK_TARGET.
1827         (update_vtable_entry_for_fn): Look through thunks. Set covariant
1828         fixed offset here. Adjust finish_thunk call.
1829         (build_vtbl_initializer): Adjust finish_thunk calls.
1830         * mangle.c (mangle_call_offset): Remove superfluous if.
1831         (mangle_thunk): Adjust.
1832         * method.c (make_thunk): Adjust.
1833         (finish_thunk): Adjust.
1834         (thunk_adjust): Remove assert.
1835         (use_thunk): Use THUNK_TARGET
1836         * dump1.c (cp_dump_tree): Adjust thunk dumping.
1837
1838         PR c++/9054
1839         * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
1840         * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
1841
1842 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1843
1844         Remove traditional C constructs 4/n.
1845         * decl2.c (grok_method_quals, warn_if_unknown_interface,
1846         grok_x_components, cp_build_parm_decl, build_artificial_parm,
1847         maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
1848         delete_sanity, check_member_template, check_java_method,
1849         check_classfn, finish_static_data_member_decl, grokfield,
1850         grokbitfield, grokoptypename, grok_function_init,
1851         cplus_decl_attributes, constructor_name, defer_fn,
1852         build_anon_union_vars, finish_anon_union, coerce_new_type,
1853         coerce_delete_type, comdat_linkage, maybe_make_one_only,
1854         key_method, import_export_vtable, import_export_class,
1855         output_vtable_inherit, import_export_decl, import_export_tinfo,
1856         build_cleanup, get_guard, get_guard_bits, get_guard_cond,
1857         set_guard, start_objects, finish_objects,
1858         start_static_storage_duration_function,
1859         finish_static_storage_duration_function, get_priority_info,
1860         start_static_initialization_or_destruction,
1861         finish_static_initialization_or_destruction,
1862         do_static_initialization, do_static_destruction,
1863         prune_vars_needing_no_initialization, write_out_vars,
1864         reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
1865         add_using_namespace, merge_functions, ambiguous_decl,
1866         lookup_using_namespace, lookup_using_namespace,
1867         qualified_lookup_using_namespace, set_decl_namespace,
1868         decl_namespace, current_decl_namespace, push_decl_namespace,
1869         pop_decl_namespace, push_scope, pop_scope, add_function,
1870         arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
1871         lookup_arg_dependent, do_namespace_alias,
1872         validate_nonmember_using_decl, do_nonmember_using_decl,
1873         do_toplevel_using_decl, do_local_using_decl,
1874         do_class_using_decl, do_using_directive, check_default_args,
1875         mark_used, handle_class_head): Use C90 prototypings.  Use booleans.
1876         * parser.c (cp_parser_class_head): Use booleanss.
1877         * decl.c (walk_globals, walk_vtables): Likewise.
1878         * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
1879         walk_globals): Change return type from 'int' to 'bool'.
1880         * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
1881         throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
1882         build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
1883         get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
1884         qualifier_flags, tinfo_base_init, generic_initializer,
1885         ptr_initializer, dfs_class_hint_mark, ptm_initializer,
1886         dfs_class_hint_unmark, class_hint_flags, class_initializer,
1887         typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
1888         get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
1889         unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
1890         * repo.c (repo_compile_flags, repo_template_declared,
1891         repo_template_defined, repo_class_defined, repo_get_id,
1892         repo_template_used, repo_vtable_used, repo_inline_used,
1893         repo_tinfo_used, repo_template_instantiated, extract_string,
1894         open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
1895         finish_repo): Likewise.
1896         * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
1897         cxx_print_xnode): Likewise..
1898         * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
1899         cxx_warn_unused_global_decl, cp_expr_size): Likewise.
1900         * cxxfilt.c (demangle_it, print_demangler_list, usage,
1901         standard_symbol_characters, hp_symbol_characters, main, fatal):
1902         Likewise.
1903         (strip_underscore):  Change type from 'int' to 'bool'.
1904         (main): Use boolean constants.
1905
1906 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1907
1908         Remove traditional C constructs 3/n.
1909         * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
1910         build_up_reference, warn_ref_binding, convert_to_reference,
1911         convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
1912         convert_to_void, convert, convert_force, build_type_conversion,
1913         build_expr_type_conversion, type_promotes_to,
1914         perform_qualification_conversions): Use C90 prototyping style.
1915         * decl2.c (grok_array_decl): Use boolean constant.
1916         (delete_sanity): Likewise.
1917         * typeck.c (build_unary_op): Likewise.
1918         * semantics.c (finish_switch_cond): Likewise.
1919         * parser.c (cp_parser_direct_new_declarator): Likewise.
1920         * init.c (build_new): Likewise.
1921
1922 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
1923
1924         * Make-lang.in (po-generated): Remove parse.c.
1925         (CXX_OBJS): Remove parse.o and spew.o.  Add parser.o.
1926         ($(srcdir)/cp/parse.h): Remove target.
1927         ($(srcdir)/cp/parse.c): Likewise.
1928         (gt-cp-parse.h): Likewise.
1929         (gt-cp-parser.h): New target.
1930         (c++.distclean): Do not remove parse.output.
1931         (c++.maintainer-clean): Do not remove parse.c or parse.h.
1932         (cp/spew.o): Remove target.
1933         (cp/lex.o): Adjust dependencies.
1934         (cp/pt.o): Likewise.
1935         (cp/parse.o): Likewise.
1936         (cp/TAGS): Do not mention parse.c.
1937         (cp/parser.o): New target.
1938         * NEWS: Mention the new parser.
1939         * call.c (build_scoped_method_call): Simplify.
1940         (build_method_call): Likewise.
1941         (build_new_function_call): Adjust calls to add_function_candidate
1942         and add_template_candidate.
1943         (build_new_op): Improve handling of erroroneous operands.
1944         (convert_default_arg): Remove circular argument processing.
1945         (name_as_c_string): New function.
1946         (build_new_method_call): Use it.
1947         (perform_implicit_conversion): Use error_operand_p.
1948         * class.c (finish_struct_anon): Use constructor_name_p.
1949         (check_field_decls): Likewise.
1950         (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
1951         (resolve_address_of_overloaded_function): Likewise.
1952         (instantiate_type): Tweak pointer-to-member handling.
1953         (get_primary_binfo): Remove incorrect assertion.
1954         * config-lang.in (gtfiles): Add parser.c, remove parse.c.
1955         * cp-tree.h (DEFARG_TOKENS): New macro.
1956         (default_arg): New structure.
1957         (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
1958         (lang_tree_node): Add default_arg.
1959         (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
1960         (type_info_ref_type): New macro.
1961         (saved_scope): Make processing_explicit_instantiation a boolean.
1962         (check_access): New field.
1963         (unparsed_text): Remove.
1964         (language_function): Remove unparsed_inlines.
1965         (error_operand_p): New macro.
1966         (lang_decl): Adjust pending_inline_info.
1967         (DEFARG_POINTER): Remove.
1968         (tag_types): Add typenames.
1969         (lookup_ualified_name): Declare.
1970         (lookup_name_real): Likewise.
1971         (shadow_tag): Adjust prototype.
1972         (get_scope_of_declarator): Declare it.
1973         (process_next_inline): Remove it.
1974         (check_for_missing_semicolon): Likewise.
1975         (maybe_get_template_decl_from_type_decl): Declare it.
1976         (finish_label_stmt): Adjust prototype.
1977         (finish_non_static_data_meber): Declare it.
1978         (finish_pseudo_destructor_call_expr): Rename to ...
1979         (finish_pseudo_destructor_expr): ... this.
1980         (finish_compound_literal): Declare it.
1981         (begin_inline_definitions): Remove it.
1982         (init_spew): Remove.
1983         (peekyylex): Likewise.
1984         (arbitrate_lookup): Likewise.
1985         (frob_opname): Likewise.
1986         (maybe_snarf_defarg): Likewise.
1987         (add_defarg_fn): Likewise.
1988         (do_pending_defargs): Likewise.
1989         (done_pending_defargs): Likewise.
1990         (unprocessed_defarg_fn): Likewise.
1991         (replace_defarg): Likewise.
1992         (end_input): Likewise.
1993         (get_overloaded_fn): Likewise.
1994         * cvt.c (convert_to_reference): Improve error handling.
1995         * decl.c (lookup_name_real): Do not declare it static.
1996         (maybe_push_to_top_level): Set check_access.
1997         (identifier_type_value): Adjust call to lookup_name_real.
1998         (lookup_qualified_name): New method.
1999         (lookup_name_real): Remove special-case parsing code.
2000         (lookup_name-nonclass): Adjust call to lookup_name_real.
2001         (lookup_name_namespace_only): Likewise.
2002         (lookup_name): Likewise.
2003         (check_tag_decl): Return the type declared.
2004         (shadow_tag): Likewise.
2005         (register_dtor_fn): Tweak check_access.
2006         (grokfndecl): Use constructor_name_p.
2007         (get_scope_of_declarator): New function.
2008         (grokdeclarator): Obscure tweaks for slightly different declarator
2009         representations.
2010         (start_method): Return error_mark_node to indicate failure.
2011         (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
2012         * decl2.c (constructor_name_full): Simplify.
2013         (constructor_name): Use it.
2014         (build_expr_from_tree): Adjust for changes to do new parser.
2015         (push_scope): Improve robustness.
2016         (validate_nonmember_using_decl): Process declarations, not names.
2017         (do_class_using_decl): Likewise.
2018         (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
2019         here.
2020         * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
2021         * expr.c (cxx_expand_expr): Handle BASELINKs.
2022         * init.c (member_init_ok_or_else): Issue more errors.
2023         (build_offset_ref): Tweak handling of FUNCTION_DECLs.
2024         * lex.c: Do not include parse.h.
2025         (yypring): Do not declare.
2026         (yylval): Likewise.
2027         (make_reference_declarator): Remove error-generating code.
2028         (rid_to_yy): Remove.
2029         (cxx_init): Do not call init_spew.
2030         (yypring): Remove.
2031         (check_for_missing_semicolon): Remove.
2032         * lex.h (got_scope): Remove.
2033         (got_object): Remove.
2034         * method.c (hack_identifier): Use finish_non_static_data_member.
2035         (implicitly_declare_fn): Adjust use of constructor_name.
2036         * parser.c: New file.
2037         * pt.c (parse.h): Do not include it.
2038         (maybe_get_template_decl_from_template): Do not declare it.
2039         (finish_member_template_decl): Tweak.
2040         (begin_explicit_instantiation): Adjust for
2041         processing_explicit_instantiation being boolean.
2042         (end_explicit_instantiation): Likewise.
2043         (maybe_process_partial_specialization): Tighten specialization
2044         test.
2045         (retrieve_local_specialization): Adjust ue of hash table.
2046         (eq_local_specializations): New function.
2047         (register_local_specialization): Likewise.
2048         (push_template_decl_real): Remove unnecessary test.
2049         (maybe_get_template_decl_from_type_decl): Don't make it static.
2050         (for_each_template_parm_r): Handle TYPEOF_TYPE.
2051         (tsubst_copy): Use retrieive_local_specialization to handle
2052         PARM_DECL.  Adjust handling of CONST_DECLs.  Handle BASELINKs.
2053         Handle COMPONENT_REFs with pseudo-destructor-expressions.
2054         Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
2055         (tsubst_expr): Pass decls, not names, to do_local_using_decl.
2056         (unify): Tweak handling of CONST_DECLs.
2057         (regenerate_decl_from_template): Use push_nested_class.
2058         (template_for_substitution): New funciton.
2059         (instantiate_decl): Use it.  Register parameters as local
2060         specializations.
2061         * rtti.c (init_rtti_processing): Set type_info_ref_type.
2062         (build_typeid): Use it.
2063         (get_typeid): Likeise.
2064         * search.c (accessible_p): Use check_access, not
2065         flag_access_control.
2066         (adjust_result_of_qualified_name_lookup): Pay attention to the
2067         context_class.
2068         * semantics.c (finish_asm_stmt): Adjust error handling.
2069         (finish_label_stmt): Return the statement.
2070         (finish_non_static_data_member): New function.
2071         (finish_class_expr): Handle BASELINKs.
2072         (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
2073         (finish_object_call_expr): Simplify handling during templates.
2074         (finish_pseudo_destructor_call_expr): Rename to ...
2075         (finish_pseudo_dtor_expr): ... this.
2076         (finish_compound_literal): New function.
2077         (begin_inline_definitions): Remove.
2078         (finish_sizeof): Remove special template handling.
2079         * spew.c: Do not include parse.h.
2080         * tree.c (get_overloaded_fn): Remove.
2081         * typeck.c (build_class_member_access_expr): Handle
2082         PSEUDO_DTOR_EXPR.  Adjust handling of static member functions.
2083         (lookup_destructor): New function.
2084         (finish_class_member_access_expr): Use it.
2085         (convert_arguments): Simplify.
2086         (build_unary_op): Handle BASELINKs.
2087
2088 2002-12-26  Nathan Sidwell  <nathan@codesourcery.com>
2089
2090         PR c++/4803
2091         * decl2.c (mark_used): Defer inline functions.
2092         (finish_file): Merge deferred_fns loops. Check all used
2093         inline functions have a definition.
2094         * method.c (make_thunk): Thunks are not inline.
2095
2096         PR c++/5116, c++/764
2097         * call.c (build_new_op): Make sure template class operands are
2098         instantiated.
2099
2100 2002-12-24  Nathan Sidwell  <nathan@codesourcery.com>
2101
2102         PR C++/7964
2103         * cp-tree.h (resolve_scoped_fn_name): Prototype.
2104         * call.c (resolve_scoped_fn_name): New function. Deal with
2105         more template expansion. Broken out of ...
2106         * parse.y (parse_finish_call_expr): ... here. Call it.
2107         * decl2.c (build_expr_from_tree, CALL_EXPR): Use
2108         resolve_scoped_fn_name and build_call_from_tree.
2109
2110         PR c++/9053
2111         * decl.c (duplicate_decls): Templates may be disambiguated by
2112         return type.
2113
2114         PR c++/8702
2115         * decl2.c (check_classfn): Use lookup_fnfield_1. List all
2116         conversion operators on failure.
2117
2118 2002-12-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2119
2120         Remove traditional C constructs 2/n.
2121         * call.c (tourney, build_field_call, equal_functions, joust,
2122         compare_ics, build_over_call, build_java_interface_fn_ref,
2123         convert_like_real, op_error, build_object_call, resolve_args,
2124         build_vfield_ref, check_dtor_name, build_scoped_method_call,
2125         build_addr_func, build_call, build_method_call, null_ptr_cst_p,
2126         sufficient_parms_p, build_conv, non_reference, strip_top_quals,
2127         standard_conversion, reference_related_p,
2128         reference_compatible_p, convert_class_to_reference,
2129         direct_reference_binding, reference_binding,
2130         ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
2131         add_template_conv_candidate, any_viable, any_strictly_viable,
2132         build_this, splice_viable, print_z_candidates,
2133         build_user_type_conversion, build_new_function_call,
2134         conditional_conversion, build_conditional_expr, build_new_op,
2135         build_op_delete_call, enforce_access, call_builtin_trap,
2136         convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
2137         convert_default_arg, type_passed_as, convert_for_arg_passing,
2138         in_charge_arg_for_name, is_properly_derived_from,
2139         maybe_handle_implicit_object, maybe_handle_ref_bind,
2140         source_type, add_warning, can_convert, can_convert_arg,
2141         perform_implicit_conversion, can_convert_arg_bad,
2142         initialize_reference, add_conv_candidate,
2143         add_template_candidate_real, add_template_candidate): Ansify.
2144
2145 2002-12-22  Nathan Sidwell  <nathan@codesourcery.com>
2146
2147         PR c++/8572
2148         * cp-tree.h (grokoptypename): Add SCOPE parameter.
2149         * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
2150         if in a template scope.
2151         * parse.y (unoperator): Return the scope.
2152         (operator_name): Adjust grokoptypename call.
2153
2154 2002-12-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2155
2156         * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
2157         * decl.c (make_unbound_class_template): Adjust.  Check for tf_error.
2158         * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
2159
2160 2002-12-20  Kazu Hirata  <kazu@cs.umass.edu>
2161
2162         * ChangeLog: Fix a typo.
2163         * class.c: Fix comment typos.
2164         * cp-tree.h: Likewise.
2165
2166 2002-12-18  Jason Merrill  <jason@redhat.com>
2167
2168         Handle anonymous unions at the tree level.
2169         C++ ABI change: Mangle anonymous unions using the name of their
2170         first named field (by depth-first search).  Should not cause
2171         binary compatibility problems, though, as the compiler previously
2172         didn't emit anything for affected unions.
2173         * cp-tree.def (ALIAS_DECL): New tree code.
2174         * decl2.c (build_anon_union_vars): Build ALIAS_DECLs.  Return the
2175         first field, not the largest.
2176         (finish_anon_union): Don't mess with RTL.  Do set DECL_ASSEMBLER_NAME,
2177         push the decl, and write it out at namespace scope.
2178         * decl.c (lookup_name_real): See through an ALIAS_DECL.
2179         (pushdecl): Add namespace bindings for ALIAS_DECLs.
2180         * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
2181         of a decl which doesn't have one.
2182         * typeck.c (build_class_member_access_expr): Don't recurse if
2183         we already have the type we want.
2184
2185 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2186
2187         PR c++/8099
2188         * friend.c (make_friend_class): Allow partial specialization
2189         when declaration is not a template friend.
2190
2191 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2192
2193         PR c++/3663
2194         * pt.c (lookup_template_class): Copy TREE_PRIVATE and
2195         TREE_PROTECTED to created decl nodes.
2196
2197 2002-12-18  Mark Mitchell  <mark@codesourcery.com>
2198
2199         * class.c (build_base_field): Do not set DECL_PACKED on the
2200         FIELD_DECL.
2201
2202 2002-12-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2203
2204         * cp-tree.h (struct tree_srcloc): Use location_t.
2205         (SOURCE_LOCUS): New.
2206         (SRCLOC_FILE, SRCLOC_LINE): Adjust.
2207
2208 2002-12-17  Jason Merrill  <jason@redhat.com>
2209
2210         * decl.c (finish_function): Also complain about no return in
2211         templates.
2212         * semantics.c (finish_return_stmt): Also call check_return_expr in
2213         templates.
2214         * typeck.c (check_return_expr): In a template, just remember that we
2215         saw a return.
2216
2217 2002-12-16  Jason Merrill  <jason@redhat.com>
2218
2219         * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
2220         of the CALL_EXPR.
2221
2222         * semantics.c (do_pushlevel): Call pushlevel after adding the
2223         SCOPE_STMT.
2224         (do_poplevel): Call poplevel before adding the SCOPE_STMT.
2225         * parse.y (function_body): Go back to using compstmt.
2226         * decl.c (pushdecl): Skip another level to get to the parms level.
2227
2228         * call.c (build_new_method_call): Use is_dummy_object to determine
2229         whether or not to evaluate the object parameter to a static member
2230         function.
2231
2232 2002-12-14  Jason Merrill  <jason@redhat.com>
2233
2234         * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
2235         return slot for normal functions.  Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
2236         * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
2237         don't bother with an AGGR_INIT_EXPR.
2238         (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
2239         just generate a new decl normally.  Take return slot parm.
2240         * cp-tree.h: Adjust prototype.
2241
2242 2002-12-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2243
2244         PR C++/8031
2245         * cvt.c (convert_to_pointer_force): Don't try comparing against
2246         erronous type.
2247
2248 2002-12-13  Geoffrey Keating  <geoffk@apple.com>
2249
2250         * cp-tree.h: Have the multiple-include guards around
2251         the entire file.
2252
2253 2002-12-10  David Edelsohn  <edelsohn@gnu.org>
2254
2255         * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
2256         for SPEW_DEBUG.
2257         (snarf_method): Same.
2258         (snarf_defarg): Same.
2259
2260 2002-12-10  Mark Mitchell  <mark@codesourcery.com>
2261
2262         PR c++/8372
2263         * pt.c (tsubst_copy): Handle destructor names more correctly.
2264
2265 2002-12-10  Matt Austern   <austern@apple.com>
2266
2267         * cp-tree.h: get rid of needs_virtual_reinit bit.
2268
2269 2002-12-09  Mark Mitchell  <mark@codesourcery.com>
2270
2271         * NEWS: Document removal of in-class initialization extension for
2272         static data members of non-arithmetic, non-enumeration type.
2273         * decl.c (check_static_variable_definition): Do not allow that
2274         extension.
2275         * decl2.c (grokfield): Do not call digest_init when processing
2276         templates.
2277
2278 2002-12-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2279
2280         * error.c (dump_expr): Fix format specifier warning.
2281
2282 2002-12-04  Geoffrey Keating  <geoffk@apple.com>
2283
2284         * class.c (finish_struct_1): Correct comment.
2285         * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
2286
2287 2002-12-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2288
2289         PR C++/8799
2290         * error.c (dump_expr): Don't ever try to dump a non-existent
2291         expression.
2292
2293 2002-12-03  Nathan Sidwell  <nathan@codesourcery.com>
2294
2295         Implement covariant returns.
2296         * cp-tree.h (IS_AGGR_TYPE_2): Remove.
2297         (struct lang_decl_flags): Add this_thunk_p flag.
2298         Rename vcall_offset to virtual_offset.
2299         (struct lang_decl): Rename delta to fixed_offset.
2300         (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
2301         (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
2302         (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
2303         (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
2304         (make_thunk): Add this_adjusting arg.
2305         (finish_thunk): Declare.
2306         (mangle_thunk): Add this_adjusting arg.
2307         * class.c (get_vcall_index): Use base function for lookup.
2308         (update_vtable_entry_for_fn): Generate covariant thunk.
2309         (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
2310         (build_vtbl_initializer): Use base function for lookup.
2311         Finish covariant thunk here. Adjust thunk generation.
2312         * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
2313         Adjust thunk dumping.
2314         * mangle.c (mangle_call_offset): New function.
2315         (mangle_thunk): Adjust for covariant thunks.
2316         * method.c (make_thunk): Adjust. Do not set name here.
2317         (finish_thunk): New function. Set name here.
2318         (use_thunk): Generate covariant thunks too.
2319         (thunk_adjust): New function.
2320         * search.c (covariant_return_p): Remove. Fold into ...
2321         (check_final_overrider): ... here. Simplify.
2322         * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
2323
2324 2002-12-03  Jason Merrill  <jason@redhat.com>
2325
2326         PR c++/8674
2327         * call.c (build_over_call): Check specifically for TARGET_EXPR
2328         when eliding.
2329
2330         PR c++/8461, c++/8625
2331         * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
2332         (cp_convert_parm_for_inlining): Remove.
2333         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
2334         Remove.
2335         * cp-tree.h (ADDR_IS_INVISIREF): Remove.
2336         * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
2337
2338         * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
2339         an ambiguous conversion.
2340
2341 2002-12-03  Mark Mitchell  <mark@codesourcery.com>
2342
2343         PR c++/8688
2344         * decl.c (reshape_init): Handle erroneous initializers.
2345
2346 2002-12-02  Mark Mitchell  <mark@codesourcery.com>
2347
2348         PR c++/8720
2349         * spew.c (remove_last_token): Make sure that last_chunk is set
2350         correctly.
2351
2352         PR c++/8615
2353         * error.c (dump_expr): Handle character constants with
2354         TREE_OVERFLOW set.
2355
2356 2002-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2357
2358         DR 180
2359         * decl.c (grokdeclarator): Require class-key for all friend class.
2360         Output the correct type and context in the error message.
2361
2362 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
2363
2364         PR c++/5919
2365         * pt.c (unify): Use variably_modified_type_p to test validity of
2366         template argument types.
2367
2368         PR c++/8727
2369         * cp-tree.h (lang_type_class): Add typeinfo_var.
2370         (CLASSTYPE_TYPEINFO_VAR): New macro.
2371         * rtti.c (get_tinfo_decl): Use it.
2372
2373         PR c++/8663
2374         * init.c (expand_member_init): Always get the main variant of a
2375         base class.
2376
2377 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
2378
2379         PR c++/8332
2380         PR c++/8493
2381         * decl.c (cxx_init_decl_processing): Use size_type_node, not
2382         c_size_type_node.
2383         * decl2.c (coerce_new_type): Likewise.
2384         * except.c (do_allocate_exception): Likewise.
2385
2386 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
2387
2388         * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
2389         dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
2390         lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
2391         repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
2392         typeck2.c: Include coretypes.h and tm.h.
2393         * Make-lang.in: Update dependencies.
2394
2395 2002-11-30  Mark Mitchell  <mark@codesourcery.com>
2396
2397         PR c++/8227
2398         * decl.c (layout_var_decl): Deal gracefully with erroneous types.
2399         (check_initializer): Validate the type of the initialized
2400         variable, even if the initializer is absent.
2401         * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
2402
2403         PR c++/8214
2404         * typeck.c (convert_for_assignment): Do not use
2405         decl_constant_value on the operand.
2406
2407         PR c++/8511
2408         * pt.c (instantiate_decl): Handle template friends defined outside
2409         of the class correctly.
2410
2411 2002-11-29  Joe Buck <jbuck@synopsys.com>
2412
2413         * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
2414         anonymous structs.
2415
2416 2002-11-29  Mark Mitchell  <mark@codesourcery.com>
2417
2418         * class.c (walk_subobject_offsets): Recur on binfos as well as on
2419         types.
2420         (layout_nonempty_base_or_field): Pass it a binfo when processing a
2421         base class.
2422         (layout_empty_base): Likewise.
2423         (build_base_field): Likewise.
2424
2425 2002-11-27  Mark Mitchell  <mark@codesourcery.com>
2426
2427         * class.c (build_base_field): Make sure we get the canonical base
2428         when descending through primary bases.
2429
2430 2002-11-26  Geoffrey Keating  <geoffk@apple.com>
2431
2432         * decl.c (check_initializer): Don't error on initialisation of
2433         a scalar with a brace-enclosed expression.
2434
2435 2002-11-26  Nathan Sidwell  <nathan@codesourcery.com>
2436
2437         * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
2438         (template_parms_equal): Remove prototype.
2439         * typeck.c (buuld_indirect_ref): Reformat.
2440
2441 2002-11-25  Jason Merrill  <jason@redhat.com>
2442
2443         * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
2444         and a DO_STMT.
2445
2446 2002-11-25  Mark Mitchell  <mark@codesourcery.com>
2447
2448         * tree.c (cp_build_qualified_type_real): Correct handling of
2449         array types.
2450         * class.c (walk_subobject_offsets): Fix thinko.
2451         (build_base_field): Record offsets of empty bases in primary
2452         virtual bases.
2453         (layout_class_type): Record offsets of empty bases in fields.
2454
2455         * search.c (is_subobject_of_p_1): Fix thinko.
2456         (lookup_field_queue_p): Likewise.
2457
2458 2002-11-24  Mark Mitchell  <mark@codesourcery.com>
2459
2460         * class.c (layout_class_type): Reuse tail padding when laying out
2461         virtual bases.
2462
2463 2002-11-22  Mark Mitchell  <mark@codesourcery.com>
2464
2465         * rtti.c (qualifier_flags): Fix thinko.
2466
2467 2002-11-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2468
2469         Remove traditional C constructs 1/n.
2470         * cp-tree.h (init_method, set_mangled_name_for_decl,
2471         build_opfncall, hack_identifier, make_thunk, use_thunk,
2472         synthesize_method, implicitly_declare_fn,
2473         skip_artificial_parms_for, optimize_function, calls_setjmp_p,
2474         maybe_clone_body): Remove use of PARAMS.
2475
2476         * method.c (do_build_assign_ref, do_build_copy_constructor,
2477         synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
2478         Likewise.
2479         (synthesize_method): Use 'bool' type and constants instead of
2480         'int'.
2481         (locate_copy): Likewise.
2482         (implicitly_declare_fn): Likewise.
2483
2484         * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
2485         Remove old-style declaration.
2486         (maybe_clone_body): Use 'bool' type and constants.
2487
2488 2002-11-21  Glen Nakamura  <glen@imodulo.com>
2489
2490         PR c++/8342
2491         * typeck.c (get_member_function_from_ptrfunc): Make sure that a
2492         SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
2493         of the branches of a COND_EXPR.
2494
2495 2002-11-19  Mark Mitchell  <mark@codesourcery.com>
2496
2497         * pt.c (for_each_template_parm): Free allocated memory.
2498         * search.c (is_subobject_of_p_1): New function.
2499         (is_subobject_of_p): Avoid walking virtual bases multiple times.
2500
2501 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
2502
2503         * g++spec.c (lang_specific_spec_functions): New.
2504
2505 2002-11-15  Kazu Hirata  <kazu@cs.umass.edu>
2506
2507         * ChangeLog: Follow spelling conventions.
2508         * class.c: Likewise.
2509         * decl2.c: Likewise.
2510
2511 2002-11-14  Zack Weinberg  <zack@codesourcery.com>
2512
2513         * search.c (dfs_push_decls): Do not try to reorder elements
2514         3..n of method_vec if method_vec has only two elements.
2515         Reverse order of two tests to avoid accessing unallocated
2516         memory.
2517
2518 2002-11-14  Mark Mitchell  <mark@codesourcery.com>
2519
2520         * class.c (dfs_find_final_overrider): Adjust so that the most
2521         derived object is a binfo, rather than a class type.
2522         (find_final_overrider): Likewise.
2523         (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
2524         (add_vcall_offset): Likewise.
2525
2526 2002-11-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2527
2528         PR c++/8389
2529         * pt.c (instantiate_template): Push class scope for member
2530         functions.
2531         (get_mostly_instantiated_function_type): Likewise.  Don't call
2532         tsubst on context.  Remove CONTEXTP and TPARMSP parameters.
2533         * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
2534         * mangle.c (write_encoding, write_unqualified_name): Adjust.
2535
2536 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
2537
2538         * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
2539         vcall offfsets.  Split out ...
2540         (add_vcall_offset): ... new function.
2541
2542         PR c++/8338
2543         * pt.c (for_each_template_parm): Add htab parameter.
2544         (process_partial_specialization): Adjust call.
2545         (push_template_decl_real): Likewise.
2546         (pair_fn_data): Add visited.
2547         (for_each_template_parm_r): Avoid walking duplicates more than
2548         once.
2549         (uses_template_parms): Adjust call to for_each_template_parm.
2550
2551 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
2552
2553         * class.c (add_implicitly_declared_members): Put implicitly
2554         declared functions at the end of TYPE_METHODs when -fabi-version
2555         is at least 2.
2556
2557 2002-11-05  Geoffrey Keating  <geoffk@apple.com>
2558
2559         * decl2.c (finish_file): Correct spelling.
2560
2561 2002-11-03  Mark Mitchell  <mark@codesourcery.com>
2562
2563         * call.c (build_special_member_call): Do not try to lookup VTTs by
2564         name.
2565         * class.c (vtbl_init_data): Add generate_vcall_entries.
2566         (get_vtable_decl): Do not look up virtual tables by name.
2567         (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
2568         (set_primary_base): Do not set CLASSTYPE_RTTI.
2569         (determine_primary_base): Likewise.
2570         (get_matching_virtual): Remove.
2571         (get_vcall_index): New function.
2572         (update_vtable_entry_for_fn): Do not try to use virtual thunks
2573         when they are not required.  Assign vcall indices at this point.
2574         (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
2575         Do update dynamic_classes.
2576         (build_vtt): Do not add VTTs to the symbol table.
2577         (build_ctor_vtbl_group): Likewise.
2578         (build_vtbl_initializer): Simplify handling of vcall indices.
2579         (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
2580         for the most derived class.
2581         (add_vcall_offset_vtbl_entries_1): But do not actually add them to
2582         the vtable.
2583         * cp-tree.h (dynamic_classes): New macro.
2584         (lang_type_class): Remove rtti.  Add vtables.  Add vcall_indices.
2585         (CLASSTYPE_RTTI): Remove.
2586         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
2587         (CLASSTYPE_VCALL_INDICES): New macro.
2588         (CLASSTYPE_VTABLES): Likewise.
2589         (BV_USE_VCALL_INDEX_P): Remove.
2590         (build_vtable_path): Remove.
2591         * decl2.c (finish_vtable_vardecl): Remove.
2592         (key_method): Remove #if 0'd code.
2593         (finish_vtable_vardecl): Rename to ...
2594         (maybe_emit_vtables): ... this.
2595         (finish_file): Use it.
2596         * search.c (look_for_overrides_here): Update comment.
2597
2598 2002-11-01  Zack Weinberg  <zack@codesourcery.com>
2599
2600         PR c/7353 redux
2601         * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
2602
2603 2002-10-30  Jason Merrill  <jason@redhat.com>
2604
2605         PR c++/8186
2606         * cp-tree.h (ADDR_IS_INVISIREF): New macro.
2607         * call.c (convert_for_arg_passing): Set it.
2608         * except.c (stabilize_throw_expr): Recurse for such an arg.
2609
2610 2002-10-31  Mark Mitchell  <mark@codesourcery.com>
2611
2612         * cp-tree.h (lang_decl_flags): Remove init_priority.
2613         (lang_decl): Add delta.
2614         (GLOBAL_INIT_PRIORITY): Remove.
2615         (THUNK_DELTA): Revise definition.
2616         * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
2617         * dump.c (cp_dump_tree): Don't dump it.
2618
2619 2002-10-30  Mark Mitchell  <mark@codesourcery.com>
2620
2621         PR c++/8160
2622         * typeck2.c (process_init_constructor): Call complete_array_type.
2623
2624         PR c++/8149
2625         * decl.c (make_typename_type): Issue errors about invalid results.
2626
2627 2002-10-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2628
2629         Core issue 287, PR c++/7639
2630         * cp-tree.h (lang_type_class): Add decl_list field.
2631         (CLASSTYPE_DECL_LIST): New macro.
2632         (maybe_add_class_template_decl_list): Add declaration.
2633         * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
2634         (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
2635         (maybe_add_class_template_decl_list): New function.
2636         (add_implicitly_declared_members): Use it.
2637         * decl.c (maybe_process_template_type_declaration): Likewise.
2638         (pushtag): Likewise.
2639         * friend.c (add_friend): Likewise.
2640         (make_friend_class): Likewise.
2641         * semantics.c (finish_member_declaration): Likewise.
2642         (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
2643         * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
2644         to process members and friends in the order of declaration.
2645
2646 2002-10-29  Mark Mitchell  <mark@codesourcery.com>
2647
2648         PR c++/8287
2649         * decl.c (finish_destructor_body): Create the label to jump to
2650         when returning from a destructor here.
2651         (finish_function_body): Rather than here.
2652
2653 2002-10-25  Zack Weinberg  <zack@codesourcery.com>
2654
2655         PR c++/7266
2656         * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
2657         SCOPE_REF is not null before dereferencing it.
2658
2659 2002-10-25  Mark Mitchell  <mark@codesourcery.com>
2660
2661         * call.c (build_over_call): Use DECL_CONTEXT, not
2662         DECL_VIRTUAL_CONTEXT.
2663         * class.c (modify_vtable_entry): Don't mess with
2664         DECL_VIRTUAL_CONTEXT.
2665         (set_vindex): Remove.
2666         (set_primary_base): Remove vfuns_p parameter.
2667         (determine_primary_base): Likewise.
2668         (modify_all_vtables): Likewise.
2669         (layout_class_type): Likewise.  Adjust calls to other functions
2670         accordingly.
2671         (finish_struct_1): Adjust calls to modified functions.  Set
2672         DECL_VINDEX here.
2673         * cp-tree.h (lang_type_class): Remove vsize.
2674         (CLASSTYPE_VSIZE): Remove.
2675         (lang_decl): Remove thunks.
2676         (DECL_THUNKS): Adjust.
2677         (DECL_VIRTUAL_CONTEXT): Remove.
2678         (duplicate_decls): Don't copy it.
2679         * pt.c (build_template_decl): Don't set it.
2680         (tsubst_decl): Likewise.
2681         * typeck.c (expand_ptrmemfunc_cst): Don't use it.
2682
2683         * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
2684         (build_vtable_entry): Remove.
2685         * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
2686         (lang_decl): Add thunks.
2687         (DECL_THUNKS): New macro.
2688         * decl.c (duplicate_decls): Copy it.
2689         * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
2690         * semantics.c (emit_associated_thunks): Simplify.
2691
2692 2002-10-24  David Edelsohn  <edelsohn@gnu.org>
2693
2694         PR c++/7228
2695         * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
2696         lang_type structure exists before accessing field.
2697         (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
2698         (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
2699         (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
2700         * class.c (check_field_decls): Use new macros.
2701         * typeck2.c (process_init_constructor): Remove redundant check for
2702         existence of lang_type structure.
2703
2704 2002-10-24  Mark Mitchell  <mark@codesourcery.com>
2705
2706         * class.c (end_of_base): New method.
2707         (end_of_class): Use it.  Check indirect virtual bases.
2708
2709         * class.c (check_field_decls): Fix typo.
2710
2711 2002-10-23  Mark Mitchell  <mark@codesourcery.com>
2712
2713         PR c++/8067
2714         * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
2715         related variables.
2716
2717         PR c++/7679
2718         * spew.c (next_token): Do not return an endless stream of
2719         END_OF_SAVED_INPUT tokens.
2720         (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
2721         the cached token stream.
2722         (snarf_defarg): Likewise.
2723
2724 2002-10-23  Zack Weinberg  <zack@codesourcery.com>
2725
2726         * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
2727         variably_modified_type_p.
2728         * cp-tree.h: Remove prototype of variably_modified_type_p.
2729         * tree.c (variably_modified_type_p): Remove; now implemented
2730         in language-independent code.
2731
2732 2002-10-22  Mark Mitchell  <mark@codesourcery.com>
2733
2734         PR c++/6579
2735         * spew.c (snarf_parenthesized_expression): New function.
2736         (snarf_block): Use it.
2737
2738 2002-10-22  Richard Henderson  <rth@redhat.com>
2739
2740         * method.c (use_thunk): Always compute vcall_value; assert that
2741         it is not zero.  Use can_output_mi_thunk; use output_mi_thunk
2742         for vcall thunks as well.
2743
2744 2002-10-21  Mark Mitchell  <mark@codesourcery.com>
2745
2746         * class.c (empty_base_at_nonzero_offset_p): New function.
2747         (layout_nonempty_base_or_field): Do not check for conflicts when
2748         laying out a virtual base using the GCC 3.2 ABI.
2749         (build_base_field): Correct checking for presence of empty classes
2750         at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
2751
2752         * class.c (include_empty_classes): Use normalize_rli.
2753         (layout_class_type): Likewise.
2754
2755         * decl.c (reshape_init): Tweak handling of character arrays.
2756
2757         PR c++/8218
2758         * cp-tree.h (lang_type_class): Add contains_empty_class_p.
2759         (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
2760         * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
2761         (check_field_decls): Likewise.
2762         (layout_class_type): Likewise.
2763         (finish_struct_1): Initialize it.
2764         (walk_subobject_offsets): Use it to prune searches.
2765
2766 2002-10-20  Mark Mitchell  <mark@codesourcery.com>
2767
2768         * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
2769         * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
2770         TARGET_ASM_OUTPUT_MI_THUNK in comments.
2771
2772 2002-10-18  Zack Weinberg  <zack@codesourcery.com>
2773
2774         * decl.c (start_decl): Point users of the old initialized-
2775         typedef extension at __typeof__.
2776
2777 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
2778
2779         * Make-lang.in (method.o): Depend on TARGET_H.
2780         * method.c (target.h): Include it.
2781         (use_thunk): Use target hooks.  Use vcall thunks, if available.
2782
2783 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
2784
2785         * class.c (base_derived_from): Make sure return value is a bool.
2786
2787 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
2788
2789         * class.c (find_final_overrider_data_s): Remove overriding_fn and
2790         overriding_base.
2791         (dfs_base_derived_from): New function.
2792         (base_derived_from): Likewise.
2793         (dfs_find_final_overrider): Use base_derived_from.
2794         (find_final_overrider): Adjust.
2795
2796 2002-10-18  Jason Merrill  <jason@redhat.com>
2797
2798         PR c++/8080
2799         * semantics.c (finish_for_cond, finish_while_cond): Don't mess
2800         with condition decls in a template.
2801
2802 2002-10-17  Nathan Sidwell  <nathan@codesourcery.com>
2803
2804         * class.c (add_method): Compare template parms too.
2805
2806 2002-10-17  Mark Mitchell  <mark@codesourcery.com>
2807
2808         PR c++/7584
2809         * class.c (handle_using_decl): Allow the declaration used to be
2810         from an ambiguous base.
2811
2812         * pt.c (convert_template_argument): Revert this change:
2813                 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
2814                 * pt.c (convert_template_argument): Do not fold non-type
2815                 template rguments when inside a template.
2816
2817         * init.c (expand_default_init): Handle brace-enclosed initializers
2818         correctly.
2819
2820 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
2821
2822         * mangle.c (write_expression): Correct handling of enumeration
2823         constants.
2824         (write_template_arg): Likewise.
2825         * pt.c (convert_template_argument): Do not fold non-type template
2826         arguments when inside a template.
2827
2828         PR c++/7478
2829         * cvt.c (convert_to_reference): Allow references as the incoming
2830         type.
2831
2832 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
2833
2834         PR c++/7524
2835         * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
2836         build_qualified_type.
2837
2838 2002-10-15  Richard Henderson  <rth@redhat.com>
2839
2840         * error.c (dump_expr): Use real_to_decimal directly, and with
2841         the new arguments.
2842
2843 2002-10-15  Mark Mitchell  <mark@codesourcery.com>
2844
2845         * decl.c (reshape_init): Fix typo.
2846
2847         * cp-tree.h (operator_name_info_t): Add arity.
2848         * lex.c (init_operators): Initialize it.
2849         * mangle.c (write_conversion_operator_name): New function.
2850         (write_unqualified_name): Use it.
2851         (write_template_args): Accept template arguments as a TREE_LIST.
2852         (write_expression): Adjust handling of qualified names to match
2853         specification.
2854
2855 2002-10-15  Jason Merrill  <jason@redhat.com>
2856
2857         * call.c (call_builtin_trap): New fn.
2858         (convert_arg_to_ellipsis): Use it.  Downgrade error to warning.
2859         (build_call): Don't set current_function_returns_abnormally outside
2860         a function.
2861
2862 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
2863
2864         * class.c (check_field_decls): Remove empty_p parameter.  Instead,
2865         clear CLASSTYPE_EMPTY_P.
2866         (build_base_field): Likewise.
2867         (build_base_fields): Likewise.
2868         (check_bases_and_members): Likewise.
2869         (create_vtbl_ptr): Likewise.
2870         (layout_class_type): Likewise.  Ensure that empty classes have
2871         size zero when used as base classes in the 3.2 ABI.
2872         (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
2873         CLASSTYPE_NEARLY_EMPTY_P.  Adjust calls to avoid passing empty_p
2874         parameter.
2875         (is_empty_class): Correct definition when using post-3.2 ABI.
2876         * cp-tree.h (lang_type_class): Add empty_p.
2877         (CLASSTYPE_EMPTY_P): New macro.
2878
2879 2002-10-12  Nathan Sidwell  <nathan@codesourcery.com>
2880
2881         * init.c (build_delete): Do not apply save_expr for arrays.
2882         (build_vec_delete): Likewise.
2883
2884 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
2885
2886         * decl.c (layout_var_decl): Call layout_decl even for variables
2887         whose type is an array with unspecified bounds.
2888
2889         PR c++/7176
2890         * lex.c (do_identifier): Add another option for the parsing
2891         parameter.
2892         * parse.y (do_id): Use it.
2893
2894 2002-10-11  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2895
2896         PRs C++/6803, C++/7721 and C++/7803
2897         * decl.c (grokdeclarator): Gracefully handle template-name as
2898         decl-specifier.
2899
2900 2002-10-11  Jason Molenda  <jmolenda@apple.com>
2901
2902         * init.c (build_field_list): Provide uses_unions_p with a default
2903         value.
2904
2905 2002-10-11  Mark Mitchell  <mark@codesourcery.com>
2906
2907         PR c++/5661
2908         * cp-tree.h (variably_modified_type_p): New function.
2909         (grokdeclarator) Tighten check for variably modified types as
2910         fields.
2911         * pt.c (convert_template_argument): Do not allow variably modified
2912         types as template arguments.
2913         * tree.c (variably_modified_type_p): New function.
2914
2915         * NEWS: Document removal of "new X = ..." extension.
2916         * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
2917         brace-enclosed initializers.
2918         * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
2919         (initialize_local_var): Remove declaration.
2920         (expand_static_init): Likewise.
2921         * decl.c (next_initializable_field): New function.
2922         (reshape_init): Likewise.
2923         (check_initializer): Use them.  Build dynamic initializer for
2924         aggregates here too.
2925         (initialize_local_var): Simplify, and incorporate cleanup
2926         insertion code as well.
2927         (destroy_local_var): Remove.
2928         (cp_finish_decl): Tidy.
2929         (expand_static_init): Fold checks for whether or not a variable
2930         needs initialization into this function.  Simplify.
2931         * decl2.c (do_static_initialization): Simplify.
2932         * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
2933         be done for us automatically.
2934         (expand_default_init): Handle brace-enclosed initializers
2935         correctly.
2936         (expand_aggr_init_1): Remove RTL-generation code.
2937         (build_vec_init): Remove "new X = ..." support.
2938         * parse.y (new_initializer): Likewise.
2939         * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
2940         brace-enclosed initializer.
2941         (create_pseudo_type_info): Likewise.
2942         * typeck2.c (store_init_value): Don't try to handle digest_init
2943         being called more than once.
2944         (digest_init): Tidy handling of brace-enclosed initializers.
2945
2946 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2947
2948         * decl.c (typename_hash): Use htab_hash_pointer.
2949
2950 2002-10-10  Jim Wilson  <wilson@redhat.com>
2951
2952         * decl.c (duplicate_decls): Don't call decl_attributes.
2953
2954 2002-10-09  Zack Weinberg  <zack@codesourcery.com>
2955
2956         PR c/7353
2957         * decl.c (start_decl): Unconditionally issue error for
2958         'typedef foo = bar'.
2959         (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
2960         (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
2961
2962 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2963
2964         * decl2.c (prune_vtable_vardecl): Delete unused function.
2965
2966 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
2967
2968         PR c++/7754
2969         * decl2.c (finish_anon_union): Do not expand anonymous unions when
2970         procesing template functions.
2971         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
2972         type. Call layout_decl.
2973         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
2974
2975 2002-10-07  Richard Henderson  <rth@redhat.com>
2976
2977         * decl2.c, pt.c: Revert c++/7754 fix.
2978
2979 2002-10-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2980
2981         PR c++/7804
2982         * error.c (dump_expr) [REAL_CST]: Output in decimal format.
2983
2984 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
2985
2986         PR c++/7931
2987         * pt.c (for_each_template_parm_r): Handle BASELINKs.
2988
2989         PR c++/7754
2990         * decl2.c (finish_anon_union): Do not expand anonymous unions when
2991         procesing template functions.
2992         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
2993         type. Call layout_decl.
2994         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
2995
2996 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
2997
2998         PR c++/8006
2999         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
3000         template parameters.
3001         (globals): Add entity and need_abi_warning.
3002         (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
3003         CLASSTYPE_TEMPLATE_INFO.
3004         (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
3005         TYPE_TI_TEMPLATE.
3006         (write_prefix): Handle typename types correctly.
3007         (write_template_prefix): Handle template template parameters
3008         correctly.
3009         (start_mangling): Add entity parameter.
3010         (finish_mangling): Warn about names whose mangling will change.
3011         (mangle_decl_string): Adjust.
3012         (mangle_type_string): Likewise.
3013         (mangle_special_for_type): Likewise.
3014         (mangle_ctor_vtbl_for_type): Likewise.
3015         (mangle_thunk): Likewise.
3016         (mangle_guard_variable): Likewise.
3017         (mangle_ref_init_variable): Likewise.
3018
3019 2002-10-02  Mark Mitchell  <mark@codesourcery.com>
3020
3021         PR c++/7188.
3022         * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
3023         * cp-tree.h (emit_base_init): Rename to ....
3024         (emit_mem_initializers): ... this.
3025         (expand_member_init): Change prototype.
3026         * init.c (perform_member_init): Compute explicit, rather than
3027         requiring it as a parameter.
3028         (sort_member_init): Rename to ...
3029         (sort_mem_initializers): ... this.  Process bases and data members
3030         together.
3031         (sort_base_init): Remove.
3032         (emit_base_init): Rename to ...
3033         (emit_mem_initializers): ... this.
3034         (expand_aggr_vbase_init_1): Remove.
3035         (construct_virtual_bases): Rename to ...
3036         (construct_virtual_base): ... this.
3037         (expand_member_init): Rework handling of base initializers.
3038         * method.c (do_build_copy_constructor): Use
3039         finish_mem_initializers.
3040         * parse.y (member_init): Adjust calls to expand_member_init.
3041         * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
3042         (tsubst_initializer_list): Use expand_member_init.
3043         * semantics.c (finish_mem_intiailizers): Simplify.
3044
3045 2002-10-02  Matt Austern  <austern@apple.com>
3046         * decl.c (walk_vtables_r): Fixed typo that caused result to
3047         never get a nonzero value.
3048
3049 2002-10-02  Roger Sayle  <roger@eyesopen.com>
3050
3051         PR optimization/6627
3052         * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
3053         from here, and move it to tree.h.
3054         * decl.c (cxx_init_decl_processing): If storing the vbit
3055         in function pointers, ensure that force_align_functions_log
3056         is atleast one.
3057
3058 2002-10-02  Matt Austern  <austern@apple.com>
3059
3060         * class.c (check_field_decls): Changed warning about const member
3061         variables so that it doesn't get issued for a class aggregate.
3062
3063 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
3064
3065         * decl.c (cp_finish_decl): Make sure array types are laid out,
3066         even if the array bounds are unknown.
3067
3068 2002-10-01  Steve Ellcey  <sje@cup.hp.com>
3069
3070         * class.c (build_vtbl_initializer): Change build_c_cast
3071         to build1.
3072
3073 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
3074
3075         * decl.c (cp_finish_decl): Make sure array types are laid out,
3076         even if the array bounds are unknown.
3077
3078         * decl.c (cp_finish_decl): Correct check for dynamic
3079         initialization of thread-local storage.
3080
3081 2002-09-30  Nathan Sidwell  <nathan@codesourcery.com>
3082
3083         * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
3084         overloaded.
3085
3086 2002-09-30  Steve Ellcey  <sje@cup.hp.com>
3087
3088         * class.c (build_vtbl_initializer): Add cast.
3089         (add_vcall_offset_vtbl_entries_1):
3090         Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
3091
3092 2002-09-30  Mark Mitchell  <mark@codesourcery.com>
3093
3094         * class.c (walk_subobject_offsets): Correct the calculation of
3095         offsets for virtual bases.  Correct the counting of array
3096         elements.
3097         (layout_nonempty_base_or_field): Simplify.  Correct the
3098         calculation of offsets to be propagated through the binfo
3099         hierarchy.
3100         (build_base_field): Avoid creating a FIELD_DECL for empty bases.
3101         Add the FIELD_DECL to TYPE_FIELDS.
3102         (build_base_fields): Adjust accordingly.
3103         (layout_virtual_bases): Use build_base_field.
3104         (end_of_class): Return a tree, not an integer.
3105         (warn_about_ambiguous_direct_bases): Rename to ...
3106         (warn_about_ambiguous_bases): ... this.
3107         (include_empty_classes): New function.
3108         (layout_class_type): Create an alternative version of the type to
3109         be used when as a base class type.  Do not call
3110         finish_record_layout until we are done laying out the class.
3111         * cp-tree.h (lang_type_class): Remove size, size_unit.  Add
3112         as_base.
3113         (CLASSTYPE_SIZE): Reimplement.
3114         (CLASSTYPE_SIZE_UNIT): Likewise.
3115         (CLASSTYPE_ALIGN): Likweise.
3116         (CLASSTYPE_USER_ALIGN): Likewise.
3117         (CLASSTYPE_AS_BASE): New macro.
3118         (DECL_INITIALIZED_P): Likewise.
3119         (extract_init): Remove prototype.
3120         (build_forced_zero_init): Rename to ...
3121         (build_zero_init): ... this.
3122         (force_store_init_value): Remove.
3123         * decl.c (obscure_complex_init): Remove.
3124         (duplicate_decls): Copy DECL_INITIALIZED_P.
3125         (check_initializer): Do not leave junk in DECL_INITIAL.
3126         (cp_finish_decl): Handle zero-initialization of entities with
3127         static storage duration.
3128         * expr.c (extract_init): Remove.
3129         * init.c (build_forced_zero_init): Remove.
3130         (build_zero_init): New function.
3131         (build_default_init): Use it.
3132         (build_field_list): Skip FIELD_DECLs for base subobjects.
3133         (push_base_cleanups): Likewise.
3134         * method.c (do_build_assign_ref): Likewise.
3135         (synthesize_exception_spec): Likewise.
3136         * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
3137         (regenerate_decl_from_template): To not set DECL_INITIAL for a
3138         static data member whose initialization took place in its class.
3139         (instantiate_decl): Do not pass an initializer to cp_finish_decl
3140         in that situation.
3141         * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
3142         (dfs_unuse_fields): Likewise.
3143         * tree.c (pod_type_p): Handle error_mark_node.
3144         (zero_init_p): Likewise.
3145         * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
3146         subobjects.
3147         * typeck2.c (store_init_value): Remove #if 0'd code.
3148         (force_store_init_value): Remove.
3149         (process_init_constructor): Use build_zero_init.
3150
3151 2002-09-29  Nathan Sidwell  <nathan@codesourcery.com>
3152
3153         PR c++/7788
3154         * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
3155
3156 2002-09-29  Kazu Hirata  <kazu@cs.umass.edu>
3157
3158         * cp-tree.h: Fix comment typos.
3159         * decl.c: Likewise.
3160         * pt.c: Likewise.
3161
3162 2002-09-25  Mark Mitchell  <mark@codesourcery.com>
3163
3164         * cp/class.c (contains_empty_class_p): New method.
3165         (walk_subobject_offsets): Correct computation of field offset.
3166         (layout_empty_base): Correct placement of emtpy base classes.
3167         (layout_class_type): Warn about ABI changes.
3168
3169 2002-09-23  Mark Mitchell  <mark@codesourcery.com>
3170
3171         * cp/class.c (layout_virtual_bases): Do not round the size of the
3172         type to a multiple of the alignment before laying out virtual bases.
3173         (layout_class_type): Correct handling of bit-fields that are wider
3174         than their type inside unions.  Round the size of the type to a
3175         even number of bytes when computing the size without virtual
3176         bases.
3177         * cp/cp-tree.h (abi_version_at_least): New macro.
3178
3179 2002-09-21  Kazu Hirata  <kazu@cs.umass.edu>
3180
3181         * ChangeLog: Follow spelling conventions.
3182         * ChangeLog.2: Likewise.
3183         * call.c: Likewise.
3184         * class.c: Likewise.
3185         * cp-tree.h: Likewise.
3186         * cvt.c: Likewise.
3187         * decl.c: Likewise.
3188         * decl2.c: Likewise.
3189         * except.c: Likewise.
3190         * friend.c: Likewise.
3191         * g++spec.c: Likewise.
3192         * init.c: Likewise.
3193         * lex.c: Likewise.
3194         * mangle.c: Likewise.
3195         * method.c: Likewise.
3196         * operators.def: Likewise.
3197         * optimize.c: Likewise.
3198         * pt.c: Likewise.
3199         * rtti.c: Likewise.
3200         * search.c: Likewise.
3201         * semantics.c: Likewise.
3202         * spew.c: Likewise.
3203         * tree.c: Likewise.
3204         * typeck.c: Likewise.
3205
3206 2002-09-18  Devang Patel  <dpatel@apple.com>
3207
3208         * cp/cp-tree.h: New prototype for walk_vtabls().
3209         * cp/decl.c (walk_vtables_r): New function.
3210         (struct cp_binding_level): Add new members, namespaces,
3211         names_size and vtables.
3212         (add_decl_to_level): Add decl in namespaces or vtables
3213         chain, if conditions match.
3214         (walk_vtables): New function.
3215         (walk_namespaces_r): Travers separate namespace chain
3216         for namespace decls.
3217         (wrapup_globals_for_namespace): Use names_size instead
3218         of list_length().
3219         * cp/decl2.c (finish_file): Use walk_vtables() instead of
3220         walk_globals() to walk vtable decls.
3221
3222 2002-09-18  Nathan Sidwell  <nathan@codesourcery.com>
3223
3224         * decl.c (grokdeclarator): Use assert, not internal_error. Don't
3225         ICE with invalid pointers & references.
3226
3227 2002-09-17  Zack Weinberg  <zack@codesourcery.com>
3228
3229         * Make-lang.in: Remove all references to the demangler.
3230         * cxxfilt.c: Moved to binutils.
3231
3232 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
3233
3234         PR c++/7718
3235         * pt.c (tsubst_decl): Remove assert.
3236
3237         Remove DR 295 implementation.
3238         * pt.c (check_cv_quals_for_unify): Disable function & method cases.
3239         * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
3240         about ignoring volatile qualifiers.
3241
3242         * search.c (lookup_member): Correct documentation.
3243
3244 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
3245
3246         * cp-tree.h (union lang_tree_node): Add chain_next option.
3247
3248 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
3249
3250         * parse.y (parse_finish_call_expr): Check lookup_member result.
3251
3252         PR c++/7015
3253         * semantic.c (finish_asm_stmt): Fix operand/output_operands
3254         thinko.
3255         * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
3256
3257 2002-09-15  Nathan Sidwell  <nathan@codesourcery.com>
3258
3259         PR c++/7919
3260         * call.c (build_over_call): Convert this pointer for fns found by
3261         using decls.
3262
3263 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
3264
3265         * ChangeLog: Follow spelling conventions.
3266         * ChangeLog.1: Likewise.
3267
3268 2002-09-14  Nathan Sidwell  <nathan@codesourcery.com>
3269
3270         PR c++/7768
3271         * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
3272
3273 2002-09-14  Kazu Hirata  <kazu@cs.umass.edu>
3274
3275         * error.c: Fix comment formatting.
3276         * except.c: Likewise.
3277         * expr.c: Likewise.
3278         * friend.c: Likewise.
3279         * g++spec.c: Likewise.
3280         * init.c: Likewise.
3281         * lex.c: Likewise.
3282         * mangle.c: Likewise.
3283         * method.c: Likewise.
3284         * optimize.c: Likewise.
3285         * pt.c: Likewise.
3286         * rtti.c: Likewise.
3287         * search.c: Likewise.
3288         * semantics.c: Likewise.
3289         * spew.c: Likewise.
3290         * tree.c: Likewise.
3291         * typeck.c: Likewise.
3292         * typeck2.c: Likewise.
3293
3294 2002-09-13  Matt Austern  <austern@apple.com>
3295
3296         PR C++/7828
3297         * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
3298         * cp/call.c: Change call-by-const-reference mechanism to use
3299         non_cast_lvalue_p when deciding whether the create a temporary.
3300         We need a temporary when passing, e.g. (long) x by const ref.
3301
3302 2002-09-13  Nathan Sidwell  <nathan@codesourcery.com>
3303
3304         * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
3305
3306 2002-09-13  Kazu Hirata  <kazu@cs.umass.edu>
3307
3308         * decl.c: Fix comment formatting.
3309         * decl2.c: Likewise.
3310
3311 2002-09-12  Kazu Hirata  <kazu@cs.umass.edu>
3312
3313         * call.c: Fix comment formatting.
3314         * class.c: Likewise.
3315         * cp-lang.c: Likewise.
3316         * cp-tree.h: Likewise.
3317         * cvt.c: Likewise.
3318
3319 2002-09-11  Zack Weinberg  <zack@codesourcery.com>
3320
3321         * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
3322         and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
3323         * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
3324         minor adjustments (use version_string, eliminate yet another
3325         duplicate of xmalloc)
3326
3327 2002-09-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3328
3329         * cp-tree.h (require_complete_eh_spec_types): Add prototype.
3330
3331 2002-09-05  Jason Merrill  <jason@redhat.com>
3332
3333         * typeck2.c (add_exception_specifier): Only pedwarn for an
3334         incomplete type.
3335         (require_complete_eh_spec_types): New fn.
3336         (cxx_incomplete_type_diagnostic): Also support pedwarning.
3337         * typeck.c (complete_type_or_diagnostic): Likewise.
3338         * call.c (build_call): Call require_complete_eh_spec_types.
3339         * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
3340         on an incomplete type.
3341
3342 2002-09-04  Jakub Jelinek  <jakub@redhat.com>
3343
3344         * decl.c (start_cleanup_fn): Clear interface_only before
3345         start_function, restore it afterwards.
3346
3347 2002-09-02  Nathan Sidwell  <nathan@codesourcery.com>
3348
3349         * cp-tree.h (finish_builtin_type): Remove.
3350         * decl2.c (finish_builtin_type): Move to common code.
3351         * decl.c (build_ptrmemfunc_type): Adjust.
3352         * rtti.c (create_pseudo_type_info): Adjust.
3353         (create_tinfo_types): Adjust.
3354
3355 2002-08-31  Jason Merrill  <jason@redhat.com>
3356
3357         * cp-lang.c (cp_expr_size): Allow initialization from a
3358         CONSTRUCTOR.
3359
3360 2002-08-30  Richard Henderson  <rth@redhat.com>
3361
3362         PR opt/7515
3363         * tree.c: Include target.h.
3364         (cp_cannot_inline_tree_fn): Don't auto-inline functions that
3365         don't bind locally.
3366         * Makefile.in (tree.o): Update.
3367
3368 2002-08-27  Mark Mitchell  <mark@codesourcery.com>
3369
3370         * class.c (layout_virtual_bases): Warn about bugs in G++ that
3371         result in incorrect object layouts.
3372         (layout_class_type): Likewise.
3373
3374 2002-08-24  Matt Austern  <austern@apple.com>
3375
3376         * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
3377         are allowable.
3378         (real_lvalue_p): Update caller.
3379         (lvalue_p): Ditto.
3380         (non_cast_lvalue_or_else): New.
3381         * tree.h: Declare it.
3382         * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
3383
3384 2002-08-22  Mark Mitchell  <mark@codesourcery.com>
3385
3386         * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
3387         and COND_EXPR specially; fix error message output.
3388
3389 2002-08-22  Jason Merrill  <jason@redhat.com>
3390
3391         * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
3392         * semantics.c (nullify_returns_r): Likewise.
3393
3394 2002-08-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3395
3396         Fix PR/7621
3397         * typeck.c (finish_class_member_access_expr): Diagnose cases where
3398         name lookup finds nothing.
3399
3400 2002-08-15  Jason Merrill  <jason@redhat.com>
3401
3402         * semantics.c (finish_then_clause): Remove redundant assignment.
3403         (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
3404         extra binding level outside the if/switch statement.
3405         (finish_while_cond, finish_for_cond): Rewrite complex condition
3406         into the loop body.
3407
3408 2002-08-15  Alexandre Oliva  <aoliva@redhat.com>
3409
3410         * parse.y (sizeof, alignof, typeof): New non-terminals to
3411         increment skip_evaluation.  Replace terminals with them and
3412         decrement skip_evaluation at the end of rules using them.
3413         * decl2.c (mark_used): Don't assemble_external if
3414         skipping evaluation.
3415
3416 2002-08-15  Gabriel Dos Reis  <gdr@nerim.net>
3417
3418         Fix PR/7504
3419         * parse.y (parse_finish_call_expr): Handle incomplete
3420         type used to name a scope.
3421
3422 2002-08-15  Nathan Sidwell  <nathan@codesourcery.com>
3423
3424         PR c++/7598
3425         * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
3426         regression caused by my 2002-08-08 patch.
3427
3428 2002-08-13  Mark Mitchell  <mark@codesourcery.com>
3429
3430         * decl.c (pushdecl_class_level): Honor requests to bind names to
3431         OVERLOADs.
3432
3433 2002-08-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3434
3435         * decl2.c (build_call_from_tree): Fix uninitialized variable.
3436         * parse.y (parse_finish_call_expr): Likewise.
3437         * repo.c (old_args, old_dir, old_main): Const-ify.
3438
3439 2002-08-11  Gabriel Dos Reis  <gdr@nerim.net>
3440
3441         * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE +
3442         DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
3443         * optimize.c (maybe_clone_body): Likewise.
3444         * pt.c (tsubst_enum): Likewise.
3445         (lookup_template_class): Likewise.
3446         * tree.c (cp_copy_res_decl_for_inlining): Likewise.
3447
3448 2002-08-10  Neil Booth  <neil@daikokuya.co.uk>
3449
3450         * lang-specs.h: Remove -ansi.
3451
3452 2002-08-10  Nathan Sidwell  <nathan@codesourcery.com>
3453
3454         * tree.c (maybe_dummy_object): Replace // with /* */
3455
3456 2002-08-09  Mark Mitchell  <mark@codesourcery.com>
3457
3458         * call.c (standard_conversion): Use build_ptrmem_type.
3459         * cp-tree.h (build_ptrmem_type): New function.
3460         (adjust_result_of_qualified_name_lookup): Likewise.
3461         * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
3462         static data members.
3463         (build_ptrmem_type): New function.
3464         (grokdeclarator): Do not use build_offset_type when encountering a
3465         qualified name.
3466         * parse.y (parse_finish_call_expr): Use
3467         adjust_result_of_qualified_name_lookup.
3468         * search.c (adjust_result_of_qualified_name_lookup): New function.
3469         * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
3470         accessing OFFSET_TYPEs directly.
3471
3472 2002-08-08  Mike Stump  <mrs@apple.com>
3473
3474         * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
3475         (type_decays_to): Likewise.
3476         * class.c (find_final_overrider): Likewise.
3477         (maybe_note_name_used_in_class): Likewise.
3478         * decl.c (current_tmpl_spec_kind): Likewise.
3479         (add_binding): Likewise.
3480         (push_class_binding): Likewise.
3481         (duplicate_decls): Likewise.
3482         (layout_var_decl): Likewise.
3483         (grokfndecl): Likewise.
3484         (grokdeclarator): Likewise.
3485         (check_default_argument): Likewise.
3486         * decl2.c (handle_class_head): Likewise.
3487         * error.c (dump_template_decl): Likewise.
3488         * init.c (build_offset_ref): Likewise.
3489         * pt.c (check_specialization_scope): Likewise.
3490         (determine_specialization): Likewise.
3491         (check_explicit_specialization): Likewise.
3492         (maybe_check_template_type): Likewise.
3493         (process_partial_specialization): Likewise.
3494         (check_default_tmpl_args): Likewise.
3495         (push_template_decl_real): Likewise.
3496         (convert_template_argument): Likewise.
3497         (try_class_unification): Likewise.
3498         (get_bindings_real): Likewise.
3499         (do_decl_instantiation): Likewise.
3500         * semantics.c (begin_function_definition): Likewise.
3501         (finish_member_declaration): Likewise.
3502         (check_multiple_declarators): Likewise.
3503         * typeck.c (comp_array_types): Likewise.
3504         (comptypes): Likewise.
3505         (expr_sizeof): Likewise.
3506         (build_binary_op): Likewise.
3507         (dubious_conversion_warnings): Likewise.
3508         (check_return_expr): Likewise.
3509
3510 2002-08-08  Mark Mitchell  <mark@codesourcery.com>
3511
3512         * typeck.c (build_class_member_access_expr): Do not return
3513         error_mark_node when no error has occurred.
3514
3515 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
3516
3517         * typeck.c (build_component_addr): Remove.
3518         (build_unary_op): Just check it's not a bitfield, and then build
3519         an ADDR_EXPR.
3520
3521 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
3522
3523         * class.c (convert_to_base): Correct check for error_mark_node.
3524         (create_vtable_ptr): Remove unused VFUNS_P parm.
3525
3526 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
3527
3528         * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
3529
3530 2002-08-07  Mark Mitchell  <mark@codesourcery.com>
3531
3532         Rework build_component_ref.
3533         * call.c (build_vfield_ref): Do not go through build_component_ref.
3534         (build_field_call): Use build_class_member_access_expr.
3535         (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
3536         (build_object_call): Likewise.
3537         * class.c (convert_to_base): New function.
3538         (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
3539         (instantiate_type): Handle BASELINKs.
3540         * cp-tree.def (BASELINK): New tree code.
3541         * cp-tree.h (BASELINK_P): Reimplement.
3542         (SET_BASELINK_P): Remove.
3543         (BASELINK_BINFO): Reimplement.
3544         (BASELINK_FUNCTIONS): Likewise.
3545         (BASELINK_ACCESS_BINFO): Likewise.
3546         (BASELINK_OPTYPE): Likewise.
3547         (convert_to_base): New function.
3548         (name_p): Likewise.
3549         (build_object_ref): Remove.
3550         (build_component_ref_1): Likewise.
3551         (build_component_ref): Likewise.
3552         (build_x_component_ref): Likewise.
3553         (build_class_member_access_expr): New function.
3554         (finish_class_member_access_expr): Likewise.
3555         (build_ptrmemfunc_access_expr): Likewise.
3556         * decl.c (grokdeclarator): Handle BASELINKs.
3557         * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
3558         finish_class_member_access_expr.
3559         (arg_assoc): Handle BASELINKs.
3560         (do_class_using_decl): Likewise.
3561         * error.c (dump_decl): Likewise.
3562         (dump_expr): Use build_ptrmemfunc_access_expr.
3563         * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
3564         destructors.
3565         (build_throw): Use BASELINK_FUNCTIONS.
3566         * init.c (perform_member_init): Use
3567         build_class_member_access_expr.
3568         (build_offset_ref): Handle BASELINKs.  Use
3569         build_class_member_access_expr.
3570         * method.c (hack_identifier): Likewise.
3571         * parse.y (do_id): Use BASELINK, not TREE_LIST.
3572         (primary): Remove uses of build_object_ref.
3573         * pt.c (lookup_template_function): Handle BASELINKs.
3574         (resolve_overloaded_unification): Likewise.
3575         * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
3576         (lookup_field): Use BASELINK, not TREE_LIST.
3577         (lookup_fnfiels): Likewise.
3578         (setup_class_bindings): Likewise.
3579         * semantics.c (finish_object_call_expr): Do not use
3580         build_method_call when we already know what function is being
3581         called.
3582         * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
3583         * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
3584         TREE_CHAIN.
3585         (name_p): New function.
3586         * typeck.c (build_object_ref): Remove.
3587         (build_component_ref_1): Likewise.
3588         (build_x_component_ref): Likewise.
3589         (build_class_member_access_expr): New function.
3590         (finish_class_member_access_expr): Likewise.
3591         (build_ptrmemfunc_access_expr): Likewise.
3592         (get_member_function_from_ptrfunc): Use
3593         build_ptrmemfunc_access_expr.
3594         (build_binary_op): Likewise.
3595         (build_unary_op): Likewise.
3596         (build_ptrmemfunc): Likewise.
3597         (pfn_from_ptrmemfunc): Likewise.
3598         * typeck2.c (build_m_component_ref): Adjust comment.
3599
3600 2002-08-07  Neil Booth  <neil@daikokuya.co.uk>
3601
3602         * Make-lang.in (CXX_C_OBJS): Update.
3603         * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
3604         * cp-tree.h (cxx_decode_option): Remove.
3605         * decl2.c (compare_options, lang_f_options, unsupported_options,
3606         cxx_decode_option): Remove.
3607
3608 2002-08-06  Gabriel Dos Reis  <gdr@nerim.net>
3609
3610         * typeck.c (build_x_unary_op): Handle pointer-to-member.
3611
3612 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
3613
3614         * class.c: Don't include obstack.h.
3615         (popclass):
3616         * decl2.c: Delete bogus comment.
3617         * error.c: Don't include obstack.h.
3618         * except.c: Likewise.
3619         (dump_type): Correct comment.
3620         * method.c: Don't include obstack.h.
3621         * tree.c: Likewise.
3622
3623 2002-08-04  Gabriel Dos Reis  <gdr@nerim.net>
3624
3625         Fix PR/2213
3626         * cvt.c (cp_convert_to_pointer): Reject conversions from integral
3627         expressions to pointer-to-data-member of pointer-to-member-functions.
3628
3629 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
3630
3631         * cvt.c (ocp_convert): Delete obsolete code.
3632         * parse.y (permanent_obstack): Delete declaration.
3633         * pt.c (permanent_obstack): Delete declaration.
3634         * repo.c (permanent_obstack): Delete declaration.
3635         (open_repo_file): Use xmalloc instead of permanent_obstack.
3636         (init_repo): Use xstrdup instead of permanent_obstack.
3637
3638 2002-08-04  Nathan Sidwell  <nathan@codesourcery.com>
3639
3640         * cp-tree.h (VF_DERIVED_VALUE): Remove.
3641         * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
3642
3643 2002-08-03  Nathan Sidwell  <nathan@codesourcery.com>
3644
3645         PR 7470.
3646         C++ ABI change - vfunc ordering.
3647         * class.c (add_virtual_function): Remove.
3648         (dfs_modify_all_vtables): Take list of all declared
3649         virtuals. Assign all that are not in primary base.
3650         (check_for_override): Adjust comments.
3651         (create_vtable_ptr): Take single list of virtuals. Build chain
3652         of declared virtuals here.
3653         (layout_class_type): Take single list of virtuals. Adjust.
3654         (finish_struct_1): Keep virtuals on single list. Adjust.
3655
3656 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
3657
3658         * init.c (build_member_call): Use build_new_method_call, not
3659         build_method_call.
3660
3661 2002-08-02  Krister Walfridsson  <cato@df.lth.se>
3662
3663         * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
3664
3665 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
3666
3667         * call.c (build_method_call): Issue a more helpful error message
3668         about ambiguous method names.
3669
3670 2002-08-02  Nathan Sidwell  <nathan@codesourcery.com>
3671
3672         * tree.c (build_shared_int_cst): Make cache file scope, and
3673         GTY it.
3674
3675 2002-08-02  Jason Merrill  <jason@redhat.com>
3676
3677         * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
3678         (cp_expr_size): New fn.
3679         * call.c (build_over_call): Lose empty class hackery.
3680         (convert_arg_to_ellipsis): Promote non-POD warning to error.
3681         * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
3682
3683         * semantics.c (expand_body): Do tree optimization in the function
3684         context, too.
3685
3686 2002-08-01  Neil Booth  <neil@daikokuya.co.uk>
3687
3688         * cp-tree.h: Move all warning and flag declarations to c-common.h.
3689         * decl.c: Move all warning and flag variables to c-common.c.
3690         * decl2.c: Move all warning and flag variables to c-common.c.
3691         * lex.c (flag_digraphs): Remove.
3692         (warn_traditional): Now in c-common.c.
3693
3694 2002-07-31  Mark Mitchell  <mark@codesourcery.com>
3695
3696         * call.c (build_field_call): Do not look up the field by name.
3697         (build_method_call): Simplify.
3698         (struct z_candidate): Add access_path and conversion_path.  Remove
3699         basetype_path.
3700         (convert_class_to_reference): Adjust use of
3701         add_function_candidate.
3702         (add_candidate): Add conversion_path argument.
3703         (add_function_candidate): Use it.
3704         (add_conv_dndidate): Likewise.
3705         (build_builtin_candidate): Likewise.
3706         (add_template_candidate_real): Add conversion_path argument.
3707         (add_template_conv_candidate): Likewise.
3708         (add_template_candidate): Likewise.
3709         (build_user_type_conversion_1): Use it.
3710         (build_new_function_call): Remove name lookup code.  Adjust use of
3711         add_template_candidate and add_function_candidate.
3712         (build_new_op): Likewise.
3713         (convert_like_real): Use build_special_member_call.
3714         (build_over_call): Use cand->conversion_path.
3715         (build_special_member_call): New method.
3716         (build_new_method_call): Remove name lookup code.
3717         * cp-tree.def (OFFSET_REF): Update documentation.
3718         (TEMPLATE_ID_EXPR): Likewise.
3719         * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
3720         (BASELINK_OPTYPE): Likewise.
3721         (build_new_method_call): Adjust prototype.
3722         (build_special_member_call): New method.
3723         (build_baselink): New method.
3724         (build_offset_ref_call_from_tree): Likewise.
3725         (build_call_from_tree): Likewise.
3726         (finish_qualified_call_expr): Remove.
3727         (finish_call_expr): Adjust prototype.
3728         (build_x_function_call): Remove.
3729         * cvt.c (ocp_convert): Use build_special_member_call.
3730         * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
3731         (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
3732         CALL_EXPR.
3733         (build_offset_ref_call_from_tree): New function.
3734         (build_call_from_tree): Likewise.
3735         * init.c (expand_cleanup): Use build_special_member_call.
3736         (expand_default_init): Likewise.
3737         (build_member_call): Use finish_call_expr.
3738         (build_new_1): Use build_special_member_call.
3739         (push_base_cleanups): Likewise.
3740         * method.c (do_build_assign_ref): Likewise.
3741         * parse.y (template_id): Do not pass a COMPONENT_REF to
3742         lookup_template_function.
3743         (primary): Use parse_finish_call_epxr, not finish_call_expr.
3744         (parse_finish_call_expr): New function.
3745         * pt.c (lookup_template_function): Add assertions.
3746         * search.c (lookup_base): Allow T to be a binfo.
3747         (build_baselink): New function.
3748         (lookup_member): Use it.
3749         * semantics.c (finish_call_expr): Do not do name lookup.
3750         (finish_object_call_expr): Remove #if 0'd code.
3751         (finish_qualified_call_expr): Remove.
3752         * typeck.c (build_x_function_call): Remove.
3753         (build_static_case): Use build_special_member_call.
3754         * typeck2.c (build_functional_cast): Likewise.
3755
3756 2002-07-30  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
3757
3758         * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
3759
3760 2002-07-30  Gabriel Dos Reis  <gdr@nerim.net>
3761
3762         * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
3763
3764 2002-07-30  Nathan Sidwell  <nathan@codesourcery.com>
3765
3766         * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
3767         documentation.
3768
3769 2002-07-29  Alan Modra  <amodra@bigpond.net.au>
3770
3771         * cp-tree.h: Comment typo fix.
3772
3773 2002-07-29  Richard Earnshaw  <rearnsha@arm.com>
3774
3775         * spew.c (space_for_token): Allocate zeroed memory for a new token
3776         chunk.
3777
3778 2002-07-27  Roger Sayle  <roger@eyesopen.com>
3779
3780         * decl.c (builtin_function_1): No need to explicitly mark
3781         BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
3782
3783 2002-07-27  Roger Sayle  <roger@eyesopen.com>
3784
3785         * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
3786
3787 2002-07-26  Jason Merrill  <jason@redhat.com>
3788
3789         * call.c (build_over_call): Likewise.
3790         (cp_convert_parm_for_inlining): New fn.
3791         (convert_for_arg_passing): New fn.
3792         (convert_default_arg, build_over_call): Use it.
3793         (type_passed_as): New fn.
3794         * pt.c (tsubst_decl): Use it.
3795         * decl2.c (cp_build_parm_decl): New fn.
3796         (build_artificial_parm): Use it.
3797         (start_static_storage_duration_function): Likewise.
3798         * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
3799         (grokparms): Don't mess with DECL_ARG_TYPE.
3800         * typeck.c (convert_arguments): Use convert_for_arg_passing.
3801         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
3802         Define.
3803         * cp-tree.h: Declare new fns.
3804
3805 2002-07-26  Neil Booth  <neil@daikokuya.co.uk>
3806
3807         * cp-tree.h (flag_operator_names): Remove.
3808         * decl2.c (flag_operator_names): Remove.
3809         (lang_f_options): Remove operator-names.
3810         * lex.c (D_OPNAME): Remove.
3811         (reswords): Remove operator names.
3812         (rid_to_yy): Remove operator names.
3813         (init_reswords): No need to handle D_OPNAME.
3814         * spew.c (read_process_identifier): There are no operator
3815         names.
3816
3817 2002-07-26  Jason Merrill  <jason@redhat.com>
3818
3819         * dump.c (cp_dump_tree): Call c_dump_tree.
3820         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
3821
3822 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
3823
3824         * error.c (print_whitespace): Remove.
3825         * g++spec.c (LIBUNWIND): Move.
3826         * mangle.c (mangled_position, write_signed_number): Remove.
3827
3828 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
3829
3830         * decl2.c (cxx_decode_option): Similarly.
3831
3832 2002-07-25  Gabriel Dos Reis  <gdr@nerim.net>
3833
3834         * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
3835         (cxx_sizeof_or_alignof_type): Take a third argument.
3836         (cxx_sizeof): Adjust definition.
3837         (cxx_alignof): Likewise.
3838         * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
3839         * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
3840         complaining.
3841         (c_sizeof_nowarn): Remove definition.
3842         (build_unary_op): Use cxx_sizeof_nowarn.
3843
3844 2002-07-24  Geoffrey Keating  <geoffk@redhat.com>
3845
3846         * tree.c (cp_build_qualified_type_real): When copying
3847         pointer-to-method types, unshare the record that holds
3848         the cached pointer-to-member-function type.
3849
3850 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
3851
3852         * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
3853
3854 2002-07-23  Gabriel Dos Reis  <gdr@nerim.net>
3855
3856         Fix PR/7363:
3857         * typeck.c (cxx_sizeof_or_alignof_type): New function.
3858         (c_sizeof): Remove definition.
3859         (expr_sizeof): Use cxx_sizeof.
3860         * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
3861         * decl.c (finish_destructor_body): Use cxx_sizeof.
3862         * semantics.c (finish_alignof): Likewise.
3863         (finish_alignof): Use cxx_alignof.
3864         * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
3865         (cxx_sizeof_or_alignof_type): Declare.
3866         (my_friendly_assert): Move to ../c-common.h.
3867
3868 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
3869
3870         * class.c, method.c, pt.c, search.c: Don't define obstack macros.
3871
3872 2002-07-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3873
3874         PR c++/7347, c++/7348
3875         * cp-tree.h (tsubst_flags_t): Add tf_parsing.
3876         * decl.c (make_typename_type): Use it.
3877         (make_unbound_class_template): Likewise.
3878         (lookup_name_real): Don't call type_access_control if scope is
3879         template parameter dependent.
3880         * parse.y (template_arg): Call make_unbound_class_template with
3881         tf_parsing set.
3882         (nest_name_specifier): Call make_typename_type with tf_parsing set.
3883         (typename_sub0): Likewise.
3884         (typename_sub1): Likewise.
3885         (instantiate_decl): Push class scope.
3886         * pt.c (regenerate_decl_from_template): Call pushclass and popclass
3887         for both static variable and member function template.
3888         (instantiate_decl) Call pushclass and popclass when tsubst'ing type
3889         and arguments.
3890         * search.c (type_access_control): Do type access for TEMPLATE_DECL
3891         too.
3892
3893 2002-07-20  Roger Sayle  <roger@eyesopen.com>
3894
3895         * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
3896         test by using positive_option.  Make whitespace consistent.
3897
3898 2002-07-20  Gabriel Dos Reis  <gdr@nerim.net>
3899
3900         * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
3901         members with 'locus'.  Adjust use throughout.
3902         (struct feed):  Likewise.
3903         (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
3904         Adjust use.
3905         (snarf_defarg): Use error(), not error_with_file_and_line().
3906
3907 2002-07-19  Chris Demetriou  <cgd@broadcom.com>
3908
3909         * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
3910         cpp_options is included.
3911
3912 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3913
3914         PR c++/2862, c++/2863
3915         * pt.c (determine_specialization): Compare the length of
3916         TYPE_ARG_TYPES.  Tidy.
3917
3918 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3919
3920         PR c++/3797
3921         * decl.c (duplicate_decls): Don't propagate inlining parameters from
3922         olddecl to newdecl when newdecl is a specialization of the
3923         instantiation olddecl.
3924
3925 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3926
3927         PR c++/4802, c++/5387
3928         * decl.c (make_typename_type): Use enforce_access.
3929
3930 2002-07-17  Scott Snyder <snyder@fnal.gov>
3931
3932         PR c++/7320
3933         * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
3934
3935 2002-07-12  Mark Mitchell  <mark@codesourcery.com>
3936
3937         * class.c (add_method): Correct handling of conversion operators.
3938
3939 2002-07-11  Mark Mitchell  <mark@codesourcery.com>
3940
3941         PR c++/7224
3942         * class.c (add_method): Simplify.
3943
3944 2002-07-11  Jason Merrill  <jason@redhat.com>
3945
3946         PR c++/7279
3947         * tree.c (cp_copy_res_decl_for_inlining): Also copy
3948         TREE_ADDRESSABLE.
3949
3950 2002-07-10  Graham Stott  <graham.stott@btinternet.com>
3951
3952         * pt.c (template_parm_this_level_p, push_template_decl_real):
3953         Pass depth as int pointer.
3954
3955 2002-07-11  Tim Josling  <tej@melbpc.org.au>
3956
3957         Remove front end hard coding from gengtype.c.
3958
3959         * config-lang.in (gtfiles): Add files needed for this front end.
3960
3961 2002-07-10  Mark Mitchell  <mark@codesourcery.com>
3962
3963         * cp-tree.h (unqualified_name_lookup_error): Declare it.
3964         (begin_function_definition): Adjust prototype.
3965         * lex.c (unqualified_name_lookup_error): New function, split out
3966         from ...
3967         (do_identifier): ... here.
3968         * parse.y (parse_begin_function_definition): New function.
3969         (fn.def1): Use it.
3970         * semantics.c (begin_function_definition): Accept decl-specifiers
3971         and attributes as separate parameters.
3972
3973 2002-07-10  Jason Merrill  <jason@redhat.com>
3974
3975         PR c++/6255
3976         * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
3977         modifying the old one.
3978
3979 2002-07-09  Mark Mitchell  <mark@codesourcery.com>
3980
3981         * cp-tree.h (constructor_name_p): Declare it.
3982         (check_template_template_default_arg): Likewise.
3983         * class.c (handle_using_decl): Use constructor_name_p.
3984         * decl.c (grokdeclarator): Likewise.
3985         * decl2.c (constructor_name_p): Define it.
3986         * init.c (build_member_call): Use constructor_name_p.
3987         * parse.y (template_parm): Use check_template_template_default_arg.
3988         * pt.c (check_explicit_specialization): Use constructor_name_p.
3989         * semantics.c (check_template_template_default_arg): New function.
3990
3991 2002-07-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3992
3993         * pt.c (can_complete_type_without_circularity): Add static to
3994         function definition.
3995
3996 2002-07-08  Mark Mitchell  <mark@codesourcery.com>
3997
3998         * cp-tree.h (have_extern_spec): Declare it
3999         * decl.c (have_extern_spec): Define it.
4000         (start_decl): Eliminate use of used_extern_spec.
4001         (start_function): Likewise.
4002         * parse.y (have_extern_spec): Remove declaration.
4003         (used_extern_spec): Likewise.
4004         (frob_specs): Eliminate use of used_extern_spec.
4005         (.hush_warning): Likewise.
4006
4007 2002-07-07  Mark Mitchell  <mark@codesourcery.com>
4008
4009         * Make-lang.in (cp/parse.o): Depend on decl.h.
4010         * cp-tree.h (do_decl_instantiation): Change prototype.
4011         * parse.y: Include decl.h.
4012         (parse_decl_instantiation): New function.
4013         (explicit_instantiation): Use it.
4014         * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
4015         and DECLSPECS.
4016
4017 2002-07-07  Roger Sayle  <roger@eyesopen.com>
4018
4019         * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
4020         constructor and destructor tests when passed a TEMPLATE_DECL.
4021
4022 2002-07-05  Jason Merrill  <jason@redhat.com>
4023
4024         * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
4025         pointers.
4026
4027         PR optimization/7145
4028         * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
4029
4030 2002-07-05  Nathan Sidwell  <nathan@codesourcery.com>
4031
4032         Repair damage on weak-impared targets caused by my previous patch.
4033         * cp-tree.h (import_export_tinfo): Add parameter.
4034         * decl2.c (import_export_tinfo): Add parameter, post adjust
4035         DECL_COMDAT.
4036         * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
4037         import_export_tinfo.
4038
4039 2002-07-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4040
4041         PR c++/6944
4042         * init.c (build_aggr_init): Remove qualifiers of init before calling
4043         build_vec_init.
4044         (build_vec_init): Flatten multi-dimensional array during cleanup.
4045         (build_vec_delete_1): Abort if the type of each element is array.
4046
4047 2002-07-03  Graham Stott  <graham.stott@btinternet.com>
4048
4049         * pt.c (instantiate_class_template): Fix typo.
4050
4051 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4052
4053         * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
4054         by CVS conflict in my last patch.
4055
4056 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4057
4058         PR c++/6716
4059         * pt.c (can_complete_type_without_circularity): New function.
4060         (instantiate_class_template): Use it.
4061         * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
4062         message due to incomplete fields.
4063
4064 2002-07-01  Mark Mitchell  <mark@codesourcery.com>
4065
4066         PR c++/7112
4067         * mangle.c (write_expression): Add mangling for sizeof when
4068         applied to a type.
4069         * operators.def: Remove stale comment.
4070
4071 2002-06-30  Nathan Sidwell  <nathan@codesourcery.com>
4072
4073         * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
4074         (CPTI_TYPE_INFO_PTR_TYPE): ... this.
4075         (tinfo_decl_type): Replace with ...
4076         (type_info_ptr_type): ... this.
4077         (import_export_tinfo): Declare.
4078         (tinfo_decl_p): Rename to ...
4079         (unemitted_tinfo_decl_p): ... this.
4080         * decl2.c (import_export_decl): Break out tinfo handling into ...
4081         (import_export_tinfo): ... here. New function.
4082         (finish_file): Adjust.
4083         * rtti.c (TINFO_REAL_NAME): New macro.
4084         (init_rtti_processing): Create the tinfo types.
4085         (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
4086         (get_tinfo_decl): Adjust.
4087         (get_tinfo_ptr): New function.
4088         (get_type_id): Use it.
4089         (tinfo_base_init): Create vtable decl here, if it doesn't exist.
4090         (ptr_initializer): Use get_tinfo_ptr.
4091         (ptm_initializer): Likewise.
4092         (synthesize_tinfo_var): Break into ...
4093         (get_pseudo_ti_init): ... this. Just create the initializer.
4094         (get_pseudo_ti_desc): .. and this.
4095         (create_real_tinfo_var): Remove.
4096         (create_pseudo_type_info): Don't create the vtable decl here.
4097         (get_vmi_pseudo_type_info): Remove.
4098         (create_tinfo_types): Adjust.
4099         (tinfo_decl_p): Rename to ...
4100         (unemitted_tinfo_decl_p): ... here. Adjust.
4101         (emit_tinfo_decl): Adjust. Create the initializer.
4102
4103 2002-06-27  Mark Mitchell  <mark@codesourcery.com>
4104
4105         PR c++/6695
4106         * pt.c (tsubst_friend_class): Substitute into the context of the
4107         friend before using it.
4108
4109 2002-06-26  Mark Mitchell  <mark@codesourcery.com>
4110
4111         * cp-tree.h (xref_tag): Change prototype.
4112         (handle_class_head): Likewise.
4113         (build_x_component_ref): Likewise.
4114         * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
4115         (xref_tag): Take attributes as a separate parameter.
4116         (xref_tag_from_type): Adjust call to xref_tag.
4117         * decl2.c (build_expr_from_tree): Adjust call to
4118         build_x_component_ref.
4119         (handle_class_head): Take attributes as a separate parameter.
4120         * parse.y (parse_xref_tag): New function.
4121         (parse_handle_class_head): Likewise.
4122         (primary): Use parse_xref_tag.
4123         (class_head_decl): Use parse_handle_class_head.
4124         (class_head_defn): Likewise.
4125         * rtti.c (init_rtti_processing): Adjust call to xref_tag.
4126         (build_dynamic_cast_1): Likewise.
4127         (create_pseudo_type_info): Likewise.
4128         (emit_support_tinfos): Likewise.
4129         * typeck.c (build_object_ref): Adjust call to
4130         build_x_component_ref.
4131         (build_x_component_ref): Remove protect parameter.
4132
4133 2002-06-25  Mark Mitchell  <mark@codesourcery.com>
4134
4135         * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
4136         * class.c (handle_using_decl): Likewise.
4137         (instantiate_type): Likewise.
4138         * cp-tree.h (BASELINK_FUNCTIONS): New macro.
4139         (xref_basetypes): Change prototype.
4140         (begin_mem_initializers): New function.
4141         (get_overloaded_fn): Likewise.
4142         * decl.c (xref_basetypes): Simplify.
4143         * error.c (dump_expr): Use BASELINK_FUNCTIONS.
4144         * init.c (build_offset_ref): Likewise.
4145         * parse.y (base_init): Use begin_mem_initializers().
4146         (structsp): Adjust call to xref_basetypes.
4147         * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
4148         (instantiate_class_template): Adjust call to xref_basetypes.
4149         * semantics.c (begin_mem_initializers): New function.
4150         * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
4151         (really_overlaoded_fn): Likewise.
4152         (get_overloaded_fn): New function.'
4153         (get_first_fn): USe BASELINK_FUNCTIONS.
4154
4155 2002-06-24  Mark Mitchell  <mark@codesourcery.com>
4156
4157         * cp-tree.h (SCALAR_TYPE_P): New macro.
4158         (check_for_out_of_scope_variable): New function.
4159         (at_class_scope_p): Likewise.
4160         (finish_fname): Likewise.
4161         * class.c (finish_struct): Use at_function_scope_p.
4162         * decl.c (check_for_out_of_scope_variable): New function, split
4163         out from do_identifier.
4164         (finish_enum): Use at_function_scope_p.
4165         * lex.c (do_identifier): Use check_for_out_of_scope_variable.
4166         * parse.y (VAR_FUNC_NAME): Give it <ttype>.  Use finish_fname.
4167         (primary): Use at_function_scope_p.
4168         * search.c (at_class_scope_p): New function.
4169         * semantics.c (finish_fname): Likewise.
4170         (check_multiple_declarators): Use at_function_scope_p.
4171
4172 2002-06-23  Mark Mitchell  <mark@codesourcery.com>
4173
4174         * parse.y (parse_scoped_id): New function.
4175         (primary): Use it.
4176         * cp-tree.h (do_scoped_id): Adjust declaration.
4177         * lex.c (do_scoped_id): Remove call to yylex.
4178         * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
4179         * typeck2.c (add_exception_specifier): Use tree_cons, rather than
4180         expanding it inline.
4181
4182 2002-06-23  Matt Thomas  <matt@3am-software.com>
4183
4184         * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
4185         "#if VMS_TARGET".
4186
4187 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4188
4189         * mangle.c (integer_type_codes): Const-ify.
4190
4191 2002-06-20  Richard Henderson  <rth@redhat.com>
4192
4193         PR c++/6747
4194         * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
4195         Call put_var_into_stack.
4196
4197 2002-06-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4198
4199         * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
4200         array size calculation.
4201
4202 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4203
4204         PR c++/6892
4205         * pt.c (tsubst_expr): Handle FILE_STMT.
4206
4207 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4208
4209         PR c++/6723
4210         * pt.c (lookup_template_class): Don't build complete argument of
4211         BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
4212         argument.
4213
4214 2002-06-19  Akim Demaille  <akim@epita.fr>
4215
4216         * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
4217         decl.h's TYPENAME.
4218         * spew.c, lex.c: Adjust.
4219         * parse.y (explicit_instantiation): Add empty action to override
4220         the default $$ = $1 where it introduces a type clash.
4221
4222 2002-06-14  Jason Merrill  <jason@redhat.com>
4223
4224         * semantics.c (begin_for_stmt): Push the 'for' scope before
4225         adding the FOR_STMT.
4226
4227         C++ ABI changes.
4228         * class.c (build_base_field): Set DECL_PACKED.
4229         (layout_class_type): Don't use tail padding of PODs.
4230         * mangle.c (write_unqualified_name): Fix template conversion op
4231         mangling.
4232
4233 2002-06-16  Richard Henderson  <rth@redhat.com>
4234
4235         PR opt/6793
4236         * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
4237         after template instantiation.
4238
4239 2002-06-16  Richard Henderson  <rth@redhat.com>
4240
4241         * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
4242
4243 2002-06-15  Gabriel Dos Reis  <gdr@codesourcery.com>
4244
4245         * cp-tree.h (compiler_error): Remove declaration.
4246         * lex.c (compiler_error): Remove definition.
4247
4248 2002-06-14  Steve Ellcey  <sje@cup.hp.com>
4249
4250         * g++spec.c (LIBUNWIND): New.
4251         (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
4252
4253 2002-06-13  Jessica Han  <jessica@cup.hp.com>
4254
4255         * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
4256         (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
4257         (build_vbase_offset_vtbl_entries): Likewise.
4258         * rtti.c (build_headof): Likewise.
4259         (get_tinfo_decl_dynamic): Likewise.
4260         (create_pseudo_type_info): Likewise.
4261
4262 2002-06-12  Stan Shebs  <shebs@apple.com>
4263
4264         * mpw-config.in: Remove file, no longer used.
4265         * mpw-make.sed: Ditto.
4266
4267 2002-06-07  Zack Weinberg  <zack@codesourcery.com>
4268
4269         * decl2.c: Update call to cpp_handle_option.
4270
4271 2002-06-07  H.J. Lu  (hjl@gnu.org)
4272
4273         * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
4274
4275 2002-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
4276
4277         * error.c (cp_error_at): Fix typo.
4278
4279 2002-06-04  Gabriel Dos Reis  <gdr@codesourcery.com>
4280
4281         * error.c (cp_diagnostic_starter): Adjust call.
4282         (maybe_print_instantiation_context): Change prototype to take a
4283         'diagnostic_info *'.
4284         (print_instantiation_full_context): Likewise.
4285         (print_instantiation_partial_context): Likewise.
4286         (cp_diagnostic_starter): Likewise.
4287         (cp_diagnostic_finalizer): Likewise.
4288         (cp_print_error_function): Likewise.
4289         (cp_printer): Take a secondary parameter as a 'text_info *'.
4290         Remove output_state savings.  Adjust calls.
4291
4292 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
4293
4294         * pt.c (inline_parm_levels): Mark for GC.
4295
4296         * mangle.c (start_mangling): Allocate G.substitutions here...
4297         (init_mangle): ... rather than here.
4298         (finish_mangling): Clear the varray pointer when done with it.
4299         * spew.c (yylexstring): Don't use VARRAY_FREE.
4300         * search.c (bfs_walk): Don't use VARRAY_FREE.
4301         * decl2.c (pending_statics): Use gengtype to mark.
4302         (deferred_fns): Likewise.
4303         (ssdf_decls): Likewise.
4304         (init_decl2): Delete.
4305         * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
4306         (cxx_init_decl_processing): Don't call init_decl2.
4307         (cxx_pop_function_context): Don't use VARRAY_FREE.
4308         * cp-tree.h (struct saved_scope): No need for special marking
4309         of varrays.
4310         (struct language_function): Likewise.
4311         (local_classes): Use gengtype to mark.
4312         (init_decl2): Delete prototype.
4313         * class.c (init_class_processing): Don't use
4314         ggc_add_tree_varray_root.
4315         (build_vtbl_initializer): Don't use VARRAY_FREE.
4316
4317         * decl.c (typename_compare): Don't use same_type_p.
4318
4319         * decl.c: Include hashtab.h instead of hash.h.
4320         (typename_hash): Update to use htab_h.
4321         (typename_compare): Likewise.
4322         (typename_htab): Use gengtype to mark.
4323         (build_typename_type): Update to use htab_h.
4324         * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
4325
4326         * Make-lang.in (gt-cp-tree.h): New rule.
4327         (cp/tree.o): Depend on gt-cp-tree.h.
4328         * config-lang.in (gtfiles): Add cp/tree.c.
4329         * tree.c: Include gt-cp-tree.h.
4330         (list_hash_table): Use gengtype to mark.
4331         (init_tree): Use gengtype to mark trees.
4332
4333         * Make-lang.in (cp/decl.o): Add debug.h dependency.
4334         * call.c (struct z_candidate): Use gengtype.
4335         (USER_CONV_CAND): Use WRAPPER_ZC.
4336         (convert_class_to_reference): Use build_zc_wrapper.
4337         (build_type_conversion_1): Likewise.
4338         (build_over_call): Use WRAPPER_ZC.
4339         (add_warning): Use build_zc_wrapper.
4340         * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
4341         * cp-tree.h (struct lang_identifier): Use gengtype.
4342         (struct template_parm_index_s): Likewise.
4343         (struct ptrmem_cst): Likewise.
4344         (struct tree_binding): Likewise.
4345         (struct tree_overload): Likewise.
4346         (struct tree_srcloc): Likewise.
4347         (struct tree_wrapper): Likewise.  Also modify to have a pointer
4348         to struct z_candidate rather than void.
4349         (enum cp_tree_node_structure_enum): New.
4350         (union lang_tree_node): New.
4351         (cxx_mark_tree): Delete prototype.
4352         (cp_tree_node_structure): New prototype.
4353         (build_ptr_wrapper): Delete prototype.
4354         (build_int_wrapper): Delete prototype.
4355         (build_zc_wrapper): New prototype.
4356         * decl.c: Include debug.h
4357         (cxx_mark_tree): Delete.
4358         (cp_tree_node_structure): New.
4359         * tree.c (build_ptr_wrapper): Delete.
4360         (build_int_wrapper): Delete.
4361         (build_zc_wrapper): New.
4362
4363         * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
4364         Correct typo.  Patch from k_fukui@highway.ne.jp.
4365
4366         * semantics.c (current_stmt_tree): Update for change to
4367         struct language_function.
4368         (finish_mem_initializers): Likewise.
4369         * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
4370         * cp-tree.h (struct language_function): Rename from
4371         cp_language_function.  Change all uses.
4372         (cp_function_chain): Don't need to cast.
4373
4374         * class.c (duplicate_tag_error): Reset discriminator.
4375         (check_bases_and_members): Update for data structure changes.
4376         * cp-tree.h (struct lang_id2): Use gengtype.
4377         (flagged_type_tree): Likewise.
4378         (SET_LANG_ID): Use GGC on struct lang_id2.
4379         (struct cp_language_function): Use gengtype.  Remove field
4380         'x_vcalls_possible_p'.
4381         (current_vcalls_possible_p): Delete.
4382         (struct lang_type_header): New.
4383         (struct lang_type_class): Rename from struct lang_type.  Include
4384         struct lang_type_header.
4385         (struct lang_type_ptrmem): New.
4386         (struct lang_type): New.
4387         (LANG_TYPE_CLASS_CHECK): New.  Use it in all the appropriate macros.
4388         (LANG_TYPE_PTRMEM_CHECK): New.  Use it in all the appropriate macros.
4389         (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
4390         (struct lang_decl_flags): Use gengtype.  Add discriminators.
4391         (struct lang_decl): Use gengtype.  Add and use discriminators.
4392         Update the macros that reference moved fields.
4393         (LANG_DECL_U2_CHECK): New function.  Use it when appropriate.
4394         (SET_DECL_THUNK_P): Set discriminator too.
4395         (clear_inline_text_obstack): Delete prototype.
4396         (finish_inline_definitions): Delete prototype.
4397         (mark_pending_inlines): Delete prototype.
4398         (lang_check_failed): New prototype.
4399         * decl.c (struct named_label_use_list): Use gengtype.
4400         (struct named_label_list): Likewise.
4401         (mark_binding_level): Delete.
4402         (mark_named_label_lists): Delete.
4403         (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
4404         (cxx_init_decl_processing): Use generated marker routine.
4405         (begin_destructor_body): Delete dead set to
4406         current_vcalls_possible_p.
4407         (mark_lang_function): Delete.
4408         (mark_cp_function_context): Delete.
4409         (lang_mark_tree): Use generated marker routines.
4410         * decl2.c (start_objects): Set discriminator when setting
4411         GLOBAL_INIT_PRIORITY.
4412         * lex.c (retrofit_lang_decl): Set discriminators.
4413         (copy_lang_type): Update for changes to lang_type structure.
4414         (cp_make_lang_type): Set discriminator.
4415         * parse.y: Use gengtype on YYLVAL.  Don't use dots in identifiers.
4416         * search.c: Include ggc.h.
4417         * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
4418         (finish_inline_definitions): Delete.
4419         * spew.c (struct token): Use gengtype.
4420         (struct token_chunk): New.
4421         (struct unparsed_text): Use gengtype.  Store tokens in chunks.
4422         (struct feed): Use gengtype.
4423         (feed_obstack): Delete.
4424         (feed): Mark as GC root.
4425         (pending_inlines): Mark as GC root.
4426         (pending_inlines_tail): Likewise.
4427         (processing_these_inlines): Likewise.
4428         (token_obstack): Make static.
4429         (first_token): Likewise.
4430         (init_spew): Don't initialize deleted things; use gengtype for roots.
4431         (clear_inline_text_obstack): Delete.
4432         (feed_input): Use GC for struct feed.  Update for changes to
4433         struct unparsed_text.
4434         (mark_pending_inlines): Delete.
4435         (next_token): Rename from add_token.  Change all callers.  Update
4436         for changes to struct unparsed_text.
4437         (space_for_token): New.
4438         (remove_last_token): New.
4439         (alloc_unparsed_text): New.
4440         (snarf_block): Take an unparsed_text.  Update for changes to struct
4441         unparsed_text.
4442         (snarf_method): Update for changes to struct unparsed_text.
4443         (snarf_defarg): Update for changes to struct unparsed_text.
4444         * tree.c (lang_check_failed): New.
4445
4446         * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
4447         gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
4448         (cp/spew.o): Add dependency on gt-<filename>.h.
4449         (cp/decl2.o): Add dependency on gt-<filename>.h.
4450         (cp/call.o): Add dependency on gt-<filename>.h.
4451         (cp/pt.o): Add dependency on gt-<filename>.h.
4452         (cp/repo.o): Add dependency on gt-<filename>.h.
4453         (cp/parse.o): Add dependency on gt-<filename>.h.
4454         * call.c: Use gengtype for roots.
4455         * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
4456         decl2.c parse.y pt.c repo.c spew.c.
4457         * cp-tree.h: Use gengtype for roots.
4458         (struct saved_scope): Use GGC, gengtype.
4459         (cp_parse_init): Delete prototype.
4460         (init_pt): Delete prototype.
4461         * decl.c: Use gengtype for roots.
4462         (mark_saved_scope): Delete.
4463         (cxx_init_decl_processing): Don't call deleted initilisation
4464         routines.
4465         (signed_size_zero_node): Delete, unused.
4466         * decl.h: Use gengtype for roots.
4467         * decl2.c: Use gengtype for roots.
4468         * lex.h: Use gengtype for roots.
4469         * parse.y: Use gengtype for roots.
4470         (cp_parse_init): Delete.
4471         * pt.c: Use gengtype for roots.
4472         (init_pt): Delete.
4473         * repo.c: Use gengtype for roots.
4474         * spew.c: Use gengtype for roots.
4475
4476         * Make-lang.in: Allow for filename changes.  Add gtype-cp.h.
4477         (cp/decl.o): Add dependency on gtype-cp.h.
4478         * decl.c: Remove use of add_deletable_root, use GTY marker instead.
4479         Include gtype-cp.h.  Allow for filename changes.
4480
4481         * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
4482         (cp/decl.o): Add cp/gt-decl.h dependency.
4483         * config-lang.in (gtfiles): New.
4484         * tree.h: Rename struct binding_level to struct cp_binding_level.
4485         * decl.c: Rename struct binding_level to struct cp_binding_level.
4486         Include cp/gt-decl.h.
4487         (struct cp_binding_level): Use gengtype.
4488         (make_binding_level): Use GGC on struct cp_binding_level.
4489         (mark_binding_level): Use gt_ggc_m_cp_binding_level.
4490         (cxx_init_decl_processing): Mark free_binding_level as
4491         deletable.
4492
4493         * decl.c (mark_cp_function_context): Update calling sequence.
4494
4495         * decl.c (start_function): Don't free 'struct
4496         cp_language_function'.
4497         (pop_cp_function_context): Likewise.
4498         (save_function_data): Allocate it using GC.
4499         * semantics.c (genrtl_start_function): Don't free 'struct
4500         cp_language_function'.
4501
4502 2002-05-31  Matthew Woodcraft  <mattheww@chiark.greenend.org.uk>
4503
4504         * lang-specs.h: Use cpp_debug_options.
4505
4506 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
4507
4508         * mangle.c, tree.c: Include real.h.
4509         * Make-lang.in: Update dependency lists.
4510
4511 2002-05-25  Neil Booth  <neil@daikokuya.demon.co.uk>
4512
4513         * lex.c: Don't include c-lex.h.
4514         * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
4515
4516 2002-05-23  Neil Booth  <neil@daikokuya.demon.co.uk>
4517
4518         * spew.c (yyungetc, snarf_block): Remove indent_level handling.
4519
4520 2002-05-22  Richard Henderson  <rth@redhat.com>
4521
4522         * decl.c (obscure_complex_init): Check for VAR_DECL
4523         before using DECL_THREAD_LOCAL.
4524
4525 2002-05-22  Richard Henderson  <rth@redhat.com>
4526
4527         * decl.c (check_tag_decl): Handle RID_THREAD.
4528         (obscure_complex_init): Reject run-time init of tls.
4529         (grokvardecl, grokdeclarator): Handle RID_THREAD.
4530         * lex.c (reswords): Add __thread.
4531         (rid_to_yy): Map RID_THREAD to SCSPEC.
4532
4533 2002-05-22  Neil Booth  <neil@daikokuya.demon.co.uk>
4534
4535         * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
4536         * cp-tree.h (cxx_post_options): Kill.
4537         * cp-lex.c (cxx_post_options): Kill.
4538
4539 2002-05-21  Richard Henderson  <rth@redhat.com>
4540
4541         * lex.c (rid_to_yy): Add RID_THREAD.
4542
4543 2002-05-21  Alexandre Oliva  <aoliva@redhat.com>
4544
4545         * init.c (build_vec_init): Test for trivial copy-assignment when
4546         copy-assigning arrays.
4547
4548 2002-05-20  Andreas Jaeger  <aj@suse.de>
4549
4550         * init.c (build_default_init): Remove unused variable.
4551
4552 2002-05-20  Alexandre Oliva  <aoliva@redhat.com>
4553
4554         * call.c (any_strictly_viable): New.
4555         (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
4556
4557 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4558
4559         * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
4560
4561 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4562
4563         PR c++/186, DR 259
4564         * pt.c (do_decl_instantiation): Don't complain explicit
4565         instantiation after explicit specialization.
4566         (do_type_instantiation): Likewise.
4567
4568 2002-05-19  Alexandre Oliva  <aoliva@redhat.com>
4569
4570         * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
4571         renamed from...
4572         (complete_type_or_else): ... this.  Redefined as macro.
4573         (cxx_incomplete_type_diagnostic): Declare.
4574         (cxx_incomplete_type_error): Define as macro.
4575         * init.c (build_delete): Warn about incomplete types other than
4576         void, and use the built-in operator delete for them.
4577         * typeck.c (complete_type_or_diagnostic): Renamed from
4578         complete_type_or_else.  Added warn_only argument, passed to...
4579         * typeck2.c (cxx_incomplete_type_diagnostic): ... this.  Print
4580         warnings or errors depending on new warn_only argument.  Renamed
4581         from...
4582         (cxx_incomplete_type_error): ... this.  New implementation in
4583         terms of cxx_incomplete_type_diagnostic.
4584
4585 2002-05-18  Jason Merrill  <jason@redhat.com>
4586
4587         PR c++/6611
4588         * decl2.c (import_export_decl): If we clear
4589         DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
4590
4591 2002-05-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4592
4593         PR c++/6620
4594         * pt.c (verify_class_unification): Don't check if PARM is template
4595         parameter dependent.  Simplify.
4596         (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
4597         parameter dependent expression.
4598
4599 2002-05-14  Jason Merrill  <jason@redhat.com>
4600
4601         * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
4602         Do set DECL_COMDAT.
4603         (synthesize_tinfo_var): Take the public decl.
4604         (create_real_tinfo_var): Likewise.  Check DECL_COMDAT.
4605         (emit_tinfo_decl): Adjust.  Call import_export_decl.
4606         * decl2.c (import_export_decl): Simplify tinfo decl handling.
4607
4608 2002-05-14  Alexandre Oliva  <aoliva@redhat.com>
4609
4610         * cp-tree.h (struct lang_type): Added non_zero_init.
4611         (CLASSTYPE_NON_ZERO_INIT_P): New macro.
4612         (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
4613         * class.c (check_field_decls): Test non_zero_init.
4614         * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
4615         zero-to-NULL conversions.
4616         * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
4617         type that needs zero-initialization without zeros.
4618         (check_initializer_decl): Compute zero-initializer for types
4619         that require a non-trivial one.
4620         * init.c (build_forced_zero_init): New function.
4621         (build_default_init): Use it.
4622         * tree.c (zero_init_p): New function.
4623         * typeck2.c (force_store_init_value): New function.
4624         (process_init_constructor): Create non-trivial zero-initializers
4625         for array members and class fields.
4626
4627 2002-05-14  Neil Booth  <neil@daikokuya.demon.co.uk>
4628
4629         * lang-specs.h: Remove redundant -lang-c++.
4630
4631 2002-05-13  Jason Merrill  <jason@redhat.com>
4632
4633         * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
4634         (fixed_type_or_null): See through reference vars.
4635         (build_base_path): Vtable contents are constant.
4636         * typeck.c (get_member_function_from_ptrfunc): Likewise.
4637
4638 2002-05-12  Jason Merrill  <jason@redhat.com>
4639
4640         * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
4641         structs are safe.
4642
4643 2002-05-09  Neil Booth  <neil@daikokuya.demon.co.uk>
4644
4645         * cp-tree.h (flag_ansi): Remove.
4646         * decl2.c (flag_ansi): Remove.
4647         (cxx_decode_option): Set flag_iso and flag_undef.
4648
4649 2002-05-09  Jason Merrill  <jason@redhat.com>
4650
4651         * typeck.c (get_member_function_from_ptrfunc): Reorganize.
4652         Use subtraction rather than a bitmask to get the index.
4653         * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
4654
4655         * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
4656
4657 2002-05-07  Neil Booth  <neil@daikokuya.demon.co.uk>
4658
4659         * Make-lang.in (decl2.o): Update.
4660         * cp-tree.h (warn_multichar): Remove.
4661         * decl2.c: Include c-common.h.
4662         (warn_multichar): Remove.
4663
4664 2002-05-03  Jason Merrill  <jason@redhat.com>
4665
4666         * tree.c (build_cplus_array_type): Only const and volatile get
4667         special handling.
4668
4669         * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
4670
4671 2002-04-30  Mark Mitchell  <mark@codesourcery.com>
4672
4673         ABI change, returning simple classes from functions.
4674         * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
4675         TYPE_HAS_TRIVIAL_INIT_REF is false or
4676         TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
4677
4678 2002-04-30  Jason Merrill  <jason@redhat.com>
4679
4680         PR debug/6436
4681         * decl.c (grokdeclarator): Don't override TYPE_NAME of an
4682         anonymous class with a typedef if there are attributes.
4683
4684 2002-04-29  Paul Eggert  <eggert@twinsun.com>
4685
4686         * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
4687
4688 2002-04-29  Jakub Jelinek  <jakub@redhat.com>
4689
4690         PR c++/6477
4691         * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
4692         non-NULL first.
4693
4694 2002-04-29  Mark Mitchell  <mark@codesourcery.com>
4695
4696         PR c++/6492
4697         * pt.c (tsubst_friend_class): If the friend has an explicit scope,
4698         enter that scope before name lookup.
4699
4700         PR c++/6486
4701         * method.c (do_build_copy_constructor): Avoid building
4702         cv-qualified reference types.
4703
4704 2002-04-29  Nathan Sidwell  <nathan@codesourcery.com>
4705
4706         PR c++/5719
4707         * decl.c (grok_op_properties): Assignment ops don't have to return
4708         by value. operator% should.
4709
4710 2002-04-28  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
4711
4712         PR c/6343
4713         * decl.c (duplicate_decls): Call merge_weak.
4714
4715 2002-04-26  Richard Henderson  <rth@redhat.com>
4716
4717         * parse.y (malloced_yyss, malloced_yyvs): New.
4718         (yyoverflow): Re-add.  Set them.
4719         (free_parser_stacks): New.
4720
4721 2002-04-26  Mark Mitchell  <mark@codesourcery.com>
4722
4723         PR c++/6497
4724         * method.c (do_build_assign_ref): Pass a derivation to
4725         build_method_call when calling base class assignment operators.
4726
4727 2002-04-26  Richard Henderson  <rth@redhat.com>
4728
4729         * parse.y (yyoverflow): Revert.
4730
4731 2002-04-26  Richard Henderson  <rth@redhat.com>
4732
4733         PR c/3581
4734         * parse.y (string): Remove.  Update all uses to use STRING
4735         instead, and not call combine_strings.
4736         * rtti.c (tinfo_name): Use fix_string_type.
4737         * semantics.c (finish_asm_stmt): Don't call combine_strings.
4738         * spew.c (yylexstring): New.
4739         (read_token): Use it.
4740
4741 2002-04-25  Richard Henderson  <rth@redhat.com>
4742
4743         PR c/2161
4744         * parse.y (yyoverflow): New.
4745
4746 2002-04-25  Jason Merrill  <jason@redhat.com>
4747
4748         PR c++/5607
4749         * search.c (check_final_overrider): No longer static.
4750         * class.c (update_vtable_entry_for_fn): Call it.
4751         * cp-tree.h: Adjust.
4752
4753 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
4754
4755         * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
4756         * cp-tree.h (cxx_set_yydebug): Die.
4757         * lex.c (YYDEBUG): Get from c-lex.h.
4758         (cxx_set_yydebug): Remove.
4759         * parse.y: Include c-lex.h.
4760         (YYDEBUG): Get from c-lex.h.
4761
4762 2002-04-24  Mark Mitchell  <mark@codesourcery.com>
4763
4764         PR c++/6438.
4765         * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
4766         void.
4767
4768 2002-04-24  Neil Booth  <neil@daikokuya.demon.co.uk>
4769
4770         * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
4771         LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
4772         Redefine.
4773         * cp-tree.h (cp_attribute_table): Rename.
4774         * decl.c (lang_attribute_table): Remove declaration.
4775         (cxx_init_decl_processing): Don't set it.
4776         * tree.c (cp_attribute_table): Rename.
4777
4778 2002-04-24  Jason Merrill  <jason@redhat.com>
4779
4780         PR c++/6331
4781         * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
4782         * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
4783         The pedwarn for array assignment is now unconditional.
4784         * tree.c (build_cplus_array_type_1): Still process simple array types
4785         normally in templates.
4786
4787         PR c++/6395
4788         * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
4789         stuff for comdats.
4790
4791 2002-04-23  Jakub Jelinek  <jakub@redhat.com>
4792
4793         * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
4794         node with attributes.
4795
4796 2002-2-23  David O'Brien  <obrien@FreeBSD.org>
4797
4798         * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
4799         Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
4800
4801 2002-04-23  Mark Mitchell  <mark@codesourcery.com>
4802
4803         PR c++/6256:
4804         * pt.c (tsubst_friend_class): Handle templates with explicit
4805         nested names.
4806
4807         PR c++/6331:
4808         * typeck.c (merge_types): Remember the cv-qualification of pointer
4809         types when merging them.
4810
4811 2002-04-20  Neil Booth  <neil@daikokuya.demon.co.uk>
4812
4813         * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
4814         LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
4815         * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
4816         cxx_mark_function_context): New.
4817         * decl.c (push_cp_function_context, pop_cp_function_context,
4818         mark_cp_function_context): Rename for consistency.
4819         (cxx_init_decl_processing): Don't set old hooks.
4820
4821 2002-04-19  Neil Booth  <neil@daikokuya.demon.co.uk>
4822
4823         * call.c (convert_type_from_ellipsis): Rename, update.
4824         * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
4825         * cp-tree.h (convert_type_from_ellipsis): Rename.
4826         * decl.c (cxx_init_decl_processing): Don't set hook.
4827
4828 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
4829
4830         * call.c (build_new_method_call): Update.
4831         * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
4832         * cp-tree.h (cxx_incomplete_type_error): New.
4833         * decl.c (grokdeclarator, grokparms): Update.
4834         * decl2.c (check_classfn): Update.
4835         * pt.c (tsubst): Update.
4836         * typeck.c (complete_type_or_else, expr_sizeof,
4837         decay_conversion): Update.
4838         * typeck2.c (incomplete_type_error): Rename.
4839         (add_exception_specifier): Update.
4840
4841 2002-04-18  Jason Merrill  <jason@redhat.com>
4842
4843         PR c++/5658
4844         * search.c (setup_class_bindings): A class template qualifies as a
4845         type binding.
4846
4847 2002-04-17  Jakub Jelinek  <jakub@redhat.com>
4848
4849         PR c++/6316
4850         * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
4851         before expanding.
4852
4853 2002-04-16  Mark Mitchell  <mark@codesourcery.com>
4854
4855         * init.c (begin_init_stmts): Remove commented out code.
4856         (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
4857         * semantics.c (begin_gobal_stmt_expr): Adjust call to
4858         expand_start_stmt_expr.
4859
4860 2002-04-15  Mark Mitchell  <mark@codesourcery.com>
4861
4862         * decl.c (register_dtor_fn): Pass the address of dso_handle, not
4863         dso_handle itself, to __cxa_atexit.
4864
4865 2002-04-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
4866
4867         * error.c (cxx_print_error_function): Adjust call to macros.
4868
4869 2002-04-14  Jakub Jelinek  <jakub@redhat.com>
4870
4871         * class.c (layout_virtual_bases): Do all dsize computation on trees.
4872
4873 2002-04-14  Jason Merrill  <jason@redhat.com>
4874
4875         * typeck.c (get_member_function_from_ptrfunc): Don't do
4876         gratuitious division and multiplication on
4877         ptrmemfunc_vbit_in_delta targets.
4878
4879 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
4880
4881         PR c++/5373.
4882         * semantics.c (finish_expr_stmt): Remember the type of the
4883         expression before any conversions are performed.
4884
4885 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
4886
4887         PR c++/5189.
4888         * call.c (add_template_candidate_real): Do not treat member
4889         templates as copy constructors.
4890
4891 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
4892
4893         * decl.c (duplicate_decls): Do not copy the RTL for a variable
4894         declaration if the old variable had an incomplete type and the new
4895         variable does not.
4896         (complete_vars): Do not call layout_decl for completed variables.
4897
4898 2002-04-12  Richard Sandiford  <rsandifo@redhat.com>
4899
4900         * decl.c (duplicate_decls): Don't try to unify an implicit typedef
4901         with an explicit one.
4902         (follow_tag_typedef): New.
4903         (lookup_tag): Use it to extract the tag of an explicit typedef.
4904         (xref_tag): Likewise.
4905
4906 2002-04-11  Andrew Haley  <aph@redhat.com>
4907
4908         * typeck.c (type_after_usual_arithmetic_conversions):
4909         If two types have the same variant, return immediately.
4910         When two floating-point operands are the same precision:
4911           convert to float if one of the operands is float;
4912           if neither operand is one of the standard types, return the type
4913           of the first operand.
4914
4915 2002-04-10  Nathan Sidwell  <nathan@codesourcery.com>
4916
4917         PR c++/5507
4918         * decl.c (make_typename_type): Remove implicit typenameness.
4919
4920 2002-04-09  Jason Merrill  <jason@redhat.com>
4921
4922         PR optimization/6189
4923         * semantics.c (genrtl_start_function): Don't free
4924         DECL_SAVED_FUNCTION_DATA for inline functions.
4925
4926         * init.c (build_member_call): For now, don't convert to
4927         intermediate base if it would cause an error.
4928
4929 2002-04-08  Paolo Carlini  <pcarlini@unitus.it>
4930
4931         * parse.y (namespace_qualifier, maybe_identifier,
4932         begin_explicit_instantiation, end_explicit_instantiation,
4933         apparent_template_type, .finish_template_type,
4934         do_id, maybe_init, defarg_again, component_decl_1):
4935         Add ending ';', in accordance with POSIX.
4936
4937 2002-04-06  Mark Mitchell  <mark@codesourcery.com>
4938
4939         PR c++/5571
4940         * class.c (layout_class_type): Remember incomplete static
4941         variables.
4942         (finish_struct_1): Call complete_vars, not
4943         hack_incomplete_structures.
4944         * cp-tree.h (hack_incomplete_structures): Rename to ...
4945         (complete_vars): ... this.
4946         (struct saved_scope): Remove incomplete.
4947         (namespace_scope_incomplete): Remove.
4948         * decl.c (struct binding_level): Remove incomplete.
4949         (incomplete_vars): New variable.
4950         (mark_binding_level): Don't mark incomplete.
4951         (print_binding_level): Don't print it.
4952         (mark_saved_scope): Don't mark incomplete.
4953         (pushdecl): Use maybe_register_incopmlete_var.
4954         (cxx_init_decl_processing): Register incomplete_vars for GC.
4955         (start_decl_1): Clarify error message.
4956         (hack_incomplete_vars): Remove.
4957         (maybe_register_incomplete_var): New function.
4958         (complete_vars): Likewise.
4959
4960 2002-04-06  Jason Merrill  <jason@redhat.com>
4961
4962         PR c++/4934
4963         * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
4964         set before checking it.
4965
4966         PR c++/525
4967         * init.c (build_member_call): Use build_scoped_ref.
4968         (resolve_offset_ref): Likewise.
4969         * call.c (build_scoped_method_call): Likewise.
4970         * tree.c (maybe_dummy_object): Kludge around current_class_type being
4971         wrong.
4972         * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
4973         * cp-tree.h: Adjust.
4974
4975         * init.c (push_base_cleanups): Just use build_scoped_method_call.
4976
4977         PR c++/6179
4978         * method.c (implicitly_declare_fn): Pass unqualified type to
4979         synthesize_exception_spec.
4980
4981 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
4982
4983         * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
4984         * cvt.c: Update comment.
4985         * init.c (expand_cleanup_for_base): Update.
4986         * semantics.c (finish_parenthesized_expr): Update.
4987         * typeck.c (cp_truthvalue_conversion): Update.
4988
4989 2002-04-04  Jason Merrill  <jason@redhat.com>
4990
4991         * semantics.c (finish_eh_cleanup): New fn.
4992         * cp-tree.h: Add prototype.
4993         * init.c (perform_member_init, expand_cleanup_for_base): Use
4994         finish_eh_cleanup.
4995         * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
4996         * cp-tree.h: Remove references.
4997         * decl.c (begin_constructor_body, end_constructor_body): Likewise.
4998         * dump.c (cp_dump_tree): Likewise.
4999         * pt.c (tsubst_expr): Likewise.
5000         * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
5001         (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
5002         * tree.c (cp_statement_code_p): Likewise.
5003
5004         * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
5005
5006         PR c++/5636
5007         * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
5008         cleanup for nrv.
5009
5010         PR c++/5104
5011         * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
5012         specifiers.
5013         [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
5014
5015 2002-04-03  Richard Henderson  <rth@redhat.com>
5016
5017         * cp-lang.c (cxx_warn_unused_global_decl): New.
5018         (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
5019
5020 2002-04-03  Neil Booth  <neil@daikokuya.demon.co.uk>
5021
5022         * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
5023         * tree.c (init_tree): Don't set hook.
5024
5025 2002-04-03  Roger Sayle  <roger@eyesopen.com>
5026
5027         PR c++/5998:
5028         * decl.c (duplicate_decls): Don't mess with assembler names when
5029         redeclaring builtin functions as static.
5030
5031 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
5032
5033         * call.c (build_addr_func): Update.
5034         * class.c (resolve_address_of_overloaded_function): Update.
5035         * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
5036         * cp-tree.h (cxx_mark_addressable): New.
5037         * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
5038         * decl2.c (build_cleanup): Update.
5039         * except.c (build_throw): Update.
5040         * init.c (resolve_offset_ref): Update.
5041         * pt.c (convert_nontype_argument): Update.
5042         * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
5043         * typeck.c (decay_conversion, build_array_ref, build_unary_op,
5044         unary_complex_lvalue): Update.
5045         (mark_addressable): Rename.
5046
5047 2002-04-01  Roger Sayle  <roger@eyesopen.com>
5048
5049         PR c++/5998:
5050         * decl.c (duplicate_decls):  Overwrite the RTL when (and only
5051         when) overwriting a built-in function.  Don't use COPY_DECL_RTL,
5052         but follow the SET_DECL_RTL idiom used elsewhere in the function.
5053
5054 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
5055
5056         * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
5057         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
5058         * decl.c (grokdeclarator): Update.
5059         * mangle.c (write_integer_cst): Update.
5060         * typeck.c (build_binary_op): Update.
5061
5062 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
5063
5064         * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
5065         * lex.c (cxx_init): Don't set hook.
5066
5067 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
5068
5069         * Make-lang.in (error.o): Update.
5070         * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
5071         * cp-tree.h (struct diagnostic_context): Predeclare.
5072         (cxx_print_error_function): New.
5073         * error.c: Include langhooks-def.h.
5074         (lang_print_error_function): Rename.  Update.
5075         (init_error): Don't set hook.
5076
5077 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
5078
5079         * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
5080         Redefine.
5081         * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
5082         * decl.c (finish_enum): Similarly.
5083         * error.c (dump_type): Similarly.
5084         * lex.c (cxx_init): Similarly.
5085         * mangle.c (write_builtin_type): Similarly.
5086         * typeck.c (comptypes): Similarly.
5087
5088 2002-03-28  Roger Sayle  <roger@eyesopen.com>
5089
5090         PR c++/5998:
5091         * decl.c (cxx_init_decl_processing): Re-enable built-in functions
5092         in the g++ front-end.
5093         (duplicate_decl): Allow redefinition of anticipated built-ins.
5094         Fix inlining problem by over-writing the old DECL_RTL.
5095         (lookup_namespace_name): Fail to find an identifier in the
5096         specified namespace if its still anticipated.
5097         (builtin_function_1): New function split out from builtin_function
5098         to create a builtin in the current namespace with given context.
5099         (builtin_function): Call builtin_function_1 to define the
5100         appropriate builtins in both the std and global namespaces.
5101         (select_decl): Don't test for anticipated decls here.
5102         (unqualified_namespace_lookup): Instead ignore them whilst
5103         searching through scopes and namespaces.
5104         * decl2.c (do_nonmember_using_decl): If a using declaration
5105         specifies an anticipated built-in function, mark it as no longer
5106         anticipated in that scope.
5107         (ambiguous_decl):  Avoid resolving to an anticipated decl.
5108         * lex.c (do_scoped_id): Fail to find an identifier in the global
5109         namespace if its still anticipated.
5110
5111 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
5112
5113         * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
5114         * cp-tree.h (cp_make_lang_type): Rename.
5115         * lex.c (cp_make_lang_type): Rename.
5116         (make_aggr_type): Update.
5117         * tree.c (init_tree): Don't set make_lang_type_fn.
5118
5119 2002-03-29  Jakub Jelinek  <jakub@redhat.com>
5120
5121         PR c++/6073
5122         * class.c (finish_struct_1): Update static field's DECL_MODE even
5123         if its type is a variant of t.
5124
5125 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
5126
5127         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
5128         * cp-tree.h (cxx_insert_default_attributes): New.
5129         * decl.c (insert_default_attributes): Rename.
5130
5131 2002-03-27  Mark Mitchell  <mark@codesourcery.com>
5132
5133         PR c++/4884
5134         * call.c (build_op_delete_call): Allow for the fact the placement
5135         may be a COMPOUND_EXPR.
5136
5137 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
5138
5139         * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
5140         * cp-tree.h (init_cplus_expand): Remove.
5141         (cxx_expand_expr): New.
5142         * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
5143         fix prototype.
5144         (init_cplus_expand): Remove.
5145         * lex.c (cxx_init): Don't call init_cplus_expand.
5146
5147 2002-03-26  Mark Mitchell  <mark@codesourcery.com>
5148
5149         PR c++/4884.
5150         * init.c (build_new_1): Allow for the fact the result of
5151         build_function_call may be a COMPOUND_EXPR.
5152
5153 2002-03-26  Nathan Sidwell  <nathan@codesourcery.com>
5154
5155         PR c++/5682
5156         * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
5157         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
5158         (dfs_skip_nonprimary_vbases_markedp): Remove.
5159         * search.c (get_shared_vbase_if_not_primary): Remove.
5160         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
5161         (dfs_skip_nonprimary_vbases_markedp): Remove.
5162         (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
5163         (dfs_marked_real_bases_queue_p): Likewise.
5164
5165 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
5166
5167         * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
5168         * cp-tree.h (cxx_mark_tree): New.
5169         * decl.c (lang_mark_tree): Rename cxx_mark_tree.
5170
5171 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
5172
5173         * cp-tree.h (cxx_maybe_build_cleanup): New.
5174         * decl.c (destroy_local_var, hack_incomplete_structures): Update.
5175         (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
5176         * tree.c (build_target_expr): Update.
5177         * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
5178
5179 2002-03-24  Neil Booth  <neil@daikokuya.demon.co.uk>
5180
5181         * decl2.c (cxx_decode_option): Handle -E.
5182         * lang-specs.h (default_compilers): Preprocess with cc1plus.
5183         * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
5184
5185 2002-03-23  Jakub Jelinek  <jakub@redhat.com>
5186
5187         PR c++/6037
5188         * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
5189
5190 2002-03-23  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
5191
5192         * error.c (dump_type): Be careful about implicit typenames.
5193
5194 2002-03-21  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
5195
5196         PR C++/3656
5197         * semantics.c (finish_base_specifier): Handle erronous base
5198         classes.
5199
5200 2002-03-22  Zack Weinberg  <zack@codesourcery.com>
5201
5202         * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
5203         REAL_IS_NOT_DOUBLE.
5204
5205 2002-03-22  Jeff Knaggs  <jknaggs@redhat.com>
5206
5207         * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
5208         an index into the vtable_entry array regardless of
5209         TARGET_PTRMEMFUNC_VBIT_LOCATION.
5210
5211 2002-03-21  Aldy Hernandez  <aldyh@redhat.com>
5212
5213         * tree.c (cp_cannot_inline_tree_fn): Same.
5214
5215 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
5216
5217         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
5218         insert_block, getdecls, global_bindings_p): New.
5219
5220 2002-03-20  Nathan Sidwell  <nathan@codesourcery.com>
5221
5222         PR c++/4361
5223         * mangle.c (struct globals) Add internal_mangling_p member.
5224         (write_template_param): Do internal mangling, if needed.
5225         (mangle_conv_op_name_for_type): Request internal mangling.
5226
5227 2002-03-20  Jason Merrill  <jason@redhat.com>
5228
5229         PR c++/2136
5230         * init.c (build_delete): Check access for a member op delete here.
5231         * decl2.c (delete_sanity): Not here.
5232
5233 2002-03-19  Jason Merrill  <jason@redhat.com>
5234
5235         PR c++/5118
5236         * class.c (get_vfield_name): Use the constructor_name.
5237
5238 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
5239
5240         * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
5241         * cp-tree.h (lang_printable_name): Rename.
5242         * error.c (lang_decl_name): Use new hook.
5243         * lex.c (cxx_init): Remove old hook.
5244         * pt.c (tsubst_decl): Use new hook.
5245         * tree.c (lang_printable_name): Rename.
5246
5247 2002-03-18  Eric Botcazou  <ebotcazou@multimania.com>
5248
5249         PR c++/3882
5250         * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
5251         (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
5252         only after recording the declaration.
5253
5254 2002-03-18  Jason Merrill  <jason@redhat.com>
5255
5256         PR c++/2039
5257         * init.c (resolve_offset_ref): Hand off to build_component_ref.
5258
5259         PR c++/4222, c++/5995
5260         * call.c (build_over_call): Fix empty class logic.
5261
5262         PR c++/3870
5263         * cp-tree.h (struct saved_scope): Add last_parms field.
5264         * decl.c (maybe_push_to_top_level): Save last_function_parms.
5265         (pop_from_top_level): Restore it.
5266
5267         PR c++/4377
5268         * mangle.c (write_expression): Strip NOP_EXPRs sooner.  Also strip
5269         NON_LVALUE_EXPRs.
5270
5271         PR c++/4003
5272         * pt.c (tsubst_friend_function): Use decl_namespace_context.
5273
5274         PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
5275         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
5276         type with a nontrivial destructor.
5277
5278 2002-03-17  Jason Merrill  <jason@redhat.com>
5279
5280         PR c++/4460
5281         * class.c (build_base_path): Virtual base layout is fixed in
5282         in-charge [cd]tors.
5283
5284 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
5285
5286         * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
5287         * parse.y (yyparse): Remove macro.
5288
5289 2002-03-17  Jason Merrill  <jason@redhat.com>
5290
5291         PR c++/5757
5292         * init.c (build_new_1): Pass the right pointer to op delete.
5293
5294 2002-03-16  Nathan Sidwell  <nathan@codesourcery.com>
5295
5296         PR c++/4361
5297         * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
5298         conversion operators go.
5299         (struct lang_decl_flags): Add template_conv_p and unused
5300         bitfields.
5301         (DECL_TEMPLATE_CONV_FN_P): New macro.
5302         * call.c (build_user_type_conversion_1): Don't check second type
5303         conversion of overload set first.
5304         * class.c (add_method): Make sure templated conversion operators
5305         all end up on slot 2.
5306         * lex.c (do_identifier): A conversion operator token might be
5307         satisfied by a templated conversion operator.
5308         * pt.c (check_explicit_specialization): Use
5309         CLASSTYPE_FIRST_CONVERSION_SLOT.
5310         (template_parm_this_level_p): New function.
5311         (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
5312         * search.c (lookup_fnfields_1): Template conversions will be on
5313         the first slot.
5314         * typeck.c (build_component_ref): Preserve the type of an
5315         conversion operator name on the overload type.
5316         (build_x_function_call): Retrieve the conversion operator name.
5317
5318 2002-03-15  Richard Henderson  <rth@redhat.com>
5319
5320         * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
5321
5322 2002-03-15  Mark Mitchell  <mark@codesourcery.com>
5323
5324         * cp-tree.h (CLEANUP_DECL): Remove.
5325         (CLEANUP_EXPR): Likewise.
5326         * decl.c (destroy_local_var): Simplify.
5327         (maybe_build_cleanup): Tidy.
5328         * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
5329         * semantics.c (cp_expand_stmt): Likewise.
5330         * cp/tree.c (cp_statement_code_p): Likewise.
5331
5332 2002-03-15  Jason Merrill  <jason@redhat.com>
5333
5334         PR c++/5857
5335         * decl.c (duplicate_decls): Use merge_types instead of common_type.
5336         * typeck.c (common_type): Just hand off to
5337         type_after_usual_arithmetic_conversions and
5338         composite_pointer_type.
5339         (merge_types): New fn.
5340         (commonparms): Use it instead of common_type.
5341         (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
5342         (composite_pointer_type): Also handle attributes.
5343         * cp-tree.h: Declare merge_types.
5344
5345         * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
5346         variables.
5347         * decl2.c (maybe_make_one_only): Also mark the decl as needed.
5348
5349 2002-03-14  Richard Henderson  <rth@redhat.com>
5350
5351         * decl.c: Include c-pragma.h.
5352         (start_decl, start_function): Invoke maybe_apply_pragma_weak.
5353         * Make-lang.in: Update dependencies.
5354
5355 2002-03-14  Jakub Jelinek  <jakub@redhat.com>
5356
5357         PR c++/5908
5358         * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
5359         * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
5360
5361 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
5362
5363         * mangle.c (write_builtin_type): Handle 128-bit integers even if
5364         they are not a standard integer type.
5365
5366 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
5367
5368         * cp-tree.h (init_init_processing): Remove declaration.
5369         * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
5370         * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
5371
5372 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5373
5374         * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
5375         Define.
5376         * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
5377         tree_code_length.
5378         * lex.c (cplus_tree_code_type, cplus_tree_code_length,
5379         cplus_tree_code_name): Delete.
5380         (cxx_init): Don't call add_c_tree_codes, instead set
5381         lang_unsafe_for_reeval.  Don't try to copy into the various
5382         tree_code arrays.
5383
5384 2002-03-12  Nathan Sidwell  <nathan@codesourcery.com>
5385
5386         PR c++/5659
5387         * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
5388         * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
5389         definitions.
5390
5391 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
5392
5393         Revert 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>,
5394         DR209 is now not a defect.
5395         * cp-tree.h (skip_type_access_control): Remove.
5396         * decl.c (grokdeclarator): Do type access control for friend
5397         declarations.
5398         * semantics.c (decl_type_access_control): Don't reset
5399         current_type_lookups.
5400         (save_type_access_control): Always save the lookups.
5401         (skip_type_access_control): Remove.
5402         (finish_class_definition): Don't change type_lookups.
5403
5404 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
5405
5406         Revert 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>,
5407         It is incorrect.
5408         * typeck.c (build_static_cast): Compare non-qualified types
5409         with pointer to member conversions.
5410
5411 2002-03-11  Dan Nicolaescu  <dann@ics.uci.edu>
5412             Daniel Berlin  <dan@dberlin.org>
5413
5414         * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
5415         (cxx_get_alias_set): Use it.
5416
5417 2002-03-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5418
5419         * cp-tree.h (stabilize_expr): Prototype.
5420
5421 2002-03-08  Craig Rodrigues  <rodrigc@gcc.gnu.org>
5422
5423         * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
5424         conditional return void.
5425
5426 2002-03-08  Neil Booth  <neil@daikokuya.demon.co.uk>
5427
5428         * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
5429         * cp-tree.h (cxx_unsave): New.
5430         * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
5431         (init_tree): Update.
5432
5433 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5434
5435         * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
5436         explicit sizeof/sizeof.
5437         * decl2.c (cxx_decode_option): Likewise.
5438         * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
5439
5440 2002-03-02  Nathan Sidwell  <nathan@codesourcery.com>
5441
5442         PR c++/775
5443         * decl.c (lookup_tag): Only reject enum/class mismatch, not
5444         class/union mismatch.
5445         * parse.y (check_class_key): New function.
5446         (structsp): Call it.
5447
5448 2002-03-01  Michael Matz  <matz@suse.de>
5449
5450         * typeck.c (cp_pointer_int_sum): Complete inner type which is
5451         used later by size_in_bytes().
5452
5453 2002-03-01  Phil Edwards  <pme@gcc.gnu.org>
5454
5455         * cp-tree.h:  Require __GNUC__ to be #defined.
5456         (build_init):  Add missing prototype.
5457
5458 2002-03-01  Jason Merrill  <jason@redhat.com>
5459
5460         * except.c: Don't include decl.h or obstack.h.  Do include
5461         tree-inline.h.
5462         (build_throw): Destroy temporaries from the thrown
5463         expression before calling __cxa_throw.  Construct a thrown
5464         temporary directly into the exception object.
5465         (stabilize_throw_expr): New function.
5466         (wrap_cleanups_r): New function.
5467         * tree.c (stabilize_expr): New function.
5468         * init.c (build_init): New function.
5469         * Make-lang.in (cp/except.o): Adjust .h deps.
5470
5471 2002-02-28  Jason Merrill  <jason@redhat.com>
5472
5473         * search.c (lookup_base_r): Don't clear is_non_public just because
5474         we found a friendly scope.
5475
5476         * decl.c (finish_function): Only warn about missing return
5477         statement with -Wreturn-type.
5478
5479 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
5480
5481         * class.c (build_clone): Update.
5482         * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
5483         * cp-tree.h (cxx_dup_lang_specific_decl): New.
5484         * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
5485         (copy_decl): Update.
5486         * method.c (make_thunk): Update.
5487
5488 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
5489
5490         * decl2.c: Delete traditional-mode-related code copied from
5491         the C front end but not used, or used only to permit the
5492         compiler to link.
5493
5494 2002-02-24 Craig Rodrigues  <rodrigc@gcc.gnu.org>
5495
5496         PR c++/4093
5497         * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
5498         to void.
5499
5500 2002-02-22  Jakub Jelinek  <jakub@redhat.com>
5501
5502         PR other/5746
5503         * semantics.c (finish_switch_cond): Don't call get_unwidened
5504         if error_mark_node.
5505
5506 2002-02-22  Nathan Sidwell  <nathan@codesourcery.com>
5507
5508         PR c++/2645, DR 295
5509         * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
5510         tf_keep_type_decl.
5511         (make_typename_type): Use tsubst_flags_t.
5512         * decl.c (make_typename_type): Adjust. Return non-artificial
5513         TYPE_DECLs, if required.
5514         (grokdeclarator): Simplify CVR qualification handling. Allow bad
5515         qualifiers on typedef types.
5516         * decl2.c (handle_class_head): Adjust make_typename_type call.
5517         * parse.y (nested_name_specifier): Likewise.
5518         (typename_sub0): Likewise.
5519         (typename_sub1): Likewise.
5520         * pt.c (convert_template_argument): Adjust make_typename_type
5521         return value.
5522         (tsubst): Adjust cp_build_qualified_type_real calls.
5523         (check_cv_quals_for_unify): Cope with allowing bad qualifications
5524         on template type parms.
5525         (instantiate_decl): Recheck substitutions to give warnings on bad
5526         qualifications.
5527         * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
5528
5529 2002-02-21  Aldy Hernandez  <aldyh@redhat.com>
5530
5531         * cp/decl.c (duplicate_decls): Merge always_inline attribute.
5532
5533         * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
5534         unless DECL_ALWAYS_INLINE.
5535
5536 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
5537
5538         * typeck.c (cp_pointer_int_sum): Renamed from
5539         pointer_int_sum, call pointer_int_sum.
5540
5541 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
5542
5543         * decl.c (duplicate_decls): Return 0 if issued error about
5544         redeclaration.
5545
5546 2002-02-19  Jason Merrill  <jason@redhat.com>
5547
5548         ABI change: Mangle `void (A::*)() const' as
5549         M1AKFvvE, not MK1AFvvE.
5550         * mangle.c (write_function_type): Write cv-quals for member
5551         function type here.
5552         (write_pointer_to_member_type): Not here.
5553
5554 2002-02-18  Jason Merrill  <jason@redhat.com>
5555
5556         * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
5557         (do_decl_instantiation): Likewise.
5558
5559 2002-02-17  Craig Rodrigues  <rodrigc@gcc.gnu.org>
5560
5561         PR c++/5685
5562         * decl.c (duplicate_decls): Make warning unconditional
5563         if duplicate default argument declarations are present.
5564
5565 2002-02-17  Jakub Jelinek  <jakub@redhat.com>
5566
5567         * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
5568         shortening.
5569
5570 2002-02-15  Nathan Sidwell  <nathan@codesourcery.com>
5571
5572         * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
5573         remove incorrect comment. Move #if 0'd code to common path. Use
5574         IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
5575
5576 2002-02-13  Jason Merrill  <jason@redhat.com>
5577
5578         * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
5579         (finish_function): Don't warn if current_function_returns_null.
5580
5581         * typeck2.c (digest_init): Do handle values of vector type.
5582
5583         * typeck2.c (digest_init, process_init_constructor): Treat vectors
5584         like arrays.
5585
5586 2002-02-11  Jason Merrill  <jason@redhat.com>
5587
5588         * parse.y (reserved_declspecs): Don't handle attributes.
5589         (reserved_typespecquals): Handle them here.
5590         * Make-lang.in (parse.c): Adjust expected conflicts.
5591
5592 2002-02-08  Jakub Jelinek  <jakub@redhat.com>
5593
5594         * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
5595         instead of compstmt.
5596         (compstmt_or_stmtexpr): Renamed from compstmt.
5597         (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
5598
5599 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
5600
5601         Rename instantiate_type_flags to tsubst_flags_t & expand use.
5602         * cp-tree.h (instantiate_type_flags): Rename to ...
5603         (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
5604         add tf_warning flag.
5605         (instantiate_type): Adjust prototype.
5606         (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
5607         do_type_instantiation, cp_build_qualified_type_real): Likewise.
5608         cp_build_qualified_type: Adjust.
5609         * class.c (instantiate_type): Adjust parameter. Rename itf_* to
5610         tf_*.
5611         * call.c (standard_conversion): Rename itf_* to tf_*.
5612         (reference_binding): Likewise.
5613         (convert_like_real): Likewise.
5614         * cvt.c (cp_convert_to_pointer): Likewise.
5615         (convert_to_reference): Likewise.
5616         * decl.c (lookup_namespace_name): Use tf_* flags.
5617         (make_typename_type): Likewise.
5618         (grokdeclarator): Likewise.
5619         * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
5620         (coerce_template_template_parms, convert_template_argument,
5621         coerce_template_parms, maybe_get_template_decl_from_type_decl,
5622         lookup_template_class, tsubst_friend_function, tsubst_friend_class,
5623         instantiate_class_template, tsubst_template_arg_vector,
5624         tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
5625         tsubst_decl, tsubst_arg_types, tsubst_function_type,
5626         tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
5627         instantiate_template, fn_type_unification,
5628         resolve_overloaded_unification, verify_class_unification,
5629         unify, get_bindings_real, do_type_instantiation,
5630         regenerate_decl_from_template, instantiate_decl,
5631         tsubst_initializer_list, tsubst_enum,
5632         get_mostly_instantiated_function_type,
5633         invalid_nontype_parm_type_p): Likewise.
5634         * tree.c (cp_build_qualified_type_real): Likewise.
5635         * typeck.c (build_binary_op): Rename itf_* to tf_*.
5636         (build_ptrmemfunc): Likewise.
5637         (convert_for_assignment): Likewise.
5638
5639 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
5640
5641         PR c++/109
5642         * decl.c (grokdeclarator): Allow friend declarations from
5643         dependent types.
5644         * decl2.c (handle_class_head): Don't push into template parm contexts.
5645         * pt.c (push_template_decl_real): Template parm contexts are never
5646         being defined.
5647
5648 2002-02-05  Alexandre Oliva  <aoliva@redhat.com>
5649
5650         * class.c: Include target.h.
5651         (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
5652         BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
5653         bit-field layout.
5654         * Make-lang.in: Adjust deps.
5655
5656 2002-02-05  Jason Merrill  <jason@redhat.com>
5657
5658         * error.c (dump_type): Be more helpful about VECTOR_TYPE.
5659
5660 2002-02-04  Jakub Jelinek  <jakub@redhat.com>
5661
5662         * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
5663         (finish_switch_cond): Set SWITCH_TYPE.
5664
5665 2002-02-04  Richard Henderson  <rth@redhat.com>
5666
5667         * method.c (use_thunk): Always initialize the block tree.  Reindent.
5668         * semantics.c (expand_body): Emit thunks after function, not before.
5669
5670 2002-02-04  Jason Merrill  <jason@redhat.com>
5671
5672         * decl.c (start_function): Call cplus_decl_attributes immediately
5673         after grokdeclarator.
5674
5675         * decl.c (start_function): Combine DECL_RESULT handling code.
5676
5677 2002-02-03  Jason Merrill  <jason@redhat.com>
5678
5679         * xref.c: Remove.
5680         * Make-lang.in (CXX_OBJS): Remove cp/xref.o
5681         (cp/xref.o): Remove dependencies.
5682         * class.c (finish_struct_1, check_methods): Don't call xref fns.
5683         (finish_struct_1): Likewise.
5684         * friend.c (make_friend_class): Likewise.
5685         * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
5686         * spew.c (read_process_identifier): Likewise.
5687
5688 2002-02-01  Jason Merrill  <jason@redhat.com>
5689
5690         PR c++/4872
5691         * decl.c (finish_function): Warn about a non-void function with
5692         no return statement and no abnormal exit.
5693         * cp-tree.h (struct cp_language_function): Add returns_abnormally.
5694         (current_function_returns_abnormally): New macro.
5695         * call.c (build_call): Set it.
5696
5697         * typeck.c (build_component_ref): Always complain about offsetof
5698         constructs on non-PODs.  Only make it an error for members of
5699         virtual bases.
5700
5701         * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
5702         (dump_function_decl): Always dump parms.
5703
5704         * decl2.c (finish_static_data_member_decl): Complain about a local
5705         class with a static data member.
5706
5707         PR c++/4286
5708         * search.c (lookup_field_1): Don't xref a static data member
5709         just because we looked it up.
5710
5711 2002-01-31  Jason Merrill  <jason@redhat.com>
5712
5713         * Make-lang.in (parse.c): Handle .output file.
5714
5715         PR c++/3395
5716         * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
5717         not TREE_TYPE.
5718         * semantics.c (finish_class_definition): Adjust.
5719
5720         Allow attributes in parms and casts.
5721         * parse.y (named_parm): Don't strip attrs.
5722         (declmods): Remove 'attributes' production.
5723         (nonempty_cv_qualifiers): Accept attributes.
5724         (ATTRIBUTE): Give precedence.
5725         * decl.c (groktypename): Handle attributes.
5726         (grokparms): Likewise.
5727
5728 2002-01-29  Jakub Jelinek  <jakub@redhat.com>
5729
5730         * decl2.c (cxx_decode_option): Pass 0 as last argument to
5731         cpp_handle_option.
5732         * lang-specs.h: Use cpp_unique_options instead of cpp_options
5733         when used together with cc1_options.
5734
5735 2002-01-29  Nathan Sidwell  <nathan@codesourcery.com>
5736
5737         PR c++/5132
5738         * typeck2.c (digest_init): Make sure non-array core type is
5739         instantiated.
5740         * decl2.c (reparse_absdcl_as_casts): Just store the type in the
5741         constructor, rather than build a new one.
5742         (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
5743         PURPOSE of constructor elts.
5744
5745 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
5746
5747         * Make-lang.in (parse.c): Adjust expected number of
5748         shift-reduce conflicts.
5749         (decl.o): Depend on diagnostic.h.
5750         * decl.c: Include diagnostic.h.
5751         (grokdeclarator): Check for null pointer.
5752         (finish_function): Don't abort when
5753         current_binding_level->parm_flag != 1, if errors have
5754         occurred; throw away the statement tree and extra binding
5755         levels, and continue.
5756         * lex.c (note_list_got_semicolon): Check for null pointer.
5757         * method.c (hack_identifier): Just return error_mark_node if
5758         value is error_mark_node.
5759         * parse.y (primary: TYPEID(type_id)): No need to use
5760         TYPE_MAIN_VARIANT here.
5761         (handler_seq): Accept an empty list of catch clauses and
5762         generate a fake handler block to avoid later crashes.
5763         (ansi_raise_identifier): Accept the error token too.
5764         * semantics.c (begin_class_definition,
5765         finish_class_definition): Check for error_mark_node.
5766
5767 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
5768
5769         * typeck2.c (friendly_abort): Delete definition.
5770         * cp-tree.h (friendly_abort): Don't prototype.
5771         (my_friendly_assert): Use fancy_abort.
5772
5773 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
5774
5775         * cp-tree.h (my_friendly_abort): Remove.
5776
5777 2002-01-23  Jakub Jelinek  <jakub@redhat.com>
5778
5779         * spew.c (pending_inlines, pending_inlines_tail,
5780         processing_these_inlines): Make static.
5781         (mark_pending_inlines): Remove static.
5782         (begin_parsing_inclass_inline): If in function, save pi
5783         for GC to cp_function_chain->unparsed_inlines instead.
5784         (process_next_inline): Likewise.
5785         * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
5786         (mark_pending_inlines): Add prototype.
5787         * decl.c (spew_debug): Remove unused extern.
5788         (mark_lang_function): Call mark_pending_inlines.
5789
5790 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
5791
5792         * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
5793         init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
5794         semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
5795         Change my_fancy_abort() to abort().
5796
5797 2002-01-23  Jason Merrill  <jason@redhat.com>
5798
5799         PR c++/5453
5800         * class.c (fixed_type_or_null): Fix thinko.
5801
5802         PR c++/3331
5803         * init.c (resolve_offset_ref): Use build_indirect_ref.
5804
5805         * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
5806
5807 2002-01-22  Jason Merrill  <jason@redhat.com>
5808
5809         * parse.y (function_body): Suppress the block for the outermost
5810         curly braces.
5811         * decl.c (pushdecl): Don't try to skip it.
5812         (begin_function_body): Keep the block we create, not the next one.
5813         * init.c (emit_base_init): Don't mess with keep_next_level.
5814
5815         * class.c (build_base_path): Tweak formatting.
5816
5817 2002-01-19  Nathan Sidwell  <nathan@codesourcery.com>
5818
5819         Fix regression introduced with patch for c++/775
5820         * parse.y (class_head_defn): Check for template specializations
5821         with a different class-key.
5822
5823 2002-01-17  Jason Merrill  <jason@redhat.com>
5824
5825         * decl.c (begin_constructor_body, begin_destructor_body): New fns.
5826         (begin_function_body): Call them and keep_next_level.
5827         * init.c (emit_base_init): Call keep_next_level.
5828         * semantics.c (setup_vtbl_ptr): Lose.
5829         * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
5830         (vtbls_set_up_p): Lose.
5831         * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
5832         * method.c (do_build_copy_constructor): Likewise.
5833         (synthesize_method): Call finish_mem_initializers.
5834         * parse.y (nodecls): Likewise.
5835
5836         * error.c (dump_type_suffix): Print the exception specs before
5837         recursing.
5838         (dump_function_decl): Here, too.
5839
5840         * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
5841
5842 2002-01-10  Ira Ruben   <ira@apple.com>
5843
5844         PR c++/907
5845         * decl.c (start_method): Handle attrlist.
5846
5847 2002-01-10  Jakub Jelinek  <jakub@redhat.com>
5848
5849         * decl2.c (max_tinst_depth): Increase default limit to 500.
5850
5851 2002-01-10  Graham Stott  <grahams@redhat.com>
5852
5853         * spew.c (YYCHAR): Uppercase macro parameter and add
5854         parenthesis.
5855         (YYCODE): Likewise.
5856         (NAME): Uppercase macro parameter.
5857
5858 2002-01-09  Graham Stott  <grahams@redhat.com>
5859
5860         * decl.h (grokdeclarator): Wrap long line.
5861
5862         * semantics.c (FINISH_COND): Uppercase macro paramaters and
5863         add parenthesis.
5864
5865 2002-01-08  Graham Stott  <grahams@redhat.com>
5866
5867         * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
5868         (PALLOC): Uppercase macro parameter and whitespace.
5869         (SALLOC): Uppercase macro parameter.
5870         (SFREE): Uppercase macros parameter, add parenthese and
5871         whitespace.
5872         (STREQL): Uppercase macro parameter and whitespace.
5873         (STRNEQ): Likewise.
5874         (STRLSS): Likewise.
5875         (STRLEQ): Likewise.
5876         (STRGTR): Likewise.
5877         (STRGEQ): Likewise.
5878
5879         * call.c (convert_like): Add parenthesis and wrap.
5880         (convert_like_with_context): Likewise.
5881         (ICS_RANK): Whitespace.
5882         (NEED_TEMPORARY_P): Remove parenthesis.
5883
5884         * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
5885         whitespace.
5886         (VTT_MARKED_BINFO_P): Likewise.
5887
5888         * decl.c (BINDING_LEVEL): Add parenthesis.
5889         (DEF_OPERATOR): Likewise.
5890
5891         * mangle.c (MANGLE_TRACE): Add parenthesis.
5892         (MANGLE_TRACE_TREE): Likewise.
5893         (write_signed_number): Likewise.
5894         (write_unsigned_number): Likewise.
5895
5896         * pt.c (ccat): Uppercase macro parameter.
5897         (cat): Likewise
5898
5899         * search.c (SET_BINFO_ACCESS): Add parenthesis.
5900
5901 2002-01-07  Jason Merrill  <jason@redhat.com>
5902
5903         * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
5904         to pedwarn.
5905
5906         PR c++/3536
5907         * method.c (make_thunk): If !flag_weak, give the thunk the
5908         function's linkage.
5909         (use_thunk): Here, too.
5910
5911 2002-01-07  Graham Stott  <grahams@redhat.com>
5912
5913         * error.c: Update copyright date.
5914         (print_scope_operator): Add parenthesis.
5915         (print_left_paren): Likewise.
5916         (print_right_paren): Likewise.
5917         (print_left_bracket): Likewise.
5918         (print_right_bracket): Likewise.
5919         (print_template_argument_list_start): Likewise.
5920         (print_template_argument_list_end): Likewise.
5921         (print_non_consecutive_character): Likewise.
5922         (print_tree_identifier): Likewise.
5923         (print_identifier): Likewise.
5924         (NEXT_CODE): Uppercase macro parameter.
5925         (ident_fndecl): Delete unused.
5926         (GLOBAL_THING): Likewise.
5927
5928 2002-01-06  Graham Stott  <grahams@redhat.com>
5929
5930         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
5931         (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
5932         (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
5933         (RECORD_OR_UNION_TYPE_CHECK): Likewise.
5934         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
5935         (C_IS_RESERVED_WORD): Uppercase macro parameter.
5936         (C_RID_YYCODE) Likewise.
5937         (ptrmem_cst): Use rtx.
5938         (LOCAL_BINDING_P): Add whitespace.
5939         (INHERITED_VALUE_BINDING_P): Likewise.
5940         (BINDING_SCOPE): Wrap long line.
5941         (BINDING_HAS_LEVEL_P): Remove parenthesis.
5942         (BINDING_VALUE): Wrap long line.
5943         (BINDING_TYPE): Whitespace.
5944         (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
5945         (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
5946         (IDENTIFIER_NAMESPACE_VALUE): Likewise.
5947         (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
5948         (same_type_p): Uppercase macro parameters.
5949         (same_type_ignoring_top_level_qualifiers_p): Likewise.
5950         (OVL_FUNCTION): Wrap long line.
5951         (OVL_CHAIN): Whitespace.
5952         (OVL_CURRENT): Add parenthesis and whitespace.
5953         (OVL_NEXT): Whitespace.
5954         (OVL_USED): Likewise.
5955         (IDENTIFIER_TYPE_VALUE): Likewise.
5956         (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
5957         (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
5958         (LANG_ID_FIELD): Whitespace.
5959         (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
5960         (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
5961         (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
5962         (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
5963         (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
5964         (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
5965         (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
5966         (IDENTIFIER_VIRTUAL_P): Likewise.
5967         (IDENTIFIER_OPNAME_P): Likewise.
5968         (IDENTIFIER_TYPENAME_P): Remove parenthesis.
5969         (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
5970         (C_SET_EXP_ORIGINAL_CODE): Likewise.
5971         (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
5972         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
5973         (IS_AGGR_TYPE): Uppercase macro parameter.
5974         (CLASS_TYPE_P): Likewise.
5975         (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
5976         (IS_AGGR_TYPE_2): Whitespace.
5977         (TAGGED_TYPE_P): Uppercase macro parameter.
5978         (TYPE_BUILT_IN): Whitespace.
5979         (TYPE_FOR_JAVA): Likewise.
5980         (FUNCTION_ARG_CHAIN): Remove parenthesis.
5981         (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
5982         (FUNCTION_FIRST_USER_PARAM): Likewise.
5983         (PROMOTES_TO_AGGR_TYPE): Whitespace.
5984         (DERIVED_FROM_P): Add parenthesis and wrap.
5985         (UNIQUELY_DERIVED_FROM_P): Likewise.
5986         (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
5987         (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
5988         (CLASSTYPE_USE_TEMPLATE): Whitespace.
5989         (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
5990         (TYPE_GETS_DELETE): Add parenthesis.
5991         (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
5992         (TYPE_HAS_ASSIGN_REF): Likewise,
5993         (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
5994         (TYPE_HAS_INIT_REF): Likewise.
5995         (TYPE_HAS_CONST_INIT_REF): Likewise.
5996         (TYPE_BEING_DEFINED): Likewise.
5997         (TYPE_LANG_SPECIFIC): Likewise.
5998         (CLASSTYPE_RTTI): Likewise.
5999         (TYPE_OVERLOADS_CALL_EXPR): Likewise.
6000         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
6001         (TYPE_OVERLOADS_ARROW): Likewise.
6002         (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
6003         (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
6004         (CLASSTYPE_METHOD_VEC): Likewise.
6005         (CLASSTYPE_MARKED_N): Likewise.
6006         (CLASSTYPE_MARKED): Likewise.
6007         (CLASSTYPE_MARKED2): Likewise.
6008         (CLASSTYPE_MARKED3): Likewise.
6009         (CLASSTYPE_MARKED4): Likewise.
6010         (CLASSTYPE_MARKED5): Likewise.
6011         (CLASSTYPE_MARKED6): Likewise.
6012         (SET_CLASSTYPE_MARKED): Whitespace.
6013         (CLEAR_CLASSTYPE_MARKED): Likewise.
6014         (SET_CLASSTYPE_MARKED2): Likewise.
6015         (CLEAR_CLASSTYPE_MARKED2): Likewise.
6016         (SET_CLASSTYPE_MARKED3): Likewise.
6017         (CLEAR_CLASSTYPE_MARKED3): Likewise.
6018         (SET_CLASSTYPE_MARKED4): Likewise.
6019         (CLEAR_CLASSTYPE_MARKED4): Likewise.
6020         (SET_CLASSTYPE_MARKED5): Likewise.
6021         (CLEAR_CLASSTYPE_MARKED5): Likewise.
6022         (SET_CLASSTYPE_MARKED6): Likewise.
6023         (CLEAR_CLASSTYPE_MARKED6): Likewise.
6024         (CLASSTYPE_TAGS): Likewise.
6025         (CLASSTYPE_VSIZE): Likewise.
6026         (CLASSTYPE_VBASECLASSES): Likewise.
6027         (CANONICAL_BINFO): Add parenthesis.
6028         (CLASSTYPE_SIZE(NODE): Likewise.
6029         (CLASSTYPE_SIZE_UNIT): Likewise.
6030         (CLASSTYPE_ALIGN(NODE): Likewise.
6031         (CLASSTYPE_USER_ALIGN): Likewise.
6032         (TYPE_JAVA_INTERFACE): Likewise.
6033         (CLASSTYPE_PURE_VIRTUALS): Likewise.
6034         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
6035         (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
6036         (CLASSTYPE_HAS_MUTABLE): Likewise.
6037         (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
6038         (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
6039         (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
6040         (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
6041         (CLASSTYPE_INTERFACE_ONLY): Likewise.
6042         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
6043         (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
6044         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
6045         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
6046         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
6047         (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
6048         (BINFO_UNSHARED_MARKED): Whitespace.
6049         (BINFO_MARKED): Whitespace and wrap.
6050         (SET_BINFO_MARKED): Likewise.
6051         (CLEAR_BINFO_MARKED): Likewise.
6052         (BINFO_VTABLE_PATH_MARKED): Likewise.
6053         (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
6054         (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
6055         (BINFO_SUBVTT_INDEX): Remove parenthesis.
6056         (BINFO_VPTR_INDEX): Likewise.
6057         (BINFO_PRIMARY_BASE_OF): Likewise,
6058         (CLASSTYPE_VFIELDS): Whitespace.
6059         (VF_DERIVED_VALUE): Wrap long line.
6060         (NAMESPACE_LEVEL): Whitespace.
6061         (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
6062         (DEFARG_POINTER): Whitespace.
6063         (DECL_NEEDED_P): Remove parenthesis.
6064         (DECL_LANGUAGE): Whitespace.
6065         (SET_DECL_LANGUAGE): Add parenthesis.
6066         (DECL_CONSTRUCTOR_P): Whitespace and wrap.
6067         (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
6068         (DECL_IN_AGGR_P): Whitespace.
6069         (DECL_FRIEND_P): Likewise.
6070         (DECL_BEFRIENDING_CLASSES): Likewise.
6071         (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
6072         (DECL_NONCONVERTING_P): Whitespace.
6073         (DECL_PURE_VIRTUAL_P): Likewise.
6074         (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
6075         (DECL_PENDING_INLINE_INFO): Whitespace.
6076         (DECL_SORTED_FIELDS): Likewise.
6077         (DECL_DEFERRED_FN): Likewise.
6078         (DECL_TEMPLATE_INFO): Likewise.
6079         (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
6080         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
6081         (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
6082         (TMPL_ARGS_LEVEL): Likewise.
6083         (SET_TMPL_ARGS_LEVEL): Likewise.
6084         (INNERMOST_TEMPLATE_PARMS): Whitespace.
6085         (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
6086         (INTEGRAL_CODE_P(CODE): Add parenthesis.
6087         (CP_INTEGRAL_TYPE_P): Remove parenthesis.
6088         (TYPE_HAS_CONSTRUCTOR): Whitespace.
6089         (TREE_HAS_CONSTRUCTOR): Likewise.
6090         (TYPE_HAS_DESTRUCTOR): Likewise.
6091         (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
6092         (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
6093         (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
6094         (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
6095         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
6096         (TYPE_PTRMEMFUNC_P): Likewise.
6097         (TYPE_PTRMEMFUNC_FLAG): Likewise.
6098         (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
6099         (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
6100         (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
6101         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
6102         (DECL_ACCESS): Whitespace.
6103         (DECL_GLOBAL_CTOR_P): Remove parenthesis.
6104         (DECL_GLOBAL_DTOR_P): Likewise.
6105         (GLOBAL_INIT_PRIORITY): Likewise.
6106         (DECL_TEMPLATE_PARMS): Likewise.
6107         (DECL_TEMPLATE_RESULT): Likewise.
6108         (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
6109         (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
6110         (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
6111         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
6112         (PRIMARY_TEMPLATE_P): Add parenthesis.
6113         (DECL_USE_TEMPLATE): Whitespace.
6114         (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
6115         (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
6116         (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
6117         (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
6118         (CALL_DECLARATOR_PARMS): Remove parenthesis.
6119         (CALL_DECLARATOR_QUALS): Likewise.
6120         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
6121         (TEMP_NAME_P): Wrap.
6122         (VFIELD_NAME_P): Likewise.
6123         (B_SET): Uppercase macro parameters and add parenthesis.
6124         (B_CLR): Likewise.
6125         (B_TST): Likewise.
6126         (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
6127         (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
6128         (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
6129         (same_or_base_type_p): Likewise.
6130         (cp_deprecated): Likewise.
6131
6132 2002-01-05  Richard Henderson  <rth@redhat.com>
6133
6134         * semantics.c (expand_body): Revert last change.
6135
6136 2002-01-04  Jason Merrill  <jason@redhat.com>
6137
6138         PR c++/4122
6139         * class.c (update_vtable_entry_for_fn): Set delta to zero for a
6140         lost primary.
6141
6142         * class.c (build_vtbl_initializer): Check for a lost primary
6143         before calculating the vtable entry to throw away.
6144
6145 2002-01-02  Jason Merrill  <jason@redhat.com>
6146
6147         * semantics.c (expand_body): Call outlining_inline_function when
6148         emitting an inline function out of line.
6149
6150 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6151
6152         PR c++/5116, c++/764 reversion
6153         * call.c (build_new_op): Revert the instantiations. They are
6154         incorrect.
6155
6156 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6157
6158         PR c++/5089
6159         * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
6160
6161 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6162
6163         PR c++/3716
6164         * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
6165         (tsubst, case POINTER_TYPE): Handle pmfs here.
6166         (tsubst, case OFFSET_TYPE): Check it is not an offset to
6167         reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
6168
6169 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6170
6171         PR c++/35
6172         * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
6173         (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
6174         * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
6175         PARM_DECL.
6176         (tsubst_template_parms): Break up loop statements.
6177         (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
6178         parm PARM_DECLs don't get promoted.
6179
6180 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6181
6182         PR c++/5123
6183         * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
6184         (build_x_function_call): Cope with a COMPONENT_REF containing a
6185         TEMPLATE_ID_EXPR.
6186
6187 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6188
6189         PR c++/5213
6190         * pt.c (convert_template_argument): Be more careful determining
6191         when RECORD_TYPE templates are or are not templates.
6192
6193 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6194
6195         PR c++/775
6196         * cp-tree.h (handle_class_head): Adjust prototype.
6197         * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
6198         parameters. Use for all class heads.
6199         * parse.y (named_class_head_sans_basetype, named_class_head,
6200         named_complex_class_head_sans_basetype,
6201         named_class_head_sans_basetype_defn,
6202         unnamed_class_head): Remove.
6203         (class_head, class_head_apparent_template): Recognize class heads
6204         (class_head_decl, class_head_defn): New reductions. Process class
6205         heads.
6206         (structsp): Adjust class definition and class declaration
6207         reductions.
6208         (maybe_base_class_list): Give diagnostic on empty list.
6209
6210 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6211
6212         PR c++/4379
6213         * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
6214         single non-static member.
6215         (unary_complex_lvalue): If it cannot be a pointer to member, don't
6216         make it so. Check it is not pointer to reference.
6217
6218 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6219
6220         PR c++/5132
6221         * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
6222         are processing a template decl.
6223
6224 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6225
6226         PR c++/5116, c++/764
6227         * call.c (build_new_op): Make sure template class operands are
6228         instantiated. Simplify arglist construction.
6229
6230 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
6231
6232         * call.c (build_user_type_conversion_1): Use my_friendly_assert
6233         rather than if ... abort.
6234         * cvt.c (convert_to_reference): Likewise.
6235         * semantics.c (setup_vtbl_ptr): Likewise.
6236         * pt.c (lookup_template_class): Comment typo.
6237
6238 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
6239
6240         PR c++/5125
6241         * pt.c (push_template_decl_real): Make sure DECL has
6242         DECL_LANG_SPECIFIC.
6243
6244 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
6245
6246         PR c++/335
6247         * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
6248         for non-reference fields.
6249         * typeck.c (require_complete_type): Use resolve_offset_ref).
6250
6251 2001-12-26  Nathan Sidwell  <nathan@codesourcery.com>
6252
6253         PR c++/196
6254         * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
6255
6256 2001-12-24  Nathan Sidwell  <nathan@codesourcery.com>
6257
6258         PR c++/160
6259         * typeck.c (build_modify_expr): Remove old unreachable code & tidy
6260         up. Don't stabilize_references when initializing a reference.
6261
6262 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6263
6264         * decl2.c (lang_f_options): Const-ify.
6265
6266 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
6267
6268         * config-lang.in (diff_excludes): Remove.
6269
6270 2001-12-19  Nathan Sidwell  <nathan@codesourcery.com>
6271
6272         PR c++/90
6273         * typeck.c (build_function_call_real): Use original function
6274         expression for errors.
6275
6276 2001-12-18  Jason Merrill  <jason@redhat.com>
6277
6278         PR c++/3242
6279         * class.c (add_method): Do compare 'this' quals when trying to match a
6280         used function.  Don't defer to another used function.
6281
6282 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
6283
6284         * pt.c (instantiate_clone): Remove, fold into ...
6285         (instantiate_template): ... here. Simplify by removing mutual
6286         recursion.
6287         * typeck2.c (build_m_component_ref): Don't cv qualify the function
6288         pointed to by a pointer to function.
6289         * class.c (delete_duplicate_fields_1): Typo.
6290
6291 2001-12-18  Jason Merrill  <jason@redhat.com>
6292
6293         C++ ABI change: destroy value arguments in caller.
6294         * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
6295         create an extra binding level for the parameters.
6296         * decl.c (store_parm_decls): Don't do parameter cleanups.
6297
6298 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
6299
6300         * call.c (build_new_method_call): Use '%#V'.
6301         * error.c (cv_to_string): Use V parameter to determine padding.
6302
6303 2001-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
6304
6305         * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
6306         spellings in messages.
6307
6308 2001-12-17  Zack Weinberg  <zack@codesourcery.com>
6309
6310         * cp-tree.h: Delete #defines for cp_error, cp_warning,
6311         cp_pedwarn, and cp_compiler_error.
6312         * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
6313         except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
6314         rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
6315         typeck2.c: Change calls to the above macros to use their
6316         language-independent equivalents: error, warning, pedwarn, and
6317         internal_error respectively.
6318
6319 2001-12-16  Neil Booth  <neil@daikokuya.demon.co.uk>
6320
6321         * decl2.c (finish_file): Remove back_end_hook.
6322
6323 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
6324
6325         * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
6326         cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
6327         pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
6328
6329 2001-12-15  Joseph S. Myers  <jsm28@cam.ac.uk>
6330
6331         * lang-options.h: Use American spelling in messages.
6332
6333 2001-12-13  Jason Merrill  <jason@redhat.com>
6334
6335         * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
6336
6337         Use cleanups to run base and member destructors.
6338         * init.c (push_base_cleanups): New function, split out from...
6339         (build_delete): ...here.  Lose !TYPE_HAS_DESTRUCTOR code.
6340         * decl.c (finish_destructor_body): Move vbase destruction code to
6341         push_base_cleanups.
6342         (begin_function_body, finish_function_body): New fns.
6343         (finish_function): Move [cd]tor handling and call_poplevel to
6344         finish_function_body.
6345         (pushdecl): Skip the new level.
6346         * semantics.c (genrtl_try_block): Don't call end_protect_partials.
6347         (setup_vtbl_ptr): Call push_base_cleanups.
6348         * method.c (synthesize_method): Call {begin,end}_function_body.
6349         * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
6350         * cp-tree.h: Declare new fns.
6351         * parse.y (function_body, .begin_function_body): New nonterminals.
6352         (fndef, pending_inline, function_try_block): Use function_body.
6353         (ctor_initializer_opt, function_try_block): No longer has a value.
6354         (base_init): Remove .set_base_init token.
6355         (.set_base_init, compstmt_or_error): Remove.
6356         * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
6357
6358         * optimize.c (maybe_clone_body): Fix parameter updating.
6359
6360 2001-12-12  Jason Merrill  <jason@redhat.com>
6361
6362         * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
6363         * semantics.c (genrtl_start_function): Don't pass
6364         parms_have_cleanups or push an extra binding level.
6365         (genrtl_finish_function): Lose cleanup_label cruft.
6366
6367         * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
6368         (ctor_label): Remove.
6369         * semantics.c (finish_return_stmt): Lose ctor_label support.
6370         * decl.c (finish_constructor_body, mark_lang_function): Likewise.
6371         * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
6372         dtor_label.
6373
6374         * call.c (build_new_method_call): Let resolves_to_fixed_type_p
6375         check for [cd]tors.
6376         * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
6377
6378         * decl.c (finish_function): Check VMS_TARGET, not VMS.
6379
6380         * decl.c (start_cleanup_fn): Remove redundant pushlevel.
6381         (end_cleanup_fn): And poplevel.
6382
6383         * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
6384         if we're in a template.
6385
6386 2001-12-12  Jakub Jelinek  <jakub@redhat.com>
6387
6388         * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
6389         ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
6390         THIS_NAME_P): Delete.
6391         * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
6392         THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
6393         with internal naming scheme.
6394         * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
6395
6396 2001-12-12  Nathan Sidwell  <nathan@codesourcery.com>
6397
6398         * decl.c (grokdeclarator): Deprecated implicit typename use.
6399
6400 2001-12-11  Nathan Sidwell  <nathan@codesourcery.com>
6401
6402         PR g++/51
6403         * parse.y (frob_specs): Indicate it is a language linkage which
6404         contained the extern.
6405         * decl.c (grokdeclarator): Allow extern language linkage with
6406         other specifiers.
6407
6408 2001-12-10  Nathan Sidwell  <nathan@codesourcery.com>
6409
6410         PR g++/72
6411         * decl.c (add_binding): Don't reject duplicate typedefs involving
6412         template parameters.
6413
6414 2001-12-10  Neil Booth  <neil@daikokuya.demon.co.uk>
6415
6416         * parse.y, semantics.c: Similarly.
6417
6418 2001-12-09  Nathan Sidwell  <nathan@codesourcery.com>
6419
6420         PR g++/87
6421         * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
6422         (copy_args_p): Rename to ...
6423         (copy_fn_p): ... here.
6424         (grok_special_member_properties): New function.
6425         (grok_op_properties): Lose VIRTUALP parameter.
6426         (copy_assignment_arg_p): Remove.
6427         * call.c (build_over_call): Use copy_fn_p.
6428         * decl.c (grokfndecl): Reformat. Adjust call to
6429         grok_op_properties.
6430         (copy_args_p): Rename to ...
6431         (copy_fn_p): ... here. Reject template functions. Check for pass
6432         by value.
6433         (grok_special_member_properties): Remember special functions.
6434         (grok_ctor_properties): Don't remember them here, just check.
6435         (grok_op_properties): Likewise.
6436         (start_method): Call grok_special_member_properties.
6437         * decl2.c (grokfield): Likewise.
6438         (copy_assignment_arg_p): Remove.
6439         (grok_function_init): Don't remember abstract assignment here.
6440         * pt.c (instantiate_class_template): Call
6441         grok_special_member_properties.
6442         (tsubst_decl): Adjust grok_op_properties call.
6443
6444 2001-12-08  Aldy Hernandez  <aldyh@redhat.com>
6445
6446         * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
6447         RID_TYPES_COMPATIBLE_P.
6448
6449 2001-12-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
6450
6451         * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
6452         call to build_aggr_init.
6453         * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
6454
6455 2001-12-08  Neil Booth  <neil@daikokuya.demon.co.uk>
6456
6457         * parse.y: Replace uses of the string non-terminal with STRING.
6458         Don't perform string concatentaion here.
6459         (string): Remove non-terminal.
6460         * semantics.c (finish_asm_stmt): Don't concatenate strings here.
6461
6462 2001-12-05  Jason Merrill  <jason@redhat.com>
6463
6464         * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
6465         (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
6466         * tree.c (cp_start_inlining, cp_end_inlining): New fns.
6467         * pt.c (push_tinst_level): No longer static.
6468         * cp-tree.h: Declare them.
6469
6470         * init.c (resolve_offset_ref): Don't check access for the base
6471         conversion to access a FIELD_DECL.
6472
6473         * cp-tree.h (TYPE_REFFN_P): New macro.
6474         * decl.c (bad_specifiers): Check it, too.
6475
6476         * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
6477         on the __*_type_info type if we haven't seen a definition.
6478
6479 2001-12-05  Neil Booth  <neil@daikokuya.demon.co.uk>
6480
6481         * decl.c: Include c-common.h.
6482         (shadow_warning): Move to c-common.c.
6483
6484 Wed Dec  5 17:00:49 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6485
6486         * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
6487
6488 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
6489
6490         * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
6491
6492 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
6493
6494         PR g++/164
6495         * init.c (sort_base_init): Allow binfos to be directly specified.
6496         * method.c (do_build_copy_constructor): Explicitly convert to the
6497         base instance.
6498         (do_build_assign_ref): Likewise.
6499
6500 2001-12-03  Hans-Peter Nilsson  <hp@bitrange.com>
6501
6502         * decl.c (xref_basetypes): Don't use C99 construct in tag_code
6503         declaration and initialization.
6504
6505 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
6506
6507         * typeck2.c: Remove leading capital from diagnostic messages, as
6508         per GNU coding standards.
6509
6510 2001-12-03  Mumit Khan  <khan@nanotech.wisc.edu>
6511
6512         PR c++/3394
6513         * decl.c (xref_basetypes): Handle attributes between
6514         'class' and name.
6515
6516 2001-12-03  Nathan Sidwell  <nathan@codesourcery.com>
6517
6518         PR g++/3381
6519         * parse.y (named_complex_class_head_sans_basetype): Add new
6520         reduction.
6521         * Make-lang.in (parse.c): Adjust expected conflict count.
6522
6523 2001-12-03  Jason Merrill  <jason@redhat.com>
6524
6525         * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
6526         immediate binfos for our virtual bases.
6527
6528 2001-12-02  Neil Booth  <neil@daikokuya.demon.co.uk>
6529
6530         * call.c (build_java_interface_fn_ref): Similarly.
6531         * except.c (is_admissible_throw_operand): Similarly.
6532         * init.c (build_java_class_ref): Similarly.
6533         * xref.c (open_xref_file): Similarly.
6534
6535 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
6536
6537         * class.c (finish_struct): Remove trailing periods from messages.
6538         * decl.c (check_tag_decl): Similarly.
6539         * lex.c (cxx_set_yydebug): Similarly.
6540         * typeck2.c (friendly_abort): Similarly.
6541
6542 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
6543
6544         PR c++/3048
6545         * cp-tree.h (ovl_member): Remove.
6546         * decl2.c (merge_functions): Handle extern "C" functions
6547         specially.
6548         * tree.c (ovl_member): Remove.
6549
6550 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
6551
6552         PR c++/4842
6553         * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
6554         FUNCTION_DECL, as input.
6555         (mark_overriders): Remove.
6556         (warn_hidden): Rework for the new ABI.
6557
6558 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
6559
6560         PR c++/3471
6561         * call.c (convert_like_real): Do not build additional temporaries
6562         for rvalues of class type.
6563
6564 2001-11-28  Nathan Sidwell  <nathan@codesourcery.com>
6565
6566         * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
6567         (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
6568         (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
6569         (DERIVED_FROM_P): Likewise.
6570         (enum base_access): Renumber, add ba_quiet bit mask.
6571         (get_binfo): Remove.
6572         (get_base_distance): Remove.
6573         (binfo_value): Remove.
6574         (ACCESSIBLY_DERIVED_FROM_P): Remove.
6575         * call.c (standard_conversion): Use lookup_base.
6576         * class.c (strictly_overrides): Likewise.
6577         (layout_virtual_bases): Likewise.
6578         (warn_about_ambiguous_direct_bases): Likewise.
6579         (is_base_of_enclosing_class): Likewise.
6580         (add_vcall_offset_vtbl_entries_1): Likewise.
6581         * cvt.c (build_up_reference): Adjust comment.
6582         * init.c (build_member_call): Reformat.
6583         * search.c (get_binfo): Remove.
6584         (get_base_distance_recursive): Remove.
6585         (get_base_distance): Remove.
6586         (lookup_base_r): Tweak.
6587         (lookup_base): Add ba_quiet control. Complete the types here.
6588         (covariant_return_p): Use lookup_base.
6589         * tree.c (binfo_value): Remove.
6590         (maybe_dummy_object): Use lookup_base.
6591         * typeck.c (build_static_cast): Use lookup_base.
6592         (get_delta_difference): Likewise.
6593         * typeck2.c (binfo_or_else): Use lookup_base.
6594         (build_scoped_ref): Add back error_mark_check.
6595         (build_m_component_ref): Use lookup_base.
6596
6597 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
6598
6599         * Make-lang.in (c++.generated-manpages): New dummy target.
6600
6601 Tue Nov 27 09:03:47 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6602
6603         * Make-lang.in (cp-lang.o): Depends on c-common.h.
6604         * cp-lang.c (c-common.h): Include.
6605         (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
6606         * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
6607         * expr.c (init_cplus_expand): Don't set lang_expand_constant.
6608
6609 2001-11-26  Neil Booth  <neil@daikokuya.demon.co.uk>
6610
6611         * decl2.c (c_language): Move to c-common.c.
6612         * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
6613         functions.
6614         (cxx_init): Update.
6615
6616 2001-11-26  Jason Merrill  <jason@redhat.com>
6617
6618         * call.c (joust): Remove COND_EXPR hack.
6619
6620 2001-11-25  Aldy Hernandez  <aldyh@redhat.com>
6621
6622         * search.c (lookup_base_r): Declare bk in variable declaration
6623         space.
6624
6625 2001-11-25  Nathan Sidwell  <nathan@codesourcery.com>
6626
6627         PR g++/3145
6628         * class.c (build_vbase_pointer): Remove.
6629         (build_vbase_path): Remove.
6630         (build_base_path): New function.
6631         * cp-tree.h (base_access, base_kind): New enumerations.
6632         (build_base_path): Declare.
6633         (convert_pointer_to_real): Remove.
6634         (convert_pointer_to): Remove.
6635         (lookup_base): Declare.
6636         (convert_pointer_to_vbase): Remove.
6637         * call.c (build_scoped_method_call): Use lookup_base &
6638         build_base_path instead of convert_pointer_to_real,
6639         get_base_distance & get_binfo.
6640         (build_over_call): Likewise.
6641         * cvt.c (cp_convert_to_pointer): Likewise.
6642         (convert_to_pointer_force): Likewise.
6643         (build_up_reference): Likewise.
6644         (convert_pointer_to_real): Remove.
6645         (convert_pointer_to): Remove.
6646         * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
6647         instead of convert_pointer_to_vbase & build_vbase_path.
6648         (emit_base_init): Use build_base_path instead of
6649         convert_pointer_to_real.
6650         (expand_virtual_init): Lose unrequired conversions.
6651         (resolve_offset_ref): Use lookup_base and build_base_path
6652         instead of convert_pointer_to.
6653         * rtti.c (build_dynamic_cast_1): Use lookup_base &
6654         build_base_path instead of get_base_distance & build_vbase_path.
6655         * search.c (get_vbase_1): Remove.
6656         (get_vbase): Remove.
6657         (convert_pointer_to_vbase): Remove.
6658         (lookup_base_r): New function.
6659         (lookup_base): New function.
6660         * typeck.c (require_complete_type): Use lookup_base &
6661         build_base_path instead of convert_pointer_to.
6662         (build_component_ref): Likewise.
6663         (build_x_function_call): Likewise.
6664         (get_member_function_from_ptrfunc): Likewise.
6665         (build_component_addr): Likewise.
6666         * typeck2.c (build_scoped_ref): Likewise.
6667
6668 2001-11-22  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6669
6670         * cp-tree.h (CP_TYPE_QUALS): Removed.
6671         * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
6672         * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
6673         LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
6674         * dump.c (cp_dump_tree): Use void* dump_info argument to match
6675         lang-hooks prototype.
6676         * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
6677         rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
6678         CP_TYPE_QUALS changed to cp_type_quals.
6679         * Make-lang.in: References to c-dump.h changed to tree-dump.h.
6680         (CXX_C_OBJS): Remove c-dump.o.
6681
6682 2001-11-21  Mark Mitchell  <mark@codesourcery.com>
6683
6684         PR c++/3637
6685         * pt.c (lookup_template_class): Ensure that all specializations
6686         are registered on the list corresponding to the most general
6687         template.
6688
6689 2001-11-20  Mark Mitchell  <mark@codesourcery.com>
6690
6691         * call.c (non_reference): Add documentation.
6692         (convert_class_to_reference): Do not strip reference types
6693         from conversion operators.
6694         (maybe_handle_ref_bind): Simplify.
6695         (compare_ics): Correct handling of references.
6696
6697 2001-11-19  John Wilkinson <johnw@research.att.com>
6698
6699         * dump.c (dump_op): New function.
6700         (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION.  Use
6701         dump_op.  Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
6702         DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
6703
6704 2001-11-19  Mark Mitchell  <mark@codesourcery.com>
6705
6706         PR4629
6707         * semantics.c (finish_sizeof): Make sure that expression created
6708         while processing a template do not have a type.
6709         (finish_alignof): Likewise.
6710         * typeck.c (c_sizeof): Likewise.
6711         (expr_sizeof): Likewise.
6712
6713 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
6714
6715         * lex.c (cxx_finish): Call c_common_finish.
6716         (finish_parse): Remove.
6717
6718 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6719
6720         * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
6721         when displaying error message about missing array bounds.
6722
6723 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6724
6725         * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
6726         CONST_CAST_EXPR.
6727         * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
6728
6729 2001-11-16  Neil Booth  <neil@daikokuya.demon.co.uk>
6730
6731         * cp-tree.h (print_class_statistics): Restore.
6732
6733 2001-11-15  Jason Merrill  <jason@redhat.com>
6734
6735         * method.c (use_thunk): Don't emit debugging information for thunks.
6736
6737         * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
6738         * decl.c (make_typename_type): Handle getting a class template.
6739         * search.c (lookup_field_r): A class template is good enough for
6740         want_type.
6741
6742         * call.c (convert_like_real): Only use cp_convert for the bad part.
6743         (standard_conversion): Also allow bad int->enum.
6744         * typeck.c (ptr_reasonably_similar): Also allow functions to
6745         interconvert.  Pointers to same-size integers are reasonably
6746         similar.
6747
6748         * cvt.c (convert_to_void): If we build a new COND_EXPR, always
6749         give it void type.
6750
6751 2001-11-15  Nathan Sidwell  <nathan@codesourcery.com>
6752
6753         PR g++/3154
6754         * init.c (sort_base_init): Remove unreachable code.
6755         (expand_member_init): Adjust comment to reflect reality. Simplify
6756         and remove unreachable code.
6757
6758 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
6759
6760         * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
6761         (cxx_init): Update prototype.
6762         * decl.c (init_decl_processing): Rename.  Move null node init
6763         to its creation time.
6764         * lex.c (cxx_init_options): Update.
6765         (cxx_init): Combine with old init_parse; also call
6766         cxx_init_decl_processing.
6767
6768 2001-11-14  Richard Sandiford  <rsandifo@redhat.com>
6769
6770         * decl.c (check_initializer): Try to complete the type of an
6771         array element before checking whether it's complete.  Don't
6772         complain about arrays with complete element types but an
6773         unknown size.
6774         (cp_finish_decl): Build the hierarchical constructor before
6775         calling maybe_deduce_size_from_array_init.
6776
6777 2001-11-14  Joseph S. Myers  <jsm28@cam.ac.uk>
6778
6779         * Make-lang.in: Change all uses of $(manext) to $(man1ext).
6780
6781 2001-11-13  Nathan Sidwell  <nathan@codesourcery.com>
6782
6783         PR g++/4206
6784         * parse.y (already_scoped_stmt): Remove.
6785         (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
6786
6787 2001-11-12  H.J. Lu <hjl@gnu.org>
6788
6789         * cvt.c (ocp_convert): Don't warn the address of a weak
6790         function is always `true'.
6791
6792 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
6793
6794         * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
6795         LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
6796         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
6797         * cp-tree.h (print_class_statistics): Remove.
6798         (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
6799         cxx_print_identifier, cxx_set_yydebug): New.
6800         * lex.c (set_yydebug): Rename c_set_yydebug.
6801         * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
6802         lang_print_xnode): Rename.
6803         * tree.c (print_lang_statistics): Rename.
6804
6805 2001-11-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6806
6807         * class.c (dump_array): Fix format specifier warning.
6808
6809 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
6810
6811         * cp-lang.c (LANG_HOOKS_NAME): Override.
6812         (struct lang_hooks): Constify.
6813         * lex.c (cxx_init_options): Update.
6814         (lang_identify): Remove.
6815         * parse.y (language_string): Remove.
6816
6817 2001-11-08  Andreas Franck  <afranck@gmx.de>
6818
6819         * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
6820         DEMANGLER_CROSS_NAME): Handle program_transform_name the way
6821         suggested by autoconf.
6822         (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
6823         (c++.install-common): Use the transformed target alias names.
6824
6825 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
6826
6827         * Make-lang.in: Update.
6828         * cp-lang.c: Include langhooks-def.h.
6829
6830 2001-11-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6831
6832         * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
6833
6834 2001-11-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6835
6836         * lex.c (copy_lang_type): Add static prototype.
6837
6838 2001-11-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6839
6840         * pt.c (unify): Handle SCOPE_REF.
6841
6842 2001-11-01  Jakub Jelinek  <jakub@redhat.com>
6843
6844         * tree.c (cp_copy_res_decl_for_inlining): Adjust
6845         DECL_ABSTRACT_ORIGIN for the return variable.
6846
6847 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
6848
6849         *  Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
6850
6851 2001-10-28  Joseph S. Myers  <jsm28@cam.ac.uk>
6852
6853         * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
6854         semantics.c, spew.c: Fix spelling errors.
6855
6856 2001-10-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6857
6858         * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
6859
6860 2001-10-25  Zack Weinberg  <zack@codesourcery.com>
6861
6862         * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
6863         pop_everything.
6864
6865 Tue Oct 23 14:00:20 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6866
6867         * cp-lang.c (cxx_get_alias_set): New function.
6868         Point LANG_HOOKS_GET_ALIAS_SET to it.
6869
6870 2001-10-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6871
6872         * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
6873         * cp-tree.h (make_unbound_class_template): Prototype new function.
6874         * decl.c (make_unbound_class_template): New function.
6875         * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
6876         * error.c (dump_type): Likewise.
6877         * mangle.c (write_type): Likewise.
6878         * parse.y (template_parm): Likewise.
6879         (template_argument): Use make_unbound_class_template.
6880         * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
6881         (tsubst): Likewise.
6882         (tsubst_copy): Likewise.
6883         (unify): Likewise.
6884         * tree.c (walk_tree): Likewise.
6885         * typeck.c (comptypes): Likewise.
6886
6887 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6888
6889         * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
6890         extra calls into fewer ones.
6891
6892 2001-10-18  Alexandre Oliva  <aoliva@redhat.com>
6893
6894         * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
6895         Warn when merging inline with attribute noinline.
6896         (start_decl, start_function): Warn if inline and attribute
6897         noinline appear in the same declaration.
6898
6899 2001-10-16  H.J. Lu <hjl@gnu.org>
6900
6901         * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
6902         for tree checking disabled.
6903
6904 2001-10-16  Hans-Peter Nilsson  <hp@axis.com>
6905
6906         * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
6907         NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
6908
6909 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
6910
6911         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
6912         (unify): Only handle MINUS_EXPR specially if the above flag is set
6913         and the subtracted constant is 1.  Clear the flag on recursive calls.
6914         Set it when unifying the maximum value in an INTEGER_TYPE's range.
6915
6916 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
6917
6918         * decl.c (bad_specifiers): Don't allow exception specifications
6919         on any typedefs.
6920
6921 2001-10-14  Neil Booth  <neil@daikokuya.demon.co.uk>
6922
6923         * cp/lex.c (init_cp_pragma): Similarly.
6924
6925 2001-10-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6926
6927         * pt.c (lookup_template_class): Build complete template arguments
6928         for BOUND_TEMPLATE_TEMPLATE_PARM.
6929
6930 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6931
6932         * cp-tree.h (TYPE_BINFO): Update comment.
6933         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
6934         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
6935         (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
6936         (copy_type): Prototype new function.
6937         * lex.c (copy_lang_decl): Gather tree node statistics.
6938         (copy_lang_type): New function.
6939         (copy_type): Likewise.
6940         (cp_make_lang_type): Create lang_type for
6941         BOUND_TEMPLATE_TEMPLATE_PARM.  Set TYPE_BINFO for TYPENAME_TYPE
6942         and BOUND_TEMPLATE_TEMPLATE_PARM.
6943         * pt.c (tsubst): Use copy_type instead of copy_node.
6944         * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
6945
6946 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6947
6948         * pt.c (determine_specialization): Ignore functions without
6949         DECL_TEMPLATE_INFO.
6950
6951 2001-10-12  Nathan Sidwell  <nathan@codesourcery.com>
6952
6953         PR g++/4476
6954         * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
6955
6956 2001-10-11  Jason Merrill  <jason_merrill@redhat.com>
6957
6958         * typeck2.c (store_init_value): Don't re-digest a bracketed
6959         initializer.
6960
6961         * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
6962         ANON_AGGR_TYPE_P.
6963
6964 2001-10-11  Richard Henderson  <rth@redhat.com>
6965
6966         * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
6967         of an asm statement.
6968         (build_vtbl_ref_1): Split out from build_vtbl_ref.
6969         (build_vfn_ref): Use it to handle vtable descriptors before
6970         calling build_vtable_entry_ref.
6971         * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
6972
6973 2001-10-10  Richard Henderson  <rth@redhat.com>
6974
6975         * parse.y (asm_operand): Allow named operands.
6976         * semantics.c (finish_asm_stmt): Tweek for changed location
6977         of the operand constraint.
6978
6979 2001-10-09  Jason Merrill  <jason_merrill@redhat.com>
6980
6981         * call.c (standard_conversion): Add bad conversion between
6982         integers and pointers.
6983         (convert_like_real): Don't use convert_for_initialization for bad
6984         conversions; complain here and use cp_convert.
6985         (build_over_call): Don't handle bad conversions specially.
6986         (perform_implicit_conversion): Allow bad conversions.
6987         (can_convert_arg_bad): New fn.
6988         * cp-tree.h: Declare it.
6989         * typeck.c (convert_for_assignment): Use it.
6990         (ptr_reasonably_similar): Any target type is similar to void.
6991
6992 2001-10-08  Alexandre Oliva  <aoliva@redhat.com>
6993
6994         * Make-lang.in (CXX_OBJS): Added cp-lang.o.
6995         (cp/cp-lang.o): New rule.
6996         * cp-tree.h: Declare hooks.
6997         * tree.c: Make hooks non-static.
6998         (init_tree): Don't initialize hooks here.
6999         * lex.c: Likewise.  Move definition of lang_hooks to...
7000         * cp-lang.c: ... new file.
7001
7002 2001-10-08  Richard Henderson  <rth@redhat.com>
7003
7004         * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
7005         (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
7006
7007 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7008
7009         * class.c (build_vtable_entry_ref): Const-ify.
7010         * decl.c (predefined_identifier,
7011         initialize_predefined_identifiers): Likewise.
7012         * init.c (build_new_1): Likewise.
7013         * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
7014         Likewise.
7015
7016 2001-10-05  Alexandre Oliva  <aoliva@redhat.com>
7017
7018         * optimize.c (struct inline_data): Moved to ../tree-inline.c.
7019         (INSNS_PER_STMT): Likewise.
7020         (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
7021         (copy_body, initialize_inlined_parameters): Likewise.
7022         (declare_return_variable, inlinable_function_p): Likewise.
7023         (expand_call_inline, expand_calls_inline): Likewise.
7024         (optimize_inline_calls, clone_body): Likewise.
7025         * tree.c (walk_tree): Moved to ../tree-inline.c.
7026         (walk_tree_without_duplicates): Likewise.
7027         (copy_tree_r, remap_save_expr): Likewise.
7028
7029 2001-10-04  Alexandre Oliva  <aoliva@redhat.com>
7030
7031         * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
7032         (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
7033         * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
7034         (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
7035         (flag_inline_trees): Moved declaration to ../tree-inline.h.
7036         (walk_tree): Moved declaration to ../tree-inline.h.
7037         (walk_tree_without_duplicates, copy_tree_r): Likewise.
7038         (remap_save_expr): Likewise.
7039         * decl.c: Include tree-inline.h.
7040         (lang_mark_tree): Don't mark inlined_fns.
7041         * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
7042         * optimize.c: Include tree-inline.h.
7043         (optimize_inline_calls): Move declaration to ../tree.h, as
7044         non-static.
7045         (remap_decl): Use language-independent constructs and hooks.
7046         (remap_block, copy_body_r, declare_return_variable): Likewise.
7047         (inlinable_function_p): Likewise.  Don't test for
7048         DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
7049         no longer language-specific.
7050         (optimize_inline_calls): Likewise.  Make it non-static.  Moved
7051         call of dump_function to...
7052         (optimize_function): Here...
7053         (clone_body): New function, extracted from...
7054         (maybe_clone_body): ... here.  Build decl_map locally and pass
7055         it on to clone_body.
7056         * pt.c, semantics.c: Include tree-inline.h.
7057         * tree.c: Likewise.
7058         (cp_walk_subtrees): New language-specific hook for tree inlining.
7059         (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
7060         cp_is_overload_p, cp_auto_var_in_fn_p,
7061         cp_copy_res_decl_for_inlining): Likewise.
7062         (walk_tree): Move language-specific constructs into...
7063         (cp_walk_subtrees): this new function.
7064         (copy_tree_r): Use language-independent constructs and hooks.
7065         (init_tree): Initialize tree inlining hooks.
7066         (remap_save_expr): Adjust prototype so that the declaration
7067         does not require the definition of splay_tree.
7068
7069 2001-10-03  John David Anglin  <dave@hiauly1.hia.nrc.ca>
7070
7071         * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
7072         to build the declaration instead of the declaration itself.
7073
7074 2001-10-02  Jason Merrill  <jason_merrill@redhat.com>
7075
7076         * decl2.c (cxx_decode_option): Add 'else'.
7077
7078         * spew.c (end_input): No longer static.
7079         * cp-tree.h: Declare it.
7080         * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
7081
7082 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
7083
7084         * call.c (build_over_call), typeck.c (build_function_call_real):
7085         Pass type attributes to check_function_format rather than name or
7086         assembler name.  Don't require there to be a name or assembler
7087         name to check formats.
7088
7089 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
7090
7091         * decl.c (init_decl_processing): Don't call
7092         init_function_format_info.  Initialize lang_attribute_table
7093         earlier.
7094         (builtin_function): Call decl_attributes.
7095         (insert_default_attributes): New.
7096
7097 2001-10-01  Jason Merrill  <jason_merrill@redhat.com>
7098
7099         * decl.c (grokdeclarator): Copy array typedef handling from C
7100         frontend.
7101
7102         * decl.c (grokdeclarator): Copy too-large array handling from C
7103         frontend.
7104
7105 2001-09-29  Alexandre Oliva  <aoliva@redhat.com>
7106
7107         * config-lang.in (target_libs): Added target-gperf, so that we
7108         don't try to build it if C++ is disabled.
7109
7110 2001-09-23  Zack Weinberg  <zack@codesourcery.com>
7111
7112         * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
7113         (cp/errfn.o): Delete rule.
7114         (cp/error.o): Depend on flags.h.
7115         * errfn.c: Delete file.
7116         * cp-tree.h: Declare warn_deprecated.  Remove definitions of
7117         TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
7118         and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
7119         cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
7120         internal_error respectively.  Make cp_deprecated into a macro.
7121         Don't define cp_printer typedef or declare cp_printers.
7122         * error.c: Include flags.h.
7123         Delete: struct tree_formatting_info, print_function_argument_list,
7124         print_declaration, print_expression, print_function_declaration,
7125         print_function_parameter, print_type_id, print_cv_qualifier_seq,
7126         print_type_specifier_seq, print_simple_type_specifier,
7127         print_elaborated_type_specifier, print_rest_of_abstract_declarator,
7128         print_parameter_declaration_clause, print_exception_specification,
7129         print_nested_name_specifier, and definition of cp_printers.
7130         (locate_error): New function.
7131         (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
7132         rewritten in terms of locate_error and diagnostic.c.
7133         (cp_tree_printer): Rename cp_printer; wire up to *_to_string
7134         instead of deleted print_* routines.  Handle %C, %L, %O, %Q also.
7135         (init_error): Adjust to match.
7136
7137 Sat Sep 22 09:15:31 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7138
7139         * Make-lang.in (CXX_C_OBJS): Add attribs.o.
7140
7141 2001-09-21  Richard Henderson  <rth@redhat.com>
7142
7143         * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
7144         (build_vtbl_initializer): Likewise.
7145         (build_vfn_ref): New.
7146         * cp-tree.h: Declare it.
7147         * call.c (build_over_call): Use it.
7148         * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
7149         * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
7150
7151 Fri Sep 21 08:16:19 2001  J"orn Rennecke <amylaar@redhat.com>
7152
7153         * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
7154
7155 2001-09-21  Joseph S. Myers  <jsm28@cam.ac.uk>
7156
7157         Table-driven attributes.
7158         * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
7159         * decl2.c (cplus_decl_attributes): Only take one attributes
7160         parameter.
7161         * cp-tree.c (cplus_decl_attributes): Update prototype.
7162         * class.c (finish_struct), decl.c (start_decl, start_function),
7163         decl2.c (grokfield), friend.c (do_friend), parse.y
7164         (parse_bitfield): Update calls to cplus_decl_attributes.
7165         * decl.c (grokdeclarator): Take a pointer to a single ordinary
7166         attribute list.
7167         * decl.h (grokdeclarator): Update prototype.
7168         * decl2.c (grokfield): Take a single ordinary attribute list.
7169         * friend.c (do_friend): Likewise.
7170         * decl.c (shadow_tag, groktypename, start_decl,
7171         start_handler_parms, grokdeclarator, grokparms, start_function,
7172         start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
7173         parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
7174         (process_template_parm, do_decl_instantiation): Pass single
7175         ordinary attribute lists around.
7176         * decl.c (grokdeclarator): Correct handling of nested attributes.
7177         Revert the patch
7178         1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
7179                 * decl.c (grokdeclarator): Embedded attrs bind to the right,
7180                 not the left.
7181         .
7182         * cp-tree.h (cp_valid_lang_attribute): Remove declaration
7183         (cp_attribute_table): Declare.
7184         * decl.c (valid_lang_attribute): Don't define.
7185         (lang_attribute_table): Define.
7186         (init_decl_processing): Initialize lang_attribute_table instead of
7187         valid_lang_attribute.
7188         * tree.c (cp_valid_lang_attribute): Remove.
7189         (handle_java_interface_attribute, handle_com_interface_attribute,
7190         handle_init_priority_attribute): New functions.
7191         (cp_attribute_table): New array.
7192         * decl2.c (import_export_class): Don't use
7193         targetm.valid_type_attribute.
7194
7195 2001-09-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
7196
7197         * Make-lang.in (cp/error.o): Depend on real.h
7198         * error.c: #include "real.h"
7199
7200 2001-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7201
7202         * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
7203         xmalloc/strcpy/strcat.
7204
7205 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7206
7207         * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
7208         Const-ification.
7209         * pt.c (tsubst_decl): Likewise.
7210
7211 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7212
7213         * decl2.c (lang_f_options): Const-ification.
7214         * lex.c (cplus_tree_code_name): Likewise.
7215         * spew.c (yyerror): Likewise.
7216
7217 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
7218
7219         PR c++/3986
7220         * class.c (force_canonical_binfo_r): Check & move an indirect
7221         primary base first.
7222         (force_canonical_binfo): Check that it's not already
7223         canonical.
7224         (mark_primary_virtual_base): Remove BINFO parameter.
7225         (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
7226
7227 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
7228
7229         Remove TYPE_NONCOPIED_PARTS.
7230         * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
7231         CLASSTYPE_PURE_VIRTUALS.
7232         (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
7233         * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
7234         (layout_class_type): Don't call fixup_inline_methods here ...
7235         (finish_struct_1): ... call it here.
7236
7237 2001-09-04  Mark Mitchell  <mark@codesourcery.com>
7238
7239         * decl.c (duplicate_decls): Remove code deadling with
7240         DECL_SAVED_INSNS.
7241         * decl2.c (finish_file): Likewise.
7242         * pt.c (instantiate_decl): Likewise.
7243         * semantics.c (expand_body): Don't defer local functions if
7244         they wouldn't be deferred for some other reason.  Don't
7245         generate RTL for functions that will not be emitted.
7246         (genrtl_start_function): Remove code deadling with
7247         DECL_SAVED_INSNS.
7248         (genrtl_finish_function): Likewise.
7249
7250 2001-09-04  Nathan Sidwell  <nathan@codesourcery.com>
7251
7252         PR c++/4203
7253         * call.c (build_over_call): Do not optimize any empty base
7254         construction.
7255
7256 2001-08-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7257
7258         * error.c (dump_template_decl): Output template parameters
7259         together with their specifiers.
7260         Output `class' prefix for template template parameter.
7261         (dump_decl): Fix formatting.
7262
7263 2001-08-30  Kurt Garloff  <garloff@suse.de>
7264
7265         * optimize.c (inlinable_function_p): Allow only smaller single
7266         functions. Halve inline limit after reaching recursive limit.
7267
7268 2001-08-30  Joern Rennecke <amylaar@redhat.com>
7269             Jason Merrill  <jason_merrill@redhat.com>
7270
7271         * class.c (build_vtable_entry_ref): Subtract in char*, not
7272         ptrdiff_t.
7273
7274 2001-08-23  Jason Merrill  <jason_merrill@redhat.com>
7275
7276         * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
7277         (build_cplus_array_type): Use cp_build_qualified_type, not
7278         TYPE_MAIN_VARIANT, to get an unqualified version.
7279
7280         * decl2.c (grok_alignof): Lose.
7281         (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
7282         * typeck.c (c_alignof): Lose.
7283         * semantics.c (finish_sizeof, finish_alignof): New.
7284         * parse.y: Use them.
7285         * cp-tree.h: Declare them.
7286
7287 2001-08-22  Jason Merrill  <jason_merrill@redhat.com>
7288
7289         * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
7290         Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
7291         * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
7292
7293 2001-08-19  Jakub Jelinek  <jakub@redhat.com>
7294
7295         * typeck2.c (add_exception_specifier): Only require complete type if
7296         not in processing template declaration.
7297
7298 2001-08-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7299
7300         * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
7301         GNU_xref_start_scope and GNU_xref_end_scope.
7302
7303         * tree.c (TYPE_HASH): Moved to ../tree.h.
7304
7305 2001-08-16  Mark Mitchell  <mark@codesourcery.com>
7306
7307         * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
7308         on COMPOUND_EXPRs.
7309
7310 2001-08-14  Richard Henderson  <rth@redhat.com>
7311
7312         * class.c, cp-tree.h (build_vfn_ref): Remove.
7313         * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
7314
7315 2001-08-13  Mark Mitchell  <mark@codesourcery.com>
7316
7317         * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
7318         empty class assignment as having side-effects to avoid
7319         spurious warnings.
7320
7321 2001-08-13  Zack Weinberg  <zackw@panix.com>
7322
7323         * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
7324         * except.c: Include libfuncs.h.
7325
7326 2001-08-11  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
7327
7328         * decl.c (grokdeclarator): Clarify diagnostic message.
7329
7330 2001-08-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7331
7332         * decl2.c (do_nonmember_using_decl): Replace using directive
7333         with using declaration in the error message.
7334
7335 2001-08-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7336
7337         * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
7338         criterion to avoid rebuilding expression tree instead of
7339         processing_template_decl.
7340
7341 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
7342
7343         Support named return value optimization for inlines, too.
7344         * decl.c (finish_function): Nullify returns here.
7345         * semantics.c (genrtl_start_function): Not here.
7346         (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
7347         (nullify_returns_r): No longer static.  Just clear RETURN_EXPR.
7348         Also nullify the CLEANUP_STMT for the nrv.
7349         * cp-tree.h: Declare it.
7350         * optimize.c (declare_return_variable): Replace the nrv with the
7351         return variable.
7352         * typeck.c (check_return_expr): Be more flexible on alignment check.
7353         Ignore cv-quals when checking for a matching type.
7354
7355 2001-08-09  Richard Henderson  <rth@redhat.com>
7356
7357         * decl2.c (finish_objects): Use target hooks instead of
7358         assemble_constructor and assemble_destructor.
7359
7360 2001-08-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
7361
7362         * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
7363
7364 2001-08-07  Nathan Sidwell  <nathan@codesourcery.com>
7365
7366         PR c++/3820
7367         Stop using TYPE_NONCOPIED_PARTS.
7368         * call.c (build_over_call): Be careful when copy constructing
7369         or assigning to an empty class.
7370         * class.c (check_bases_and_members): It has a
7371         COMPLEX_ASSIGN_REF if it has a vptr.
7372         (layout_class_type): Don't add empty class padding to
7373         TYPE_NONCOPIED_PARTS.
7374         (finish_struct_1): Don't add the VFIELD either.
7375         * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
7376         initialization.
7377
7378 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
7379
7380         * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
7381
7382 2001-08-06  Richard Henderson  <rth@redhat.com>
7383
7384         * decl2.c (finish_objects): Pass a symbol_ref and priority to
7385         assemble_{constructor,destructor}.  Remove priority handling.
7386
7387 2001-08-05  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
7388
7389         Don't allow template-id in using-declaration.
7390         * decl2.c (validate_nonmember_using_decl): Handle template-ids.
7391         (do_class_using_decl): Likewise.
7392
7393 2001-08-04  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
7394
7395         * cp/spew.c (read_token): No need to pop buffers.
7396
7397 2001-08-02  Stan Shebs  <shebs@apple.com>
7398
7399         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
7400         (fnaddr_from_vtable_entry): Remove decl.
7401         * method.c (use_thunk): Update comment.
7402
7403 2001-08-01  Andrew Cagney  <ac131313@redhat.com>
7404
7405         * repo.c (get_base_filename): Change return value to const char
7406         pointer.
7407
7408 2001-08-02  Nathan Sidwell  <nathan@codesourcery.com>
7409
7410         Kill -fhonor-std.
7411         * NEWS: Document.
7412         * cp-tree.h (flag_honor_std): Remove.
7413         (CPTI_FAKE_STD): Remove.
7414         (std_node): Remove comment about it being NULL.
7415         (fake_std_node): Remove.
7416         * decl.c (in_fake_std): Remove.
7417         (walk_namespaces_r): Remove fake_std_node check.
7418         (push_namespace): Remove in_fake_std code.
7419         (pop_namespace): Likewise.
7420         (lookup_name_real): Remove fake_std_node check.
7421         (init_decl_processing): Always create std_node. Always add
7422         std:: things there.
7423         (builtin_function): Always put non '_' fns in std.
7424         * decl2.c (flag_honor_std): Remove.
7425         (lang_f_options): Remove honor-std.
7426         (unsupported_options): Add honor-std.
7427         (set_decl_namespace): Remove fake_std_node check.
7428         (validate_nonmember_using_decl): Likewise.
7429         (do_using_directive): Likewise.
7430         (handle_class_head): Likewise.
7431         * dump.c (cp_dump_tree): Likewise.
7432         * except.c (init_exception_processing): Adjust.
7433         * init.c (build_member_call): Remove fake_std_node check.
7434         (build_offset_ref): Likewise.
7435         * lang-options.h: Remove -fhonor-std, -fno-honor-std.
7436         * rtti.c (init_rtti_processing): Adjust.
7437
7438 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
7439
7440         * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
7441         operand while calling cp_tree_equal.
7442
7443 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
7444
7445         The 3.0 ABI no longer has vbase pointer fields.
7446         * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
7447         FORMAT_VBASE_NAME): Remove.
7448         * method.c (do_build_copy_constructor): Adjust.
7449         (do_build_assign_ref): Adjust.
7450         * search.c (lookup_field_r): Adjust.
7451         * typeck.c (build_component_ref): Adjust.
7452
7453         The 3.0 ABI always has a vtable pointer at the start of every
7454         polymorphic class.
7455         * rtti.c (build_headof_sub): Remove.
7456         (build_headof): Adjust.
7457         (get_tinfo_decl_dynamic): No need to check flag_rtti
7458         here. Adjust.
7459         (create_real_tinfo_var): Explain why we need a hidden name.
7460
7461 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
7462
7463         PR c++/3631
7464         * class.c (update_vtable_entry_for_fn): The fixed adjustment
7465         of a virtual thunk should be from declaring base.
7466
7467 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
7468
7469         * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
7470         the shared virtual base, so preserving inheritance graph order.
7471
7472 2001-07-30  Andreas Jaeger  <aj@suse.de>
7473
7474         * decl2.c: Remove unused var global_temp_name_counter.
7475
7476 2001-07-28  Richard Henderson  <rth@redhat.com>
7477
7478         * method.c (pending_inlines): Remove.
7479
7480 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
7481
7482         * class.c (mark_primary_virtual_base): Don't adjust base
7483         offsets here.
7484         (dfs_unshared_virtual_bases): Adjust them here.
7485         (mark_primary_bases): Explain why we adjust at the end.
7486
7487 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
7488
7489         * class.c (finish_struct_1): When copying the primary base's
7490         VFIELD, make sure we find it is at offset zero.
7491
7492 2001-07-26  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7493
7494         * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
7495         tsubst_expr for default template arguments.
7496
7497 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
7498
7499         PR c++/3621
7500         * spew.c (yylex): Only copy the token's lineno, if it is
7501         nonzero.
7502
7503 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
7504
7505         PR c++/3624
7506         * call.c (resolve_args): Simplify, call
7507         convert_from_reference.
7508         (build_new_op): Resolve and convert from reference ARG1
7509         earlier. Adjust ARG2 & ARG3 resolve and conversion.
7510
7511 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
7512
7513         * decl.c (last_function_parm_tags): Remove.
7514         (current_function_parm_tags): Remove.
7515         (init_decl_processing): Adjust.
7516         (start_function): Adjust.
7517         (store_parm_decls): Adjust.
7518
7519         PR c++/3152
7520         * decl.c (grokdeclarator): Detect when a function typedef is
7521         declaring a function, and create last_function_parms correctly.
7522
7523 2001-07-25  Jason Merrill  <jason_merrill@redhat.com>
7524
7525         * call.c (joust): Only prefer a non-builtin candidate to a builtin
7526         one if they have the same signature.
7527
7528         * cvt.c (build_up_reference): Take DECL parm.  Check TREE_STATIC on
7529         it rather than toplevel_bindings_p.  Give it a mangled name if static.
7530         (convert_to_reference): Adjust.
7531         * decl2.c (get_temp_name): Lose.
7532         * mangle.c (mangle_ref_init_variable): New fn.
7533         (mangle_guard_variable): Strip the ref-init header.
7534         * cp-tree.h: Adjust.
7535         * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
7536         initializer.
7537         (grok_reference_init): Always use DECL_INITIAL.
7538
7539 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
7540
7541         PR c++/3416
7542         * call.c (build_conditional_expr): Recheck args after
7543         conversions.
7544         * cp-tree.h (build_conditional_expr): Move to correct file.
7545         * typeck.c (decay_conversion): Diagnose any unknown types
7546         reaching here.
7547         (build_binary_op): Don't do initial decay or default
7548         conversions on overloaded functions.
7549         (build_static_cast): Don't do a decay conversion here.
7550
7551 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
7552
7553         PR c++/3543
7554         * typeck.c (condition_conversion): Resolve an OFFSET_REF.
7555         * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
7556
7557 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
7558
7559         * class.c (build_vtbl_or_vbase_field): Remove, move into ...
7560         (create_vtbl_ptr): ... here.
7561
7562 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
7563
7564         * class.c (build_vbase_offset_vbtl_entries): Look for
7565         non-primary base of which we are a sub vtable.
7566
7567 2001-07-24  Phil Edwards  <pme@sources.redhat.com>
7568
7569         * semantics.c (finish_this_expr):  Remove unused code.
7570
7571 2001-07-24  Nathan Sidwell  <nathan@codesourcery.com>
7572
7573         Simplify rtti, now we've only one ABI.
7574         * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
7575         CPTI_TINFO_VAR_ID.
7576         (tinfo_decl_id, tinfo_var_id): Remove.
7577         (get_typeid_1): Remove.
7578         * rtti.c
7579         (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
7580         (typeid_ok_p): New function.
7581         (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
7582         (get_tinfo_decl): Remove old abi documentation.
7583         (tinfo_from_decl): Remove.
7584         (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
7585         (get_typeid_1): Remove.
7586         (get_base_offset): Remove.
7587         (synthesize_tinfo_var): Absorb get_base_offset.
7588         (create_real_tinfo_var): Don't use tinfo_decl_id.
7589
7590 2001-07-23  Graham Stott  <grahams@redhat.com>
7591
7592         * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
7593         variable has_two_argument_delete_p.
7594
7595 2001-07-21  Nathan Sidwell  <nathan@codesourcery.com>
7596
7597         Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
7598         * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
7599         (CPTI_INDEX_IDENTIFIER): Remove.
7600         (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
7601         (delta2_identifier): Remove.
7602         (index_identifier): Remove.
7603         (pfn_or_delta2_identifier): Remove.
7604         (flag_vtable_thunks): Remove.
7605         (VTABLE_DELTA2_NAME): Remove.
7606         (VTABLE_INDEX_NAME): Remove.
7607         (FNADDR_FROM_VTABLE_ENTRY): Adjust.
7608         (vfunc_ptr_type_node): Adjust.
7609         (VTABLE_NAME_PREFIX): Adjust.
7610         (build_vfn_ref): Lose first parameter.
7611         (fixup_all_virtual_upcast_offsets): Remove.
7612         * decl.c (initialize_predefined_identifiers): Remove
7613         delta2_identifier, index_identifier, pfn_or_delta2_identifier.
7614         (init_decl_processing): Remove no-vtable-thunk code.
7615         * decl2.c (flag_vtable_thunks): Remove.
7616         (mark_vtable_entries): Remove no-vtable-thunk code.
7617         * error.c (dump_decl): Remove no-vtable-thunk code.
7618         (dump_expr): Adjust ptr to member function code.
7619         * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
7620         code.
7621         * rtti.c (build_headof): Remove no-vtable-thunk code.
7622         (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
7623         * search.c (get_base_distance): Remove expand_upcast_fixups case.
7624         (virtual_context) Remove.
7625         (expand_upcast_fixups): Remove.
7626         (fixup_virtual_upcast_offsets): Remove.
7627         (fixup_all_virtual_upcast_offsets): Remove.
7628         * typeck.c (get_member_function_from_ptrfunc): Remove
7629         no-vtable-thunk code.
7630         * call.c (build_over_call): Adjust call to build_vfn_ref.
7631         * class.c (build_vfn_ref): Lose first parameter. Remove
7632         no-vtable-thunk code.
7633         (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
7634         (build_vtable_entry): Remove no-vtable-thunk code.
7635
7636 2001-07-20  Nathan Sidwell  <nathan@codesourcery.com>
7637
7638         Remove old-abi remnants. Remove comments about old abi
7639         behavior. Remove references to 'new-abi' in comments.
7640         * cp-tree.h: Adjust comments.
7641         (vbase_offsets_in_vtable_p): Delete.
7642         (vcall_offsets_in_vtable_p): Delete.
7643         (vptrs_present_everywhere_p): Delete.
7644         (all_overridden_vfuns_in_vtables_p): Delete.
7645         (merge_primary_and_secondary_vtables_p): Delete.
7646         (TYPE_CONTAINS_VPTR_P): Adjust.
7647         (VTT_NAME_PREFIX): Remove.
7648         (CTOR_VTBL_NAME_PREFIX): Remove.
7649         (init_vbase_pointers): Remove.
7650         * class.c: Adjust coments.
7651         (build_vbase_pointer_fields): Delete.
7652         (build_vbase_pointer): Remove old-abi code.
7653         (build_secondary_vtable): Likewise.
7654         (modify_all_vtables): Likewise.
7655         (create_vtable_ptr): Likewise.
7656         (layout_class_type): Likewise.
7657         (finish_struct_1): Likewise.
7658         (finish_vtbls): Likewise.
7659         (dfs_finish_vtbls): Delete.
7660         (build_vbase_offset_vtbl_entries): Remove old-abi code.
7661         * cvt.c: Adjust comments.
7662         * decl.c: Adjust comments.
7663         * decl2.c: Adjust comments.
7664         * init.c: Adjust comments.
7665         (construct_virtual_bases): Remove old-abi code.
7666         * lang-specs.h: Remove -fno-new-abi.
7667         * mangle.c: Adjust comments.
7668         * rtti.c: Adjust comments.
7669         (get_base_offset): Remove old-abi-code.
7670         * search.c: Adjust comments.
7671         (dfs_init_vbase_pointers): Remove.
7672         (dfs_vtable_path_unmark): Remove.
7673         (init_vbase_pointers): Remove.
7674         * semantics.c: Adjust comments.
7675         (emit_associated_thunks): Remove old-abi code.
7676         * typeck.c: Adjust comments.
7677
7678 2001-07-20  Daniel Berlin  <dan@cgsoftware.com>
7679
7680         * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
7681         params.h.
7682
7683 2001-07-19  Mark Mitchell  <mark@codesourcery.com>
7684
7685         * class.c (finish_struct_anon): Forbid nested classes.
7686
7687 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
7688
7689         * decl2.c: Don't include dwarfout.h and dwarf2out.h.
7690         * optimize.c: Include debug.h.
7691         (maybe_clone_body): Use debug hook.
7692         * semantics.c: Include debug.h.
7693         (expand_body): Use debug hook.
7694
7695 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
7696
7697         * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
7698
7699 2001-07-18  Mark Mitchell  <mark@codesourcery.com>
7700
7701         * class.c (type_requires_array_cookie): New function.
7702         (check_methods): Don't try to figure out whether the type needs a
7703         cookie here.
7704         (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
7705         * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
7706         (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
7707         * pt.c (instantiate_class_template): Don't set
7708         TYPE_VEC_DELETE_TAKES_SIZE.
7709         * NEWS: Document ABI changes from GCC 3.0.
7710
7711 2001-07-18  Xavier Delacour <xavier@fmaudio.net>,
7712             Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
7713
7714         * NEWS (Changes in GCC 3.0): Fix typo.
7715
7716 2001-07-13  Joseph S. Myers  <jsm28@cam.ac.uk>
7717
7718         * decl2.c (cplus_decl_attributes): Take a pointer to the node to
7719         which attributes are to be attached, and a flags argument.  Update
7720         call to decl_attributes.
7721         (grokfield): Update call to decl_attributes.
7722         * class.c (finish_struct): Update call to cplus_decl_attributes.
7723         * cp-tree.h (cplus_decl_attributes): Update prototype.
7724         * decl.c (start_decl, grokdeclarator, start_function): Update
7725         calls to decl_attributes and cplus_decl_attributes.
7726         * friend.c (do_friend): Update call to cplus_decl_attributes.
7727         * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
7728
7729 2001-07-12  Mark Mitchell  <mark@codesourcery.com>
7730
7731         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
7732         for `register' variables with an asm-specification.
7733
7734 2001-07-11  Mark Mitchell  <mark@codesourcery.com>
7735
7736         * semantics.c (finish_asm_stmt): Mark the output operands
7737         to an asm addressable, if necessary.
7738
7739 2001-07-11  Ben Elliston  <bje@redhat.com>
7740
7741         * Revert this change -- there is a subtle bug.
7742
7743         PR c++/80
7744         * decl.c (finish_enum): New "attributes" argument; pass it to
7745         cplus_decl_attributes.  Use a narrower type if the enum is packed.
7746         * cp-tree.h (finish_enum): Adjust prototype.
7747         * parse.y (enum_head): New non-terminal.
7748         (structsp): Use it. Enums now may be preceded or followed by
7749         optional attributes -- pass their chained tree to finish_enum().
7750         * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
7751
7752 2001-07-10  Mark Mitchell  <mark@codesourcery.com>
7753
7754         * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
7755         variables.
7756
7757 2001-07-10  Jason Merrill  <jason_merrill@redhat.com>
7758
7759         * semantics.c (cp_expand_stmt): Fix for null
7760         current_function_return_value.
7761
7762 2001-07-10  Jan van Male  <jan.vanmale@fenk.wau.nl>
7763
7764         * call.c (build_op_delete_call): Initialize fn.
7765         (convert_like_real): Delete conditional.
7766         (joust): Initialize *w and *l.
7767         * class.c: Add prototype for binfo_ctor_vtable.
7768         (get_primary_binfo): Initialize result.
7769         * init.c (build_java_class_ref): Initialize name.
7770
7771 2001-07-09  Erik Rozendaal  <dlr@acm.org>
7772
7773         * typeck.c (unary_complex_lvalue): Do not duplicate the
7774         argument to modify, pre-, or post-increment when used as an
7775         lvalue and when the argument has side-effects.
7776
7777 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
7778
7779         * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
7780         (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES.  Call
7781         cplus_decl_attributes even if attrs is NULL.
7782         * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
7783
7784 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
7785
7786         * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
7787         calls to decl_attributes.
7788
7789 2001-07-06  Ira Ruben   <ira@apple.com>
7790
7791         * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
7792         be DECL_TEMPLATE_RESULT.
7793
7794 2001-07-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7795
7796         * cp-tree.h (copy_template_template_parm): Rename to ...
7797         (bind_template_template_parm): ... here.
7798         * tree.c (copy_template_template_parm): Rename to ...
7799         (bind_template_template_parm): ... here.  Remove the case when
7800         NEWARGS is NULL_TREE.
7801         (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
7802         BOUND_TEMPLATE_TEMPLATE_PARM.
7803         * pt.c (lookup_template_class): Adjust.
7804
7805 2001-07-05  Jason Merrill  <jason_merrill@redhat.com>
7806
7807         * cvt.c (convert_lvalue): New fn.
7808         * cp-tree.h: Declare it.
7809         * method.c (do_build_assign_ref): Use it.
7810         (do_build_copy_constructor): Convert parm to base types
7811         before calling base constructors.
7812
7813         * typeck.c (check_return_expr): Check DECL_ALIGN instead of
7814         DECL_USER_ALIGN.  Check flag_elide_constructors instead of
7815         optimize.
7816         * semantics.c (cp_expand_stmt): Don't destroy the named return value.
7817
7818 2001-07-02  Nathan Sidwell  <nathan@codesourcery.com>
7819
7820         * optimize.c (optimize_inline_calls): New function, broken out
7821         of ...
7822         (optimize_function): ... here. Call it. Don't inline if it is
7823         a thunk.
7824         (dump_function): Print name of dump flag causing this dump.
7825         * semantics.c (expand_body): Move thunk inline check to
7826         optimize_function.
7827
7828 2001-06-29  Joseph S. Myers  <jsm28@cam.ac.uk>
7829
7830         * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
7831         (comptypes): Use target.comp_type_attributes.
7832
7833 2001-06-29  Nathan Sidwell  <nathan@codesourcery.com>
7834
7835         * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
7836
7837 2001-06-28  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
7838
7839         * error.c (lang_print_error_function): Add a `diagnostic_context *'
7840         parameter. Tweak.
7841
7842 2001-06-27  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
7843
7844         * decl2.c (import_export_class): Update.
7845
7846 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
7847
7848         * error.c (init_error): Adjust settings.
7849
7850 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
7851
7852         * error.c (init_error): Adjust settings.
7853
7854 2001-06-19  Richard Sandiford  <rsandifo@redhat.com>
7855
7856         * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
7857         return pointers to data members by reference rather than by value.
7858
7859 2001-06-18  Jason Merrill  <jason_merrill@redhat.com>
7860
7861         Implement the Named Return Value optimization.
7862         * cp-tree.h (struct cp_language_function): Add x_return_value.
7863         (current_function_return_value): Now a macro.
7864         * decl.c: Don't define it.
7865         (define_label, finish_case_label): Don't clear it.
7866         (init_decl_processing): Don't register it with GC.
7867         * semantics.c (genrtl_finish_function): Don't check it for
7868         no_return_label.  Copy the RTL from the return value to
7869         current_function_return_value and walk, calling...
7870         (nullify_returns_r): ...this new fn.
7871         * typeck.c (check_return_expr): Set current_function_return_value.
7872
7873 2001-06-15  Jason Merrill  <jason_merrill@redhat.com>
7874
7875         * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
7876         sharing a ctor vtable with.  Merge code for cases 1 and 2.
7877         (binfo_ctor_vtable): New fn.
7878         (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
7879
7880 2001-06-14  Jason Merrill  <jason_merrill@redhat.com>
7881
7882         * class.c (dfs_find_final_overrider): Fix logic.
7883
7884         * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
7885         virtual thunk instead of non-virtual.
7886         (get_matching_virtual): Uncomment.
7887
7888         * pt.c (unify): Don't recurse between the POINTER_TYPE and the
7889         OFFSET_TYPE.  If we're adding cv-quals, the extra ones would be on
7890         PARM, not ARG.
7891
7892 2001-06-14  Nathan Sidwell  <nathan@codesourcery.com>
7893
7894         * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
7895         we've not emerged from the hierarchy of RTTI_BINFO on reaching
7896         a non-virtual base.
7897
7898 2001-06-13  Mark Mitchell  <mark@codesourcery.com>
7899
7900         * NEWS: Update release number.
7901
7902 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
7903
7904         PR c++/3130, c++/3131, c++/3132
7905         * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
7906         * class.c (force_canonical_binfo_r): Move
7907         BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
7908         virtual bases unless they're primary and what they're primary
7909         too has been moved.
7910         (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
7911         with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
7912         BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
7913         derived binfo.
7914         (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
7915         (layout_nonempty_base_or_field): Add most derived type
7916         parameter. Adjust.
7917         (layout_empty_base): Likewise.
7918         (build_base_field): Likewise.
7919         (build_base_fields): Likewise.
7920         (propagate_binfo_offsets): Add most derived type
7921         parameter. Skip non canonical virtual bases too.
7922         (dfs_set_offset_for_unshared_vbases): Don't skip primary
7923         bases. Do skip canonical bases.
7924         (layout_virtual_bases): Adjust.
7925         (layout_class_type): Adjust.
7926         (dfs_get_primary_binfo): Build list of virtual primary base
7927         candidates.
7928         (get_primary_binfo): Check that the shared virtual primary
7929         base candidate was found first.
7930         (accumulate_vtbl_inits): Don't do anything for non-vptr
7931         containing binfos. For case 1 primary virtual bases, keep
7932         checking that we've not emerged from the hierarchy of RTTI_BINFO.
7933
7934 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
7935
7936         PR c++/3089
7937         * class.c (dfs_accumulate_vtbl_inits): Always walk down the
7938         hierarchy looking for primary bases for a ctor
7939         vtable. Recursively call oneself, if we meet our primary via
7940         this route and haven't met it yet via inheritance graph order.
7941
7942 2001-06-11  Mark Mitchell  <mark@codesourcery.com>
7943
7944         * lang-options.h: Emit documentation for -fno-honor-std, not
7945         -fhonor-std.
7946
7947 2001-06-10  Alexandre Oliva  <aoliva@redhat.com>
7948
7949         * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
7950         Don't clobber delta.
7951         (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
7952
7953 2001-06-10  Mark Mitchell <mark@codesourcery.com>
7954             Gabriel Dos Reis  <gdr@codesourcery.com>
7955
7956         * Make-lang.in (cp/call.o): Depend on diagnostic.h
7957         (cp/typeck.o): Depend on diagnostic.h
7958         (cp/typeck2.o): Depend on diagnostic.h
7959         (cp/repo.o): Depend on dignostic.h
7960         * typeck.c: #include diagnostic.h
7961         (convert_for_initialization): Remove extern declaration for
7962         warningcount and errorcount.
7963
7964         * call.c: #include diagnostic.h
7965         (convert_like_real): Remove extern declaration for warnincount and
7966         errorcount.
7967
7968         * repo.c: #include diagnostic.h
7969         * typeck2.c: #include diagnostic.h
7970
7971 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
7972
7973         * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
7974         in previous change.
7975
7976 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
7977
7978         PR c++/2929
7979         * friend.c (do_friend): Use push_decl_namespace for classes at
7980         namespace scope.
7981
7982 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
7983             Jason Merrill <jason_merrill@redhat.com>
7984
7985         PR c++/3061
7986         * class.c (build_secondary_vtable): Use assert, rather than an error
7987         message.
7988         (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
7989         (dfs_accumulate_vtbl_inits): A lost primary virtual base may
7990         be between ORIG_BINFO and RTTI_BINFO, but neither of them.
7991         Don't set BINFO_VTABLE for a primary virtual base.
7992
7993 2001-06-07  Mark Mitchell  <mark@codesourcery.com>
7994
7995         * decl.c (duplicate_decls): Update source position information
7996         when a template function is defined.
7997
7998 2001-06-07  Phil Edwards  <pme@sources.redhat.com>
7999
8000         * lang-specs.h:  Move -D_GNU_SOURCE to config/linux.h.
8001
8002 2001-06-07  Nathan Sidwell  <nathan@codesourcery.com>
8003
8004         PR c++/2914
8005         * decl.c (pushtag): Don't push into a complete type's scope.
8006
8007 2001-06-06  Jason Merrill  <jason_merrill@redhat.com>
8008
8009         * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
8010         (struct lang_decl_flags): Lose generate_with_vtable_p.
8011         (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
8012         * class.c (copy_virtuals): Adjust.
8013         * decl2.c (mark_vtable_entries): Adjust.
8014         * method.c (make_thunk, build_vtable_entry): Adjust.
8015         * class.c (update_vtable_entry_for_fn): Only look as far as the
8016         first defining class.
8017         (build_vtbl_initializer): Put nothing in the slot for a function only
8018         defined in a lost primary virtual base.
8019         (add_vcall_offset_vtbl_entries_1): Use the same code for
8020         the lost primary case and the normal case.
8021         (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
8022         (get_vfield_offset, get_derived_offset): Lose.
8023         (dfs_find_final_overrider): Use look_for_overrides_here.
8024         (get_matching_virtual): New fn.
8025         * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
8026         not BV_VCALL_INDEX.
8027         * search.c (look_for_overrides_here): Split out from...
8028         (look_for_overrides_r): Here.
8029
8030         * class.c (find_final_overrider): Return error_mark_node on error.
8031
8032         * decl2.c (key_method): #if 0 accidental change.
8033
8034 2001-06-06  John David Anglin  <dave@hiauly1.hia.nrc.ca>
8035
8036         * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
8037         (build_over_call): Likewise.
8038         * decl.c (grokparms): Likewise.
8039         * pt.c (tsubst_decl): Likewise.
8040         * typeck.c (convert_arguments): Likewise.
8041
8042 2001-06-05  Mark Mitchell  <mark@codesourcery.com>
8043
8044         * semantics.c (begin_class_definition): Robustify.
8045
8046         * pt.c (instantiate_decl): Tell the repository code about the
8047         clones, not the cloned functions.
8048         * repo.c (repo_template_used): Explicitly instantiate the cloned
8049         function, not the clones.
8050
8051 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
8052
8053         * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
8054         ICS_BAD_FLAG on created conversion.
8055         (compare_ics): Break out rank.
8056
8057 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
8058
8059         * decl.c (xref_tag): Remove extraneous %s on dependent name
8060         lookup warning.
8061
8062 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
8063
8064         * class.c (layout_vtable_decl): Fix off by one error on
8065         build_index_type.
8066         (build_vtt): Likewise.
8067         (build_ctor_vtbl_group): Likewise.
8068
8069 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
8070
8071         * class.c (maybe_indent_hierarchy): New function.
8072         (dump_class_hierarchy_r): Add flags. Dump extra binfo
8073         information, if enabled. Use maybe_indent_hierarchy. Adjust
8074         output format.
8075         (dump_class_hierarchy): Adjust prototype. Adjust output format.
8076         (dump_array, dump_vtable, dump_vtt): New functions.
8077         (finish_struct_1): Adjust hierarchy dumping.
8078         (initialize_vtable): Call dump_vtable.
8079         (build_vtt): Call dump_vtt.
8080         (build_ctor_vtbl_group): Call dump_vtable.
8081         * decl2.c (flag_dump_class_layout): Remove.
8082         (cxx_decode_option): Remove dump translation unit
8083         and dump class hierarchy check. Call dump_switch_p.
8084         (finish_file): Adjust dumping.
8085         (dump.c): Only dump base classes if not TDF_SLIM.
8086         Only dump namespace members if not TDF_SLIM.
8087         * optimize.c (dump_function): New function.
8088         (optimize_function): Call dump_function.
8089         * semantics.c (expand_body): Use dump_enabled_p.
8090
8091 2001-06-01  Nathan Sidwell  <nathan@codesourcery.com>
8092
8093         PR g++/2936
8094         Part missed from first commit
8095         * decl2.c (finish_anon_union): Copy context.
8096
8097 2001-05-30  Nathan Sidwell  <nathan@codesourcery.com>
8098
8099         PR g++/2936
8100         * optimize.c (remap_decl): Remap anonymous aggregate members too.
8101
8102 2001-05-26  Nathan Sidwell  <nathan@codesourcery.com>
8103
8104         PR g++/2823
8105         * semantics.c (expand_body): Don't optimize thunks.
8106
8107 2001-05-25  Sam TH  <sam@uchicago.edu>
8108
8109         * cp-tree.h lex.h: Fix header include guards.
8110
8111 2001-05-25  Mark Mitchell <mark@codesourcery.com>
8112
8113         * decl.c (init_decl_processing): Tweak.
8114
8115 2001-05-24  Mark Mitchell  <mark@codesourcery.com>
8116
8117         * decl.c (duplicate_decls): Tidy.
8118         (init_decl_processing): Always set flag_no_builtin.
8119
8120 2001-05-24  Nathan Sidwell  <nathan@codesourcery.com>
8121
8122         PR c++/2184
8123         * decl2.c (do_local_using_decl): Push the decls, even in a
8124         template.
8125
8126 2001-05-22  Mark Mitchell  <mark@codesourcery.com>
8127
8128         * optimize.c (initialize_inlined_parameters): Don't set
8129         TREE_READONLY for a VAR_DECL taking the place of an inlined
8130         PARM_DECL.
8131
8132 2001-05-22  Jason Merrill  <jason_merrill@redhat.com>
8133
8134         * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
8135         * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
8136         attribute.
8137
8138 2001-05-22  Joseph S. Myers  <jsm28@cam.ac.uk>
8139
8140         * parse.y: Refer to compound literals as such, not as
8141         constructor-expressions.
8142
8143 2001-05-21  Mark Mitchell  <mark@codesourcery.com>
8144
8145         * call.c (build_op_delete_call): Ignore exception-specifications
8146         when looking for matching delete operators.
8147         * init.c (build_new_1): Compute whether or not the allocation
8148         function used is a placement allocation function or not, and
8149         communicate this information to build_op_delete_call.
8150
8151 2001-05-21  Jason Merrill  <jason_merrill@redhat.com>
8152
8153         * class.c (build_vtable_entry_ref): Lose vtbl parm.  Fix for new abi.
8154         (build_vtbl_ref): Adjust.
8155         (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
8156         * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
8157         Re-add vtable-gc.
8158         (unsupported_options): Correspondingly.
8159
8160         * decl2.c (maybe_make_one_only): Check flag_weak, not
8161         supports_one_only().
8162
8163         * cp-tree.def (START_CATCH_STMT): Lose.
8164         * dump.c (cp_dump_tree): Don't dump it.  Do dump HANDLER_PARMS.
8165         * tree.c (cp_statement_code_p): Don't case it.
8166         * semantics.c (cp_expand_stmt): Likewise.
8167         * cp-tree.h (START_CATCH_TYPE): Lose.
8168         (HANDLER_TYPE): New.
8169         * except.c (expand_start_catch_block): Don't start any blocks.
8170         Return the type.
8171         (expand_end_catch_block): Don't end any blocks.
8172         * parse.y (handler): Don't pass anything from finish_handler_parms
8173         to finish_handler.
8174         * pt.c (tsubst_expr): Likewise.
8175         * semantics.c (begin_handler): Call note_level_for_catch here.
8176         (finish_handler_parms): Don't return anything.
8177         (genrtl_catch_block, begin_catch_block): Lose.
8178         (genrtl_handler): Call expand_start_catch here.
8179
8180 2001-05-18  Jason Merrill  <jason_merrill@redhat.com>
8181
8182         * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
8183         (get_vtable_decl, build_vtt): Not here.
8184
8185 2001-05-20  Nathan Sidwell  <nathan@codesourcery.com>
8186
8187         PR c++/2781
8188         * optimize.c (update_cloned_parm): Copy addressability and other
8189         flags.
8190
8191 2001-05-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8192
8193         * pt.c (determine_specialization): Ignore artificial functions.
8194
8195 2001-05-20  Neil Booth  <neil@daikokuya.demon.co.uk>
8196
8197         * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
8198         (C_RID_CODE): Remove.
8199         * lex.c (cxx_init_options): Call set_identifier_size.  Update.
8200         (init_parse): Don't do it here.
8201
8202 2001-05-18  Diego Novillo  <dnovillo@redhat.com>
8203
8204         * decl2.c (finish_objects): Use the original SYMBOL_REF from the
8205         function declaration to avoid stripping the symbol's attributes.
8206
8207 2001-05-18  Nathan Sidwell  <nathan@codesourcery.com>
8208
8209         * decl.c (pushdecl): Adjust error string.
8210         (xref_tag): Adjust friend class injection warning. Remove the
8211         inherited name from the class shadowed scope.
8212
8213 2001-05-17  Mark Mitchell  <mark@codesourcery.com>
8214
8215         * except.c (cp_protect_cleanup_actions): New function.
8216         (init_exception_processing): Don't set protect_cleanup_actions
8217         here.  Do set lang_protect_cleanup_actions.
8218
8219 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
8220
8221         * spew.c (read_token): Call yyerror on all unexpected tokens.
8222
8223 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
8224
8225         * init.c (member_init_ok_or_else): Take a tree rather than
8226         string for name.
8227         (expand_member_init): Adjust.
8228
8229 2001-05-14  Nick Clifton  <nickc@cambridge.redhat.com>
8230
8231         * decl.c (duplicate_decls): Suppress warning about duplicate
8232         decls if the first decl is a friend.
8233
8234 2001-05-12  Zack Weinberg  <zackw@stanford.edu>
8235
8236         * except.c (choose_personality_routine): Export.  Add
8237         explanatory comment.  Take an enum languages, not a boolean.
8238         (initialize_handler_parm): Adjust to match.
8239         * cp-tree.h: Prototype choose_personality_routine.
8240         * lex.c (handle_pragma_java_exceptions): New function.
8241         (init_cp_pragma): Register #pragma GCC java_exceptions.
8242
8243 2001-05-12  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
8244
8245         * method.c (build_mangled_C99_name): Remove unused prototype.
8246
8247 2001-05-12  Alexandre Oliva  <aoliva@redhat.com>
8248
8249         * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
8250         * typeck.c (get_member_function_from_ptrfunc,
8251         build_ptrmemfunc, expand_ptrmemfunc_cst): Take
8252         TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
8253
8254         Reverted Geoff Keating's 2001-05-03's patch.
8255
8256 2001-05-11  Ira Ruben   <ira@apple.com>
8257
8258         * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
8259
8260 2001-05-11  Neil Booth  <neil@daikokuya.demon.co.uk>
8261
8262         * cp-tree.h (finish_label_expr, lookup_label): Delete.
8263         * parse.y: Update for '&&'; don't issue warning here.
8264         * semantics.c (finish_label_expr): Delete.
8265
8266 2001-05-07  Mark Mitchell  <mark@codesourcery.com>
8267
8268         * splay-tree.h (splay_tree_max): New function.
8269         (splay_tree_min): Likewise.
8270
8271 2001-05-03  Geoffrey Keating  <geoffk@redhat.com>
8272
8273         * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
8274         (pfn_vflag_identifier): Define.
8275         Update comment about layout of pointer functions.
8276         (build_ptrmemfunc1): Update prototype.
8277         (expand_ptrmemfunc_cst): Update prototype.
8278         * decl.c (initialize_predefined_identifiers): Initialize
8279         pfn_vflag_identifier.
8280         (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
8281         an extra field to the type.
8282         * expr.c (cplus_expand_constant): Pass 'flag' between
8283         expand_ptrmemfunc_cst and build_ptrmemfunc1.
8284         * typeck.c (get_member_function_from_ptrfunc): When
8285         FUNCTION_BOUNDARY < 16, look at additional field to determine
8286         if a pointer-to-member is a real pointer or a vtable offset.
8287         (build_ptrmemfunc1): Add new parameter to contain extra field.
8288         (build_ptrmemfunc): Pass the extra field around.
8289         (expand_ptrmemfunc_cst): Add new parameter to return extra field.
8290         (pfn_from_ptrmemfunc): Ignore the extra field.
8291
8292 2001-05-03  Mark Mitchell  <mark@codesourcery.com>
8293
8294         * cp-tree.h (flag_inline_trees): Update documentation.
8295         * decl.c (init_decl_processing): Adjust handling of
8296         flag_inline_functions and flag_inline_trees to support -O3.
8297         (grokfndecl): Set DECL_INLINE on all functions if that's what
8298         the user requested.
8299         (save_function_data): Clear DECL_INLINE in
8300         current_function_cannot_inline is non-NULL.
8301         * decl2.c (flag_inline_trees): Update documentation.
8302
8303 2001-05-03  Nathan Sidwell  <nathan@codesourcery.com>
8304
8305         * dump.c (cp_dump_tree, USING_STMT case): New case.
8306         * tree.c (cp_statement_code_p): Add USING_STMT.
8307         * decl2.c (do_using_directive): Add the using directive statement.
8308
8309         * tree.c (walk_tree): Reformat an if block.
8310
8311 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
8312
8313         * decl.c (compute_array_index_type): Don't try to do anything with
8314         the indices when processing a template.
8315
8316 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8317
8318         * call.c: NULL_PTR -> NULL.
8319         * class.c: Likewise.
8320         * cvt.c: Likewise.
8321         * decl.c: Likewise.
8322         * decl2.c: Likewise.
8323         * except.c: Likewise.
8324         * init.c: Likewise.
8325         * rtti.c: Likewise.
8326         * search.c: Likewise.
8327         * tree.c: Likewise.
8328         * typeck.c: Likewise.
8329         * typeck2.c: Likewise.
8330
8331 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
8332
8333         * decl2.c (do_using_directive): Revert previous patch.
8334
8335 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
8336
8337         * cp-tree.def (USING_STMT): New statement node.
8338         * cp-tree.h (USING_STMT_NAMESPACE): New macro.
8339         * decl2.c (do_using_directive): Add USING_STMT to statement
8340         tree. Don't emit errors when processing template decl.
8341         * pt.c (tsubst_expr, USING_STMT case): New case.
8342         * semantics.c (cp_expand_stmt, USING_STMT case): New case.
8343
8344 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
8345
8346         * call.c (build_new_op): Convert args from reference here.
8347         (build_conditional_expr): Don't convert here.
8348
8349 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
8350
8351         * spew.c (last_token_id): New static variable.
8352         (read_token): Set it here.
8353         (yyerror): Use it here.
8354
8355 2001-04-30  Richard Henderson  <rth@redhat.com>
8356
8357         * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
8358         * decl.c: Likewise.
8359
8360 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
8361
8362         * gxxint.texi: Remove.
8363         * Make-lang.in: Remove all traces of gxxint.texi.
8364
8365 Mon Apr 30 16:14:10 2001  Mark P Mitchell  <mark@codesourcery.com>
8366
8367         * decl2.c (start_static_initialization_or_destruction): Correct
8368         logic to handle the -fno-use-cxa-atexit case.
8369
8370 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
8371
8372         * optimize.c (update_cloned_parm): New function.
8373         (maybe_clone_body): Use it.  Update the `this' parameter too.
8374
8375 2001-04-29  Joseph S. Myers  <jsm28@cam.ac.uk>
8376
8377         * decl2.c (unsupported_options): Add new-abi.
8378         * lang-options.h: Remove no longer supported options.
8379
8380 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
8381
8382         * except.c (can_convert_eh): Don't check template parms,
8383         typename types etc.
8384
8385 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
8386
8387         * optimize.c (maybe_clone_body): Copy parameter names and locations.
8388
8389 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
8390
8391         * cp-tree.h (adjust_clone_args): Prototype new function.
8392         * class.c (adjust_clone_args): New function.
8393         * decl.c (start_function): Call it for in charge ctors.
8394
8395 2001-04-26  Mark Mitchell  <mark@codesourcery.com>
8396
8397         * method.c (use_thunk): Make sure that thunks really are emitted
8398         when requested.
8399
8400 2001-04-26  Nathan Sidwell <nathan@codesourcery.com>
8401
8402         * mangle.c (write_chars): New macro.
8403         (hwint_to_ascii): New function
8404         (write_number): Use it.
8405         (write_integer_cst): Deal with really big numbers.
8406
8407 2001-04-25  Mark Mitchell  <mark@codesourcery.com>
8408
8409         * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
8410         the clone.
8411
8412 2001-04-25  Nathan Sidwell  <nathan@codesourcery.com>
8413
8414         * decl.c (grokdeclarator): Set context of namespace scope
8415         TYPE_DECLS.
8416
8417 2001-04-24  Zack Weinberg  <zackw@stanford.edu>
8418
8419         * cp/optimize.c: Include hashtab.h.
8420         (struct inline_data): Add tree_pruner.
8421         (expand_call_inline, expand_calls_inline): Use it when calling
8422         walk_tree.
8423         (optimize_function): Initialize and free tree_pruner.
8424
8425 2001-04-24  Nathan Sidwell <nathan@codesourcery.com>
8426
8427         Lazy __FUNCTION__ generation.
8428         * cp-tree.def (FUNCTION_NAME): Remove.
8429         * cp-tree.h (function_name_declared_p): Remove.
8430         (cp_fname_init): Prototype.
8431         * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
8432         don't call declare_function_name. Call start_fname_decls.
8433         (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
8434         clobber the line number.
8435         (cp_fname_init): New function.
8436         (start_function): Call start_fname_decls.
8437         (finish_function): Call finish_fname_decls.
8438         * lex.c (reswords): Add slots for __FUNCTION__ et al.
8439         (rid_to_yy): Add mappings for __FUNCTION__ et al.
8440         * optimize.c (maybe_clone_body): Remove function_name_declared_p.
8441         * parse.y (VAR_FUNC_NAME): New token.
8442         (primary): Add VAR_FUNC_NAME.
8443         * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
8444         generation.
8445         (tsubst, FUNCTION_NAME case): Remove.
8446         (tsubst_copy, FUNCTION_NAME case): Remove.
8447         (tsubst_expr, DECL_STMT case): Be careful with a
8448         DECL_PRETTY_FUNCTION_P.
8449         (instantiate_decl): Remove function_name_declared_p.
8450         * semantics.c (begin_compound_statement): Don't call
8451         declare_function_name here.
8452         (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
8453         (finish_translation_unit): Call finish_fname_decls.
8454         (expand_body): Remove function_name_declared_p.
8455         * typeck2.c (digest_init): Allow any ERROR_MARK.
8456
8457 2001-04-24  Nathan Sidwell  <nathan@codesourcery.com>
8458
8459         * pt.c (tsubst_decl): Use VOID_TYPE_P.
8460         * semantics.c: Fix some typos.
8461
8462 2001-04-23  Phil Edwards  <pme@sources.redhat.com>
8463
8464         * cp/decl2.c (flag_honor_std):  Always initialize to 1.
8465
8466 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8467
8468         * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
8469
8470 2001-04-23  Jason Merrill  <jason_merrill@redhat.com>
8471
8472         * except.c (build_throw): Wrap the initialization of the exception
8473         object in a MUST_NOT_THROW_EXPR.
8474         (do_free_exception): #if 0.
8475
8476 2001-04-20  Mark Mitchell  <mark@codesourcery.com>
8477
8478         * cp-tree.h (finish_enum): Change prototype.
8479         * decl.c (finish_enum): Reorganize.
8480         * parse.y (structsp): Adjust calls to finish_enum.
8481
8482 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
8483
8484         * tree.c (cp_tree_equal): Adjust final switch formatting. Add
8485         't' case.
8486
8487 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
8488
8489         * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
8490         (layout_empty_base): Return at end flag.
8491         (build_base_field): Likewise.
8492         (build_base_fields): Likewise.
8493         (layout_virtual_bases): Don't add 1 to eoc value.
8494         (end_of_class): Use full size for empty bases.
8495         (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
8496         empty bases. Don't add 1 to eoc value. Only add trailing padding
8497         if we're an empty class with no empty bases.
8498         (dump_class_hierarchy): Dump size and alignment.
8499
8500 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
8501
8502         * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
8503         ICS_BAD_FLAG.
8504
8505 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
8506
8507         * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
8508         is found, look first if name does not match the structure name.
8509
8510 2001-04-19  Mark Mitchell  <mark@codesourcery.com>
8511
8512         * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
8513         set.
8514         (SET_DECL_LANGUAGE): New macro.
8515         * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
8516         (pushdecl): Likewise.
8517         (build_library_fn_1): Likewise.
8518         (build_cp_library_fn): Likewise.
8519         (grokfndecl): Likewise.
8520         (grokvardecl): Mark `extern "C"' variables as having C linkage.
8521         * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
8522         * lex.c (retrofit_lang_decl): Likewise.
8523         * mangle.c (mangle_decl_string): Don't mangle the names of
8524         variables declared with C language linkage.
8525         * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
8526
8527 2001-04-18  John David Anglin  <dave@hiauly1.hia.nrc.ca>
8528
8529         * semantics.c (simplify_aggr_init_exprs_r): Don't restore
8530         flag_access_control from uninitialized storage.
8531
8532 2001-04-15  Mark Mitchell  <mark@codesourcery.com>
8533
8534         * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
8535         * mangle.c (write_pointer_to_member_type): Fix mangling of
8536         pointers to cv-qualified member function types.
8537
8538         * init.c (build_delete): Create a SAVE_EXPR for the address if
8539         we're going to use it more than once.
8540
8541 2001-04-13  Mark Mitchell  <mark@codesourcery.com>
8542
8543         * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
8544         (expand_ptremfunc_cst): Change prototype.
8545         (delta2_from_ptrmemfunc): Remove.
8546         * expr.c (cplus_expand_constant): Adjust call to
8547         expand_ptrmemfunc_cst.
8548         * typeck.c (build_ptrmemfunc1): Simplify.
8549         (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
8550         results in a constant.
8551         (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
8552         (delta2_from_ptrmemfunc): Remove.
8553         (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
8554
8555 2001-04-12  Jason Merrill  <jason_merrill@redhat.com>
8556
8557         * cp-tree.h (decl_namespace_list): New macro.
8558         (struct saved_scope): Add decl_ns_list.
8559         * decl.c (mark_saved_scope): Mark it.
8560         * decl2.c: Lose static decl_namespace_list.
8561         (init_decl2): Don't save it.
8562
8563 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8564
8565         * cp-tree.h (warn_return_type, yylex): Delete redundant
8566         declarations.
8567
8568         * decl.c (current_class_depth, global_namespace): Likewise.
8569
8570         * decl2.c (current_class_depth, flag_gnu_xref): Likewise
8571
8572         * repo.c (flag_use_repository): Likewise.
8573
8574 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8575
8576         * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
8577         set_block, pushdecl, getdecls, gettags, init_decl_processing,
8578         maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
8579         lvalue_or_else, print_lang_statistics, comp_target_types,
8580         unsigned_type, signed_type, signed_or_unsigned_type,
8581         build_function_call, mark_addressable, incomplete_type_error):
8582         Delete redundant declarations.
8583
8584 2001-04-11  Jason Merrill  <jason_merrill@redhat.com>
8585
8586         * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
8587         (TYPE_ANONYMOUS_P): New macro.
8588         (TAGGED_TYPE_P): New macro.
8589         * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
8590         (grokfndecl, grokvardecl, grokdeclarator): Likewise.
8591         * tree.c (no_linkage_helper): Likewise.
8592         * semantics.c (begin_class_definition): Likewise.
8593         * pt.c (convert_template_argument): Likewise.
8594         * lex.c (check_for_missing_semicolon): Likewise.
8595
8596 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
8597
8598         * class.c (dfs_unshared_virtual_bases): New function.
8599         (mark_primary_bases): Call it.
8600         (check_bases): Ignore virtual bases when determining
8601         nearly-emptiness.
8602
8603 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
8604
8605         * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
8606
8607 2001-04-11  Mark Mitchell  <mark@codesourcery.com>
8608
8609         * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
8610         cloned function to the clone.
8611
8612 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8613
8614         * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
8615
8616         * semantics.c: Include expr.h.
8617
8618 2001-04-11  Nathan Sidwell  <nathan@codesourcery.com>
8619
8620         * method.c (implicitly_declare_fn): Commonize code for copy ctor
8621         and assignment op. Set TREE_USED for parameter.
8622
8623 2001-04-10  Mark Mitchell  <mark@codesourcery.com>
8624
8625         * class.c (find_final_overrider_data): Add `candidates'.
8626         (dfs_find_final_overrider): Don't issue error messages
8627         prematurely.
8628         (find_final_overrider): Issue error messages here.
8629         (build_base_field): Don't warn about amgibuous direct bases here.
8630         (warn_about_ambiguous_direct_bases): New function.
8631         (layout_class_type): Use it.
8632
8633 2001-04-10  Richard Henderson  <rth@redhat.com>
8634
8635         * typeck.c (build_array_ref): Push the array reference inside
8636         COMPOUND_EXPR and COND_EXPR.
8637
8638 2001-04-05  Mark Mitchell  <mark@codesourcery.com>
8639
8640         * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
8641         * decl.c (duplicate_decls): Adjust accordingly.
8642         (maybe_commonize_var): Likewise.
8643         (grokfndecl): Likewise.
8644         (start_function): Likewise.
8645         (start_method): Likewise.
8646         * decl2.c (key_method): Likewise.
8647         (import_export_decl): Likewise.
8648         * method.c (implicitly_declare_fn): Likewise.
8649         * optimize.c (maybe_clone_body): Likewise.
8650
8651 2001-04-05  Benjamin Kosnik  <bkoz@redhat.com>
8652
8653         * lang-specs.h: Add __DEPRECATED.
8654
8655 Thu Apr  5 16:54:29 2001  J"orn Rennecke <amylaar@redhat.com>
8656
8657         * search.c (get_dynamic_cast_base_type): When building a new
8658         constant, set its type to ssizetype.
8659
8660 2001-04-04  Jakub Jelinek  <jakub@redhat.com>
8661
8662         * optimize.c (expand_call_inline): Only add newly inlined statements
8663         into inlined_stmts.
8664
8665 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
8666
8667         * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
8668         (OPERATOR_FORMAT): Likewise.
8669         (OPERATOR_TYPENAME_FORMAT): Likewise.
8670         * operators.def: Remove old name-mangling information.
8671         * decl.c (grok_op_properties): Adjust accordingly.
8672         * lex.c (init_operators): Likewise.
8673         * rtti.c (get_tinfo_decl): Issue error messages about types that
8674         have variable size.
8675
8676 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
8677
8678         * decl2.c (import_export_decl): Don't call import_export_class
8679         when processing an inline member function.
8680         * semantics.c (expand_body): Call import_export_decl before
8681         emitting inline functions.
8682
8683 2001-03-28  Richard Henderson  <rth@redhat.com>
8684
8685         IA-64 ABI Exception Handling:
8686         * cp-tree.def (EH_SPEC_BLOCK): New.
8687         (MUST_NOT_THROW_EXPR): New.
8688         * cp-tree.h: Update changed function declarations.
8689         (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
8690         (CPTI_CALL_UNEXPECTED): New.
8691         (struct cp_language_function): Rename x_eh_spec_try_block
8692         to x_eh_spec_block.
8693         (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
8694         * decl.c (current_binding_level): If no current function
8695         bindings, revert to scope_chain.
8696         (initialize_predefined_identifiers): Remove __cp_push_exception.
8697         (store_parm_decls): Use begin_eh_spec_block.
8698         (finish_function): Use finish_eh_spec_block.
8699         (mark_lang_function): Update for name changes.
8700         * decl2.c (finish_file): No mark_all_runtime_matches.
8701         * dump.c (cp_dump_tree): Handle new tree codes.
8702         * error.c (dump_expr) [BIND_EXPR]: Fix typo.
8703         * except.c (catch_language_init, catch_language): Remove.
8704         (init_exception_processing): Don't set language code.
8705         Initialize call_unexpected_node, protect_cleanup_actions,
8706         eh_personality_libfunc, lang_eh_runtime_type.
8707         (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
8708         (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
8709         (prepare_eh_type): Split out type canonicalizations ...
8710         (build_eh_type_type): ... from here.
8711         (build_eh_type_type_ref): Remove.
8712         (mark_all_runtime_matches): Remove.
8713         (build_exc_ptr): New.
8714         (do_begin_catch, do_end_catch): New.
8715         (do_pop_exception): Remove.
8716         (build_terminate_handler): Remove.
8717         (choose_personality_routine): Split out language choice from ...
8718         (initialize_handler_parm): ... here.
8719         Use MUST_NOT_THROW_EXPR.
8720         (expand_start_catch_block): Use do_begin_catch.  Simplify Java
8721         exception object handling.
8722         (expand_start_eh_spec, expand_end_eh_spec): Remove.
8723         (expand_exception_blocks, alloc_eh_object): Remove.
8724         (begin_eh_spec_block, finish_eh_spec_block): New.
8725         (do_allocate_exception, do_free_exception): New.
8726         (expand_throw): Merge into ...
8727         (build_throw): ... here.  Update for abi.
8728         * expr.c (cplus_expand_expr): No expand_internal_throw.
8729         Handle MUST_NOT_THROW_EXPR.
8730         * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
8731         * semantics.c (*) Update for except.h name changes.
8732         (genrtl_try_block): No protect_with_terminate.
8733         (genrtl_eh_spec_block): New.
8734         (genrtl_handler): Don't emit the goto here.
8735         (cp_expand_stmt): Handle EH_SPEC_BLOCK.
8736         (genrtl_finish_function): Don't expand_exception_blocks.
8737         * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
8738
8739 2001-03-28  Richard Henderson  <rth@redhat.com>
8740
8741         * decl.c (struct named_label_list): Rename eh_region to
8742         in_try_scope, add in_catch_scope.
8743         (struct binding_level): Rename eh_region to is_try_scope,
8744         add is_catch_scope.
8745         (note_level_for_try): Rename from note_level_for_eh.
8746         (note_level_for_catch): New.
8747         (poplevel): Copy both is_try_scope and is_catch_scope to
8748         the named_label_list struct.
8749         (check_previous_goto_1): Don't check for catch block via
8750         DECL_ARTIFICIAL; use in_try_scope instead.
8751         (check_goto): Likewise.
8752         * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
8753         * except.c (expand_start_catch_block): Call note_level_for_catch.
8754         * semantics.c (begin_compound_stmt): Update for note_level_for_try.
8755
8756 2001-03-27  Richard Henderson  <rth@redhat.com>
8757
8758         * except.c: Use USING_SJLJ_EXCEPTIONS instead of
8759         exceptions_via_longjmp.
8760
8761 2001-03-27  Phil Edwards  <pme@sources.redhat.com>
8762
8763         * pt.c (check_default_tmpl_args):  Make error messages clearer.
8764
8765 2001-03-26  Phil Edwards  <pme@sources.redhat.com>
8766
8767         * error.c:  Also undefine 'A' macro used for cp_printers definition.
8768
8769 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8770
8771         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
8772
8773 2001-03-26  Mike Yang <yang@research.att.com>
8774             Mark Mitchell  <mark@codesourcery.com>
8775
8776         * dump.c (dump_access): New function.
8777         (cp_dump_tree): Use it.  Dump basetype information for class
8778         types.
8779
8780 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
8781
8782         * Makefile.in (optimize.o): Depend on params.h.
8783         (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
8784         (init_decl_processing): Set flag_no_inline when doing
8785         inlining-on-trees.
8786         * optimize.c: Include params.h.
8787         (struct inline_data): Improve documentation of FNS.  Add
8788         FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
8789         (INSNS_PER_STMT): New macro.
8790         (remap_block): Use CLONING_P.
8791         (inlinable_function_p): Don't inline big functions.
8792         (expand_call_inline): Keep track of how much inlining we've done.
8793         (optimize_function): Set FIRST_INLINED_FN.
8794         (maybe_clone_body): Set CLONING_P.
8795         * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
8796         tree nodes.
8797         (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
8798         rest_of_compilation.  Clear DECL_RTL for local variables
8799         afterwards.
8800         (clear_decl_rtl): New function.
8801
8802 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>
8803
8804         Implement DR 209
8805         * cp-tree.h (skip_type_access_control,
8806         reset_type_access_control): Prototype.
8807         * decl.c (grokdeclarator): Access of friends is not checked.
8808         * parse.y (component_decl_list): Reset type access control.
8809         * semantics.c (decl_type_access_control): Clear
8810         current_type_lookups.
8811         (save_type_access_control): Don't save if not deferring.
8812         (skip_type_access_control, reset_type_access_control): New
8813         functions.
8814         (begin_class_definition): Do type access control for basetypes.
8815         Start deferred access control.
8816         (finish_class_definition): Resume immediate access control if
8817         this is a local class.
8818
8819 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8820
8821         * class.c (add_method): Use memcpy/memmove, not bcopy.
8822
8823         * decl.c (duplicate_decls): Likewise.
8824
8825 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
8826
8827         * mangle.c (write_discriminator): Use `_0' for discriminator 1,
8828         not `_'.
8829
8830 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
8831
8832         * decl.c (local_names): Define.
8833         (push_local_name): New.
8834         (grok_reference_init): Return init if initializing static reference
8835         variable with non-constant instead of emitting it.
8836         Move expand_static_init call to cp_finish_decl.
8837         (layout_var_decl): Call push_local_name.
8838         (maybe_commonize_var): Allow inlining functions even if they have
8839         static local variables, use comdat_linkage for them if flag_weak.
8840         (check_initializer): Call obscure_complex_init if
8841         grok_reference_init returned nonzero.
8842         (save_function_data): Clear x_local_names.
8843         (pop_cp_function_context): Free x_local_names.
8844         (mark_inlined_fns): Remove.
8845         (mark_lang_function): Mark x_local_names.
8846         (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
8847         Mark inlined_fns as tree, remove call to mark_inlined_fns.
8848         * class.c (alter_access): Ensure DECL_ACCESS is never set if
8849         DECL_DISCRIMINATOR_P.
8850         * cp-tree.h (cp_language_function): Add x_local_names.
8851         (lang_decl_flags): Add discriminator into u2.
8852         (lang_decl_inlined_fns): Remove.
8853         (lang_decl): inlined_fns is now a TREE_VEC.
8854         (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
8855         * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
8856         TREE_VEC, not a custom structure.
8857         (optimize_function): Likewise.
8858         * mangle.c (discriminator_for_local_entity): Discriminate among
8859         VAR_DECL local entities.
8860         * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
8861         is not valid.
8862
8863 2001-03-22  Bryce McKinlay  <bryce@albatross.co.nz>
8864
8865         Add support for Java interface method calls.
8866         * cp-tree.h (struct lang_type): Add java_interface flag.
8867         (TYPE_JAVA_INTERFACE): New macro.
8868         * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
8869         by setting TYPE_JAVA_INTERFACE.
8870         * call.c (java_iface_lookup_fn): New static.
8871         (build_over_call): If calling a method declared in a
8872         TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
8873         expression which resolves the function address.
8874         (build_java_interface_fn_ref): New function.
8875
8876 2001-03-22  Richard Henderson  <rth@redhat.com>
8877
8878         * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
8879         * except.c: Don't include it.
8880
8881 2001-03-22  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
8882             based on an idea from Joe Buck <jbuck@synopsys.com>
8883
8884         * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
8885         New nonterminals.
8886         (data_def, component_decl): Add reductions to bad_decl.
8887
8888 2001-03-22  Jakub Jelinek  <jakub@redhat.com>
8889
8890         * method.c (do_build_assign_ref): Don't use build_modify_expr for
8891         anonymous aggregates, since they don't have assignment operator
8892         method.
8893         * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
8894         assignment operators for anonymous structure fields.
8895
8896 2001-03-21  Jason Merrill  <jason@redhat.com>
8897
8898         * pt.c (instantiate_decl): Abort if we see a member constant
8899         instantiation that doesn't already have its initializer.
8900         Downgrade explicit instantiation without definition to pedwarn.
8901
8902         * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
8903         * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
8904         (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
8905
8906         * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
8907         (pending_vtables): Remove.
8908         * decl2.c (pending_vtables): Remove.
8909         (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
8910         CLASSTYPE_VTABLE_NEEDS_WRITING.
8911         (import_export_class): Likewise.
8912         (init_decl2): Don't mark pending_vtables.
8913         * lex.c (handle_pragma_vtable): Just sorry.
8914         * pt.c (instantiate_class_template): Don't mess with
8915         CLASSTYPE_VTABLE_NEEDS_WRITING.
8916         (mark_class_instantiated): Likewise.
8917         * ptree.c (print_lang_type): Don't print it.
8918         * semantics.c (begin_class_definition): Don't set it.
8919
8920         * pt.c (template_tail): Replace with last_pending_template.
8921         (maybe_templates, maybe_template_tail): Remove.
8922         (add_pending_template): Adjust.
8923         (instantiate_pending_templates): Adjust.
8924
8925         * cp-tree.h (struct saved_scope): Remove lang_stack field.
8926         (current_lang_stack): Remove.
8927         * decl.c (maybe_push_to_top_level): Don't initialize it.
8928         (duplicate_decls): Use current_lang_depth.
8929         (xref_basetypes): Likewise.
8930         * class.c (current_lang_depth): New fn.
8931         (push_lang_context): Use more varray functionality.
8932         (pop_lang_context): Likewise.
8933
8934         * error.c (GLOBAL_THING): Always use '__'.
8935
8936 2001-03-21  Mark Mitchell  <mark@codesourcery.com>
8937
8938         * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
8939
8940         * mangle.c (mangle_decl_string): Mangle the names of overloaded
8941         operators, even when they have `extern "C"' linkage.
8942
8943 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
8944
8945         * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
8946         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
8947         where it's not necessary.
8948         (add_method): Remove optimization involving comparison of
8949         DECL_ASSEMBLER_NAME.
8950         (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
8951         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
8952         where it's not necessary.
8953         (check_methods): Likewise.
8954         (build_clone): Likewise.
8955         (built_vtt): Likewise.
8956         * cp-tree.h (DECL_NEEDED_P): Likewise.
8957         * decl.c (pushtag): Likewise.
8958         (duplicate_decls): Likewise.
8959         (pushdecl): Likewise.
8960         (builtin_function): Likewise.
8961         (build_library_fn_1): Set DECL_LANGUAGE for library functions.
8962         (build_cp_library_fn): Likewise.
8963         (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
8964         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
8965         where it's not necessary.
8966         (make_rtl_for_nonlocal_decl): Likewise.
8967         (cp_finish_decl): Likewise.
8968         (grokfndecl): Likewise.
8969         (grokvardecl): Likewise.
8970         (grokdeclarator): Likewise.
8971         (start_function): Likewise.
8972         (cp_missing_return_ok_p): Likewise.
8973         * decl2.c (grokclassfn): Likewise.
8974         (check_classfn): Likewise.
8975         (finish_static_data_member_decl): Likewise.
8976         (grokfield): Likewise.
8977         * error.c (GLOBAL_IORD_P): Remove.
8978         (dump_global_iord): Improve output.
8979         (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
8980         * except.c (nothrow_libfn_p): Summarily reject any function not in
8981         namespace-scope.
8982         * init.c (build_java_class_ref): Don't explicitly set
8983         DECL_ASSEMBLER_NAME after calling mangle_decl.
8984         * mangle.c (mangle_decl_string): Handle extern "C" functions.
8985         (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
8986         * method.c (set_mangled_name_for_decl): Don't explicitly set
8987         DECL_ASSEMBLER_NAME after calling mangle_decl.
8988         (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
8989         IDENTIFIER_GLOBAL_VALUE for the thunk.
8990         * pt.c (set_mangled_name_for_template_decl): Remove.
8991         (check_explicit_specialization): Don't use it.
8992         (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
8993         (tsubst_friend_function): Likewise.
8994         (tsubst_decl): Likewise.
8995         (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
8996         * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
8997         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
8998         where it's not necessary.
8999         (tinfo_base_init): Likewise.
9000         (create_real_tinfo_var): Likewise.
9001         * search.c (looup_field_1): Likewise.
9002         * semantics.c (finish_named_return_value): Likewise.
9003         * tree.c (init_tree): Set lang_set_decl_assembler_name.
9004
9005 2001-03-15  Gabriel Dos Reis  <gdr@codesourcery.com>
9006
9007         Correct semantics restrictions checking in throw-expression.
9008         * except.c (is_admissible_throw_operand): New function.
9009         (build_throw): Use it.
9010
9011 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
9012
9013         * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
9014         and its ilk.
9015
9016 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
9017
9018         * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
9019         * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
9020         * decl.c (duplicate_decls): Likewise.
9021         (builtin_function): Likewise.
9022         (build_library_fn): Likewise.
9023         (build_cp_library_fn): Likewise.
9024         (check_initializer): Likewise.
9025         (cp_finish_decl): Likewise.
9026         * decl2.c (grokfield): Likewise.
9027         (grok_function_init): Remove #if 0'd code.
9028         (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
9029         * friend.c (do_friend): Likewise.
9030         * init.c (get_temp_regvar): Likewise.
9031         * method.c (make_thunk): Likewise.
9032         * pt.c (tsubst_friend_function): Likewise.
9033         (tsubst_decl): Likewise.
9034         (regenerate_decl_from_template): Likewise.
9035         * semantics.c (genrtl_named_return_value): Likewise.
9036         (expand_body): Likewise.
9037         (genrtl_finish_function): Likewise.
9038         * tree.c (cp_tree_equal): Likewise.
9039
9040 2001-03-12  Nathan Sidwell  <nathan@codesourcery.com>
9041
9042         * call.c (convert_like_real): Add extra semantics to INNER
9043         parameter. Don't convert to temporary if a user conversion
9044         gives us an lvalue that we're about to bind to a reference.
9045         Set INNER to indicate pending reference binding on recursive
9046         calls.
9047
9048 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
9049
9050         * cp/lex.c: Delete duplicate pending_lang_change.
9051
9052 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
9053
9054         * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
9055         Similarly.
9056         * cp/repo.c (get_base_filename, open_repo_file): Similarly.
9057         * cp/cp-tree.h: Remove file_name_nondirectory prototype.
9058
9059 2001-03-09  Zack Weinberg  <zackw@stanford.edu>
9060
9061         * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
9062
9063 2001-03-08  Stan Shebs  <shebs@apple.com>
9064
9065         * cp-tree.h (set_identifier_local_value): Remove unused decl.
9066
9067 2001-03-06  Zack Weinberg  <zackw@stanford.edu>
9068
9069         * spew.c: Remove references to CPP_OSTRING.
9070
9071 2001-03-06  Andrew Haley  <aph@redhat.com>
9072
9073         * typeck.c (convert_arguments): Check that we have an fndecl.
9074
9075 2001-03-05  Andrew Haley  <aph@redhat.com>
9076
9077         * typeck.c (convert_arguments): Don't do ellipsis conversion for
9078         __built_in_constant_p.
9079
9080 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
9081
9082         * typeck.c (build_static_cast): Allow enum to enum conversions
9083         as per DR 128.
9084
9085 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
9086
9087         * class.c (check_field_decls): Pointers to member do not a
9088         non-pod struct make, as per DR 148.
9089
9090 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
9091
9092         * call.c (joust): cp_pedwarn when using gnu extension concerning
9093         worst conversion sequences.
9094
9095 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
9096
9097         * decl.c: Replace all uses of 'boolean' with 'bool'.
9098
9099 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
9100
9101         * lang-specs.h: Add zero initializer for cpp_spec field to
9102         all array elements that need one.  Don't put an #ifdef inside
9103         the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
9104         use it.
9105
9106 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
9107
9108         Implement using decls inside template functions.
9109         * decl2.c (validate_nonmember_using_decl): Don't special case
9110         fake_std_node in the global namespace. Don't reject early when
9111         processing a template.
9112         (do_local_using_decl): Add to statement tree. Don't do further
9113         processing when building a template.
9114         * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
9115
9116 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
9117
9118         * decl2.c (do_nonmember_using_decl): Don't complain if we find
9119         same function. Do complain about ambiguating extern "C"
9120         declarations.
9121
9122 2001-02-28  Nathan Sidwell  <nathan@codesourcery.com>
9123
9124         Remove floating point and complex type template constant parms.
9125         * pt.c (convert_nontype_argument): Remove REAL_TYPE and
9126         COMPLEX_TYPE extensions.
9127         (invalid_nontype_parm_type_p): Likewise.
9128
9129 2001-02-27  Jeffrey Oldham  <oldham@codesourcery.com>
9130
9131         * except.c (call_eh_info): Revert "match_function"'s type.
9132
9133 2001-02-27  Nathan Sidwell  <nathan@codesourcery.com>
9134
9135         Fix ctor vtable vcall offsets.
9136         * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
9137         (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
9138         (get_matching_base): Remove.
9139         (get_original_base): New function.
9140         (build_vtbl_initializer): Initialize vid.rtti_binfo.
9141         Use a virtual thunk for a ctor vtable with an index
9142         (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
9143         primary base within a constructor vtable. Only set
9144         BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
9145         when primary base has been lost.
9146         * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
9147
9148 2001-02-26  Jeffrey Oldham  <oldham@codesourcery.com>
9149
9150         * call.c (joust): Ensure more_specialized()'s argument length
9151         parameter has correct value for constructors.
9152
9153 2001-02-26  Nathan Sidwell  <nathan@codesourcery.com>
9154
9155         * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
9156
9157         * decl.c (mark_inlined_fns): Prototype.
9158
9159 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
9160
9161         * spew.c (yylex): Correct handling of friends.
9162
9163 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
9164
9165         * mangle.c (write_encoding): Pass write_function_type the
9166         FUNCTION_DECL for the function being encoded.
9167         (write_function_type): Pass it along to write_bare_function_type.
9168         (write_bare_function_type): Pass it along to write_method_parms.
9169         (write_method_parms): Don't mangle the compiler-generated
9170         parameters to a constructor or destructor.
9171
9172 2001-02-22  Andreas Jaeger  <aj@suse.de>
9173
9174         * optimize.c: Include toplev.h for
9175         note_deferral_of_defined_inline_function prototype.
9176
9177 2001-02-22  Jakub Jelinek  <jakub@redhat.com>
9178
9179         * cp-tree.h (struct lang_decl_inlined_fns): New.
9180         (struct lang_decls): Add inlined_fns.
9181         (DECL_INLINED_FNS): New macro.
9182         * optimize.c (struct inline_data): Add inlined_fns.
9183         (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
9184         (inlinable_function_p): Likewise, fix typo in comment,
9185         function is not inlinable if it already inlined function currently
9186         being optimized.
9187         (expand_call_inline): Add fn to inlined_fns if necessary.
9188         (optimize_function): Initialize inlined_fns.
9189         Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
9190         * decl.c (mark_inlined_fns): New function.
9191         (lang_mark_tree): Call it.
9192
9193 2001-02-21  Jason Merrill  <jason@redhat.com>
9194
9195         * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
9196         (DECL_UNINLINABLE): Move to middle-end.
9197
9198         * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
9199         * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
9200         * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
9201         * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
9202         parms and outer BLOCK.  note_deferral_of_defined_inline_function.
9203
9204         * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
9205         second parm of op=.
9206
9207 2001-02-19  Mark Mitchell  <mark@codesourcery.com>
9208
9209         * decl2.c (set_decl_namespace): Allow explicit instantiations in
9210         any namespace.
9211
9212 2001-02-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9213
9214         * optimize.c (expand_call_inline): Don't walk subtrees of type
9215         nodes.
9216
9217 2001-02-18  Mark Mitchell  <mark@codesourcery.com>
9218
9219         * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
9220         for a destructor.
9221
9222 2001-02-18  Jason Merrill  <jason@redhat.com>
9223
9224         Do put the VTT parameter in DECL_ARGUMENTS.
9225         * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
9226         (current_vtt_parm): New macro.
9227         (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
9228         (DECL_HAS_VTT_PARM_P): New macro.
9229         (DECL_VTT_PARM): Remove.
9230         (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
9231         * decl.c (duplicate_decls): Only copy the operator code if
9232         appropriate.
9233         (start_function): Set current_vtt_parm.
9234         (lang_mark_tree): Don't mark vtt_parm.
9235         * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
9236         DECL_ARGUMENTS.  Set DECL_HAS_VTT_PARM_P.
9237         * class.c (build_clone): Maybe remove the VTT parm.
9238         * optimize.c (maybe_clone_body): Set up the VTT parm.
9239         * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
9240         * call.c (build_over_call): Just allow the VTT arg.
9241         * method.c (make_thunk): Don't set DECL_VTT_PARM.
9242         (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
9243         (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
9244         * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
9245         * error.c (dump_function_decl): Likewise.
9246         * call.c (build_user_type_conversion_1, convert_like_real): Abort
9247         if we try to call a constructor with in-charge or VTT parms.
9248         * method.c (skip_artificial_parms_for): New fn.
9249         * call.c (add_function_candidate, build_over_call): Call it.
9250         * call.c (build_new_method_call): Use current_vtt_parm.
9251         * init.c (expand_virtual_init): Likewise.
9252         * class.c (same_signature_p): No longer static.
9253         * cp-tree.h: Declare it.
9254         * search.c (look_for_overrides_r): Use it.
9255
9256 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
9257
9258         * cp-tree.h (new_abi_rtti_p): Remove.
9259         (name_mangling_version): Likewise.
9260         (flag_do_squangling): Likewise.
9261         * class.c (build_rtti_vtbl_entries): Remove old ABI support.
9262         * decl.c (grokfndecl): Likewise.
9263         * decl2.c (name_mangling_version): Remove.
9264         (flag_do_squangling): Likewise.
9265         (lang_f_options): Remove `squangle'.
9266         (unsupported_options): Add `squangle'.
9267         (cxx_decode_option): Issue a warning about uses of
9268         -fname-mangling-version.
9269         (finish_file): Remove old ABI support.
9270         * pt.c (check_explicit_specialization): Likewise.
9271         (tsubst_decl): Likewise.
9272         * rtti.c (init_rtti_processing): Likewise.
9273         (build_headof): Likewise.
9274         (get_tinfo_decl_dynamic): Likewise.
9275         (tinfo_from_decl): Likewise.
9276         (build_dynamic_cast_1): Likewise.
9277         (synthesize_tinfo_var): Likewise.
9278         * init.c (build_new): Allow enumeration types for the array-bounds
9279         in a direct-new-declarator.
9280
9281         * semantics.c (finish_typeof): Resolve OFFSET_REFs.
9282
9283         * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
9284         TREE_PROTECTED from the template being specialized.
9285
9286 2001-02-17  Jason Merrill  <jason@redhat.com>
9287
9288         * decl2.c (build_artificial_parm): Set TREE_READONLY.
9289
9290         * decl.c (bad_specifiers): Allow throw specs on things with
9291         pointer-to-function or -member-function type.
9292         * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
9293         a pmf.
9294
9295 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
9296
9297         * call.c (check_dtor_name): Handle template names correctly.
9298
9299 2001-02-16  Jason Merrill  <jason@redhat.com>
9300
9301         * cp-tree.h (DECL_USE_VTT_PARM): Remove.
9302         * decl2.c (maybe_retrofit_in_chrg): Don't create it.
9303         * optimize.c (maybe_clone_body): Don't substitute it.
9304         * call.c (build_new_method_call): Check in_chrg instead.
9305         * init.c (expand_virtual_init): Likewise.
9306
9307 2001-02-16  Gabriel Dos Reis  <gdr@codesourcery.com>
9308
9309         * decl.c (check_tag_decl): Make sure a typedef for an anonymous
9310         class-type introduces at least a type-name.
9311
9312 2001-02-16  Jakub Jelinek  <jakub@redhat.com>
9313
9314         * call.c (convert_like_real): Create a temporary for non-lvalue.
9315
9316 2001-02-16  Jeffrey Oldham  <oldham@codesourcery.com>
9317
9318         * cp-tree.h: Fix typos in comments.
9319
9320 2001-02-16  Jason Merrill  <jason@redhat.com>
9321
9322         * optimize.c (remap_block): If we're compiling a clone, pass the
9323         new block to insert_block.
9324
9325 2001-02-16  Mark Mitchell  <mark@codesourcery.com>
9326
9327         * semantics.c (finish_asm_stmt): Robustify.
9328
9329 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
9330
9331         * pt.c (push_template_decl_real): Don't remangle the name of a
9332         class template.
9333
9334 2001-02-15  Jim Meyering  <meyering@lucent.com>
9335
9336         * Make-lang.in (c++.install-common): Depend on installdirs.
9337         (c++.install-info): Likewise.
9338         (c++.install-man): Likewise.
9339
9340 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
9341
9342         * typeck2.c (build_m_component_ref): Robustify.
9343
9344 2001-02-15  Alexandre Oliva  <aoliva@redhat.com>
9345
9346         * friend.c (do_friend): Don't take the nested [template] class
9347         into account when deciding whether to warn about the friend
9348         function not referring to a template function.
9349
9350 2001-02-14  Jakub Jelinek  <jakub@redhat.com>
9351
9352         * typeck.c (build_unary_op): Clarify error message.
9353
9354 2001-02-08  Aldy Hernandez  <aldyh@redhat.com>
9355
9356         * parse.y (component_constructor_declarator): allow optional
9357         parentheses around constructor class name.
9358
9359 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
9360
9361         * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
9362         section.
9363         * init.c (emit_base_init): Remove incorrect comment about
9364         virtual bases.
9365         * method.c (make_thunk): Fix comment alignment.
9366
9367 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
9368
9369         Kill remnants of this is variable.
9370         * cp-tree.h (flag_this_is_variable): Remove.
9371         * decl2.c (flag_this_is_variable): Remove.
9372         * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
9373         (build_vbase_path): The path is non-static, even in a cdtor.
9374         (resolves_to_fixed_type_p): Add additional return value.
9375         * search.c (init_vbase_pointers): Adjust.
9376         * tree.c (lvalue_p_1): Adjust.
9377         * typeck.c (mark_addressable): Adjust.
9378
9379 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
9380
9381         * pt.c (unify): Don't check cv quals of array types.
9382
9383 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
9384
9385         * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
9386         check whether we already have the type.
9387
9388 2001-02-13  Mark Mitchell  <mark@codesourcery.com>
9389
9390         * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
9391         * call.c (build_op_delete_call): Simplify to remove duplicate
9392         code.
9393         * class.c (clone_function_decl): Don't build the deleting variant
9394         of a non-virtual destructor.
9395         * decl.c (finish_destructor_body): Don't call delete if this is a
9396         non-virtual destructor.
9397         * init.c (build_delete): Explicitly call `operator delete' when
9398         deleting an object with a non-virtual destructor.
9399
9400 2001-02-13  Jason Merrill  <jason@redhat.com>
9401
9402         * lang-specs.h: Add more __EXCEPTIONS.
9403
9404 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
9405
9406         * typeck2.c (process_init_constructor): Check
9407         TREE_HAS_CONSTRUCTOR before issuing missing init warning.
9408
9409 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
9410
9411         * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
9412         Remove spurious information in comment. Allow further
9413         adjustments of REFERENCE_TYPE args.
9414
9415 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
9416
9417         * errfn.c (cp_deprecated): Tweak diagnostic text.
9418         * parse.y (new_initializer): Deprecate initializer lists
9419         extension.
9420
9421 2001-02-12  Mark Mitchell  <mark@codesourcery.com>
9422
9423         Remove old ABI support.
9424
9425 2001-02-11  Mark Mitchell  <mark@codesourcery.com>
9426
9427         * decl2.c (flag_vtable_thunks): Always set it to 1.
9428         (flag_new_abi): Likewise.
9429         * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
9430
9431         * Makefile.in (g++spec.o): Fix typo.
9432
9433 2001-02-09  Jason Merrill  <jason@redhat.com>
9434
9435         * lang-specs.h: Restore definition of __EXCEPTIONS.
9436
9437 2001-02-08  Jason Merrill  <jason@redhat.com>
9438
9439         * search.c (shared_member_p): New function.
9440         (lookup_field_r): Use it.
9441         * cp-tree.h (SHARED_MEMBER_P): Remove.
9442
9443         * method.c (process_overload_item): Handle template-dependent array
9444         bounds.
9445         * pt.c (type_unification_real): If we end up with undeduced nontype
9446         parms, try again.
9447
9448         * decl.c (lookup_name_real): Tweak warning to refer to decls, not
9449         types.
9450
9451         * typeck2.c (friendly_abort): Don't say anything if we have
9452         earlier errors or sorries.
9453
9454         * decl.c (check_tag_decl): Notice attempts to redefine bool and
9455         wchar_t.  Ignore if in_system_header.
9456
9457         * decl.c (maybe_push_cleanup_level): New fn...
9458         (start_decl_1): ...split out from here.
9459         * cvt.c (build_up_reference): Use it.
9460         * cp-tree.h: Declare it.
9461
9462 2001-02-07  Mark Mitchell  <mark@codesourcery.com>
9463
9464         * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
9465         spec.
9466
9467 2001-02-06  Nathan Sidwell  <nathan@codesourcery.com>
9468
9469         * pt.c (lookup_template_class): Make sure it's a primary
9470         template or template_template_parm when called from the parser.
9471         (instantiate_template_class): Add assertion.
9472
9473 2001-02-05  Alexandre Oliva  <aoliva@redhat.com>
9474
9475         * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
9476         from error_mark_node.
9477
9478 2001-02-05  Nathan Sidwell  <nathan@codesourcery.com>
9479
9480         Fix specification and implementation bugs in V3 ABI
9481         construction vtables.
9482         * cp-tree.h (flag_dump_class_layout): New flag.
9483         (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
9484         (BINFO_LOST_PRIMARY_P): New flag.
9485         (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
9486         (BINFO_PRIMARY_MARKED_P): Rename to ...
9487         (BINFO_PRIMARY_P): ... here.
9488         (binfo_via_virtual): New prototype.
9489         * decl2.c (flag_dump_class_layout): New flag.
9490         (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
9491         use `=' as a file name separator.
9492         * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
9493         bases.
9494         (build_vtbl_address): If this is a virtual primary base, then
9495         get the vtbl of what it is ultimately primary for.
9496         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
9497         for BINFO_PRIMARY_P.
9498         (dfs_skip_nonprimary_vbases_markedp): Likewise.
9499         (get_shared_vbase_if_not_primary): Likewise.
9500         (dfs_get_pure_virtuals): Likewise.
9501         (expand_upcast_fixups): Likewise.
9502         (fixup_virtual_upcast_offsets): Likewise.
9503         (dfs_find_vbase_instance): Likewise.
9504         (find_vbase_instance): Likewise.
9505         (binfo_from_vbase): Adjust comment to reflect reality.
9506         (binfo_via_virtual): New function.
9507         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
9508         for binfo walking during VTT construction.
9509         (dfs_mark_primary_bases): Remove.
9510         (force_canonical_binfo_r): New function.
9511         (force_canonical_binfo): New function.
9512         (mark_primary_virtual_base): New function.
9513         (mark_primary_bases): Walk in inheritance graph order, use
9514         mark_primary_virtual_base.
9515         (determine_primary_base): Use some more intermediate variables.
9516         (dfs_find_final_overrider): Don't check for overriding along a
9517         virtual path.
9518         (dfs_modify_vtables): Walk into primary virtual bases too.
9519         (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
9520         (build_base_fields): Likewise.
9521         (dfs_set_offset_for_unshared_vbases): Likewise.
9522         (layout_virtual_bases): Likewise.
9523         (end_of_class): Likewise.
9524         (finish_struct_1): Call dump_class_hierarchy, if requested.
9525         (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
9526         (dump_class_hierarchy_r): Add stream parameter. Emit more information.
9527         (dump_class_hierarchy): Add file parameter. Append to file, if
9528         required.
9529         (finish_vtbls): Adjust accumulate_vtbl_inits call.
9530         Use canonical base for virtual bases.
9531         (build_vtt): Add more comments. Adjust build_vtt_inits call.
9532         (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
9533         Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
9534         VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
9535         virtual VTTs.
9536         (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
9537         from DATA.  We want virtual primary bases and all bases via virtual.
9538         Only set BINFO_VPTR_INDEX for top level. Look up from a primary
9539         virtual base when not a construction vtable.
9540         (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
9541         (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
9542         Use canonical bases when processing virtual bases.
9543         (accumulate_vtbl_inits): We're interested in any base via a
9544         virtual path.
9545         (dfs_accumulate_vtbl_inits): If this is a primary virtual base
9546         within a construction vtable, determine what is being overridden.
9547         (build_vtbl_initializer): Add more comments
9548         (add_vcall_offset_vtbl_entries_1): Adjust comment.
9549         (build_rtti_vtbl_entries): Check if the base has lost its
9550         primary.
9551
9552 2001-02-05  Mark Mitchell  <mark@codesourcery.com>
9553
9554         * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
9555
9556 Sun Feb  4 15:52:44 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9557
9558         * decl.c (pushdecl): Call abort instead of fatal.
9559         * except.c (decl_is_java_type): Call fatal_error instead of fatal.
9560         * init.c (build_new_1): Likewise.
9561         (build_java_class_ref): Call internal_error and fatal_error, not fatal.
9562         * decl.c (build_typename_type): hash_table_init now returns void.
9563         decl.c (init_decl_processing): Make an error non-fatal.
9564
9565 2001-02-04  Mark Mitchell  <mark@codesourcery.com>
9566
9567         * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
9568         Document.
9569         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
9570         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
9571         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
9572         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
9573         * decl.c (maybe_commonize_var): Use the new name-mangling where
9574         appropriate.
9575         * decl2.c (comdat_linkage): Enhance comments.  Make all
9576         compiler-generated things static, if COMDAT is not available.
9577         (get_tinfo_decl): Do not make typeinfo objects that belong in the
9578         library COMDAT.
9579         (tinfo_base_init): Use the correct mangled name for typeinfo
9580         strings, and push them into the global scope.
9581         (typeinfo_in_lib_p): New function.
9582         (synthesize_tinfo_var): Use it.
9583         (create_real_tinfo_var): Likewise.
9584
9585 2001-02-03  Jakub Jelinek  <jakub@redhat.com>
9586
9587         * decl.c (push_class_binding): Use context_for_name_lookup instead
9588         of CP_DECL_CONTEXT.
9589         * search.c (context_for_name_lookup): Remove static.  Check for NULL
9590         context in the loop.
9591         * cp-tree.h (context_for_name_lookup): Add prototype.
9592
9593 2001-02-02  Jakub Jelinek  <jakub@redhat.com>
9594
9595         * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
9596         * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
9597         Remove.
9598         * call.c (convert_class_to_reference, build_user_type_conversion_1,
9599         add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
9600
9601 2001-02-02  Mark Mitchell  <mark@codesourcery.com>
9602
9603         * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
9604         of macros used when compiling g++spec.c.
9605         * g++spec.c (lang_specific_driver): Link with the shared
9606         libgcc by default.
9607
9608 2001-01-29  Joseph S. Myers  <jsm28@cam.ac.uk>
9609
9610         * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
9611         make_reference_declarator, make_call_declarator), method.c
9612         (implicitly_declare_fn), parse.y (namespace_using_decl,
9613         notype_unqualified_id, expr_or_declarator, new_type_id,
9614         after_type_declarator, direct_after_type_declarator,
9615         notype_declarator, complex_notype_declarator,
9616         complex_direct_notype_declarator, qualified_id,
9617         notype_qualified_id, overqualified_id, direct_new_declarator,
9618         absdcl, direct_abstract_declarator, conversion_declarator), pt.c
9619         (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
9620         instead of build_parse_node.
9621
9622 2001-01-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9623
9624         * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
9625         (minus_one_node): Moved to top level gcc directory.  Renamed
9626         to integer_minus_one_node.
9627
9628         * init.c (init_init_processing): Don't set minus_one_node.
9629         (build_vec_init): Use integer_minus_one_node.
9630
9631         * rtti.c (get_tinfo_decl_dynamic): Likewise.
9632
9633 2001-01-28  Jakub Jelinek  <jakub@redhat.com>
9634
9635         * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
9636         identical and they would be replaced with constant, remove
9637         MODIFY_EXPR from the tree.
9638
9639 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9640
9641         * Make-lang.in: Remove all dependencies on defaults.h.
9642         * call.c: Don't include defaults.h.
9643         * decl.c: Likewise.
9644         * decl2.c: Likewise.
9645         * except.c: Likewise.
9646         * pt.c: Likewise.
9647         * rtti.c: Likewise.
9648         * tree.c: Likewise.
9649         * typeck.c: Likewise.
9650
9651 2001-01-25  Jakub Jelinek  <jakub@redhat.com>
9652
9653         * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
9654         operators even in "C" linkage.
9655         * method.c (set_mangled_name_for_decl): Likewise.
9656         * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
9657         overloaded operators in "C" linkage.
9658
9659 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
9660
9661         * pt.c (tsubst_decl): Remove IN_DECL parameter.
9662         (tsubst_arg_types): Check parameter is not void.
9663         (tsubst): Adjust tsubst_decl call.
9664
9665 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
9666
9667         * call.c (add_builtin_candidate): Quote std properly, from
9668         previous change.
9669
9670 2001-01-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9671
9672         * pt.c (check_explicit_specialization): Clone constructors and
9673         destructors.
9674
9675 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
9676
9677         * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
9678         indicates anything special about template depth. Make sure we
9679         only count the user visible template classes.
9680
9681 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
9682
9683         * call.c (build_conv): Typo in comment.
9684         (add_builtin_candidate): Add more explanation.
9685         Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
9686         Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
9687         when we have enumeral types.
9688         (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
9689         candidates for relops and eqops.
9690         (joust): Simplify control flow. Allow a non-template user
9691         function to hide a builtin.
9692
9693 2001-01-22  Nathan Sidwell  <nathan@codesourcery.com>
9694
9695         * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
9696         (more_specialized): Add deduction parameter.
9697         * call.c (joust): Adjust more_specialized call.
9698         * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
9699         UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
9700         (get_bindings_order): Remove.
9701         (get_bindings_real): Add DEDUCE parameter.
9702         (maybe_adjust_types_for_deduction): Return extra unify flags. Do
9703         REFERENCE_TYPE jig for DEDUCE_ORDER.
9704         (type_unification_real): Deal with DEDUCE_ORDER. Use result of
9705         maybe_adjust_types_for_deduction.
9706         (more_specialized): Add DEDUCE parameter. Call get_bindings_real
9707         directly.
9708         (try_one_overload): Use result of maybe_adjust_types_for_deduction.
9709         (check_cv_quals_for_unify): Use new unify qualifier flags.
9710         (unify): Clear new unify qualifier flags.
9711         (get_bindings_real): Add DEDUCE parameter.
9712         (get_bindings): Adjust call to get_bindings_real.
9713         (get_bindings_overload): Likewise.
9714         (most_specialized_instantiation): Adjust call to
9715         more_specialized.
9716
9717 2001-01-19  Jason Merrill  <jason@redhat.com>
9718
9719         * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
9720
9721         * decl.c (init_decl_processing): Just force -fvtable-thunks on if
9722         -fnew-abi.
9723
9724 2001-01-19  Ute Pelkmann  <scope.muc@t-online.de>
9725
9726         * decl2.c (arg_assoc_class): Fix double iteration logic.
9727
9728 2001-01-19  Jason Merrill  <jason@redhat.com>
9729
9730         * init.c (build_delete): Always call convert_force to strip cv-quals.
9731
9732         * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
9733         * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
9734         * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
9735
9736 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
9737
9738         * search.c (get_vbase_1): Count only virtual bases.
9739
9740 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
9741
9742         * class.c (duplicate_tag_error): Robustify flag clearing.
9743
9744 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
9745
9746         * cp-tree.h (lookup_template_class): Add complain parm.
9747         * decl.c (lookup_namespace_name): Adjust call to
9748         lookup_template_class.
9749         (make_typename_type): Likewise.
9750         * semantics.c (finish_template_type): Likewise.
9751         * pt.c (lookup_template_class): Add complain parm. Adjust.
9752         (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
9753         (tsubst): Likewise.
9754
9755 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
9756
9757         * pt.c (copy_default_args_to_explicit_spec): Preserve
9758         object's CV quals. Reorganize.
9759
9760 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
9761
9762         * typeck.c (build_modify_expr): Say `initialization' for
9763         INIT_EXPRs.
9764         * init.c (build_default_init): Convert to enumeral type, if
9765         needed.
9766
9767 2001-01-18  Jakub Jelinek  <jakub@redhat.com>
9768
9769         * parse.y (nomods_initdcl0): Properly set things up for
9770         initdcl0_innards.
9771
9772 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
9773
9774         * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
9775         (type_unification_real): Set it.
9776         (unify): Use it.
9777
9778 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
9779
9780         * decl.c (finish_destructor_body): Convert to vbase pointer here.
9781
9782 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
9783
9784         * semantics.c (begin_class_definition): Check we're not inside a
9785         template parm list.
9786
9787 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
9788
9789         * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
9790         BASELINK_P.
9791
9792 2001-01-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9793
9794         * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
9795         * call.c (build_over_call): Add comment.
9796
9797 2001-01-16 Daniel Berlin <dberlin@redhat.com>
9798
9799         * cvt.c (ocp_convert): Handle vector type conversion
9800         * typeck2.c (digest_init): Handle vector type initializations
9801
9802 2001-01-16  Phil Edwards  <pme@sources.redhat.com>
9803
9804         * g++spec.c:  Don't add libraries needlessly if -fsyntax-only
9805           was given.
9806
9807 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
9808
9809         * pt.c (check_nontype_parm): Rename to ...
9810         (invalid_nontype_parm_type_p): ... here.
9811         (process_template_parm): Adjust.
9812         (convert_template_argument): Adjust.
9813
9814 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
9815
9816         * pt.c (check_nontype_parm): New function.
9817         (process_template_parm): Use it.
9818         (convert_template_argument): Use it.
9819         (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
9820         member.
9821
9822 2001-01-14  Jeffrey Oldham  <oldham@codesourcery.com>
9823
9824         * tree.c: Add defaults.h
9825         (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
9826         * Make-lang.in (cp/tree.o): Add defaults.h.
9827
9828 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
9829
9830         * Make-lang.in (CXX_C_OBJS): Add c-format.o.
9831
9832 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
9833
9834         * g++.1: Change to be ".so man1/gcc.1".
9835
9836 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
9837
9838         * Make-lang.in (c++.info, c++.install-info): Build and install g++
9839         internals info.
9840         (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
9841         ($(srcdir)/cp/g++int.info): New target.
9842         * gxxint.texi: Add info directory entry.  Use @@ in email address.
9843         * .cvsignore: Update.
9844
9845 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
9846
9847         * typeck.c (build_c_cast): Do template processing earlier.
9848         Always pedwarn on array casts.
9849
9850 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
9851
9852         * friend.c (make_friend_class): Make sure a templated class is
9853         actually a template.
9854
9855 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
9856
9857         * decl2.c (get_guard): Set linkage from guarded decl.
9858
9859 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
9860
9861         * call.c (convert_default_arg): Check for unprocessed
9862         DEFAULT_ARG.
9863         * cp-tree.h (replace_defarg): Move to spew.c.
9864         (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
9865         spew.c, which is where they really are.
9866         (done_pending_defargs): Declare.
9867         (unprocessed_defarg_fn): Declare.
9868         * decl.c (replace_defarg): Move to spew.c
9869         * parse.y (structsp): Call done_pending_defargs.
9870         * spew.c (defarg_fns): Rearrange list structure.
9871         (defarg_fnsdone): New static variable.
9872         (defarg_depfns): New static variable.
9873         (init_spew): Adjust.
9874         (add_defarg_fn): Store the type in TREE_TYPE.
9875         (do_pending_defargs): Detect and deal with ordering constraints
9876         and circularity.
9877         (done_pending_defargs): New function.
9878         (unprocessed_defarg_fn): New function.
9879         (replace_defarg): Moved from decl.c. Robustify. Don't save
9880         if circularity detected.
9881
9882 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
9883
9884         * pt.c (unify): Check array has a domain, before checking
9885         whether it is variable sized.
9886
9887 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
9888
9889         * decl.c (grokparms): Unobfuscate and get correct diagnostic for
9890         parameters with pointers to arrays of unknown bound.
9891
9892 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
9893
9894         * parse.y (template_parm_header, template_spec_header): New
9895         reductions. Split out from ...
9896         (template_header): ... here. Use them.
9897         (template_template_parm): Use template_parm_header.
9898         * semantics.c (finish_template_template_parm): Add assert.
9899
9900 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
9901
9902         * mangle.c (write_builtin_type): Fix thinko.
9903
9904         * pt.c (copy_default_args_to_explicit_spec_1): New function.
9905         (copy_default_args_to_explicit_spec): Likewise.
9906         (check_explicit_specialization): Use it.
9907
9908         * class.c (finish_struct_1):  Remove last argument in call to
9909         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
9910         * decl.c (builtin_function): Likewise.
9911         (build_cp_library_fn): Likewise.
9912         (check_initializer): Likewise.
9913         (make_rtl_for_nonlocal_decl): Likewise.
9914         (cp_finish_decl): Likewise.
9915         (start_function): Likewise.
9916         * decl2.c (finish_anon_union): Likewise.
9917         * friend.c (do_friend): Likewise.
9918         * init.c (build_java_class_ref): Likewise.
9919         * method.c (make_thunk): Likewise.
9920         * pt.c (tsubst_friend_function): Likewise.
9921         * semantics.c (expand_body): Likewise.
9922
9923 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
9924
9925         * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
9926         looking at DECL_CLONED_FUNCTION for non-functions.
9927
9928 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
9929
9930         * error.c (dump_template_parameter): Use parm to determine how
9931         to print default value.
9932
9933 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
9934
9935         * class.c (duplicate_tag_error): Clear more flags.
9936
9937 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
9938
9939         * call.c (build_new_method_call): Use binfo_for_vbase.
9940
9941 2001-01-10  Joseph S. Myers  <jsm28@cam.ac.uk>
9942
9943         * cp-tree.h (flag_cond_mismatch): Don't declare.
9944         * decl2.c (flag_cond_mismatch): Don't define.
9945         (lang_f_options): Remove cond-mismatch.
9946         (unsupported_options): Add cond-mismatch.
9947
9948 2001-01-09  Nathan Sidwell  <nathan@codesourcery.com>
9949
9950         * class.c (handle_using_decl): Reject using of constructor name
9951         of sourcing class. Allow injecting of a method with same name as
9952         nested class. Fixup error messages.
9953
9954 2001-01-09  Joseph S. Myers  <jsm28@cam.ac.uk>
9955
9956         * decl2.c (lang_decode_option): Handle -Wformat=2.
9957
9958 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
9959
9960         * cp-tree.h (lang_decl_flags): Rename defined_in_class to
9961         initialized_in_class.
9962         (DECL_DEFINED_IN_CLASS_P): Rename to ...
9963         (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
9964         * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
9965         (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
9966         * pt.c (check_default_tmpl_args): Adjust for
9967         DECL_INITIALIZED_IN_CLASS_P.
9968         (instantiate_class_template): Likewise.
9969         (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
9970
9971         * class.c (finish_struct): Constify saved_filename.
9972
9973 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
9974
9975         * class.c (duplicate_tag_error): Adjust diagnostic.
9976         (finish_struct): Locally set location to start of struct.
9977         * decl.c (fixup_anonymous_aggr): Use cp_error_at.
9978
9979 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
9980
9981         * decl.c (struct binding_level): Adjust class_shadowed comments
9982         to reflect reality.
9983         (push_class_level_binding): Adjust comments to reflect reality.
9984         Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
9985         Don't set TREE_VALUE on the class_shadowed list.
9986
9987 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9988
9989         * decl2.c (acceptable_java_type): Allow references too.
9990         * init.c (build_java_class_ref): When using the new ABI, search
9991         `class$' and have it mangled with `mangle_decl.'
9992         * mangle.c (write_java_integer_type_codes): New function.
9993         (write_builtin_type): Detect and mangle Java integer and real
9994         types.
9995
9996 2001-01-07  Mark Mitchell  <mark@codesourcery.com>
9997
9998         * decl2.c (grokfield): Don't accept `asm' specifiers for
9999         non-static data members.
10000
10001 2001-01-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10002
10003         * expr.c (cplus_expand_expr): Don't reset `target'.
10004
10005 2001-01-07  Neil Booth  <neil@daikokuya.demon.co.uk>
10006
10007         * cp/decl2.c (cxx_post_options): Call cpp_post_options.
10008
10009 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
10010
10011         * parse.y (template_datadef): Check for error_mark_node.
10012
10013 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
10014
10015         * cp-tree.def (DEFAULT_ARG): Make `x' class.
10016
10017 2001-01-04  Joseph S. Myers  <jsm28@cam.ac.uk>
10018
10019         * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
10020         (record_builtin_type): Make non-static.
10021         (flag_short_double): Don't declare.
10022         (init_decl_processing): Remove the creation of many tree nodes now
10023         in c_common_nodes_and_builtins.
10024         (build_void_list_node): New function.
10025         * decl2.c (flag_short_double, flag_short_wchar): Don't define.
10026         * cp-tree.h (flag_short_wchar): Don't declare.
10027
10028 2001-01-04  Mark Mitchell  <mark@codesourcery.com>
10029
10030         * call.c (build_conv): Don't use build1 for USER_CONV.
10031         * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
10032
10033 2001-01-03  Joseph S. Myers  <jsm28@cam.ac.uk>
10034
10035         * lex.c (lang_init): Call c_common_lang_init.
10036
10037 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
10038
10039         * search.c (lookup_fnfields_here): Remove.
10040         (look_for_overrides_r): Use lookup_fnfields_1.
10041         Ignore functions from using declarations.
10042
10043 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
10044
10045         Implement exceptions specifiers for implicit member functions.
10046         * cp-tree.h (merge_exceptions_specifiers): Declare new function.
10047         * method.c (synthesize_exception_spec): New function.
10048         (locate_dtor, locate_ctor, locate_copy): New functions.
10049         (implicitly_declare_fn): Generate the exception spec too.
10050         * search.c (check_final_overrider): Check artificial functions
10051         too.
10052         * typeck2.c (merge_exception_specifiers): New function.
10053
10054 2001-01-03  Jason Merrill  <jason@redhat.com>
10055
10056         * init.c (build_default_init): New fn.
10057         (perform_member_init): Split out from here.
10058         (build_new_1): Use it.  Simplify initialization logic.
10059         (build_vec_init): Take an array, rather than a pointer and maxindex.
10060         Speed up simple initializations.  Don't clean up if we're assigning.
10061         * cp-tree.h: Adjust.
10062         * decl2.c (do_static_initialization): Remove TREE_VEC case.
10063         * parse.y (new_initializer): Return void_zero_node for ().
10064         * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
10065         * typeck2.c (digest_init): Only complain about user-written
10066         CONSTRUCTORs.
10067
10068 2000-12-22  Mike Stump  <mrs@wrs.com>
10069
10070         * decl2.c: (max_tinst_depth): Increase to 50.
10071
10072 2001-01-02  Mark Mitchell  <mark@codesourcery.com>
10073
10074         * class.c (invalidate_class_lookup_cache): Zero the
10075         previous_class_values.
10076         * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
10077         TREE_INT_CST_HIGH.
10078         (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
10079         * decl.c (free_bindings): New variable.
10080         (push_binding): Don't create a new binding if we have one on the
10081         free list.
10082         (pop_binding): Put old bindings on the free list.
10083         (init_decl_processing): Use size_int, not build_int_2.
10084         Register free_bindings as a GC root.
10085         (cp_make_fname_decl): Use size_int, not build_int_2.
10086         (push_inline_template_parms_recursive): Likewise.
10087         (end_template_parm_list): Likewise.
10088         (for_each_template_parm): Do not use walk_tree_without_duplicates.
10089         (tsubst_template_parms): Use size_int, not build_int_2.
10090         (tsubst): Likewise.
10091         * rtti.c (get_vmi_pseudo_type_info): Likewise.
10092
10093 2001-01-02  Richard Henderson  <rth@redhat.com>
10094
10095         * parse.y (asm): Set ASM_INPUT_P.
10096
10097 2001-01-02  Jason Merrill  <jason@redhat.com>
10098
10099         * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
10100         for v3 ABI.
10101
10102         * typeck.c (cp_truthvalue_conversion): New fn.
10103         * cvt.c (ocp_convert): Use it.
10104
10105         * cp-tree.h: Lose c-common.c decls.
10106
10107         * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
10108         * cvt.c (convert_to_void): Use type_unknown_p.
10109
10110         * typeck.c (strip_all_pointer_quals): Also strip quals from
10111         pointer-to-member types.
10112
10113         * Make-lang.in (cp/TAGS): Use --no-globals.  Ignore parse.c, and treat
10114         parse.y as C.
10115
10116         * call.c (build_new_method_call): Do evaluate the object parameter
10117         when accessing a static member.
10118         * typeck.c (build_component_ref): Likewise.
10119
10120 2001-01-02  Andreas Jaeger  <aj@suse.de>
10121
10122         * decl.c (cp_missing_noreturn_ok_p): New.
10123         (init_decl_processing): Set lang_missing_noreturn_ok_p.
10124
10125 2000-12-29  Jakub Jelinek  <jakub@redhat.com>
10126
10127         * decl.c (init_decl_processing): Fix sign of wchar_type_node.
10128
10129 2000-12-29  Mark Mitchell  <mark@codesourcery.com>
10130
10131         * class.c (pushclass): Remove #if 0'd code.
10132         * cp-tree.h (overload_template_name): Remove.
10133         * decl.c (store_bindings): Simplify.
10134         (pop_from_top_level): Likewise.
10135         * pt.c (overload_template_name): Remove.
10136         (instantiate_decl): Don't call push_to_top_level if it's not
10137         needed.
10138
10139 2000-12-28  Mark Mitchell  <mark@codesourcery.com>
10140
10141         * pt.c (register_local_specialization): Don't return a value.
10142         (lookup_template_class): Use move-to-front heuristic when looking
10143         up template instantiations.
10144         (instantiate_decl): Only push_to_top_level when we're actually
10145         going to instantiate the template.
10146
10147 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
10148
10149         * search.c (binfo_for_vtable): Return least derived class, not
10150         most.  Handle secondary vtables.
10151
10152 2000-12-22  Jason Merrill  <jason@redhat.com>
10153
10154         * pt.c (more_specialized): Don't optimize len==0.
10155         (fn_type_unification): If we're adding the return type, increase len.
10156
10157         * typeck.c (build_binary_op): Fix pmf comparison logic.
10158
10159         * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
10160         DECL_STATIC_FUNCTION_P.
10161
10162         * semantics.c (genrtl_finish_function): Don't try to jump to
10163         return_label unless it exists.
10164
10165         In partial ordering for a call, ignore parms for which we don't have
10166         a real argument.
10167         * call.c (joust): Pass len to more_specialized.
10168         (add_template_candidate_real): Strip 'this', pass len.
10169         * pt.c (more_specialized): Pass len down.  Lose explicit_args parm.
10170         (get_bindings_order): New fn.  Pass len down.
10171         (get_bindings_real): Strip 'this', pass len.
10172         (fn_type_unification): Likewise.
10173         (type_unification_real): Succeed after checking 'len' args.
10174         (most_specialized_instantiation): Lose explicit_args parm.
10175         * class.c (resolve_address_of_overloaded_function): Strip 'this',
10176         pass len.
10177
10178 2000-12-21  Jason Merrill  <jason@redhat.com>
10179
10180         * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
10181         DECL_TEMPLATE_RESULT.
10182
10183         * search.c (lookup_field_r): Call lookup_fnfields_1, not
10184         lookup_fnfields_here.
10185
10186         * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
10187
10188         * call.c (build_object_call): Also allow conversions that return
10189         reference to pointer to function.
10190         (add_conv_candidate): Handle totype being ref to ptr to fn.
10191         (build_field_call): Also allow members of type reference to function.
10192         Lose support for calling pointer to METHOD_TYPE fields.
10193
10194         * error.c (dump_expr): Handle *_CAST_EXPR.
10195
10196         * typeck2.c (build_scoped_ref): Always convert to the naming class.
10197
10198         * tree.c (break_out_cleanups): Lose.
10199         * cp-tree.h: Remove prototype.
10200         * typeck.c (build_component_ref): Don't break_out_cleanups.
10201         (build_compound_expr): Likewise.
10202         * semantics.c (finish_expr_stmt): Likewise.
10203
10204 2000-12-20  Richard Henderson  <rth@redhat.com>
10205
10206         * cp-tree.h: Update declarations.
10207         * decl.c (finish_case_label): Return the new stmt node.
10208         * semantics.c (finish_goto_stmt): Likewise.
10209         (finish_expr_stmt, finish_return_stmt): Likewise.
10210         (finish_break_stmt, finish_continue_stmt): Likewise.
10211         (finish_asm_stmt): Likewise.
10212         * parse.y (already_scoped_stmt): Set STMT_LINENO.
10213         (compstmt, implicitly_scoped_stmt, stmt): Likewise.
10214         (simple_if, simple_stmt): Return the new stmt node.
10215         (save_lineno): New.
10216
10217 2000-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
10218
10219         * cp-tree.h: Don't declare warn_long_long.
10220
10221 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10222
10223         * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
10224         IS_AGGR_TYPE.
10225
10226 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10227
10228         * pt.c (unify): Handle when both ARG and PARM are
10229         BOUND_TEMPLATE_TEMPLATE_PARM.
10230
10231 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10232
10233         * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
10234         DECL_TEMPLATE_PARM_P.
10235
10236 2000-12-15  Jason Merrill  <jason@redhat.com>
10237
10238         * init.c (build_new_1): Reorganize.  Now with 100% fewer SAVE_EXPRs!
10239
10240         * init.c (build_new_1): Don't strip quals from type.
10241
10242         * decl.c (pushdecl): Don't check for linkage on a non-decl.
10243
10244         * call.c (build_op_delete_call): See through ARRAY_TYPEs.
10245
10246         * call.c (build_new_function_call): Lose space before paren in
10247         error message.
10248         (build_new_method_call): Likewise.
10249
10250         * typeck2.c (build_m_component_ref): Propagate quals from datum.
10251
10252 2000-12-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10253
10254         * pt.c (check_explicit_specialization): Propagate default
10255         function arguments to explicit specializations.
10256
10257 2000-12-13  DJ Delorie  <dj@redhat.com>
10258
10259         * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
10260         and <? operators.
10261
10262 2000-12-08  Jason Merrill  <jason@redhat.com>
10263
10264         * error.c (dump_function_name): Don't let the user see __comp_ctor.
10265
10266         Clean up copy-initialization in overloading code.
10267         * call.c (build_user_type_conversion_1): Die if we are asked to
10268         convert to the same or a base type.
10269         (implicit_conversion): Avoid doing so.  Lose reference binding code.
10270         (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
10271         direct-initialization.  Also do direct-init part of copy-init.
10272         (build_user_type_conversion): Don't provide context to convert_like.
10273         * cvt.c (ocp_convert): build_user_type_conversion will now provide
10274         the constructor call for copy-init.
10275
10276         * pt.c (tsubst_decl): Call clone_function_decl here if this is an
10277         instantiation of a member template.
10278         (do_decl_instantiation): Not here.
10279
10280 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
10281
10282         * class.c (check_field_decls): Don't special case anonymous
10283         fields in error messages.
10284         (note_name_declared_in_class): Use %D on diagnostic.
10285
10286         * tree.c (pod_type_p): Use strip_array_types.
10287         (cp_valid_lang_attribute): Likewise.
10288         * typeck.c (cp_type_quals): Strip arrays separately, to avoid
10289         multiple evaluations.
10290         (cp_has_mutable_p): Use strip_array_types.
10291
10292 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
10293
10294         * cp-tree.h (sufficient_parms_p): Declare new function.
10295         * call.c (sufficient_parms_p): New function, broken out of ...
10296         (add_function_candidate): ... here. Use it.
10297         (add_conv_candidate): Use it.
10298         * decl.c (grok_ctor_properties): Use it.
10299
10300 2000-12-07  Jakub Jelinek  <jakub@redhat.com>
10301
10302         * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
10303
10304 2000-12-07  Joseph S. Myers  <jsm28@cam.ac.uk>
10305
10306         * decl2.c (lang_decode_option): Handle -Wformat-security.
10307
10308 2000-12-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10309
10310         * pt.c (verify_class_unification): New function.
10311         (get_class_bindings): Use it.
10312         (try_class_unification): Tidy.
10313         (unify): Handle when argument of a template-id is not
10314         template parameter dependent.
10315         (template_args_equal): Handle when TREE_CODE's do not match.
10316
10317 2000-12-06  Alexandre Oliva  <aoliva@redhat.com>
10318
10319         * lang-specs.h (c++): When invoking the stand-alone preprocessor
10320         for -save-temps, pass all relevant -Defines to it, and then don't
10321         pass them to cc1plus.
10322
10323 2000-12-05  Will Cohen  <wcohen@redhat.com>
10324
10325         * decl.c (finish_case_label): Cleared
10326         more_cleanups_ok in surrounding function scopes.
10327         (define_label): Likewise.
10328
10329 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
10330
10331         * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
10332         (get_matching_virtual): Remove.
10333         (look_for_overrides): Declare new function.
10334         * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
10335         DECL_VINDEX here.
10336         * class.c (check_for_override): Move base class iteration code
10337         to look_for_overrides.
10338         * search.c (next_baselink): Remove.
10339         (get_virtuals_named_this): Remove.
10340         (get_virtual_destructor): Remove.
10341         (tree_has_any_destructors_p): Remove.
10342         (struct gvnt_info): Remove.
10343         (check_final_overrider): Remove `virtual' from error messages.
10344         (get_matching_virtuals): Remove. Move functionality to ...
10345         (look_for_overrides): ... here, and ...
10346         (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
10347         to be overriding.
10348
10349 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
10350
10351         * typeck.c (get_delta_difference): If via a virtual base,
10352         return zero.
10353         * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
10354         adjustment.
10355
10356 2000-12-04  Richard Henderson  <rth@redhat.com>
10357
10358         * error.c (dump_tree): Use output_add_string not OB_PUTS.
10359
10360 2000-12-04  Jason Merrill  <jason@redhat.com>
10361
10362         * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
10363         (write_builtin_type): Pass intSI_type_node and the like through
10364         type_for_mode.
10365         * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
10366         Pass intSI_type_node and the like through type_for_mode.
10367         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
10368         * pt.c (tsubst, unify): Likewise.
10369         * tree.c (walk_tree): Likewise.
10370         * error.c (dump_type): Likewise.
10371         (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
10372
10373         * Make-lang.in: Tweak top comment for emacs.
10374         (cp/TAGS): Restore.
10375
10376         * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
10377
10378         * class.c (clone_function_decl): Robustify.
10379
10380 2000-12-04  Michael Matz  <matzmich@cs.tu-berlin.de>
10381
10382         * decl.c (store_bindings): Only search in the non modified
10383         old_bindings for duplicates.
10384
10385 2000-12-04  Nathan Sidwell  <nathan@codesourcery.com>
10386
10387         * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
10388         TYPE_POLYMORPHIC_P.
10389
10390         * typeck.c (build_static_cast): Remove unused variable.
10391
10392 2000-12-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10393
10394         * pt.c: Fix typo in comment.
10395
10396 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
10397
10398         * decl2.c (warn_format): Remove definition.
10399         (lang_decode_option): Handle -Wformat-nonliteral,
10400         -Wno-format-extra-args and -Wno-format-y2k.  Use set_Wformat.
10401
10402 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
10403
10404         * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
10405         (init_decl_processing): Don't create string_type_node,
10406         const_string_type_node, wint_type_node, intmax_type_node,
10407         uintmax_type_node, default_function_type, ptrdiff_type_node and
10408         unsigned_ptrdiff_type_node.  Adjust position of call to
10409         c_common_nodes_and_builtins.
10410         (identifier_global_value): New function.
10411
10412 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>
10413
10414         * call.c (standard_conversion): Reject pointer to member
10415         conversions from ambiguous, inaccessible or virtual bases.
10416         * typeck.c (build_static_cast): Don't check pointers to members
10417         specially.
10418
10419 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
10420
10421         * method.c (do_build_copy_constructor): Preserve cv
10422         qualifications when accessing source object members.
10423         (do_build_assign_ref): Likewise. Remove separate diagnostics for
10424         unnamed fields.
10425
10426 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
10427
10428         * method.c (do_build_assign_ref): Construct appropriately
10429         CV-qualified base reference. Don't allow const casts in base
10430         conversion.
10431
10432 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
10433
10434         * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
10435         incomplete return type.
10436
10437 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
10438
10439         * parse.y (base_class.1): Produce a _TYPE not a _DECL.
10440         * semantics.c (finish_base_specifier): Accept a _TYPE not a
10441         _DECL.
10442
10443 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
10444
10445         * spew.c (yyerror): Cope if yylval.ttype is NULL.
10446
10447 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
10448
10449         * decl.c (grokdeclarator): Diagnose undefined template contexts.
10450
10451 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
10452
10453         * decl.c (grokdeclarator): Do type access control on friend
10454         class.
10455
10456 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
10457
10458         * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
10459         bison parser ickiness.
10460         * pt.c (tsubst_friend_function): Enter namespace scope when
10461         tsubsting the function name.
10462         * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
10463
10464 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
10465
10466         * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
10467         * cvt.c (cp_convert_to_pointer): Add force parameter.
10468         Allow conversions via virtual base if forced.
10469         (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
10470         (ocp_convert): Likewise.
10471         * search.c (binfo_from_vbase): Return the virtual base's binfo.
10472         * typeck.c (get_delta_difference): Adjust handling of virtual
10473         bases.
10474
10475 2000-11-26  Mark Mitchell  <mark@codesourcery.com>
10476
10477         * tree.c (struct list_hash): Remove.
10478         (list_hash_table): Make it be an htab.
10479         (struct list_proxy): New type.
10480         (list_hash_eq): New function.
10481         (list_hash_pieces): Renamed from ...
10482         (list_hash): ... this.
10483         (list_hash_lookup): Remove.
10484         (list_hash_add): Remove.
10485         (hash_tree_cons): Use the generic hashtable.
10486         (mark_list_hash): Remove.
10487         (init_tree): Create the hashtable.
10488
10489 2000-11-25  Joseph S. Myers  <jsm28@cam.ac.uk>
10490
10491         * method.c (build_mangled_C9x_name): Rename to
10492         build_mangled_C99_name.  Change C9X references in comments to
10493         refer to C99.
10494
10495 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
10496
10497         * parse.y (unary_expr): Move VA_ARG from here ...
10498         (primary): ... to here.
10499
10500 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
10501
10502         * semantics.c (finish_id_expr): If type is error_mark, return
10503         error_mark.
10504
10505 2000-11-23  Nathan Sidwell  <nathan@codesourcery.com>
10506
10507         * pt.c (lookup_template_class): Simplify loop exit constructs.
10508         Cope when there is no partial instantiation of a template
10509         template member.
10510
10511 Thu Nov 23 02:16:47 2000  J"orn Rennecke <amylaar@redhat.com>
10512
10513         * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
10514
10515 2000-11-22  Mark Mitchell  <mark@codesourcery.com>
10516
10517         * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
10518         prefix.
10519
10520         * pt.c (do_decl_instantiate): Explicitly clone constructors and
10521         destructors that haven't already been cloned.
10522
10523 2000-11-20  Richard Henderson  <rth@redhat.com>
10524
10525         * parse.y (yyparse_1): Rename the parser entry point.
10526
10527 2000-11-20  Alex Samuel  <samuel@codesourcery.com>
10528
10529         * mangle.c (write_name): Use <unscoped-name> for names directly in
10530         function scope.
10531         (write_unscoped_name): Accept names directly in function scope.
10532
10533 2000-11-20  Nathan Sidwell  <nathan@codesourcery.com>
10534
10535         * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
10536         * parse.y (extdef): Add EXPORT reduction.
10537         * spew.c (yylex): Don't skip export here.
10538
10539 2000-11-19  Mark Mitchell  <mark@codesourcery.com>
10540
10541         * decl.c (init_decl_processing): Correct name of pure virtual
10542         function under the new ABI.
10543         * rtti.c (throw_bad_cast): Likewise, for bad cast function.
10544         (throw_bad_typeid): Likewise for bad typeid function.
10545
10546 2000-11-18  Mark Mitchell  <mark@codesourcery.com>
10547
10548         * decl.c (grokparms): Don't even function types of `void' type,
10549         either.
10550         * mangle.c (write_type): Don't crash when confronted with the
10551         error_mark_node.
10552
10553         * decl.c (grokparms): Don't create parameters of `void' type.
10554
10555 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
10556
10557         * lex.c (mark_impl_file_chain): Delete.
10558         (init_parse): Remove call to ggc_add_string_root.  No need to
10559         ggc_strdup a string constant.  Do not add impl_file_chain to GC
10560         roots.
10561         (handle_pragma_implementation): No need to ggc_strdup main_filename.
10562
10563 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
10564
10565         * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
10566
10567 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
10568
10569         * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
10570         * decl.c (grokdeclarator): Don't reject void parms here.
10571         (require_complete_types_for_parms): Simplify, use
10572         complete_type_or_else.
10573         (grokparms): Remove bitrot. Remove funcdef parm.
10574         Deal with ellipsis parm lists here.
10575         * semantics.c (finish_parmlist): Don't append void_list_node
10576         here. Set PARMLIST_ELLIPSIS_P.
10577
10578 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
10579
10580         * typeck2.c (incomplete_type_error): Reorganize to avoid
10581         excessive diagnostics.
10582
10583 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
10584
10585         * lex.c (struct impl_files, internal_filename): Constify a char *.
10586
10587 2000-11-16  Mark Mitchell  <mark@codesourcery.com>
10588
10589         * mangle.c (write_special_name_constructor): Don't generate
10590         assembler junk when confronted with an old-style constructor.
10591         (write_special_name_destructor): Likewise.
10592         (mangle_decl_string): Do it here instead.
10593
10594 2000-11-16  Nathan Sidwell  <nathan@codesourcery.com>
10595
10596         * call.c (op_error): Make error messages clearer.
10597
10598 2000-11-15  Mark Mitchell  <mark@codesourcery.com>
10599
10600         * decl.c (wrapup_globals_for_namespace): Don't mark things
10601         TREE_ASM_WRITTEN when they're not.
10602
10603 2000-11-15  Jason Merrill  <jason@redhat.com>
10604
10605         * typeck2.c (friendly_abort): Uncount the error before handing
10606         off to fancy_abort.
10607
10608 2000-11-15  Nathan Sidwell  <nathan@codesourcery.com>
10609
10610         * typeck.c (lookup_anon_field): Cope with qv qualifiers.
10611
10612 2000-11-14  Mark Mitchell  <mark@codesourcery.com>
10613
10614         * class.c (build_vtbl_initializer): Fix typo in comment.
10615         * typeck.c (expr_sizeof): Don't crash on errors.
10616
10617 2000-11-14  Jim Wilson  <wilson@redhat.com>
10618
10619         * lang-specs.h: Add %2 after %(cc1_options).
10620
10621 2000-11-14  Richard Henderson  <rth@redhat.com>
10622
10623         * typeck.c (c_sizeof): Be strict about casting result value
10624         back to c_size_type_node.
10625         (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
10626
10627 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
10628
10629         * typeck.c (build_unary_op): Use boolean_increment from
10630         c-common.c, moving the relevant code there.
10631
10632 2000-11-11  Jason Merrill  <jason@redhat.com>
10633
10634         * typeck.c (mark_addressable): Don't call put_var_into_stack.
10635
10636         * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
10637         in inlines.
10638
10639 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10640
10641         * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
10642         * lex.c (copy_lang_decl): Likewise.
10643
10644 2000-11-09  Mark Mitchell  <mark@codesourcery.com>
10645
10646         * dump.c (cp_dump_tree): Don't dump function bodies here.
10647
10648         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
10649         (dump.o): Update dependency list.
10650         * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
10651         (flag_dump_translation_unit): Likewise.
10652         (CP_TYPE_QUALS): Adjust definition.
10653         (DECL_C_BIT_FIELD): Remove.
10654         (SET_DECL_C_BIT_FIELD): Likewise.
10655         (CLEAR_DECL_C_BIT_FIELD): Likewise.
10656         (add_maybe_template): Likewise.
10657         (strip_array_types): Likewise.
10658         (dump_node_to_file): Likewise.
10659         (cp_dump_tree): New function.
10660         * decl.c (init_decl_processing): Set lang_dump_tree.
10661         * decl2.c (flag_dump_translation_unit): Remove.
10662         * dump.c: Move most of it to ../c-dump.c.
10663         (cp_dump_tree): New function.
10664         * pt.c (add_maybe_template): Remove.
10665         * typeck.c (strip_array_types): Likewise.
10666
10667 2000-11-07  Eric Christopher  <echristo@redhat.com>
10668
10669         * decl.c (init_decl_processing): Change definition of
10670         __wchar_t to wchar_t.  Remove artificial declaration of
10671         wchar_t.
10672         * lex.c: Change instances of __wchar_t to wchar_t.
10673
10674 2000-11-09  Nathan Sidwell  <nathan@codesourcery.com>
10675
10676         * lex.c (do_identifier): Don't lookup_name for operators.
10677         * parse.y (operator): Save looking_for_typename.
10678         (unoperator): Restore it.
10679         * spew.c (frob_opname): Use nth_token for lookahead.
10680
10681 2000-11-08  Nathan Sidwell  <nathan@codesourcery.com>
10682
10683         * decl.c (grok_op_properties): Always use coerce_new_type and
10684         coerce_delete_type.
10685         * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
10686         exception specification. Tidy up.
10687         (coerce_delete_type): Preserve exception specification. Tidy up.
10688
10689 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
10690
10691         * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
10692         (push_binding_level), error.c (cp_tree_printer), pt.c
10693         (process_partial_specialization, tsubst_template_arg_vector),
10694         search.c (lookup_member): Use memset () instead of bzero ().
10695
10696 2000-11-07  Nathan Sidwell  <nathan@codesourcery.com>
10697
10698         * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
10699
10700 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
10701
10702         * Make-lang.in (c++.distdir): Remove.
10703
10704 2000-11-04  Mark Mitchell  <mark@codesourcery.com>
10705
10706         * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
10707         declarations from different namespaces to be combined.
10708
10709 2000-11-03  Zack Weinberg  <zack@wolery.stanford.edu>
10710
10711         * decl.c: Include tm_p.h.
10712
10713 2000-11-03  Joseph S. Myers  <jsm28@cam.ac.uk>
10714
10715         * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
10716
10717 2000-11-02  Joseph S. Myers  <jsm28@cam.ac.uk>
10718
10719         * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
10720         (build_overload_value), repo.c (open_repo_file), xref.c
10721         (open_xref_file): Use strchr () and strrchr () instead of index ()
10722         and rindex ().
10723
10724 2000-11-01  Bernd Schmidt  <bernds@redhat.co.uk>
10725
10726         * call.c (build_over_call): Call fold on the CALL_EXPR.
10727
10728 2000-11-01  Gabriel Dos Reis  <gdr@codesourcery.com>
10729
10730         * error.c (dump_template_decl): Separate template hearders with
10731         space not comma.
10732
10733 2000-10-31  Gabriel Dos Reis  <gdr@codesourcery.com>
10734
10735         * error.c: Move TFF_ macros into cp-tree.h.  Throughout, replace
10736         TS_* flags with corresponding TFF_*.  Adjust prototypes of
10737         functions (which used to take a tree_string_flags) to take an int.
10738
10739         * cp-tree.h (enum tree_string_flags): Remove
10740         (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
10741         TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
10742         TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
10743         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
10744         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
10745         TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
10746         (type_as_string, decl_as_string, expr_as_string,
10747         context_as_string): Adjust prototype.
10748
10749         * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
10750         instead of TS_PLAIN.
10751
10752         * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
10753         instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
10754         plain `0'.
10755
10756 2000-10-30  Mark Mitchell  <mark@codesourcery.com>
10757
10758         * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
10759         (linkage_kind): New enumeration.
10760         (decl_linkage): New function.
10761         * decl2.c (comdat_linkage): Extend comment.
10762         * error.c (dump_function_decl): Print the arguments used to
10763         instantiate a template, even when not printing the type of the
10764         function.
10765         * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
10766         not TREE_PUBLIC, to test for external linkage.
10767         * tree.c (decl_linkage): New function.
10768
10769 2000-10-28  Mark Mitchell  <mark@codesourcery.com>
10770
10771         * pt.c (instantiate_decl): Always instantiate static data members
10772         initialized in-class.
10773
10774 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
10775
10776         * Make-lang.in: Move all build rules here from Makefile.in,
10777         adapt to new context.  Wrap all rules that change the current
10778         directory in parentheses.  Expunge all references to $(P).
10779         When one command depends on another and they're run all at
10780         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
10781         all object-file generation rules.  Delete obsolete variables.
10782
10783         * Makefile.in: Delete.
10784         * config-lang.in: Delete outputs= line.
10785
10786 2000-10-26  Gabriel Dos Reis  <gdr@codesourcery.com>
10787
10788         * error.c (dump_function_decl): Print no space between
10789         `ptr-operator' the `type-specifier' of the return type.
10790         (dump_type_prefix): Make sure we put space at the appropriate
10791         place.
10792
10793 2000-10-23  Jason Merrill  <jason@redhat.com>
10794
10795         * call.c (equal_functions): Also call decls_match for extern "C" fns.
10796
10797 2000-10-22  Jason Merrill  <jason@redhat.com>
10798
10799         * call.c (build_conditional_expr): Use ocp_convert to force
10800         rvalue conversion.
10801
10802 2000-10-22  Mark Mitchell  <mark@codesourcery.com>
10803
10804         * call.c (standard_conversion): Use RVALUE_CONVs for all
10805         expressions that satisfy lvalue_p, not just those that satisfy
10806         real_lvalue_p.
10807
10808         * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
10809
10810         * typeck.c (c_sizeof): Return an expression of `size_t' type,
10811         not one with TYPE_IS_SIZETYPE set.
10812         (dubious_conversion_warnings): Remove special-case code.
10813
10814 2000-10-21  Geoffrey Keating  <geoffk@cygnus.com>
10815
10816         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
10817         * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
10818         (dump_type_prefix): Print vector-of-int as 'int vector'.
10819         (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
10820         * tree.c (walk_tree): Handle VECTOR_TYPE.
10821
10822         * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
10823
10824 2000-10-21  Jason Merrill  <jason@redhat.com>
10825
10826         * parse.y (operator): Set got_object from got_scope.
10827         Set looking_for_typename.
10828         * decl.c (lookup_name_real): Clear val after setting from_obj.
10829         Reorganize diagnostic.
10830
10831 2000-10-20  Jason Merrill  <jason@redhat.com>
10832
10833         * tree.c (walk_tree): Don't walk into default args.
10834
10835         * error.c (dump_expr): Use host_integerp.
10836
10837 2000-10-20  David Edelsohn  <edelsohn@gnu.org>
10838
10839         * typeck2.c (abstract_virtuals_error): Use "because" instead of
10840         "since" in error message.
10841
10842 Fri Oct 20 13:54:59 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10843
10844         * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
10845
10846 2000-10-20  Jeffrey Oldham  <oldham@codesourcery.com>
10847
10848         * decl.c (revert_static_member_fn): Fixed typo.
10849
10850 2000-10-19  Mark Mitchell  <mark@codesourcery.com>
10851
10852         * class.c (subobject_offset_fn): New type.
10853         (dfs_record_base_offsets): Remove.
10854         (record_base_offsets): Likewise.
10855         (dfs_search_base_offsets): Likewise.
10856         (record_subobject_offset): New function.
10857         (check_subobject_offset): Likewise.
10858         (walk_subobject_offsets): Likewise.
10859         (record_subobject_offsets): Likewise.
10860         (layout_conflict_p): Reimplement.
10861         (layout_nonempty_base_or_field): Correct handling of type
10862         conflicts during layout.
10863         (layout_empty_base): Likewise.
10864         (build_base_field): Adjust to handle new representation of empty
10865         base offset table.
10866         (build_base_fields): Likewise.
10867         (layout_virtual_bases): Likewise.
10868         (splay_tree_compare_integer_csts): New function.
10869         (layout_class_type): Use a splay_tree, rather than a varray, to
10870         represent the offsets of empty bases.
10871
10872         * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
10873         * decl.c (select_decl): Don't return declarations that are
10874         DECL_ANTICIPATED.
10875
10876 2000-10-18  Mark Mitchell  <mark@codesourcery.com>
10877
10878         * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
10879         (fake_std_node): New macro.
10880         * decl.c (in_std): Rename to ...
10881         (in_fake_std): ... this.
10882         (flag_no_builtin): Remove.
10883         (flag_no_nonansi_builtin): Likewise.
10884         (walk_namespaces_r): Use fake_std_node.
10885         (push_namespace): Use std_identifier.
10886         (pop_namespace): Use in_fake_std.
10887         (lookup_name_real): Use fake_std_node.
10888         (init_decl_processing): When -fhonor-std, create the `std'
10889         namespace.  Don't create a dummy fake_std_node in that case.
10890         Adjust call to c_common_nodes_and_builtins.  Use std_identifier.
10891         (builtin_function): Put builtins whose names don't begin
10892         with `_' in the std namespace.
10893         * decl2.c (flag_no_builtin): Remove.
10894         (flag_no_nonansi_builtin): Likewise.
10895         (set_decl_namespace): Use fake_std_node.
10896         (validate_nonmember_using_decl): Likewise.
10897         (do_using_directive): Likewise.
10898         (handle_class_head): Likewise.
10899         * dump.c (dequeue_and_dump): Likewise.
10900         * except.c (init_exception_processing): Use std_identifier.
10901         * init.c (build_member_call): Use fake_std_node.
10902         * rtti.c (init_rtti_processing): Use std_identifier.
10903
10904 2000-10-17  Mark Mitchell  <mark@codesourcery.com>
10905
10906         * cp-tree.h (back_end_hook): Remove declaration.
10907         * decl2.c (back_end_hook): Remove definition.
10908
10909         * dump.c (dequeue_and_dump): Dump TREE_USED.
10910
10911 Tue Oct 17 20:19:06 2000  Brad Lucier <lucier@math.purdue.edu>
10912
10913         * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
10914
10915 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
10916
10917         * decl.c (WINT_TYPE): Define.
10918         (init_decl_processing): Create types unsigned_ptrdiff_type_node,
10919         c_size_type_node, signed_size_type_node and wint_type_node.
10920
10921 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
10922
10923         * decl2.c (warn_missing_format_attribute): New variable.
10924         (lang_decode_option): Decode -Wmissing-format-attribute.
10925
10926 2000-10-16  Mark Mitchell  <mark@codesourcery.com>
10927
10928         * typeck.c (qualify_type): Remove.
10929         (composite_pointer_type): Fix handling of conversions to `cv void*'.
10930
10931 2000-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10932
10933         * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
10934
10935 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10936
10937         * Makefile.in (parse.c, parse.h): Create atomically.
10938
10939 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
10940
10941         * class.c (current_obstack): Remove.
10942         * decl.c (ggc_p): Remove.
10943         (start_decl): Don't use decl_tree_cons.
10944         (grokdeclarator): Don't use build_decl_list.
10945         (start_function): Don't use decl_tree_cons.
10946         (finish_function): Don't mess with obstacks.
10947         * decl2.c (grok_x_components): Don't use build_decl_list.
10948         * lex.c (make_call_declarator): Don't call decl_tree_cons.
10949         (implicitly_declare_fn): Don't call build_decl_list.
10950         * parse.y (frob_specs): Don't call build_decl_list or
10951         decl_tree_cons.
10952         (expr_or_declarator_intern): Don't call decl_tree_cons.
10953         (primary): Don't call build_decl_list.
10954         (fcast_or_absdcl): Likewise.
10955         (typed_declspecs): Don't call decl_tree_cons.
10956         (reserved_declspecs): Don't call build_decl_list.
10957         (declmods): Likewise.
10958         (reserved_typespecquals): Likewise.
10959         (aggr): Likewise.
10960         (new_type_id): Likewise.
10961         (cv_qualifiers): Likewise.
10962         (after_type_declarator_intern): Likewise.
10963         (notype_declarator_intern): Likewise.
10964         (absdcl_intern): Likewise.
10965         (named_parm): Likewise.
10966         * pt.c (most_specialized_class): Likewise.
10967         * repo.c (temporary_obstack): Make it a structure, not a pointer.
10968         (init_repo): Initialize it.
10969         * search.c (current_obstack): Remove.
10970         * typeck2.c (add_exception_specifier): Don't call build_decl_list.
10971
10972 2000-10-09  Richard Henderson  <rth@cygnus.com>
10973
10974         * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
10975         (c++ language support bits for libgcc): Remove.
10976         (c++.clean): Remove cplib2.txt cleanup.
10977         * config-lang.in (headers, lib2funcs): Remove.
10978
10979         * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
10980         * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
10981         * inc/cxxabi.h, inc/exception, inc/new: Remove files.
10982         * inc/new.h, inc/typeinfo: Remove files.
10983
10984 2000-10-08  Joseph S. Myers  <jsm28@cam.ac.uk>
10985
10986         * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
10987         defined.
10988         (init_decl_processing): Initialize intmax_type_node and
10989         uintmax_type_node.
10990
10991 2000-10-06  Richard Henderson  <rth@cygnus.com>
10992
10993         * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
10994         (original_result_rtx): Remove.
10995         * decl.c (save_function_data): Don't clear x_result_rtx.
10996         (mark_lang_function): Don't mark it either.
10997         * expr.c (fixup_result_decl): Remove.
10998         * semantics.c (genrtl_named_return_value): Frob the return decl
10999         before calling emit_local_var.
11000         (genrtl_finish_function): Don't call fixup_result_decl.
11001         Always emit the jump to return_label.
11002
11003 2000-10-06  Nathan Sidwell  <nathan@codesourcery.com>
11004
11005         * pt.c (lookup_template_class): Set current access for enum.
11006         (tsubst_enum): Set file & line for enum decl.
11007
11008         * spew.c (yylex): Remove unused variable.
11009
11010 2000-10-05  Richard Henderson  <rth@cygnus.com>
11011
11012         * semantics.c (genrtl_finish_function): Don't init or check
11013         can_reach_end; remove noreturn and return value checks.
11014
11015 2000-10-05  Tom Tromey  <tromey@cygnus.com>
11016
11017         * init.c (build_java_class_ref): Use `build_static_name' with a
11018         suffix, not a prefix, to build the class object's name.
11019
11020 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
11021
11022         * cp-tree.h (access_kind): Fix comment typo.
11023         * decl2.c (grokfield): Fix diagnostic typo.
11024         * semantics.c (finish_template_type): Fix comment typo.
11025         (finish_qualified_object_call_expr): Likewise.
11026
11027 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
11028
11029         * pt.c (tsubst_expr, DECL_STMT case): Don't process if
11030         tsubsting fails.
11031
11032 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
11033
11034         * spew.c (frob_id): New static function.
11035         (frob_opname): Use it.
11036         (yylex): Use it.
11037
11038 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
11039
11040         * decl.c (lang_mark_false_label_stack): Remove.
11041         * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
11042
11043 2000-09-30  Joseph S. Myers  <jsm28@cam.ac.uk>
11044
11045         * gxxint.texi: Use @email for formatting email addresses.
11046
11047 2000-09-29  Gabriel Dos Reis  <gdr@codesourcery.com>
11048
11049         * error.c: Remove direct obstack manipulation.  Replace with
11050         output_buffer-based formatting.  Adjust calls to removed macros.
11051         (obstack_chunk_alloc, obstack_chunk_free): Remove.
11052         (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
11053         OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
11054
11055 2000-09-24  Mark Mitchell  <mark@codesourcery.com>
11056
11057         * ir.texi: Move to ../c-tree.texi.
11058
11059 2000-09-20  Jason Merrill  <jason@redhat.com>
11060
11061         * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
11062
11063 2000-09-21  Andreas Jaeger  <aj@suse.de>
11064
11065         * errfn.c: Move declaration of cp_printer and cp_printers to ...
11066         * cp-tree.h: ... here.
11067
11068         * error.c: Remove declaration of cp_printer.
11069
11070 2000-09-20  Mark Mitchell  <mark@codesourcery.com>
11071
11072         * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
11073
11074 2000-09-20  Hans-Peter Nilsson  <hp@axis.com>
11075
11076         * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
11077         users.
11078
11079 2000-09-18  Mark Mitchell  <mark@codesourcery.com>
11080
11081         * decl.c (start_function): Robustify.
11082
11083 2000-09-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11084
11085         * cp-tree.h (check_function_format): Accept a `status' parameter.
11086
11087         * call.c, typeck.c: Updates calls to `check_function_format'.
11088
11089 2000-09-17  Geoffrey Keating  <geoffk@cygnus.com>
11090
11091         * decl2.c (handle_class_head): Always push some scope even
11092         in the error case.
11093
11094 2000-09-16  Mark Mitchell  <mark@codesourcery.com>
11095
11096         * cp-tree.h (struct cp_language_function): Remove
11097         x_scope_stmt_stack and name_declared.
11098         (current_scope_stmt_stack): Remove.
11099         (function_name_declared_p): New macro.
11100         (struct lang_decl_flags): Use c_lang_decl as a base class.
11101         (context): Remove.
11102         (struct lang_decl): Replace saved_tree with context.
11103         (DECL_FRIEND_CONTEXT): Adjust accordingly.
11104         (SET_DECL_FRIEND_CONTEXT): Likewise.
11105         (DECL_VIRTUAL_CONTEXT): Likewise.
11106         (DECL_SAVED_TREE): Remove.
11107         (C_DECLARED_LABEL_FLAG): Likewise.
11108         (cplus_expand_expr_stmt): Don't declare.
11109         (add_decl_stmt): Likewise.
11110         (add_scope_stmt): Likewise.
11111         * decl.c (mark_stmt_tree): Remove.
11112         (case_compare): Likewise.
11113         (finish_case_label): Use c_add_case_label.
11114         (init_decl_processing): Set more language-specific hooks.
11115         (build_enumerator): Fix typo in comment.
11116         (cplus_expand_expr_stmt): Remove.
11117         (mark_lang_function): Use mark_c_language_function.
11118         (lang_mark_tree): Use c_mark_lang_decl.
11119         * decl2.c: Change order of inclusion.
11120         * except.c: Likewise.
11121         * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR.  Fall
11122         back on c_expand_expr.
11123         * friend.c: Include expr.h.
11124         * init.c: Change order of inclusion.
11125         * Makefile.in: Update dependencies.
11126         * lex.h (free_lang_decl_chain): Remove.
11127         * optimize.c (maybe_clone_body): Use function_name_declared_p.
11128         * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
11129         it doesn't exist.
11130         (instantiate_decl): Use function_name_declared_p.
11131         * semantics.c (lang_expand_expr_stmt): Remove.
11132         (set_current_function_name_declared): Likewise.
11133         (current_function_name_declared): Likewise.
11134         (begin_compound_stmt): Use function_name_declared_p.
11135         (add_decl_stmt): Remove.
11136         (setup_vtbl_ptr): Use function_name_declared_p.
11137         (add_scope_stmt): Remove.
11138         (current_scope_stmt_stack): New function.
11139         (cp_expand_stmt): Don't handle SCOPE_STMTs.
11140         (expand_body): Use function_name_declared_p.
11141         * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
11142         * typeck.c: Change order of includes.
11143         (convert_sequence): Remove.
11144
11145 2000-09-14  Joseph S. Myers  <jsm28@cam.ac.uk>
11146
11147         * lex.c (reswords): Add _Complex.
11148
11149 Thu Sep 14 12:10:45 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11150
11151         * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
11152
11153 2000-09-13  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
11154
11155         * init.c (begin_init_stmts): Don't use // comments.
11156
11157 2000-09-12  Jason Merrill  <jason@redhat.com>
11158
11159         * decl.c (maybe_deduce_size_from_array_init): Set do_default for
11160         all non-extern arrays.
11161
11162         * decl.c (grokdeclarator): Complain about 'friend T' for implicit
11163         typenames, too.  Downgrade complaint to pedwarn.
11164         (xref_tag): Warn about surprising behavior of 'friend struct T'.
11165         * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
11166         'class This::Inherited'.
11167
11168 2000-09-12  Mark Mitchell  <mark@codesourcery.com>
11169
11170         * decl.c (finish_case_label): Given the LABEL_DECL a
11171         DECL_CONTEXT.
11172
11173 2000-09-12  Gabriel Dos Reis  <gdr@codesourcery.com>
11174
11175         * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
11176         TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
11177         TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
11178         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
11179         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
11180         New macros.
11181         (sorry_for_unsupported_tree, print_scope_operator,
11182         print_left_paren, print_right_paren, print_left_bracket,
11183         print_right_bracket, print_whitespace): Likewise.
11184         (aggr_variety): Rename to class_key_or_enum.
11185         (print_type): Rename to print_type_id.
11186         (print_type_specifier_seq, print_simple_type_specifier,
11187         print_elaborated_type_specifier,
11188         print_rest_of_abstract_declarator,
11189         print_parameter_declaration_clause, print_exception_specification,
11190         print_nested_name_specifier, print_template_id,
11191         typedef_original_name,  print_template_argument_list_start,
11192         print_template_argument_list_end): New functions.
11193
11194 2000-09-11  Gabriel Dos Reis  <gdr@codesourcery.com>
11195
11196         * ir.texi: Add more documentation.
11197
11198 2000-09-11  Mark Mitchell  <mark@codesourcery.com>
11199
11200         * cp-tree.h (struct saved_scope): Remove x_function_parms.
11201         (current_function_parms): Don't define.
11202         (struct cp_language_function): Remove parms_stored.
11203         (current_function_just_assigned_this): Don't define.
11204         (current_function_parms_stored): Likewise.
11205         (static_ctors): Declare.
11206         (static_dtors): Likewise.
11207         (SF_EXPAND): Don't define.
11208         (expand_start_early_try_stmts): Remove declaration.
11209         (store_parm_decls): Likewise.
11210         * decl.c (static_ctors): Don't declare.
11211         (static_dtors): Likewise.
11212         (struct binding_level): Remove this_block.
11213         (poplevel): Remove dead code.
11214         (set_block): Likewise.
11215         (mark_binding_level): Don't mark this_block.
11216         (mark_saved_scope): Don't mark x_function_parms.
11217         (init_decl_processing): Don't add current_function_parms as a GC
11218         root.
11219         (check_function_type): Change prototype.
11220         (start_function): Remove RTL-generation code.
11221         (expand_start_early_try_stmts): Remove.
11222         (store_parm_decls): Give it internal linkage.  Remove
11223         RTL-generation code.
11224         (finish_function): Remove RTL-generation code.
11225         * decl2.c (static_ctors): Fix formatting.
11226         (static_dtors): Likewise.
11227         * method.c (use_thunk): Don't call store_parm_decls.
11228         (synthesize_method): Likewise.
11229         * optimize.c (maybe_clone_body): Likewise.
11230         * parse.y (fn.def2): Likewise.
11231         (.set_base_init): Likewise.
11232         (nodecls): Likewise.
11233         * pt.c (instantiate_decl): Likewise.
11234         * rtti.c (synthesize_tinfo_fn): Likewise.
11235         * semantics.c (genrtl_try_block): Simplify.
11236         (expand_body): Use genrtl_start_function and
11237         genrtl_finish_function.
11238         (genrtl_start_function): New function.
11239         (genrtl_finish_function): Likewise.
11240
11241 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
11242
11243         * error.c (cp_tree_printer, case 'P'): Append break.
11244
11245 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
11246
11247         * cp-tree.h (frob_opname): Declare.
11248         * parse.y (saved_scopes): New static variable.
11249         (cp_parse_init): Adjust.
11250         (do_id): If lastiddecl is NULL, do do_identifier.
11251         (operator): Save scope information.
11252         (unoperator): New reduction. Restore scope information.
11253         (operator_name): Append unoperator. Call frob_opname.
11254         * spew.c (frob_opname): Define.
11255
11256 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
11257
11258         * decl.c, rtti.c: Include defaults.h if not already included.
11259         Don't define the *_TYPE_SIZE macros.
11260
11261 2000-09-09  Mark Mitchell  <mark@codesourcery.com>
11262
11263         * cp-tree.h (push_switch): Change prototype.
11264         (check_cp_case_value): Remove declaration.
11265         (decl_constant_value): Likewise.
11266         * decl.c (struct cp_switch): Add switch_stmt and cases.
11267         (case_compare): New function.
11268         (push_switch): Set switch_stmt.  Initialize cases.
11269         (pop_switch): Clean up cases.
11270         (define_case_label): Rename to ...
11271         (finish_case_label): ... this.  Do semantic analysis for case
11272         labels here.
11273         (start_function): Correct comment.
11274         * decl2.c (check_cp_case_value): Remove.
11275         * expr.c (do_case): Remove.
11276         * pt.c (tsubst_expr): Adjust call to finish_case_label.
11277         * semantics.c (genrtl_do_poplevel): Remove declaration.
11278         (RECHAIN_STMTS): Remove.
11279         (finish_break_stmt): Use build_break_stmt.
11280         (finish_continue_stmt): Use build_continue_stmt.
11281         (finish_switch_cond): Adjust condition here, rater than in
11282         c_expand_start_case.
11283         (finish_case_label): Remove.
11284         * typeck.c (c_expand_return): Remove.
11285         (c_expand_start_case): Likewise.
11286
11287 2000-09-07  Gabriel Dos Reis  <gdr@codesourcery.com>
11288
11289         * ir.texi: Document type nodes.
11290
11291 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
11292
11293         * cp-tree.h (init_cp_semantics): Declare.
11294         (genrtl_try_block): Don't declare.
11295         (genrtl_handler): Likewise.
11296         (genrtl_catch_block): Likewise.
11297         (genrtl_ctor_stmt): Likewise.
11298         (genrtl_subobject): Likewise.
11299         (genrtl_do_poplevel): Likewise.
11300         (genrtl_named_return_value): Likewise.
11301         * lex.c (init_parse): Call init_cp_semantics.
11302         * semantics.c (genrtl_try_block): Give it internal linkage.
11303         (genrtl_handler): Likewise.
11304         (genrtl_catch_block): Likewise.
11305         (genrtl_ctor_stmt): Likewise.
11306         (genrtl_subobject): Likewise.
11307         (genrtl_do_poplevel): Likewise.
11308         (genrtl_named_return_value): Likewise.
11309         (lang_expand_stmt): Rename to ...
11310         (cp_expand_stmt): ... this.  Only handle C++-specific nodes.
11311         (init_cp_semantics): Define.
11312
11313         * decl.c (initialize_local_var): Remove RTL-generating code.
11314         * semantics.c (genrtl_try_block): Fix formatting.
11315
11316         Move statement-tree facilities from C++ to C front-end.
11317         * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
11318         (void_zero_node): Remove.
11319         (stmt_tree): Likewise.
11320         (scope_chain): Adjust.
11321         (language_function): Rename to cp_language_function.
11322         (cp_function_chain): Adjust.
11323         (current_stmt_tree): Remove.
11324         (last_tree): Likewise.
11325         (last_expr_type): Likewise.
11326         (struct lang_decl): Adjust.
11327         (STMT_IS_FULL_EXPR_P): Remove.
11328         (add_tree): Remove.
11329         (begin_stmt_tree): Likewise.
11330         (finish_stmt_tree): Likewise.
11331         (walk_tree_fn): Likewise.
11332         (walk_stmt_tree): Likewise.
11333         * class.c (finish_struct): Replace use of add_tree with add_stmt.
11334         * decl.c (mark_stmt_tree): Adjust type.
11335         (init_decl_processing): Don't build void_zero_node.
11336         (initialize_local_var): Adjust usage of current_stmt_tree.
11337         (finish_enum): Use add_stmt, not add_tree.
11338         (save_function_data): Adjust use of language_function.
11339         (finish_constructor_body): Use add_stmt, not add_tree.
11340         (finish_destructor_body): Likewise.
11341         (push_cp_function_context): Adjust use of language_function.
11342         (pop_cp_function_context): Likewise.
11343         (mark_lang_function): Likewise.
11344         (mark_cp_function_context): Likewise.
11345         * init.c (build_aggr_init): Adjust use of current_stmt_tree.
11346         (build_vec_init): Likewise.
11347         * semantics.c (SET_LAST_STMT): Remove.
11348         (RECHAIN_STMTS): Don't use it.
11349         (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
11350         (current_stmt_tree): Define.
11351         (add_tree): Remove.
11352         (finish_goto_stmt): Use add_stmt, not add_tree.
11353         (finish_expr_stmt): Likewise.
11354         (begin_if_stmt): Likewise.
11355         (finish_then_clause): Likewise.
11356         (begin_while_stmt): Likewise.
11357         (begin_do_stmt): Likewise.
11358         (finish_return_stmt): Likewise.
11359         (begin_for_stmt): Likewise.
11360         (finish_break_stmt): Likewise.
11361         (finish_continue_stmt): Likewise.
11362         (begin_switch_stmt): Likewise.
11363         (finish_case_label): Likewise.
11364         (begin_try_block): Likewise.
11365         (begin_function_try_block): Likewise.
11366         (begin_handler): Likewise.
11367         (begin_catch_block): Likewise.
11368         (begin_compound_stmt): Likewise.
11369         (begin_asm_stmt): Likewise.
11370         (finish_asm_stmt): Likewise.
11371         (finish_label_stmt): Likewise.
11372         (add_decl_stmt): Likewise.
11373         (finish_subobject): Likewise.
11374         (finish_decl_cleanup): Likewise.
11375         (finish_named_return_value): Likewise.
11376         (setup_vtbl_ptr): Likewise.
11377         (add_scope_stmt): Likewise.
11378         (finish_stmt_expr): Likewise.
11379         (prune_unused_decls): Remove.
11380         (begin_stmt_tree): Likewise.
11381         (finish_stmt_tree): Likewise.
11382         (prep_stmt): Adjust use of current_stmt_tree.
11383         (lang_expand_stmt): Likewise.
11384         * tree.c (statement_code_p): Remove.
11385         (cp_statement_code_p): New function.
11386         (walk_stmt_tree): Remove.
11387         (init_tree): Set lang_statement_code_p.
11388
11389 2000-09-06  Zack Weinberg  <zack@wolery.cumb.org>
11390
11391         Integrated preprocessor.
11392
11393         * Make-lang.in, Makefile.in: Remove all references to input.c,
11394         gxx.gperf, and hash.h.  Add ../c-lex.o to C_OBJS.
11395         * gxx.gperf, hash.h, input.c: Delete.
11396         * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
11397         initialized properly.
11398
11399         * class.c (fixup_pending_inline): Take a tree, not a
11400         struct pending_inline *.  All callers changed.
11401         (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
11402         RID_PROTECTED entries in ridpointers[] array here.
11403         * decl.c (duplicate_decls): Do not refer to struct
11404         pending_inline.
11405         (record_builtin_type, init_decl_processing): Use RID_MAX not
11406         CP_RID_MAX.
11407         (grokdeclarator): Use C_IS_RESERVED_WORD.
11408         * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
11409         cpplib.
11410         (grok_x_components): Do not inspect pending_inlines chain.
11411
11412         * cp-tree.h (struct lang_identifier): Add rid_code entry.
11413         (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
11414         (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
11415         (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
11416         TIME_IDENTIFIER_FILEINFO): Kill.
11417         Update prototypes.
11418         * lex.h: Expunge cp_rid.  Rewrite RIDBIT macros to use just a
11419         single 32-bit word.
11420         * parse.y: Call do_pending_inlines unconditionally.
11421         reinit_parse_for_method is now snarf_method.  fn.defpen is no
11422         longer necessary.  Remove unnecessary <itype> annotation on
11423         SCOPE.  Do not refer to end_of_file or struct pending_inline.
11424         * semantics.c (begin_inline_definitions): Call
11425         do_pending_inlines unconditionally.
11426
11427         * lex.c: Remove all code now shared with C front end.
11428         Initialize cpplib properly if USE_CPPLIB.  Put reserved words
11429         into the get_identifier table.  Rewrite pragma handling to
11430         work with the registry.  Move code to save tokens for later
11431         processing to spew.c.
11432
11433         * spew.c: Rewrite everything in terms of token streams instead
11434         of text.  Move routines here from lex.c / input.c as
11435         appropriate.  GC-mark trees hanging off the pending inlines
11436         chain.
11437
11438 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
11439
11440         * NEWS: Mention that the named return value extension has been
11441         deprecated.
11442         * cp-tree.h (original_result_rtx): Define.
11443         (TREE_REFERENCE_EXPR): Remove.
11444         (DECL_VPARENT): Likewise.
11445         (pushdecl_nonclass_level): Likewise.
11446         (store_return_init): Likewise.
11447         (reinit_lang_specific): Likewise.
11448         (genrtl_named_return_value): Change prototype.
11449         * decl.c (original_result_rtx): Remove.
11450         (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
11451         Do not generate RTL for local variables here.
11452         (store_return_init): Remove.
11453         * semantics.c (genrtl_named_return_value): Simplify.  Fold in
11454         store_return_init.
11455         (finish_named_return_value): Adjust accordingly.  Warn that this
11456         extension is deprecated.
11457         (lang_expand_stmt): Adjust call to genrtl_named_return_value.
11458
11459 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
11460
11461         * pt.c (type_unification_real): Replace switch with if.
11462         (unify): Tsubst non-type parms before comparing.
11463
11464 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
11465
11466         * error.c (dump_typename): New function, broken out of ...
11467         (dump_type): ... here. Use it.
11468         * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
11469
11470 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
11471
11472         * init.c (build_offset_ref): Deal with namespace scoped
11473         TEMPLATE_ID_EXPRs.
11474
11475 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
11476
11477         * class.c (resolve_address_of_overloaded_function): Add
11478         explanation message.
11479         * decl.c (define_case_label): Reformat explanation.
11480         * decl2.c (finish_static_data_member_decl): Likewise.
11481         (grokfield): Likewise.
11482         * friend.c (do_friend): Likewise.
11483
11484 2000-09-05  Zack Weinberg  <zack@wolery.cumb.org>
11485
11486         * tree.c (walk_tree): Expose tail recursion.
11487         (walk_stmt_tree): New function.
11488         * cp-tree.h: Prototype walk_stmt_tree.
11489         * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
11490         the BLOCKs directly.  If a BLOCK has no variables after
11491         pruning, discard it.
11492         (finish_stmt_tree): Use walk_stmt_tree.  No need to save and
11493         restore the line number.
11494
11495 2000-09-05  Mark Mitchell  <mark@codesourcery.com>
11496
11497         * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
11498         (pt.o): Remove dependency on HTAB_H.
11499         * cp-tree.h: Include hashtab.h.
11500         (walk_tree): Change prototype.
11501         (walk_tree_without_duplicates): New function.
11502         * decl.c (check_default_argument): Use it.
11503         * optimize.c (remap_decl): Adjust calls to walk_tree.
11504         (copy_body): Likewise.
11505         (expand_calls_inline): Likewise.
11506         (calls_setjmp_p): Use walk_tree_without_duplicates.
11507         * pt.c: Don't include hashtab.h.
11508         (for_each_template_parm): Use walk_tree_without_duplicates.
11509         * semantics.c (finish-stmt_tree): Likewise.
11510         (expand_body): Likewise.
11511         * tree.c (walk_tree): Add additional parameter.
11512         (walk_tree_without_duplicates): New function.
11513         (count_trees): Use it.
11514         (verify_stmt_tree): Adjust call to walk_tree.
11515         (find_tree): Use walk_tree_without_duplicates.
11516         (no_linkage_check): Likewise.
11517         (break_out_target_exprs): Adjust call to walk_tree.
11518         (cp_unsave): Likewise.
11519
11520 2000-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11521
11522         * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
11523         (TEMPLATE_TEMPLATE_PARM): Adjust comment.
11524         * cp-tree.h (TYPE_BINFO): Adjust comment.
11525         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
11526         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
11527         (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
11528         (TYPE_TEMPLATE_INFO): Likewise.
11529         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
11530         * class.c (push_nested_class): Likewise.
11531         * decl.c (lookup_name_real): Likewise.
11532         (grokdeclarator): Likewise.
11533         (grok_op_properties): Likewise.
11534         (xref_tag): Likewise.
11535         (xref_basetypes): Likewise.
11536         * decl2.c (constructor_name_full): Likewise.
11537         (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
11538         (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
11539         * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
11540         (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
11541         (dump_type_suffix): Likewise.
11542         * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
11543         instead.
11544         (get_aggr_from_typedef): Likewise.
11545         * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
11546         (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
11547         (write_template_parm): Likewise.
11548         (write_template_template_parm): Check tree code instead of
11549         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
11550         * method.c (build_overload_nested_name): Add
11551         BOUND_TEMPLATE_TEMPLATE_PARM.
11552         (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
11553         * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
11554         * pt.c (convert_template_argument): Check tree code instead of
11555         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
11556         (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
11557         (for_each_template_parm): Adjust comment.
11558         (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.
11559         (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
11560         (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.  Use
11561         template_args_equal to compare template template parameter cases.
11562         * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
11563         * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
11564         instead.
11565         * tree.c (copy_template_template_parm): Decide whether to create
11566         a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
11567         (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
11568         (copy_tree_r): Likewise.
11569         * typeck.c (comptypes): Likewise.  Check tree code instead of
11570         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
11571
11572 2000-09-04  Mark Elbrecht  <snowball3@bigfoot.com>
11573
11574         * decl.c (finish_function): Move the code for handling functions
11575         marked with the constructor and destructor attributes inside the
11576         expand_p block.
11577
11578 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
11579
11580         * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
11581
11582 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
11583
11584         * pt.c (lookup_template_class): Remove abort.
11585         * tree.c (get_type_decl): Allow error_mark_node.
11586
11587 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
11588
11589         * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
11590         TEMPLATE_ID_EXPRs.
11591
11592 2000-09-03  Mark Mitchell  <mark@codesourcery.com>
11593
11594         * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
11595         new ABI mangling.
11596
11597 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
11598
11599         * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
11600         union tag mismatch error reporting.
11601
11602 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
11603
11604         * call.c (build_scoped_method_call): Check it is not a namespace.
11605
11606 2000-08-30  Jason Merrill  <jason@redhat.com>
11607
11608         * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
11609
11610         * tree.c (bot_manip): Check TREE_CONSTANT rather than
11611         !TREE_SIDE_EFFECTS.  Call break_out_target_exprs and
11612         build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
11613
11614         * decl.c (start_function): Always call make_function_rtl.
11615
11616 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
11617
11618         * semantics.c (prune_unused_decls): New function.
11619         (finish_stmt_tree): Call it via walk_tree.
11620
11621 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
11622
11623         * class.c (build_secondary_vtable): Constify a char *.
11624         * decl.c (init_decl_processing): Initialize function_id_node,
11625         pretty_function_id_node, and func_id_node.
11626         * input.c (struct input_source): Constify 'str'.
11627         (feed_input): Constify first argument.
11628         * mangle.c (write_identifier): Constify argument.
11629         * pt.c (mangle_class_name_for_template): Constify argument.
11630
11631 2000-08-29  Mark Mitchell  <mark@codesourcery.com>
11632
11633         * typeck.c (mark_addressable): Remove code that pokes around in
11634         RTL.
11635
11636 2000-08-28  Jason Merrill  <jason@redhat.com>
11637
11638         * lex.c (file_name_nondirectory): Move to toplev.c.
11639
11640         * cp-tree.h (LOCAL_CLASS_P): New macro.
11641         * class.c (finish_struct_1): Use it.
11642
11643 2000-08-27  Alex Samuel  <samuel@codesourcery.com>
11644
11645         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
11646         (write_encoding): Pass another argument to write_name.
11647         (write_name): Add ignore_local_scope parameter.  Fix handling of
11648         local names.
11649         (write_nested_name): Use write_unqualified_name.
11650         (write_prefix): Likewise.  Skip out on FUNCTION_DECLs.
11651         (write_template_prefix): Use write_unqualified_name.
11652         (write_component): Remove.
11653         (write_local_name): Add parameter.  Use direct local entity to
11654         discriminator calculation.
11655         (write_class_enum_type): Pass another argument to write_name.
11656         (write_template_template_arg): Likewise.
11657         (make_guard_variable): Likewise.
11658
11659 2000-08-27  Jason Merrill  <jason@redhat.com>
11660
11661         * decl.c (pushdecl): Matching decls for local externs are found in
11662         the current level.  Propagate linkage information from previous
11663         declarations.
11664
11665 2000-08-26  Gabriel Dos Reis  <gdr@codesourcery.com>
11666
11667         * ir.texi (Expressions): Fix typo.
11668
11669 2000-08-25  Greg McGary  <greg@mcgary.org>
11670
11671         * tree.c (init_tree): Use ARRAY_SIZE.
11672
11673 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
11674
11675         * error.c (cp_tree_printer): Rework.
11676
11677 2000-08-25  Mark Mitchell  <mark@codesourcery.com>
11678
11679         * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
11680         dyn-string.o.
11681         (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
11682         (cp-demangle.o): Remove target.
11683         (dyn-string.o): Likewise.
11684
11685         * decl.c (grokfndecl): Require that `main' return an `int'.
11686         * mangle.c (write_encoding): Don't mangle return types for
11687         conversion functions.
11688
11689 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
11690
11691         * error.c (tree_formatting_info): New data type.
11692         (tree_being_formatted): New macro.
11693         (tree_formatting_flags): Likewise.
11694         (put_whitespace): Likewise.
11695         (print_tree_identifier): Likewise.
11696         (print_identifier): Likewise.
11697         (cp_tree_printer, print_function_argument_list, print_declaration,
11698         print_expression, print_function_declaration,
11699         print_function_parameter, print_type, print_cv_qualifier): New
11700         functions.
11701         (init_error): Initialize lang_printer.
11702
11703 2000-08-24  Jason Merrill  <jason@redhat.com>
11704
11705         * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
11706         adjustment necessary.
11707
11708 2000-08-24  Greg McGary  <greg@mcgary.org>
11709
11710         * cp-tree.h (MAIN_NAME_P): Remove macro.
11711
11712 2000-08-24  Gabriel Dos Reis  <gdr@codesourcery.com>
11713
11714         * error.c (print_instantiation_context): Don't forget to flush the
11715         buffer.
11716
11717 2000-08-23  Jason Merrill  <jason@redhat.com>
11718
11719         * typeck.c (build_ptrmemfunc): Save the input pmf.
11720
11721         * method.c (process_modifiers): Use same_type_p.
11722
11723 2000-08-23  Mark Mitchell  <mark@codesourcery.com>
11724
11725         * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
11726         * mangle.c (write_function_type): Change prototype.
11727         (write_encoding): Don't mangle return types for
11728         constructors or destructors.
11729         (write_type): Adjust call to write_function_type.
11730         * pt.c (instantiate_template): Instantiate alternate entry points
11731         when instantiating the main function.
11732
11733 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
11734
11735         * error.c (cp_print_error_function): Don't use embedded '\n' in
11736         output_printf.
11737
11738 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
11739
11740         * decl.c (init_decl_processing): Remove bogus initialization.
11741         * error.c (lang_print_error_function): Restore here.
11742         (init_error): Initialize print_error_function.
11743
11744 2000-08-22  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
11745
11746         * decl2.c (arg_assoc): Revert my 2000-08-11 change.
11747
11748 2000-08-22  Gabriel Dos Reis  <gdr@codesourcery.com>
11749
11750         * Makefile.in (error.o): Depends on diagnostic.h
11751
11752         * cp-tree.h (problematic_instantiation_changed,
11753         record_last_problematic_instantiation, current_instantiation,
11754         print_instantiation_context): Declare.
11755         (maybe_print_template_context): Remove.
11756
11757         * decl.c (init_decl_processing): Set print_error_function to NULL.
11758         (lang_print_error_function): Remove, since we're using a new
11759         machinery.
11760
11761         * error.c: #include diagnostic.h
11762         (function_category): New function.
11763         (cp_diagnostic_starter): Likewise.
11764         (cp_diagnostic_finalizer): Likewise.
11765         (cp_print_error_function): Likewise.
11766         (maybe_print_instantiation_context): Likewise.
11767         (print_instantiation_full_context): Likewise.
11768         (print_instantiation_partial_context): Likewise.
11769         (print_instantiation_context): Define.
11770         (init_error): Initialize diagnostic pager and finalizer.
11771
11772         * pt.c (problematic_instantiation_changed): Define.
11773         (record_last_problematic_instantiation): Likewise.
11774         (current_instantiation): Likewise.
11775         (maybe_print_template_context): Remove.
11776         (print_template_context): Likewise.
11777         (current_tinst_level): Make static to reflect Brendan Kehoe's
11778         change of 1995-04-13.
11779         (push_tinst_level): Call print_instantiation_context.
11780
11781 2000-08-21  Nix  <nix@esperi.demon.co.uk>
11782
11783         * lang-specs.h: Do not process -o or run the assembler if
11784         -fsyntax-only.
11785
11786 2000-08-21  Joseph S. Myers  <jsm28@cam.ac.uk>
11787
11788         * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
11789         variables.
11790         * decl2.c (lang_decode_option): Disable gettext attributes for
11791         -ansi.
11792
11793 2000-08-21  Gabriel Dos Reis  <gdr@codesourcery.com>
11794
11795         * lex.c (lang_init_options): Default diagnostic message maximum
11796         length to 80, when line-wrapping.
11797
11798 2000-08-20  Mark Mitchell  <mark@codesourcery.com>
11799
11800         * class.c (build_vtbl_initializer): Clear the entire
11801         vtbl_init_data.  Start keeping track of the functions for which we
11802         have created vcall offsets here.
11803         (dfs_build_vcall_offset_vtbl_entries): Remove.
11804         (build_vcall_offset_vtbl_entries): Reimplement.
11805         (add_vcall_offset_vtbl_entries_r): New function.
11806         (add_vcall_offset_vtbl_entries_1): Likewise.  Tweak logic for
11807         computing when vcall offsets are necessary.
11808
11809 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
11810
11811         * decl.c (member_function_or_else): Use cp_error ... %T.
11812         (grokdeclarator): Likewise.
11813         (start_method): Likewise.
11814         * friend.c (make_friend_class): Use cp_pedwarn ... %T.
11815
11816 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
11817
11818         * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
11819         TYPE_DECLs.
11820
11821 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
11822
11823         * cp-tree.h (PTRMEM_OK_P): New macro.
11824         (itf_ptrmem_ok): New enumeration value.
11825         * class.c (resolve_address_of_overloaded_function): Add PTRMEM
11826         argument. Diagnose implicit pointer to member.
11827         (instantiate_type): Don't diagnose implicit pointer to member
11828         here. Pass itf_ptrmem_ok if ok. Adjust calls to
11829         resolve_address_of_overloaded_function.
11830         * init.c (build_offset_ref): Set PTRMEM_OK_P.
11831         (resolve_offset_ref): Don't diagnose implicit pointer to member here.
11832         * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
11833         * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
11834         (build_unary_op): Deal with single non-static member in
11835         microsoft-land.
11836
11837 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
11838
11839         * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
11840
11841 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
11842
11843         * cp-tree.h (enum_name_string): Remove prototype.
11844         (report_case_error): Remove prototype.
11845         * cp/typeck2.c (enum_name_string): Remove.
11846         (report_case_error): Remove.
11847         * error.c (dump_expr): Deal with enum values directly.
11848         Correctly negate integer constant.
11849
11850 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
11851
11852         * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
11853         (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
11854         * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
11855         (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
11856         (__cxa_vec_new): Use __cxa_vec_new2.
11857         (__cxa_vec_delete): Use __cxa_vec_delete2.
11858
11859 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
11860
11861         * vec.cc (__cxa_vec_new): Set "C" linkage.
11862         (__cxa_vec_ctor): Likewise.
11863         (__cxa_vec_cctor): Likewise.
11864         (__cxa_vec_dtor): Likewise.
11865         (__cxa_vec_delete): Likewise.
11866         * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
11867         (__cxa_vec_ctor): Likewise.
11868         (__cxa_vec_cctor): Likewise.
11869         (__cxa_vec_dtor): Likewise.
11870         (__cxa_vec_delete): Likewise.
11871
11872 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
11873
11874         * class.c (instantiate_type): Reinstate local variable
11875         deleted in previous change.
11876
11877         * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
11878         itf_no_attributes.
11879
11880 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
11881
11882         * cp-tree.h (instantiate_type_flags): New enumeration.
11883         (instantiate_type): Change parameter.
11884         * class.c (instantiate_type): Adjust prototype. Adjust.
11885         * call.c (standard_conversion): Adjust instantiate_type call.
11886         (reference_binding): Likewise.
11887         (build_op_delete_call): Likewise.
11888         (convert_like_real): Likewise.
11889         * cvt.c (cp_convert_to_pointer): Likewise.
11890         (convert_to_reference): Likewise.
11891         * pt.c (convert_nontype_argument): Likewise.
11892         * typeck.c (build_binary_op): Likewise.
11893         (build_ptrmemfunc): Likewise.
11894         (convert_for_assignment): Likewise.
11895
11896 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
11897
11898         * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
11899         (current_aggr): Define.
11900         * decl.c (grokdeclarator): Make sure a friend class is an
11901         elaborated type specifier.
11902         * parse.y (current_aggr): Remove static definition.
11903         (cp_parse_init): Adjust.
11904         (structsp): Clear and restore current_aggr.
11905         (component_decl_list): Clear current_aggr.
11906
11907         * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
11908         aggregate tag on the typename's context.
11909
11910         * pt.c (tsubst_friend_class): Return error_mark_node, if
11911         parms becomes NULL.
11912         (instantiate_class_template): Ignore error_mark_node friend types.
11913
11914 2000-08-14  Nathan Sidwell  <nathan@codesourcery.com>
11915
11916         * cvt.c (warn_ref_binding): New static function, broken out of ...
11917         (convert_to_reference): ... here. Use it.
11918
11919 2000-08-11  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
11920
11921         * parse.y (template_arg): Add rule for template qualified with
11922         global scope.
11923
11924 2000-08-11  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
11925
11926         * decl2.c (add_function): Reorganize.
11927         (arg_assoc): Do not consider function template decls.
11928
11929 2000-08-11  Jason Merrill  <jason@redhat.com>
11930
11931         * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
11932         looking inside.
11933
11934 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
11935
11936         * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
11937         (lookup_nested_tag): Likewise.
11938
11939         * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
11940         can be produced.
11941
11942 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
11943
11944         * parse.y (named_complex_class_head_sans_basetype): Remove
11945         always true if.
11946
11947 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
11948
11949         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
11950         explicit TEMPLATE_ID_EXPR args.
11951         (build_expr_from_tree, case CALL_EXPR): Likewise.
11952
11953 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
11954
11955         * decl.c (check_tag_decl): Diagnose typename's which don't
11956         declare anything.
11957
11958 2000-08-10  Nathan Sidwell  <nathan@codesourcery.com>
11959
11960         * init.c (build_aggr_init): Reject bogus array initializers
11961         early.
11962
11963 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
11964
11965         * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
11966         runtime.
11967         * cp/tinfo.cc (__dynamic_cast): Likewise.
11968         * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
11969
11970 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
11971
11972         * cvt.c (convert_to_pointer_force): Fix error message when
11973         attempting to cast from ambiguous base.
11974
11975 2000-08-08  Jason Merrill  <jason@redhat.com>
11976
11977         * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
11978         (tsubst_template_arg_vector): Likewise.
11979
11980         * decl2.c (build_anon_union_vars): Choose the largest field; don't
11981         assume that one will be as large as the union.
11982
11983 2000-08-07  Kazu Hirata  <kazu@hxi.com>
11984
11985         * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
11986         * decl.c (pop_labels): Likewise.
11987
11988 2000-08-04  Jeffrey Oldham  <oldham@codesourcery.com>
11989
11990         * inc/cxxabi.h (__pbase_type_info): Changed member names to match
11991         specifications.
11992         (__pointer_to_member_type_info): Likewise.
11993         (__base_class_info): Likewise.
11994         (__class_type_info): Likewise.
11995         (__si_class_type_info): Likewise.
11996         (__vmi_class_type_info): Likewise.
11997         * tinfo.cc (__si_class_type_info::__do_find_public_src):
11998         Changed member names to match specifications.
11999         (__vmi_class_type_info::__do_find_public_src): Likewise.
12000         (__si_class_type_info::__do_dyncast): Likewise.
12001         (__vmi_class_type_info::__do_dyncast): Likewise.
12002         (__si_class_type_info::__do_upcast): Likewise.
12003         (__vmi_class_type_info::__do_upcast): Likewise.
12004         * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
12005         (__pbase_type_info::__pointer_catch): Likewise.
12006         (__pointer_type_info::__pointer_catch): Likewise.
12007         (__pointer_to_member_type_info::__pointer_catch): Likewise.
12008
12009 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
12010
12011         * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
12012         * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
12013         (cc1plus): Link with $(BACKEND) and $(C_OBJS).
12014
12015 2000-08-04  Mark Mitchell  <mark@codesourcery.com>
12016
12017         * cp-tree.h (add_method): Change prototype.
12018         * class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
12019         Don't double the size of the method vector in the error case.
12020         (handle_using_decl): Adjust call to add_method.
12021         (add_implicitly_declared_members): Likewise.
12022         (clone_function_decl): Likewise.
12023         * decl2.c (check_classfn): Likewise.
12024         * semantics.c (finish_member_declaration): Likewise.
12025
12026 2000-08-04  Joseph S. Myers  <jsm28@cam.ac.uk>
12027
12028         * decl.c (flag_isoc94): New variable.
12029
12030 2000-08-02  Jason Merrill  <jason@redhat.com>
12031
12032         * pt.c (do_type_instantiation): Add complain parm; don't complain
12033         if called recursively.
12034         * cp-tree.h, parse.y: Adjust.
12035
12036 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
12037
12038         * decl2.c: Silently ignore -Wstrict-prototypes; warn about
12039         -Wno-strict-prototypes.
12040
12041         * g++spec.c: Adjust type of second argument to
12042         lang_specific_driver, and update code as necessary.
12043
12044         * cp-tree.h: Don't prototype min_precision here.
12045         (my_friendly_assert): Cast expression to void.
12046         * semantics.c (do_poplevel): Initialize scope_stmts.
12047
12048 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
12049
12050         * cp-tree.h (DECL_NEEDED_P): Tweak.
12051
12052 2000-07-28  Jason Merrill  <jason@redhat.com>
12053
12054         * lang-specs.h: Use %i in rule for .ii files.
12055
12056 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
12057
12058         * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
12059
12060 2000-07-30  Mark Mitchell  <mark@codesourcery.com>
12061
12062         Allow indirect primary bases.
12063         * cp-tree.h (struct lang_type): Remove vfield_parent.  Add
12064         primary_base.
12065         (CLASSTYPE_VFIELD_PARENT): Remove.
12066         (CLASSTYPE_PRIMARY_BINFO): Reimplement.
12067         (BINFO_PRIMARY_BINFO): Remove.
12068         (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
12069         (BINFO_VBASE_PRIMARY_P): Likewise.
12070         (BINFO_PRIMARY_BASE_OF): New macro.
12071         (BINFO_INDIRECT_PRIMARY_P): Likewise.
12072         (get_primary_binfo): New function.
12073         * decl.c (lang_mark_tree): Make lang_type::primary_base.
12074         * class.c (vcall_offset_data_s): Rename to ...
12075         (vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
12076         and add ctor_vtbl_p.
12077         (get_derived_offset): Use get_primary_binfo.
12078         (dfs_mark_primary_bases): Adjust handling of virtual primary
12079         bases.
12080         (mark_primary_bases): Likewise.
12081         (set_primary_base): Take a binfo, not an integer, as a
12082         representation of the primary base.
12083         (indirect_primary_base_p): Remove.
12084         (determine_primary_base): Adjust for indirect primary bases.
12085         (dfs_find_final_overrider): Fix typo in coment.
12086         (update_vtable_entry_for_fn): Use get_primary_binfo.
12087         (layout_nonempty_base_or_field): Tweak.
12088         (build_base_fields): Adjust for new primary base semantics.
12089         (dfs_propagate_binfo_offsets): Remove.
12090         (propagate_binfo_offsets): Rewrite.
12091         (dfs_set_offset_for_shared_vbases): Remove.
12092         (layout_virtual_bases): Don't use it.
12093         (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
12094         ABI.
12095         (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
12096         CLASSTYPE_VFIELD_PARENT.
12097         (dfs_get_primary_binfo): New function.
12098         (get_primary_binfo): Likewise.
12099         (dump_class_hierarchy_r): Tweak printing of primary bases.
12100         (build_vtbl_initializer): Fix typo in comments.  Use
12101         vtbl_init_data.
12102         (build_vcall_and_vbase_vtbl_entries): Likewise.
12103         (build_vbaes_offset_vtbl_entries): Likewise.
12104         (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
12105         BV_VCALL_INDEX to handle indirect primary bases.
12106         (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
12107         (build_rtti_vtbl_entries): Likewise.
12108         * search.c (get_shared_vbase_if_not_primary): Tweak.
12109         (find_vbase_instance): Likewise.
12110         (binfo_for_vtable): Simplify.
12111         * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
12112         (make_binfo): Make it have 11 entries.
12113
12114 2000-07-30  Alex Samuel  <samuel@codesourcery.com>
12115
12116         * mangle.c (DECL_TEMPLATE_ID_P): Remove.
12117         (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
12118         ascertaining primaryness.
12119         (G): Remove template_args.
12120         (decl_is_template_id): New function.
12121         (write_encoding): Use decl_is_template_id.
12122         (write_name): Likewise.  Handle type_decls.  Get main variant of
12123         type decls.
12124         (write_nested_name): Likewise.
12125         (write_prefix): Likewise.
12126         (write_template_prefix): Likewise.
12127         (write_special_name_constructor): Remove defunct production from
12128         comment.
12129         (write_bare_function_type): Remove comment about absent parameter.
12130         (write_template_template_arg): Add missing grammar production to
12131         comment.
12132
12133 2000-07-27  Jason Merrill  <jason@redhat.com>
12134
12135         * decl.c (duplicate_decls): If common_type produces a non-typedef
12136         type for a typedef, just use the old type.
12137
12138 2000-07-27  Mark Mitchell  <mark@codesourcery.com>
12139
12140         * cp-tree.h (function_depth): Declare.
12141         (verify_stmt_tree): Likewise.
12142         (find_tree): Likewise.
12143         * decl.c (function_depth): Give it external linkage.
12144         * optimize.c (optimize_function): Increment and decrement it.
12145         * tree.c (verify_stmt_tree_r): New function.
12146         (verify_stmt_tree): Likewise.
12147         (find_tree_r): Likewise.
12148         (find_tree): Likewise.
12149
12150 2000-07-27  Jason Merrill  <jason@redhat.com>
12151
12152         * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
12153         TYPE_PTRMEMFUNC_P.
12154         * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
12155
12156 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
12157
12158         * decl.c (start_cleanup_fn): Mark the function as `inline'.
12159         * decl2.c (get_guard): Call cp_finish_decl, not
12160         rest_of_decl_compilation, for local guards.
12161         * lex.c (do_identifier): Remove unused variable.
12162
12163 Wed Jul 26 15:05:51 CEST 2000   Marc Espie <espie@cvs.openbsd.org>
12164
12165         * parse.y:  Add missing ';'.
12166
12167 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
12168
12169         * parse.y (empty_parms): Use `()', not `(...)', when in the scope
12170         of `extern "C++"'.
12171
12172 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
12173
12174         Kill strict_prototype. Backwards compatibility only for
12175         non NO_IMPLICIT_EXTERN_C systems.
12176         * cp-tree.h (flag_strict_prototype): Remove.
12177         (strict_prototype): Remove.
12178         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
12179         * decl.c (maybe_push_to_top_level): Adjust.
12180         (pop_from_top_level): Adjust.
12181         (decls_match): Only allow sloppy parm matching for ancient
12182         system headers.
12183         (init_decl_processing): Adjust.
12184         (grokdeclarator): Adjust.
12185         * decl2.c (flag_strict_prototype): Remove.
12186         (strict_prototype): Remove.
12187         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
12188         (lang_f_options): Remove "strict-prototype".
12189         (unsupported-options): Add "strict-prototype".
12190         * lex.c (do_identifier): Adjust.
12191         (do_scoped_id): Adjust.
12192         * parse.y (empty_parms): Adjust.
12193         * class.c (push_lang_context): Adjust.
12194         (pop_lang_context): Adjust.
12195         * typeck.c (comp_target_parms): Adjust.
12196
12197 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
12198
12199         * decl.c (poplevel): Deal with anonymous variables at for scope.
12200         (maybe_inject_for_scope_var): Likewise.
12201
12202 2000-07-25  Zack Weinberg  <zack@wolery.cumb.org>
12203
12204         * decl.c: Remove all signal handling code, now done in toplev.c.
12205
12206 2000-07-23  Mark Mitchell  <mark@codesourcery.com>
12207
12208         * decl.c (make_rtl_for_nonlocal_decl): Rework.
12209
12210         * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
12211         correctly.
12212
12213 2000-07-20  Zack Weinberg  <zack@wolery.cumb.org>
12214
12215         * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
12216         Define my_friendly_assert and my_friendly_abort as macros
12217         which may call friendly_abort.  Prototype friendly abort, not
12218         my_friendly_abort or my_friendly_assert.
12219         * decl.c (signal_catch): Report the signal caught in the error
12220         message.  Call fatal directly.
12221         * typeck2.c (ack, my_friendly_assert): Delete.
12222         (my_friendly_abort): Rename to friendly_abort.  Expect file,
12223         line, and function parameters.  Report the abort code, then
12224         call fancy_abort.  Do not mask an abort if errors have
12225         already occurred.
12226
12227 2000-07-18  Nathan Sidwell  <nathan@codesourcery.com>
12228
12229         * typeck.c (comp_target_parms): Remove obsolete parameter.
12230         (comp_target_types): Adjust.
12231
12232 2000-07-17  Jason Merrill  <jason@redhat.com>
12233
12234         * typeck.c (mark_addressable): Never set TREE_USED.
12235         * call.c (build_call): Don't abort on calls to library functions
12236         that have been declared normally.
12237
12238         * typeck.c (build_binary_op): Fix grammar in warning.
12239
12240         * exception.cc (__eh_free): Fix prototype.
12241
12242         * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
12243
12244         * decl.c (pushdecl): Handle seeing an OVERLOAD in
12245         IDENTIFIER_NAMESPACE_VALUE.
12246
12247 2000-07-16  Mark Mitchell  <mark@codesourcery.com>
12248
12249         * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
12250         * method.c (use_thunk): Correct handling of vcall offsets.
12251
12252 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
12253
12254         * .cvsignore: parse.h and parse.c have no cp- prefix.
12255
12256 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
12257
12258         * .cvsignore: New file.
12259
12260 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
12261
12262         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
12263
12264 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
12265
12266         * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
12267         * parse.c: Remove.
12268         * parse.h: Likewise.
12269
12270 2000-07-11  Mark Mitchell  <mark@codesourcery.com>
12271
12272         * class.c (layout_class_type): Add pointers to virtual bases after
12273         base classes under the old ABI.
12274
12275 2000-07-10  Benjamin Chelf  <chelf@codesourcery.com>
12276
12277         * semantics.c (finish_for_stmt): Remove call to emit_line_note.
12278         (finish_continue_stmt): Likewise.
12279         (begin_for_stmt): Remove call to note_level_for_for.
12280         (finish_goto_stmt): Change call from build_min_nt
12281         to build_stmt.
12282         (finish_expr_stmt): Likewise.
12283         (begin_if_stmt): Likewise.
12284         (begin_while_stmt): Likewise.
12285         (finish_while_stmt): Likewise.
12286         (finish_return_stmt): Likewise.
12287         (begin_for_stmt): Likewise.
12288         (finish_for_stmt): Likewise.
12289         (finish_break_stmt): Likewise.
12290         (begin_switch_stmt): Likewise.
12291         (finish_case_label): Likewise.
12292         (genrtl_try_block): Likewise.
12293         (begin_try_block): Likewise.
12294         (begin_handler): Likewise.
12295         (begin_compound_stmt): Likewise.
12296         (finish_asm_stmt): Likewise.
12297         (finish_label_stmt): Likewise.
12298         (add_decl_stmt): Likewise.
12299         (finish_subobject): Likewise.
12300         (finish_decl_cleanup): Likewise.
12301         (finish_named_return_value): Likewise.
12302         (setup_vtbl_ptr): Likewise.
12303         (add_scope_stmt): Likewise.
12304         * decl.c (finish_constructor_body): Likewise.
12305         (finish_destructor_body): Likewise.
12306         * optimize.c (copy_body_r): Likewise.
12307         (initialize_inlined_parameters): Likewise.
12308         (declare_return_variable): Likewise.
12309         (expand_call_inline): Likewise.
12310
12311 2000-07-10  Jakub Jelinek  <jakub@redhat.com>
12312
12313         * semantics.c (expand_body): Sync interface information
12314         at the end of function body expansion.
12315
12316 2000-07-09  Jason Merrill  <jason@redhat.com>
12317
12318         * init.c (build_new_1): Bail early if the call to new fails.
12319
12320         * decl.c (compute_array_index_type): Check specifically for
12321         an INTEGER_CST, not just TREE_CONSTANT.
12322
12323         * decl.c (duplicate_decls): Don't call duplicate_decls on
12324         the DECL_TEMPLATE_RESULT.
12325         (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
12326         codes.
12327
12328         * error.c (dump_template_bindings): Don't crash if we had an
12329         invalid argument list.
12330
12331         * typeck.c (c_expand_start_case): Do narrowing here.
12332         * semantics.c (finish_switch_cond): Not here.
12333
12334 2000-07-09  Hidvegi Zoli  <hzoli@austin.ibm.com>
12335
12336         * parse.y (asm_clobbers): Do string concatenation.
12337
12338 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
12339
12340         * decl.c (pushtag): Don't put local classes in template functions
12341         on the local_classes list.
12342
12343 2000-07-04  Scott Snyder  <snyder@fnal.gov>
12344
12345         * decl2.c (get_guard): Add missing return for old ABI local
12346         variable case.
12347
12348 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
12349
12350         * cp-tree.h (char_type_p): New function.
12351         * decl.c (init_decl_processing): Don't initialize
12352         signed_wchar_type_node or unsigned_wchar_type_node.
12353         (complete_array_type): Handle brace-enclosed string-constants.
12354         * rtti.c (emit_support_tinfos): Remove #if 0'd code.
12355         * tree.c (char_type_p): New function.
12356         * typeck2.c (digest_init): Use char_type_p.
12357
12358 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
12359
12360         * pt.c (tsubst): Don't layout type, if it's error_mark.
12361
12362 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
12363
12364         * pt.c (instantiate_pending_templates): Reset template level.
12365
12366 2000-07-05  Jason Merrill  <jason@redhat.com>
12367
12368         * call.c (joust): Don't complain about `operator char *()' beating
12369         `operator const char *() const'.
12370
12371 2000-07-04  scott snyder  <snyder@fnal.gov>
12372             Jason Merrill  <jason@redhat.com>
12373
12374         * repo.c (repo_get_id): Handle the case where a class with virtual
12375         bases has a null TYPE_BINFO_VTABLE.
12376
12377 2000-07-04  Kevin Buhr  <buhr@stat.wisc.edu>
12378             Jason Merrill  <jason@redhat.com>
12379
12380         * parse.y (member_init): Just pass in the type.
12381         * init.c (expand_member_init): Handle getting a type.
12382
12383 2000-07-04  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
12384             Jason Merrill  <jason@redhat.com>
12385
12386         * decl.c (finish_function): Warn if a function has no return
12387         statement.
12388         Suggested by Andrew Koenig.
12389         * typeck.c (check_return_expr): Do set current_function_returns_value
12390         if we got an error_mark_node.
12391
12392 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
12393
12394         * decl2.c (push_decl_namespace): Push the original namespace.
12395
12396 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
12397
12398         * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
12399         * semantics.c (begin_class_definition): Clear it.
12400
12401 2000-07-02  Benjamin Chelf  <chelf@codesourcery.com>
12402
12403         * cp-tree.h (genrtl_goto_stmt): Remove declaration.
12404         (genrtl_expr_stmt): Likewise.
12405         (genrtl_decl_stmt): Likewise.
12406         (genrtl_if_stmt): Likewise.
12407         (genrtl_while_stmt): Likewise.
12408         (genrtl_do_stmt): Likewise.
12409         (genrtl_return_stmt): Likewise.
12410         (genrtl_for_stmt): Likewise.
12411         (genrtl_break_stmt): Likewise.
12412         (genrtl_continue_stmt): Likewise.
12413         (genrtl_scope_stmt): Likewise.
12414         (genrtl_switch_stmt): Likewise.
12415         (genrtl_case_label): Likewise.
12416         (genrtl_begin_compound_stmt): Likewise.
12417         (genrtl_finish_compound_stmt): Likewise.
12418         (genrtl_compound_stmt): Likewise.
12419         (genrtl_asm_stmt): Likewise.
12420
12421         * init.c (begin_init_stmts): Remove call to
12422         genrtl_begin_compound_stmt.
12423         (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
12424
12425         * semantics.c (lang_expand_stmt): Changed call to
12426         genrtl_compound_stmt to ignore return value.
12427
12428 2000-07-02  Mark Mitchell  <mark@codesourcery.com>
12429
12430         * mangle.c (canonicalize_for_substitution): Return the canonical
12431         variant of a type.
12432
12433         * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
12434         TYPE_DECL.
12435         * typeck.c (commonparms): Remove obstack manipulations.
12436
12437 2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>
12438
12439         * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
12440
12441         * Makefile.in (OBJS): Added ../c-semantics.o.
12442         (OBJDEPS): Likewise.
12443
12444         * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
12445         ../c-common.h.
12446         (struct stmt_tree): Added comment.
12447         (current_function_name_declared): Removed.
12448         (stmts_are_full_exprs_p): Likewise.
12449         (genrtl_do_pushlevel): Likewise.
12450         (genrtl_clear_out_block): Likewise.
12451         (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
12452         (DECL_ANON_UNION_ELEMS): Likewise.
12453         (emit_local_var): Likewise.
12454         (make_rtl_for_local_static): Likewise.
12455         (do_case): Likewise.
12456         (expand_stmt): Likewise.
12457         (genrtl_decl_cleanup): Likewise.
12458         (c_expand_asm_operands): Likewise.
12459         (c_expand_return): Likewise.
12460         (c_expand_start_case): Likewise.
12461
12462         * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
12463         (emit_local_var): Likewise.
12464         (initialize_local_var): Change reference to
12465         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
12466         Change reference to stmts_are_full_exprs_p to
12467         current_stmt_tree->stmts_are_full_exprs_p.
12468         (push_cp_function_context): Likewise.
12469
12470         * expect.c (expand_throw): Change reference to
12471         stmts_are_full_exprs_p.
12472
12473         * init.c (build_aggr_init): Change reference to
12474         stmts_are_full_exprs_p.
12475         (build_vec_init): Likewise.
12476
12477         * optimize.c (maybe_clone_body): Change reference to
12478         current_function_name_declared to
12479         cp_function_chain->name_declared.
12480
12481         * pt.c (instantiate_decl): Change reference to
12482         current_function_name_declared to
12483         cp_function_chain->name_declared.
12484
12485         * semantics.c (expand_cond): Moved declaration to c-common.h.
12486         (genrtl_do_pushlevel): Moved to c-semantics.c.
12487         (genrtl_clear_out_block): Likewise.
12488         (genrtl_goto_stmt): Likewise.
12489         (genrtl_expr_stmt): Likewise.
12490         (genrtl_decl_stmt): Likewise.
12491         (gerntl_if_stmt): Likewise.
12492         (genrtl_while_stmt): Likewise.
12493         (genrtl_do_stmt): Likewise.
12494         (genrtl_return_stmt): Likewise.
12495         (genrtl_for_stmt): Likewise.
12496         (genrtl_break_stmt): Likewise.
12497         (genrtl_continue_stmt): Likewise.
12498         (genrtl_scope_stmt): Likewise.
12499         (genrtl_switch_stmt): Likewise.
12500         (genrtl_case_label): Likewise.
12501         (genrtl_begin_compound_stmt): Likewise.
12502         (genrtl_finish_compound_stmt): Likewise.
12503         (genrtl_compound_stmt): Likewise.
12504         (genrtl_asm_stmt): Likewise.
12505         (genrtl_decl_cleanup): Likewise.
12506         (expand_cond): Likewise.
12507         (expand_stmt): Renamed to ...
12508         (lang_expand_stmt): ... this.
12509         (lang_expand_expr_stmt): Initialize.
12510         (set_current_function_name_declared): Likewise.
12511         (stmts_are_full_exprs_p): Likewise.
12512         (current_function_name_declared): Likewise.
12513         (anon_aggr_type_p): Likewise.
12514         (do_poplevel): Change reference to
12515         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
12516         Change reference to stmts_are_full_exprs_p to
12517         current_stmt_tree->stmts_are_full_exprs_p.
12518         (add_tree): Likewise.
12519         (finish_expr_stmt): Likewise.
12520         (prep_stmt): Likewise.
12521         (lang_expand_stmt): Likewise.
12522         (begin_compound_stmt): Change reference to
12523         current_function_name_declared to
12524         cp_function_chain->name_declared and call to
12525         current_function_name_declared().
12526         (setup_vtbl_ptr): Likewise.
12527         (genrtl_do_poplevel): Removed.
12528
12529 2000-06-30  Jason Merrill  <jason@redhat.com>
12530
12531         * init.c (init_init_processing): Go back to aligning like
12532         double_type_node for old ABI.
12533         (get_cookie_size): Make cookie larger if we get a type that needs
12534         more alignment.
12535         (build_vec_delete): Call it.
12536
12537         * typeck.c (qualify_type_recursive): New fn.
12538         (composite_pointer_type): Use it.
12539         (build_binary_op): Use composite_pointer_type.
12540
12541 2000-06-24  Carlos O'Ryan  <coryan@cs.wustl.edu>
12542             Jason Merrill  <jason@redhat.com>
12543
12544         * typeck.c (check_return_expr): Don't complain about returning
12545         NULL from operator new if -fcheck-new.
12546         * cp-tree.h: Declare flag_check_new here.
12547         * init.c: Not here.
12548
12549 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
12550
12551         * mangle.c (find_substitution): Use same_type_p.
12552         (write_encoding): Don't check for substitutions.
12553
12554 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
12555
12556         * parse.y (expr_no_comma_rangle): New non-terminal.
12557         (template_parm): Use it for default parameter case.
12558         (template_arg): Use it.
12559         (expr_no_commas): Remove commented out undefined extensions.
12560         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
12561         * parse.h, parse.c: Rebuilt.
12562
12563 2000-06-30  Mark Mitchell  <mark@codesourcery.com>
12564
12565         * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
12566         (finish_asm_stmt): Do it here, instead.
12567
12568         * cp-tree.h (ridpointers): Don't declare.
12569         * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
12570         (record_builtin_java_type): Likewise.
12571         (init_decl_processing): Likewise.
12572         * lex.c: Move inclusion of lex.h.
12573         (ridpointers): Don't define.
12574         (init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
12575         RID_MAX.
12576         * lex.h (enum rid): Rename to ...
12577         (enum cp_rid): ... this.
12578         (ridpointers): Don't declare.
12579         * parse.y: Move inclusion of lex.h.
12580         * parse.c: Regenerated.
12581         * spew.c: Move inclusion of lex.h.
12582
12583         * cp-tree.h (struct language_function): Remove temp_name_counter.
12584         (temp_name_counter): Remove.
12585         (get_temp_name): Change prototype.
12586         (get_guard): New function.
12587         (get_guard_cond): Likewise.
12588         (set_guard): Likewise.
12589         * cvt.c (build_up_reference): Adjust call to get_temp_name.
12590         * decl.c (expand_static_init): Use get_guard and friends to
12591         implement guard variables.
12592         * decl2.c (get_temp_name): Assume that the variables created are
12593         always static.
12594         (get_sentry): Rename to ...
12595         (get_guard): ... this.  Implement new ABI guard variables.
12596         (get_guard_bits): New function.
12597         (get_guard_cond): Likewise.
12598         (set_guard): Likewise.
12599         (start_static_initialization_or_destruction): Use them.
12600         (do_static_initialization): Replace sentry with guard throughout.
12601         (do_static_destruction): Likewise.
12602         * init.c (create_temporary_var): Add comment.
12603
12604 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
12605
12606         * mangle.c (find_substitution): Use same_type_p.
12607         (write_encoding): Don't check for substitutions.
12608
12609 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
12610
12611         * parse.y (expr_no_comma_rangle): New non-terminal.
12612         (template_parm): Use it for default parameter case.
12613         (template_arg): Use it.
12614         (expr_no_commas): Remove commented out undefined extensions.
12615         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
12616         * parse.h, parse.c: Rebuilt.
12617
12618 2000-06-29  Mark Mitchell  <mark@codesourcery.com>
12619
12620         * cp-tree.h (flag_const_strings): Remove.
12621         (warn_parentheses): Likewise.
12622         (warn_format): Likewise.
12623         (common_type): Likewise.
12624         (default_conversion): Likewise.
12625         (build_binary_op): Likewise.
12626         (cp_build_binary_op): New macro.
12627         * call.c (build_new_op): Use cp_build_binary_op instead of
12628         build_binary_op.
12629         * class.c (build_vtable_entry_ref): Likewise.
12630         * decl.c (expand_static_init): Likewise.
12631         (compute_array_index_type): Likewise.
12632         (build_enumerator): Likewise.
12633         * decl2.c (delete_sanity): Likewise.
12634         (start_static_initialization_or_destruction): Likewise.
12635         * error.c (dump_type_suffix): Likewise.
12636         * init.c (resolve_offset_ref): Likewise.
12637         (build_new): Likewise.
12638         (build_new_1): Likewise.
12639         (build_vec_delete_1): Likewise.
12640         (build_vec_init): Likewise.
12641         (build_delete): Likewise.
12642         * rtti.c (synthesize_tinfo_fn): Likewise.
12643         (synthesize_tinfo_var): Likewise.
12644         * search.c (expand_upcast_fixups): Likewise.
12645         (fixup_all_virtual_upcast_offsets): Likewise.
12646         * typeck.c (build_array_ref): Likewise.
12647         (get_member_function_from_ptrfunc): Likewise.
12648         (build_binary_op): Add parameter.
12649         (pointer_int_sum): Use cp_build_binary_op.
12650         (pointer_diff): Likewise.
12651         (build_modify_expr): Likewise.
12652         (get_delta_difference): Likewise.
12653         (build_ptrmemfunc): Likewise.
12654
12655 2000-06-29  Nathan Sidwell  <nathan@codesourcery.com>
12656
12657         * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
12658         * decl.c (create_implicit_typedef): Adjust.
12659         * decl2.c (build_artificial_parm): Adjust.
12660         * method.c (implicitly_declare_fn): Adjust.
12661         * pt.c (push_inline_template_parms_recursive): Adjust.
12662         (process_template_parm): Adjust.
12663         (overloaded_template_name): Adjust.
12664         * semantics.c (finish_template_template_parm): Adjust.
12665
12666 2000-06-28  Mark Mitchell  <mark@codesourcery.com>
12667
12668         * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
12669         * class.c (update_vtable_entry_for_fn): Correct logic for deciding
12670         where to emit thunks.
12671         (build_vtt): Adjust call to build_vtt_inits.
12672         (build_vtt_inits): Add parameter to indicate whether or not
12673         sub-VTTs for virtual bases should be included.  Adjust handling of
12674         construction vtables.
12675         (get_matching_base): New function.
12676         (dfs_build_vtt_inits): Rename to ...
12677         (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
12678         construction vtables.
12679         (dfs_fixup_binfo_vtbls): Likewise.
12680         (build_ctor_vtbl_groups): Build construction vtables for virtual
12681         bases, too.
12682         (accumulate_vtbl_inits): Tweak logic for deciding whether or not
12683         to build construction vtbls.
12684         (dfs_accumulate_vtbl_inits): Adjust handling of
12685         construction vtables.
12686
12687         * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
12688         types correctly.
12689
12690 2000-06-27  Mark Mitchell  <mark@codesourcery.com>
12691
12692         * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
12693
12694 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
12695
12696         * search.c (hides): Remove.
12697         (is_subobject_of_p): Add most_derived parameter. Use
12698         CANONICAL_BINFO.
12699         (lookup_field_queue_p): Adjust.
12700         (lookup_field_r): Adjust.
12701
12702 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
12703
12704         * decl2.c (handle_class_head): Bash typedefs to the type's main
12705         decl.
12706
12707 2000-06-25  Mark Mitchell  <mark@codesourcery.com>
12708
12709         * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
12710         (begin_global_stmt_expr): ... this.
12711         (genrtl_finish_stmt_expr): Rename to ...
12712         (finish_global_stmt_expr): ... this.
12713         * init.c (begin_init_stmts): Adjust calls.
12714         (finish_init_stmts): Likewise.
12715         * semantics.c (genrtl_begin_stmt_expr): Rename to ...
12716         (begin_global_stmt_expr): ... this.
12717         (genrtl_finish_stmt_expr): Rename to ...
12718         (finish_global_stmt_expr): ... this.
12719
12720 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
12721
12722         * search.c (lookup_member): Fix typo in comment.
12723
12724 2000-06-24  Jason Merrill  <jason@redhat.com>
12725
12726         * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
12727         (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
12728
12729 2000-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
12730
12731         * parse.y (complex_direct_notype_declarator): Support global_scope.
12732         * Makefile.in: Adjust conflict count.
12733
12734 2000-06-23  Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
12735
12736         * parse.y (template_arg): Convert TEMPLATE_DECL
12737         that is a template template parameter to
12738         TEMPLATE_TEMPLATE_PARM here.
12739
12740         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
12741         * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
12742         (copy_template_template_parm): Adjust prototype.
12743         * decl.c (grokdeclarator): Remove dead code.
12744         * pt.c (process_template_parm): Tidy.
12745         (lookup_template_class): Construct nodes in
12746         copy_template_template_parm.
12747         (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
12748         lookup_template_class.  Use TYPE_TI_TEMPLATE.
12749         * tree.c (copy_template_template_parm): Add NEWARGS
12750         parameter.
12751         (mapcar): Adjust call to copy_template_template_parm.
12752         * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
12753         * method.c (build_template_template_parm_names): Change error
12754         code to avoid compilation warning.
12755
12756         * gxxint.texi: Document template template parameter
12757         name mangling.
12758
12759 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
12760
12761         * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
12762         (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
12763         (cp-demangle.o): New rule.
12764         (dyn-string.o): Likewise.
12765         * inc/cxxabi.h (__cxa_demangle): New declaration.
12766
12767 2000-06-22  Mark Mitchell  <mark@codesourcery.com>
12768
12769         * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
12770         (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
12771         (lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
12772         a tree, not an int.
12773         (THUNK_GENERATE_WITH_VTABLE_P): New macro.
12774         (make_thunk): Change prototype.
12775         (emit_thunk): Rename to use_thunk.
12776         (mangle_thunk): Change prototype.
12777         * class.c (get_derived_offset): Simplify.
12778         (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
12779         BV_GENERATE_THUNK_WITH_VTABLE_P.
12780         (build_primary_vtable): Simplify.
12781         (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
12782         (dfs_find_base): Remove.
12783         (update_vtable_entry_for_fn): Correct bug in finding the base
12784         where a virtual function was first declared.  Figure out whether
12785         or not to emit a vcall-thunk with the vtables in which it appears.
12786         Correct logic for deciding whether to use an ordinary thunk, or a
12787         vcall thunk.
12788         (finish_struct_1): Remove unnecssary code.
12789         (build_vtbl_initializer): Use ssize_int for the running counter of
12790         negative indices.
12791         (build_vtbl_initializer): Only use vcall thunks where necessary.
12792         Mark thunks as needing to be emitted with their vtables, or not.
12793         (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
12794         indices.  Use size_binop.
12795         (dfs_build_vcall_offset_vtbl_entries): Don't rely on
12796         BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
12797         size_binop.
12798         (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
12799         (build_vtable_entry): Mark thunks as needing to be emitted with
12800         their vtables, or not.
12801         * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
12802         * decl2.c (mark_vtable_entries): Use use_thunk instead of
12803         emit_thunk.
12804         * dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
12805         information.
12806         * error.c (dump_expr): Use BV_FN.
12807         * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
12808         not an int.
12809         * method.c (make_thunk): Likewise.
12810         (emit_thunk): Rename to use_thunk.  Allow callers to decide
12811         whether or not to actually emit the thunk.  Adjust for changes in
12812         representation of vcall offsets.
12813         * search.c (dfs_get_pure_virtuals): Use BV_FN.
12814         * semantics.c (emit_associated_thunks): New function.
12815         (expand_body): Use it.
12816         * ir.texi: Adjust decriptions of thunks.
12817
12818 2000-06-22  Jason Merrill  <jason@redhat.com>
12819
12820         * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
12821         (tsubst_friend_function): Copy it here.
12822
12823         * decl.c (grok_op_properties): Fix typo.
12824
12825         * decl2.c (delete_sanity): Clarify warning, avoid failure on
12826         deleting void*.
12827
12828         * pt.c (check_explicit_specialization): Clarify error.
12829
12830         * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
12831         an old OVERLOAD when we're declaring a non-function.
12832         (pushdecl, destroy_local_var): Check for error_mark_node.
12833         (warn_extern_redeclared_static): Also bail early if
12834         we're a CONST_DECL.
12835         (push_overloaded_decl): Ignore an old error_mark_node.
12836
12837 2000-06-22  Nathan Sidwell  <nathan@codesourcery.com>
12838
12839         * call.c (build_x_va_arg): Check if in a template decl.
12840         * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
12841
12842 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12843
12844         * class.c (push_lang_context): TYPE_NAME gets you to the Java
12845         types DECLs.
12846         * decl.c (check_goto): Computed gotos assumed OK.
12847
12848 2000-06-20  Jason Merrill  <jason@redhat.com>
12849
12850         * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
12851         for which we don't need to look for instantiations.
12852
12853 2000-06-21  Nathan Sidwell  <nathan@codesourcery.com>
12854
12855         * parse.y (program): Always call finish_translation_unit.
12856         * parse.c, parse.h: Rebuilt.
12857
12858 2000-06-20  Zack Weinberg  <zack@wolery.cumb.org>
12859
12860         * method.c: Don't include hard-reg-set.h.
12861
12862 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
12863
12864         * rtti.c (get_base_offset): Cope when vbase field is in a base.
12865
12866 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
12867
12868         * call.c (build_conditional_expr): Use VOID_TYPE_P.
12869         * cvt.c (cp_convert_to_pointer): Likewise.
12870         (convert_to_void): Likewise.
12871         * error.c (dump_expr): Likewise.
12872         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
12873         * init.c (build_delete): Likewise.
12874         * method.c (emit_thunk): Likewise.
12875         * optmize.c (declare_return_variable): Likewise.
12876         * rtti.c (get_tinfo_decl_dynamic): Likewise.
12877         (get_typeid): Likewise.
12878         (build_dynamic_cast_1): Likewise.
12879         * typeck.c (composite_pointer_type): Likewise.
12880         (common_type): Likewise.
12881         (build_indirect_ref): Likewise.
12882         (build_binary_op): Likewise.
12883         (build_x_compound_expr): Likewise.
12884         (check_return_expr): Likewise.
12885         * typeck2.c (add_exception_specifier): Likewise.
12886
12887         * mangle.c (write_method_parms): Use direct comparison for end
12888         of parmlist.
12889
12890 2000-06-19  Benjamin Chelf  <chelf@codesourcery.com>
12891
12892         * cp-tree.h (genrtl_try_block): Declare function.
12893         (genrtl_handler): Likewise.
12894         (genrtl_catch_block): Likewise.
12895         (genrtl_ctor_stmt): Likewise.
12896         (genrtl_subobject): Likewise.
12897         (genrtl_decl_cleanup): Likewise.
12898         (genrtl_do_poplevel): Likewise.
12899         (genrtl_do_pushlevel): Likewise.
12900         (genrtl_clear_out_block): Likewise.
12901         (genrtl_goto_stmt): Likewise.
12902         (genrtl_expr_stmt): Likewise.
12903         (genrtl_decl_stmt): Likewise.
12904         (genrtl_if_stmt): Likewise.
12905         (genrtl_while_stmt): Likewise.
12906         (genrtl_do_stmt): Likewise.
12907         (genrtl_return_stmt): Likewise.
12908         (genrtl_for_stmt): Likewise.
12909         (genrtl_break_stmt): Likewise.
12910         (genrtl_continue_stmt): Likewise.
12911         (genrtl_scope_stmt): Likewise.
12912         (genrtl_switch_stmt): Likewise.
12913         (genrtl_case_label): Likewise.
12914         (genrtl_begin_compound_stmt): Likewise.
12915         (genrtl_finish_compound_stmt): Likewise.
12916         (genrtl_compound_stmt): Likewise.
12917         (genrtl_asm_stmt): Likewise.
12918         (genrtl_named_return_value): Likewise.
12919         (genrtl_begin_stmt_expr): Likewise.
12920         (genrtl_finish_stmt_expr): Likewise.
12921         (finish_for_stmt): Removed first argument.
12922         (finish_switch_stmt): Likewise.
12923
12924         * semantics.c (genrtl_try_block): Define function.
12925         (genrtl_handler): Likewise.
12926         (genrtl_catch_block): Likewise.
12927         (genrtl_ctor_stmt): Likewise.
12928         (genrtl_subobject): Likewise.
12929         (genrtl_decl_cleanup): Likewise.
12930         (genrtl_do_poplevel): Likewise.
12931         (genrtl_do_pushlevel): Likewise.
12932         (genrtl_clear_out_block): Likewise.
12933         (genrtl_goto_stmt): Likewise.
12934         (genrtl_expr_stmt): Likewise.
12935         (genrtl_decl_stmt): Likewise.
12936         (genrtl_if_stmt): Likewise.
12937         (genrtl_while_stmt): Likewise.
12938         (genrtl_do_stmt): Likewise.
12939         (genrtl_return_stmt): Likewise.
12940         (genrtl_for_stmt): Likewise.
12941         (genrtl_break_stmt): Likewise.
12942         (genrtl_continue_stmt): Likewise.
12943         (genrtl_scope_stmt): Likewise.
12944         (genrtl_switch_stmt): Likewise.
12945         (genrtl_case_label): Likewise.
12946         (genrtl_begin_compound_stmt): Likewise.
12947         (genrtl_finish_compound_stmt): Likewise.
12948         (genrtl_compound_stmt): Likewise.
12949         (genrtl_asm_stmt): Likewise.
12950         (genrtl_named_return_value): Likewise.
12951         (genrtl_begin_stmt_expr): Likewise.
12952         (genrtl_finish_stmt_expr): Likewise.
12953         (finish_for_stmt): Removed first argument and generate rtl
12954         specific code.
12955         (finish_switch_stmt): Likewise.
12956         (do_poplevel): Removed generate rtl specific code.
12957         (do_pushlevel): Likewise.
12958         (add_tree): Likewise.
12959         (finish_goto_stmt): Likewise.
12960         (finish_expr_stmt): Likewise.
12961         (begin_if_stmt): Likewise.
12962         (finish_if_stmt_cond): Likewise.
12963         (finish_then_clause): Likewise.
12964         (begin_else_clause): Likewise.
12965         (finish_else_clause): Likewise.
12966         (finish_if_stmt): Likewise.
12967         (clear_out_block): Likewise.
12968         (begin_while_stmt): Likewise.
12969         (finish_while_stmt_cond): Likewise.
12970         (finish_while_stmt): Likewise.
12971         (begin_do_stmt): Likewise.
12972         (finish_do_body): Likewise.
12973         (finish_do_stmt): Likewise.
12974         (finish_return_stmt): Likewise.
12975         (begin_for_stmt): Likewise.
12976         (finish_for_init_stmt): Likewise.
12977         (finish_for_cond): Likewise.
12978         (finish_for_expr): Likewise.
12979         (finish_break_stmt): Likewise.
12980         (finish_continue_stmt): Likewise.
12981         (begin_switch_stmt): Likewise.
12982         (finish_switch_cond): Likewise.
12983         (finish_case_label): Likewise.
12984         (begin_try_block): Likewise.
12985         (begin_function_try_block): Likewise.
12986         (finish_try_block): Likewise.
12987         (finish_cleanup_try_block): Likewise.
12988         (finish_cleanup): Likewise.
12989         (finish_function_try_block): Likewise.
12990         (finish_handler_sequence): Likewise.
12991         (finish_function_handler_sequence): Likewise.
12992         (begin_handler): Likewise.
12993         (finish_handler_parms): Likewise.
12994         (begin_catch_block): Likewise.
12995         (finish_handler): Likewise.
12996         (begin_compound_stmt): Likewise.
12997         (finish_compound_stmt): Likewise.
12998         (finish_asm_stmt): Likewise.
12999         (finish_label_stmt): Likewise.
13000         (finish_label_decl): Likewise.
13001         (finish_subobject): Likewise.
13002         (finish_decl_cleanup): Likewise.
13003         (finish_named_return_value): Likewise.
13004         (begin_stmt_expr): Likewise.
13005         (finish_stmt_expr): Likewise.
13006
13007         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
13008         to call genrtl_expr_stmt when appropriate.
13009
13010         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
13011         begin_compound_expr to call genrtl_begin_stmt_expr and
13012         genrtl_begin_compound_expr when appropriate.
13013         (finish_init_stmts): Changed calls to finish_compound_expr and
13014         finish_stmt_expr to call genrtl_finish_compound_expr and
13015         genrtl_finish_stmt_expr when appropriate.
13016         (expand_default_init): Changed call to finish_expr_stmt to call
13017         genrtl_expr_stmt when appropriate.
13018         (build_vec_init): Likewise.
13019
13020         * parse.y (simple_stmt): Removed first argument from call to
13021         finish_for_stmt. Removed first argument from call to
13022         finish_switch_stmt.
13023
13024         * parse.c: Regenerated.
13025
13026         * pt.c (tsubst_expr): Removed first argument from call to
13027         finish_for_stmt. Removed first argument from call to
13028         finish_switch_stmt.
13029
13030 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
13031
13032         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
13033         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
13034
13035         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
13036         (cplus_tree_code_length[]): Likewise.
13037         (cplus_tree_code_name[]): Likewise.
13038         (init_parse): Added call to add_c_tree_codes. Changed
13039         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
13040
13041 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
13042
13043         * cp-tree.h (finish_mem_initializers): Declare.
13044         (count_trees): Likewise.
13045         * parse.y (base_init): Use finish_mem_initializers.
13046         * semantics.c (finish_mem_initializers): New function.
13047
13048         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
13049         the number of trees.
13050         (n_trees): Remove.
13051         (count_trees): Don't use it.
13052
13053 2000-06-15  Jason Merrill  <jason@redhat.com>
13054
13055         * tree.c (count_trees): New debugging function.
13056
13057         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
13058         * init.c (build_member_call): Pull out the name of a DECL.
13059
13060         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
13061         * semantics.c (expand_body): Push to TV_INTEGRATION here.
13062         * optimize.c (optimize_function): Not here.
13063         * pt.c (instantiate_decl): Push to TV_PARSE.
13064
13065 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
13066
13067         * cp-tree.h (struct language_function): Remove x_base_init_list
13068         and x_member_init_list.
13069         (current_base_init_list): Remove.
13070         (current_member_init_list): Likewise.
13071         (setup_vtbl_ptr): Change prototype.
13072         (emit_base_init): Likewise.
13073         (expand_member_init): Likewise.
13074         (reinit_parse_for_function): Remove.
13075         * decl.c (save_function_data): Don't clear x_base_init_list and
13076         x_member_init_list.
13077         (mark_language_function): Don't mark them.
13078         * init.c (perform_member_init): Tweak comment.
13079         (sort_member_init): Take the list of initializers as an argument.
13080         (sort_base_init): Likewise.
13081         (emit_base_init): Likewise.
13082         (expand_member_init): Return the initializer.  Don't use global
13083         variables.
13084         * lex.c (reinit_parse_for_function): Remove.
13085         * method.c (build_template_parm_names): Correct substitution.
13086         (do_build_copy_constructor): Don't use current_member_init_list
13087         and current_base_init_list.
13088         (synthesize_method): Likewise.
13089         * parse.y (base_init): Split mem-initializers into
13090         base-initializers and field-initializers.
13091         (member_init_list): Build up the list here.
13092         (member_init): Return the initializer.
13093         (fn.depfn): Don't use reinit_parse_for_function.
13094         * parse.c: Regenerated.
13095         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
13096         ERROR_MARK.
13097         (tsubst_expr): Don't use current_member_init_list
13098         and current_base_init_list.
13099         (tsubst_expr_values): Rename to ...
13100         (tsubst_initializer_list): ... this.  Use convert_from_reference.
13101         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
13102         and current_base_init_list.
13103         (begin_function_definition): Don't call reinit_parse_for_function.
13104
13105         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
13106
13107         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
13108         correctly.
13109
13110         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
13111
13112 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
13113
13114         * cp-tree.h (IF_COND): Move to c-common.h.
13115         (THEN_CLAUSE): Likewise.
13116         (ELSE_CLAUSE): Likewise.
13117         (WHILE_COND): Likewise.
13118         (WHILE_BODY): Likewise.
13119         (DO_COND): Likewise.
13120         (DO_BODY): Likewise.
13121         (RETURN_EXPR): Likewise.
13122         (EXPR_STMT_EXPR): Likewise.
13123         (FOR_INIT_STMT): Likewise.
13124         (FOR_COND): Likewise.
13125         (FOR_EXPR): Likewise.
13126         (FOR_BODY): Likewise.
13127         (SWITCH_COND): Likewise.
13128         (SWITCH_BODY): Likewise.
13129         (CASE_LOW): Likewise.
13130         (CASE_HIGH): Likewise.
13131         (GOTO_DESTINATION): Likewise.
13132         (COMPOUND_BODY): Likewise.
13133         (ASM_CV_QUAL): Likewise.
13134         (ASM_STRING): Likewise.
13135         (ASM_OUTPUTS): Likewise.
13136         (ASM_INPUTS): Likewise.
13137         (ASM_CLOBBERS): Likewise.
13138         (DECL_STMT_DECL): Likewise.
13139         (STMT_EXPR_STMT): Likewise.
13140         (LABEL_STMT_LABEL): Likewise.
13141         (SCOPE_BEGIN_P): Likewise.
13142         (SCOPE_END_P): Likewise.
13143         (SCOPE_STMT_BLOCK): Likewise.
13144         (SCOPE_NULLIFIED_P): Likewise.
13145         (SCOPE_NO_CLEANUPS_P): Likewise.
13146         (SCOPE_PARTIAL_P): Likewise.
13147         (ASM_VOLATILE_P): Likewise.
13148         (STMT_LINENO): Likewise.
13149         (STMT_LINENO_FOR_FN_P): Likewise.
13150
13151         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
13152         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
13153         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
13154         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
13155         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
13156
13157         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
13158
13159         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
13160         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
13161
13162         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
13163         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
13164         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
13165
13166 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
13167
13168         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
13169         * class.c (dfs_find_final_overrider): Set it appropriately.
13170         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
13171         avoid unneeded secondary vptrs.
13172
13173 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
13174
13175         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
13176         (check_bitfield_decl, check_field_decl): Likewise.
13177         (build_vtbl_or_vbase_field, build_base_field): Likewise.
13178         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
13179         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
13180         (xfer_tag, finish_enum): Likewise.
13181         * decl2.c (finish_builtin_type): Likewise.
13182         * init.c (init_init_processing): Likewise.
13183         * pt.c (instantiate_class_template): Likewise.
13184         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
13185         * cp-tree.h (struct lang_type): Add user_align member.
13186         (CLASSTYPE_USER_ALIGN): Define.
13187
13188 Tue Jun 13 15:48:03 2000  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
13189
13190         * Make-lang.in (c++.install-common): Install g++-cross in
13191         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
13192         $(target_alias)-g++ and $(target_alias)-c++.
13193
13194 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
13195
13196         * class.c (vcall_offset_data_s): Add last_init and fns.
13197         (overrides): Rename to same_signature_p.
13198         (dfs_find_final_overrider): Adjust accordingly.
13199         (mark_overriders): Likewise.
13200         (warn_hidden): Likewise.
13201         (build_vtbl_initializer): Reorganize machinery for building things
13202         at negative offsets.
13203         (build_vcall_and_vbase_vtbl_entries): Likewise.
13204         (build_vbase_offset_vtbl_entries): Likewise.
13205         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
13206         offset entries.  Do not create two entries for functions with the
13207         same signature.
13208         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
13209         (build_rtti_vtbl_entries): Reorganize machinery for building things
13210         at negative offsets.
13211
13212         * optimize.c (expand_call_inline): Don't recurse into the code
13213         used to initialize the parameters more than once.
13214
13215 2000-06-11  Mark Mitchell <mark@codesourcery.com>
13216
13217         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
13218         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
13219         (find_substitution): Only use the `Sa' substitution for
13220         std::allocator, not instantiations of it.
13221         (write_template_prefix): Move comment.  Only use a TREE_LIST to
13222         represent substitutions for a member template.
13223         (write_array_type): Mangle array dimensions correctly.
13224         * optimize.c (maybe_clone_body): Copy more information from the
13225         cloned function.
13226         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
13227         on the regenerated declaration.
13228
13229 2000-06-11  Chip Salzenberg  <chip@valinux.com>
13230             Mark Mitchell <mark@codesourcery.com>
13231
13232         * class.c (build_vtable): Clarify comment.
13233         (build_ctor_vtbl_group): Pass the most derived type to
13234         build_vtable.
13235
13236 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13237
13238         * decl2.c (compare_options): Don't needlessly cast away const-ness.
13239
13240 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
13241
13242         * decl.c (add_binding): Handle duplicate declarations of external
13243         variables.
13244
13245 2000-06-09  Chip Salzenberg  <chip@valinux.com>
13246             Mark Mitchell <mark@codesourcery.com>
13247
13248         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
13249         argument.
13250         (write_signed_number): New macro.
13251         (write_unsigned_number): Likewise.
13252         (write_source_name): Use them.
13253         (write_number): Handle signed and unsigned values.
13254         (write_integer_cst): Use tree_int_cst_sgn, and use
13255         write_unsigned_number or write_signed_number as appropriate.
13256         (write_discriminator): Use write_unsigned_number or
13257         write_signed_number as appropriate.
13258         (write_template_arg_literal): Likewise.
13259         (write_array_type): Use tree_low_cst.
13260         (write_template_parm):  Use write_unsigned_number or
13261         write_signed_number as appropriate.
13262         (write_substitution): Adjust call to write_number.
13263         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
13264         (write_expression): Handle non-type template arguments of
13265         reference type correctly.
13266         (mangle_thunk): Use write_signed_number.
13267
13268 2000-06-09  Chip Salzenberg  <chip@valinux.com>
13269
13270         * mangle.c (find_substition): Don't mangle objects with typename
13271         substitutions (e.g. "cin" as "Si").
13272
13273 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
13274
13275         * call.c (add_candidate): Use ggc_alloc_cleared.
13276         * decl.c (lookup_label): Likewise.
13277         * lex.c (retrofit_lang_decl): Likewise.
13278
13279 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
13280
13281         * semantics.c (expand_body): Push to TV_EXPAND.
13282         * optimize.c (optimize_function): Push to TV_INTEGRATION.
13283         * decl.c (start_function): Always call announce_function.
13284
13285         * tinfo2.cc: Just declare abort.
13286
13287 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
13288
13289         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
13290         whenever @ is a symbolic name.
13291
13292 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
13293
13294         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
13295
13296 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
13297
13298         * decl.c (pushdecl): Look up functions by DECL_NAME, not
13299         DECL_ASSEMBLER_NAME.
13300
13301 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
13302
13303         * decl2.c (c_language): Define.
13304
13305 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
13306
13307         * lex.c (lang_init_options): Tweak.
13308
13309         * decl2.c: Remove #inclusion of diagnostic.h
13310         (lang_decode_option): Move diagnostic formatting options to
13311         toplevel.
13312
13313         * lang-options.h: Remove documentation for diagnostic options.
13314
13315         * Makefile.in (lex.o): Depends upon diagnostic.h
13316
13317 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
13318
13319         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
13320         the same DECL_RESULT, it's not a redefinition.
13321         * pt.c (tsubst_decl): Remove code to handle illegal
13322         specializations.
13323
13324 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
13325
13326         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
13327
13328 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
13329
13330         * search.c (maybe_suppress_debug_info): Don't check
13331         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
13332
13333         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
13334         here if extern_p.
13335
13336         Remember instantiation context in deferred instantiations.
13337         * cp-tree.h (struct tinst_level): Remove.
13338         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
13339         * pt.c (current_tinst_level): Now a tree.
13340         (print_template_context, push_tinst_level, pop_tinst_level,
13341         tinst_for_decl): Adjust.
13342         (reopen_tinst_level): New fn.
13343         (init_pt): Register current_tinst_level as a root.
13344         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
13345         of the pending templates list.
13346         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
13347         * lex.c (extract_interface_info): Adjust.
13348         * decl2.c (warn_if_unknown_interface): Adjust.
13349
13350 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
13351
13352         * class.c (indirect_primary_base_p): New function.
13353         (determine_primary_base): Use it.
13354
13355 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
13356
13357         Update new-abi dynamic cast algorithm.
13358         * tinfo.cc (__class_type_info::__dyncast_result): Add
13359         whole_details. Adjust constructor.
13360         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
13361         Avoid unnecessary searching.
13362         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
13363
13364 Mon Jun  5 06:48:55 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13365
13366         * decl.c (init_decl_processing): Don't call record_component_aliases.
13367         * tree.c (build_cplus_array_type_1): Likewise.
13368
13369 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
13370
13371         * ir.texi: Correct typo.
13372         * mangle.c (write_expression): Handle non-type template arguments
13373         with reference type.
13374         * method.c (build_overload_value): Likewise.
13375         * pt.c (convert_nontype_argument): Explicitly represent conversion
13376         to a reference with an ADDR_EXPR.
13377         (unify): Always unify arguments in left-to-right order.
13378
13379 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
13380             Mark Mitchell  <mark@codesourcery.com>
13381
13382         * Make-lang.in (CXX_SRCS): Add mangle.c.
13383         * Makefile.in (CXX_OBJS): Add mangle.o.
13384         (mangle.o): New rule.
13385
13386         * class.c (local_classes): New variable.
13387         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
13388         (get_vtt_name): Use mangle_vtt_name for new ABI.
13389         (init_class_processing): Initialize local_classes.
13390         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
13391         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
13392         (std_identifier): New macro.
13393         (DECL_VOLATILE_MEMFUNC_P): New macro.
13394         (DECL_NAMESPACE_STD_P): Likewise.
13395         (local_classes): Declare.
13396         (get_mostly_instantiated_function_type): Declare.
13397         (init_mangle): Declare.
13398         (mangle_decl): Likewise.
13399         (mangle_type_string): Likewise.
13400         (mangle_type): Likewise.
13401         (mangle_typeinfo_for_type): Likewise.
13402         (mangle_typeinfo_string_for_type): Likewise.
13403         (mangle_vtbl_for_type): Likewise.
13404         (mangle_vtt_for_type): Likewise.
13405         (mangle_ctor_vtbl_for_type): Likewise.
13406         (mangle_thunk): Likewise.
13407         (mangle_conv_op_name_for_type): Likewise.
13408         (mangle_guard_variable): Likewise.
13409         * decl.c (pushtag): Keep track of local classes.
13410         (initialize_predefined_identifiers): Initialize std_identifier.
13411         (init_decl_processing): Use std_identifier.
13412         (start_decl): Don't treat instantiations as specializations.
13413         (grokdeclarator): Likewise.
13414         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
13415         name for fully-instantiated templates.
13416         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
13417         destructors with the new ABI.
13418         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
13419         (grokfield): Use mangle_type for new ABI.
13420         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
13421         (get_sentry): Use mangle_guard_variable for new ABI.
13422         (start_static_initialization_or_destruction): Likewise.
13423         * expr.c (extract_aggr_init): Remove.
13424         (extract_scalar_init): Likewise.
13425         (extract_init): Remove #if 0'd code.
13426         * mangle.c: New function.
13427         * method.c (build_mangled_name): Assert not flag_new_abi.
13428         (build_static_name): Likewise.
13429         (build_decl_overload_real): Likewise.
13430         (build_typename_overload): Likewise.
13431         (build_overload_with_type): Likewise.
13432         (build_overload_name): Likewise.
13433         (get_ctor_vtbl_name): Likewise.
13434         (start_squangling): Likewise.
13435         (get_id_2): Likewise.
13436         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
13437         (init_method): Call init_mangle for new ABI.
13438         (make_thunk): Call mangle_thunk for new ABI.
13439         * operators.def: Correct new ABI manglings for the `%' operator.
13440         Add `::' operator.
13441         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
13442         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
13443         (lookup_template_class): Call mangle_decl for new ABI.
13444         (get_mostly_instantiated_function_type): New function.
13445         (set_mangled_name_for_template_decl): Use it.
13446         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
13447         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
13448         conversion op names.
13449         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
13450         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
13451         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
13452         mangle_typeinfo_string_for_type.
13453
13454 2000-06-03  Mark Mitchell  <mark@codesourcery.com>
13455
13456         * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
13457         (INNERMOST_TEMPLATE_ARGS): New macro.
13458         (innermost_args): Remove.
13459         (get_innermost_template_args): New function.
13460         * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
13461         * error.c (dump_function_decl): Be caution when using
13462         most_general_template.
13463         * method.c (build_template_parm_names):  Use
13464         INNERMOST_TEMPLATE_ARGS.
13465         * pt.c (add_to_template_args): Tidy comment
13466         (get_innermost_template_args): New function.
13467         (check_explicit_specialization): Clear DECL_INITIAL for a new
13468         specialization.
13469         (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
13470         Tidy.
13471         (push_template_decl): Always register specializations of the most
13472         general template.
13473         (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
13474         (coerce_template_parms): Likewise.
13475         (lookup_template_class): Likewise.
13476         (innermost_args): Remove.
13477         (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
13478         (tsubst_decl): Handle tricky specializations.  Use
13479         get_innermost_template_args.
13480         (instantiate_template): Simplify handling of partial
13481         instantiations.
13482         (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
13483         (most_general_template): Reimplement, in a more straightforward
13484         manner.
13485         (regenerate_decl_from_template): Tweak formatting.  Use
13486         TMPL_ARGS_DEPTH for clarity.
13487         (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
13488
13489         * dump.c (dequeue_and_dump): Dump information about thunks.
13490
13491 2000-06-01  Richard Henderson  <rth@cygnus.com>
13492
13493         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
13494
13495 2000-06-01  Richard Henderson  <rth@cygnus.com>
13496
13497         * decl2.c (unsupported_options): Fix typo, make const.
13498         (lang_decode_option): Fix bsearch argument order.
13499
13500 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
13501
13502         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
13503         on FIELD_DECLs.
13504
13505 Wed May 31 14:09:00 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13506
13507         * cp-tree.h (c_get_alias_set): Deleted.
13508         * Makefile.in (decl.o): Include ../expr.h.
13509         * decl.c (expr.h): Include.
13510         (init_decl_processing): Call record_component_aliases for arrays.
13511         (grokdeclarator): Likewise.
13512         Set TREE_ADDRESSABLE for fields that aren't bitfields.
13513         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
13514
13515 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
13516
13517         Remove guiding declaration support.
13518         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
13519         (flag_guiding_decls): Remove.
13520         * call.c (build_user_type_conversion_1): Remove support for
13521         guiding decls.
13522         (build_new_function_call): Likewise.
13523         (build_new_op): Likewise.
13524         (build_new_method_call): Likewise.
13525         * decl.c (start_function): Likewise.
13526         * friend.c (is_friend): Likewise.
13527         (do_friend): Likewise.
13528         * decl2.c ((flag_dump_translation_unit): Make it const.
13529         (flag_guiding_decls): Remove.
13530         (unsupported_options): New variable
13531         (compare_options): New function.
13532         (lang_decode_option): Use them.
13533
13534         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
13535
13536         * method.c (mangle_expression): Adjust test for legal expression
13537         operators.
13538
13539         * pt.c (instantiate_decl): Save and restore the local
13540         specializations list.
13541
13542 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
13543
13544         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
13545
13546 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
13547
13548         * call.c (add_template_candidate_real): Handle member template
13549         constructors for classes with virtual bases.
13550         (build_user_type_conversion_1): Use in_charge_arg_for_name.
13551         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
13552
13553         * ir.texi: Update thunk documentation.
13554
13555         * call.c (joust): Fix handling of overloaded builtin operators.
13556
13557 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
13558
13559         * cp-tree.h (DECL_ANTICIPATED): New macro.
13560         Document new use of DECL_LANG_FLAG_7.
13561         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
13562         in the user namespace.
13563         * lex.c (do_identifier): If the identifier's declaration has
13564         DECL_ANTICIPATED on, it has not yet been declared.  But do not
13565         replace it with an ordinary implicit declaration.
13566
13567         * tinfo2.cc: Include stdlib.h.
13568
13569 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
13570
13571         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
13572         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
13573         CLASSTYPE_ALIGN.
13574
13575 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
13576
13577         * decl2.c (lang_decode_option): Use skip_leading_substring instead
13578         of plain strncmp.
13579
13580 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
13581
13582         * operators.def (<?): Duplicated, should have been...
13583         (>?): this.  Fixed.
13584
13585 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
13586             Mark Mitchell  <mark@codesourcery.com>
13587
13588         * cp-tree.h (ansi_opname): Make it a macro.
13589         (ansi_assopname): Likewise.
13590         (struct lang_decl_flags): Add assignment_operator_p.
13591         (struct lang_decl): Add operator_code.
13592         (DECL_VTT_PARM): Adjust.
13593         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
13594         overloaded operator.
13595         (SET_OVERLOADED_OPERATOR_CODE): New macro.
13596         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
13597         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
13598         (opname_tab): Remove.
13599         (assignop_tab): Likewise.
13600         (operator_name_info_t): New type.
13601         (operator_name_info): New variable.
13602         (assignment_operator_name_info): Likewise.
13603         (build_cp_library_fn): Remove declaration.
13604         (push_cp_library_fn): Likewise.
13605         (operator_name_string): Likewise.
13606         (build_decl_overload): Likewise.
13607         * call.c (print_z_candidates): Simplify.
13608         (build_object_call): Adjust usage of ansi_opname.  Use
13609         DECL_OVERLOADED_OPERATOR_P.
13610         (op_error): Adjust operator name lookup.
13611         (build_conditional_expr): Adjust usage of ansi_opname.
13612         (build_new_op): Likewise.
13613         (build_op_delete_call): Likewise.
13614         (build_over_call): Likewise.
13615         (joust): Use DECL_OVERLOADED_OPERATOR_P.
13616         * decl.c (duplicate_decls): Copy operator_code.
13617         (init_decl_processing): Adjust parameters to push_cp_library_fn.
13618         (builtin_function): Adjust parameters to build_library_fn_1.
13619         (build_library_fn_1): Accept an overloaded operator code.
13620         (build_library_fn): Pass ERROR_MARK.
13621         (build_cp_library_fn): Accept an overloaded operator code.
13622         (push_cp_library_fn): Likewise.
13623         (grokfndecl): Tweak.
13624         (grokdeclarator): Simplify code to compute names of overloaded
13625         operators.  Adjust use of ansi_opname.
13626         (ambi_op_p): Work on tree_codes, not identifiers.
13627         (unary_op_p): Likewise.
13628         (grok_op_properties): Likewise.
13629         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
13630         (lang_mark_tree): Don't try to mark the operator_code.
13631         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
13632         * error.c (dump_decl): Remove special handling for operator
13633         names.
13634         (dump_function_name): Likewise.
13635         (dump_expr): Adjust name lookup of operators.
13636         (op_to_string): Simplify.
13637         (assop_to_string): Likewise.
13638         * init.c (build_new_1): Adjust use of ansi_opname.
13639         * lex.c (opname_tab): Remove.
13640         (assignop_tab): Likewise.
13641         (ansi_opname): Likewise.
13642         (ansi_assopname): Likewise.
13643         (operator_name_string): Likewise.
13644         (reinit_lang_specific): Likewise.
13645         (operator_name_info): New variable.
13646         (assignment_operator_name_info): Likewise.
13647         (init_operators): New function.
13648         (init_parse): Use it.
13649         (do_identifier): Adjust use of ansi_opname.
13650         * method.c (mangle_expression): Don't use ansi_opname for
13651         mangling.
13652         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
13653         (build_decl_overload): Remove.
13654         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
13655         (do_build_assign_ref): Adjust use of ansi_opname.
13656         (synthesize_method): Likewise.
13657         (implicitly_declare_fn): Likewise.
13658         * operators.def: New file.
13659         * parse.y (operator): Adjust use of ansi_opname.
13660         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
13661         (set_mangled_name_for_template_decl): Don't play games with
13662         current_namespace.
13663         (special_function_p): Adjust use of ansi_opname.
13664         * typeck.c (check_return_expr): Likewise.
13665         * Make-lang.in (cc1plus): Depend on operators.def.
13666         * Makefile.in (lex.o): Likewise.
13667         (decl.o): Likewise.
13668
13669 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
13670
13671         * Make-lang.in (cplib2.ready): Eradicate.
13672
13673 Sat May 27 11:25:46 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13674
13675         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
13676         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
13677         (built_min, cp_tree_equal): Likewise.
13678
13679 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
13680
13681         * class.c (layout_nonempty_base_or_field): Replace
13682         `record_layout_info' with `record_layout_info_s'.
13683
13684 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
13685
13686         Fix goto checking.
13687         * cp-tree.h (struct language_function): x_named_labels is now
13688         a struct named_label_list*.
13689         * decl.c (struct named_label_use_list): Renamed from...
13690         (struct named_label_list): ...this.  New struct.
13691         (push_binding_level): Don't set eh_region.
13692         (note_level_for_eh): New fn.
13693         (pop_label): Take label and old value directly.
13694         (pop_labels): Adjust for new named_labels format.
13695         (lookup_label): Likewise.
13696         (poplevel): Note characteristics of a binding level containing a
13697         named label.  Mess with named label lists earlier.
13698         (mark_named_label_lists): New fn.
13699         (mark_lang_function): Call it.
13700         (use_label): New fn, split out from...
13701         (make_label_decl): ...here.  Don't call it.
13702         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
13703         check_previous_gotos): New fns, split out from...
13704         (define_label): ...here.
13705         (check_switch_goto): New fn.
13706         (define_case_label): Call it.
13707         (check_goto): New fn.
13708         * semantics.c (finish_goto_stmt): Call it and use_label.
13709         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
13710         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
13711
13712 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
13713
13714         * class.c (build_vtable_entry_ref): Correct usage of
13715         get_vtbl_decl_for_binfo.
13716
13717         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
13718         * method.c (implicitly_declare_fn): Not here.
13719
13720 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
13721
13722         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
13723         (CPTI_PTMD_DESC_TYPE): ... here.
13724         (ptmd_desc_type_node): Rename to ...
13725         (ptm_desc_type_node): ... here.
13726         * decl.c: Likewise.
13727         * rtti.c (ptmd_initializer): Rename to ...
13728         (ptm_initializer): ... here.
13729         (sythesize_tinfo_var): Adjust. Deal with pointer to member
13730         function.
13731         (create_tinfo_types): Adjust.
13732
13733 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
13734
13735         Finish implementation of VTTs.
13736         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
13737         CPTI_VTT_PARM_IDENTIFIER.
13738         (vtt_parm_identifier): New macro.
13739         (vtt_parm_type): Likewise.
13740         (BINFO_SUBVTT_INDEX): Likewise.
13741         (BINFO_VPTR_INDEX): Likewise.
13742         (struct lang_decl): Add vtt_parm.
13743         (DECL_VTT_PARM): New macro.
13744         (DECL_USE_VTT_PARM): Likewise.
13745         (DECL_NEEDS_VTT_PARM_P): Likewise.
13746         (get_vtt_name): Declare.
13747         (build_artificial_parm): Likewise.
13748         (fixup_all_virtual_upcast_offsets): Likewise.
13749         (expand_indirect_vtbls_init): Remove.
13750         * call.c (build_new_method_call): Pass the vtt to subobject
13751         constructors and destructors.
13752         * class.c (get_vtt_name): Give it external linkage.
13753         (build_clone): Handle the magic VTT parameters for clones.
13754         (clone_function_decl): Fix typo in comment.
13755         (build_vtt): Keep track of the indices in the VTTs where various
13756         entities are stored.
13757         (build_vtt_inits): Likewise.
13758         (dfs_build_vtt_inits): Likewise.
13759         (build_ctor_vtbl_group): Tweak type of construction vtables.
13760         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
13761         primary bases, when building construction vtables.
13762         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
13763         (initialize_predefined_identifiers): Add vtt_parm_identifier.
13764         (init_decl_processing): Initialize vtt_parm_type.
13765         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
13766         (lang_mark_tree): Make vtt_parm.
13767         * decl2.c (build_artificial_parm): New function.
13768         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
13769         (grokclassfn): Use build_artificial_parm.
13770         * init.c (initialize_vtbl_ptrs): Call
13771         fixup_all_virtual_upcast_offsets directly.
13772         (perform_member_init): Use the complete subobject destructor for
13773         member cleanups.
13774         (build_vtbl_address): New function.
13775         (expand_virtual_init): Handle VTTs.
13776         * optimize (maybe_clone_body): Likewise.
13777         * search.c (fixup_all_virtual_upcast_offsets): Give it external
13778         linkage.
13779         (expand_indirect_vtbls_init): Remove.
13780         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
13781         * tree.c (make_binfo): Make them bigger.
13782
13783 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
13784
13785         * inc/cxxabi.h (__pbase_type_info): Define, based on
13786         __pointer_type_info.
13787         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
13788         (__pointer_to_member_type_info): Likewise.
13789         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
13790         (__pointer_to_member_type_info::__is_pointer_p): Remove.
13791         (__pointer_type_info::__do_catch): Rename to ...
13792         (__pbase_type_info::__do_catch): ... here. Adjust.
13793         (__pbase_type_info::__pointer_catch): Implement.
13794         (__pointer_type_info::__pointer_catch): Adjust.
13795         (__pointer_to_member_type_info::__pointer_catch): Adjust.
13796
13797 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
13798
13799         * tinfo.h (__user_type_info::contained_virtual_p): New
13800         predicate.
13801         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
13802         shaped hierarchy.
13803         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
13804         diamond shaped hierarchy. Add early out for mixed diamond and
13805         duplicate shaped hierarchy.
13806
13807 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
13808
13809         * cp-tree.h (build_delete): Change prototype.
13810         (build_vec_delete): Likewise.
13811         * call.c (build_scoped_method_call): Use special_function_kind
13812         values to indicate the kind of destruction to be done.
13813         (build_method_call): Likewise.
13814         * decl.c (finish_destructor_body): Likewise.
13815         (maybe_build_cleanup_1): Likewise.  Rename to ...
13816         (maybe_build_cleanup): ... this.
13817         * decl2.c (delete_sanity): Use special_function_kind
13818         values to indicate the kind of destruction to be done.
13819         (build_cleanup): Likewise.
13820         * init.c (perform_member_init): Likewise.
13821         (build_vec_delete_1): Likewise.
13822         (build_dtor_call): Simplify.
13823         (build_delete): Use special_function_kind
13824         values to indicate the kind of destruction to be done.
13825         (build_vbase_delete): Likewise.
13826         (build_vec_delete): Likewise.
13827
13828         * init.c (sort_member_init): Fix typo in error message generation
13829         code.
13830
13831 Mon May 15 11:46:29 2000  Donald Lindsay  <dlindsay@cygnus.com>
13832
13833         * semantics.c (begin_class_definition): make the packed
13834         attribute be sensitive to the "-fpack-struct" command line flag
13835
13836 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
13837
13838         Update new-abi upcast algorithm.
13839         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
13840         prototype and meaning of return value.
13841         (__si_class_type_info::__do_upcast): Likewise.
13842         (__vmi_class_type_info::__do_upcast): Likewise.
13843         * tinfo.cc (__class_type_info::__upcast_result): Replace
13844         whole2dst with part2dst. Adjust ctor.
13845         (__class_type_info::__do_upcast): Adjust call of worker function.
13846         (__class_type_info::__do_upcast): Adjust.
13847         (__si_class_type_info::__do_upcast): Adjust. Use parent's
13848         __do_upcast.
13849         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
13850         virtual base in diamond hierarchy bug.
13851
13852 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
13853
13854         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
13855         and bitfield to tinfo_fn_p.
13856         (DECL_TINFO_FN_P): Adjust.
13857         (SET_DECL_TINFO_FN_P): Likewise.
13858         (DECL_MUTABLE_P): Likewise.
13859         (DECL_C_BIT_FIELD): Likewise.
13860         (SET_DECL_C_BIT_FIELD): Likewise.
13861         (CLEAR_DECL_C_BIT_FIELD): Likewise.
13862         (DECL_UNINLINABLE): Likewise.
13863         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
13864         (handle_using_decl): Remove assertion.
13865         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
13866         to build FIELD_DECLs.
13867         (build_base_field): Likewise.
13868         (layout_class_type): Likewise.
13869         * decl.c (init_decl_processing): Likewise.
13870         (build_ptrmemfunc_type): Likewise.
13871         (grokdeclarator): Likewise.
13872         * decl2.c (grok_x_components): Likewise.
13873         * except.c (call_eh_info): Likewise.
13874         * init.c (init_init_processing): Likewise.
13875         * rtti.c (expand_class_desc): Likewise.
13876         (create_pseudo_type_info): Likewise.
13877         (get_vmi_pseudo_type_info): Likewise.
13878         (create_tinfo_types): Likewise.
13879         * ptree.c (print_lang_decl): Adjust.
13880         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
13881         before checking DECL_MUTABLE_P.
13882
13883         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
13884         parameters for template functions.
13885         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
13886         destructors as well as constructors.
13887
13888 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
13889
13890         * class.c (build_ctor_vtbl_group): Set inits.
13891         * optimize.c (maybe_clone_body): Set DECL_INLINE and
13892         DECL_THIS_INLINE appropriately for clones.
13893
13894         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
13895         (DECL_CONV_FN_P): Simplify.
13896         (DECL_OPERATOR): Remove.
13897         (language_to_string): Declare.
13898         * decl.c (duplicate_decls): Fix typo in comment.
13899         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
13900         (grok_op_properties): Use DECL_CONV_FN_P instead of
13901         IDENTIFIER_TYPENAME_P.
13902         * dump.c (dequeue_and_dump): Dump the language linkage of
13903         declarations.
13904         * error.c (language_to_string): Give it external linkage.
13905         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
13906         (implicitly_declare_fn): Set DECL_LANGUAGE.
13907         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
13908         IDENTIFIER_TYPENAME_P.
13909         (tsubst_decl): Likewise.
13910         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
13911         * semantics.c (finish_member_declaration): Don't mark members of
13912         classes declared in an extern "C" region as extern "C".
13913
13914 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13915
13916         * decl2.c (qualified_lookup_using_namespace): Look through
13917         namespace aliases.
13918
13919         * decl.c (push_using_decl): Return the old decl on namespace level.
13920
13921 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
13922
13923         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
13924         (VTT_NAME_PREFIX): New macro.
13925         (CTOR_VTBL_NAME_PREFIX): Likewise.
13926         (get_ctor_vtbl_name): New function.
13927         * class.c (get_vtable_name): Simplify.
13928         (get_vtt_name): New function.
13929         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
13930         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
13931         when a virtual base becomes primary.
13932         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
13933         VTTs.
13934         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
13935         additional parameters.
13936         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
13937         (initialize_array): New function.
13938         (build_vtt): Likewise.
13939         (build_vtt_inits): Likewise.
13940         (dfs_build_vtt_inits): Likewise.
13941         (dfs_fixup_binfo_vtbls): Likewise.
13942         (build_ctor_vtbl_group): Likewise.
13943         (initialize_vtable): Use initialize_array.
13944         (accumulate_vtbl_inits): Reimplement to handle construction
13945         vtables.
13946         (dfs_accumulate_vtbl_inits): Likewise.
13947         (bulid_vtbl_initializer): Adjust parameter name.
13948         * method.c (build_typename_overload): Remove #if 0'd code.
13949         (get_ctor_vtbl_name): New function.
13950         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
13951         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
13952
13953         * cp-tree.h (struct lang_type): Remove search_slot.
13954         (CLASSTYPE_SEARCH_SLOT): Remove.
13955         (emit_base_init): Change prototype.
13956         (initialize_vtbl_ptrs): Likewise.
13957         (expand_indirect_vtbls_init): Likewise.
13958         (clear_search_slots): Remove.
13959         * decl.c (lang_mark_tree): Don't mark search_slot.
13960         * init.c (initialize_vtbl_ptrs): Simplify.
13961         (emit_base_init): Likewise.
13962         * search.c (struct vbase_info): Document decl_ptr.
13963         (convert_pointer_to_single_level): Remove.
13964         (dfs_find_vbases): Remove.
13965         (dfs_init_base_pointers): Simplify.
13966         (dfs_clear_vbase_slots): Remove.
13967         (dfs_vtable_path_unmark): New function.
13968         (init_vbase_pointers): Simplify.
13969         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
13970         (expand_indirect_vtbls_init): Simplify.  Don't call
13971         mark_all_temps_used.
13972         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
13973         initialize_vtbl_ptrs.
13974
13975 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
13976
13977         * except.c: Add static prototypes.
13978
13979 2000-05-20  H.J. Lu  <hjl@gnu.org>
13980
13981         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
13982
13983 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
13984
13985         Don't create a separate copy of virtual bases for the
13986         CLASSTYPE_VBASECLASSES list.
13987         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
13988         (BINFO_FOR_VBASE): Remove.
13989         (CANONICAL_BINFO): Adjust.
13990         (binfo_for_vbase): New function.
13991         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
13992         instead of BINFO_FOR_VBASE.
13993         (build_vbase_pointer): Likewise.
13994         (build_secondary_vtable): Likewise.
13995         (dfs_mark_primary_bases): Likewise.
13996         (mark_primary_bases): Likewise.
13997         (layout_nonempty_base_or_field): Likewise.
13998         (dfs_set_offset_for_shared_vbases): Likewise.
13999         (dfs_set_offset_for_unshared_vbases): Likewise.
14000         (layout_virtual_bases): Likewise.  Adjust for changes to the
14001         CLASSTYPE_VBASECLASSES list.
14002         (dump_class_hierarchy_r): Use binfo_for_vbase
14003         instead of BINFO_FOR_VBASE.
14004         (dump_class_hierarchy): Likewise.
14005         (finish_vtbls): Likewise.
14006         (build_vtbl_initializer): Adjust for changes to the
14007         CLASSTYPE_VBASECLASSES list.
14008         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
14009         * decl.c (finish_destructor_body): Adjust for changes to the
14010         CLASSTYPE_VBASECLASSES list.
14011         * init.c (sort_base_init): Use binfo_for_vbase.
14012         (construct_virtual_bases): Adjust for changes to the
14013         CLASSTYPE_VBASECLASSES list.
14014         (expand_member_init): Use binfo_for_vbase.
14015         (build_vbase_delete):  Adjust for changes to the
14016         CLASSTYPE_VBASECLASSES list.
14017         * method.c (do_build_copy_constructor): Likewise.
14018         * rtti.c (get_base_offset): Use binfo_for_vbase.
14019         (expand_class_desc): Remove #if 0'd code.
14020         * search.c (struct vbase_info): Remove vbase_types.
14021         (get_base_distance):  Use binfo_for_vbase.
14022         (lookup_field_queue_p): Use CANONICAL_BINFO.
14023         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
14024         (get_pure_virtuals): Adjust for changes to the
14025         CLASSTYPE_VBASECLASSES list.
14026         (dfs_find_vbases): Use binfo_for_vbase.
14027         (dfs_init_vbase_pointers): Likewise.
14028         (init_vbase_pointers): Don't initialize vi.vbase_types.
14029         (virtual_context): Use binfo_for_vbase.
14030         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
14031         CLASSTYPE_VBASECLASSES list.
14032         (expand_indirect_vtbls_init): Simplify.
14033         (dfs_get_vbase_types): Don't replicate virtual bases.
14034         (find_vbase_instance): Use binfo_for_vbase.
14035         (binfo_for_vbase): New function.
14036         * typeck.c (get_delta_difference): Use binfo_for_vbase.
14037
14038 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
14039
14040         * decl2.c (finish_anon_union): Generalize error messages to handle
14041         anonymous structures.
14042         * init.c (perform_member_init): Remove `name' parameter.
14043         (build_field_list): New function.
14044         (sort_member_init): Handle anonymous union initialization order
14045         correctly.  Check for multiple initializations of the same union.
14046         (emit_base_init): Don't look up fields by name here.
14047         (expand_member_init): Record the result of name lookup for future
14048         reference.
14049         * typeck.c (build_component_ref): Fix formatting.
14050
14051 Wed May 17 17:27:44 2000  Andrew Cagney  <cagney@b1.cygnus.com>
14052
14053         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
14054         * typeck.c (build_x_compound_expr): Replace warn_unused with
14055         warn_unused_value.
14056
14057         * decl2.c (lang_decode_option): Update -Wall unused flags by
14058         calling set_Wunused.
14059
14060 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
14061
14062         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
14063         * init.c (dfs_vtable_path_unmark): Remove.
14064         * search.c (marked_new_vtable_p): Likewise.
14065         (unmarked_new_vtable_p): Likewise.
14066         (dfs_search_slot_nonempty_p): Likewise.
14067         (dfs_mark): Likewise.
14068         (dfs_vtable_path_unmark): Likewise.
14069         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
14070         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
14071         (dfs_init_vbase_pointers): Remove special-case new ABI code.
14072         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
14073         (init_vbase_pointers): Simplify.
14074         (expand_indirect_vtbls_init): Likewise.
14075
14076         * class.c (copy_virtuals): New function.
14077         (build_primary_table): Use it.
14078         (build_secondary_vtable): Likewise.
14079         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
14080         indicate that no vcall offset is required.
14081         (add_virtual_function): Likewise.
14082         (modify_all_vtables): Likewise.
14083         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
14084         (dfs_accumulate_vtbl_inits): Likewise.
14085         (build_vtbl_initializer): Make changes to handle construction
14086         vtables.
14087         (dfs_build_vcall_offset_vtbl_entries): Likewise.
14088         (build_rtti_vtbl_entries): Likewise.
14089         (build_vtable_entries): Handle a NULL vcall_index.
14090
14091 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
14092
14093         * decl2.c (lang_decode_option): Fix thinko.
14094
14095 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
14096
14097         * except.c (check_handlers): New fn.
14098         * cp-tree.h: Declare it.
14099         * semantics.c (finish_handler_sequence): Call it.
14100         (finish_function_handler_sequence): Likewise.
14101         (finish_handler_parms): Set TREE_TYPE on the handler.
14102         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
14103         * search.c (get_base_distance_recursive): If protect>1, ignore
14104         special access.
14105         (get_base_distance): Don't reduce watch_access.
14106
14107 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
14108
14109         * lex.c: #include diagnostic.h.
14110         (lang_init_options): Set default prefixing rules.
14111
14112         * lang-options.h: Add -fdiagnostics-show-location=.
14113
14114         * decl2.c: #include diagnostic.h.
14115         (lang_decode_option): Handle -fdiagnostics-show-location=.
14116
14117 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
14118
14119         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
14120         * vec.cc: Revert my 2000-05-07 change.
14121
14122 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
14123
14124         * class.c (check_field_decls): Complain about non-static data
14125         members with same name as class in class with constructor.
14126
14127 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
14128
14129         * decl.c (grokdeclarator): Allow non-static data members with
14130         same name as class.
14131
14132 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
14133
14134         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
14135         and pending_inline.filename.  Update prototypes.
14136         * decl.c (define_label): Constify filename parameter.
14137         * decl2.c (warn_if_unknown_interface): Constify local char *.
14138         * input.c Constify input_source.filename. Don't declare
14139         input_filename or lineno.  Constify filename parameter to feed_input.
14140         * lex.c (init_parse): Constify parameter and return value.
14141         (cp_pragma_interface, cp_pragma_implementation): Constify
14142         filename argument.
14143         (reinit_parse_for_method, reinit_parse_for_block,
14144         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
14145         Constify local char *.
14146         * pt.c: Don't declare lineno or input_filename.
14147         (print_template_context, tsubst_friend_function, tsubst_decl,
14148         tsubst, instantiate_decl): Constify local char *.
14149         * semantics.c (expand_body): Constify local char *.
14150         * tree.c (build_srcloc): Constify filename parameter.
14151         * typeck.c (c_expand_asm_operands): Constify filename
14152         parameter.
14153
14154 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
14155
14156         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
14157         offsetof expansion.
14158
14159 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
14160
14161         * inc/cxxabi.h:  Fix typos in comment.
14162         (__base_class_info::__offset): Use a static_cast.
14163
14164 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
14165
14166         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
14167         of std::size_t and std::ptrdiff_t respectively.
14168         * tinfo.cc: Likewise.
14169         * vec.cc: Likewise.
14170
14171 2000-05-06  Richard Henderson  <rth@cygnus.com>
14172
14173         * typeck.c (build_c_cast): Don't warn integer->pointer size
14174         mismatch for constants.
14175
14176 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
14177
14178         * rtti.c (ptmd_initializer): Set non-public, if class is
14179         incomplete.
14180
14181         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
14182         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
14183         __cxa_vec_delete): Likewise.
14184         * tinfo.cc (__dynamic_cast): Likewise.
14185         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
14186         __cxa_vec_delete): Likewise.
14187
14188 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
14189
14190         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
14191         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
14192         (lang_decl_flags): Add vcall_offset.
14193         (THUNK_VCALL_OFFSET): Use it.
14194         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
14195         * method.c (make_thunk): Create the lang_decl here, not in
14196         emit_thunk.
14197         (emit_thunk): Make generic thunks into ordinary functions once
14198         they have been fed to expand_body.
14199         * semantics.c (expand_body): Set current_function_is_thunk here.
14200
14201 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14202
14203         * class.c (update_vtable_entry_for_fn): Prototype.
14204
14205         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
14206         and `tmpl'.
14207
14208         * search.c (dfs_build_inheritance_graph_order): Prototype.
14209
14210 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
14211
14212         * cp-tree.h (special_function_kind): Add various kinds of
14213         destructors.
14214         (special_function_p): New function.
14215         * class.c (overrides): Don't let one kind of destructor override
14216         another.
14217         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
14218         whether or not to instantiate a template.
14219         * tree.c (special_function_p): Define.
14220
14221 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
14222
14223         * cp-tree.def (THUNK_DECL): Remove.
14224         * cp-tree.h (DECL_THUNK_P): New macro.
14225         (DECL_NON_THUNK_FUNCTION_P): Likewise.
14226         (DECL_EXTERN_C_FUNCTION_P): Likewise.
14227         (SET_DECL_THUNK_P): Likewise.
14228         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
14229         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
14230         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
14231         * decl.c (decls_match): Use DECL_EXTERN_C_P.
14232         (duplicate_decls): Likewise.
14233         (pushdecl): Likewise.  Adjust thunk handling.
14234         (grokfndecl): Use DECL_EXTERN_C_P.
14235         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
14236         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
14237         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
14238         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
14239         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
14240         DECL_NO_STATIC_CHAIN.
14241         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
14242         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
14243         * search.c (covariant_return_p): Remove THUNK_DECL handling.
14244         * ir.texi: Update.
14245
14246 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
14247
14248         * tree.c (walk_tree): Set lineno.
14249
14250 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
14251
14252         * exception.cc: Update license notice.
14253         * new.cc: Likewise.
14254         * new1.cc: Likewise.
14255         * new2.cc: Likewise.
14256         * tinfo.cc: Likewise.
14257         * tinfo2.cc: Likewise.
14258         * vec.cc: Likewise.
14259         * inc/cxxabi.h: Likewise.
14260         * inc/exception: Likewise.
14261         * inc/new: Likewise.
14262         * inc/new.h: Likewise.
14263         * inc/typeinfo: Likewise.
14264
14265 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
14266
14267         * tree.c (build_target_expr_with_type): If we already have a
14268         TARGET_EXPR, just return it.
14269
14270         * optimize.c (initialize_inlined_parameters): Don't generate an
14271         EXPR_STMT if we can just use DECL_INITIAL.
14272         * decl.c (emit_local_var): Only make the initialization a
14273         full-expression if stmts_are_full_exprs_p.
14274
14275 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
14276
14277         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
14278         macro.
14279         * call.c (standard_conversion): Use it.
14280         (direct_reference_binding): Likewise.
14281         (build_over_call): Likewise.
14282         (is_properly_derived_from): Likewise.
14283         (compare_ics): Likewise.
14284         * class.c (resolves_to_fixed_type_p): Likewise.
14285         * optimize.c (declare_return_variable): Likewise.
14286         * pt.c (is_specialization_of): Likewise.
14287         (unify): Likewise.
14288         * typeck.c (comp_target_parms): Likeiwse.
14289         (build_static_cast): Likewise.
14290         (build_reinterpret_cast): Likewise.
14291         (build_const_cast): Likewise.
14292         (comp_ptr_ttypes_real): Likewise.
14293         (comp_ptr_ttypes_const): Likewise.
14294         * typeck2.c (process_init_constructor): Likewise.
14295
14296 2000-04-30  Scott Snyder <snyder@fnal.gov>
14297
14298         * decl.c (finish_destructor_body): Use the base destructor when
14299         destroying virtual bases.
14300
14301 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
14302
14303         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
14304         STMT_EXPRs.
14305         * optimize.c (struct inline_data): Add target_exprs field.
14306         (declare_return_variable): When a function returns an aggregate,
14307         use the variable declared in the TARGET_EXPR as the remapped
14308         DECL_RESULT.
14309         (expand_call_inline): Update the pending target_exprs stack.
14310         (optimize_function): Initialize the stack.
14311
14312         * decl2.c (finish_file): Fix typo in comment.
14313
14314         * method.c (emit_thunk): Don't try to return a `void' value.
14315
14316         * optimize.c (initialize_inlined_parameters): If the parameter is
14317         addressable, we need to make a new VAR_DECL, even if the
14318         initializer is constant.
14319
14320 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
14321
14322         * decl.c (grok_op_properties): Add an extra check of argtypes.
14323
14324 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
14325
14326         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
14327         variables.
14328         (initialize_inlined_parameters): Try to avoid creating new
14329         VAR_DECLs.
14330
14331 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
14332
14333         * lex.c (my_get_run_time): Remove.
14334         (init_filename_times): Use get_run_time instead of my_get_run_time.
14335         (check_newline): Likewise.
14336         (dump_time_statistics): Likewise.
14337         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
14338         of computing elapsed time explicitly.
14339
14340 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
14341
14342         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
14343         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
14344         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
14345         before calling decl_constant_value.
14346         * class.c (check_bitfield_decl): Likewise.
14347         * cvt.c (ocp_convert): Likewise.
14348         (convert): Likewise.
14349         * decl.c (compute_array_index_type): Likewise.
14350         (build_enumerator): Likewise.
14351         * decl2.c (check_cp_case_value): Likewise.
14352         * pt.c (convert_nontype_argument): Likewise.
14353         (tsubst): Likewise.
14354         * typeck.c (decay_conversion): Likewise.
14355         (build_compound_expr): Likewise.
14356         (build_reinterpret_cast): Likewise.
14357         (build_c_cast): Likewise.
14358         (convert_for_assignment): Likewise.
14359
14360 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
14361
14362         * decl.c (finish_function): Don't play games with DECL_INLINE.
14363
14364 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
14365
14366         * ir.texi: Correct typo.
14367
14368 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14369
14370         * decl.c (grokdeclarator): Reject VLAs as members.
14371
14372 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
14373
14374         * call.c (standard_conversion): Accept conversion between
14375         COMPLEX_TYPEs.
14376
14377         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
14378
14379 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
14380
14381         * decl2.c (finish_file): Remove double setup for accounting
14382         compile time.
14383
14384 2000-04-24  Robert Lipe <robertlipe@usa.net>
14385
14386         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
14387
14388 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
14389
14390         * new.cc (set_new_handler): Needs to be in std::.
14391
14392 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
14393
14394         * cp-tree.h (lang_decl): Remove pretty_function_p.
14395         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
14396         language-specific node.
14397         * decl.c (cp_make_fname_decl): Use build_decl, not
14398         build_lang_decl, to build the variables.
14399         (grokvardecl): Don't call build_lang_decl for local variables in
14400         templates.
14401         (grokdeclarator): Don't call build_lang_decl for local type
14402         declarations in templates.
14403         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
14404         zero'd memory, rather than calling memset.
14405         * pt.c: Include hashtab.h.
14406         (local_specializations): New variable.
14407         (retrieve_local_specialization): Use it.
14408         (register_local_specialization): Likewise.
14409         (tsubst_decl): Don't assume local variables have
14410         DECL_LANG_SPECIFIC.
14411         (instantiate_decl): Set up local_specializations.
14412         * Makefile.in (HTAB_H): New variable.
14413
14414 2000-04-23  Richard Henderson  <rth@cygnus.com>
14415
14416         * typeck.c (c_expand_asm_operands): Restore the original
14417         contents of the output list.
14418
14419 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
14420
14421         * ir.texi:  Document complex number representation.
14422
14423 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
14424
14425         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
14426         (target_incomplete_p): New function.
14427         (tinfo_base_init): Create comdat NTBS name variable.
14428         (ptr_initializer): Add non_public parameter. Calculate it.
14429         (ptmd_initializer): Likewise.
14430         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
14431         (create_real_tinfo_var): Add non_public parameter. Use it.
14432         Push proxy into global namespace.
14433         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
14434         New enumeration.
14435         * inc/typeinfo (type_info::before, type_info::operator==):
14436         Compare __name addresses.
14437
14438         * tinfo2.cc: Remove new-abi builtins comment.
14439
14440 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
14441
14442         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
14443
14444         * call.c (joust): Exit early if we get the same function, too.
14445
14446         * decl2.c (key_method): Return NULL_TREE for template classes.
14447         (import_export_class): Don't need to check for template classes.
14448
14449 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
14450
14451         * lex.c: Remove references to cccp.c.
14452
14453 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
14454
14455         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
14456         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
14457         (DECL_DESTRUCTOR_P): Use destructor_attr.
14458         (DECL_CONST_MEMFUNC_P): Reimplement.
14459         (DECL_VOLATILE_MEMFUNC_P): Remove.
14460         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
14461         (overrides): Use DECL_DESTRUCTOR_P.
14462         (check_for_override): Likewise.
14463         * decl.c (start_function): Likewise.
14464         * decl2.c (grokfclassfn): Likewise.
14465         (check_classfn): Likewise.
14466         (grok_function_init): Likewise.
14467
14468 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
14469
14470         * decl2.c (grokfield): Issue error on illegal data member
14471         declaration.
14472
14473 Mon Apr 17 17:11:16 2000  Mark P Mitchell  <mark@codesourcery.com>
14474
14475         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
14476
14477 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
14478
14479         * class.c (build_vtable_entry): Don't build thunks for type-info
14480         functions.
14481
14482 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
14483
14484         * decl.c (decls_match): Allow a redeclaration of a builtin to
14485         specify args while the builtin did not.
14486
14487 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
14488
14489         * cp-tree.def (THUNK_DECL): Add to documentation.
14490         * cp-tree.h (flag_huge_objects): Declare.
14491         * class.c (modify_vtable_entry): Tidy.
14492         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
14493         Calculate delta appropriately for the new ABI.
14494         (dfs_modify_vtables): Use it.
14495         (modify_all_vtables): Fix thinko in code to add overriding copies
14496         of functions to primary vtables.
14497         (build_clone): Fix typo in comment.
14498         (clone_function_decl): Correct order of destructors in vtable.
14499         (build_vbase_offset_vtbl_entries): Adjust comment.
14500         (dfs_vcall_offset_queue_p): Remove.
14501         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
14502         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
14503         (build_vtable_entry): Correct check for pure virtual functions.
14504         Don't declare flag_huge_objects.
14505         * decl.c (flag_huge_objects): Remove declaration.
14506         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
14507         Use int_size_in_bytes.
14508         (emit_thunk): Handle vcall offset thunks.
14509
14510 Sat Apr 15 16:00:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14511
14512         * decl2.c (parse_time, varconst_time): Delete declarations.
14513         (finish_file): Delete LINENO declaration.
14514         START_TIME and THIS_TIME now long.
14515
14516 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
14517
14518         * class.c (build_base_field): Reformat comment.
14519
14520         * inc/cxxabi.h (stddef.h): Comment inclusion.
14521         (__base_class_info::__offset): Comment shift.
14522
14523 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
14524
14525         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
14526         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
14527         (cp_push_exception_identifier): New macro.
14528         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
14529         (DECL_BASE_DESTRUCTOR_P): Likewise.
14530         (DECL_DELETING_DESTRUCTOR_P): Likewise.
14531         (get_vtbl_decl_for_binfo): Fix formatting.
14532         (in_charge_arg_for_name): New macro.
14533         (maybe_build_cleanup_and_delete): Remove declaration.
14534         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
14535         (in_charge_arg_for_name): New function.
14536         (build_new_method_call): Use it.  Handle cloned destructors.
14537         (build_clone): Don't make the base constructor virtual.
14538         Automatically defer generated functions.
14539         (clone_function_decl): Handle destructors, too.
14540         (clone_constructors_and_destructors): Likewise.
14541         (create_vtable_ptr): Don't create a vtable entry for a cloned
14542         function.
14543         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
14544         (initialize_predefined_identifiers): Update appropriately.
14545         (finish_destructor_body): Simplify.
14546         (maybe_build_cleanup_and_delete): Remove.
14547         * except.c (expand_throw): Handle new-ABI destructors.
14548         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
14549         (build_dtor_call): New function.
14550         (build_delete): Use it.  Simplify.
14551         * optimize.c (maybe_clone_body): Handle destructors.
14552         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
14553
14554         * exception.cc (cleanup_fn): New typedef.
14555         (CALL_CLEANUP): New macro.
14556         (cp_eh_info): Use them.
14557         (__cp_push_exception): Likewise.
14558         (__cp_pop_exception): Likewise.
14559
14560 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
14561
14562         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
14563         (complete_dtor_identifier): New macro.
14564         (CLASSTYPE_FIRST_CONVERSION): Remove.
14565         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
14566         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
14567         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
14568         (CLASSTYPE_CONSTRUCTORS): Likewise.
14569         (CLASSTYPE_DESTRUCTORS): Likewise.
14570         (lang_decl): Add cloned_function.
14571         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
14572         (DECL_BASE_CONSTRUCTOR_P): Likewise.
14573         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
14574         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
14575         (DECL_CLONED_FUNCTION_P): Likewise.
14576         (DECL_CLONED_FUNCTION): Likewise.
14577         (clone_function_decl): Declare.
14578         (maybe_clone_body): Likewise.
14579         * call.c (build_user_type_conversion_1): Call complete object
14580         constructors in the new ABI.
14581         (build_new_method_call): Don't add in-charge parameters under the
14582         new ABI.
14583         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
14584         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
14585         CLASSTYPE_DESTRUCTOR_SLOT.
14586         (build_clone): New function.
14587         (clone_function_decl): Likewise.
14588         (clone_constructors_and_destructors): Likewise.
14589         (check_bases_and_members): Use it.
14590         * decl.c (iniitialize_predefined_identifiers): Initialize
14591         complete_dtor_identifier.
14592         (finish_function): Don't add extra code to a clone.
14593         (lang_mark_tree): Mark cloned_function.
14594         * decl2.c (mark_used): Don't bother trying to instantiate things
14595         we synthesized.
14596         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
14597         * method.c (set_mangled_name_for_decl): Don't treat clones as
14598         constructors.
14599         (synthesize_method): Sythesize cloned functions, not the clones.
14600         * optimize.c (inline_data): Update comment on ret_label.
14601         (remap_block): Don't assume DECL_INITIAL exists.
14602         (copy_body_r): Allow ret_label to be NULL.
14603         (maybe_clone_body): Define.
14604         * pt.c (tsubst_decl): Handle clones.
14605         (instantiate_clone): New function.
14606         (instantiate_template): Use it.
14607         (set_mangled_name_for_template_decl): Don't treat clones as
14608         constructors.
14609         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
14610         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
14611         * semantics.c (expand_body): Clone function bodies as necessary.
14612
14613         * optimize.c (remap_decl): Avoid sharing structure for arrays
14614         whose size is only known at run-time.
14615         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
14616
14617         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
14618         to has_in_charge_parm_p.
14619         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
14620         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
14621         (DECL_COPY_CONSTRUCTOR_P): New macro.
14622         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
14623         (build_user_type_conversion_1): Likewise.
14624         (convert_like_real): Likewise.
14625         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
14626         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
14627         (copy_args_p): Likewise.
14628         (grok_ctor_properties): Likewise.
14629         (start_function): Likewise.
14630         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
14631         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
14632         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
14633         * method.c (do_build_copy_constructor): Use
14634         DECL_HAS_IN_CHARGE_PARM_P.
14635         (synthesize_method): Likewise.
14636         * pt.c (instantiate_template): Remove goto.
14637         * tree.c (build_cplus_method_type): Remove mention of obstacks in
14638         comment.
14639
14640         * cp-tre.h (finish_function): Change prototype.
14641         * decl.c (end_cleanup_fn): Adjust caller.
14642         (finish_function): Take only one parameter.
14643         * decl2.c (finish_objects): Adjust caller.
14644         (finish_static_storage_duration_function): Likewise.
14645         * method.c (emit_thunk): Likewise.
14646         * parse.y: Likewise.
14647         * parse.c: Regenerated.
14648         * pt.c (instantiate_decl): Likewise.
14649         * rtti.c (synthesize_tinfo_fn): Likewise.
14650         * semantics.c (expand_body): Likewise.
14651
14652         * cp-tree.h (copy_decl): New function.
14653         * class.c (finish_struct_1): Use it.
14654         * lex.c (copy_decl): Define it.
14655         * pt.c (tsubst_decl): Likewise.
14656         * tree.c (copy_template_template_parm): Likewise.
14657
14658         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
14659         has_nonpublic_assign_ref.
14660         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
14661         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
14662         * class.c (finish_struct_methods): Don't set
14663         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
14664         (interface_only): Don't declare.
14665         (interface_unknown): Likewise.
14666
14667 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14668
14669         * tree.h (HAVE_TEMPLATES): Remove definition.
14670         * lang-options.h (-fthis-is-variable): Remove documentation.
14671
14672 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
14673
14674         * class.c (instantiate_type): Handle object-relative template-id.
14675
14676         * semantics.c (finish_expr_stmt): Call convert_to_void here.
14677         * decl.c (cplus_expand_expr_stmt): Not here.
14678
14679         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
14680         Initialize exprtype earlier.
14681
14682         * parse.y (fn.def1): Check for defining types in return types.
14683
14684         * decl.c (check_tag_decl): Notice extra fundamental types.
14685         Diagnose empty decls in classes, too.
14686
14687         * decl.c (grokdeclarator): Don't override an anonymous name if no
14688         declarator was given.
14689
14690         * cvt.c (convert_to_void): Call resolve_offset_ref.
14691
14692         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
14693
14694         * decl2.c (decl_namespace): Handle getting a type.
14695
14696         * typeck.c (build_c_cast): Re-enable warning for cast between
14697         pointer and integer of different size.
14698
14699 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
14700
14701         * inc/cxxabi.h (__pointer_type_info): Add restrict and
14702         incomplete flags.
14703         (__pointer_type_info::__pointer_catch): New virtual function.
14704         (__pointer_to_member_type_info): Derive from
14705         __pointer_type_info. Adjust.
14706         (__pointer_to_member_type_info::__do_catch): Remove.
14707         (__pointer_to_member_type_info::__is_pointer_p): Declare.
14708         (__pointer_to_member_type_info::__pointer_catch): Declare.
14709         * rtti.c (qualifier_flags): Add restrict flag.
14710         (ptmd_initializer): Reorder members.
14711         (create_tinfo_types): Expand comments. Reorder
14712         ptmd_desc_type_node members.
14713         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
14714         Implement.
14715         (__pointer_type_info::__do_catch): Move specific code into
14716         __pointer_catch. Call it.
14717         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
14718         specific catch checking. Fix void conversion check.
14719         (__pointer_to_member_type_info::__do_catch): Remove.
14720         (__pointer_to_member_type_info::__pointer_catch): Implement.
14721
14722 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14723
14724         * lex.c (init_parse): Remove traces of classof and headof.
14725         * decl2.c (flag_operator_names): Default to 1.
14726         (lang_decode_option): Do not set it for -ansi.
14727
14728 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
14729
14730         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
14731         (DECL_MAIN_VARIANT): Remove.
14732         * decl.c (duplicate_decls): Don't set it.
14733         (start_function): Likewise.
14734         (lang_mark_tree): Don't mark it.
14735         * decl2.c (defer_fn): Don't use it.
14736         * lex.c (retrofit_lang_decl): Don't set it.
14737         * pt.c (tsubst_decl): Likewise.
14738         * ptree.c (print_lang_decl): Don't print it.
14739         * typeck.c (mark_addressable): Don't use it.
14740
14741 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
14742
14743         * vec.cc: Include <new> and <exception>.
14744         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
14745         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
14746         terminate.
14747         (__cxa_vec_delete): Catch dtor exceptions.
14748
14749 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
14750
14751         Prepend __ to implementation defined names.
14752         * inc/typeinfo (type_info): Rename _name to __name.
14753         (type_info::type_info): Rename parameter.
14754         (type_info::operator==, type_info::operator!=,
14755         type_info::before): Likewise.
14756         (type_info::is_pointer_p, type_info::is_function_p,
14757         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
14758         parameters.
14759         * inc/cxxabi.h
14760         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
14761         (__pointer_type_info::__pointer_type_info): Likewise.
14762         (__pointer_type_info::is_pointer_p,
14763         __pointer_type_info::do_catch): Prepend __. Rename parameters.
14764         (__array_type_info::__array_type_info): Rename parameters.
14765         (__function_type_info::__function_type_info): Likewise.
14766         (__function_type_info::is_function_p): Prepend __.
14767         (__enum_type_info::__enum_type_info): Rename parameters.
14768         (__pointer_to_member_type_info::__pointer_to_member_type_info):
14769         Likewise.
14770         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
14771         parameters.
14772         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
14773         (__class_type_info::__class_type_info): Rename parameters.
14774         (__class_type_info::sub_kind): Prepend __. Adjust member names.
14775         (__class_type_info::upcast_result,
14776         __class_type_info::dyncast_result): Prepend __. Move definition
14777         into tinfo.cc.
14778         (__class_type_info::do_upcast, __class_type_info::do_catch,
14779         __class_type_info::find_public_src,
14780         __class_type_info::do_dyncast,
14781         __class_type_info::do_find_public_src): Prepend __. Rename
14782         parameters.
14783         (__si_class_type_info::__si_class_type_info): Rename parameters.
14784         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
14785         __si_class_type_info::do_find_public_src): Prepent __. Rename
14786         parameters.
14787         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
14788         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
14789         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
14790         parameters.
14791         (__dynamic_cast): Rename parameters.
14792         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
14793         type_info::do_catch, type_info::do_upcast): Prepend __.
14794         (contained_p, public_p, virtual_p, contained_public_p,
14795         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
14796         (__class_type_info::do_catch,
14797         __class_type_info::do_upcast): Prepend __. Adjust.
14798         (__class_type_info::__upcast_result,
14799         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
14800         Adjust.
14801         (__class_type_info::find_public_src): Prepend __. Adjust.
14802         (__class_type_info::do_find_public_src,
14803         __si_class_type_info::do_find_public_src,
14804         __vmi_class_type_info::do_find_public_src): Likewise.
14805         (__class_type_info::do_dyncast,
14806         __si_class_type_info::do_dyncast,
14807         __vmi_class_type_info::do_dyncast): Likewise.
14808         (__class_type_info::do_upcast,
14809         __si_class_type_info::do_upcast,
14810         __vmi_class_type_info::do_upcast): Likewise.
14811         (__dynamic_cast): Adjust.
14812         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
14813         (__function_type_info::is_function_p): Likewise.
14814         (__pointer_type_info::do_catch): Likewise. Adjust.
14815         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
14816         (__throw_type_match_rtti_2): Adjust.
14817         (__is_pointer): Adjust.
14818
14819 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
14820
14821         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
14822         (complete_ctor_identifier): New macro.
14823         (special_function_kind): Add sfk_copy_constructor and
14824         sfk_assignment_operator.
14825         (LOOKUP_HAS_IN_CHARGE): Remove.
14826         (cons_up_default_function): Rename to ...
14827         (implicitly_declare_fn): ... this.
14828         * call.c (build_new_method_call): Add in-charge parameters for
14829         constructors here.
14830         * class.c (add_implicitly_declared_members): Change parameter name
14831         from cant_have_assignment to cant_have_const_assignment.
14832         Replace calls to cons_up_default_function to implicitly_declare_fn.
14833         * cvt.c (ocp_convert): Use complete_ctor_identifier.
14834         * decl.c (initialize_predefined_identifiers): Initialize it.
14835         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
14836         complex expression.
14837         * init.c (expand_default_init): Don't calculate the in-charge
14838         parameter here.
14839         (build_new_1): Likewise.
14840         * lex.c (cons_up_default_function): Move to method.c.
14841         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
14842         (implicitly_declare_fn): New function.
14843         * typeck.c (build_static_cast): Use complete_ctor_identifier.
14844         (build_modify_expr): Likewise.
14845         * typeck2.c (build_functional_cast): Likewise.
14846
14847         Under the new ABI, constructors don't return `this'.
14848         * cp-tree.h (warn_reorder): Declare.
14849         (special_function_kind): New enum.
14850         (global_base_init_list): Remove declaration.
14851         (emit_base_init): Don't return a value.
14852         (check_base_init): Don't declare.
14853         (is_aggr_typedef): Likewise.
14854         * decl.c (check_special_function_return_type): New function.
14855         (return_types): Remove.
14856         (grokdeclarator): Use check_special_function_return_type.
14857         (start_function): Don't initialize ctor_label under the new ABI.
14858         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
14859         * init.c (begin_init_stmts): Move to top of file.
14860         (finish_init_stmts): Likewise.
14861         (warn_reorder): Don't declare.
14862         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
14863         value.
14864         (check_base_init): Remove.
14865         (is_aggr_typedef): Likewise.
14866         (build_new_1): Don't use the return value of a constructor.
14867         * semantics.c (setup_vtbl_ptr): Don't use the return value
14868         of emit_base_init.
14869         * typeck.c (check_return_expr): Don't magically convert return
14870         statements into `return this' in constructors under the new ABI.
14871
14872         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
14873         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
14874         (base_ctor_identifier): New macro.
14875         (base_dtor_identifier): Likewise.
14876         (deleting_dtor_identifier): Likewise.
14877         * decl.c: Don't include obstack.h.
14878         (obstack_chunk_alloc): Don't define.
14879         (obstack_chunk_free): Likewise.
14880         (struct predefined_identifier): New type.
14881         (initialize_predefined_identifiers): New function.
14882         (init_decl_processing): Use it.
14883         (debug_temp_inits): Remove.
14884         (start_method): Don't call preserve_data.
14885         (hack_incomplete_structures): Update comment.
14886         * init.c (init_init_processing): Don't initialize
14887         nelts_identifier.
14888         (build_offset_rf): Remove dead code.
14889         (build_delete): Use CLASSTYPE_N_BASECLASSES.
14890         * search.c (init_search_processing): Don't initialize
14891         vptr_identifier.
14892
14893 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14894
14895         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
14896         some sign_compare warnings.
14897
14898 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
14899
14900         Rename abi::__vmi_class_type_info members.
14901         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
14902         base_list, detail_masks members to vmi_flags, vmi_base_count,
14903         vmi_bases and vmi_flags_masks respectively.
14904         (__vmi_class_type_info::vmi_flags_masks): Rename
14905         details_unknown_mask to flags_unknown_mask.
14906         * tinfo.cc (__class_type_info::do_upcast): Adjust.
14907         (__vmi_class_type_info::do_find_public_src): Adjust.
14908         (__vmi_class_type_info::do_dyncast): Adjust.
14909         (__vmi_class_type_info::do_upcast): Adjust.
14910
14911 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
14912
14913         * tinfo.cc (convert_to_base): New function.
14914         (get_vbase_offset): Remove. Move into convert_to_base.
14915         (__vmi_class_type_info::do_find_public_src): Adjust.
14916         (__vmi_class_type_info::do_dyncast): Adjust.
14917         (__vmi_class_type_info::do_upcast): Adjust.
14918
14919 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
14920
14921         * tinfo.cc (operator=): Use __builtin_strcmp.
14922         * tinfo2.cc (before): Likewise.
14923
14924 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
14925
14926         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
14927         (DECL_SAVED_INLINE): Rename to ...
14928         (DECL_DEFERRED_FN): ... this.
14929         (in_function_p): Remove declaration.
14930         (mark_inline_for_output): Rename to ...
14931         (defer_fn): ... this.
14932         * decl.c (finish_function): Adjust call to mark_inline_for_output.
14933         (in_function_p): Remove definition.
14934         * decl2.c (saved_inlines): Rename to ...
14935         (deferred_fns): ... this.
14936         (saved_inlines_used): Rename to ...
14937         (deferred_fns_used): ... this.
14938         (mark_inline_for_output): Rename to ...
14939         (defer_fn): ... this.
14940         (finish_file): Adjust accordingly.
14941         (init_decl2): Likewise.
14942         * lex.c (cons_up_default_function): Likewise.
14943         * pt.c (mark_decl_instantiated): Likewise.
14944         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
14945         circumstances.
14946         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
14947         * semantics.c (expand_body): Defer more functions.
14948
14949 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
14950
14951         * vec.cc: New file.
14952         * Make-lang.in (CXX_LIB2FUNCS): Add it.
14953         (vec.o): Build it.
14954         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
14955         __cxa_vec_delete): Declare.
14956
14957 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
14958
14959         * rtti.c (dfs_class_hint_mark): New static function.
14960         (dfs_class_hint_unmark): New static function.
14961         (class_hint_flags): Use them.
14962
14963 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
14964
14965         * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
14966
14967 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
14968
14969         * cp-tree.h (instantiate_decl): Change prototype.
14970         * decl2.c (mark_used): Adjust call.
14971         * optimize.c (inlinable_function_p): Adjust handling of templates.
14972         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
14973         (do_type_instantiation): Likewise.
14974         (instantiate_decl): Defer more templates.
14975         (instantiate_pending_templates): Adjust logic to handle inline
14976         friend functions.
14977
14978         * Makefile.in (GGC_H): New variable.  Use it throughout in place
14979         of ggc.h.
14980
14981         * call.c: Don't include obstack.h.  Include ggc.h.
14982         (obstack_chunk_alloc): Don't define.
14983         (obstack_chunk_free): Likewise.
14984         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
14985         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
14986         (pop_switch): Free it.
14987
14988         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
14989
14990         * dump.c (dequeue_and_dump): Don't try to print the bit_position
14991         if we don't have a DECL_FIELD_OFFSET.
14992
14993 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
14994
14995         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
14996         special_function_p.
14997
14998 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14999
15000         * cfns.gperf (hash, libc_name_p): Prototype.
15001
15002         * rtti.c (build_dynamic_cast_1): Constification.
15003
15004         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
15005
15006         * semantics.c (deferred_type_access_control): Prototype.
15007
15008 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
15009
15010         Correct many new ABI issues regarding vbase and vcall offset
15011         layout.
15012         * cp-tree.h (BINFO_VTABLE): Document.
15013         (struct lang_type): Tweak formatting.
15014         (BINFO_PRIMARY_BINFO): Add to documentation.
15015         (CLASSTYPE_VSIZE): Fix typo in comment.
15016         (CLASSTYPE_VBASECLASSES): Update documentation.
15017         (BINFO_VBASE_MARKED): Remove.
15018         (SET_BINFO_VBASE_MARKED): Likewise.
15019         (CLEAR_BINFO_VBASE_MARKED): Likewise.
15020         (BINFO_FIELDS_MARKED): Remove.
15021         (SET_BINFO_FIELDS_MARKED): Likewise.
15022         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
15023         (enum access_kind): New enumeration.
15024         (num_extra_vtbl_entries): Remove declaration.
15025         (size_extra_vtbl_entries): Likewise.
15026         (get_vtbl_decl_for_binfo): New function.
15027         (dfs_vbase_unmark): Remove declaration.
15028         (mark_primary_bases): Likewise.
15029         * class.c (SAME_FN): Remove.
15030         (struct vcall_offset_data_s): Move definition.
15031         (build_vbase_pointer): Use `build', not `build_binary_op', to
15032         access the vbase pointer under the new ABI.
15033         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
15034         (build_primary_vtable): Likewise.
15035         (dfs_mark_primary_bases): Move here from search.c.
15036         (mark_primary_bases): Likewise.
15037         (determine_primary_bases): Under the new ABI, don't make a base
15038         class a primary base just because we don't yet have any virtual
15039         functions.
15040         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
15041         (num_vfun_entries): Remove.
15042         (dfs_count_virtuals): Likewise.
15043         (num_extra_vtbl_entries): Likewise.
15044         (size_extra_vtbl_entries): Likewise.
15045         (layout_virtual_bases): Iterate in inheritance graph order under
15046         the new ABI.
15047         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
15048         indicate that a vfield is present.
15049         (init_class_processing): Initialize access_public_node, etc., from
15050         ak_public, etc.
15051         (get_vtbl_decl_for_binfo): New function.
15052         (dump_class_hierarchy_r): Likewise.
15053         (dump_class_hierarchy): Use it.
15054         (finish_vtbls): Build the vtbls in inheritance graph order.
15055         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
15056         (initialize_vtable): Use get_vtbl_decl_for_binfo.
15057         (accumulate_vtbl_inits): Add comments explaining why a pre-order
15058         walk is required.
15059         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
15060         where the vptr points, even for primary vtables.
15061         (build_vtbl_initializer): Adjust handling of vbase and vcall
15062         offsets.
15063         (build_vcall_and_vbase_vtable_entries): New function.
15064         (dfs_build_vbase_offset_vtbl_entries): Remove.
15065         (build_vbase_offset_vtbl_entries): Reimplement.
15066         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
15067         were already handled in a primary base class vtable.
15068         (build_vcall_offset_vtbl_entries): Adjust.
15069         (build_rtti_vtbl_entries): Adjust.
15070         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
15071         * init.c (expand_virtual_init): Simplify.
15072         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
15073         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
15074         * search.c (BINFO_ACCESS): New macro.
15075         (SET_BINFO_ACCESS): Likewise.
15076         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
15077         (access_in_type): Likewise.
15078         (dfs_accessible_p): Likewise.
15079         (protected_accessible_p): Likewise.
15080         (lookup_fnfields_1): Adjust documentation.
15081         (dfs_mark_primary_bases): Move to class.c
15082         (mark_primary_bases): Likewise.
15083         (dfs_vbase_unmark): Remove.
15084         (virtual_context): Use BINFO_FOR_VBASE.
15085         (dfs_get_vbase_types): Simplify.
15086         (dfs_build_inheritance_graph_order): New function.
15087         (get_vbase_types): Use it.
15088         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
15089
15090         * tinfo.cc (get_vbase_offset): New function.
15091         (__vmi_class_type_info::do_find_public_src): Use it.
15092         (__vmi_class_type_info::do_dyncast): Likewise.
15093         (__vmi_class_type_info::do_upcast): Likewise.
15094
15095 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
15096
15097         * lang-specs.h: Pass -fno-show-column to the preprocessor.
15098
15099 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
15100
15101         * rtti.c (class_hint_flags): Rename flags.
15102         (class_initializer): Remove flags.
15103         (synthesize_tinfo_var): Combine offset and flags. Add flags
15104         for __vmi_class_type_info.
15105         (create_tinfo_types): Remove flags from __class_type_info and
15106         __si_class_type_info. Merge flags and offset from
15107         base_class_type_info.
15108         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
15109         (__base_class_info::is_virtual_p): Adjust.
15110         (__base_class_info::is_public_p): Adjust.
15111         (__base_class_info::offset): New accessor.
15112         (__class_type_info::details): Remove member.
15113         (__class_type_info::__class_type_info): Lose details.
15114         (__class_type_info::detail_masks): Remove.
15115         (__si_class_type_info::__si_class_type_info): Lose details.
15116         (__vmi_class_type_info::details): New member.
15117         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
15118         (__vmi_class_type_info::detail_masks): New member.
15119         * tinfo.cc (__class_type_info::do_upcast): Initialize result
15120         with unknown_details_mask.
15121         (__vmi_class_type_info::do_find_public_src): Adjust
15122         (__vmi_class_type_info::do_dyncast): Adjust.
15123         (__vmi_class_type_info::do_upcast): Set result details, if
15124         needed. Adjust.
15125         (__dynamic_cast): Temporarily #if out optimization.
15126
15127 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
15128
15129         * rtti.c (get_tinfo_decl): Mark used.
15130         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
15131         mark as dealt with, if we output it.
15132
15133 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
15134
15135         * class.c: Reorganize to put virtual function table initialization
15136         machinery at the end of the file.
15137
15138 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
15139
15140         * class.c (finish_struct): Use bitsize_zero_node.
15141         * pt.c (instantiate_class_template): Likewise.
15142
15143 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
15144
15145         Put RTTI entries at negative offsets in new ABI.
15146         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
15147         vbase offset at index -3, not -1.
15148         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
15149         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
15150         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
15151         (build_rtti_vtbl_entries): New function.
15152         (set_rtti_entry): Remove.
15153         (build_primary_vtable): Don't use it.
15154         (build_secondary_vtable): Likewise.
15155         (start_vtable): Remove.
15156         (first_vfun_index): New function.
15157         (set_vindex): Likewise.
15158         (add_virtual_function): Don't call start_vtable.  Do call
15159         set_vindex.
15160         (set_primary_base): Rename parameter.
15161         (determine_primary_base): Likewise.
15162         (num_vfun_entries): Don't use skip_rtti_stuff.
15163         (num_extra_vtbl_entries): Include RTTI information.
15164         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
15165         (skip_rtti_stuff): Remove.
15166         (dfs_modify_vtables): Don't use it.
15167         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
15168         (layout_nonempty_base_or_field): Update size handling.
15169         (create_vtable_ptr): Tweak.
15170         (layout_class_type): Adjust parameter names.
15171         (finish_struct_1): Simplify.
15172         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
15173         (skip_rtti_stuff): Remove.
15174         (first_vfun_index): New function.
15175         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
15176         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
15177         (marked_vtable_pathp): Declare.
15178         (unmarked_vtable_pathp): Likewise.
15179         * error.c (dump_expr): Use first_vfun_index to calculate vtable
15180         offsets.
15181         * rtti.c (build_headof): Look for RTTI at negative offsets.
15182         (get_tinfo_decl_dynamic): Likewise.
15183         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
15184         here.
15185         (create_pseudo_type_info): Do it here instead.  Adjust so that
15186         vptr points at first virtual function.
15187         * search.c (marked_vtable_pathp): Make it global.
15188         (unmarked_vtable_pathp): Likewise.
15189         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
15190         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
15191         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
15192         (get_pure_virtuals): Likewise.
15193         (expand_upcast_fixups): Likewise.
15194         * tree.c (debug_binfo): Likewise.
15195         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
15196         negative offset.
15197
15198 Sun Mar 26 20:15:26 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15199
15200         * class.c (check_field_decl): Fix typo.
15201         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
15202         (check_methods): Likewise.
15203         (check_field_decls): Likewise.
15204         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
15205         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
15206         Use DECL_RESULT_FLD, not DECL_RESULT.
15207         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
15208         * lex.c (identifier_type): Likewise.
15209         * pt.c (determine_specialization, lookup_template_class): Likewise.
15210         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
15211         (resolve_overloaded_unification, more_specialized): Likewise.
15212         * semantics.c (finish_member_declaration): Likewise.
15213         * typeck.c (build_x_function_call): Likewise.
15214
15215 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
15216
15217         * class.c (layout_empty_base): Handle empty bases with non-byte
15218         alignment.
15219         (build_base_field): Likewise.
15220         (layout_virtual_bases): Likewise.
15221
15222         * class.c (finish_struct_1): Fix typo in this change:
15223
15224         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15225
15226 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
15227
15228         * decl.c (grokdeclarator): Count partial specializations when
15229         keeping track of how many template classes have been seen.
15230
15231         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
15232
15233 Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15234
15235         * class.c (build_vbase_pointer_fields): layout_field now place_field.
15236         (get_vfield_offset): Use byte_position.
15237         (set_rtti_entry): Set OFFSET to ssizetype zero.
15238         (get_binfo_offset_as_int): Deleted.
15239         (dfs_record_base_offsets): Use tree_low_cst.
15240         (dfs_search_base_offsets): Likewise.
15241         (layout_nonempty_base_or_field): Reflect changes in RLI format
15242         and call byte_position.
15243         (layout_empty_base): Convert offset to ssizetype.
15244         (build_base_field): use rli_size_unit_so_far.
15245         (dfs_propagate_binfo_offsets): Do computation in proper type.
15246         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
15247         (layout_class_type): Reflect changes in RLI names and fields.
15248         (finish_struct_1): Set DECL_FIELD_OFFSET.
15249         * dump.c (dequeue_and_dump): Call bit_position.
15250         * expr.c (cplus_expand_constant): Use byte_position.
15251         * rtti.c (expand_class_desc): Use bitsize_one_node.
15252         * typeck.c (build_component_addr): Use byte_position and don't
15253         special case for zero offset.
15254
15255 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
15256
15257         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
15258
15259         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
15260         tinfo object.
15261         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
15262         vtable.
15263
15264 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
15265
15266         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
15267         DECL_P macros.
15268         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
15269         make_typename_type, check_initializer, cp_finish_decl,
15270         xref_tag): Likewise.
15271         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
15272         decl_namespace, arg_assoc_template_arg, arg_assoc,
15273         validate_nonmember_using_decl, do_class_using_decl): Likewise.
15274         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
15275         args_to_string): Likewise.
15276         * friend.c (is_friend): Likewise.
15277         * lex.c (note_got_semicolon, note_list_got_semicolon,
15278         is_global): Likewise.
15279         * method.c (build_overload_nested_name, build_overload_value,
15280         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
15281         * parse.y (typename_sub, typename_sub1): Likewise.
15282         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
15283         process_partial_specialization, convert_template_argument,
15284         template_args_equal, add_pending_template, lookup_template_class,
15285         for_each_template_parm_r, maybe_fold_nontype_arg,
15286         tsubst, instantiate_template, type_unification_real, unify,
15287         instantiate_pending_templates, set_mangled_name_for_template_decl):
15288         Likewise.
15289         * repo.c (repo_get_id, repo_template_used): Likewise.
15290         * search.c (lookup_field_1): Likewise.
15291         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
15292         * xref.c (classname): Likewise.
15293
15294 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
15295
15296         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
15297         (CANONICAL_BINFO): New macro.
15298         (BINFO_NEW_VTABLE_MARKED): Use it.
15299         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
15300         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
15301         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
15302         not TREE_TYPE.
15303         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
15304         (build_secondary_vtable): Likewise.
15305         (dfs_finish_vtbls): Likewise.
15306         (dfs_accumulate_vtbl_inits): Likewise.
15307         (accumulate_vtbl_inits): New function.
15308         (finish_vtbls): Make sure that virtual bases come after
15309         non-virtual bases in the vtable group.
15310         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
15311         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
15312         * search.c (struct vbase_info): Move definition.
15313         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
15314         (unmarked_new_vtable_p): Likewise.
15315         (dfs_mark_vtable_path): Remove.
15316         (dfs_mark_new_vtable): Remove.
15317         (dfs_unmark_new_vtable): Likewise.
15318         (dfs_clear_search_slot): Likewise.
15319         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
15320         (dfs_clear_vbase_slots): Likewise.
15321         (init_vbase_pointers): LIkewise.
15322
15323 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
15324
15325         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
15326         SIZETYPE to a non-SIZETYPE.
15327
15328 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
15329
15330         * class.c (layout_virtual_bases): Adjust names in conditionally
15331         compiled code.
15332
15333         * class.c (record_base_offsets): New function.
15334         (layout_conflict_p): Likewise.
15335         (layout_nonempty_base_or_field): Use it.
15336         (layout_empty_base): New function.
15337         (build_base_field): Use it.
15338         (build_base_fields): Update comment.
15339         (layout_virtual_bases): Fold in a little code form
15340         layout_basetypes.  Use layout_empty_base.
15341         (layout_basetypes): Remove.
15342         (end_of_class): New function.
15343         (layout_class_type): Use it.  Adjust.
15344
15345         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
15346         (fntype_p): Remove.
15347         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
15348         comment.
15349         (dfs_skip_nonprimary_vbases_markedp): Likewise.
15350         * typeck.c (fntype_p): Remove.
15351
15352         * cp-tree.h (TI_SPEC_INFO): Remove.
15353         (CLASSTYPE_TI_SPEC_INFO): Likewise.
15354         * pt.c (process_partial_specialization): Likewise.
15355
15356         * class.c (build_base_field): Fix thinko in computation of binfo
15357         offsets.
15358
15359         * tree.c (mark_local_for_remap_p): Mark variables declared in
15360         TARGET_EXPRs as well.
15361
15362 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
15363
15364         * typeck.c (require_complete_type, complete_type,
15365         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
15366         build_array_ref, convert_arguments, pointer_diff,
15367         build_x_unary_op, build_unary_op, build_c_cast,
15368         build_modify_expr): Use COMPLETE_TYPE_P etc.
15369         * call.c (is_complete, convert_like_real,
15370         build_new_method_call): Likewise.
15371         * class.c (build_vbase_pointer_fields, check_bases,
15372         build_base_field, finish_struct_1, pushclass): Likewise.
15373         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
15374         * decl.c (maybe_process_template_type_declaration, pushtag,
15375         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
15376         layout_var_decl, check_initializer, cp_finish_decl,
15377         grokdeclarator, require_complete_types_for_parms,
15378         grok_op_properties, xref_tag, xref_basetypes,
15379         check_function_type): Likewise.
15380         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
15381         * friend.c (do_friend): Likewise.
15382         * init.c (build_offset_ref): Likewise.
15383         * parse.y (structsp): Likewise.
15384         * pt.c (maybe_process_partial_specialization,
15385         tsubst_friend_function, instantiate_class_template, tsubst,
15386         do_type_instantiation, instantiate_pending_templates): Likewise.
15387         * repo.c (repo_get_id): Likewise.
15388         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
15389         synthesize_tinfo_var, emit_support_tinfos): Likewise.
15390         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
15391         * semantics.c (begin_class_definition): Likewise.
15392         * tree.c (build_cplus_method_type): Likewise.
15393         * typeck2.c (digest_init, build_functional_cast,
15394         add_exception_specifier): Likewise.
15395         * parse.h, parse.c: Regenerated.
15396
15397 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
15398
15399         * inc/cxxabi.h: New header file. Define new-abi entry points.
15400         (__pointer_type_info::target): Rename member to ...
15401         (__pointer_type_info::type): ... here.
15402         (__base_class_info::type): Rename member to ...
15403         (__base_class_info::base): ... here.
15404         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
15405         * cp-tree.h (CPTI_ABI): New global tree enumeration.
15406         (abi_node): New global tree node.
15407         * decl.c (abi_node): Document.
15408         (init_decl_processing): Initialize abi_node.
15409         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
15410         (get_vmi_pseudo_type_info): Likewise.
15411         (create_tinfo_types): Likewise.
15412         (emit_support_tinfos): Likewise.
15413         * tinfo.h (cxxabi.h): Include for new-abi.
15414         Move rtti class definitions to new header file.
15415         * tinfo.cc (abi): Use the namespace.
15416         (std): Move new abi rtti classes from here ...
15417         (__cxxabiv1): ... to here.
15418         * tinfo2.cc (cxxabi.h): Include for new-abi.
15419         Move rtti class definitions to new header file.
15420         (std): Move new abi rtti classes from here ...
15421         (__cxxabiv1): ... to here.
15422         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
15423         namespace.
15424
15425 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
15426             Jason Merrill  <jason@casey.cygnus.com>
15427
15428         * method.c (build_overload_int): Use host_integerp.
15429
15430 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
15431
15432         * init.c (build_offset_ref): Handle the case of a templated member
15433         function.
15434
15435 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
15436
15437         * except.c (expand_exception_blocks): Clear catch_clauses_last.
15438
15439 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
15440
15441         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
15442         * class.c (check_bitfield_decl): Turn illegal bitfields into
15443         non-bitfields.
15444         (dfs_propagate_binfo_offsets): Adjust for new size_binop
15445         semantics.
15446         (dfs_offset_for_unshared_vbases): Likewise.
15447         * cvt.c (cp_convert_to_pointer): Convert NULL to a
15448         pointer-to-member correctly under the new ABI.
15449         * expr.c (cplus_expand_constant): Don't use cp_convert when
15450         turning an offset into a pointer-to-member.
15451         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
15452         when dereferencing them under the new ABI.
15453         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
15454         of pointers-to-members under the new ABI.
15455
15456         * class.c (check_bitfield_decl): Remove restriction on really long
15457         bitfields.
15458         (layout_class_type): Implement new ABI handling of bitfields
15459         longer than their types.
15460
15461 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
15462
15463         * parse.y (extdefs): Call ggc_collect.
15464         * parse.c: Regenerated.
15465
15466 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
15467
15468         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
15469         (note_name_declared_in_class): Use OVL_CURRENT to get at a
15470         potential overload.
15471
15472 Fri Mar 17 08:09:14 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15473
15474         * class.c (build_vbase_path): Use integer_zerop.
15475         (build_vtable_entry): Use tree_low_cst.
15476         (get_vfield_offset): Use bit_position.
15477         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
15478         Use tree_low_cst.
15479         (check_bitfield_decl): Set DECL_SIZE using convert.
15480         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
15481         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
15482         Use tree_low_cst.
15483         (finish_struct_1): Use bit_position.
15484         (dump_class_hierarchy): Use tree_low_cst.
15485         * cp-tree.h (min_precision): Add declaration.
15486         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
15487         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
15488         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
15489         * expr.c (cplus_expand_constant): Use bit_position.
15490         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
15491         * rtti.c (get_base_offset): Use bit_position.
15492         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
15493         host_integerp, and tree_low_cst.
15494         (pointer_int_sum): Use integer_zerop.
15495         (build_component_addr): Use bit_position.
15496
15497 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
15498
15499         * typeck.c (require_complete_type): Don't assume size_zero_node.
15500         (complete_type_or_else): Likewise.
15501
15502 2000-03-16  Steven Grady <grady@digitaldeck.com>
15503             Jason Merrill  <jason@casey.cygnus.com>
15504
15505         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
15506
15507 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
15508
15509         * decl2.c (grokfield): Bail out if type is error_mark_node.
15510
15511 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
15512
15513         * tinfo2.cc (__ptr_to_member_data): Rename to ...
15514         (__pointer_to_member_data): ... here. Adjust.
15515         * rtti.c (create_tinfo_types): Adjust.
15516
15517 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
15518
15519         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
15520         * decl.c (ref_desc_type_node): Undocument.
15521         * rtti.c (ptr_ref_initializer): Rename to ...
15522         (ptr_initializer): ... here. Adjust comments.
15523         (ptmd_initializer): Fix comment thinko.
15524         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
15525         (create_tinfo_types): Remove ref_desc_type_node init.
15526         * tinfo2.cc (__reference_type_info): Remove.
15527
15528 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
15529
15530         * decl.c (cp_finish_decl): Remove obsolete comment.
15531
15532         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
15533
15534 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
15535
15536         * cp-tree.h: Tweak documentation.
15537         * class.c (build_vbase_pointer_fields): Layout the fields, too.
15538         (avoid_overlap): Remove.
15539         (get_binfo_offset_as_int): New function.
15540         (dfs_serach_base_offsets): Likewise.
15541         (layout_nonempty_base_or_field): Likewise.
15542         (build_base_field): Layout fields here.  Avoid placing two objects
15543         of the same type at the same address, under the new ABI.
15544         (build_base_fields): Adjust accordingly.
15545         (create_vtable_ptr): Return the new field, but don't attach it to
15546         TYPE_FIELDS.
15547         (remove_base_field): Remove.
15548         (remove_base_fields): Remove.
15549         (layout_basetypes): Adjust accordingly.
15550         (layout_class_type): Call layout_field for each field, rather than
15551         just making a wholesale call to layout_type.
15552
15553 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
15554
15555         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
15556
15557 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
15558
15559         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
15560
15561         * except.c (dtor_nothrow): New fn.
15562         (do_pop_exception): Use it.  Take type parm.
15563         (push_eh_cleanup): Take type parm.
15564         (expand_start_catch_block): Pass it.
15565         (build_eh_type_type_ref): Accept null type.
15566
15567 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
15568
15569         * cp-tree.h (revert_static_member_fn): Change prototype.
15570         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
15571         (grok_op_properties): Likewise.
15572         (start_function): Likewise.
15573         (revert_static_member_fn): Simplify.
15574         * pt.c (check_explicit_specialization): Adjust call to
15575         revert_static_member_fn.
15576
15577 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
15578
15579         * cp-tree.h (scope_kind): New type.
15580         (tmpl_spec_kind): Likewise.
15581         (declare_pseudo_global_level): Remove.
15582         (pseudo_global_level_p): Rename to template_parm_scope_p.
15583         (pushlevel): Remove declaration.
15584         (begin_scope): New function.
15585         (finish_scope): Likewise.
15586         (current_tmpl_spec_kind): Likewise.
15587         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
15588         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
15589         Add template_spec_p.
15590         (toplevel_bindings_p): Adjust.
15591         (declare_pseudo_global_level): Remove.
15592         (pseudo_global_level_p): Rename to template_parm_scope_p.
15593         (current_tmpl_spec_kind): New function.
15594         (begin_scope): Likewise.
15595         (finish_scope): Likewise.
15596         (maybe_push_to_top_level): Adjust.
15597         (maybe_process_template_type_declaration): Likewise.
15598         (pushtag): Likewise.
15599         (pushdecl_nonclass_level): Likewise.
15600         (lookup_tag): Likewise.
15601         (grokfndecl): Handle member template specializations.  Share
15602         constructor and non-constructor code.
15603         * decl2.c (check_classfn): Handle member template specializations.
15604         * pt.c (begin_template_parm_list): Use begin_scope.
15605         (begin_specialization): Likewise.
15606         (end_specialization): Likewise.
15607         (check_explicit_specialization): Use current_tmpl_spec_kind.
15608         Handle member template specializations.
15609         (end_template_decl): Use finish_scope.  Remove call to
15610         get_pending_sizes.
15611         (push_template_decl_real): Remove bogus error message.
15612         (tsubst_decl): Fix typo in code contained in comment.
15613         (instantiate_template): Handle member template specializations.
15614         (most_general_template): Likewise.
15615
15616 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
15617
15618         * lex.c (whitespace_cr): Compress consecutive calls to warning().
15619         (do_identifier): Ditto for error().
15620
15621         * pt.c (convert_nontype_argument): Ditto for cp_error().
15622         (convert_template_argument): Ditto for cp_pedwarn().
15623
15624 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
15625
15626         * exception.cc (__check_null_eh_spec): New fn.
15627         * except.c (expand_end_eh_spec): Call it if the spec is throw().
15628
15629 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
15630
15631         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
15632         * except.c (expand_end_eh_spec): Add the return type.
15633         * rtti.c (throw_bad_cast): Add the parmtypes.
15634         (throw_bad_typeid): Likewise.
15635
15636         * semantics.c (expand_stmt): Only leave out rtl for unused
15637         artificials, and set DECL_IGNORED_P on them as well.
15638         * decl.c (wrapup_globals_for_namespace): Likewise.
15639
15640 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
15641
15642         * decl.c (maybe_commonize_var): Skip all artificial decls.
15643         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
15644
15645 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
15646
15647         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
15648         * cp-tree.h: Declare flag_enforce_eh_specs.
15649         * decl.c (store_parm_decls, finish_function): Check it.
15650
15651         C library functions don't throw.
15652         * Makefile.in (cfns.h): New target.
15653         (except.o): Depend on it.
15654         * Make-lang.in (cc1plus): Depend on cfns.gperf.
15655         * cfns.gperf: New file.
15656         * cfns.h: Generated.
15657         * except.c: Include it.
15658         (nothrow_libfn_p): New fn.
15659         * decl.c (grokfndecl): Use it.
15660         * cp-tree.h: Declare it.
15661
15662         * decl.c (push_overloaded_decl_1, auto_function,
15663         define_function): Lose.
15664         (build_library_fn_1): New static fn.
15665         (builtin_function): Use it.
15666         (get_atexit_node): Use build_library_fn_ptr.
15667         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
15668         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
15669         push_void_library_fn, push_throw_library_fn): New fns.
15670         * cp-tree.h: Declare them.
15671         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
15672         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
15673         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
15674         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
15675         * rtti.c (build_runtime_decl): Lose.
15676         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
15677         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
15678         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
15679
15680         * call.c (build_call): Remove result_type parm.
15681         Call mark_used on unused artificial fns.
15682         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
15683
15684 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
15685
15686         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
15687         appropriate.
15688         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
15689         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
15690         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
15691         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
15692         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
15693         expand_generic_desc): Likewise.
15694
15695 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
15696
15697         * exception.cc (__cp_pop_exception): Cleanup the original object.
15698
15699 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
15700
15701         * decl.c (grok_op_properties): Merge conversion to void warning
15702         with other silly op warnings.
15703
15704 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
15705
15706         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
15707         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
15708
15709 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
15710
15711         * decl.c (cp_make_fname_decl): New function.
15712         (wrapup_globals_for_namespace): Don't emit unused static vars.
15713         (init_decl_processing): Remove comment about use of
15714         array_domain_type. Set make_fname_decl.
15715         (cp_finish_decl): Remove __FUNCTION__ nadgering.
15716         * semantics.c (begin_compound_stmt): Remove
15717         current_function_name_declared flagging.
15718         (expand_stmt): Don't emit unused local statics.
15719         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
15720         specially.
15721
15722 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
15723
15724         * typeck.c (convert_for_assignment): Don't look at array
15725         initializer.
15726         * call.c (convert_like_real): Likewise.
15727
15728 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
15729
15730         Add initial support for '\uNNNN' specifier.
15731         * lex.c (read_ucs): New fn.
15732         (readescape, skip_white_space): Call it.
15733         (is_extended_char, is_extended_char_1): New fns.
15734         (utf8_extend_token): New fn, #if 0'd out.
15735         (real_yylex): Treat extended chars like letters.
15736
15737         * search.c (note_debug_info_needed): Walk the bases even if we
15738         weren't deferring the type itself.
15739
15740 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15741
15742         * decl2.c (finish_objects): Constify a char*.
15743
15744         * method.c (emit_thunk): Likewise.
15745
15746 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
15747
15748         * typeck.c (dubious_conversion_warnings): Look through
15749         REFERENCE_TYPE.
15750
15751 Mon Mar  6 08:46:47 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15752
15753         * class.c (dfs_modify_vtables): I is now unsigned.
15754         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
15755         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
15756         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
15757         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
15758         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
15759         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
15760         Call integer_all_onesp.
15761         * typeck2.c (process_init_constructor): Use compare_tree_int.
15762
15763         * lang-specs.h (as): Don't call if -syntax-only.
15764
15765 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
15766
15767         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
15768         RTL_EXPR_HAS_NO_SCOPE after all.
15769
15770 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
15771
15772         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
15773         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
15774         RTL_EXPR_HAS_NO_SCOPE.
15775
15776         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
15777         later.
15778
15779         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
15780
15781 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
15782
15783         * call.c (convert_like): Macrofy.
15784         (convert_like_with_context): New macro.
15785         (convert_like_real): Renamed from convert_like.  Add calling
15786         context parameters, for diagnostics. Add recursive flag.  Call
15787         dubious_conversion_warnings for outer conversion.
15788         (build_user_type_conversion): Use convert_like_with_context.
15789         (build_over_call): Likewise. Don't warn about dubious
15790         conversions here. Adjust convert_default_arg calls.
15791         (convert_default_arg): Add context parameters for diagnostics.
15792         Pass through to convert_like_with_context.
15793         * cp-tree.h (convert_default_arg): Add context parameters.
15794         (dubious_conversion_warnings): Prototype new function.
15795         * typeck.c (convert_arguments): Adjust convert_default_arg call.
15796         (dubious_conversion_warnings): New function, broken
15797         out of convert_for_assignment.
15798         (convert_for_assignment): Adjust.
15799
15800 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
15801
15802         * decl2.c (key_method): Break out from...
15803         (import_export_vtable, import_export_class): ...here.
15804
15805         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
15806         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
15807
15808         * search.c (note_debug_info_needed, dfs_debug_mark,
15809         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
15810         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
15811
15812 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
15813
15814         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
15815         typos.
15816
15817 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
15818
15819         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
15820         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
15821         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
15822         (lang_type): Split gets_new into has_new and has_array_new.
15823         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
15824         (TYPE_GETS_NEW): Split into ...
15825         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
15826         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
15827         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
15828         (build_op_new_call): Don't declare.
15829         (build_new_1): Likewise.
15830         * call.c (build_op_new_call): Remove.
15831         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
15832         instead of TYPE_NEEDS_DESTRUCTOR.
15833         (finish_struct_bits): Likewise.
15834         (add_implicitly_declared_members): Likewise.
15835         (check_field_decl): Likewise.
15836         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
15837         correctly under the new ABI.
15838         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
15839         instead of TYPE_NEEDS_DESTRUCTOR.
15840         (initialize_local_var): Likewise.
15841         (destroy_local_var): Likewise.
15842         (cp_finish_decl): Likewise.
15843         (register_dtor_fn): Likewise.
15844         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
15845         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
15846         TYPE_VEC_DELETE_TAKES_SIZE here.
15847         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
15848         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
15849         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
15850         (finish_destructor_body): Likewise.
15851         (maybe_build_cleanup_1): Likewise.
15852         * decl2.c (do_static_destruction): Likewise.
15853         * init.c (build_new_1): Make it static.
15854         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
15855         (expand_cleanup_for_base): Likewise.
15856         (get_cookie_size): New function.
15857         (build_new_1): Handle array-new cookies correctly under the new
15858         ABI.
15859         (build_vec_delete_1): Likewise.
15860         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
15861         (build_delete): Likewise.
15862         (build_vec_delete): Handle array-new cookies correctly under the new
15863         ABI.
15864         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
15865         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
15866         TYPE_HAS_ARRAY_NEW_OPERATOR.
15867         * ptree.c (print_lang_type): Check them.
15868         * search.c (context_for_name_lookup): Fix typo in comment.
15869         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
15870         * tree.c (break_out_cleanups): Likewise.
15871         (build_cplus_array_test_1): Likewise.
15872         (cp_build_qualified_type_real): Likewise.
15873         * typeck.c (complete_type): Likewise.
15874
15875         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
15876         the command-line, not the end.
15877
15878 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
15879
15880         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
15881
15882 2000-03-02  Tom Tromey  <tromey@cygnus.com>
15883
15884         * cp-tree.h (build_java_class_ref): Declare.
15885         * init.c (build_java_class_ref): No longer static.
15886         * except.c (expand_throw): Generate a Java-style `throw' if the
15887         thrown object is a "Java" object.
15888         (initialize_handler_parm): Generate a Java-style lookup of
15889         exception info if the caught object is a "Java" object.
15890         (catch_language, catch_language_init): New globals.
15891         (decl_is_java_type): New function.
15892         (expand_start_catch_block): Don't call push_eh_info() or
15893         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
15894         class reference to build_catch_block.
15895
15896 Thu Mar  2 13:32:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15897
15898         * typeck.c (comptypes): Treat sizetype like its language equivalent.
15899
15900 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
15901
15902         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
15903         to merge reference/pointer code and fix incorrect warnings.
15904
15905 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
15906
15907         * search.c (protected_accessible_p): Use context_for_name_lookup.
15908
15909         * init.c (construct_virtual_bases): Fix thinko.
15910         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
15911
15912 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
15913
15914         * decl.c (current_function_decl): Move to toplev.c.
15915
15916 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
15917
15918         * pt.c (fn_type_unification): Unify return type, whenever
15919         provided.
15920         (get_bindings_real): Only pass return type when necessary.
15921         Remove explicit return type check.
15922         * class.c (resolve_address_of_overloaded_function): Pass desired
15923         return type to fn_type_unification.
15924
15925 Mon Feb 28 08:15:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15926
15927         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
15928         DECL_FIELD_SIZE.
15929         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
15930         DECL_FIELD_SIZE.
15931         * rtti.c (expand_class_desc): Likewise.
15932         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
15933         (THUNK_VCALL_OFFSET): Likewise.
15934         (THUNK_DELTA): Reflect changes in ../tree.h.
15935
15936 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
15937
15938         * search.c (protected_accessible_p): Also allow the access if
15939         the member is public in DERIVED.  Lose TYPE parm.
15940         (friend_accessible_p): Lose TYPE parm.
15941         (accessible_p): Adjust.
15942
15943 Sun Feb 27 16:40:33 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15944
15945         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
15946         on things that are not sizes; ssize_binop deleted.
15947         Call size_diffop when appropriate.
15948         (dfs_build_vcall_offset_vtbl_entries): Likewise.
15949         (build_primary_vtable, build_secondary_vtable): Likewise.
15950         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
15951         Variable I is HOST_WIDE_INT.
15952         (get_vfield_offset): Pass proper types to size_binop.
15953         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
15954         (finish_struct_1): Likewise.
15955         (skip_rtti_stuff): Arg N is now pointer to signed.
15956         (layout_class_type): Use size_zero_node.
15957         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
15958         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
15959         * decl.c (complete_arry_type): Pass proper types to size_binop.
15960         (xref_basetypes): BINFO_OFFSET is sizetype.
15961         * error.c (dump_expr): Don't use size_binop non-sizes.
15962         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
15963         * init.c (construct_virtual_bases): Fix type error.
15964         (build_vec_delete_1): Pass proper type to size_binop and don't
15965         fold result.
15966         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
15967         * rtti.c (get_base_offset): Pass proper type to size_binop.
15968         * search.c (dfs_find_vbases): Fix type error.
15969         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
15970         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
15971         * tree.c (debug_binfo): Variable N is signed.
15972         Use HOST_WIDE_INT_PRINT_DEC.
15973         * typeck.c (comptypes): sizetype is same as equivalent integer type.
15974         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
15975         size_one_node and size_zero_node.
15976         (c_alignof): Use size_one_node.
15977         (build_component_addr): Pass proper types to size_binop.
15978         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
15979
15980 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
15981
15982         Implement class scope using-declarations for functions.
15983         * class.c (handle_using_decl): Call add_method for used functions.
15984         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
15985         (add_method): Used functions are hidden by local functions.
15986         (check_bases_and_members): Handle using-decls before finalizing
15987         CLASSTYPE_METHOD_VEC.
15988         * call.c (add_function_candidate): Add ctype parm; if nonzero,
15989         override the type of 'this' accordingly.
15990         (add_template_candidate, add_template_candidate_real): Add ctype parm.
15991         (convert_class_to_reference, build_user_type_conversion_1,
15992         build_new_function_call, build_object_call, build_new_op,
15993         build_new_method_call): Pass ctype parm.
15994
15995         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
15996         the baselink.
15997         * call.c (convert_class_to_reference, build_user_type_conversion_1,
15998         build_new_function_call, build_object_call, build_new_op,
15999         build_new_method_call, build_op_delete_call): Don't get basetype_path
16000         from a baselink.
16001         * typeck.c (build_component_ref): Likewise.
16002         * init.c (build_offset_ref): Likewise.
16003         (resolve_offset_ref): Don't call enforce_access.
16004         Call build_scoped_ref.
16005         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
16006         would cause an error or if -pedantic.
16007         * class.c (alter_access): Lose binfo parm.
16008
16009 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
16010
16011         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
16012         types.
16013
16014 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
16015
16016         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
16017         pseudo_type_info creation into the std namespace
16018
16019 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
16020
16021         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
16022         (import_export_class): Remove declaration.
16023         * decl2.c (import_export_class): Make it static.
16024         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
16025         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
16026         EXPR_WITH_FILE_LOCATION.
16027         * lex.c (check_newline): Tweak filename/lineno setting.
16028         * semantics.c (begin_while_stmt): Fix typo in comment.
16029
16030 Sat Feb 26 19:50:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16031
16032         * lang-options.h (-fmessage-length=): Add missing option.
16033
16034         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
16035
16036 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
16037
16038         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
16039
16040 Fri Feb 25 14:52:33 2000  Jim Wilson  <wilson@cygnus.com>
16041
16042         * optimize.c (expand_call_inline): Emit the return label before
16043         evaluating the return value.
16044
16045 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
16046
16047         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
16048         than duplicating functionality here.
16049         * optimize.c: Include input.h.
16050         (expand_call_inline): Use push_srcloc and pop_srcloc.
16051         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
16052         * parse.c: Regenerated.
16053         * Makefile.in (lex.o): Depend on input.h.
16054         (optimize.o): Likewise.
16055
16056 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
16057
16058         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
16059         function type, rather than ICE.
16060
16061 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
16062
16063         * decl.c (grokdeclarator): Call decl_type_access_control.
16064         * parse.y (parse_end_decl): Don't call decl_type_access_control if
16065         decl is null.
16066
16067 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
16068
16069         * decl.c (decls_match): Remove obsolete static member nadgering.
16070
16071 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
16072
16073         * decl.c (grokdeclarator): Change ANSI to ISO.
16074         * lex.c (consume_string, readescape, do_identifier): Likewise.
16075         (parse_float, real_yylex): Likewise.
16076         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
16077         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
16078         new_type_id, maybe_label_decls, simple_stmt,
16079         for.init.statement): Likewise.
16080         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
16081         * semantics.c (finish_named_return_value): Likewise.
16082         * parse.c: Regenerate.
16083
16084 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
16085
16086         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
16087         (CPTI_CLASS_STAR_TYPE): Remove.
16088         (vtable_index_type): Likewise.
16089         (class_star_type_node): Remove.
16090         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
16091         (build_binary_op_nodefault): Remove.
16092         * call.c (build_new_op): Use build_binary_op instead of
16093         build_binary_op_nodefault.
16094         * decl.c (init_decl_processing): Remove class_star_type_node
16095         initialization.  Make delta_type_node ptrdiff_type_node under the
16096         new ABI.  Initialize vtable_index_type.
16097         (build_ptrmemfunc_type): Build different structures for the new
16098         ABI.
16099         (build_enumerator): Use build_binary_op instead of
16100         build_binary_op_nodefault.
16101         * method.c (build_overload_value): Mangle pointers-to-members
16102         appropriately under the new ABI.
16103         * typeck.c (build_array_ref): Use build_binary_op instead of
16104         build_binary_op_nodefault.
16105         (get_member_function_from_ptrfunc): Adjust for the new ABI.
16106         (build_binary_op_nodefault): Rename to ...
16107         (build_binary_op): ... this.  Remove old version.  Adjust for
16108         pointer-to-member comparisons under the new ABI.
16109         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
16110         (build_ptrmemfunc): Adjust for the new ABI.
16111         (expand_ptrmemfunc_cst): Likewise.
16112         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
16113         (pfn_from_ptrmemfunc): Adjust for the new ABI.
16114
16115 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
16116
16117         * call.c (build_object_call): Compress consecutive calls to
16118         cp_error.
16119         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
16120         (build_op_delete_call): Adjust message formatting.
16121
16122         * class.c (check_bases): Compress consecutive calls to
16123         cp_pedwarn.
16124         (finish_struct_anon): Say 'ISO C++'.
16125
16126         * decl.c (start_decl): Same here.
16127         (grok_reference_init): Likewise.
16128         (grokfndecl): Correct message formatting.
16129         (grokfndecl): Improve diagnostic.
16130         (check_static_variable_definition): Likewise. Say 'ISO C++'
16131         (compute_array_index_type): Say 'ISO C++'
16132         (create_array_type_for_decl): Compress consecutive calls to
16133         cp_error.
16134         (grokdeclarator): Say 'ISO C++'
16135         (grok_op_properties): Likewise.
16136
16137         * decl2.c (delete_sanity): Clairify diagnostic.
16138         (check_member_template): Same here.
16139         (grok_function_init): Use consistent terminology.
16140
16141         * expr.c (do_case): Say 'ISO C++'
16142
16143         * friend.c (do_friend): Compress consecutive calls to warning.
16144
16145 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
16146
16147         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
16148         * class.c (build_secondary_vtable): Reorganize.  Don't create a
16149         new vtable under the new ABI.
16150         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
16151         computing the size.
16152         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
16153         the initializing elements.
16154         (initialize_vtable): New function.
16155         (dfs_finish_vtbls): Use it.
16156         (dfs_accumulate_vtbl_inits): New function.
16157         (finish_vtbls): Merge primary and secondary vtables under the new
16158         ABI.
16159         (finish_struct_1): Remove redundant call to layout_vtable_decl.
16160         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
16161         aren't VAR_DECLs.
16162
16163         * class.c (build_vtable): New function, split out from ...
16164         (get_vtable_decl): ... here, and ...
16165         (build_secondary_vtable): ... here.
16166
16167         * pt.c (tsubst_decl): Fix formatting.
16168
16169 Sat Feb 19 18:43:13 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16170
16171         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
16172         (avoid_overlap, build_base_field): Likewise.
16173         (build_base_field, build_base_fields, is_empty_class):
16174         Test DECL_SIZE with integer_zero.
16175         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
16176         * cp-tree.h (struct lang_type): New field size_unit.
16177         (CLASSTYPE_SIZE_UNIT): New macro.
16178         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
16179         (cp_finish_decl): Delete -Wlarger-than processing.
16180         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
16181         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
16182         * tree.c (make_binfo): binfo vector is one entry longer.
16183         (walk_tree): Walk DECL_SIZE_UNIT.
16184
16185 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
16186
16187         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
16188         comment.
16189         (build_vtable_entry): Don't assume all vtable entries are
16190         functions.
16191         (build_vtbl_initializer): Adjust accordingly.
16192         (get_vtable_decl): Fix formatting.
16193
16194 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
16195
16196         * semantics.c (deferred_type_access_control): Walk the entire
16197         type_lookups list.
16198         (save_type_access_control): Rename from
16199         initial_deferred_type_access_control.  Just remember the value.
16200         (decl_type_access_control): New fn.
16201         (begin_function_definition): Use deferred_type_access_control, after
16202         we've started the function.  Set type_lookups to error_mark_node.
16203         * parse.y (frob_specs, fn.def1): Adjust.
16204         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
16205         (parse_end_decl, parse_bitfield0, parse_method): New fns.
16206         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
16207         (after_type_component_declarator0): Likewise.
16208         (after_type_component_declarator): Likewise.
16209         (notype_component_declarator): Likewise.
16210         * cp-tree.h: Adjust.
16211
16212         * decl.c (redeclaration_error_message): Allow redeclaration of
16213         namespace-scope decls.
16214
16215 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
16216
16217         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
16218
16219 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
16220
16221         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
16222         * decl2.c (grokclassfn): Likewise.
16223
16224         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
16225
16226         * decl2.c (lang_decode_option): Don't set default message length
16227         here.
16228         * lex.c (lang_init_options): Set it here.
16229
16230 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
16231
16232         Make DECL_CONTEXT mean the class in which a member function was
16233         declared, even for a virtual function.
16234         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
16235         (DECL_FRIEND_CONTEXT): New macro.
16236         (DECL_REAL_CONTEXT): Remove.
16237         (SET_DECL_FRIEND_CONTEXT): Likewise.
16238         (DECL_VIRTUAL_CONTEXT): Adjust.
16239         (DECL_CLASS_SCOPE_P): Use TYPE_P.
16240         (add_friends): Remove.
16241         (hack_decl_function_context): Likewise.
16242         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
16243         CP_DECL_CONTEXT.
16244         (build_over_call): Fix indentation.  Use DECL_CONTEXT
16245         instead of DECL_CLASS_CONTEXT.
16246         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
16247         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
16248         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
16249         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
16250         (build_base_field): Likewise.
16251         (finish_struct_1): Likewise.
16252         (build_self_reference): Likewise.
16253         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
16254         DECL_REAL_CONTEXT.
16255         (pushtag): Use decl_function_context, not
16256         hack_decl_function_context.
16257         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
16258         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
16259         (pushdecl): Remove bogus code.
16260         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
16261         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
16262         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
16263         Use decl_function_context, nothack_decl_function_context.
16264         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
16265         (grokdeclarator): Likewise.  Use decl_function_context, not
16266         hack_decl_function_context.
16267         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
16268         (start_function): Use DECL_FRIEND_CONTEXT, not
16269         DECL_CLASS_CONTEXT.  Use decl_function_context, not
16270         hack_decl_function_context.
16271         (finish_function): Use decl_function_context, not
16272         hack_decl_function_context.
16273         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
16274         DECL_CLASS_CONTEXT.
16275         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
16276         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
16277         (grokfield): Likewise.
16278         (finish_builtin_type): Likewise.
16279         (finish_vtable_vardec): Use decl_function_context, not
16280         hack_decl_function_context.
16281         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
16282         (start_static_initialization_or_destruction): Likewise.
16283         (finish_static_initialization_or_destruction): Likewise.
16284         (mark_used): Adjust logic for deciding when to synthesize methods.
16285         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
16286         DECL_REAL_CONTEXT.
16287         * error.c (dump_function_decl): Use DECL_CONTEXT, not
16288         DECL_CLASS_CONTEXT.
16289         * friend.c (is_friend): Likewise.
16290         (add_friends): Remove.
16291         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
16292         * lex.c (begin_definition_of_inclass_inline): Use
16293         decl_function_context, not hack_decl_function_context.
16294         (process_next_inline): Likewise.
16295         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
16296         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
16297         DECL_CLASSS_CONTEXT.
16298         (hack_identifier): Likewise.
16299         (synthesize_method):  Use decl_function_context, not
16300         hack_decl_function_context.
16301         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
16302         DECL_REAL_CONTEXT.
16303         (is_member_template): Use decl_function_context, not
16304         hack_decl_function_context.  Use DECL_CONTEXT, not
16305         DECL_CLASS_CONTEXT.
16306         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
16307         DECL_CLASS_CONTEXT.
16308         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
16309         DECL_REAL_CONTEXT.
16310         (push_template_decl_real): Likewise.
16311         (instantiate_class_template): Don't call add_friends.
16312         (tsubst_default_argument): Use DECL_CONTEXT, not
16313         DECL_REAL_CONTEXT.
16314         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
16315         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
16316         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
16317         DECL_CLASS_CONTEXT.
16318         * repo.c (repo_inline_used): Likewise.
16319         * search.c (current_scope): Adjust for new _CONTEXT macros.
16320         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
16321         DECL_REAL_CONTEXT.
16322         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
16323         (lookup_fnfields_here):Likewise.
16324         (check_final_overrider): Likewise.
16325         (init_vbase_pointers): Likewise.
16326         (virtual_context): Likewise.
16327         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
16328         (expand_body): Use decl_function_context, not
16329         hack_decl_function_context.
16330         * tree.c (hack_decl_function_context): Remove.
16331         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
16332         DECL_CLASS_CONTEXT.
16333         * typeck2.c (error_not_base_type): Likewise.
16334
16335 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
16336
16337         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
16338
16339 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16340
16341         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
16342
16343 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
16344
16345         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
16346
16347 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
16348
16349         * decl2.c (lang_decode_option): Enable automatic line wrapping.
16350
16351 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
16352
16353         * parse.y (frob_specs): Split out...
16354         (parse_decl): From here.
16355         (fn.def2): Call initial_deferred_type_access_control.
16356         (after_type_component_declarator0): Call frob_specs.
16357         (notype_component_declarator0): Likewise.
16358         * search.c (friend_accessible_p): Nested classes are friends of their
16359         enclosing classes.
16360
16361 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
16362
16363         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
16364         used to create an implicit temporary.
16365
16366         * class.c (dfs_modify_vtables): Tweak calculation of functions to
16367         override.
16368
16369 2000-02-08  Nathan Sidwell  <nathan@acm.org>
16370
16371         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
16372         strip array element qualifiers too.
16373
16374 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
16375
16376         * decl.c (store_parm_decls): Don't build cleanups for parameters
16377         while processing_template_decl.
16378
16379 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
16380
16381         * cp-tree.h (struct saved_scope): Add incomplete field.
16382         (namespace_scope_incomplete): New macro.
16383         * decl.c (pushdecl): Use it.
16384         (hack_incomplete_structures): Use it.  See through artificial
16385         binding levels.
16386         (mark_saved_scope): Mark it.
16387
16388         Implement access control for nested types.
16389         * search.c (type_access_control): New fn.
16390         (accessible_p): Now we do perform access control for types.
16391         * semantics.c (deferred_type_access_control): New fn.
16392         (initial_deferred_type_access_control): New fn.
16393         (begin_function_definition): Call it.  Add lookups parm.
16394         * decl.c (struct binding_level): Add this_class field.
16395         (pushlevel_class): Set it.
16396         (mark_binding_level): Mark it.
16397         (lookup_name_real): Use it.  Call type_access_control.
16398         (mark_saved_scope): Mark lookups field.
16399         * cp-tree.h (flagged_type_tree): Add lookups field.
16400         (struct saved_scope): Add lookups field.
16401         (type_lookups): New macro.
16402         * parse.y (declmods): Now <ftype>.
16403         (parse_decl): Add lookups parm.  Call
16404         initial_deferred_type_access_control.
16405         (lang_extdef): Clear type_lookups.
16406         (typed_declspecs, declmods, typespec): Set lookups field.
16407         (initdcl): Call deferred_type_access_control.
16408         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
16409         component_decl_1, named_parm): Adjust.
16410         * friend.c (is_friend): Nested classes are friends of their
16411         enclosing classes.
16412
16413         * class.c (currently_open_derived_class): New fn.
16414         * method.c (hack_identifier): Use it.
16415
16416         * lex.c (do_identifier): Remove obsolete code.
16417
16418         * parse.y (typed_typespecs): Propagate new_type_flag properly.
16419
16420 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
16421
16422         * tinfo.h: Remove apostrophes from C++ comment (xgettext
16423         thinks this file is plain C).
16424
16425 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16426
16427         * Makefile.in (call.o): Depend on $(EXPR_H).
16428
16429         * call.c: Include "expr.h".
16430
16431         * class.c (dump_class_hierarchy): Add prototype.
16432
16433         * search.c (dfs_get_pure_virtuals): Likewise.
16434
16435 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
16436
16437         * parse.y (simple_stmt): Allow :: token in asm parameter list.
16438         * parse.c: Rebuilt.
16439
16440 Mon Jan 31 15:35:29 2000  Jim Wilson  <wilson@cygnus.com>
16441
16442         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
16443         Store it in DECL_FCONTEXT.
16444         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
16445
16446 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
16447
16448         * tinfo.h (old abi): #include "tconfig.h".
16449         * tinfo.cc (convert_to_base): Move into old abi section.
16450
16451 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
16452
16453         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
16454         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
16455         (BINFO_PRIMARY_BINFO): New macro.
16456         (BF_DELTA): Rename to ...
16457         (BV_DELTA): ... this.
16458         (BF_VCALL_INDEX): Rename to ...
16459         (BV_VCALL_INDEX): ... this.
16460         (BF_FN): Rename to ...
16461         (BV_FN): ... this.
16462         * class.c (build_vbase_path): Adjust for changes to reverse_path.
16463         (set_rtti_entry): Rename BF_ macros to BV_ variants.
16464         (modify_vtable_entry): Simplify.
16465         (add_virtual_function): Rename BF_ macros to BV_ variants.
16466         (build_vtable_initializer): Likewise.
16467         (get_class_offset_1): Remove.
16468         (dfs_get_class_offset): Likewise.
16469         (get_class_offset): Likewise.
16470         (dfs_find_final_overrider): New function.
16471         (find_final_overrider): Likewise.
16472         (modify_one_vtable): Remove.
16473         (dfs_find_base): New function.
16474         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
16475         find_final_overrider.
16476         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
16477         virtuals.
16478         (dfs_fixup_vtable_deltas): Remove.
16479         (override_one_vtable): Remove.
16480         (merge_overrides): Likewise.
16481         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
16482         unreal chilren of virtual bases.
16483         (finish_struct_1): Don't use merge_overrides.  Don't use
16484         dfs_fixup_vtable_deltas.
16485         * tree.c (reverse_path): Return a TREE_LIST, not a chain of
16486         BINFOs.
16487
16488 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
16489             Jason Merrill  <jason@yorick.cygnus.com>
16490
16491         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
16492
16493 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
16494
16495         * exception.cc (__throw_bad_typeid): Add missing std::.
16496
16497 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16498
16499         * cp-tree.h (make_thunk): PROTO -> PARAMS.
16500
16501 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
16502
16503         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
16504
16505         Runtime support for new-abi rtti.
16506         * inc/typeinfo (type_info::operator!=): Define in class.
16507         (type_info::before, type_info::name, type_info::operator==,
16508         type_info::operator!=): Define new ABI implementations.
16509         (type_info::is_pointer_p, type_info::is_function_p): Declare
16510         new virtual functions.
16511         (type_info::do_catch, type_info::do_upcast): Likewise.
16512
16513         * tinfo.h (__base_class_info): Define new class.
16514         (__class_type_info): Likewise.
16515         (__si_class_type_info): Likewise.
16516         (__vmi_class_type_info): Likewise.
16517         (__dynamic_cast): Prototype.
16518
16519         * tinfo.cc: Conditionalize old and new rtti mechanisms.
16520         (type_info::is_pointer_p): Define new function.
16521         (type_info::is_function_p): Likewise.
16522         (type_info::do_catch): Likewise.
16523         (type_info::do_upcast): Likewise.
16524         (vtable_prefix): New structure for vtable access.
16525         (adjust_pointer): Define new template function.
16526         (contained_p, public_p, virtual_p, contained_public_p,
16527         contained_nonpublic_p, contained_nonvirtual_p): Define new
16528         functions.
16529         (nonvirtual_base_type): New local variable.
16530         (__class_type_info::~__class_type_info): Define.
16531         (__si_class_type_info::~__si_class_type_info): Likewise.
16532         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
16533         (__class_type_info::do_catch): Define new function.
16534         (__class_type_info::do_upcast): Likewise.
16535         (__class_type_info::find_public_src): Likewise.
16536         (__class_type_info::do_find_public_src): Likewise.
16537         (__si_class_type_info::do_find_public_src): Likewise.
16538         (__vmi_class_type_info::do_find_public_src): Likewise.
16539         (__class_type_info::do_dyncast): Likewise.
16540         (__si_class_type_info::do_dyncast): Likewise.
16541         (__vmi_class_type_info::do_dyncast): Likewise.
16542         (__class_type_info::do_upcast): Likewise.
16543         (__si_class_type_info::do_upcast): Likewise.
16544         (__vmi_class_type_info::do_upcast): Likewise.
16545         (__dynamic_cast): Likewise.
16546
16547         * tinfo2.cc (__fundamental_type_info): Define new class.
16548         (__pointer_type_info): Likewise.
16549         (__reference_type_info): Likewise.
16550         (__array_type_info): Likewise.
16551         (__function_type_info): Likewise.
16552         (__enum_type_info): Likewise.
16553         (__ptr_to_member_type_info): Likewise.
16554         (__fundamental_type_info::~__fundamental_type_info): Define.
16555         (__pointer_type_info::~__pointer_type_info): Likewise.
16556         (__reference_type_info::~__reference_type_info): Likewise.
16557         (__array_type_info::~__array_type_info): Likewise.
16558         (__function_type_info::~__function_type_info): Likewise.
16559         (__enum_type_info::~__enum_type_info): Likewise.
16560         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
16561         (__pointer_type_info::do_catch): Define new function.
16562         (__ptr_to_member_type_info::do_catch): Define new function.
16563
16564         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
16565         (__is_pointer): Likewise.
16566
16567         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
16568
16569 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
16570
16571         * cp/class.c (build_vtable): Rename to build_primary_vtable.
16572         (prepare_fresh_vtable): Rename to build_secondary_vtable.
16573         (make_new_vtable): New function.
16574         (modify_vtable_entry): Handle generation of new vtables correctly.
16575         (modify_one_vtable): Remove unused parameter.
16576         (dfs_fixup_vtable_deltas): Likewise.
16577         (override_one_vtable): Use build_secondary_vtable.
16578         (finish_struct_1): Use build_primary_vtable and
16579         build_secondary_vtable.
16580
16581 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
16582
16583         * cp/decl.c: Adjust variable names, comments, help strings.
16584
16585 2000-01-29  Nathan Sidwell  <nathan@acm.org>
16586
16587         * new2.cc (operator delete[]): Use operator delete, don't assume
16588         implementation.
16589
16590 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
16591
16592         * class.c (build_vtbl_initializer): Add argument to
16593         build_vtable_entry call.
16594
16595 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
16596
16597         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
16598         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
16599         (BF_DELTA): New macro.
16600         (BF_VCALL_INDEX): Likewise.
16601         (BF_FN): Likewise.
16602         (THUNK_VCALL_OFFSET): Likewise.
16603         (make_thunk): Change prototype.
16604         * class.c (build_vtable_entry): Integrate
16605         build_vtable_entry_for_fn.  Handle vcall indices.
16606         (build_vtable_entry_for_fn): Remove.
16607         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
16608         BF_VCALL_INDEX, BF_FN.
16609         (modify_vtable_entry): Integrate common code from
16610         modify_one_vtable and dfs_fixup_vtable_deltas.
16611         (add_virtual_function): Set BF_VCALL_INDEX.
16612         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
16613         and BF_FN.
16614         (modify_one_vtable): Simplify.
16615         (dfs_fixup_vtable_deltas): Likewise.
16616         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
16617         * method.c (make_thunk): Handle vcall indices.
16618
16619 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
16620
16621         Compiler side new abi rtti (not enabled).
16622         * cp-tree.h (new_abi_rtti_p): New macro.
16623         (emit_support_tinfos): Prototype new function.
16624         (tinfo_decl_p): Likewise.
16625         (emit_tinfo_decl): Likwise.
16626         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
16627         macros.
16628         (doing_runtime): New local static.
16629         (init_rtti_processing): Add new-abi initializer.
16630         (get_tinfo_decl): Add new-abi logic.
16631         (tinfo_from_decl): Likewise.
16632         (build_dynamic_cast_1): Likewise.
16633         (qualifier_flags): New static function.
16634         (tinfo_base_init): Likewise.
16635         (generic_initializer): Likewise.
16636         (ptr_ref_initializer): Likewise.
16637         (ptmd_initializer): Likewise.
16638         (class_hint_flags): Likewise.
16639         (class_initializer): Likewise.
16640         (synthesize_tinfo_var): Likewise.
16641         (create_real_tinfo_var): Likewise.
16642         (create_pseudo_type_info): Likewise.
16643         (get_vmi_pseudo_type_info): Likewise.
16644         (create_tinfo_types): Likewise.
16645         (emit_support_tinfos): New global function.
16646         (tinfo_decl_p): New global predicate.
16647         (emit_tinfo_decl): New global function.
16648         * class.c (set_rtti_entry): Generalize for old and new rtti.
16649         (build_vtbl_initializer): Likewise.
16650         * decl2.c (finish_file): Likewise.
16651
16652 Thu Jan 27 20:53:36 2000  Jim Wilson  <wilson@cygnus.com>
16653
16654         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
16655         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
16656
16657 Thu Jan 27 13:54:12 2000  Mike Stump  <mrs@wrs.com>
16658
16659         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
16660         for scopes.
16661
16662 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
16663
16664         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
16665
16666 Wed Jan 26 22:19:14 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
16667
16668         * optimize.c (calls_setjmp_r): Supply new argument
16669         to special_function_p.
16670
16671 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16672
16673         * call.c: PROTO -> PARAMS.
16674         * class.c: Likewise.
16675         * cp-tree.h: Likewise.
16676         * cvt.c: Likewise.
16677         * decl.c: Likewise.
16678         * decl.h: Likewise.
16679         * decl2.c: Likewise.
16680         * dump.c: Likewise.
16681         * errfn.c: Likewise.
16682         * error.c: Likewise.
16683         * except.c: Likewise.
16684         * expr.c: Likewise.
16685         * init.c: Likewise.
16686         * input.c: Likewise.
16687         * lex.c: Likewise.
16688         * lex.h: Likewise.
16689         * method.c: Likewise.
16690         * optimize.c: Likewise.
16691         * parse.y: Likewise.
16692         * pt.c: Likewise.
16693         * repo.c: Likewise.
16694         * rtti.c: Likewise.
16695         * search.c: Likewise.
16696         * semantics.c: Likewise.
16697         * spew.c: Likewise.
16698         * tree.c: Likewise.
16699         * typeck.c: Likewise.
16700         * typeck2.c: Likewise.
16701         * xref.c: Likewise.
16702
16703 2000-01-25  Richard Henderson  <rth@cygnus.com>
16704
16705         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
16706
16707 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
16708
16709         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
16710         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
16711         (struct vcall_offset_data_s): New type.
16712         (dfs_vcall_offset_queue_p): New function.
16713         (dfs_build_vcall_offset_vtbl_entries): Likewise.
16714         (build_vcall_offset_vtbl_entries): Likewise.
16715         (layout_vtable_decl): Likewise.
16716         (num_vfun_entries): Likewise.
16717         (num_extra_vtbl_entries): Add the entries for vcall offsets.
16718         (build_vtbl_initializer): Likewise.
16719         (dfs_finish_vtabls): Use layout_vtable_decl.
16720         (modify_one_vtables): Always duplicate vtables under the new ABI.
16721         (finish_struct_1): Use layout_vtable_decl.
16722
16723 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16724
16725         * decl.c (member_function_or_else): Change third arg from a format
16726         specifier to an `enum overload_flags'.  Callers changed.
16727
16728 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
16729
16730         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
16731         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
16732         build_const_cast, get_delta_difference, check_return_expr): Avoid
16733         ANSI string concatenation usage.
16734
16735 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
16736
16737         * class.c (layout_class_type): Put the fields required to make a
16738         class non-empty at the end, not the beginning, of the TYPE_FIELDs
16739         list.
16740
16741 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
16742
16743         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
16744         template.
16745
16746         * decl2.c (mark_used): Do instantiate inlines that have been
16747         explicitly instantiated.
16748
16749 2000-01-24  Richard Henderson  <rth@cygnus.com>
16750
16751         * call.c (build_over_call): Use expand_tree_builtin.
16752         * typeck.c (build_function_call_real): Likewise.
16753         (build_binary_op_nodefault): Handle unordered compares.
16754
16755 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
16756
16757         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
16758         cp_tree_index values.
16759         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
16760         New global node #defines for them.
16761         * rtti.c (call_void_fn): Replace with ...
16762         (build_runtime_decl): ... new static function.
16763         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
16764         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
16765         (build_dynamic_cast_1): Always produce correctly typed result.
16766         Explicitly produce type_info addresses. Use dynamic_cast_node.
16767         * exception.cc (__throw_bad_cast): Return `void *'.
16768         (__throw_bad_typeid): Return `const type_info &'.
16769
16770 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
16771
16772         * cp-tree.h (get_vtable_decl): Prototype new function.
16773         * class.c (get_vtable_decl): New function. Broken out from ...
16774         (build_vtable): ... here. Use it.
16775         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
16776         by get_vtable_decl.
16777
16778 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
16779
16780         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
16781         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
16782         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
16783         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
16784         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
16785         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
16786         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
16787         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
16788         (CPTI_TINFO_VAR_ID): New enumeration.
16789         (__tp_desc_type_node, __access_mode_type_node,
16790         __bltn_desc_type_node, __user_desc_type_node,
16791         __class_desc_type_node, __ptr_desc_type_node,
16792         __attr_desc_type_node, __func_desc_type_node,
16793         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
16794         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
16795         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
16796         enum_desc_type_node, class_desc_type_node,
16797         si_class_desc_type_node, vmi_class_desc_type_node,
16798         ptmd_desc_type_node, base_desc_type_node): New #defines.
16799         (tinfo_fn_id, tinfo_fn_type): Rename to ...
16800         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
16801         (tinfo_var_id): New enumeration.
16802         (DECL_TINFO_FN_P): Augment comment.
16803         * decl.c (cp_global_trees): Adjust documentation.
16804         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
16805         tinfo_decl_type and tinfo_var_id.
16806         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
16807         (build_typeid): Remove unused variable.
16808         (get_tinfo_var): Use tinfo_var_id.
16809         (tinfo_name): New static function.
16810         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
16811         (tinfo_from_decl): Likewise.
16812         (get_base_offset): New static function, broken out of
16813         expand_class_desc.
16814         (expand_si_desc): Use tinfo_name.
16815         (expand_class_desc): Likewise. Lose local static variable.
16816         Use base_desc_type_node. Use get_base_offset.
16817         (expand_ptr_desc): Use tinfo_name.
16818         (expand_attr_desc): Likewise.
16819         (expand_generic_desc): Likewise.
16820
16821         * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
16822         * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
16823
16824 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
16825
16826         * cp-tree.h (__eprintf): Remove declaration.
16827         * tree.c (__eprintf): Remove definition.
16828
16829 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
16830             Mark Mitchell  <mark@codesourcery.com>
16831
16832         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
16833         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
16834
16835 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
16836
16837         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
16838
16839 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
16840
16841         * cp-tree.h (register_dtor_fn): New function.
16842         * decl.c (destroy_local_static): Rename to ...
16843         (register_dtor_fn): ... this.  Give it external linkage.
16844         (expand_static_init): Use it.
16845         * decl2.c (do_static_initialization): Likewise, if using
16846         __cxa_atexit.
16847         (do_static_destruction): Check that __cxa_atexit is not in use.
16848         (finish_file): Don't call do_static_destruction if using
16849         __cxa_atexit.
16850
16851         * typeck.c (convert_arguments): Restore two-message error
16852         reporting.
16853
16854 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
16855
16856         Remap dynamic cast hint values to be consistent across ABIs.
16857         * search.c (dynamic_cast_base_recurse): Remap generated value.
16858         (get_dynamic_cast_base_type): Adjust documentation.
16859         * tinfo.h (__user_type_info::dyncast): Likewise.
16860         (__user_type_info::find_public_subobj): Remap BOFF meaning.
16861         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
16862         (__class_type_info::do_dyncast): Likewise.
16863         (__class_type_info::do_find_public_subobj): Likewise.
16864         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
16865
16866 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
16867
16868         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
16869
16870         * typeck2.c (incomplete_type_error): Restore previous
16871         cp_error and cp_error_at call sequence.
16872
16873 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
16874
16875         * class.c (dump_class_hierarchy): Make format agree with argument;
16876         cast pointer to unsigned long and print with %lx.
16877
16878 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
16879
16880         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
16881
16882         * typeck.c (composite_pointer_type, common_type,
16883         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
16884         build_function_call_real, convert_arguments,
16885         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
16886         build_unary_op, mark_addressable, build_compound_expr,
16887         build_static_cast, build_reinterpret_cast, build_const_cast,
16888         build_c_cast, build_modify_expr, get_delta_difference,
16889         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
16890         'ISO C++'.  Fusion consecutive calls to diagnostic message routines
16891         into a single one.
16892         * typeck2.c (readonly_error, abstract_virtuals_error,
16893         process_init_constructor, check_for_new_type): Likewise.
16894
16895 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
16896
16897         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
16898         VAR_DECLs.
16899
16900 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
16901
16902         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
16903         (build_x_typeid): Likewise.
16904         (get_tinfo_fn): Likewise.
16905         (get_tinfo_fn_unused): Rename to ...
16906         (get_tinfo_decl): ... here.
16907         * rtti.c (build_headof): Replace logic error with assertion.
16908         (get_tinfo_fn_dynamic): Rename to ...
16909         (get_tinfo_decl_dynamic): ... here. Make static. Use
16910         complete_type_or_else.
16911         (build_x_typeid): Move into ...
16912         (build_typeid): ... here. Adjust call to
16913         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
16914         throw_bad_typeid expression.
16915         (get_tinfo_fn_unused): Rename to ...
16916         (get_tinfo_decl): ... here. Adjust comment.
16917         (get_tinfo_fn): Delete.
16918         (tinfo_from_decl): New static function.
16919         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
16920         (get_typeid): Use complete_type_or_else.
16921         (build_dynamic_cast_1): Adjust calls to
16922         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
16923         * parse.y (primary): Adjust call to build_typeid.
16924         * except.c (build_eh_type_type_ref): Adjust call to
16925         get_tinfo_decl. Mark as used.
16926         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
16927         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
16928         * parse.c: Regenerated.
16929
16930 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
16931
16932         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
16933         calling convention.
16934         (resolves_to_fixed_type_p): Document calling convention.
16935         * rtti.c (build_x_typeid): Initialize NONNULL.
16936
16937         * cp-tree.h (build_shared_int_cst): New function.
16938         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
16939         * class.c (modify_vtable_entry): Likewise.
16940         (add_virtual_function): Split out code to generated shared
16941         INTEGER_CSTs to build_share_int_cst.
16942         (modify_all_vtables): Handle all the overridden functions here.
16943         Add overridden functions from non-primary virtual bases to the
16944         primary vtable.
16945         (finish_struct_1): Adjust call to modify_all_vtables.  Add
16946         overridden functions from non-primary bases to the vtable.
16947         * tree.c (build_shared_int_cst): New function.
16948
16949         * cp-tree.h (scratchalloc): Remove.
16950         (build_scratch_list): Likewise.
16951         * call.c (convert_class_to_reference): Replace build_scratch_list
16952         and build_expr_list with build_tree_list.
16953         (add_candidate): Replace scratchalloc with expralloc.  Note memory
16954         leak.
16955         (build_user_type_conversion_1):  Replace build_scratch_list
16956         and build_expr_list with build_tree_list.
16957         (build_new_op): Likewise.
16958         (build_op_delete_call): Likewise.
16959         (convert_like): Likewise.
16960         * cvt.c (ocp_convert): Likewise.
16961         * decl.c (start_decl): Likewise.
16962         (start_function): Likewise.
16963         (finish_destructor_body): Likewise.
16964         (maybe_build_cleanup_1): Likewise.
16965         * decl2.c (reparse_decl_as_expr): Likewise.
16966         * init.c (perform_member_init): Likewise.
16967         (expand_cleanup_for_base): Likewise.
16968         (build_builtin_delete_call): Likewise.
16969         (build_new_1): Likewise.
16970         (build_delete): Likewise.
16971         * method.c (do_build_assign_ref): Likewise.
16972         * parse.y (already_scoped_stmt): Likewise.
16973         (nontrivial_exprlist): Likewise.
16974         (net_initializer): Likewise.
16975         (initlist): Likewise.
16976         * parse.c: Regenerated.
16977         * rtti.c (build_x_typeid): Likewise.
16978         (build_dynamic_cast_1): Likewise.
16979         * typeck.c (build_x_compound_expr): Likewise.
16980         (build_static_cast): Likewise.
16981         (build_modify_expr): Likewise.
16982
16983         * cp-tree.h (DECL_VINDEX): Add documentation.
16984         * class.c (build_vtable_entry): Likewise.
16985         (start_vtable): Add comment.
16986         (add_virtual_function): Replace pending_hard_virtuals with
16987         overridden_virtuals and pending_virtuals with new_virtuals.
16988         Replace redundant assignments with assertions.
16989         (check_for_override): Add comment.
16990         (check_bases_and_members): Replace pending_hard_virtuals with
16991         overridden_virtuals and pending_virtuals with new_virtuals.
16992         (create_vtbl_ptr): Likewise.
16993         (layout_class_type): Likewise.
16994         (finish_struct_1): Likewise.  Add comments.
16995
16996 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
16997
16998         * class.c (finish_struct_1): Replace redundant code with
16999         assertions.
17000
17001         * cp-tree.h (flag_new_abi): Move.
17002         (flag_use_cxa_atexit): Likewise.
17003         (flag_honor_std): Likewise.
17004         (flag_rtti): Likewise.
17005         (vbase_offsets_in_vtable_p): Define.
17006         (vptrs_present_everywhere_p): Likewise.
17007         (TYPE_CONTAINS_VPTR_P): Likewise.
17008         (dfs_walk_real): Declare.
17009         * class.c (build_vbase_pointer_fields): Check
17010         vbase_offsets_in_vtable_p.
17011         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
17012         BINFO_VPTR_FIELD.
17013         (build_vbase_offset_vtbl_entries): Simplify.
17014         (build_vbase_offset_vtbl_entries): Adjust.
17015         (build_vbase_pointer): Add ability to look up vbase offsets in
17016         vtable.
17017         (start_vtable): New function.
17018         (add_virtual_function): Use it.
17019         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
17020         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
17021         (build_vtbl_initializer): Take the type of the complete object as
17022         input.  Use it to correctly calculate vbase offsets.
17023         (dfs_finish_vtbls): Pass the complete type to
17024         build_vtbl_initializer.
17025         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
17026         (create_vtable_ptr): Create a vtable even if there are no
17027         new virtual functions, under the new ABI.
17028         (finish_struct_1): Likewise.
17029         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
17030         * decl.c (exapnd_static_init): Remove call to
17031         preserve_initializer.
17032         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
17033         vtables.
17034         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
17035         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
17036         (construct_virtual_bases): Don't initialize virtual base pointers
17037         under the new ABI.
17038         (build_aggr_init): Clean up comment.
17039         (expand_aggr_init_1): Likewise.
17040         * rtti.c (expand_class_desc): Store the virtual function table
17041         index where the vbase offset lives in the offset field.
17042         * search.c (dfs_walk_real): Make it global.
17043         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
17044         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
17045
17046         * tinfo.h (USItype): Make it signed under the new ABI.
17047         * tinfo.cc (convert_to_base): New function.  Encapsulate base
17048         conversion logic here.
17049         (__class_type_info::do_upcast): Use it.
17050         (__class_type_info::do_dyncast): Likewise.
17051         (__class_type_info::do_find_public_subobj): Likewise.
17052
17053         * init.c (construct_virtual_bases): Don't look up the addresses of
17054         virtual bases at run-time.
17055
17056         * class.c (build_vbase_pointer): Relocate.
17057         (build_vbase_pointer_fields): Likewise.
17058         (dfs_build_vbase_offset_vtbl_entries): Likewise.
17059         (build_vbase_offset_vtbl_entries): Likewise.
17060
17061         * decl.c (init_decl_processing): Complain if -fnew-abi
17062         -fno-vtable-thunks is used.
17063
17064         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
17065         flag_new_abi.
17066
17067 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
17068
17069         * cp-tree.h (num_extra_vtbl_entries): New function.
17070         (size_extra_vtbl_entries): Likewise.
17071         (dfs_vtable_path_unmark): Likewise.
17072         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
17073         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
17074         * class.c (num_extra_vtbl_entries): New function.
17075         (size_extra_vtbl_entries): Likewise.
17076         (dfs_build_vbase_offset_vtbl_entries): New function.
17077         (build_vbase_offset_vtbl_entries): Likewise.
17078         (build_vtbl_initializer): Use it.
17079         (finish_struct_1): Adjust vtable sizes (using
17080         num_extra_vtbl_entries).
17081         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
17082         THUNK_DECL is non-NULL before expanding it.
17083         * init.c (expand_virtual_init): Adjust the vtable pointer by
17084         size_extra_vtbl_entries before storing it.
17085         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
17086         Handle TREE_LIST parameters here, not in the dfs_* functions.
17087         (dfs_unmarked_real_bases_queue_p): Adjust.
17088         (dfs_marked_real_bases_queue_p): Likewise.
17089         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
17090         (dfs_vtable_path_marked_real_bases_queue_p): New function.
17091         (dfs_vtable_path_unmark): Likewise.
17092
17093 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
17094
17095         * optimize.c (copy_body_r): Clear the operand three of a
17096         TARGET_EXPR when copying it.
17097
17098 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
17099
17100         * method.c (build_decl_overload_real): Check whether we are in ::
17101         before returning __builtin_new/delete.
17102
17103 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
17104
17105         * pt.c (tsubst_friend_function): Improve comment.
17106         (instantiate_decl): Avoid crashing when a "nested" function is
17107         instantiated from the top level.
17108
17109         * dump.c (dqeueue_and_dump): Dump
17110         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
17111
17112 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17113
17114         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
17115
17116 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
17117
17118         * g++spec.c (lang_specific_driver): Add -fnew-abi if
17119         ENABLE_NEW_GXX_ABI defined.
17120         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
17121         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
17122         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
17123
17124 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
17125
17126         * decl.c (start_cleanup_fn): Call pushdecl.
17127
17128         * call.c (convert_class_to_reference): Fix typos.
17129         (build_conditional_expr): Handle errors gracefully.
17130         * class.c (push_nested_class): Likewise.
17131         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
17132         (DECL_THIS_EXTERN): Use it.
17133         (DECL_THIS_STATIC): Likewise.
17134         * cvt.c (convert_to_void): Handle errors gracefully.
17135         (build_expr_type_conversion): Likewise.
17136         * decl.c (maybe_push_decl): Likewise.
17137         (start_decl_1): Likewise.
17138         (require_complete_types_for_parms): Likewise.
17139         * parse.y (structsp): Likewise.
17140         (base_class): Likewise.
17141         * parse.c: Regenerated.
17142         * pt.c (finish_member_template_decl): Likewise.
17143         * typeck.c (decay_conversion): Likewise.
17144
17145         * cp-tree.h (dfs_skip_vbases): New function.
17146         (find_vbase_instance): Likewise.
17147         * class.c (determine_primary_base): Allow a nearly empty base to
17148         serve as a primary base class under the new ABI.
17149         (get_class_offset_1): Rename to ...
17150         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
17151         messages here.
17152         (get_class_offset): Use it.  Issue error messages here.
17153         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
17154         find the right copies of virtual bases.
17155         (fixup_vtable_deltas1): Rename to ...
17156         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
17157         bases as primary bases.
17158         (fixup_vtable_deltas): Remove.
17159         (override_one_vtable): Handle virtual bases as primary bases.
17160         (merge_overrides): Likewise.
17161         (finish_struct_1): Likewise.
17162         (dump_class_hierarchy): Dump primary-ness of bases as well.
17163         * search.c (mark_primary_bases): Use a pre-order traversal to
17164         handle primary virtual bases.
17165         (dfs_skip_vbases): New fiunction.
17166         (expand_upcast_fixups): Adjust to handle primary virtual bases.
17167         (fixup_virtual_upcast_offsets): Likewise.
17168         (fixup_all_virtual_upcast_offsets): Likewise.
17169         (dfs_find_vbase_instances): New function.
17170         (find_vbase_instance): Likewise.
17171
17172 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
17173
17174         * lex.c (DIR_SEPARATOR): Delete macro.
17175
17176 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
17177
17178        * decl2.c (lang_decode_option): Handle automatic line wrapping
17179        option.
17180
17181 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
17182
17183         * friend.c (do_friend): Don't resolve scopes when processing
17184         template declarations, even if the qualifying scope doesn't
17185         involve template parameters.
17186
17187 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
17188
17189         * class.c (dfs_modify_vtables_queue_p): Remove.
17190         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
17191         and dfs_marked_real_bases_queue_p instead of
17192         dfs_modify_vtables_queue_p.
17193
17194         * class.c (build_vbase_path): Simplify.
17195         (dfs_propagate_binfo_offsets): New function.
17196         (propagate_binfo_offsets): Use it.
17197         (remove_base_field): Simplify.
17198         (dfs_set_offset_for_vbases): Remove.
17199         (dfs_set_offset_for_shared_vbases): New function.
17200         (dfs_set_offset_for_unshared_vbases): Likewise.
17201         (layout_virtual_bases): Use them.
17202         (layout_basetypes): Don't call propagate_binfo_offsets.
17203         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
17204         for the vbases.
17205
17206         * class.c (build_base_field): New function, split out from ...
17207         (build_base_fields): ... here.  Use it.  Allocate primary bases
17208         first, under the new ABI.
17209         (get_vtable_entry): Remove.
17210         (remove_base_field): New function, split out from ...
17211         (remove_base_fields): ... here.  Adjust since primary bases come
17212         first under the new ABI.
17213
17214         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
17215         (initialize_vtbl_ptrs): New function.
17216         (expand_indirect_vtbls_init): Change prototype.
17217         (convert_pointer_to_vbase): Declare.
17218         * init.c (expand_direct_vtbls_init): Remove.
17219         (dfs_initialize_vtbl_ptrs): New function.
17220         (initialize_vtbl_ptrs): Likewise.
17221         (emit_base_init): Use initialize_vtbl_ptrs.
17222         * search.c (convert_pointer_to_vbase): Make it global.
17223         (expand_indirect_vtbls_init): Remove vtable initialization code.
17224         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
17225
17226         * class.c (dfs_finish_vtbls): New function.
17227         (finish_vtbls): Use it.
17228         (dump_class_hierarchy): New function.
17229
17230         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
17231         (BINFO_VBASE_PRIMARY_P): New macro.
17232         (BINFO_VIRTUALS): Add to documentation.
17233         (SET_BINFO_PRIMARY_MARKED_P): Remove.
17234         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
17235         (dfs_mark_primary_bases_queue_p): Likewise.
17236         (dfs_unmarked_real_bases_queue_p): New function.
17237         (dfs_marked_real_bases_queue_p): Likewise.
17238         * search.c (dfs_mark_primary_bases): Adjust.
17239         (mark_primary_bases): Likewise.
17240         (get_shared_vbase_if_not_primary): New function.
17241         (dfs_unmarked_real_bases_queue_p): Likewise.
17242         (dfs_marked_real_bases_queue_p): Likewise.
17243         (dfs_get_pure_virtuals): Simplify.
17244         (get_pure_virtuals): Likewise.
17245
17246 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17247
17248         * lex.c: Include tm_p.h.
17249
17250 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
17251
17252         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
17253
17254 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
17255
17256         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
17257         * pt.c (instantiate_decl): Defer comdat templates that might not be
17258         needed.
17259
17260         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
17261         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
17262         (finish_file): Likewise.
17263
17264         * decl2.c (import_export_class): Undo 12/14 change.
17265
17266         * error.c (dump_decl): operator new, not operatornew.
17267
17268         * class.c (field_decl_cmp): A nontype is "greater" than a type.
17269         * search.c (lookup_field_1): Look for the last field with the
17270         desired name.
17271
17272 2000-01-05  Nathan Sidwell  <nathan@acm.org>
17273
17274         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
17275         FUNCTION_DECL.
17276
17277 2000-01-05  Nathan Sidwell  <nathan@acm.org>
17278
17279         * typeck.c (build_static_cast): Don't strip target qualifiers
17280         when casting from a class.
17281
17282 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17283
17284         * class.c (warn_hidden): Initialize variable `fndecl'.
17285
17286 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
17287
17288         * decl.c (flag_isoc9x): New variable to be able to use code in
17289         c-common.c.  For now always zero.
17290
17291 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
17292
17293         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
17294         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
17295         or unshare_base_binfos for virtual bases here.
17296         * search.c (dfs_get_vbase_types): Do it here.
17297         (get_vbase_types): Adjust.
17298
17299 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
17300
17301         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
17302         (BINFO_PRIMARY_MARKED_P): Use flag 5.
17303         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
17304         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
17305         (unmark_primary_bases): Remove declaration.
17306         (unmarkedp): Declare.
17307         (dfs_vbase_unmark): Likewise.
17308         * class.c (determine_primary_base): Return immediately if there
17309         are no base classes.  Call mark_primary_bases here.
17310         (modify_all_direct_vtables): Remove.
17311         (modify_all_indirect_vtables): Remove.
17312         (dfs_modify_vtables_queue_p): New function.
17313         (dfs_modify_vtables): New function.
17314         (modify_all_vtables): Use them.
17315         (build_base_fields): Build FIELD_DECLs for primary virtual base
17316         classes.
17317         (create_vtable_ptr): Don't call determine_primary_base here.
17318         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
17319         (dfs_set_offset_for_vbases): ... this.
17320         (layout_virtual_bases): Use it.
17321         (layout_class_type): Call determine_primary_base here.
17322         * search.c (unmarkedp): Make it global.
17323         (shared_marked_p): Simplify.
17324         (shared_unmarked_p): Likewise.
17325         (dfs_primary_bases_queue_p): Remove.
17326         (dfs_unmark_primary_bases): Likewise.
17327         (unmark_primary_bases): Likewise.
17328         (mark_primary_bases): Simplify.
17329         (get_pure_virtuals): Don't call mark_primary_bases here.
17330         (dfs_vbase_unmark): New function.
17331         (get_vbase_types): Simplify.
17332
17333         * class.c (struct base_info): Remove.
17334         (determine_primary_base): Take has_virtual_p rather than a
17335         base_info as input.  Don't calculate max_has_virtual.
17336         (finish_struct_bits): Remove max_has_virtual argument.
17337         (create_vtable_ptr): Remove max_has_virtual_p argument.
17338         (layout_virtual_bases): Remove max argument.
17339         (layout_basetypes): Likewise.
17340         (layout_class_type): Remove max_has_virtual_p argument.
17341         (finish_struct_1): Remove max_has_virtual.
17342
17343         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
17344         (layout_basetypes): Remove.
17345         * class.c (propagate_binfo_offsets): Moved here from tree.c.
17346         Update to handle primary virtual bases.
17347         (remove_base_fields): New function, split out from
17348         layout_basetypes.
17349         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
17350         (layout_virtual_bases): New function, split out from
17351         layout_basetypes.  Update to handle primary virtual bases.
17352         (layout_basetypes): Moved here from tree.c.  Use
17353         remove_base_fields and layout_virtual_bases.
17354         * search.c (dfs_mark_primary_bases_queue_p): New function.
17355         (mark_primary_bases): Use it.
17356         * tree.c (CEIL): Remove.
17357         (propagate_binfo_offsets): Remove.
17358         (layout_basetypes): Remove.
17359
17360 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
17361
17362         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
17363         (BINFO_PRIMARY_MARKED_P): New macro.
17364         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
17365         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
17366         (mark_primary_bases): New function.
17367         (unmark_primary_bases): Likewise.
17368         * search.c (get_abstract_virtuals_1): Remove.
17369         (dfs_mark_primary_bases): New function.
17370         (mark_primary_bases): Likewise.
17371         (dfs_unmark_primary_bases): Likewise.
17372         (unmark_primary_bases): Likewise.
17373         (dfs_get_pure_virtuals): Likewise.
17374
17375 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
17376
17377         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
17378         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
17379         (modify_one_vtable): Adjust.
17380         (fixup_vtable_deltas1): Likewise.
17381         (override_one_vtable): Likewise.
17382         * search.c (get_abstract_virtuals_1): Likewise.
17383         (get_pure_virtuals): Likewise.
17384         (expand_upcast_fixups): Likewise.
17385         * tree.c (debug_binfo): Likewise.
17386
17387         * class.c (build_vtable): Don't return a value.  Don't rebuild
17388         vtables for bases that have already been handled.
17389         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
17390         already been handled.
17391         (modify_one_vtable): Adjust accordingly.
17392         (fixup_vtable_deltas1): Likewise.
17393         (finish_struct_1): Likewise.
17394
17395 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
17396
17397         * call.c (build_new_method_call): Also check destructors.