OSDN Git Service

* call.c (tourney, build_field_call, equal_functions, joust)
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2002-12-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2
3         * call.c (tourney, build_field_call, equal_functions, joust) 
4         (compare_ics, build_over_call, build_java_interface_fn_ref) 
5         (convert_like_real, op_error, build_object_call, resolve_args) 
6         (build_vfield_ref, check_dtor_name, build_scoped_method_call) 
7         (build_addr_func, build_call, build_method_call, null_ptr_cst_p) 
8         (sufficient_parms_p, build_conv, non_reference, strip_top_quals) 
9         (standard_conversion, reference_related_p) 
10         (reference_compatible_p, convert_class_to_reference) 
11         (direct_reference_binding, reference_binding) 
12         (implicit_conversion, is_complete, promoted_arithmetic_type_p) 
13         (add_template_conv_candidate, any_viable, any_strictly_viable) 
14         (build_this, splice_viable, print_z_candidates) 
15         (build_user_type_conversion, build_new_function_call) 
16         (conditional_conversion, build_conditional_expr, build_new_op) 
17         (build_op_delete_call, enforce_access, call_builtin_trap) 
18         (convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to) 
19         (convert_default_arg, type_passed_as, convert_for_arg_passing) 
20         (in_charge_arg_for_name, is_properly_derived_from) 
21         (maybe_handle_implicit_object, maybe_handle_ref_bind) 
22         (source_type, add_warning, can_convert, can_convert_arg) 
23         (perform_implicit_conversion, can_convert_arg_bad) 
24         (initialize_reference, add_conv_candidate) 
25         (add_template_candidate_real, add_template_candidate): Ansify.
26
27 2002-12-22  Nathan Sidwell  <nathan@codesourcery.com>
28
29         PR c++/8572
30         * cp-tree.h (grokoptypename): Add SCOPE parameter.
31         * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
32         if in a template scope.
33         * parse.y (unoperator): Return the scope.
34         (operator_name): Adjust grokoptypename call.
35
36 2002-12-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
37
38         * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
39         * decl.c (make_unbound_class_template): Adjust.  Check for tf_error.
40         * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
41
42 2002-12-20  Kazu Hirata  <kazu@cs.umass.edu>
43
44         * ChangeLog: Fix a typo.
45         * class.c: Fix comment typos.
46         * cp-tree.h: Likewise.
47
48 2002-12-18  Jason Merrill  <jason@redhat.com>
49
50         Handle anonymous unions at the tree level.
51         C++ ABI change: Mangle anonymous unions using the name of their
52         first named field (by depth-first search).  Should not cause
53         binary compatibility problems, though, as the compiler previously
54         didn't emit anything for affected unions.
55         * cp-tree.def (ALIAS_DECL): New tree code.
56         * decl2.c (build_anon_union_vars): Build ALIAS_DECLs.  Return the
57         first field, not the largest.
58         (finish_anon_union): Don't mess with RTL.  Do set DECL_ASSEMBLER_NAME,
59         push the decl, and write it out at namespace scope.
60         * decl.c (lookup_name_real): See through an ALIAS_DECL.
61         (pushdecl): Add namespace bindings for ALIAS_DECLs.
62         * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
63         of a decl which doesn't have one.
64         * typeck.c (build_class_member_access_expr): Don't recurse if
65         we already have the type we want.
66
67 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
68
69         PR c++/8099
70         * friend.c (make_friend_class): Allow partial specialization
71         when declaration is not a template friend.
72
73 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
74
75         PR c++/3663
76         * pt.c (lookup_template_class): Copy TREE_PRIVATE and
77         TREE_PROTECTED to created decl nodes.
78
79 2002-12-18  Mark Mitchell  <mark@codesourcery.com>
80
81         * class.c (build_base_field): Do not set DECL_PACKED on the
82         FIELD_DECL.
83
84 2002-12-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
85
86         * cp-tree.h (struct tree_srcloc): Use location_t.
87         (SOURCE_LOCUS): New.
88         (SRCLOC_FILE, SRCLOC_LINE): Adjust.
89
90 2002-12-17  Jason Merrill  <jason@redhat.com>
91
92         * decl.c (finish_function): Also complain about no return in
93         templates.
94         * semantics.c (finish_return_stmt): Also call check_return_expr in 
95         templates.
96         * typeck.c (check_return_expr): In a template, just remember that we
97         saw a return.
98
99 2002-12-16  Jason Merrill  <jason@redhat.com>
100
101         * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
102         of the CALL_EXPR.
103
104         * semantics.c (do_pushlevel): Call pushlevel after adding the
105         SCOPE_STMT.
106         (do_poplevel): Call poplevel before adding the SCOPE_STMT.
107         * parse.y (function_body): Go back to using compstmt.
108         * decl.c (pushdecl): Skip another level to get to the parms level.
109
110         * call.c (build_new_method_call): Use is_dummy_object to determine
111         whether or not to evaluate the object parameter to a static member
112         function.
113
114 2002-12-14  Jason Merrill  <jason@redhat.com>
115
116         * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
117         return slot for normal functions.  Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
118         * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
119         don't bother with an AGGR_INIT_EXPR.
120         (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
121         just generate a new decl normally.  Take return slot parm.
122         * cp-tree.h: Adjust prototype.
123
124 2002-12-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
125
126         PR C++/8031
127         * cvt.c (convert_to_pointer_force): Don't try comparing against 
128         erronous type.
129
130 2002-12-13  Geoffrey Keating  <geoffk@apple.com>
131
132         * cp-tree.h: Have the multiple-include guards around
133         the entire file.
134
135 2002-12-10  David Edelsohn  <edelsohn@gnu.org>
136
137         * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
138         for SPEW_DEBUG.
139         (snarf_method): Same.
140         (snarf_defarg): Same.
141
142 2002-12-10  Mark Mitchell  <mark@codesourcery.com>
143
144         PR c++/8372
145         * pt.c (tsubst_copy): Handle destructor names more correctly.
146
147 2002-12-10  Matt Austern   <austern@apple.com>
148
149         * cp-tree.h: get rid of needs_virtual_reinit bit.
150         
151 2002-12-09  Mark Mitchell  <mark@codesourcery.com>
152
153         * NEWS: Document removal of in-class initialization extension for 
154         static data members of non-arithmetic, non-enumeration type.
155         * decl.c (check_static_variable_definition): Do not allow that
156         extension.
157         * decl2.c (grokfield): Do not call digest_init when processing
158         templates.
159
160 2002-12-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
161
162         * error.c (dump_expr): Fix format specifier warning.
163
164 2002-12-04  Geoffrey Keating  <geoffk@apple.com>
165
166         * class.c (finish_struct_1): Correct comment.
167         * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
168
169 2002-12-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
170
171         PR C++/8799
172         * error.c (dump_expr): Don't ever try to dump a non-existent
173         expression. 
174
175 2002-12-03  Nathan Sidwell  <nathan@codesourcery.com>
176
177         Implement covariant returns.
178         * cp-tree.h (IS_AGGR_TYPE_2): Remove.
179         (struct lang_decl_flags): Add this_thunk_p flag.
180         Rename vcall_offset to virtual_offset.
181         (struct lang_decl): Rename delta to fixed_offset.
182         (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
183         (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
184         (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
185         (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
186         (make_thunk): Add this_adjusting arg.
187         (finish_thunk): Declare.
188         (mangle_thunk): Add this_adjusting arg.
189         * class.c (get_vcall_index): Use base function for lookup.
190         (update_vtable_entry_for_fn): Generate covariant thunk.
191         (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
192         (build_vtbl_initializer): Use base function for lookup.
193         Finish covariant thunk here. Adjust thunk generation.
194         * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
195         Adjust thunk dumping.
196         * mangle.c (mangle_call_offset): New function.
197         (mangle_thunk): Adjust for covariant thunks.
198         * method.c (make_thunk): Adjust. Do not set name here.
199         (finish_thunk): New function. Set name here.
200         (use_thunk): Generate covariant thunks too.
201         (thunk_adjust): New function.
202         * search.c (covariant_return_p): Remove. Fold into ...
203         (check_final_overrider): ... here. Simplify.
204         * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
205
206 2002-12-03  Jason Merrill  <jason@redhat.com>
207
208         PR c++/8674
209         * call.c (build_over_call): Check specifically for TARGET_EXPR
210         when eliding.
211
212         PR c++/8461, c++/8625
213         * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
214         (cp_convert_parm_for_inlining): Remove.
215         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING): 
216         Remove.
217         * cp-tree.h (ADDR_IS_INVISIREF): Remove.
218         * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
219
220         * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
221         an ambiguous conversion.
222
223 2002-12-03  Mark Mitchell  <mark@codesourcery.com>
224
225         PR c++/8688
226         * decl.c (reshape_init): Handle erroneous initializers.
227
228 2002-12-02  Mark Mitchell  <mark@codesourcery.com>
229
230         PR c++/8720
231         * spew.c (remove_last_token): Make sure that last_chunk is set
232         correctly.
233
234         PR c++/8615
235         * error.c (dump_expr): Handle character constants with
236         TREE_OVERFLOW set.
237         
238 2002-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
239
240         DR 180
241         * decl.c (grokdeclarator): Require class-key for all friend class.
242         Output the correct type and context in the error message.
243
244 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
245
246         PR c++/5919
247         * pt.c (unify): Use variably_modified_type_p to test validity of
248         template argument types.
249         
250         PR c++/8727
251         * cp-tree.h (lang_type_class): Add typeinfo_var.
252         (CLASSTYPE_TYPEINFO_VAR): New macro.
253         * rtti.c (get_tinfo_decl): Use it.
254
255         PR c++/8663
256         * init.c (expand_member_init): Always get the main variant of a
257         base class.
258
259 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
260
261         PR c++/8332
262         PR c++/8493
263         * decl.c (cxx_init_decl_processing): Use size_type_node, not
264         c_size_type_node.
265         * decl2.c (coerce_new_type): Likewise.
266         * except.c (do_allocate_exception): Likewise.
267
268 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
269
270         * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
271         dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
272         lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
273         repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
274         typeck2.c: Include coretypes.h and tm.h.
275         * Make-lang.in: Update dependencies.
276
277 2002-11-30  Mark Mitchell  <mark@codesourcery.com>
278
279         PR c++/8227
280         * decl.c (layout_var_decl): Deal gracefully with erroneous types.
281         (check_initializer): Validate the type of the initialized
282         variable, even if the initializer is absent.
283         * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
284         
285         PR c++/8214
286         * typeck.c (convert_for_assignment): Do not use
287         decl_constant_value on the operand.
288
289         PR c++/8511
290         * pt.c (instantiate_decl): Handle template friends defined outside
291         of the class correctly.
292
293 2002-11-29  Joe Buck <jbuck@synopsys.com>
294
295         * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
296         anonymous structs.
297         
298 2002-11-29  Mark Mitchell  <mark@codesourcery.com>
299
300         * class.c (walk_subobject_offsets): Recur on binfos as well as on
301         types.
302         (layout_nonempty_base_or_field): Pass it a binfo when processing a
303         base class.
304         (layout_empty_base): Likewise.
305         (build_base_field): Likewise.
306         
307 2002-11-27  Mark Mitchell  <mark@codesourcery.com>
308
309         * class.c (build_base_field): Make sure we get the canonical base
310         when descending through primary bases.
311
312 2002-11-26  Geoffrey Keating  <geoffk@apple.com>
313
314         * decl.c (check_initializer): Don't error on initialisation of
315         a scalar with a brace-enclosed expression.
316
317 2002-11-26  Nathan Sidwell  <nathan@codesourcery.com>
318
319         * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
320         (template_parms_equal): Remove prototype.
321         * typeck.c (buuld_indirect_ref): Reformat.
322
323 2002-11-25  Jason Merrill  <jason@redhat.com>
324
325         * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
326         and a DO_STMT.
327
328 2002-11-25  Mark Mitchell  <mark@codesourcery.com>
329
330         * tree.c (cp_build_qualified_type_real): Correct handling of
331         array types.
332         * class.c (walk_subobject_offsets): Fix thinko.
333         (build_base_field): Record offsets of empty bases in primary
334         virtual bases.
335         (layout_class_type): Record offsets of empty bases in fields.
336         
337         * search.c (is_subobject_of_p_1): Fix thinko.
338         (lookup_field_queue_p): Likewise.
339
340 2002-11-24  Mark Mitchell  <mark@codesourcery.com>
341
342         * class.c (layout_class_type): Reuse tail padding when laying out
343         virtual bases.
344
345 2002-11-22  Mark Mitchell  <mark@codesourcery.com>
346
347         * rtti.c (qualifier_flags): Fix thinko.
348
349 2002-11-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
350
351         Remove traditional C constructs 1/n.
352         * cp-tree.h (init_method, set_mangled_name_for_decl,
353         build_opfncall, hack_identifier, make_thunk, use_thunk,
354         synthesize_method, implicitly_declare_fn,
355         skip_artificial_parms_for, optimize_function, calls_setjmp_p,
356         maybe_clone_body): Remove use of PARAMS.
357
358         * method.c (do_build_assign_ref, do_build_copy_constructor,
359         synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
360         Likewise.
361         (synthesize_method): Use 'bool' type and constants instead of
362         'int'.
363         (locate_copy): Likewise.
364         (implicitly_declare_fn): Likewise.
365
366         * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
367         Remove old-style declaration.
368         (maybe_clone_body): Use 'bool' type and constants.
369
370 2002-11-21  Glen Nakamura  <glen@imodulo.com>
371
372         PR c++/8342
373         * typeck.c (get_member_function_from_ptrfunc): Make sure that a
374         SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
375         of the branches of a COND_EXPR.
376
377 2002-11-19  Mark Mitchell  <mark@codesourcery.com>
378
379         * pt.c (for_each_template_parm): Free allocated memory.
380         * search.c (is_subobject_of_p_1): New function.
381         (is_subobject_of_p): Avoid walking virtual bases multiple times.
382
383 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
384
385         * g++spec.c (lang_specific_spec_functions): New.
386
387 2002-11-15  Kazu Hirata  <kazu@cs.umass.edu>
388
389         * ChangeLog: Follow spelling conventions.
390         * class.c: Likewise.
391         * decl2.c: Likewise.
392
393 2002-11-14  Zack Weinberg  <zack@codesourcery.com>
394
395         * search.c (dfs_push_decls): Do not try to reorder elements
396         3..n of method_vec if method_vec has only two elements.
397         Reverse order of two tests to avoid accessing unallocated
398         memory.
399
400 2002-11-14  Mark Mitchell  <mark@codesourcery.com>
401
402         * class.c (dfs_find_final_overrider): Adjust so that the most
403         derived object is a binfo, rather than a class type.
404         (find_final_overrider): Likewise.
405         (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
406         (add_vcall_offset): Likewise.
407
408 2002-11-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
409
410         PR c++/8389
411         * pt.c (instantiate_template): Push class scope for member
412         functions.
413         (get_mostly_instantiated_function_type): Likewise.  Don't call
414         tsubst on context.  Remove CONTEXTP and TPARMSP parameters.
415         * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
416         * mangle.c (write_encoding, write_unqualified_name): Adjust.
417
418 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
419
420         * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
421         vcall offfsets.  Split out ...
422         (add_vcall_offset): ... new function.
423
424         PR c++/8338
425         * pt.c (for_each_template_parm): Add htab parameter.
426         (process_partial_specialization): Adjust call.
427         (push_template_decl_real): Likewise.
428         (pair_fn_data): Add visited.
429         (for_each_template_parm_r): Avoid walking duplicates more than
430         once.
431         (uses_template_parms): Adjust call to for_each_template_parm.
432
433 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
434
435         * class.c (add_implicitly_declared_members): Put implicitly
436         declared functions at the end of TYPE_METHODs when -fabi-version
437         is at least 2.
438
439 2002-11-05  Geoffrey Keating  <geoffk@apple.com>
440
441         * decl2.c (finish_file): Correct spelling.
442
443 2002-11-03  Mark Mitchell  <mark@codesourcery.com>
444
445         * call.c (build_special_member_call): Do not try to lookup VTTs by
446         name.
447         * class.c (vtbl_init_data): Add generate_vcall_entries.
448         (get_vtable_decl): Do not look up virtual tables by name.
449         (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
450         (set_primary_base): Do not set CLASSTYPE_RTTI.
451         (determine_primary_base): Likewise.
452         (get_matching_virtual): Remove.
453         (get_vcall_index): New function.
454         (update_vtable_entry_for_fn): Do not try to use virtual thunks
455         when they are not required.  Assign vcall indices at this point.
456         (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
457         Do update dynamic_classes.
458         (build_vtt): Do not add VTTs to the symbol table.
459         (build_ctor_vtbl_group): Likewise.
460         (build_vtbl_initializer): Simplify handling of vcall indices.
461         (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
462         for the most derived class.
463         (add_vcall_offset_vtbl_entries_1): But do not actually add them to
464         the vtable.
465         * cp-tree.h (dynamic_classes): New macro.
466         (lang_type_class): Remove rtti.  Add vtables.  Add vcall_indices.
467         (CLASSTYPE_RTTI): Remove.
468         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
469         (CLASSTYPE_VCALL_INDICES): New macro.
470         (CLASSTYPE_VTABLES): Likewise.
471         (BV_USE_VCALL_INDEX_P): Remove.
472         (build_vtable_path): Remove.
473         * decl2.c (finish_vtable_vardecl): Remove.
474         (key_method): Remove #if 0'd code.
475         (finish_vtable_vardecl): Rename to ...
476         (maybe_emit_vtables): ... this.
477         (finish_file): Use it.
478         * search.c (look_for_overrides_here): Update comment.
479
480 2002-11-01  Zack Weinberg  <zack@codesourcery.com>
481
482         PR c/7353 redux
483         * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
484
485 2002-10-30  Jason Merrill  <jason@redhat.com>
486
487         PR c++/8186
488         * cp-tree.h (ADDR_IS_INVISIREF): New macro.
489         * call.c (convert_for_arg_passing): Set it.
490         * except.c (stabilize_throw_expr): Recurse for such an arg.
491
492 2002-10-31  Mark Mitchell  <mark@codesourcery.com>
493
494         * cp-tree.h (lang_decl_flags): Remove init_priority.
495         (lang_decl): Add delta.
496         (GLOBAL_INIT_PRIORITY): Remove.
497         (THUNK_DELTA): Revise definition.
498         * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
499         * dump.c (cp_dump_tree): Don't dump it.
500
501 2002-10-30  Mark Mitchell  <mark@codesourcery.com>
502
503         PR c++/8160
504         * typeck2.c (process_init_constructor): Call complete_array_type.
505
506         PR c++/8149
507         * decl.c (make_typename_type): Issue errors about invalid results.
508
509 2002-10-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
510
511         Core issue 287, PR c++/7639
512         * cp-tree.h (lang_type_class): Add decl_list field.
513         (CLASSTYPE_DECL_LIST): New macro.
514         (maybe_add_class_template_decl_list): Add declaration.
515         * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
516         (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
517         (maybe_add_class_template_decl_list): New function.
518         (add_implicitly_declared_members): Use it.
519         * decl.c (maybe_process_template_type_declaration): Likewise.
520         (pushtag): Likewise.
521         * friend.c (add_friend): Likewise.
522         (make_friend_class): Likewise.
523         * semantics.c (finish_member_declaration): Likewise.
524         (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
525         * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
526         to process members and friends in the order of declaration.
527
528 2002-10-29  Mark Mitchell  <mark@codesourcery.com>
529
530         PR c++/8287
531         * decl.c (finish_destructor_body): Create the label to jump to
532         when returning from a destructor here.
533         (finish_function_body): Rather than here.
534
535 2002-10-25  Zack Weinberg  <zack@codesourcery.com>
536
537         PR c++/7266
538         * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
539         SCOPE_REF is not null before dereferencing it.
540
541 2002-10-25  Mark Mitchell  <mark@codesourcery.com>
542
543         * call.c (build_over_call): Use DECL_CONTEXT, not
544         DECL_VIRTUAL_CONTEXT.
545         * class.c (modify_vtable_entry): Don't mess with
546         DECL_VIRTUAL_CONTEXT.
547         (set_vindex): Remove.
548         (set_primary_base): Remove vfuns_p parameter.
549         (determine_primary_base): Likewise.
550         (modify_all_vtables): Likewise.
551         (layout_class_type): Likewise.  Adjust calls to other functions
552         accordingly.
553         (finish_struct_1): Adjust calls to modified functions.  Set
554         DECL_VINDEX here.
555         * cp-tree.h (lang_type_class): Remove vsize.
556         (CLASSTYPE_VSIZE): Remove.
557         (lang_decl): Remove thunks.
558         (DECL_THUNKS): Adjust.
559         (DECL_VIRTUAL_CONTEXT): Remove.
560         (duplicate_decls): Don't copy it.
561         * pt.c (build_template_decl): Don't set it.
562         (tsubst_decl): Likewise.
563         * typeck.c (expand_ptrmemfunc_cst): Don't use it.
564
565         * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
566         (build_vtable_entry): Remove.
567         * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
568         (lang_decl): Add thunks.
569         (DECL_THUNKS): New macro.
570         * decl.c (duplicate_decls): Copy it.
571         * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
572         * semantics.c (emit_associated_thunks): Simplify.
573
574 2002-10-24  David Edelsohn  <edelsohn@gnu.org>
575
576         PR c++/7228
577         * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
578         lang_type structure exists before accessing field.
579         (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
580         (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
581         (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
582         * class.c (check_field_decls): Use new macros.
583         * typeck2.c (process_init_constructor): Remove redundant check for
584         existence of lang_type structure.
585
586 2002-10-24  Mark Mitchell  <mark@codesourcery.com>
587
588         * class.c (end_of_base): New method.
589         (end_of_class): Use it.  Check indirect virtual bases.
590
591         * class.c (check_field_decls): Fix typo.
592
593 2002-10-23  Mark Mitchell  <mark@codesourcery.com>
594
595         PR c++/8067
596         * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
597         related variables.
598
599         PR c++/7679
600         * spew.c (next_token): Do not return an endless stream of
601         END_OF_SAVED_INPUT tokens.
602         (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
603         the cached token stream.
604         (snarf_defarg): Likewise.
605
606 2002-10-23  Zack Weinberg  <zack@codesourcery.com>
607
608         * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
609         variably_modified_type_p.
610         * cp-tree.h: Remove prototype of variably_modified_type_p.
611         * tree.c (variably_modified_type_p): Remove; now implemented
612         in language-independent code.
613
614 2002-10-22  Mark Mitchell  <mark@codesourcery.com>
615
616         PR c++/6579
617         * spew.c (snarf_parenthesized_expression): New function.
618         (snarf_block): Use it.
619
620 2002-10-22  Richard Henderson  <rth@redhat.com>
621
622         * method.c (use_thunk): Always compute vcall_value; assert that
623         it is not zero.  Use can_output_mi_thunk; use output_mi_thunk
624         for vcall thunks as well.
625
626 2002-10-21  Mark Mitchell  <mark@codesourcery.com>
627
628         * class.c (empty_base_at_nonzero_offset_p): New function.
629         (layout_nonempty_base_or_field): Do not check for conflicts when
630         laying out a virtual base using the GCC 3.2 ABI.
631         (build_base_field): Correct checking for presence of empty classes
632         at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
633
634         * class.c (include_empty_classes): Use normalize_rli.
635         (layout_class_type): Likewise.
636
637         * decl.c (reshape_init): Tweak handling of character arrays.
638
639         PR c++/8218
640         * cp-tree.h (lang_type_class): Add contains_empty_class_p.
641         (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
642         * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
643         (check_field_decls): Likewise.
644         (layout_class_type): Likewise.
645         (finish_struct_1): Initialize it.
646         (walk_subobject_offsets): Use it to prune searches.
647
648 2002-10-20  Mark Mitchell  <mark@codesourcery.com>
649
650         * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
651         * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
652         TARGET_ASM_OUTPUT_MI_THUNK in comments.
653
654 2002-10-18  Zack Weinberg  <zack@codesourcery.com>
655
656         * decl.c (start_decl): Point users of the old initialized-
657         typedef extension at __typeof__.
658
659 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
660
661         * Make-lang.in (method.o): Depend on TARGET_H.
662         * method.c (target.h): Include it.
663         (use_thunk): Use target hooks.  Use vcall thunks, if available.
664
665 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
666
667         * class.c (base_derived_from): Make sure return value is a bool.
668
669 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
670
671         * class.c (find_final_overrider_data_s): Remove overriding_fn and
672         overriding_base.
673         (dfs_base_derived_from): New function.
674         (base_derived_from): Likewise.
675         (dfs_find_final_overrider): Use base_derived_from.
676         (find_final_overrider): Adjust.
677
678 2002-10-18  Jason Merrill  <jason@redhat.com>
679
680         PR c++/8080
681         * semantics.c (finish_for_cond, finish_while_cond): Don't mess
682         with condition decls in a template.
683
684 2002-10-17  Nathan Sidwell  <nathan@codesourcery.com>
685
686         * class.c (add_method): Compare template parms too.
687
688 2002-10-17  Mark Mitchell  <mark@codesourcery.com>
689
690         PR c++/7584
691         * class.c (handle_using_decl): Allow the declaration used to be
692         from an ambiguous base.
693
694         * pt.c (convert_template_argument): Revert this change:
695                 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
696                 * pt.c (convert_template_argument): Do not fold non-type
697                 template rguments when inside a template.
698
699         * init.c (expand_default_init): Handle brace-enclosed initializers
700         correctly.
701
702 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
703
704         * mangle.c (write_expression): Correct handling of enumeration
705         constants.
706         (write_template_arg): Likewise.
707         * pt.c (convert_template_argument): Do not fold non-type template
708         arguments when inside a template.
709
710         PR c++/7478
711         * cvt.c (convert_to_reference): Allow references as the incoming
712         type.
713
714 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
715
716         PR c++/7524
717         * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
718         build_qualified_type.
719
720 2002-10-15  Richard Henderson  <rth@redhat.com>
721
722         * error.c (dump_expr): Use real_to_decimal directly, and with
723         the new arguments.
724
725 2002-10-15  Mark Mitchell  <mark@codesourcery.com>
726
727         * decl.c (reshape_init): Fix typo.
728
729         * cp-tree.h (operator_name_info_t): Add arity.
730         * lex.c (init_operators): Initialize it.
731         * mangle.c (write_conversion_operator_name): New function.
732         (write_unqualified_name): Use it.
733         (write_template_args): Accept template arguments as a TREE_LIST.
734         (write_expression): Adjust handling of qualified names to match
735         specification.
736
737 2002-10-15  Jason Merrill  <jason@redhat.com>
738
739         * call.c (call_builtin_trap): New fn.
740         (convert_arg_to_ellipsis): Use it.  Downgrade error to warning.
741         (build_call): Don't set current_function_returns_abnormally outside
742         a function.
743
744 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
745
746         * class.c (check_field_decls): Remove empty_p parameter.  Instead,
747         clear CLASSTYPE_EMPTY_P.
748         (build_base_field): Likewise.
749         (build_base_fields): Likewise.
750         (check_bases_and_members): Likewise.
751         (create_vtbl_ptr): Likewise.
752         (layout_class_type): Likewise.  Ensure that empty classes have
753         size zero when used as base classes in the 3.2 ABI.
754         (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
755         CLASSTYPE_NEARLY_EMPTY_P.  Adjust calls to avoid passing empty_p
756         parameter.
757         (is_empty_class): Correct definition when using post-3.2 ABI.
758         * cp-tree.h (lang_type_class): Add empty_p.
759         (CLASSTYPE_EMPTY_P): New macro.
760
761 2002-10-12  Nathan Sidwell  <nathan@codesourcery.com>
762
763         * init.c (build_delete): Do not apply save_expr for arrays.
764         (build_vec_delete): Likewise.
765
766 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
767
768         * decl.c (layout_var_decl): Call layout_decl even for variables
769         whose type is an array with unspecified bounds.
770
771         PR c++/7176
772         * lex.c (do_identifier): Add another option for the parsing
773         parameter.
774         * parse.y (do_id): Use it.
775
776 2002-10-11  Gabriel Dos Reis  <gdr@integrable-solutions.net>
777
778         PRs C++/6803, C++/7721 and C++/7803
779         * decl.c (grokdeclarator): Gracefully handle template-name as
780         decl-specifier.
781
782 2002-10-11  Jason Molenda  <jmolenda@apple.com>
783
784         * init.c (build_field_list): Provide uses_unions_p with a default
785         value.
786
787 2002-10-11  Mark Mitchell  <mark@codesourcery.com>
788
789         PR c++/5661
790         * cp-tree.h (variably_modified_type_p): New function.
791         (grokdeclarator) Tighten check for variably modified types as
792         fields.
793         * pt.c (convert_template_argument): Do not allow variably modified
794         types as template arguments.
795         * tree.c (variably_modified_type_p): New function.
796
797         * NEWS: Document removal of "new X = ..." extension.
798         * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
799         brace-enclosed initializers.
800         * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
801         (initialize_local_var): Remove declaration.
802         (expand_static_init): Likewise.
803         * decl.c (next_initializable_field): New function.
804         (reshape_init): Likewise.
805         (check_initializer): Use them.  Build dynamic initializer for
806         aggregates here too.
807         (initialize_local_var): Simplify, and incorporate cleanup
808         insertion code as well.
809         (destroy_local_var): Remove.
810         (cp_finish_decl): Tidy.
811         (expand_static_init): Fold checks for whether or not a variable
812         needs initialization into this function.  Simplify.
813         * decl2.c (do_static_initialization): Simplify.
814         * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
815         be done for us automatically.
816         (expand_default_init): Handle brace-enclosed initializers
817         correctly.
818         (expand_aggr_init_1): Remove RTL-generation code.
819         (build_vec_init): Remove "new X = ..." support.
820         * parse.y (new_initializer): Likewise.
821         * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
822         brace-enclosed initializer.
823         (create_pseudo_type_info): Likewise.
824         * typeck2.c (store_init_value): Don't try to handle digest_init
825         being called more than once.
826         (digest_init): Tidy handling of brace-enclosed initializers.
827
828 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
829
830         * decl.c (typename_hash): Use htab_hash_pointer.
831
832 2002-10-10  Jim Wilson  <wilson@redhat.com>
833
834         * decl.c (duplicate_decls): Don't call decl_attributes.
835
836 2002-10-09  Zack Weinberg  <zack@codesourcery.com>
837
838         PR c/7353
839         * decl.c (start_decl): Unconditionally issue error for
840         'typedef foo = bar'.
841         (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
842         (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
843
844 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
845
846         * decl2.c (prune_vtable_vardecl): Delete unused function.
847
848 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
849
850         PR c++/7754
851         * decl2.c (finish_anon_union): Do not expand anonymous unions when
852         procesing template functions.
853         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
854         type. Call layout_decl.
855         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
856
857 2002-10-07  Richard Henderson  <rth@redhat.com>
858
859         * decl2.c, pt.c: Revert c++/7754 fix.
860
861 2002-10-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
862
863         PR c++/7804
864         * error.c (dump_expr) [REAL_CST]: Output in decimal format.
865
866 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
867
868         PR c++/7931
869         * pt.c (for_each_template_parm_r): Handle BASELINKs.
870
871         PR c++/7754
872         * decl2.c (finish_anon_union): Do not expand anonymous unions when
873         procesing template functions.
874         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
875         type. Call layout_decl.
876         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
877
878 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
879
880         PR c++/8006
881         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
882         template parameters.
883         (globals): Add entity and need_abi_warning.
884         (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
885         CLASSTYPE_TEMPLATE_INFO.
886         (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
887         TYPE_TI_TEMPLATE.
888         (write_prefix): Handle typename types correctly.
889         (write_template_prefix): Handle template template parameters
890         correctly.
891         (start_mangling): Add entity parameter.
892         (finish_mangling): Warn about names whose mangling will change.
893         (mangle_decl_string): Adjust.
894         (mangle_type_string): Likewise.
895         (mangle_special_for_type): Likewise.
896         (mangle_ctor_vtbl_for_type): Likewise.
897         (mangle_thunk): Likewise.
898         (mangle_guard_variable): Likewise.
899         (mangle_ref_init_variable): Likewise.
900
901 2002-10-02  Mark Mitchell  <mark@codesourcery.com>
902
903         PR c++/7188.
904         * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
905         * cp-tree.h (emit_base_init): Rename to ....
906         (emit_mem_initializers): ... this.
907         (expand_member_init): Change prototype.
908         * init.c (perform_member_init): Compute explicit, rather than
909         requiring it as a parameter.
910         (sort_member_init): Rename to ...
911         (sort_mem_initializers): ... this.  Process bases and data members
912         together.
913         (sort_base_init): Remove.
914         (emit_base_init): Rename to ...
915         (emit_mem_initializers): ... this.
916         (expand_aggr_vbase_init_1): Remove.
917         (construct_virtual_bases): Rename to ...
918         (construct_virtual_base): ... this.
919         (expand_member_init): Rework handling of base initializers.
920         * method.c (do_build_copy_constructor): Use
921         finish_mem_initializers.
922         * parse.y (member_init): Adjust calls to expand_member_init.
923         * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
924         (tsubst_initializer_list): Use expand_member_init.
925         * semantics.c (finish_mem_intiailizers): Simplify.
926
927 2002-10-02  Matt Austern  <austern@apple.com>
928         * decl.c (walk_vtables_r): Fixed typo that caused result to
929         never get a nonzero value.
930
931 2002-10-02  Roger Sayle  <roger@eyesopen.com>
932
933         PR optimization/6627
934         * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
935         from here, and move it to tree.h.
936         * decl.c (cxx_init_decl_processing): If storing the vbit
937         in function pointers, ensure that force_align_functions_log
938         is atleast one.
939
940 2002-10-02  Matt Austern  <austern@apple.com>
941
942         * class.c (check_field_decls): Changed warning about const member
943         variables so that it doesn't get issued for a class aggregate.
944
945 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
946
947         * decl.c (cp_finish_decl): Make sure array types are laid out,
948         even if the array bounds are unknown.
949
950 2002-10-01  Steve Ellcey  <sje@cup.hp.com>
951
952         * class.c (build_vtbl_initializer): Change build_c_cast
953         to build1.
954
955 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
956
957         * decl.c (cp_finish_decl): Make sure array types are laid out,
958         even if the array bounds are unknown.
959
960         * decl.c (cp_finish_decl): Correct check for dynamic
961         initialization of thread-local storage.
962
963 2002-09-30  Nathan Sidwell  <nathan@codesourcery.com>
964
965         * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
966         overloaded.
967
968 2002-09-30  Steve Ellcey  <sje@cup.hp.com>
969
970         * class.c (build_vtbl_initializer): Add cast.
971         (add_vcall_offset_vtbl_entries_1):
972         Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
973
974 2002-09-30  Mark Mitchell  <mark@codesourcery.com>
975
976         * class.c (walk_subobject_offsets): Correct the calculation of
977         offsets for virtual bases.  Correct the counting of array
978         elements.
979         (layout_nonempty_base_or_field): Simplify.  Correct the
980         calculation of offsets to be propagated through the binfo
981         hierarchy.
982         (build_base_field): Avoid creating a FIELD_DECL for empty bases.
983         Add the FIELD_DECL to TYPE_FIELDS.
984         (build_base_fields): Adjust accordingly.
985         (layout_virtual_bases): Use build_base_field.
986         (end_of_class): Return a tree, not an integer.
987         (warn_about_ambiguous_direct_bases): Rename to ...
988         (warn_about_ambiguous_bases): ... this.
989         (include_empty_classes): New function.
990         (layout_class_type): Create an alternative version of the type to
991         be used when as a base class type.  Do not call
992         finish_record_layout until we are done laying out the class.
993         * cp-tree.h (lang_type_class): Remove size, size_unit.  Add
994         as_base.
995         (CLASSTYPE_SIZE): Reimplement.
996         (CLASSTYPE_SIZE_UNIT): Likewise.
997         (CLASSTYPE_ALIGN): Likweise.
998         (CLASSTYPE_USER_ALIGN): Likewise.
999         (CLASSTYPE_AS_BASE): New macro.
1000         (DECL_INITIALIZED_P): Likewise.
1001         (extract_init): Remove prototype.
1002         (build_forced_zero_init): Rename to ...
1003         (build_zero_init): ... this.
1004         (force_store_init_value): Remove.
1005         * decl.c (obscure_complex_init): Remove.
1006         (duplicate_decls): Copy DECL_INITIALIZED_P.
1007         (check_initializer): Do not leave junk in DECL_INITIAL.
1008         (cp_finish_decl): Handle zero-initialization of entities with
1009         static storage duration.
1010         * expr.c (extract_init): Remove.
1011         * init.c (build_forced_zero_init): Remove.
1012         (build_zero_init): New function.
1013         (build_default_init): Use it.
1014         (build_field_list): Skip FIELD_DECLs for base subobjects.
1015         (push_base_cleanups): Likewise.
1016         * method.c (do_build_assign_ref): Likewise.
1017         (synthesize_exception_spec): Likewise.
1018         * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
1019         (regenerate_decl_from_template): To not set DECL_INITIAL for a
1020         static data member whose initialization took place in its class.
1021         (instantiate_decl): Do not pass an initializer to cp_finish_decl
1022         in that situation.
1023         * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
1024         (dfs_unuse_fields): Likewise.
1025         * tree.c (pod_type_p): Handle error_mark_node.
1026         (zero_init_p): Likewise.
1027         * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
1028         subobjects.
1029         * typeck2.c (store_init_value): Remove #if 0'd code.
1030         (force_store_init_value): Remove.
1031         (process_init_constructor): Use build_zero_init.
1032
1033 2002-09-29  Nathan Sidwell  <nathan@codesourcery.com>
1034
1035         PR c++/7788
1036         * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
1037
1038 2002-09-29  Kazu Hirata  <kazu@cs.umass.edu>
1039
1040         * cp-tree.h: Fix comment typos.
1041         * decl.c: Likewise.
1042         * pt.c: Likewise.
1043
1044 2002-09-25  Mark Mitchell  <mark@codesourcery.com>
1045
1046         * cp/class.c (contains_empty_class_p): New method.
1047         (walk_subobject_offsets): Correct computation of field offset.
1048         (layout_empty_base): Correct placement of emtpy base classes.
1049         (layout_class_type): Warn about ABI changes.
1050
1051 2002-09-23  Mark Mitchell  <mark@codesourcery.com>
1052
1053         * cp/class.c (layout_virtual_bases): Do not round the size of the
1054         type to a multiple of the alignment before laying out virtual bases.
1055         (layout_class_type): Correct handling of bit-fields that are wider
1056         than their type inside unions.  Round the size of the type to a
1057         even number of bytes when computing the size without virtual
1058         bases.
1059         * cp/cp-tree.h (abi_version_at_least): New macro.
1060
1061 2002-09-21  Kazu Hirata  <kazu@cs.umass.edu>
1062
1063         * ChangeLog: Follow spelling conventions.
1064         * ChangeLog.2: Likewise.
1065         * call.c: Likewise.
1066         * class.c: Likewise.
1067         * cp-tree.h: Likewise.
1068         * cvt.c: Likewise.
1069         * decl.c: Likewise.
1070         * decl2.c: Likewise.
1071         * except.c: Likewise.
1072         * friend.c: Likewise.
1073         * g++spec.c: Likewise.
1074         * init.c: Likewise.
1075         * lex.c: Likewise.
1076         * mangle.c: Likewise.
1077         * method.c: Likewise.
1078         * operators.def: Likewise.
1079         * optimize.c: Likewise.
1080         * pt.c: Likewise.
1081         * rtti.c: Likewise.
1082         * search.c: Likewise.
1083         * semantics.c: Likewise.
1084         * spew.c: Likewise.
1085         * tree.c: Likewise.
1086         * typeck.c: Likewise.
1087
1088 2002-09-18  Devang Patel  <dpatel@apple.com>
1089
1090         * cp/cp-tree.h: New prototype for walk_vtabls().
1091         * cp/decl.c (walk_vtables_r): New function.
1092         (struct cp_binding_level): Add new members, namespaces,
1093         names_size and vtables.
1094         (add_decl_to_level): Add decl in namespaces or vtables
1095         chain, if conditions match.
1096         (walk_vtables): New function.
1097         (walk_namespaces_r): Travers separate namespace chain
1098         for namespace decls.
1099         (wrapup_globals_for_namespace): Use names_size instead
1100         of list_length().
1101         * cp/decl2.c (finish_file): Use walk_vtables() instead of
1102         walk_globals() to walk vtable decls.
1103
1104 2002-09-18  Nathan Sidwell  <nathan@codesourcery.com>
1105
1106         * decl.c (grokdeclarator): Use assert, not internal_error. Don't
1107         ICE with invalid pointers & references.
1108
1109 2002-09-17  Zack Weinberg  <zack@codesourcery.com>
1110
1111         * Make-lang.in: Remove all references to the demangler.
1112         * cxxfilt.c: Moved to binutils.
1113
1114 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
1115
1116         PR c++/7718
1117         * pt.c (tsubst_decl): Remove assert.
1118
1119         Remove DR 295 implementation.
1120         * pt.c (check_cv_quals_for_unify): Disable function & method cases.
1121         * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
1122         about ignoring volatile qualifiers.
1123
1124         * search.c (lookup_member): Correct documentation.
1125
1126 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
1127
1128         * cp-tree.h (union lang_tree_node): Add chain_next option.
1129
1130 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
1131
1132         * parse.y (parse_finish_call_expr): Check lookup_member result.
1133
1134         PR c++/7015
1135         * semantic.c (finish_asm_stmt): Fix operand/output_operands
1136         thinko.
1137         * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
1138
1139 2002-09-15  Nathan Sidwell  <nathan@codesourcery.com>
1140
1141         PR c++/7919
1142         * call.c (build_over_call): Convert this pointer for fns found by
1143         using decls.
1144
1145 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
1146
1147         * ChangeLog: Follow spelling conventions.
1148         * ChangeLog.1: Likewise.
1149
1150 2002-09-14  Nathan Sidwell  <nathan@codesourcery.com>
1151
1152         PR c++/7768
1153         * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
1154
1155 2002-09-14  Kazu Hirata  <kazu@cs.umass.edu>
1156
1157         * error.c: Fix comment formatting.
1158         * except.c: Likewise.
1159         * expr.c: Likewise.
1160         * friend.c: Likewise.
1161         * g++spec.c: Likewise.
1162         * init.c: Likewise.
1163         * lex.c: Likewise.
1164         * mangle.c: Likewise.
1165         * method.c: Likewise.
1166         * optimize.c: Likewise.
1167         * pt.c: Likewise.
1168         * rtti.c: Likewise.
1169         * search.c: Likewise.
1170         * semantics.c: Likewise.
1171         * spew.c: Likewise.
1172         * tree.c: Likewise.
1173         * typeck.c: Likewise.
1174         * typeck2.c: Likewise.
1175
1176 2002-09-13  Matt Austern  <austern@apple.com>
1177
1178         PR C++/7828
1179         * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
1180         * cp/call.c: Change call-by-const-reference mechanism to use
1181         non_cast_lvalue_p when deciding whether the create a temporary.
1182         We need a temporary when passing, e.g. (long) x by const ref.
1183
1184 2002-09-13  Nathan Sidwell  <nathan@codesourcery.com>
1185
1186         * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
1187
1188 2002-09-13  Kazu Hirata  <kazu@cs.umass.edu>
1189
1190         * decl.c: Fix comment formatting.
1191         * decl2.c: Likewise.
1192
1193 2002-09-12  Kazu Hirata  <kazu@cs.umass.edu>
1194
1195         * call.c: Fix comment formatting.
1196         * class.c: Likewise.
1197         * cp-lang.c: Likewise.
1198         * cp-tree.h: Likewise.
1199         * cvt.c: Likewise.
1200
1201 2002-09-11  Zack Weinberg  <zack@codesourcery.com>
1202
1203         * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
1204         and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
1205         * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
1206         minor adjustments (use version_string, eliminate yet another
1207         duplicate of xmalloc)
1208
1209 2002-09-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1210
1211         * cp-tree.h (require_complete_eh_spec_types): Add prototype.
1212
1213 2002-09-05  Jason Merrill  <jason@redhat.com>
1214
1215         * typeck2.c (add_exception_specifier): Only pedwarn for an
1216         incomplete type.
1217         (require_complete_eh_spec_types): New fn.
1218         (cxx_incomplete_type_diagnostic): Also support pedwarning.
1219         * typeck.c (complete_type_or_diagnostic): Likewise.
1220         * call.c (build_call): Call require_complete_eh_spec_types.
1221         * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
1222         on an incomplete type.
1223
1224 2002-09-04  Jakub Jelinek  <jakub@redhat.com>
1225
1226         * decl.c (start_cleanup_fn): Clear interface_only before
1227         start_function, restore it afterwards.
1228
1229 2002-09-02  Nathan Sidwell  <nathan@codesourcery.com>
1230
1231         * cp-tree.h (finish_builtin_type): Remove.
1232         * decl2.c (finish_builtin_type): Move to common code.
1233         * decl.c (build_ptrmemfunc_type): Adjust.
1234         * rtti.c (create_pseudo_type_info): Adjust.
1235         (create_tinfo_types): Adjust.
1236
1237 2002-08-31  Jason Merrill  <jason@redhat.com>
1238
1239         * cp-lang.c (cp_expr_size): Allow initialization from a
1240         CONSTRUCTOR.
1241
1242 2002-08-30  Richard Henderson  <rth@redhat.com>
1243
1244         PR opt/7515
1245         * tree.c: Include target.h.
1246         (cp_cannot_inline_tree_fn): Don't auto-inline functions that
1247         don't bind locally.
1248         * Makefile.in (tree.o): Update.
1249
1250 2002-08-27  Mark Mitchell  <mark@codesourcery.com>
1251
1252         * class.c (layout_virtual_bases): Warn about bugs in G++ that
1253         result in incorrect object layouts.
1254         (layout_class_type): Likewise.
1255
1256 2002-08-24  Matt Austern  <austern@apple.com>
1257
1258         * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
1259         are allowable.
1260         (real_lvalue_p): Update caller.
1261         (lvalue_p): Ditto.
1262         (non_cast_lvalue_or_else): New.
1263         * tree.h: Declare it.
1264         * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
1265
1266 2002-08-22  Mark Mitchell  <mark@codesourcery.com>
1267
1268         * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
1269         and COND_EXPR specially; fix error message output.
1270
1271 2002-08-22  Jason Merrill  <jason@redhat.com>
1272
1273         * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
1274         * semantics.c (nullify_returns_r): Likewise.
1275
1276 2002-08-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1277
1278         Fix PR/7621
1279         * typeck.c (finish_class_member_access_expr): Diagnose cases where
1280         name lookup finds nothing.
1281
1282 2002-08-15  Jason Merrill  <jason@redhat.com>
1283
1284         * semantics.c (finish_then_clause): Remove redundant assignment.
1285         (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
1286         extra binding level outside the if/switch statement.
1287         (finish_while_cond, finish_for_cond): Rewrite complex condition
1288         into the loop body.
1289
1290 2002-08-15  Alexandre Oliva  <aoliva@redhat.com>
1291
1292         * parse.y (sizeof, alignof, typeof): New non-terminals to
1293         increment skip_evaluation.  Replace terminals with them and
1294         decrement skip_evaluation at the end of rules using them.
1295         * decl2.c (mark_used): Don't assemble_external if
1296         skipping evaluation.
1297
1298 2002-08-15  Gabriel Dos Reis  <gdr@nerim.net>
1299
1300         Fix PR/7504
1301         * parse.y (parse_finish_call_expr): Handle incomplete
1302         type used to name a scope.
1303
1304 2002-08-15  Nathan Sidwell  <nathan@codesourcery.com>
1305
1306         PR c++/7598
1307         * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
1308         regression caused by my 2002-08-08 patch.
1309
1310 2002-08-13  Mark Mitchell  <mark@codesourcery.com>
1311
1312         * decl.c (pushdecl_class_level): Honor requests to bind names to
1313         OVERLOADs.
1314
1315 2002-08-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1316
1317         * decl2.c (build_call_from_tree): Fix uninitialized variable.
1318         * parse.y (parse_finish_call_expr): Likewise.
1319         * repo.c (old_args, old_dir, old_main): Const-ify.
1320
1321 2002-08-11  Gabriel Dos Reis  <gdr@nerim.net>
1322
1323         * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE +
1324         DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
1325         * optimize.c (maybe_clone_body): Likewise.
1326         * pt.c (tsubst_enum): Likewise.
1327         (lookup_template_class): Likewise.
1328         * tree.c (cp_copy_res_decl_for_inlining): Likewise.
1329
1330 2002-08-10  Neil Booth  <neil@daikokuya.co.uk>
1331
1332         * lang-specs.h: Remove -ansi.
1333
1334 2002-08-10  Nathan Sidwell  <nathan@codesourcery.com>
1335
1336         * tree.c (maybe_dummy_object): Replace // with /* */
1337
1338 2002-08-09  Mark Mitchell  <mark@codesourcery.com>
1339
1340         * call.c (standard_conversion): Use build_ptrmem_type.
1341         * cp-tree.h (build_ptrmem_type): New function.
1342         (adjust_result_of_qualified_name_lookup): Likewise.
1343         * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
1344         static data members.
1345         (build_ptrmem_type): New function.
1346         (grokdeclarator): Do not use build_offset_type when encountering a
1347         qualified name.
1348         * parse.y (parse_finish_call_expr): Use
1349         adjust_result_of_qualified_name_lookup.
1350         * search.c (adjust_result_of_qualified_name_lookup): New function.
1351         * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
1352         accessing OFFSET_TYPEs directly.
1353
1354 2002-08-08  Mike Stump  <mrs@apple.com>
1355
1356         * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
1357         (type_decays_to): Likewise.
1358         * class.c (find_final_overrider): Likewise.
1359         (maybe_note_name_used_in_class): Likewise.
1360         * decl.c (current_tmpl_spec_kind): Likewise.
1361         (add_binding): Likewise.
1362         (push_class_binding): Likewise.
1363         (duplicate_decls): Likewise.
1364         (layout_var_decl): Likewise.
1365         (grokfndecl): Likewise.
1366         (grokdeclarator): Likewise.
1367         (check_default_argument): Likewise.
1368         * decl2.c (handle_class_head): Likewise.
1369         * error.c (dump_template_decl): Likewise.
1370         * init.c (build_offset_ref): Likewise.
1371         * pt.c (check_specialization_scope): Likewise.
1372         (determine_specialization): Likewise.
1373         (check_explicit_specialization): Likewise.
1374         (maybe_check_template_type): Likewise.
1375         (process_partial_specialization): Likewise.
1376         (check_default_tmpl_args): Likewise.
1377         (push_template_decl_real): Likewise.
1378         (convert_template_argument): Likewise.
1379         (try_class_unification): Likewise.
1380         (get_bindings_real): Likewise.
1381         (do_decl_instantiation): Likewise.
1382         * semantics.c (begin_function_definition): Likewise.
1383         (finish_member_declaration): Likewise.
1384         (check_multiple_declarators): Likewise.
1385         * typeck.c (comp_array_types): Likewise.
1386         (comptypes): Likewise.
1387         (expr_sizeof): Likewise.
1388         (build_binary_op): Likewise.
1389         (dubious_conversion_warnings): Likewise.
1390         (check_return_expr): Likewise.
1391
1392 2002-08-08  Mark Mitchell  <mark@codesourcery.com>
1393
1394         * typeck.c (build_class_member_access_expr): Do not return
1395         error_mark_node when no error has occurred.
1396
1397 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
1398
1399         * typeck.c (build_component_addr): Remove.
1400         (build_unary_op): Just check it's not a bitfield, and then build
1401         an ADDR_EXPR.
1402
1403 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
1404
1405         * class.c (convert_to_base): Correct check for error_mark_node.
1406         (create_vtable_ptr): Remove unused VFUNS_P parm.
1407
1408 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
1409
1410         * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
1411
1412 2002-08-07  Mark Mitchell  <mark@codesourcery.com>
1413
1414         Rework build_component_ref.
1415         * call.c (build_vfield_ref): Do not go through build_component_ref.
1416         (build_field_call): Use build_class_member_access_expr.
1417         (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
1418         (build_object_call): Likewise.
1419         * class.c (convert_to_base): New function.
1420         (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
1421         (instantiate_type): Handle BASELINKs.
1422         * cp-tree.def (BASELINK): New tree code.
1423         * cp-tree.h (BASELINK_P): Reimplement.
1424         (SET_BASELINK_P): Remove.
1425         (BASELINK_BINFO): Reimplement.
1426         (BASELINK_FUNCTIONS): Likewise.
1427         (BASELINK_ACCESS_BINFO): Likewise.
1428         (BASELINK_OPTYPE): Likewise.
1429         (convert_to_base): New function.
1430         (name_p): Likewise.
1431         (build_object_ref): Remove.
1432         (build_component_ref_1): Likewise.
1433         (build_component_ref): Likewise.
1434         (build_x_component_ref): Likewise.
1435         (build_class_member_access_expr): New function.
1436         (finish_class_member_access_expr): Likewise.
1437         (build_ptrmemfunc_access_expr): Likewise.
1438         * decl.c (grokdeclarator): Handle BASELINKs.
1439         * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
1440         finish_class_member_access_expr.
1441         (arg_assoc): Handle BASELINKs.
1442         (do_class_using_decl): Likewise.
1443         * error.c (dump_decl): Likewise.
1444         (dump_expr): Use build_ptrmemfunc_access_expr.
1445         * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
1446         destructors.
1447         (build_throw): Use BASELINK_FUNCTIONS.
1448         * init.c (perform_member_init): Use
1449         build_class_member_access_expr.
1450         (build_offset_ref): Handle BASELINKs.  Use
1451         build_class_member_access_expr.
1452         * method.c (hack_identifier): Likewise.
1453         * parse.y (do_id): Use BASELINK, not TREE_LIST.
1454         (primary): Remove uses of build_object_ref.
1455         * pt.c (lookup_template_function): Handle BASELINKs.
1456         (resolve_overloaded_unification): Likewise.
1457         * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
1458         (lookup_field): Use BASELINK, not TREE_LIST.
1459         (lookup_fnfiels): Likewise.
1460         (setup_class_bindings): Likewise.
1461         * semantics.c (finish_object_call_expr): Do not use
1462         build_method_call when we already know what function is being
1463         called.
1464         * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
1465         * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
1466         TREE_CHAIN.
1467         (name_p): New function.
1468         * typeck.c (build_object_ref): Remove.
1469         (build_component_ref_1): Likewise.
1470         (build_x_component_ref): Likewise.
1471         (build_class_member_access_expr): New function.
1472         (finish_class_member_access_expr): Likewise.
1473         (build_ptrmemfunc_access_expr): Likewise.
1474         (get_member_function_from_ptrfunc): Use
1475         build_ptrmemfunc_access_expr.
1476         (build_binary_op): Likewise.
1477         (build_unary_op): Likewise.
1478         (build_ptrmemfunc): Likewise.
1479         (pfn_from_ptrmemfunc): Likewise.
1480         * typeck2.c (build_m_component_ref): Adjust comment.
1481
1482 2002-08-07  Neil Booth  <neil@daikokuya.co.uk>
1483
1484         * Make-lang.in (CXX_C_OBJS): Update.
1485         * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
1486         * cp-tree.h (cxx_decode_option): Remove.
1487         * decl2.c (compare_options, lang_f_options, unsupported_options,
1488         cxx_decode_option): Remove.
1489
1490 2002-08-06  Gabriel Dos Reis  <gdr@nerim.net>
1491
1492         * typeck.c (build_x_unary_op): Handle pointer-to-member.
1493
1494 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
1495
1496         * class.c: Don't include obstack.h.
1497         (popclass):
1498         * decl2.c: Delete bogus comment.
1499         * error.c: Don't include obstack.h.
1500         * except.c: Likewise.
1501         (dump_type): Correct comment.
1502         * method.c: Don't include obstack.h.
1503         * tree.c: Likewise.
1504
1505 2002-08-04  Gabriel Dos Reis  <gdr@nerim.net>
1506
1507         Fix PR/2213
1508         * cvt.c (cp_convert_to_pointer): Reject conversions from integral
1509         expressions to pointer-to-data-member of pointer-to-member-functions.
1510
1511 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
1512
1513         * cvt.c (ocp_convert): Delete obsolete code.
1514         * parse.y (permanent_obstack): Delete declaration.
1515         * pt.c (permanent_obstack): Delete declaration.
1516         * repo.c (permanent_obstack): Delete declaration.
1517         (open_repo_file): Use xmalloc instead of permanent_obstack.
1518         (init_repo): Use xstrdup instead of permanent_obstack.
1519
1520 2002-08-04  Nathan Sidwell  <nathan@codesourcery.com>
1521
1522         * cp-tree.h (VF_DERIVED_VALUE): Remove.
1523         * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
1524
1525 2002-08-03  Nathan Sidwell  <nathan@codesourcery.com>
1526
1527         PR 7470.
1528         C++ ABI change - vfunc ordering.
1529         * class.c (add_virtual_function): Remove.
1530         (dfs_modify_all_vtables): Take list of all declared
1531         virtuals. Assign all that are not in primary base.
1532         (check_for_override): Adjust comments.
1533         (create_vtable_ptr): Take single list of virtuals. Build chain
1534         of declared virtuals here.
1535         (layout_class_type): Take single list of virtuals. Adjust.
1536         (finish_struct_1): Keep virtuals on single list. Adjust.
1537
1538 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
1539
1540         * init.c (build_member_call): Use build_new_method_call, not
1541         build_method_call.
1542
1543 2002-08-02  Krister Walfridsson  <cato@df.lth.se>
1544
1545         * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
1546
1547 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
1548
1549         * call.c (build_method_call): Issue a more helpful error message
1550         about ambiguous method names.
1551
1552 2002-08-02  Nathan Sidwell  <nathan@codesourcery.com>
1553
1554         * tree.c (build_shared_int_cst): Make cache file scope, and
1555         GTY it.
1556
1557 2002-08-02  Jason Merrill  <jason@redhat.com>
1558
1559         * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
1560         (cp_expr_size): New fn.
1561         * call.c (build_over_call): Lose empty class hackery.
1562         (convert_arg_to_ellipsis): Promote non-POD warning to error.
1563         * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
1564
1565         * semantics.c (expand_body): Do tree optimization in the function
1566         context, too.
1567
1568 2002-08-01  Neil Booth  <neil@daikokuya.co.uk>
1569
1570         * cp-tree.h: Move all warning and flag declarations to c-common.h.
1571         * decl.c: Move all warning and flag variables to c-common.c.
1572         * decl2.c: Move all warning and flag variables to c-common.c.
1573         * lex.c (flag_digraphs): Remove.
1574         (warn_traditional): Now in c-common.c.
1575
1576 2002-07-31  Mark Mitchell  <mark@codesourcery.com>
1577
1578         * call.c (build_field_call): Do not look up the field by name.
1579         (build_method_call): Simplify.
1580         (struct z_candidate): Add access_path and conversion_path.  Remove
1581         basetype_path.
1582         (convert_class_to_reference): Adjust use of
1583         add_function_candidate.
1584         (add_candidate): Add conversion_path argument.
1585         (add_function_candidate): Use it.
1586         (add_conv_dndidate): Likewise.
1587         (build_builtin_candidate): Likewise.
1588         (add_template_candidate_real): Add conversion_path argument.
1589         (add_template_conv_candidate): Likewise.
1590         (add_template_candidate): Likewise.
1591         (build_user_type_conversion_1): Use it.
1592         (build_new_function_call): Remove name lookup code.  Adjust use of
1593         add_template_candidate and add_function_candidate.
1594         (build_new_op): Likewise.
1595         (convert_like_real): Use build_special_member_call.
1596         (build_over_call): Use cand->conversion_path.
1597         (build_special_member_call): New method.
1598         (build_new_method_call): Remove name lookup code.
1599         * cp-tree.def (OFFSET_REF): Update documentation.
1600         (TEMPLATE_ID_EXPR): Likewise.
1601         * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
1602         (BASELINK_OPTYPE): Likewise.
1603         (build_new_method_call): Adjust prototype.
1604         (build_special_member_call): New method.
1605         (build_baselink): New method.
1606         (build_offset_ref_call_from_tree): Likewise.
1607         (build_call_from_tree): Likewise.
1608         (finish_qualified_call_expr): Remove.
1609         (finish_call_expr): Adjust prototype.
1610         (build_x_function_call): Remove.
1611         * cvt.c (ocp_convert): Use build_special_member_call.
1612         * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
1613         (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
1614         CALL_EXPR.
1615         (build_offset_ref_call_from_tree): New function.
1616         (build_call_from_tree): Likewise.
1617         * init.c (expand_cleanup): Use build_special_member_call.
1618         (expand_default_init): Likewise.
1619         (build_member_call): Use finish_call_expr.
1620         (build_new_1): Use build_special_member_call.
1621         (push_base_cleanups): Likewise.
1622         * method.c (do_build_assign_ref): Likewise.
1623         * parse.y (template_id): Do not pass a COMPONENT_REF to
1624         lookup_template_function.
1625         (primary): Use parse_finish_call_epxr, not finish_call_expr.
1626         (parse_finish_call_expr): New function.
1627         * pt.c (lookup_template_function): Add assertions.
1628         * search.c (lookup_base): Allow T to be a binfo.
1629         (build_baselink): New function.
1630         (lookup_member): Use it.
1631         * semantics.c (finish_call_expr): Do not do name lookup.
1632         (finish_object_call_expr): Remove #if 0'd code.
1633         (finish_qualified_call_expr): Remove.
1634         * typeck.c (build_x_function_call): Remove.
1635         (build_static_case): Use build_special_member_call.
1636         * typeck2.c (build_functional_cast): Likewise.
1637
1638 2002-07-30  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
1639
1640         * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
1641
1642 2002-07-30  Gabriel Dos Reis  <gdr@nerim.net>
1643
1644         * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
1645
1646 2002-07-30  Nathan Sidwell  <nathan@codesourcery.com>
1647
1648         * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
1649         documentation.
1650
1651 2002-07-29  Alan Modra  <amodra@bigpond.net.au>
1652
1653         * cp-tree.h: Comment typo fix.
1654
1655 2002-07-29  Richard Earnshaw  <rearnsha@arm.com>
1656
1657         * spew.c (space_for_token): Allocate zeroed memory for a new token
1658         chunk.
1659
1660 2002-07-27  Roger Sayle  <roger@eyesopen.com>
1661
1662         * decl.c (builtin_function_1): No need to explicitly mark
1663         BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
1664
1665 2002-07-27  Roger Sayle  <roger@eyesopen.com>
1666
1667         * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
1668
1669 2002-07-26  Jason Merrill  <jason@redhat.com>
1670
1671         * call.c (build_over_call): Likewise.
1672         (cp_convert_parm_for_inlining): New fn.
1673         (convert_for_arg_passing): New fn.
1674         (convert_default_arg, build_over_call): Use it.
1675         (type_passed_as): New fn.
1676         * pt.c (tsubst_decl): Use it.
1677         * decl2.c (cp_build_parm_decl): New fn.
1678         (build_artificial_parm): Use it.
1679         (start_static_storage_duration_function): Likewise.
1680         * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
1681         (grokparms): Don't mess with DECL_ARG_TYPE.
1682         * typeck.c (convert_arguments): Use convert_for_arg_passing.
1683         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
1684         Define.
1685         * cp-tree.h: Declare new fns.
1686
1687 2002-07-26  Neil Booth  <neil@daikokuya.co.uk>
1688
1689         * cp-tree.h (flag_operator_names): Remove.
1690         * decl2.c (flag_operator_names): Remove.
1691         (lang_f_options): Remove operator-names.
1692         * lex.c (D_OPNAME): Remove.
1693         (reswords): Remove operator names.
1694         (rid_to_yy): Remove operator names.
1695         (init_reswords): No need to handle D_OPNAME.
1696         * spew.c (read_process_identifier): There are no operator
1697         names.
1698
1699 2002-07-26  Jason Merrill  <jason@redhat.com>
1700
1701         * dump.c (cp_dump_tree): Call c_dump_tree.
1702         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
1703
1704 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
1705
1706         * error.c (print_whitespace): Remove.
1707         * g++spec.c (LIBUNWIND): Move.
1708         * mangle.c (mangled_position, write_signed_number): Remove.
1709
1710 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
1711
1712         * decl2.c (cxx_decode_option): Similarly.
1713
1714 2002-07-25  Gabriel Dos Reis  <gdr@nerim.net>
1715
1716         * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
1717         (cxx_sizeof_or_alignof_type): Take a third argument.
1718         (cxx_sizeof): Adjust definition.
1719         (cxx_alignof): Likewise.
1720         * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
1721         * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
1722         complaining.
1723         (c_sizeof_nowarn): Remove definition.
1724         (build_unary_op): Use cxx_sizeof_nowarn.
1725
1726 2002-07-24  Geoffrey Keating  <geoffk@redhat.com>
1727
1728         * tree.c (cp_build_qualified_type_real): When copying
1729         pointer-to-method types, unshare the record that holds
1730         the cached pointer-to-member-function type.
1731
1732 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
1733
1734         * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
1735
1736 2002-07-23  Gabriel Dos Reis  <gdr@nerim.net>
1737
1738         Fix PR/7363:
1739         * typeck.c (cxx_sizeof_or_alignof_type): New function.
1740         (c_sizeof): Remove definition.
1741         (expr_sizeof): Use cxx_sizeof.
1742         * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
1743         * decl.c (finish_destructor_body): Use cxx_sizeof.
1744         * semantics.c (finish_alignof): Likewise.
1745         (finish_alignof): Use cxx_alignof.
1746         * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
1747         (cxx_sizeof_or_alignof_type): Declare.
1748         (my_friendly_assert): Move to ../c-common.h.
1749
1750 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
1751
1752         * class.c, method.c, pt.c, search.c: Don't define obstack macros.
1753
1754 2002-07-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1755
1756         PR c++/7347, c++/7348
1757         * cp-tree.h (tsubst_flags_t): Add tf_parsing.
1758         * decl.c (make_typename_type): Use it.
1759         (make_unbound_class_template): Likewise.
1760         (lookup_name_real): Don't call type_access_control if scope is
1761         template parameter dependent.
1762         * parse.y (template_arg): Call make_unbound_class_template with
1763         tf_parsing set.
1764         (nest_name_specifier): Call make_typename_type with tf_parsing set.
1765         (typename_sub0): Likewise.
1766         (typename_sub1): Likewise.
1767         (instantiate_decl): Push class scope.
1768         * pt.c (regenerate_decl_from_template): Call pushclass and popclass
1769         for both static variable and member function template.
1770         (instantiate_decl) Call pushclass and popclass when tsubst'ing type
1771         and arguments.
1772         * search.c (type_access_control): Do type access for TEMPLATE_DECL
1773         too.
1774
1775 2002-07-20  Roger Sayle  <roger@eyesopen.com>
1776
1777         * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
1778         test by using positive_option.  Make whitespace consistent.
1779
1780 2002-07-20  Gabriel Dos Reis  <gdr@nerim.net>
1781
1782         * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
1783         members with 'locus'.  Adjust use throughout.
1784         (struct feed):  Likewise.
1785         (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
1786         Adjust use.
1787         (snarf_defarg): Use error(), not error_with_file_and_line().
1788
1789 2002-07-19  Chris Demetriou  <cgd@broadcom.com>
1790
1791         * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
1792         cpp_options is included.
1793
1794 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1795
1796         PR c++/2862, c++/2863
1797         * pt.c (determine_specialization): Compare the length of
1798         TYPE_ARG_TYPES.  Tidy.
1799
1800 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1801
1802         PR c++/3797
1803         * decl.c (duplicate_decls): Don't propagate inlining parameters from
1804         olddecl to newdecl when newdecl is a specialization of the
1805         instantiation olddecl.
1806
1807 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1808
1809         PR c++/4802, c++/5387
1810         * decl.c (make_typename_type): Use enforce_access.
1811
1812 2002-07-17  Scott Snyder <snyder@fnal.gov>
1813
1814         PR c++/7320
1815         * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
1816
1817 2002-07-12  Mark Mitchell  <mark@codesourcery.com>
1818
1819         * class.c (add_method): Correct handling of conversion operators.
1820
1821 2002-07-11  Mark Mitchell  <mark@codesourcery.com>
1822
1823         PR c++/7224
1824         * class.c (add_method): Simplify.
1825
1826 2002-07-11  Jason Merrill  <jason@redhat.com>
1827
1828         PR c++/7279
1829         * tree.c (cp_copy_res_decl_for_inlining): Also copy
1830         TREE_ADDRESSABLE.
1831
1832 2002-07-10  Graham Stott  <graham.stott@btinternet.com>
1833
1834         * pt.c (template_parm_this_level_p, push_template_decl_real):
1835         Pass depth as int pointer.
1836
1837 2002-07-11  Tim Josling  <tej@melbpc.org.au>
1838
1839         Remove front end hard coding from gengtype.c.
1840
1841         * config-lang.in (gtfiles): Add files needed for this front end.
1842
1843 2002-07-10  Mark Mitchell  <mark@codesourcery.com>
1844
1845         * cp-tree.h (unqualified_name_lookup_error): Declare it.
1846         (begin_function_definition): Adjust prototype.
1847         * lex.c (unqualified_name_lookup_error): New function, split out
1848         from ...
1849         (do_identifier): ... here.
1850         * parse.y (parse_begin_function_definition): New function.
1851         (fn.def1): Use it.
1852         * semantics.c (begin_function_definition): Accept decl-specifiers
1853         and attributes as separate parameters.
1854
1855 2002-07-10  Jason Merrill  <jason@redhat.com>
1856
1857         PR c++/6255
1858         * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
1859         modifying the old one.
1860
1861 2002-07-09  Mark Mitchell  <mark@codesourcery.com>
1862
1863         * cp-tree.h (constructor_name_p): Declare it.
1864         (check_template_template_default_arg): Likewise.
1865         * class.c (handle_using_decl): Use constructor_name_p.
1866         * decl.c (grokdeclarator): Likewise.
1867         * decl2.c (constructor_name_p): Define it.
1868         * init.c (build_member_call): Use constructor_name_p.
1869         * parse.y (template_parm): Use check_template_template_default_arg.
1870         * pt.c (check_explicit_specialization): Use constructor_name_p.
1871         * semantics.c (check_template_template_default_arg): New function.
1872
1873 2002-07-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1874
1875         * pt.c (can_complete_type_without_circularity): Add static to
1876         function definition.
1877
1878 2002-07-08  Mark Mitchell  <mark@codesourcery.com>
1879
1880         * cp-tree.h (have_extern_spec): Declare it
1881         * decl.c (have_extern_spec): Define it.
1882         (start_decl): Eliminate use of used_extern_spec.
1883         (start_function): Likewise.
1884         * parse.y (have_extern_spec): Remove declaration.
1885         (used_extern_spec): Likewise.
1886         (frob_specs): Eliminate use of used_extern_spec.
1887         (.hush_warning): Likewise.
1888
1889 2002-07-07  Mark Mitchell  <mark@codesourcery.com>
1890
1891         * Make-lang.in (cp/parse.o): Depend on decl.h.
1892         * cp-tree.h (do_decl_instantiation): Change prototype.
1893         * parse.y: Include decl.h.
1894         (parse_decl_instantiation): New function.
1895         (explicit_instantiation): Use it.
1896         * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
1897         and DECLSPECS.
1898
1899 2002-07-07  Roger Sayle  <roger@eyesopen.com>
1900
1901         * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
1902         constructor and destructor tests when passed a TEMPLATE_DECL.
1903
1904 2002-07-05  Jason Merrill  <jason@redhat.com>
1905
1906         * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
1907         pointers.
1908
1909         PR optimization/7145
1910         * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
1911
1912 2002-07-05  Nathan Sidwell  <nathan@codesourcery.com>
1913
1914         Repair damage on weak-impared targets caused by my previous patch.
1915         * cp-tree.h (import_export_tinfo): Add parameter.
1916         * decl2.c (import_export_tinfo): Add parameter, post adjust
1917         DECL_COMDAT.
1918         * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
1919         import_export_tinfo.
1920
1921 2002-07-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1922
1923         PR c++/6944
1924         * init.c (build_aggr_init): Remove qualifiers of init before calling
1925         build_vec_init.
1926         (build_vec_init): Flatten multi-dimensional array during cleanup.
1927         (build_vec_delete_1): Abort if the type of each element is array.
1928
1929 2002-07-03  Graham Stott  <graham.stott@btinternet.com>
1930
1931         * pt.c (instantiate_class_template): Fix typo.
1932
1933 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1934
1935         * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
1936         by CVS conflict in my last patch.
1937
1938 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1939
1940         PR c++/6716
1941         * pt.c (can_complete_type_without_circularity): New function.
1942         (instantiate_class_template): Use it.
1943         * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
1944         message due to incomplete fields.
1945
1946 2002-07-01  Mark Mitchell  <mark@codesourcery.com>
1947
1948         PR c++/7112
1949         * mangle.c (write_expression): Add mangling for sizeof when
1950         applied to a type.
1951         * operators.def: Remove stale comment.
1952
1953 2002-06-30  Nathan Sidwell  <nathan@codesourcery.com>
1954
1955         * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
1956         (CPTI_TYPE_INFO_PTR_TYPE): ... this.
1957         (tinfo_decl_type): Replace with ...
1958         (type_info_ptr_type): ... this.
1959         (import_export_tinfo): Declare.
1960         (tinfo_decl_p): Rename to ...
1961         (unemitted_tinfo_decl_p): ... this.
1962         * decl2.c (import_export_decl): Break out tinfo handling into ...
1963         (import_export_tinfo): ... here. New function.
1964         (finish_file): Adjust.
1965         * rtti.c (TINFO_REAL_NAME): New macro.
1966         (init_rtti_processing): Create the tinfo types.
1967         (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
1968         (get_tinfo_decl): Adjust.
1969         (get_tinfo_ptr): New function.
1970         (get_type_id): Use it.
1971         (tinfo_base_init): Create vtable decl here, if it doesn't exist.
1972         (ptr_initializer): Use get_tinfo_ptr.
1973         (ptm_initializer): Likewise.
1974         (synthesize_tinfo_var): Break into ...
1975         (get_pseudo_ti_init): ... this. Just create the initializer.
1976         (get_pseudo_ti_desc): .. and this.
1977         (create_real_tinfo_var): Remove.
1978         (create_pseudo_type_info): Don't create the vtable decl here.
1979         (get_vmi_pseudo_type_info): Remove.
1980         (create_tinfo_types): Adjust.
1981         (tinfo_decl_p): Rename to ...
1982         (unemitted_tinfo_decl_p): ... here. Adjust.
1983         (emit_tinfo_decl): Adjust. Create the initializer.
1984
1985 2002-06-27  Mark Mitchell  <mark@codesourcery.com>
1986
1987         PR c++/6695
1988         * pt.c (tsubst_friend_class): Substitute into the context of the
1989         friend before using it.
1990
1991 2002-06-26  Mark Mitchell  <mark@codesourcery.com>
1992
1993         * cp-tree.h (xref_tag): Change prototype.
1994         (handle_class_head): Likewise.
1995         (build_x_component_ref): Likewise.
1996         * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
1997         (xref_tag): Take attributes as a separate parameter.
1998         (xref_tag_from_type): Adjust call to xref_tag.
1999         * decl2.c (build_expr_from_tree): Adjust call to
2000         build_x_component_ref.
2001         (handle_class_head): Take attributes as a separate parameter.
2002         * parse.y (parse_xref_tag): New function.
2003         (parse_handle_class_head): Likewise.
2004         (primary): Use parse_xref_tag.
2005         (class_head_decl): Use parse_handle_class_head.
2006         (class_head_defn): Likewise.
2007         * rtti.c (init_rtti_processing): Adjust call to xref_tag.
2008         (build_dynamic_cast_1): Likewise.
2009         (create_pseudo_type_info): Likewise.
2010         (emit_support_tinfos): Likewise.
2011         * typeck.c (build_object_ref): Adjust call to
2012         build_x_component_ref.
2013         (build_x_component_ref): Remove protect parameter.
2014
2015 2002-06-25  Mark Mitchell  <mark@codesourcery.com>
2016
2017         * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
2018         * class.c (handle_using_decl): Likewise.
2019         (instantiate_type): Likewise.
2020         * cp-tree.h (BASELINK_FUNCTIONS): New macro.
2021         (xref_basetypes): Change prototype.
2022         (begin_mem_initializers): New function.
2023         (get_overloaded_fn): Likewise.
2024         * decl.c (xref_basetypes): Simplify.
2025         * error.c (dump_expr): Use BASELINK_FUNCTIONS.
2026         * init.c (build_offset_ref): Likewise.
2027         * parse.y (base_init): Use begin_mem_initializers().
2028         (structsp): Adjust call to xref_basetypes.
2029         * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
2030         (instantiate_class_template): Adjust call to xref_basetypes.
2031         * semantics.c (begin_mem_initializers): New function.
2032         * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
2033         (really_overlaoded_fn): Likewise.
2034         (get_overloaded_fn): New function.'
2035         (get_first_fn): USe BASELINK_FUNCTIONS.
2036
2037 2002-06-24  Mark Mitchell  <mark@codesourcery.com>
2038
2039         * cp-tree.h (SCALAR_TYPE_P): New macro.
2040         (check_for_out_of_scope_variable): New function.
2041         (at_class_scope_p): Likewise.
2042         (finish_fname): Likewise.
2043         * class.c (finish_struct): Use at_function_scope_p.
2044         * decl.c (check_for_out_of_scope_variable): New function, split
2045         out from do_identifier.
2046         (finish_enum): Use at_function_scope_p.
2047         * lex.c (do_identifier): Use check_for_out_of_scope_variable.
2048         * parse.y (VAR_FUNC_NAME): Give it <ttype>.  Use finish_fname.
2049         (primary): Use at_function_scope_p.
2050         * search.c (at_class_scope_p): New function.
2051         * semantics.c (finish_fname): Likewise.
2052         (check_multiple_declarators): Use at_function_scope_p.
2053
2054 2002-06-23  Mark Mitchell  <mark@codesourcery.com>
2055
2056         * parse.y (parse_scoped_id): New function.
2057         (primary): Use it.
2058         * cp-tree.h (do_scoped_id): Adjust declaration.
2059         * lex.c (do_scoped_id): Remove call to yylex.
2060         * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
2061         * typeck2.c (add_exception_specifier): Use tree_cons, rather than
2062         expanding it inline.
2063
2064 2002-06-23  Matt Thomas  <matt@3am-software.com>
2065
2066         * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
2067         "#if VMS_TARGET".
2068
2069 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2070
2071         * mangle.c (integer_type_codes): Const-ify.
2072
2073 2002-06-20  Richard Henderson  <rth@redhat.com>
2074
2075         PR c++/6747
2076         * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
2077         Call put_var_into_stack.
2078
2079 2002-06-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2080
2081         * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
2082         array size calculation.
2083
2084 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2085
2086         PR c++/6892
2087         * pt.c (tsubst_expr): Handle FILE_STMT.
2088
2089 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2090
2091         PR c++/6723
2092         * pt.c (lookup_template_class): Don't build complete argument of
2093         BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
2094         argument.
2095
2096 2002-06-19  Akim Demaille  <akim@epita.fr>
2097
2098         * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
2099         decl.h's TYPENAME.
2100         * spew.c, lex.c: Adjust.
2101         * parse.y (explicit_instantiation): Add empty action to override
2102         the default $$ = $1 where it introduces a type clash.
2103
2104 2002-06-14  Jason Merrill  <jason@redhat.com>
2105
2106         * semantics.c (begin_for_stmt): Push the 'for' scope before
2107         adding the FOR_STMT.
2108
2109         C++ ABI changes.
2110         * class.c (build_base_field): Set DECL_PACKED.
2111         (layout_class_type): Don't use tail padding of PODs.
2112         * mangle.c (write_unqualified_name): Fix template conversion op
2113         mangling.
2114
2115 2002-06-16  Richard Henderson  <rth@redhat.com>
2116
2117         PR opt/6793
2118         * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
2119         after template instantiation.
2120
2121 2002-06-16  Richard Henderson  <rth@redhat.com>
2122
2123         * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
2124
2125 2002-06-15  Gabriel Dos Reis  <gdr@codesourcery.com>
2126
2127         * cp-tree.h (compiler_error): Remove declaration.
2128         * lex.c (compiler_error): Remove definition.
2129
2130 2002-06-14  Steve Ellcey  <sje@cup.hp.com>
2131
2132         * g++spec.c (LIBUNWIND): New.
2133         (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
2134
2135 2002-06-13  Jessica Han  <jessica@cup.hp.com>
2136
2137         * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
2138         (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
2139         (build_vbase_offset_vtbl_entries): Likewise.
2140         * rtti.c (build_headof): Likewise.
2141         (get_tinfo_decl_dynamic): Likewise.
2142         (create_pseudo_type_info): Likewise.
2143
2144 2002-06-12  Stan Shebs  <shebs@apple.com>
2145
2146         * mpw-config.in: Remove file, no longer used.
2147         * mpw-make.sed: Ditto.
2148
2149 2002-06-07  Zack Weinberg  <zack@codesourcery.com>
2150
2151         * decl2.c: Update call to cpp_handle_option.
2152
2153 2002-06-07  H.J. Lu  (hjl@gnu.org)
2154
2155         * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
2156
2157 2002-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
2158
2159         * error.c (cp_error_at): Fix typo.
2160
2161 2002-06-04  Gabriel Dos Reis  <gdr@codesourcery.com>
2162
2163         * error.c (cp_diagnostic_starter): Adjust call.
2164         (maybe_print_instantiation_context): Change prototype to take a
2165         'diagnostic_info *'.
2166         (print_instantiation_full_context): Likewise.
2167         (print_instantiation_partial_context): Likewise.
2168         (cp_diagnostic_starter): Likewise.
2169         (cp_diagnostic_finalizer): Likewise.
2170         (cp_print_error_function): Likewise.
2171         (cp_printer): Take a secondary parameter as a 'text_info *'.
2172         Remove output_state savings.  Adjust calls.
2173
2174 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
2175
2176         * pt.c (inline_parm_levels): Mark for GC.
2177
2178         * mangle.c (start_mangling): Allocate G.substitutions here...
2179         (init_mangle): ... rather than here.
2180         (finish_mangling): Clear the varray pointer when done with it.
2181         * spew.c (yylexstring): Don't use VARRAY_FREE.
2182         * search.c (bfs_walk): Don't use VARRAY_FREE.
2183         * decl2.c (pending_statics): Use gengtype to mark.
2184         (deferred_fns): Likewise.
2185         (ssdf_decls): Likewise.
2186         (init_decl2): Delete.
2187         * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
2188         (cxx_init_decl_processing): Don't call init_decl2.
2189         (cxx_pop_function_context): Don't use VARRAY_FREE.
2190         * cp-tree.h (struct saved_scope): No need for special marking
2191         of varrays.
2192         (struct language_function): Likewise.
2193         (local_classes): Use gengtype to mark.
2194         (init_decl2): Delete prototype.
2195         * class.c (init_class_processing): Don't use
2196         ggc_add_tree_varray_root.
2197         (build_vtbl_initializer): Don't use VARRAY_FREE.
2198
2199         * decl.c (typename_compare): Don't use same_type_p.
2200
2201         * decl.c: Include hashtab.h instead of hash.h.
2202         (typename_hash): Update to use htab_h.
2203         (typename_compare): Likewise.
2204         (typename_htab): Use gengtype to mark.
2205         (build_typename_type): Update to use htab_h.
2206         * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
2207
2208         * Make-lang.in (gt-cp-tree.h): New rule.
2209         (cp/tree.o): Depend on gt-cp-tree.h.
2210         * config-lang.in (gtfiles): Add cp/tree.c.
2211         * tree.c: Include gt-cp-tree.h.
2212         (list_hash_table): Use gengtype to mark.
2213         (init_tree): Use gengtype to mark trees.
2214
2215         * Make-lang.in (cp/decl.o): Add debug.h dependency.
2216         * call.c (struct z_candidate): Use gengtype.
2217         (USER_CONV_CAND): Use WRAPPER_ZC.
2218         (convert_class_to_reference): Use build_zc_wrapper.
2219         (build_type_conversion_1): Likewise.
2220         (build_over_call): Use WRAPPER_ZC.
2221         (add_warning): Use build_zc_wrapper.
2222         * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
2223         * cp-tree.h (struct lang_identifier): Use gengtype.
2224         (struct template_parm_index_s): Likewise.
2225         (struct ptrmem_cst): Likewise.
2226         (struct tree_binding): Likewise.
2227         (struct tree_overload): Likewise.
2228         (struct tree_srcloc): Likewise.
2229         (struct tree_wrapper): Likewise.  Also modify to have a pointer
2230         to struct z_candidate rather than void.
2231         (enum cp_tree_node_structure_enum): New.
2232         (union lang_tree_node): New.
2233         (cxx_mark_tree): Delete prototype.
2234         (cp_tree_node_structure): New prototype.
2235         (build_ptr_wrapper): Delete prototype.
2236         (build_int_wrapper): Delete prototype.
2237         (build_zc_wrapper): New prototype.
2238         * decl.c: Include debug.h
2239         (cxx_mark_tree): Delete.
2240         (cp_tree_node_structure): New.
2241         * tree.c (build_ptr_wrapper): Delete.
2242         (build_int_wrapper): Delete.
2243         (build_zc_wrapper): New.
2244
2245         * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
2246         Correct typo.  Patch from k_fukui@highway.ne.jp.
2247
2248         * semantics.c (current_stmt_tree): Update for change to
2249         struct language_function.
2250         (finish_mem_initializers): Likewise.
2251         * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
2252         * cp-tree.h (struct language_function): Rename from
2253         cp_language_function.  Change all uses.
2254         (cp_function_chain): Don't need to cast.
2255
2256         * class.c (duplicate_tag_error): Reset discriminator.
2257         (check_bases_and_members): Update for data structure changes.
2258         * cp-tree.h (struct lang_id2): Use gengtype.
2259         (flagged_type_tree): Likewise.
2260         (SET_LANG_ID): Use GGC on struct lang_id2.
2261         (struct cp_language_function): Use gengtype.  Remove field
2262         'x_vcalls_possible_p'.
2263         (current_vcalls_possible_p): Delete.
2264         (struct lang_type_header): New.
2265         (struct lang_type_class): Rename from struct lang_type.  Include
2266         struct lang_type_header.
2267         (struct lang_type_ptrmem): New.
2268         (struct lang_type): New.
2269         (LANG_TYPE_CLASS_CHECK): New.  Use it in all the appropriate macros.
2270         (LANG_TYPE_PTRMEM_CHECK): New.  Use it in all the appropriate macros.
2271         (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
2272         (struct lang_decl_flags): Use gengtype.  Add discriminators.
2273         (struct lang_decl): Use gengtype.  Add and use discriminators.
2274         Update the macros that reference moved fields.
2275         (LANG_DECL_U2_CHECK): New function.  Use it when appropriate.
2276         (SET_DECL_THUNK_P): Set discriminator too.
2277         (clear_inline_text_obstack): Delete prototype.
2278         (finish_inline_definitions): Delete prototype.
2279         (mark_pending_inlines): Delete prototype.
2280         (lang_check_failed): New prototype.
2281         * decl.c (struct named_label_use_list): Use gengtype.
2282         (struct named_label_list): Likewise.
2283         (mark_binding_level): Delete.
2284         (mark_named_label_lists): Delete.
2285         (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
2286         (cxx_init_decl_processing): Use generated marker routine.
2287         (begin_destructor_body): Delete dead set to
2288         current_vcalls_possible_p.
2289         (mark_lang_function): Delete.
2290         (mark_cp_function_context): Delete.
2291         (lang_mark_tree): Use generated marker routines.
2292         * decl2.c (start_objects): Set discriminator when setting
2293         GLOBAL_INIT_PRIORITY.
2294         * lex.c (retrofit_lang_decl): Set discriminators.
2295         (copy_lang_type): Update for changes to lang_type structure.
2296         (cp_make_lang_type): Set discriminator.
2297         * parse.y: Use gengtype on YYLVAL.  Don't use dots in identifiers.
2298         * search.c: Include ggc.h.
2299         * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
2300         (finish_inline_definitions): Delete.
2301         * spew.c (struct token): Use gengtype.
2302         (struct token_chunk): New.
2303         (struct unparsed_text): Use gengtype.  Store tokens in chunks.
2304         (struct feed): Use gengtype.
2305         (feed_obstack): Delete.
2306         (feed): Mark as GC root.
2307         (pending_inlines): Mark as GC root.
2308         (pending_inlines_tail): Likewise.
2309         (processing_these_inlines): Likewise.
2310         (token_obstack): Make static.
2311         (first_token): Likewise.
2312         (init_spew): Don't initialize deleted things; use gengtype for roots.
2313         (clear_inline_text_obstack): Delete.
2314         (feed_input): Use GC for struct feed.  Update for changes to
2315         struct unparsed_text.
2316         (mark_pending_inlines): Delete.
2317         (next_token): Rename from add_token.  Change all callers.  Update
2318         for changes to struct unparsed_text.
2319         (space_for_token): New.
2320         (remove_last_token): New.
2321         (alloc_unparsed_text): New.
2322         (snarf_block): Take an unparsed_text.  Update for changes to struct
2323         unparsed_text.
2324         (snarf_method): Update for changes to struct unparsed_text.
2325         (snarf_defarg): Update for changes to struct unparsed_text.
2326         * tree.c (lang_check_failed): New.
2327
2328         * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
2329         gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
2330         (cp/spew.o): Add dependency on gt-<filename>.h.
2331         (cp/decl2.o): Add dependency on gt-<filename>.h.
2332         (cp/call.o): Add dependency on gt-<filename>.h.
2333         (cp/pt.o): Add dependency on gt-<filename>.h.
2334         (cp/repo.o): Add dependency on gt-<filename>.h.
2335         (cp/parse.o): Add dependency on gt-<filename>.h.
2336         * call.c: Use gengtype for roots.
2337         * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
2338         decl2.c parse.y pt.c repo.c spew.c.
2339         * cp-tree.h: Use gengtype for roots.
2340         (struct saved_scope): Use GGC, gengtype.
2341         (cp_parse_init): Delete prototype.
2342         (init_pt): Delete prototype.
2343         * decl.c: Use gengtype for roots.
2344         (mark_saved_scope): Delete.
2345         (cxx_init_decl_processing): Don't call deleted initilisation
2346         routines.
2347         (signed_size_zero_node): Delete, unused.
2348         * decl.h: Use gengtype for roots.
2349         * decl2.c: Use gengtype for roots.
2350         * lex.h: Use gengtype for roots.
2351         * parse.y: Use gengtype for roots.
2352         (cp_parse_init): Delete.
2353         * pt.c: Use gengtype for roots.
2354         (init_pt): Delete.
2355         * repo.c: Use gengtype for roots.
2356         * spew.c: Use gengtype for roots.
2357
2358         * Make-lang.in: Allow for filename changes.  Add gtype-cp.h.
2359         (cp/decl.o): Add dependency on gtype-cp.h.
2360         * decl.c: Remove use of add_deletable_root, use GTY marker instead.
2361         Include gtype-cp.h.  Allow for filename changes.
2362
2363         * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
2364         (cp/decl.o): Add cp/gt-decl.h dependency.
2365         * config-lang.in (gtfiles): New.
2366         * tree.h: Rename struct binding_level to struct cp_binding_level.
2367         * decl.c: Rename struct binding_level to struct cp_binding_level.
2368         Include cp/gt-decl.h.
2369         (struct cp_binding_level): Use gengtype.
2370         (make_binding_level): Use GGC on struct cp_binding_level.
2371         (mark_binding_level): Use gt_ggc_m_cp_binding_level.
2372         (cxx_init_decl_processing): Mark free_binding_level as
2373         deletable.
2374
2375         * decl.c (mark_cp_function_context): Update calling sequence.
2376
2377         * decl.c (start_function): Don't free 'struct
2378         cp_language_function'.
2379         (pop_cp_function_context): Likewise.
2380         (save_function_data): Allocate it using GC.
2381         * semantics.c (genrtl_start_function): Don't free 'struct
2382         cp_language_function'.
2383
2384 2002-05-31  Matthew Woodcraft  <mattheww@chiark.greenend.org.uk>
2385
2386         * lang-specs.h: Use cpp_debug_options.
2387
2388 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
2389
2390         * mangle.c, tree.c: Include real.h.
2391         * Make-lang.in: Update dependency lists.
2392
2393 2002-05-25  Neil Booth  <neil@daikokuya.demon.co.uk>
2394
2395         * lex.c: Don't include c-lex.h.
2396         * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
2397
2398 2002-05-23  Neil Booth  <neil@daikokuya.demon.co.uk>
2399
2400         * spew.c (yyungetc, snarf_block): Remove indent_level handling.
2401
2402 2002-05-22  Richard Henderson  <rth@redhat.com>
2403
2404         * decl.c (obscure_complex_init): Check for VAR_DECL
2405         before using DECL_THREAD_LOCAL.
2406
2407 2002-05-22  Richard Henderson  <rth@redhat.com>
2408
2409         * decl.c (check_tag_decl): Handle RID_THREAD.
2410         (obscure_complex_init): Reject run-time init of tls.
2411         (grokvardecl, grokdeclarator): Handle RID_THREAD.
2412         * lex.c (reswords): Add __thread.
2413         (rid_to_yy): Map RID_THREAD to SCSPEC.
2414
2415 2002-05-22  Neil Booth  <neil@daikokuya.demon.co.uk>
2416
2417         * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
2418         * cp-tree.h (cxx_post_options): Kill.
2419         * cp-lex.c (cxx_post_options): Kill.
2420
2421 2002-05-21  Richard Henderson  <rth@redhat.com>
2422
2423         * lex.c (rid_to_yy): Add RID_THREAD.
2424
2425 2002-05-21  Alexandre Oliva  <aoliva@redhat.com>
2426
2427         * init.c (build_vec_init): Test for trivial copy-assignment when
2428         copy-assigning arrays.
2429
2430 2002-05-20  Andreas Jaeger  <aj@suse.de>
2431
2432         * init.c (build_default_init): Remove unused variable.
2433
2434 2002-05-20  Alexandre Oliva  <aoliva@redhat.com>
2435
2436         * call.c (any_strictly_viable): New.
2437         (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
2438
2439 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2440
2441         * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
2442
2443 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2444
2445         PR c++/186, DR 259
2446         * pt.c (do_decl_instantiation): Don't complain explicit
2447         instantiation after explicit specialization.
2448         (do_type_instantiation): Likewise.
2449
2450 2002-05-19  Alexandre Oliva  <aoliva@redhat.com>
2451
2452         * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
2453         renamed from...
2454         (complete_type_or_else): ... this.  Redefined as macro.
2455         (cxx_incomplete_type_diagnostic): Declare.
2456         (cxx_incomplete_type_error): Define as macro.
2457         * init.c (build_delete): Warn about incomplete types other than
2458         void, and use the built-in operator delete for them.
2459         * typeck.c (complete_type_or_diagnostic): Renamed from
2460         complete_type_or_else.  Added warn_only argument, passed to...
2461         * typeck2.c (cxx_incomplete_type_diagnostic): ... this.  Print
2462         warnings or errors depending on new warn_only argument.  Renamed
2463         from...
2464         (cxx_incomplete_type_error): ... this.  New implementation in
2465         terms of cxx_incomplete_type_diagnostic.
2466
2467 2002-05-18  Jason Merrill  <jason@redhat.com>
2468
2469         PR c++/6611
2470         * decl2.c (import_export_decl): If we clear
2471         DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
2472
2473 2002-05-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2474
2475         PR c++/6620
2476         * pt.c (verify_class_unification): Don't check if PARM is template
2477         parameter dependent.  Simplify.
2478         (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
2479         parameter dependent expression.
2480
2481 2002-05-14  Jason Merrill  <jason@redhat.com>
2482
2483         * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
2484         Do set DECL_COMDAT.
2485         (synthesize_tinfo_var): Take the public decl.
2486         (create_real_tinfo_var): Likewise.  Check DECL_COMDAT.
2487         (emit_tinfo_decl): Adjust.  Call import_export_decl.
2488         * decl2.c (import_export_decl): Simplify tinfo decl handling.
2489
2490 2002-05-14  Alexandre Oliva  <aoliva@redhat.com>
2491
2492         * cp-tree.h (struct lang_type): Added non_zero_init.
2493         (CLASSTYPE_NON_ZERO_INIT_P): New macro.
2494         (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
2495         * class.c (check_field_decls): Test non_zero_init.
2496         * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
2497         zero-to-NULL conversions.
2498         * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
2499         type that needs zero-initialization without zeros.
2500         (check_initializer_decl): Compute zero-initializer for types
2501         that require a non-trivial one.
2502         * init.c (build_forced_zero_init): New function.
2503         (build_default_init): Use it.
2504         * tree.c (zero_init_p): New function.
2505         * typeck2.c (force_store_init_value): New function.
2506         (process_init_constructor): Create non-trivial zero-initializers
2507         for array members and class fields.
2508
2509 2002-05-14  Neil Booth  <neil@daikokuya.demon.co.uk>
2510
2511         * lang-specs.h: Remove redundant -lang-c++.
2512
2513 2002-05-13  Jason Merrill  <jason@redhat.com>
2514
2515         * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
2516         (fixed_type_or_null): See through reference vars.
2517         (build_base_path): Vtable contents are constant.
2518         * typeck.c (get_member_function_from_ptrfunc): Likewise.
2519
2520 2002-05-12  Jason Merrill  <jason@redhat.com>
2521
2522         * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
2523         structs are safe.
2524
2525 2002-05-09  Neil Booth  <neil@daikokuya.demon.co.uk>
2526
2527         * cp-tree.h (flag_ansi): Remove.
2528         * decl2.c (flag_ansi): Remove.
2529         (cxx_decode_option): Set flag_iso and flag_undef.
2530
2531 2002-05-09  Jason Merrill  <jason@redhat.com>
2532
2533         * typeck.c (get_member_function_from_ptrfunc): Reorganize.
2534         Use subtraction rather than a bitmask to get the index.
2535         * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
2536
2537         * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
2538
2539 2002-05-07  Neil Booth  <neil@daikokuya.demon.co.uk>
2540
2541         * Make-lang.in (decl2.o): Update.
2542         * cp-tree.h (warn_multichar): Remove.
2543         * decl2.c: Include c-common.h.
2544         (warn_multichar): Remove.
2545
2546 2002-05-03  Jason Merrill  <jason@redhat.com>
2547
2548         * tree.c (build_cplus_array_type): Only const and volatile get
2549         special handling.
2550
2551         * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
2552
2553 2002-04-30  Mark Mitchell  <mark@codesourcery.com>
2554
2555         ABI change, returning simple classes from functions.
2556         * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
2557         TYPE_HAS_TRIVIAL_INIT_REF is false or
2558         TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
2559
2560 2002-04-30  Jason Merrill  <jason@redhat.com>
2561
2562         PR debug/6436
2563         * decl.c (grokdeclarator): Don't override TYPE_NAME of an
2564         anonymous class with a typedef if there are attributes.
2565
2566 2002-04-29  Paul Eggert  <eggert@twinsun.com>
2567
2568         * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
2569
2570 2002-04-29  Jakub Jelinek  <jakub@redhat.com>
2571
2572         PR c++/6477
2573         * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
2574         non-NULL first.
2575
2576 2002-04-29  Mark Mitchell  <mark@codesourcery.com>
2577
2578         PR c++/6492
2579         * pt.c (tsubst_friend_class): If the friend has an explicit scope,
2580         enter that scope before name lookup.
2581
2582         PR c++/6486
2583         * method.c (do_build_copy_constructor): Avoid building
2584         cv-qualified reference types.
2585
2586 2002-04-29  Nathan Sidwell  <nathan@codesourcery.com>
2587
2588         PR c++/5719
2589         * decl.c (grok_op_properties): Assignment ops don't have to return
2590         by value. operator% should.
2591
2592 2002-04-28  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
2593
2594         PR c/6343
2595         * decl.c (duplicate_decls): Call merge_weak.
2596
2597 2002-04-26  Richard Henderson  <rth@redhat.com>
2598
2599         * parse.y (malloced_yyss, malloced_yyvs): New.
2600         (yyoverflow): Re-add.  Set them.
2601         (free_parser_stacks): New.
2602
2603 2002-04-26  Mark Mitchell  <mark@codesourcery.com>
2604
2605         PR c++/6497
2606         * method.c (do_build_assign_ref): Pass a derivation to
2607         build_method_call when calling base class assignment operators.
2608
2609 2002-04-26  Richard Henderson  <rth@redhat.com>
2610
2611         * parse.y (yyoverflow): Revert.
2612
2613 2002-04-26  Richard Henderson  <rth@redhat.com>
2614
2615         PR c/3581
2616         * parse.y (string): Remove.  Update all uses to use STRING
2617         instead, and not call combine_strings.
2618         * rtti.c (tinfo_name): Use fix_string_type.
2619         * semantics.c (finish_asm_stmt): Don't call combine_strings.
2620         * spew.c (yylexstring): New.
2621         (read_token): Use it.
2622
2623 2002-04-25  Richard Henderson  <rth@redhat.com>
2624
2625         PR c/2161
2626         * parse.y (yyoverflow): New.
2627
2628 2002-04-25  Jason Merrill  <jason@redhat.com>
2629
2630         PR c++/5607
2631         * search.c (check_final_overrider): No longer static.
2632         * class.c (update_vtable_entry_for_fn): Call it.
2633         * cp-tree.h: Adjust.
2634
2635 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
2636
2637         * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
2638         * cp-tree.h (cxx_set_yydebug): Die.
2639         * lex.c (YYDEBUG): Get from c-lex.h.
2640         (cxx_set_yydebug): Remove.
2641         * parse.y: Include c-lex.h.
2642         (YYDEBUG): Get from c-lex.h.
2643
2644 2002-04-24  Mark Mitchell  <mark@codesourcery.com>
2645
2646         PR c++/6438.
2647         * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
2648         void.
2649
2650 2002-04-24  Neil Booth  <neil@daikokuya.demon.co.uk>
2651
2652         * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
2653         LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
2654         Redefine.
2655         * cp-tree.h (cp_attribute_table): Rename.
2656         * decl.c (lang_attribute_table): Remove declaration.
2657         (cxx_init_decl_processing): Don't set it.
2658         * tree.c (cp_attribute_table): Rename.
2659
2660 2002-04-24  Jason Merrill  <jason@redhat.com>
2661
2662         PR c++/6331
2663         * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
2664         * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
2665         The pedwarn for array assignment is now unconditional.
2666         * tree.c (build_cplus_array_type_1): Still process simple array types
2667         normally in templates.
2668
2669         PR c++/6395
2670         * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
2671         stuff for comdats.
2672
2673 2002-04-23  Jakub Jelinek  <jakub@redhat.com>
2674
2675         * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
2676         node with attributes.
2677
2678 2002-2-23  David O'Brien  <obrien@FreeBSD.org>
2679
2680         * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
2681         Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
2682
2683 2002-04-23  Mark Mitchell  <mark@codesourcery.com>
2684
2685         PR c++/6256:
2686         * pt.c (tsubst_friend_class): Handle templates with explicit
2687         nested names.
2688
2689         PR c++/6331:
2690         * typeck.c (merge_types): Remember the cv-qualification of pointer
2691         types when merging them.
2692
2693 2002-04-20  Neil Booth  <neil@daikokuya.demon.co.uk>
2694
2695         * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
2696         LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
2697         * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
2698         cxx_mark_function_context): New.
2699         * decl.c (push_cp_function_context, pop_cp_function_context,
2700         mark_cp_function_context): Rename for consistency.
2701         (cxx_init_decl_processing): Don't set old hooks.
2702
2703 2002-04-19  Neil Booth  <neil@daikokuya.demon.co.uk>
2704
2705         * call.c (convert_type_from_ellipsis): Rename, update.
2706         * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
2707         * cp-tree.h (convert_type_from_ellipsis): Rename.
2708         * decl.c (cxx_init_decl_processing): Don't set hook.
2709
2710 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
2711
2712         * call.c (build_new_method_call): Update.
2713         * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
2714         * cp-tree.h (cxx_incomplete_type_error): New.
2715         * decl.c (grokdeclarator, grokparms): Update.
2716         * decl2.c (check_classfn): Update.
2717         * pt.c (tsubst): Update.
2718         * typeck.c (complete_type_or_else, expr_sizeof,
2719         decay_conversion): Update.
2720         * typeck2.c (incomplete_type_error): Rename.
2721         (add_exception_specifier): Update.
2722
2723 2002-04-18  Jason Merrill  <jason@redhat.com>
2724
2725         PR c++/5658
2726         * search.c (setup_class_bindings): A class template qualifies as a
2727         type binding.
2728
2729 2002-04-17  Jakub Jelinek  <jakub@redhat.com>
2730
2731         PR c++/6316
2732         * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
2733         before expanding.
2734
2735 2002-04-16  Mark Mitchell  <mark@codesourcery.com>
2736
2737         * init.c (begin_init_stmts): Remove commented out code.
2738         (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
2739         * semantics.c (begin_gobal_stmt_expr): Adjust call to
2740         expand_start_stmt_expr.
2741
2742 2002-04-15  Mark Mitchell  <mark@codesourcery.com>
2743
2744         * decl.c (register_dtor_fn): Pass the address of dso_handle, not
2745         dso_handle itself, to __cxa_atexit.
2746
2747 2002-04-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
2748
2749         * error.c (cxx_print_error_function): Adjust call to macros.
2750
2751 2002-04-14  Jakub Jelinek  <jakub@redhat.com>
2752
2753         * class.c (layout_virtual_bases): Do all dsize computation on trees.
2754
2755 2002-04-14  Jason Merrill  <jason@redhat.com>
2756
2757         * typeck.c (get_member_function_from_ptrfunc): Don't do
2758         gratuitious division and multiplication on
2759         ptrmemfunc_vbit_in_delta targets.
2760
2761 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
2762
2763         PR c++/5373.
2764         * semantics.c (finish_expr_stmt): Remember the type of the
2765         expression before any conversions are performed.
2766
2767 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
2768
2769         PR c++/5189.
2770         * call.c (add_template_candidate_real): Do not treat member
2771         templates as copy constructors.
2772
2773 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
2774
2775         * decl.c (duplicate_decls): Do not copy the RTL for a variable
2776         declaration if the old variable had an incomplete type and the new
2777         variable does not.
2778         (complete_vars): Do not call layout_decl for completed variables.
2779
2780 2002-04-12  Richard Sandiford  <rsandifo@redhat.com>
2781
2782         * decl.c (duplicate_decls): Don't try to unify an implicit typedef
2783         with an explicit one.
2784         (follow_tag_typedef): New.
2785         (lookup_tag): Use it to extract the tag of an explicit typedef.
2786         (xref_tag): Likewise.
2787
2788 2002-04-11  Andrew Haley  <aph@redhat.com>
2789
2790         * typeck.c (type_after_usual_arithmetic_conversions):
2791         If two types have the same variant, return immediately.
2792         When two floating-point operands are the same precision:
2793           convert to float if one of the operands is float;
2794           if neither operand is one of the standard types, return the type
2795           of the first operand.
2796
2797 2002-04-10  Nathan Sidwell  <nathan@codesourcery.com>
2798
2799         PR c++/5507
2800         * decl.c (make_typename_type): Remove implicit typenameness.
2801
2802 2002-04-09  Jason Merrill  <jason@redhat.com>
2803
2804         PR optimization/6189
2805         * semantics.c (genrtl_start_function): Don't free
2806         DECL_SAVED_FUNCTION_DATA for inline functions.
2807
2808         * init.c (build_member_call): For now, don't convert to
2809         intermediate base if it would cause an error.
2810
2811 2002-04-08  Paolo Carlini  <pcarlini@unitus.it>
2812
2813         * parse.y (namespace_qualifier, maybe_identifier,
2814         begin_explicit_instantiation, end_explicit_instantiation,
2815         apparent_template_type, .finish_template_type,
2816         do_id, maybe_init, defarg_again, component_decl_1):
2817         Add ending ';', in accordance with POSIX.
2818
2819 2002-04-06  Mark Mitchell  <mark@codesourcery.com>
2820
2821         PR c++/5571
2822         * class.c (layout_class_type): Remember incomplete static
2823         variables.
2824         (finish_struct_1): Call complete_vars, not
2825         hack_incomplete_structures.
2826         * cp-tree.h (hack_incomplete_structures): Rename to ...
2827         (complete_vars): ... this.
2828         (struct saved_scope): Remove incomplete.
2829         (namespace_scope_incomplete): Remove.
2830         * decl.c (struct binding_level): Remove incomplete.
2831         (incomplete_vars): New variable.
2832         (mark_binding_level): Don't mark incomplete.
2833         (print_binding_level): Don't print it.
2834         (mark_saved_scope): Don't mark incomplete.
2835         (pushdecl): Use maybe_register_incopmlete_var.
2836         (cxx_init_decl_processing): Register incomplete_vars for GC.
2837         (start_decl_1): Clarify error message.
2838         (hack_incomplete_vars): Remove.
2839         (maybe_register_incomplete_var): New function.
2840         (complete_vars): Likewise.
2841
2842 2002-04-06  Jason Merrill  <jason@redhat.com>
2843
2844         PR c++/4934
2845         * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
2846         set before checking it.
2847
2848         PR c++/525
2849         * init.c (build_member_call): Use build_scoped_ref.
2850         (resolve_offset_ref): Likewise.
2851         * call.c (build_scoped_method_call): Likewise.
2852         * tree.c (maybe_dummy_object): Kludge around current_class_type being
2853         wrong.
2854         * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
2855         * cp-tree.h: Adjust.
2856
2857         * init.c (push_base_cleanups): Just use build_scoped_method_call.
2858
2859         PR c++/6179
2860         * method.c (implicitly_declare_fn): Pass unqualified type to
2861         synthesize_exception_spec.
2862
2863 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
2864
2865         * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
2866         * cvt.c: Update comment.
2867         * init.c (expand_cleanup_for_base): Update.
2868         * semantics.c (finish_parenthesized_expr): Update.
2869         * typeck.c (cp_truthvalue_conversion): Update.
2870
2871 2002-04-04  Jason Merrill  <jason@redhat.com>
2872
2873         * semantics.c (finish_eh_cleanup): New fn.
2874         * cp-tree.h: Add prototype.
2875         * init.c (perform_member_init, expand_cleanup_for_base): Use
2876         finish_eh_cleanup.
2877         * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
2878         * cp-tree.h: Remove references.
2879         * decl.c (begin_constructor_body, end_constructor_body): Likewise.
2880         * dump.c (cp_dump_tree): Likewise.
2881         * pt.c (tsubst_expr): Likewise.
2882         * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
2883         (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
2884         * tree.c (cp_statement_code_p): Likewise.
2885
2886         * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
2887
2888         PR c++/5636
2889         * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
2890         cleanup for nrv.
2891
2892         PR c++/5104
2893         * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
2894         specifiers.
2895         [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
2896
2897 2002-04-03  Richard Henderson  <rth@redhat.com>
2898
2899         * cp-lang.c (cxx_warn_unused_global_decl): New.
2900         (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
2901
2902 2002-04-03  Neil Booth  <neil@daikokuya.demon.co.uk>
2903
2904         * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
2905         * tree.c (init_tree): Don't set hook.
2906
2907 2002-04-03  Roger Sayle  <roger@eyesopen.com>
2908
2909         PR c++/5998:
2910         * decl.c (duplicate_decls): Don't mess with assembler names when
2911         redeclaring builtin functions as static.
2912
2913 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
2914
2915         * call.c (build_addr_func): Update.
2916         * class.c (resolve_address_of_overloaded_function): Update.
2917         * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
2918         * cp-tree.h (cxx_mark_addressable): New.
2919         * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
2920         * decl2.c (build_cleanup): Update.
2921         * except.c (build_throw): Update.
2922         * init.c (resolve_offset_ref): Update.
2923         * pt.c (convert_nontype_argument): Update.
2924         * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
2925         * typeck.c (decay_conversion, build_array_ref, build_unary_op,
2926         unary_complex_lvalue): Update.
2927         (mark_addressable): Rename.
2928
2929 2002-04-01  Roger Sayle  <roger@eyesopen.com>
2930
2931         PR c++/5998:
2932         * decl.c (duplicate_decls):  Overwrite the RTL when (and only
2933         when) overwriting a built-in function.  Don't use COPY_DECL_RTL,
2934         but follow the SET_DECL_RTL idiom used elsewhere in the function.
2935
2936 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
2937
2938         * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
2939         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
2940         * decl.c (grokdeclarator): Update.
2941         * mangle.c (write_integer_cst): Update.
2942         * typeck.c (build_binary_op): Update.
2943
2944 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
2945
2946         * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
2947         * lex.c (cxx_init): Don't set hook.
2948
2949 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
2950
2951         * Make-lang.in (error.o): Update.
2952         * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
2953         * cp-tree.h (struct diagnostic_context): Predeclare.
2954         (cxx_print_error_function): New.
2955         * error.c: Include langhooks-def.h.
2956         (lang_print_error_function): Rename.  Update.
2957         (init_error): Don't set hook.
2958
2959 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
2960
2961         * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
2962         Redefine.
2963         * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
2964         * decl.c (finish_enum): Similarly.
2965         * error.c (dump_type): Similarly.
2966         * lex.c (cxx_init): Similarly.
2967         * mangle.c (write_builtin_type): Similarly.
2968         * typeck.c (comptypes): Similarly.
2969
2970 2002-03-28  Roger Sayle  <roger@eyesopen.com>
2971
2972         PR c++/5998:
2973         * decl.c (cxx_init_decl_processing): Re-enable built-in functions
2974         in the g++ front-end.
2975         (duplicate_decl): Allow redefinition of anticipated built-ins.
2976         Fix inlining problem by over-writing the old DECL_RTL.
2977         (lookup_namespace_name): Fail to find an identifier in the
2978         specified namespace if its still anticipated.
2979         (builtin_function_1): New function split out from builtin_function
2980         to create a builtin in the current namespace with given context.
2981         (builtin_function): Call builtin_function_1 to define the
2982         appropriate builtins in both the std and global namespaces.
2983         (select_decl): Don't test for anticipated decls here.
2984         (unqualified_namespace_lookup): Instead ignore them whilst
2985         searching through scopes and namespaces.
2986         * decl2.c (do_nonmember_using_decl): If a using declaration
2987         specifies an anticipated built-in function, mark it as no longer
2988         anticipated in that scope.
2989         (ambiguous_decl):  Avoid resolving to an anticipated decl.
2990         * lex.c (do_scoped_id): Fail to find an identifier in the global
2991         namespace if its still anticipated.
2992
2993 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
2994
2995         * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
2996         * cp-tree.h (cp_make_lang_type): Rename.
2997         * lex.c (cp_make_lang_type): Rename.
2998         (make_aggr_type): Update.
2999         * tree.c (init_tree): Don't set make_lang_type_fn.
3000
3001 2002-03-29  Jakub Jelinek  <jakub@redhat.com>
3002
3003         PR c++/6073
3004         * class.c (finish_struct_1): Update static field's DECL_MODE even
3005         if its type is a variant of t.
3006
3007 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
3008
3009         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
3010         * cp-tree.h (cxx_insert_default_attributes): New.
3011         * decl.c (insert_default_attributes): Rename.
3012
3013 2002-03-27  Mark Mitchell  <mark@codesourcery.com>
3014
3015         PR c++/4884
3016         * call.c (build_op_delete_call): Allow for the fact the placement
3017         may be a COMPOUND_EXPR.
3018
3019 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
3020
3021         * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
3022         * cp-tree.h (init_cplus_expand): Remove.
3023         (cxx_expand_expr): New.
3024         * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
3025         fix prototype.
3026         (init_cplus_expand): Remove.
3027         * lex.c (cxx_init): Don't call init_cplus_expand.
3028
3029 2002-03-26  Mark Mitchell  <mark@codesourcery.com>
3030
3031         PR c++/4884.
3032         * init.c (build_new_1): Allow for the fact the result of
3033         build_function_call may be a COMPOUND_EXPR.
3034
3035 2002-03-26  Nathan Sidwell  <nathan@codesourcery.com>
3036
3037         PR c++/5682
3038         * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
3039         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
3040         (dfs_skip_nonprimary_vbases_markedp): Remove.
3041         * search.c (get_shared_vbase_if_not_primary): Remove.
3042         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
3043         (dfs_skip_nonprimary_vbases_markedp): Remove.
3044         (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
3045         (dfs_marked_real_bases_queue_p): Likewise.
3046
3047 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
3048
3049         * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
3050         * cp-tree.h (cxx_mark_tree): New.
3051         * decl.c (lang_mark_tree): Rename cxx_mark_tree.
3052
3053 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
3054
3055         * cp-tree.h (cxx_maybe_build_cleanup): New.
3056         * decl.c (destroy_local_var, hack_incomplete_structures): Update.
3057         (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
3058         * tree.c (build_target_expr): Update.
3059         * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
3060
3061 2002-03-24  Neil Booth  <neil@daikokuya.demon.co.uk>
3062
3063         * decl2.c (cxx_decode_option): Handle -E.
3064         * lang-specs.h (default_compilers): Preprocess with cc1plus.
3065         * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
3066
3067 2002-03-23  Jakub Jelinek  <jakub@redhat.com>
3068
3069         PR c++/6037
3070         * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
3071
3072 2002-03-23  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
3073
3074         * error.c (dump_type): Be careful about implicit typenames.
3075
3076 2002-03-21  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
3077
3078         PR C++/3656
3079         * semantics.c (finish_base_specifier): Handle erronous base
3080         classes.
3081
3082 2002-03-22  Zack Weinberg  <zack@codesourcery.com>
3083
3084         * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
3085         REAL_IS_NOT_DOUBLE.
3086
3087 2002-03-22  Jeff Knaggs  <jknaggs@redhat.com>
3088
3089         * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
3090         an index into the vtable_entry array regardless of
3091         TARGET_PTRMEMFUNC_VBIT_LOCATION.
3092
3093 2002-03-21  Aldy Hernandez  <aldyh@redhat.com>
3094
3095         * tree.c (cp_cannot_inline_tree_fn): Same.
3096
3097 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
3098
3099         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
3100         insert_block, getdecls, global_bindings_p): New.
3101
3102 2002-03-20  Nathan Sidwell  <nathan@codesourcery.com>
3103
3104         PR c++/4361
3105         * mangle.c (struct globals) Add internal_mangling_p member.
3106         (write_template_param): Do internal mangling, if needed.
3107         (mangle_conv_op_name_for_type): Request internal mangling.
3108
3109 2002-03-20  Jason Merrill  <jason@redhat.com>
3110
3111         PR c++/2136
3112         * init.c (build_delete): Check access for a member op delete here.
3113         * decl2.c (delete_sanity): Not here.
3114
3115 2002-03-19  Jason Merrill  <jason@redhat.com>
3116
3117         PR c++/5118
3118         * class.c (get_vfield_name): Use the constructor_name.
3119
3120 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
3121
3122         * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
3123         * cp-tree.h (lang_printable_name): Rename.
3124         * error.c (lang_decl_name): Use new hook.
3125         * lex.c (cxx_init): Remove old hook.
3126         * pt.c (tsubst_decl): Use new hook.
3127         * tree.c (lang_printable_name): Rename.
3128
3129 2002-03-18  Eric Botcazou  <ebotcazou@multimania.com>
3130
3131         PR c++/3882
3132         * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
3133         (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
3134         only after recording the declaration.
3135
3136 2002-03-18  Jason Merrill  <jason@redhat.com>
3137
3138         PR c++/2039
3139         * init.c (resolve_offset_ref): Hand off to build_component_ref.
3140
3141         PR c++/4222, c++/5995
3142         * call.c (build_over_call): Fix empty class logic.
3143
3144         PR c++/3870
3145         * cp-tree.h (struct saved_scope): Add last_parms field.
3146         * decl.c (maybe_push_to_top_level): Save last_function_parms.
3147         (pop_from_top_level): Restore it.
3148
3149         PR c++/4377
3150         * mangle.c (write_expression): Strip NOP_EXPRs sooner.  Also strip
3151         NON_LVALUE_EXPRs.
3152
3153         PR c++/4003
3154         * pt.c (tsubst_friend_function): Use decl_namespace_context.
3155
3156         PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
3157         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
3158         type with a nontrivial destructor.
3159
3160 2002-03-17  Jason Merrill  <jason@redhat.com>
3161
3162         PR c++/4460
3163         * class.c (build_base_path): Virtual base layout is fixed in
3164         in-charge [cd]tors.
3165
3166 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
3167
3168         * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
3169         * parse.y (yyparse): Remove macro.
3170
3171 2002-03-17  Jason Merrill  <jason@redhat.com>
3172
3173         PR c++/5757
3174         * init.c (build_new_1): Pass the right pointer to op delete.
3175
3176 2002-03-16  Nathan Sidwell  <nathan@codesourcery.com>
3177
3178         PR c++/4361
3179         * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
3180         conversion operators go.
3181         (struct lang_decl_flags): Add template_conv_p and unused
3182         bitfields.
3183         (DECL_TEMPLATE_CONV_FN_P): New macro.
3184         * call.c (build_user_type_conversion_1): Don't check second type
3185         conversion of overload set first.
3186         * class.c (add_method): Make sure templated conversion operators
3187         all end up on slot 2.
3188         * lex.c (do_identifier): A conversion operator token might be
3189         satisfied by a templated conversion operator.
3190         * pt.c (check_explicit_specialization): Use
3191         CLASSTYPE_FIRST_CONVERSION_SLOT.
3192         (template_parm_this_level_p): New function.
3193         (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
3194         * search.c (lookup_fnfields_1): Template conversions will be on
3195         the first slot.
3196         * typeck.c (build_component_ref): Preserve the type of an
3197         conversion operator name on the overload type.
3198         (build_x_function_call): Retrieve the conversion operator name.
3199
3200 2002-03-15  Richard Henderson  <rth@redhat.com>
3201
3202         * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
3203
3204 2002-03-15  Mark Mitchell  <mark@codesourcery.com>
3205
3206         * cp-tree.h (CLEANUP_DECL): Remove.
3207         (CLEANUP_EXPR): Likewise.
3208         * decl.c (destroy_local_var): Simplify.
3209         (maybe_build_cleanup): Tidy.
3210         * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
3211         * semantics.c (cp_expand_stmt): Likewise.
3212         * cp/tree.c (cp_statement_code_p): Likewise.
3213
3214 2002-03-15  Jason Merrill  <jason@redhat.com>
3215
3216         PR c++/5857
3217         * decl.c (duplicate_decls): Use merge_types instead of common_type.
3218         * typeck.c (common_type): Just hand off to
3219         type_after_usual_arithmetic_conversions and
3220         composite_pointer_type.
3221         (merge_types): New fn.
3222         (commonparms): Use it instead of common_type.
3223         (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
3224         (composite_pointer_type): Also handle attributes.
3225         * cp-tree.h: Declare merge_types.
3226
3227         * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
3228         variables.
3229         * decl2.c (maybe_make_one_only): Also mark the decl as needed.
3230
3231 2002-03-14  Richard Henderson  <rth@redhat.com>
3232
3233         * decl.c: Include c-pragma.h.
3234         (start_decl, start_function): Invoke maybe_apply_pragma_weak.
3235         * Make-lang.in: Update dependencies.
3236
3237 2002-03-14  Jakub Jelinek  <jakub@redhat.com>
3238
3239         PR c++/5908
3240         * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
3241         * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
3242
3243 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
3244
3245         * mangle.c (write_builtin_type): Handle 128-bit integers even if
3246         they are not a standard integer type.
3247
3248 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
3249
3250         * cp-tree.h (init_init_processing): Remove declaration.
3251         * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
3252         * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
3253
3254 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3255
3256         * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
3257         Define.
3258         * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
3259         tree_code_length.
3260         * lex.c (cplus_tree_code_type, cplus_tree_code_length,
3261         cplus_tree_code_name): Delete.
3262         (cxx_init): Don't call add_c_tree_codes, instead set
3263         lang_unsafe_for_reeval.  Don't try to copy into the various
3264         tree_code arrays.
3265
3266 2002-03-12  Nathan Sidwell  <nathan@codesourcery.com>
3267
3268         PR c++/5659
3269         * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
3270         * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
3271         definitions.
3272
3273 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
3274
3275         Revert 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>,
3276         DR209 is now not a defect.
3277         * cp-tree.h (skip_type_access_control): Remove.
3278         * decl.c (grokdeclarator): Do type access control for friend
3279         declarations.
3280         * semantics.c (decl_type_access_control): Don't reset
3281         current_type_lookups.
3282         (save_type_access_control): Always save the lookups.
3283         (skip_type_access_control): Remove.
3284         (finish_class_definition): Don't change type_lookups.
3285
3286 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
3287
3288         Revert 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>,
3289         It is incorrect.
3290         * typeck.c (build_static_cast): Compare non-qualified types
3291         with pointer to member conversions.
3292
3293 2002-03-11  Dan Nicolaescu  <dann@ics.uci.edu>
3294             Daniel Berlin  <dan@dberlin.org>
3295
3296         * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
3297         (cxx_get_alias_set): Use it.
3298
3299 2002-03-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3300
3301         * cp-tree.h (stabilize_expr): Prototype.
3302
3303 2002-03-08  Craig Rodrigues  <rodrigc@gcc.gnu.org>
3304
3305         * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
3306         conditional return void.
3307
3308 2002-03-08  Neil Booth  <neil@daikokuya.demon.co.uk>
3309
3310         * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
3311         * cp-tree.h (cxx_unsave): New.
3312         * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
3313         (init_tree): Update.
3314
3315 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3316
3317         * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
3318         explicit sizeof/sizeof.
3319         * decl2.c (cxx_decode_option): Likewise.
3320         * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
3321
3322 2002-03-02  Nathan Sidwell  <nathan@codesourcery.com>
3323
3324         PR c++/775
3325         * decl.c (lookup_tag): Only reject enum/class mismatch, not
3326         class/union mismatch.
3327         * parse.y (check_class_key): New function.
3328         (structsp): Call it.
3329
3330 2002-03-01  Michael Matz  <matz@suse.de>
3331
3332         * typeck.c (cp_pointer_int_sum): Complete inner type which is
3333         used later by size_in_bytes().
3334
3335 2002-03-01  Phil Edwards  <pme@gcc.gnu.org>
3336
3337         * cp-tree.h:  Require __GNUC__ to be #defined.
3338         (build_init):  Add missing prototype.
3339
3340 2002-03-01  Jason Merrill  <jason@redhat.com>
3341
3342         * except.c: Don't include decl.h or obstack.h.  Do include
3343         tree-inline.h.
3344         (build_throw): Destroy temporaries from the thrown
3345         expression before calling __cxa_throw.  Construct a thrown
3346         temporary directly into the exception object.
3347         (stabilize_throw_expr): New function.
3348         (wrap_cleanups_r): New function.
3349         * tree.c (stabilize_expr): New function.
3350         * init.c (build_init): New function.
3351         * Make-lang.in (cp/except.o): Adjust .h deps.
3352
3353 2002-02-28  Jason Merrill  <jason@redhat.com>
3354
3355         * search.c (lookup_base_r): Don't clear is_non_public just because
3356         we found a friendly scope.
3357
3358         * decl.c (finish_function): Only warn about missing return
3359         statement with -Wreturn-type.
3360
3361 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
3362
3363         * class.c (build_clone): Update.
3364         * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
3365         * cp-tree.h (cxx_dup_lang_specific_decl): New.
3366         * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
3367         (copy_decl): Update.
3368         * method.c (make_thunk): Update.
3369
3370 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
3371
3372         * decl2.c: Delete traditional-mode-related code copied from
3373         the C front end but not used, or used only to permit the
3374         compiler to link.
3375
3376 2002-02-24 Craig Rodrigues  <rodrigc@gcc.gnu.org>
3377
3378         PR c++/4093
3379         * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
3380         to void.
3381
3382 2002-02-22  Jakub Jelinek  <jakub@redhat.com>
3383
3384         PR other/5746
3385         * semantics.c (finish_switch_cond): Don't call get_unwidened
3386         if error_mark_node.
3387
3388 2002-02-22  Nathan Sidwell  <nathan@codesourcery.com>
3389
3390         PR c++/2645, DR 295
3391         * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
3392         tf_keep_type_decl.
3393         (make_typename_type): Use tsubst_flags_t.
3394         * decl.c (make_typename_type): Adjust. Return non-artificial
3395         TYPE_DECLs, if required.
3396         (grokdeclarator): Simplify CVR qualification handling. Allow bad
3397         qualifiers on typedef types.
3398         * decl2.c (handle_class_head): Adjust make_typename_type call.
3399         * parse.y (nested_name_specifier): Likewise.
3400         (typename_sub0): Likewise.
3401         (typename_sub1): Likewise.
3402         * pt.c (convert_template_argument): Adjust make_typename_type
3403         return value.
3404         (tsubst): Adjust cp_build_qualified_type_real calls.
3405         (check_cv_quals_for_unify): Cope with allowing bad qualifications
3406         on template type parms.
3407         (instantiate_decl): Recheck substitutions to give warnings on bad
3408         qualifications.
3409         * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
3410
3411 2002-02-21  Aldy Hernandez  <aldyh@redhat.com>
3412
3413         * cp/decl.c (duplicate_decls): Merge always_inline attribute.
3414
3415         * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
3416         unless DECL_ALWAYS_INLINE.
3417
3418 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
3419
3420         * typeck.c (cp_pointer_int_sum): Renamed from
3421         pointer_int_sum, call pointer_int_sum.
3422
3423 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
3424
3425         * decl.c (duplicate_decls): Return 0 if issued error about
3426         redeclaration.
3427
3428 2002-02-19  Jason Merrill  <jason@redhat.com>
3429
3430         ABI change: Mangle `void (A::*)() const' as
3431         M1AKFvvE, not MK1AFvvE.
3432         * mangle.c (write_function_type): Write cv-quals for member
3433         function type here.
3434         (write_pointer_to_member_type): Not here.
3435
3436 2002-02-18  Jason Merrill  <jason@redhat.com>
3437
3438         * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
3439         (do_decl_instantiation): Likewise.
3440
3441 2002-02-17  Craig Rodrigues  <rodrigc@gcc.gnu.org>
3442
3443         PR c++/5685
3444         * decl.c (duplicate_decls): Make warning unconditional
3445         if duplicate default argument declarations are present.
3446
3447 2002-02-17  Jakub Jelinek  <jakub@redhat.com>
3448
3449         * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
3450         shortening.
3451
3452 2002-02-15  Nathan Sidwell  <nathan@codesourcery.com>
3453
3454         * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
3455         remove incorrect comment. Move #if 0'd code to common path. Use
3456         IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
3457
3458 2002-02-13  Jason Merrill  <jason@redhat.com>
3459
3460         * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
3461         (finish_function): Don't warn if current_function_returns_null.
3462
3463         * typeck2.c (digest_init): Do handle values of vector type.
3464
3465         * typeck2.c (digest_init, process_init_constructor): Treat vectors
3466         like arrays.
3467
3468 2002-02-11  Jason Merrill  <jason@redhat.com>
3469
3470         * parse.y (reserved_declspecs): Don't handle attributes.
3471         (reserved_typespecquals): Handle them here.
3472         * Make-lang.in (parse.c): Adjust expected conflicts.
3473
3474 2002-02-08  Jakub Jelinek  <jakub@redhat.com>
3475
3476         * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
3477         instead of compstmt.
3478         (compstmt_or_stmtexpr): Renamed from compstmt.
3479         (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
3480
3481 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
3482
3483         Rename instantiate_type_flags to tsubst_flags_t & expand use.
3484         * cp-tree.h (instantiate_type_flags): Rename to ...
3485         (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
3486         add tf_warning flag.
3487         (instantiate_type): Adjust prototype.
3488         (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
3489         do_type_instantiation, cp_build_qualified_type_real): Likewise.
3490         cp_build_qualified_type: Adjust.
3491         * class.c (instantiate_type): Adjust parameter. Rename itf_* to
3492         tf_*.
3493         * call.c (standard_conversion): Rename itf_* to tf_*.
3494         (reference_binding): Likewise.
3495         (convert_like_real): Likewise.
3496         * cvt.c (cp_convert_to_pointer): Likewise.
3497         (convert_to_reference): Likewise.
3498         * decl.c (lookup_namespace_name): Use tf_* flags.
3499         (make_typename_type): Likewise.
3500         (grokdeclarator): Likewise.
3501         * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
3502         (coerce_template_template_parms, convert_template_argument,
3503         coerce_template_parms, maybe_get_template_decl_from_type_decl,
3504         lookup_template_class, tsubst_friend_function, tsubst_friend_class,
3505         instantiate_class_template, tsubst_template_arg_vector,
3506         tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
3507         tsubst_decl, tsubst_arg_types, tsubst_function_type,
3508         tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
3509         instantiate_template, fn_type_unification,
3510         resolve_overloaded_unification, verify_class_unification,
3511         unify, get_bindings_real, do_type_instantiation,
3512         regenerate_decl_from_template, instantiate_decl,
3513         tsubst_initializer_list, tsubst_enum,
3514         get_mostly_instantiated_function_type,
3515         invalid_nontype_parm_type_p): Likewise.
3516         * tree.c (cp_build_qualified_type_real): Likewise.
3517         * typeck.c (build_binary_op): Rename itf_* to tf_*.
3518         (build_ptrmemfunc): Likewise.
3519         (convert_for_assignment): Likewise.
3520
3521 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
3522
3523         PR c++/109
3524         * decl.c (grokdeclarator): Allow friend declarations from
3525         dependent types.
3526         * decl2.c (handle_class_head): Don't push into template parm contexts.
3527         * pt.c (push_template_decl_real): Template parm contexts are never
3528         being defined.
3529
3530 2002-02-05  Alexandre Oliva  <aoliva@redhat.com>
3531
3532         * class.c: Include target.h.
3533         (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
3534         BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
3535         bit-field layout.
3536         * Make-lang.in: Adjust deps.
3537
3538 2002-02-05  Jason Merrill  <jason@redhat.com>
3539
3540         * error.c (dump_type): Be more helpful about VECTOR_TYPE.
3541
3542 2002-02-04  Jakub Jelinek  <jakub@redhat.com>
3543
3544         * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
3545         (finish_switch_cond): Set SWITCH_TYPE.
3546
3547 2002-02-04  Richard Henderson  <rth@redhat.com>
3548
3549         * method.c (use_thunk): Always initialize the block tree.  Reindent.
3550         * semantics.c (expand_body): Emit thunks after function, not before.
3551
3552 2002-02-04  Jason Merrill  <jason@redhat.com>
3553
3554         * decl.c (start_function): Call cplus_decl_attributes immediately
3555         after grokdeclarator.
3556
3557         * decl.c (start_function): Combine DECL_RESULT handling code.
3558
3559 2002-02-03  Jason Merrill  <jason@redhat.com>
3560
3561         * xref.c: Remove.
3562         * Make-lang.in (CXX_OBJS): Remove cp/xref.o
3563         (cp/xref.o): Remove dependencies.
3564         * class.c (finish_struct_1, check_methods): Don't call xref fns.
3565         (finish_struct_1): Likewise.
3566         * friend.c (make_friend_class): Likewise.
3567         * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
3568         * spew.c (read_process_identifier): Likewise.
3569
3570 2002-02-01  Jason Merrill  <jason@redhat.com>
3571
3572         PR c++/4872
3573         * decl.c (finish_function): Warn about a non-void function with
3574         no return statement and no abnormal exit.
3575         * cp-tree.h (struct cp_language_function): Add returns_abnormally.
3576         (current_function_returns_abnormally): New macro.
3577         * call.c (build_call): Set it.
3578
3579         * typeck.c (build_component_ref): Always complain about offsetof
3580         constructs on non-PODs.  Only make it an error for members of
3581         virtual bases.
3582
3583         * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
3584         (dump_function_decl): Always dump parms.
3585
3586         * decl2.c (finish_static_data_member_decl): Complain about a local
3587         class with a static data member.
3588
3589         PR c++/4286
3590         * search.c (lookup_field_1): Don't xref a static data member
3591         just because we looked it up.
3592
3593 2002-01-31  Jason Merrill  <jason@redhat.com>
3594
3595         * Make-lang.in (parse.c): Handle .output file.
3596
3597         PR c++/3395
3598         * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
3599         not TREE_TYPE.
3600         * semantics.c (finish_class_definition): Adjust.
3601
3602         Allow attributes in parms and casts.
3603         * parse.y (named_parm): Don't strip attrs.
3604         (declmods): Remove 'attributes' production.
3605         (nonempty_cv_qualifiers): Accept attributes.
3606         (ATTRIBUTE): Give precedence.
3607         * decl.c (groktypename): Handle attributes.
3608         (grokparms): Likewise.
3609
3610 2002-01-29  Jakub Jelinek  <jakub@redhat.com>
3611
3612         * decl2.c (cxx_decode_option): Pass 0 as last argument to
3613         cpp_handle_option.
3614         * lang-specs.h: Use cpp_unique_options instead of cpp_options
3615         when used together with cc1_options.
3616
3617 2002-01-29  Nathan Sidwell  <nathan@codesourcery.com>
3618
3619         PR c++/5132
3620         * typeck2.c (digest_init): Make sure non-array core type is
3621         instantiated.
3622         * decl2.c (reparse_absdcl_as_casts): Just store the type in the
3623         constructor, rather than build a new one.
3624         (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
3625         PURPOSE of constructor elts.
3626
3627 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
3628
3629         * Make-lang.in (parse.c): Adjust expected number of
3630         shift-reduce conflicts.
3631         (decl.o): Depend on diagnostic.h.
3632         * decl.c: Include diagnostic.h.
3633         (grokdeclarator): Check for null pointer.
3634         (finish_function): Don't abort when
3635         current_binding_level->parm_flag != 1, if errors have
3636         occurred; throw away the statement tree and extra binding
3637         levels, and continue.
3638         * lex.c (note_list_got_semicolon): Check for null pointer.
3639         * method.c (hack_identifier): Just return error_mark_node if
3640         value is error_mark_node.
3641         * parse.y (primary: TYPEID(type_id)): No need to use
3642         TYPE_MAIN_VARIANT here.
3643         (handler_seq): Accept an empty list of catch clauses and
3644         generate a fake handler block to avoid later crashes.
3645         (ansi_raise_identifier): Accept the error token too.
3646         * semantics.c (begin_class_definition,
3647         finish_class_definition): Check for error_mark_node.
3648
3649 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
3650
3651         * typeck2.c (friendly_abort): Delete definition.
3652         * cp-tree.h (friendly_abort): Don't prototype.
3653         (my_friendly_assert): Use fancy_abort.
3654
3655 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
3656
3657         * cp-tree.h (my_friendly_abort): Remove.
3658
3659 2002-01-23  Jakub Jelinek  <jakub@redhat.com>
3660
3661         * spew.c (pending_inlines, pending_inlines_tail,
3662         processing_these_inlines): Make static.
3663         (mark_pending_inlines): Remove static.
3664         (begin_parsing_inclass_inline): If in function, save pi
3665         for GC to cp_function_chain->unparsed_inlines instead.
3666         (process_next_inline): Likewise.
3667         * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
3668         (mark_pending_inlines): Add prototype.
3669         * decl.c (spew_debug): Remove unused extern.
3670         (mark_lang_function): Call mark_pending_inlines.
3671
3672 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
3673
3674         * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
3675         init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
3676         semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
3677         Change my_fancy_abort() to abort().
3678
3679 2002-01-23  Jason Merrill  <jason@redhat.com>
3680
3681         PR c++/5453
3682         * class.c (fixed_type_or_null): Fix thinko.
3683
3684         PR c++/3331
3685         * init.c (resolve_offset_ref): Use build_indirect_ref.
3686
3687         * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
3688
3689 2002-01-22  Jason Merrill  <jason@redhat.com>
3690
3691         * parse.y (function_body): Suppress the block for the outermost
3692         curly braces.
3693         * decl.c (pushdecl): Don't try to skip it.
3694         (begin_function_body): Keep the block we create, not the next one.
3695         * init.c (emit_base_init): Don't mess with keep_next_level.
3696
3697         * class.c (build_base_path): Tweak formatting.
3698
3699 2002-01-19  Nathan Sidwell  <nathan@codesourcery.com>
3700
3701         Fix regression introduced with patch for c++/775
3702         * parse.y (class_head_defn): Check for template specializations
3703         with a different class-key.
3704
3705 2002-01-17  Jason Merrill  <jason@redhat.com>
3706
3707         * decl.c (begin_constructor_body, begin_destructor_body): New fns.
3708         (begin_function_body): Call them and keep_next_level.
3709         * init.c (emit_base_init): Call keep_next_level.
3710         * semantics.c (setup_vtbl_ptr): Lose.
3711         * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
3712         (vtbls_set_up_p): Lose.
3713         * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
3714         * method.c (do_build_copy_constructor): Likewise.
3715         (synthesize_method): Call finish_mem_initializers.
3716         * parse.y (nodecls): Likewise.
3717
3718         * error.c (dump_type_suffix): Print the exception specs before
3719         recursing.
3720         (dump_function_decl): Here, too.
3721
3722         * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
3723
3724 2002-01-10  Ira Ruben   <ira@apple.com>
3725
3726         PR c++/907
3727         * decl.c (start_method): Handle attrlist.
3728
3729 2002-01-10  Jakub Jelinek  <jakub@redhat.com>
3730
3731         * decl2.c (max_tinst_depth): Increase default limit to 500.
3732
3733 2002-01-10  Graham Stott  <grahams@redhat.com>
3734
3735         * spew.c (YYCHAR): Uppercase macro parameter and add
3736         parenthesis.
3737         (YYCODE): Likewise.
3738         (NAME): Uppercase macro parameter.
3739
3740 2002-01-09  Graham Stott  <grahams@redhat.com>
3741
3742         * decl.h (grokdeclarator): Wrap long line.
3743
3744         * semantics.c (FINISH_COND): Uppercase macro paramaters and
3745         add parenthesis.
3746
3747 2002-01-08  Graham Stott  <grahams@redhat.com>
3748
3749         * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
3750         (PALLOC): Uppercase macro parameter and whitespace.
3751         (SALLOC): Uppercase macro parameter.
3752         (SFREE): Uppercase macros parameter, add parenthese and
3753         whitespace.
3754         (STREQL): Uppercase macro parameter and whitespace.
3755         (STRNEQ): Likewise.
3756         (STRLSS): Likewise.
3757         (STRLEQ): Likewise.
3758         (STRGTR): Likewise.
3759         (STRGEQ): Likewise.
3760
3761         * call.c (convert_like): Add parenthesis and wrap.
3762         (convert_like_with_context): Likewise.
3763         (ICS_RANK): Whitespace.
3764         (NEED_TEMPORARY_P): Remove parenthesis.
3765
3766         * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
3767         whitespace.
3768         (VTT_MARKED_BINFO_P): Likewise.
3769
3770         * decl.c (BINDING_LEVEL): Add parenthesis.
3771         (DEF_OPERATOR): Likewise.
3772
3773         * mangle.c (MANGLE_TRACE): Add parenthesis.
3774         (MANGLE_TRACE_TREE): Likewise.
3775         (write_signed_number): Likewise.
3776         (write_unsigned_number): Likewise.
3777
3778         * pt.c (ccat): Uppercase macro parameter.
3779         (cat): Likewise
3780
3781         * search.c (SET_BINFO_ACCESS): Add parenthesis.
3782
3783 2002-01-07  Jason Merrill  <jason@redhat.com>
3784
3785         * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
3786         to pedwarn.
3787
3788         PR c++/3536
3789         * method.c (make_thunk): If !flag_weak, give the thunk the
3790         function's linkage.
3791         (use_thunk): Here, too.
3792
3793 2002-01-07  Graham Stott  <grahams@redhat.com>
3794
3795         * error.c: Update copyright date.
3796         (print_scope_operator): Add parenthesis.
3797         (print_left_paren): Likewise.
3798         (print_right_paren): Likewise.
3799         (print_left_bracket): Likewise.
3800         (print_right_bracket): Likewise.
3801         (print_template_argument_list_start): Likewise.
3802         (print_template_argument_list_end): Likewise.
3803         (print_non_consecutive_character): Likewise.
3804         (print_tree_identifier): Likewise.
3805         (print_identifier): Likewise.
3806         (NEXT_CODE): Uppercase macro parameter.
3807         (ident_fndecl): Delete unused.
3808         (GLOBAL_THING): Likewise.
3809
3810 2002-01-06  Graham Stott  <grahams@redhat.com>
3811
3812         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
3813         (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
3814         (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
3815         (RECORD_OR_UNION_TYPE_CHECK): Likewise.
3816         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
3817         (C_IS_RESERVED_WORD): Uppercase macro parameter.
3818         (C_RID_YYCODE) Likewise.
3819         (ptrmem_cst): Use rtx.
3820         (LOCAL_BINDING_P): Add whitespace.
3821         (INHERITED_VALUE_BINDING_P): Likewise.
3822         (BINDING_SCOPE): Wrap long line.
3823         (BINDING_HAS_LEVEL_P): Remove parenthesis.
3824         (BINDING_VALUE): Wrap long line.
3825         (BINDING_TYPE): Whitespace.
3826         (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
3827         (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
3828         (IDENTIFIER_NAMESPACE_VALUE): Likewise.
3829         (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
3830         (same_type_p): Uppercase macro parameters.
3831         (same_type_ignoring_top_level_qualifiers_p): Likewise.
3832         (OVL_FUNCTION): Wrap long line.
3833         (OVL_CHAIN): Whitespace.
3834         (OVL_CURRENT): Add parenthesis and whitespace.
3835         (OVL_NEXT): Whitespace.
3836         (OVL_USED): Likewise.
3837         (IDENTIFIER_TYPE_VALUE): Likewise.
3838         (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
3839         (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
3840         (LANG_ID_FIELD): Whitespace.
3841         (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
3842         (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
3843         (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
3844         (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
3845         (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
3846         (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
3847         (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
3848         (IDENTIFIER_VIRTUAL_P): Likewise.
3849         (IDENTIFIER_OPNAME_P): Likewise.
3850         (IDENTIFIER_TYPENAME_P): Remove parenthesis.
3851         (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
3852         (C_SET_EXP_ORIGINAL_CODE): Likewise.
3853         (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
3854         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
3855         (IS_AGGR_TYPE): Uppercase macro parameter.
3856         (CLASS_TYPE_P): Likewise.
3857         (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
3858         (IS_AGGR_TYPE_2): Whitespace.
3859         (TAGGED_TYPE_P): Uppercase macro parameter.
3860         (TYPE_BUILT_IN): Whitespace.
3861         (TYPE_FOR_JAVA): Likewise.
3862         (FUNCTION_ARG_CHAIN): Remove parenthesis.
3863         (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
3864         (FUNCTION_FIRST_USER_PARAM): Likewise.
3865         (PROMOTES_TO_AGGR_TYPE): Whitespace.
3866         (DERIVED_FROM_P): Add parenthesis and wrap.
3867         (UNIQUELY_DERIVED_FROM_P): Likewise.
3868         (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
3869         (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
3870         (CLASSTYPE_USE_TEMPLATE): Whitespace.
3871         (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
3872         (TYPE_GETS_DELETE): Add parenthesis.
3873         (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
3874         (TYPE_HAS_ASSIGN_REF): Likewise,
3875         (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
3876         (TYPE_HAS_INIT_REF): Likewise.
3877         (TYPE_HAS_CONST_INIT_REF): Likewise.
3878         (TYPE_BEING_DEFINED): Likewise.
3879         (TYPE_LANG_SPECIFIC): Likewise.
3880         (CLASSTYPE_RTTI): Likewise.
3881         (TYPE_OVERLOADS_CALL_EXPR): Likewise.
3882         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
3883         (TYPE_OVERLOADS_ARROW): Likewise.
3884         (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
3885         (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
3886         (CLASSTYPE_METHOD_VEC): Likewise.
3887         (CLASSTYPE_MARKED_N): Likewise.
3888         (CLASSTYPE_MARKED): Likewise.
3889         (CLASSTYPE_MARKED2): Likewise.
3890         (CLASSTYPE_MARKED3): Likewise.
3891         (CLASSTYPE_MARKED4): Likewise.
3892         (CLASSTYPE_MARKED5): Likewise.
3893         (CLASSTYPE_MARKED6): Likewise.
3894         (SET_CLASSTYPE_MARKED): Whitespace.
3895         (CLEAR_CLASSTYPE_MARKED): Likewise.
3896         (SET_CLASSTYPE_MARKED2): Likewise.
3897         (CLEAR_CLASSTYPE_MARKED2): Likewise.
3898         (SET_CLASSTYPE_MARKED3): Likewise.
3899         (CLEAR_CLASSTYPE_MARKED3): Likewise.
3900         (SET_CLASSTYPE_MARKED4): Likewise.
3901         (CLEAR_CLASSTYPE_MARKED4): Likewise.
3902         (SET_CLASSTYPE_MARKED5): Likewise.
3903         (CLEAR_CLASSTYPE_MARKED5): Likewise.
3904         (SET_CLASSTYPE_MARKED6): Likewise.
3905         (CLEAR_CLASSTYPE_MARKED6): Likewise.
3906         (CLASSTYPE_TAGS): Likewise.
3907         (CLASSTYPE_VSIZE): Likewise.
3908         (CLASSTYPE_VBASECLASSES): Likewise.
3909         (CANONICAL_BINFO): Add parenthesis.
3910         (CLASSTYPE_SIZE(NODE): Likewise.
3911         (CLASSTYPE_SIZE_UNIT): Likewise.
3912         (CLASSTYPE_ALIGN(NODE): Likewise.
3913         (CLASSTYPE_USER_ALIGN): Likewise.
3914         (TYPE_JAVA_INTERFACE): Likewise.
3915         (CLASSTYPE_PURE_VIRTUALS): Likewise.
3916         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
3917         (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
3918         (CLASSTYPE_HAS_MUTABLE): Likewise.
3919         (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
3920         (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
3921         (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
3922         (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
3923         (CLASSTYPE_INTERFACE_ONLY): Likewise.
3924         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
3925         (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
3926         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
3927         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
3928         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
3929         (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
3930         (BINFO_UNSHARED_MARKED): Whitespace.
3931         (BINFO_MARKED): Whitespace and wrap.
3932         (SET_BINFO_MARKED): Likewise.
3933         (CLEAR_BINFO_MARKED): Likewise.
3934         (BINFO_VTABLE_PATH_MARKED): Likewise.
3935         (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
3936         (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
3937         (BINFO_SUBVTT_INDEX): Remove parenthesis.
3938         (BINFO_VPTR_INDEX): Likewise.
3939         (BINFO_PRIMARY_BASE_OF): Likewise,
3940         (CLASSTYPE_VFIELDS): Whitespace.
3941         (VF_DERIVED_VALUE): Wrap long line.
3942         (NAMESPACE_LEVEL): Whitespace.
3943         (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
3944         (DEFARG_POINTER): Whitespace.
3945         (DECL_NEEDED_P): Remove parenthesis.
3946         (DECL_LANGUAGE): Whitespace.
3947         (SET_DECL_LANGUAGE): Add parenthesis.
3948         (DECL_CONSTRUCTOR_P): Whitespace and wrap.
3949         (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
3950         (DECL_IN_AGGR_P): Whitespace.
3951         (DECL_FRIEND_P): Likewise.
3952         (DECL_BEFRIENDING_CLASSES): Likewise.
3953         (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
3954         (DECL_NONCONVERTING_P): Whitespace.
3955         (DECL_PURE_VIRTUAL_P): Likewise.
3956         (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
3957         (DECL_PENDING_INLINE_INFO): Whitespace.
3958         (DECL_SORTED_FIELDS): Likewise.
3959         (DECL_DEFERRED_FN): Likewise.
3960         (DECL_TEMPLATE_INFO): Likewise.
3961         (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
3962         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
3963         (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
3964         (TMPL_ARGS_LEVEL): Likewise.
3965         (SET_TMPL_ARGS_LEVEL): Likewise.
3966         (INNERMOST_TEMPLATE_PARMS): Whitespace.
3967         (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
3968         (INTEGRAL_CODE_P(CODE): Add parenthesis.
3969         (CP_INTEGRAL_TYPE_P): Remove parenthesis.
3970         (TYPE_HAS_CONSTRUCTOR): Whitespace.
3971         (TREE_HAS_CONSTRUCTOR): Likewise.
3972         (TYPE_HAS_DESTRUCTOR): Likewise.
3973         (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
3974         (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
3975         (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
3976         (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
3977         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
3978         (TYPE_PTRMEMFUNC_P): Likewise.
3979         (TYPE_PTRMEMFUNC_FLAG): Likewise.
3980         (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
3981         (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
3982         (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
3983         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
3984         (DECL_ACCESS): Whitespace.
3985         (DECL_GLOBAL_CTOR_P): Remove parenthesis.
3986         (DECL_GLOBAL_DTOR_P): Likewise.
3987         (GLOBAL_INIT_PRIORITY): Likewise.
3988         (DECL_TEMPLATE_PARMS): Likewise.
3989         (DECL_TEMPLATE_RESULT): Likewise.
3990         (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
3991         (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
3992         (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
3993         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
3994         (PRIMARY_TEMPLATE_P): Add parenthesis.
3995         (DECL_USE_TEMPLATE): Whitespace.
3996         (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
3997         (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
3998         (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
3999         (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
4000         (CALL_DECLARATOR_PARMS): Remove parenthesis.
4001         (CALL_DECLARATOR_QUALS): Likewise.
4002         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
4003         (TEMP_NAME_P): Wrap.
4004         (VFIELD_NAME_P): Likewise.
4005         (B_SET): Uppercase macro parameters and add parenthesis.
4006         (B_CLR): Likewise.
4007         (B_TST): Likewise.
4008         (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
4009         (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
4010         (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
4011         (same_or_base_type_p): Likewise.
4012         (cp_deprecated): Likewise.
4013
4014 2002-01-05  Richard Henderson  <rth@redhat.com>
4015
4016         * semantics.c (expand_body): Revert last change.
4017
4018 2002-01-04  Jason Merrill  <jason@redhat.com>
4019
4020         PR c++/4122
4021         * class.c (update_vtable_entry_for_fn): Set delta to zero for a
4022         lost primary.
4023
4024         * class.c (build_vtbl_initializer): Check for a lost primary
4025         before calculating the vtable entry to throw away.
4026
4027 2002-01-02  Jason Merrill  <jason@redhat.com>
4028
4029         * semantics.c (expand_body): Call outlining_inline_function when
4030         emitting an inline function out of line.
4031
4032 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
4033
4034         PR c++/5116, c++/764 reversion
4035         * call.c (build_new_op): Revert the instantiations. They are
4036         incorrect.
4037
4038 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
4039
4040         PR c++/5089
4041         * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
4042
4043 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
4044
4045         PR c++/3716
4046         * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
4047         (tsubst, case POINTER_TYPE): Handle pmfs here.
4048         (tsubst, case OFFSET_TYPE): Check it is not an offset to
4049         reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
4050
4051 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
4052
4053         PR c++/35
4054         * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
4055         (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
4056         * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
4057         PARM_DECL.
4058         (tsubst_template_parms): Break up loop statements.
4059         (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
4060         parm PARM_DECLs don't get promoted.
4061
4062 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
4063
4064         PR c++/5123
4065         * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
4066         (build_x_function_call): Cope with a COMPONENT_REF containing a
4067         TEMPLATE_ID_EXPR.
4068
4069 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
4070
4071         PR c++/5213
4072         * pt.c (convert_template_argument): Be more careful determining
4073         when RECORD_TYPE templates are or are not templates.
4074
4075 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
4076
4077         PR c++/775
4078         * cp-tree.h (handle_class_head): Adjust prototype.
4079         * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
4080         parameters. Use for all class heads.
4081         * parse.y (named_class_head_sans_basetype, named_class_head,
4082         named_complex_class_head_sans_basetype,
4083         named_class_head_sans_basetype_defn,
4084         unnamed_class_head): Remove.
4085         (class_head, class_head_apparent_template): Recognize class heads
4086         (class_head_decl, class_head_defn): New reductions. Process class
4087         heads.
4088         (structsp): Adjust class definition and class declaration
4089         reductions.
4090         (maybe_base_class_list): Give diagnostic on empty list.
4091
4092 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
4093
4094         PR c++/4379
4095         * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
4096         single non-static member.
4097         (unary_complex_lvalue): If it cannot be a pointer to member, don't
4098         make it so. Check it is not pointer to reference.
4099
4100 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
4101
4102         PR c++/5132
4103         * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
4104         are processing a template decl.
4105
4106 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
4107
4108         PR c++/5116, c++/764
4109         * call.c (build_new_op): Make sure template class operands are
4110         instantiated. Simplify arglist construction.
4111
4112 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
4113
4114         * call.c (build_user_type_conversion_1): Use my_friendly_assert
4115         rather than if ... abort.
4116         * cvt.c (convert_to_reference): Likewise.
4117         * semantics.c (setup_vtbl_ptr): Likewise.
4118         * pt.c (lookup_template_class): Comment typo.
4119
4120 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
4121
4122         PR c++/5125
4123         * pt.c (push_template_decl_real): Make sure DECL has
4124         DECL_LANG_SPECIFIC.
4125
4126 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
4127
4128         PR c++/335
4129         * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
4130         for non-reference fields.
4131         * typeck.c (require_complete_type): Use resolve_offset_ref).
4132
4133 2001-12-26  Nathan Sidwell  <nathan@codesourcery.com>
4134
4135         PR c++/196
4136         * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
4137
4138 2001-12-24  Nathan Sidwell  <nathan@codesourcery.com>
4139
4140         PR c++/160
4141         * typeck.c (build_modify_expr): Remove old unreachable code & tidy
4142         up. Don't stabilize_references when initializing a reference.
4143
4144 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4145
4146         * decl2.c (lang_f_options): Const-ify.
4147
4148 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
4149
4150         * config-lang.in (diff_excludes): Remove.
4151
4152 2001-12-19  Nathan Sidwell  <nathan@codesourcery.com>
4153
4154         PR c++/90
4155         * typeck.c (build_function_call_real): Use original function
4156         expression for errors.
4157
4158 2001-12-18  Jason Merrill  <jason@redhat.com>
4159
4160         PR c++/3242
4161         * class.c (add_method): Do compare 'this' quals when trying to match a
4162         used function.  Don't defer to another used function.
4163
4164 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
4165
4166         * pt.c (instantiate_clone): Remove, fold into ...
4167         (instantiate_template): ... here. Simplify by removing mutual
4168         recursion.
4169         * typeck2.c (build_m_component_ref): Don't cv qualify the function
4170         pointed to by a pointer to function.
4171         * class.c (delete_duplicate_fields_1): Typo.
4172
4173 2001-12-18  Jason Merrill  <jason@redhat.com>
4174
4175         C++ ABI change: destroy value arguments in caller.
4176         * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
4177         create an extra binding level for the parameters.
4178         * decl.c (store_parm_decls): Don't do parameter cleanups.
4179
4180 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
4181
4182         * call.c (build_new_method_call): Use '%#V'.
4183         * error.c (cv_to_string): Use V parameter to determine padding.
4184
4185 2001-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
4186
4187         * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
4188         spellings in messages.
4189
4190 2001-12-17  Zack Weinberg  <zack@codesourcery.com>
4191
4192         * cp-tree.h: Delete #defines for cp_error, cp_warning,
4193         cp_pedwarn, and cp_compiler_error.
4194         * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
4195         except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
4196         rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
4197         typeck2.c: Change calls to the above macros to use their
4198         language-independent equivalents: error, warning, pedwarn, and
4199         internal_error respectively.
4200
4201 2001-12-16  Neil Booth  <neil@daikokuya.demon.co.uk>
4202
4203         * decl2.c (finish_file): Remove back_end_hook.
4204
4205 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
4206
4207         * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
4208         cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
4209         pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
4210
4211 2001-12-15  Joseph S. Myers  <jsm28@cam.ac.uk>
4212
4213         * lang-options.h: Use American spelling in messages.
4214
4215 2001-12-13  Jason Merrill  <jason@redhat.com>
4216
4217         * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
4218
4219         Use cleanups to run base and member destructors.
4220         * init.c (push_base_cleanups): New function, split out from...
4221         (build_delete): ...here.  Lose !TYPE_HAS_DESTRUCTOR code.
4222         * decl.c (finish_destructor_body): Move vbase destruction code to
4223         push_base_cleanups.
4224         (begin_function_body, finish_function_body): New fns.
4225         (finish_function): Move [cd]tor handling and call_poplevel to
4226         finish_function_body.
4227         (pushdecl): Skip the new level.
4228         * semantics.c (genrtl_try_block): Don't call end_protect_partials.
4229         (setup_vtbl_ptr): Call push_base_cleanups.
4230         * method.c (synthesize_method): Call {begin,end}_function_body.
4231         * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
4232         * cp-tree.h: Declare new fns.
4233         * parse.y (function_body, .begin_function_body): New nonterminals.
4234         (fndef, pending_inline, function_try_block): Use function_body.
4235         (ctor_initializer_opt, function_try_block): No longer has a value.
4236         (base_init): Remove .set_base_init token.
4237         (.set_base_init, compstmt_or_error): Remove.
4238         * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
4239
4240         * optimize.c (maybe_clone_body): Fix parameter updating.
4241
4242 2001-12-12  Jason Merrill  <jason@redhat.com>
4243
4244         * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
4245         * semantics.c (genrtl_start_function): Don't pass
4246         parms_have_cleanups or push an extra binding level.
4247         (genrtl_finish_function): Lose cleanup_label cruft.
4248
4249         * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
4250         (ctor_label): Remove.
4251         * semantics.c (finish_return_stmt): Lose ctor_label support.
4252         * decl.c (finish_constructor_body, mark_lang_function): Likewise.
4253         * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
4254         dtor_label.
4255
4256         * call.c (build_new_method_call): Let resolves_to_fixed_type_p
4257         check for [cd]tors.
4258         * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
4259
4260         * decl.c (finish_function): Check VMS_TARGET, not VMS.
4261
4262         * decl.c (start_cleanup_fn): Remove redundant pushlevel.
4263         (end_cleanup_fn): And poplevel.
4264
4265         * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
4266         if we're in a template.
4267
4268 2001-12-12  Jakub Jelinek  <jakub@redhat.com>
4269
4270         * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
4271         ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
4272         THIS_NAME_P): Delete.
4273         * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
4274         THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
4275         with internal naming scheme.
4276         * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
4277
4278 2001-12-12  Nathan Sidwell  <nathan@codesourcery.com>
4279
4280         * decl.c (grokdeclarator): Deprecated implicit typename use.
4281
4282 2001-12-11  Nathan Sidwell  <nathan@codesourcery.com>
4283
4284         PR g++/51
4285         * parse.y (frob_specs): Indicate it is a language linkage which
4286         contained the extern.
4287         * decl.c (grokdeclarator): Allow extern language linkage with
4288         other specifiers.
4289
4290 2001-12-10  Nathan Sidwell  <nathan@codesourcery.com>
4291
4292         PR g++/72
4293         * decl.c (add_binding): Don't reject duplicate typedefs involving
4294         template parameters.
4295
4296 2001-12-10  Neil Booth  <neil@daikokuya.demon.co.uk>
4297
4298         * parse.y, semantics.c: Similarly.
4299
4300 2001-12-09  Nathan Sidwell  <nathan@codesourcery.com>
4301
4302         PR g++/87
4303         * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
4304         (copy_args_p): Rename to ...
4305         (copy_fn_p): ... here.
4306         (grok_special_member_properties): New function.
4307         (grok_op_properties): Lose VIRTUALP parameter.
4308         (copy_assignment_arg_p): Remove.
4309         * call.c (build_over_call): Use copy_fn_p.
4310         * decl.c (grokfndecl): Reformat. Adjust call to
4311         grok_op_properties.
4312         (copy_args_p): Rename to ...
4313         (copy_fn_p): ... here. Reject template functions. Check for pass
4314         by value.
4315         (grok_special_member_properties): Remember special functions.
4316         (grok_ctor_properties): Don't remember them here, just check.
4317         (grok_op_properties): Likewise.
4318         (start_method): Call grok_special_member_properties.
4319         * decl2.c (grokfield): Likewise.
4320         (copy_assignment_arg_p): Remove.
4321         (grok_function_init): Don't remember abstract assignment here.
4322         * pt.c (instantiate_class_template): Call
4323         grok_special_member_properties.
4324         (tsubst_decl): Adjust grok_op_properties call.
4325
4326 2001-12-08  Aldy Hernandez  <aldyh@redhat.com>
4327
4328         * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
4329         RID_TYPES_COMPATIBLE_P.
4330
4331 2001-12-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
4332
4333         * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
4334         call to build_aggr_init.
4335         * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
4336
4337 2001-12-08  Neil Booth  <neil@daikokuya.demon.co.uk>
4338
4339         * parse.y: Replace uses of the string non-terminal with STRING.
4340         Don't perform string concatentaion here.
4341         (string): Remove non-terminal.
4342         * semantics.c (finish_asm_stmt): Don't concatenate strings here.
4343
4344 2001-12-05  Jason Merrill  <jason@redhat.com>
4345
4346         * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
4347         (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
4348         * tree.c (cp_start_inlining, cp_end_inlining): New fns.
4349         * pt.c (push_tinst_level): No longer static.
4350         * cp-tree.h: Declare them.
4351
4352         * init.c (resolve_offset_ref): Don't check access for the base
4353         conversion to access a FIELD_DECL.
4354
4355         * cp-tree.h (TYPE_REFFN_P): New macro.
4356         * decl.c (bad_specifiers): Check it, too.
4357
4358         * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
4359         on the __*_type_info type if we haven't seen a definition.
4360
4361 2001-12-05  Neil Booth  <neil@daikokuya.demon.co.uk>
4362
4363         * decl.c: Include c-common.h.
4364         (shadow_warning): Move to c-common.c.
4365
4366 Wed Dec  5 17:00:49 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4367
4368         * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
4369
4370 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
4371
4372         * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
4373
4374 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
4375
4376         PR g++/164
4377         * init.c (sort_base_init): Allow binfos to be directly specified.
4378         * method.c (do_build_copy_constructor): Explicitly convert to the
4379         base instance.
4380         (do_build_assign_ref): Likewise.
4381
4382 2001-12-03  Hans-Peter Nilsson  <hp@bitrange.com>
4383
4384         * decl.c (xref_basetypes): Don't use C99 construct in tag_code
4385         declaration and initialization.
4386
4387 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
4388
4389         * typeck2.c: Remove leading capital from diagnostic messages, as
4390         per GNU coding standards.
4391
4392 2001-12-03  Mumit Khan  <khan@nanotech.wisc.edu>
4393
4394         PR c++/3394
4395         * decl.c (xref_basetypes): Handle attributes between
4396         'class' and name.
4397
4398 2001-12-03  Nathan Sidwell  <nathan@codesourcery.com>
4399
4400         PR g++/3381
4401         * parse.y (named_complex_class_head_sans_basetype): Add new
4402         reduction.
4403         * Make-lang.in (parse.c): Adjust expected conflict count.
4404
4405 2001-12-03  Jason Merrill  <jason@redhat.com>
4406
4407         * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
4408         immediate binfos for our virtual bases.
4409
4410 2001-12-02  Neil Booth  <neil@daikokuya.demon.co.uk>
4411
4412         * call.c (build_java_interface_fn_ref): Similarly.
4413         * except.c (is_admissible_throw_operand): Similarly.
4414         * init.c (build_java_class_ref): Similarly.
4415         * xref.c (open_xref_file): Similarly.
4416
4417 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
4418
4419         * class.c (finish_struct): Remove trailing periods from messages.
4420         * decl.c (check_tag_decl): Similarly.
4421         * lex.c (cxx_set_yydebug): Similarly.
4422         * typeck2.c (friendly_abort): Similarly.
4423
4424 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
4425
4426         PR c++/3048
4427         * cp-tree.h (ovl_member): Remove.
4428         * decl2.c (merge_functions): Handle extern "C" functions
4429         specially.
4430         * tree.c (ovl_member): Remove.
4431
4432 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
4433
4434         PR c++/4842
4435         * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
4436         FUNCTION_DECL, as input.
4437         (mark_overriders): Remove.
4438         (warn_hidden): Rework for the new ABI.
4439
4440 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
4441
4442         PR c++/3471
4443         * call.c (convert_like_real): Do not build additional temporaries
4444         for rvalues of class type.
4445
4446 2001-11-28  Nathan Sidwell  <nathan@codesourcery.com>
4447
4448         * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
4449         (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
4450         (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
4451         (DERIVED_FROM_P): Likewise.
4452         (enum base_access): Renumber, add ba_quiet bit mask.
4453         (get_binfo): Remove.
4454         (get_base_distance): Remove.
4455         (binfo_value): Remove.
4456         (ACCESSIBLY_DERIVED_FROM_P): Remove.
4457         * call.c (standard_conversion): Use lookup_base.
4458         * class.c (strictly_overrides): Likewise.
4459         (layout_virtual_bases): Likewise.
4460         (warn_about_ambiguous_direct_bases): Likewise.
4461         (is_base_of_enclosing_class): Likewise.
4462         (add_vcall_offset_vtbl_entries_1): Likewise.
4463         * cvt.c (build_up_reference): Adjust comment.
4464         * init.c (build_member_call): Reformat.
4465         * search.c (get_binfo): Remove.
4466         (get_base_distance_recursive): Remove.
4467         (get_base_distance): Remove.
4468         (lookup_base_r): Tweak.
4469         (lookup_base): Add ba_quiet control. Complete the types here.
4470         (covariant_return_p): Use lookup_base.
4471         * tree.c (binfo_value): Remove.
4472         (maybe_dummy_object): Use lookup_base.
4473         * typeck.c (build_static_cast): Use lookup_base.
4474         (get_delta_difference): Likewise.
4475         * typeck2.c (binfo_or_else): Use lookup_base.
4476         (build_scoped_ref): Add back error_mark_check.
4477         (build_m_component_ref): Use lookup_base.
4478
4479 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
4480
4481         * Make-lang.in (c++.generated-manpages): New dummy target.
4482
4483 Tue Nov 27 09:03:47 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4484
4485         * Make-lang.in (cp-lang.o): Depends on c-common.h.
4486         * cp-lang.c (c-common.h): Include.
4487         (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
4488         * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
4489         * expr.c (init_cplus_expand): Don't set lang_expand_constant.
4490
4491 2001-11-26  Neil Booth  <neil@daikokuya.demon.co.uk>
4492
4493         * decl2.c (c_language): Move to c-common.c.
4494         * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
4495         functions.
4496         (cxx_init): Update.
4497
4498 2001-11-26  Jason Merrill  <jason@redhat.com>
4499
4500         * call.c (joust): Remove COND_EXPR hack.
4501
4502 2001-11-25  Aldy Hernandez  <aldyh@redhat.com>
4503
4504         * search.c (lookup_base_r): Declare bk in variable declaration
4505         space.
4506
4507 2001-11-25  Nathan Sidwell  <nathan@codesourcery.com>
4508
4509         PR g++/3145
4510         * class.c (build_vbase_pointer): Remove.
4511         (build_vbase_path): Remove.
4512         (build_base_path): New function.
4513         * cp-tree.h (base_access, base_kind): New enumerations.
4514         (build_base_path): Declare.
4515         (convert_pointer_to_real): Remove.
4516         (convert_pointer_to): Remove.
4517         (lookup_base): Declare.
4518         (convert_pointer_to_vbase): Remove.
4519         * call.c (build_scoped_method_call): Use lookup_base &
4520         build_base_path instead of convert_pointer_to_real,
4521         get_base_distance & get_binfo.
4522         (build_over_call): Likewise.
4523         * cvt.c (cp_convert_to_pointer): Likewise.
4524         (convert_to_pointer_force): Likewise.
4525         (build_up_reference): Likewise.
4526         (convert_pointer_to_real): Remove.
4527         (convert_pointer_to): Remove.
4528         * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
4529         instead of convert_pointer_to_vbase & build_vbase_path.
4530         (emit_base_init): Use build_base_path instead of
4531         convert_pointer_to_real.
4532         (expand_virtual_init): Lose unrequired conversions.
4533         (resolve_offset_ref): Use lookup_base and build_base_path
4534         instead of convert_pointer_to.
4535         * rtti.c (build_dynamic_cast_1): Use lookup_base &
4536         build_base_path instead of get_base_distance & build_vbase_path.
4537         * search.c (get_vbase_1): Remove.
4538         (get_vbase): Remove.
4539         (convert_pointer_to_vbase): Remove.
4540         (lookup_base_r): New function.
4541         (lookup_base): New function.
4542         * typeck.c (require_complete_type): Use lookup_base &
4543         build_base_path instead of convert_pointer_to.
4544         (build_component_ref): Likewise.
4545         (build_x_function_call): Likewise.
4546         (get_member_function_from_ptrfunc): Likewise.
4547         (build_component_addr): Likewise.
4548         * typeck2.c (build_scoped_ref): Likewise.
4549
4550 2001-11-22  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4551
4552         * cp-tree.h (CP_TYPE_QUALS): Removed.
4553         * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
4554         * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
4555         LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
4556         * dump.c (cp_dump_tree): Use void* dump_info argument to match
4557         lang-hooks prototype.
4558         * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
4559         rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
4560         CP_TYPE_QUALS changed to cp_type_quals.
4561         * Make-lang.in: References to c-dump.h changed to tree-dump.h.
4562         (CXX_C_OBJS): Remove c-dump.o.
4563
4564 2001-11-21  Mark Mitchell  <mark@codesourcery.com>
4565
4566         PR c++/3637
4567         * pt.c (lookup_template_class): Ensure that all specializations
4568         are registered on the list corresponding to the most general
4569         template.
4570
4571 2001-11-20  Mark Mitchell  <mark@codesourcery.com>
4572
4573         * call.c (non_reference): Add documentation.
4574         (convert_class_to_reference): Do not strip reference types
4575         from conversion operators.
4576         (maybe_handle_ref_bind): Simplify.
4577         (compare_ics): Correct handling of references.
4578
4579 2001-11-19  John Wilkinson <johnw@research.att.com>
4580
4581         * dump.c (dump_op): New function.
4582         (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION.  Use
4583         dump_op.  Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
4584         DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
4585
4586 2001-11-19  Mark Mitchell  <mark@codesourcery.com>
4587
4588         PR4629
4589         * semantics.c (finish_sizeof): Make sure that expression created
4590         while processing a template do not have a type.
4591         (finish_alignof): Likewise.
4592         * typeck.c (c_sizeof): Likewise.
4593         (expr_sizeof): Likewise.
4594
4595 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
4596
4597         * lex.c (cxx_finish): Call c_common_finish.
4598         (finish_parse): Remove.
4599
4600 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4601
4602         * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
4603         when displaying error message about missing array bounds.
4604
4605 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4606
4607         * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
4608         CONST_CAST_EXPR.
4609         * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
4610
4611 2001-11-16  Neil Booth  <neil@daikokuya.demon.co.uk>
4612
4613         * cp-tree.h (print_class_statistics): Restore.
4614
4615 2001-11-15  Jason Merrill  <jason@redhat.com>
4616
4617         * method.c (use_thunk): Don't emit debugging information for thunks.
4618
4619         * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
4620         * decl.c (make_typename_type): Handle getting a class template.
4621         * search.c (lookup_field_r): A class template is good enough for
4622         want_type.
4623
4624         * call.c (convert_like_real): Only use cp_convert for the bad part.
4625         (standard_conversion): Also allow bad int->enum.
4626         * typeck.c (ptr_reasonably_similar): Also allow functions to
4627         interconvert.  Pointers to same-size integers are reasonably
4628         similar.
4629
4630         * cvt.c (convert_to_void): If we build a new COND_EXPR, always
4631         give it void type.
4632
4633 2001-11-15  Nathan Sidwell  <nathan@codesourcery.com>
4634
4635         PR g++/3154
4636         * init.c (sort_base_init): Remove unreachable code.
4637         (expand_member_init): Adjust comment to reflect reality. Simplify
4638         and remove unreachable code.
4639
4640 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
4641
4642         * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
4643         (cxx_init): Update prototype.
4644         * decl.c (init_decl_processing): Rename.  Move null node init
4645         to its creation time.
4646         * lex.c (cxx_init_options): Update.
4647         (cxx_init): Combine with old init_parse; also call
4648         cxx_init_decl_processing.
4649
4650 2001-11-14  Richard Sandiford  <rsandifo@redhat.com>
4651
4652         * decl.c (check_initializer): Try to complete the type of an
4653         array element before checking whether it's complete.  Don't
4654         complain about arrays with complete element types but an
4655         unknown size.
4656         (cp_finish_decl): Build the hierarchical constructor before
4657         calling maybe_deduce_size_from_array_init.
4658
4659 2001-11-14  Joseph S. Myers  <jsm28@cam.ac.uk>
4660
4661         * Make-lang.in: Change all uses of $(manext) to $(man1ext).
4662
4663 2001-11-13  Nathan Sidwell  <nathan@codesourcery.com>
4664
4665         PR g++/4206
4666         * parse.y (already_scoped_stmt): Remove.
4667         (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
4668
4669 2001-11-12  H.J. Lu <hjl@gnu.org>
4670
4671         * cvt.c (ocp_convert): Don't warn the address of a weak
4672         function is always `true'.
4673
4674 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
4675
4676         * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
4677         LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
4678         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
4679         * cp-tree.h (print_class_statistics): Remove.
4680         (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
4681         cxx_print_identifier, cxx_set_yydebug): New.
4682         * lex.c (set_yydebug): Rename c_set_yydebug.
4683         * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
4684         lang_print_xnode): Rename.
4685         * tree.c (print_lang_statistics): Rename.
4686
4687 2001-11-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4688
4689         * class.c (dump_array): Fix format specifier warning.
4690
4691 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
4692
4693         * cp-lang.c (LANG_HOOKS_NAME): Override.
4694         (struct lang_hooks): Constify.
4695         * lex.c (cxx_init_options): Update.
4696         (lang_identify): Remove.
4697         * parse.y (language_string): Remove.
4698
4699 2001-11-08  Andreas Franck  <afranck@gmx.de>
4700
4701         * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
4702         DEMANGLER_CROSS_NAME): Handle program_transform_name the way
4703         suggested by autoconf.
4704         (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
4705         (c++.install-common): Use the transformed target alias names.
4706
4707 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
4708
4709         * Make-lang.in: Update.
4710         * cp-lang.c: Include langhooks-def.h.
4711
4712 2001-11-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4713
4714         * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
4715
4716 2001-11-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4717
4718         * lex.c (copy_lang_type): Add static prototype.
4719
4720 2001-11-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4721
4722         * pt.c (unify): Handle SCOPE_REF.
4723
4724 2001-11-01  Jakub Jelinek  <jakub@redhat.com>
4725
4726         * tree.c (cp_copy_res_decl_for_inlining): Adjust
4727         DECL_ABSTRACT_ORIGIN for the return variable.
4728
4729 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
4730
4731         *  Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
4732
4733 2001-10-28  Joseph S. Myers  <jsm28@cam.ac.uk>
4734
4735         * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
4736         semantics.c, spew.c: Fix spelling errors.
4737
4738 2001-10-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4739
4740         * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
4741
4742 2001-10-25  Zack Weinberg  <zack@codesourcery.com>
4743
4744         * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
4745         pop_everything.
4746
4747 Tue Oct 23 14:00:20 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4748
4749         * cp-lang.c (cxx_get_alias_set): New function.
4750         Point LANG_HOOKS_GET_ALIAS_SET to it.
4751
4752 2001-10-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4753
4754         * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
4755         * cp-tree.h (make_unbound_class_template): Prototype new function.
4756         * decl.c (make_unbound_class_template): New function.
4757         * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
4758         * error.c (dump_type): Likewise.
4759         * mangle.c (write_type): Likewise.
4760         * parse.y (template_parm): Likewise.
4761         (template_argument): Use make_unbound_class_template.
4762         * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
4763         (tsubst): Likewise.
4764         (tsubst_copy): Likewise.
4765         (unify): Likewise.
4766         * tree.c (walk_tree): Likewise.
4767         * typeck.c (comptypes): Likewise.
4768
4769 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4770
4771         * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
4772         extra calls into fewer ones.
4773
4774 2001-10-18  Alexandre Oliva  <aoliva@redhat.com>
4775
4776         * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
4777         Warn when merging inline with attribute noinline.
4778         (start_decl, start_function): Warn if inline and attribute
4779         noinline appear in the same declaration.
4780
4781 2001-10-16  H.J. Lu <hjl@gnu.org>
4782
4783         * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
4784         for tree checking disabled.
4785
4786 2001-10-16  Hans-Peter Nilsson  <hp@axis.com>
4787
4788         * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
4789         NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
4790
4791 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
4792
4793         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
4794         (unify): Only handle MINUS_EXPR specially if the above flag is set
4795         and the subtracted constant is 1.  Clear the flag on recursive calls.
4796         Set it when unifying the maximum value in an INTEGER_TYPE's range.
4797
4798 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
4799
4800         * decl.c (bad_specifiers): Don't allow exception specifications
4801         on any typedefs.
4802
4803 2001-10-14  Neil Booth  <neil@daikokuya.demon.co.uk>
4804
4805         * cp/lex.c (init_cp_pragma): Similarly.
4806
4807 2001-10-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4808
4809         * pt.c (lookup_template_class): Build complete template arguments
4810         for BOUND_TEMPLATE_TEMPLATE_PARM.
4811
4812 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4813
4814         * cp-tree.h (TYPE_BINFO): Update comment.
4815         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
4816         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
4817         (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
4818         (copy_type): Prototype new function.
4819         * lex.c (copy_lang_decl): Gather tree node statistics.
4820         (copy_lang_type): New function.
4821         (copy_type): Likewise.
4822         (cp_make_lang_type): Create lang_type for
4823         BOUND_TEMPLATE_TEMPLATE_PARM.  Set TYPE_BINFO for TYPENAME_TYPE
4824         and BOUND_TEMPLATE_TEMPLATE_PARM.
4825         * pt.c (tsubst): Use copy_type instead of copy_node.
4826         * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
4827
4828 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4829
4830         * pt.c (determine_specialization): Ignore functions without
4831         DECL_TEMPLATE_INFO.
4832
4833 2001-10-12  Nathan Sidwell  <nathan@codesourcery.com>
4834
4835         PR g++/4476
4836         * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
4837
4838 2001-10-11  Jason Merrill  <jason_merrill@redhat.com>
4839
4840         * typeck2.c (store_init_value): Don't re-digest a bracketed
4841         initializer.
4842
4843         * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
4844         ANON_AGGR_TYPE_P.
4845
4846 2001-10-11  Richard Henderson  <rth@redhat.com>
4847
4848         * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
4849         of an asm statement.
4850         (build_vtbl_ref_1): Split out from build_vtbl_ref.
4851         (build_vfn_ref): Use it to handle vtable descriptors before
4852         calling build_vtable_entry_ref.
4853         * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
4854
4855 2001-10-10  Richard Henderson  <rth@redhat.com>
4856
4857         * parse.y (asm_operand): Allow named operands.
4858         * semantics.c (finish_asm_stmt): Tweek for changed location
4859         of the operand constraint.
4860
4861 2001-10-09  Jason Merrill  <jason_merrill@redhat.com>
4862
4863         * call.c (standard_conversion): Add bad conversion between
4864         integers and pointers.
4865         (convert_like_real): Don't use convert_for_initialization for bad
4866         conversions; complain here and use cp_convert.
4867         (build_over_call): Don't handle bad conversions specially.
4868         (perform_implicit_conversion): Allow bad conversions.
4869         (can_convert_arg_bad): New fn.
4870         * cp-tree.h: Declare it.
4871         * typeck.c (convert_for_assignment): Use it.
4872         (ptr_reasonably_similar): Any target type is similar to void.
4873
4874 2001-10-08  Alexandre Oliva  <aoliva@redhat.com>
4875
4876         * Make-lang.in (CXX_OBJS): Added cp-lang.o.
4877         (cp/cp-lang.o): New rule.
4878         * cp-tree.h: Declare hooks.
4879         * tree.c: Make hooks non-static.
4880         (init_tree): Don't initialize hooks here.
4881         * lex.c: Likewise.  Move definition of lang_hooks to...
4882         * cp-lang.c: ... new file.
4883
4884 2001-10-08  Richard Henderson  <rth@redhat.com>
4885
4886         * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
4887         (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
4888
4889 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4890
4891         * class.c (build_vtable_entry_ref): Const-ify.
4892         * decl.c (predefined_identifier,
4893         initialize_predefined_identifiers): Likewise.
4894         * init.c (build_new_1): Likewise.
4895         * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
4896         Likewise.
4897
4898 2001-10-05  Alexandre Oliva  <aoliva@redhat.com>
4899
4900         * optimize.c (struct inline_data): Moved to ../tree-inline.c.
4901         (INSNS_PER_STMT): Likewise.
4902         (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
4903         (copy_body, initialize_inlined_parameters): Likewise.
4904         (declare_return_variable, inlinable_function_p): Likewise.
4905         (expand_call_inline, expand_calls_inline): Likewise.
4906         (optimize_inline_calls, clone_body): Likewise.
4907         * tree.c (walk_tree): Moved to ../tree-inline.c.
4908         (walk_tree_without_duplicates): Likewise.
4909         (copy_tree_r, remap_save_expr): Likewise.
4910
4911 2001-10-04  Alexandre Oliva  <aoliva@redhat.com>
4912
4913         * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
4914         (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
4915         * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
4916         (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
4917         (flag_inline_trees): Moved declaration to ../tree-inline.h.
4918         (walk_tree): Moved declaration to ../tree-inline.h.
4919         (walk_tree_without_duplicates, copy_tree_r): Likewise.
4920         (remap_save_expr): Likewise.
4921         * decl.c: Include tree-inline.h.
4922         (lang_mark_tree): Don't mark inlined_fns.
4923         * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
4924         * optimize.c: Include tree-inline.h.
4925         (optimize_inline_calls): Move declaration to ../tree.h, as
4926         non-static.
4927         (remap_decl): Use language-independent constructs and hooks.
4928         (remap_block, copy_body_r, declare_return_variable): Likewise.
4929         (inlinable_function_p): Likewise.  Don't test for
4930         DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
4931         no longer language-specific.
4932         (optimize_inline_calls): Likewise.  Make it non-static.  Moved
4933         call of dump_function to...
4934         (optimize_function): Here...
4935         (clone_body): New function, extracted from...
4936         (maybe_clone_body): ... here.  Build decl_map locally and pass
4937         it on to clone_body.
4938         * pt.c, semantics.c: Include tree-inline.h.
4939         * tree.c: Likewise.
4940         (cp_walk_subtrees): New language-specific hook for tree inlining.
4941         (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
4942         cp_is_overload_p, cp_auto_var_in_fn_p,
4943         cp_copy_res_decl_for_inlining): Likewise.
4944         (walk_tree): Move language-specific constructs into...
4945         (cp_walk_subtrees): this new function.
4946         (copy_tree_r): Use language-independent constructs and hooks.
4947         (init_tree): Initialize tree inlining hooks.
4948         (remap_save_expr): Adjust prototype so that the declaration
4949         does not require the definition of splay_tree.
4950
4951 2001-10-03  John David Anglin  <dave@hiauly1.hia.nrc.ca>
4952
4953         * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
4954         to build the declaration instead of the declaration itself.
4955
4956 2001-10-02  Jason Merrill  <jason_merrill@redhat.com>
4957
4958         * decl2.c (cxx_decode_option): Add 'else'.
4959
4960         * spew.c (end_input): No longer static.
4961         * cp-tree.h: Declare it.
4962         * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
4963
4964 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
4965
4966         * call.c (build_over_call), typeck.c (build_function_call_real):
4967         Pass type attributes to check_function_format rather than name or
4968         assembler name.  Don't require there to be a name or assembler
4969         name to check formats.
4970
4971 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
4972
4973         * decl.c (init_decl_processing): Don't call
4974         init_function_format_info.  Initialize lang_attribute_table
4975         earlier.
4976         (builtin_function): Call decl_attributes.
4977         (insert_default_attributes): New.
4978
4979 2001-10-01  Jason Merrill  <jason_merrill@redhat.com>
4980
4981         * decl.c (grokdeclarator): Copy array typedef handling from C
4982         frontend.
4983
4984         * decl.c (grokdeclarator): Copy too-large array handling from C
4985         frontend.
4986
4987 2001-09-29  Alexandre Oliva  <aoliva@redhat.com>
4988
4989         * config-lang.in (target_libs): Added target-gperf, so that we
4990         don't try to build it if C++ is disabled.
4991
4992 2001-09-23  Zack Weinberg  <zack@codesourcery.com>
4993
4994         * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
4995         (cp/errfn.o): Delete rule.
4996         (cp/error.o): Depend on flags.h.
4997         * errfn.c: Delete file.
4998         * cp-tree.h: Declare warn_deprecated.  Remove definitions of
4999         TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
5000         and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
5001         cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
5002         internal_error respectively.  Make cp_deprecated into a macro.
5003         Don't define cp_printer typedef or declare cp_printers.
5004         * error.c: Include flags.h.
5005         Delete: struct tree_formatting_info, print_function_argument_list,
5006         print_declaration, print_expression, print_function_declaration,
5007         print_function_parameter, print_type_id, print_cv_qualifier_seq,
5008         print_type_specifier_seq, print_simple_type_specifier,
5009         print_elaborated_type_specifier, print_rest_of_abstract_declarator,
5010         print_parameter_declaration_clause, print_exception_specification,
5011         print_nested_name_specifier, and definition of cp_printers.
5012         (locate_error): New function.
5013         (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
5014         rewritten in terms of locate_error and diagnostic.c.
5015         (cp_tree_printer): Rename cp_printer; wire up to *_to_string
5016         instead of deleted print_* routines.  Handle %C, %L, %O, %Q also.
5017         (init_error): Adjust to match.
5018
5019 Sat Sep 22 09:15:31 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5020
5021         * Make-lang.in (CXX_C_OBJS): Add attribs.o.
5022
5023 2001-09-21  Richard Henderson  <rth@redhat.com>
5024
5025         * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
5026         (build_vtbl_initializer): Likewise.
5027         (build_vfn_ref): New.
5028         * cp-tree.h: Declare it.
5029         * call.c (build_over_call): Use it.
5030         * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
5031         * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
5032
5033 Fri Sep 21 08:16:19 2001  J"orn Rennecke <amylaar@redhat.com>
5034
5035         * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
5036
5037 2001-09-21  Joseph S. Myers  <jsm28@cam.ac.uk>
5038
5039         Table-driven attributes.
5040         * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
5041         * decl2.c (cplus_decl_attributes): Only take one attributes
5042         parameter.
5043         * cp-tree.c (cplus_decl_attributes): Update prototype.
5044         * class.c (finish_struct), decl.c (start_decl, start_function),
5045         decl2.c (grokfield), friend.c (do_friend), parse.y
5046         (parse_bitfield): Update calls to cplus_decl_attributes.
5047         * decl.c (grokdeclarator): Take a pointer to a single ordinary
5048         attribute list.
5049         * decl.h (grokdeclarator): Update prototype.
5050         * decl2.c (grokfield): Take a single ordinary attribute list.
5051         * friend.c (do_friend): Likewise.
5052         * decl.c (shadow_tag, groktypename, start_decl,
5053         start_handler_parms, grokdeclarator, grokparms, start_function,
5054         start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
5055         parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
5056         (process_template_parm, do_decl_instantiation): Pass single
5057         ordinary attribute lists around.
5058         * decl.c (grokdeclarator): Correct handling of nested attributes.
5059         Revert the patch
5060         1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
5061                 * decl.c (grokdeclarator): Embedded attrs bind to the right,
5062                 not the left.
5063         .
5064         * cp-tree.h (cp_valid_lang_attribute): Remove declaration
5065         (cp_attribute_table): Declare.
5066         * decl.c (valid_lang_attribute): Don't define.
5067         (lang_attribute_table): Define.
5068         (init_decl_processing): Initialize lang_attribute_table instead of
5069         valid_lang_attribute.
5070         * tree.c (cp_valid_lang_attribute): Remove.
5071         (handle_java_interface_attribute, handle_com_interface_attribute,
5072         handle_init_priority_attribute): New functions.
5073         (cp_attribute_table): New array.
5074         * decl2.c (import_export_class): Don't use
5075         targetm.valid_type_attribute.
5076
5077 2001-09-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
5078
5079         * Make-lang.in (cp/error.o): Depend on real.h
5080         * error.c: #include "real.h"
5081
5082 2001-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5083
5084         * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
5085         xmalloc/strcpy/strcat.
5086
5087 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5088
5089         * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
5090         Const-ification.
5091         * pt.c (tsubst_decl): Likewise.
5092
5093 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5094
5095         * decl2.c (lang_f_options): Const-ification.
5096         * lex.c (cplus_tree_code_name): Likewise.
5097         * spew.c (yyerror): Likewise.
5098
5099 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
5100
5101         PR c++/3986
5102         * class.c (force_canonical_binfo_r): Check & move an indirect
5103         primary base first.
5104         (force_canonical_binfo): Check that it's not already
5105         canonical.
5106         (mark_primary_virtual_base): Remove BINFO parameter.
5107         (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
5108
5109 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
5110
5111         Remove TYPE_NONCOPIED_PARTS.
5112         * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
5113         CLASSTYPE_PURE_VIRTUALS.
5114         (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
5115         * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
5116         (layout_class_type): Don't call fixup_inline_methods here ...
5117         (finish_struct_1): ... call it here.
5118
5119 2001-09-04  Mark Mitchell  <mark@codesourcery.com>
5120
5121         * decl.c (duplicate_decls): Remove code deadling with
5122         DECL_SAVED_INSNS.
5123         * decl2.c (finish_file): Likewise.
5124         * pt.c (instantiate_decl): Likewise.
5125         * semantics.c (expand_body): Don't defer local functions if
5126         they wouldn't be deferred for some other reason.  Don't
5127         generate RTL for functions that will not be emitted.
5128         (genrtl_start_function): Remove code deadling with
5129         DECL_SAVED_INSNS.
5130         (genrtl_finish_function): Likewise.
5131
5132 2001-09-04  Nathan Sidwell  <nathan@codesourcery.com>
5133
5134         PR c++/4203
5135         * call.c (build_over_call): Do not optimize any empty base
5136         construction.
5137
5138 2001-08-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5139
5140         * error.c (dump_template_decl): Output template parameters
5141         together with their specifiers.
5142         Output `class' prefix for template template parameter.
5143         (dump_decl): Fix formatting.
5144
5145 2001-08-30  Kurt Garloff  <garloff@suse.de>
5146
5147         * optimize.c (inlinable_function_p): Allow only smaller single
5148         functions. Halve inline limit after reaching recursive limit.
5149
5150 2001-08-30  Joern Rennecke <amylaar@redhat.com>
5151             Jason Merrill  <jason_merrill@redhat.com>
5152
5153         * class.c (build_vtable_entry_ref): Subtract in char*, not
5154         ptrdiff_t.
5155
5156 2001-08-23  Jason Merrill  <jason_merrill@redhat.com>
5157
5158         * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
5159         (build_cplus_array_type): Use cp_build_qualified_type, not
5160         TYPE_MAIN_VARIANT, to get an unqualified version.
5161
5162         * decl2.c (grok_alignof): Lose.
5163         (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
5164         * typeck.c (c_alignof): Lose.
5165         * semantics.c (finish_sizeof, finish_alignof): New.
5166         * parse.y: Use them.
5167         * cp-tree.h: Declare them.
5168
5169 2001-08-22  Jason Merrill  <jason_merrill@redhat.com>
5170
5171         * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
5172         Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
5173         * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
5174
5175 2001-08-19  Jakub Jelinek  <jakub@redhat.com>
5176
5177         * typeck2.c (add_exception_specifier): Only require complete type if
5178         not in processing template declaration.
5179
5180 2001-08-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5181
5182         * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
5183         GNU_xref_start_scope and GNU_xref_end_scope.
5184
5185         * tree.c (TYPE_HASH): Moved to ../tree.h.
5186
5187 2001-08-16  Mark Mitchell  <mark@codesourcery.com>
5188
5189         * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
5190         on COMPOUND_EXPRs.
5191
5192 2001-08-14  Richard Henderson  <rth@redhat.com>
5193
5194         * class.c, cp-tree.h (build_vfn_ref): Remove.
5195         * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
5196
5197 2001-08-13  Mark Mitchell  <mark@codesourcery.com>
5198
5199         * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
5200         empty class assignment as having side-effects to avoid
5201         spurious warnings.
5202
5203 2001-08-13  Zack Weinberg  <zackw@panix.com>
5204
5205         * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
5206         * except.c: Include libfuncs.h.
5207
5208 2001-08-11  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
5209
5210         * decl.c (grokdeclarator): Clarify diagnostic message.
5211
5212 2001-08-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5213
5214         * decl2.c (do_nonmember_using_decl): Replace using directive
5215         with using declaration in the error message.
5216
5217 2001-08-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5218
5219         * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
5220         criterion to avoid rebuilding expression tree instead of
5221         processing_template_decl.
5222
5223 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
5224
5225         Support named return value optimization for inlines, too.
5226         * decl.c (finish_function): Nullify returns here.
5227         * semantics.c (genrtl_start_function): Not here.
5228         (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
5229         (nullify_returns_r): No longer static.  Just clear RETURN_EXPR.
5230         Also nullify the CLEANUP_STMT for the nrv.
5231         * cp-tree.h: Declare it.
5232         * optimize.c (declare_return_variable): Replace the nrv with the
5233         return variable.
5234         * typeck.c (check_return_expr): Be more flexible on alignment check.
5235         Ignore cv-quals when checking for a matching type.
5236
5237 2001-08-09  Richard Henderson  <rth@redhat.com>
5238
5239         * decl2.c (finish_objects): Use target hooks instead of
5240         assemble_constructor and assemble_destructor.
5241
5242 2001-08-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
5243
5244         * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
5245
5246 2001-08-07  Nathan Sidwell  <nathan@codesourcery.com>
5247
5248         PR c++/3820
5249         Stop using TYPE_NONCOPIED_PARTS.
5250         * call.c (build_over_call): Be careful when copy constructing
5251         or assigning to an empty class.
5252         * class.c (check_bases_and_members): It has a
5253         COMPLEX_ASSIGN_REF if it has a vptr.
5254         (layout_class_type): Don't add empty class padding to
5255         TYPE_NONCOPIED_PARTS.
5256         (finish_struct_1): Don't add the VFIELD either.
5257         * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
5258         initialization.
5259
5260 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
5261
5262         * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
5263
5264 2001-08-06  Richard Henderson  <rth@redhat.com>
5265
5266         * decl2.c (finish_objects): Pass a symbol_ref and priority to
5267         assemble_{constructor,destructor}.  Remove priority handling.
5268
5269 2001-08-05  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
5270
5271         Don't allow template-id in using-declaration.
5272         * decl2.c (validate_nonmember_using_decl): Handle template-ids.
5273         (do_class_using_decl): Likewise.
5274
5275 2001-08-04  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
5276
5277         * cp/spew.c (read_token): No need to pop buffers.
5278
5279 2001-08-02  Stan Shebs  <shebs@apple.com>
5280
5281         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
5282         (fnaddr_from_vtable_entry): Remove decl.
5283         * method.c (use_thunk): Update comment.
5284
5285 2001-08-01  Andrew Cagney  <ac131313@redhat.com>
5286
5287         * repo.c (get_base_filename): Change return value to const char
5288         pointer.
5289
5290 2001-08-02  Nathan Sidwell  <nathan@codesourcery.com>
5291
5292         Kill -fhonor-std.
5293         * NEWS: Document.
5294         * cp-tree.h (flag_honor_std): Remove.
5295         (CPTI_FAKE_STD): Remove.
5296         (std_node): Remove comment about it being NULL.
5297         (fake_std_node): Remove.
5298         * decl.c (in_fake_std): Remove.
5299         (walk_namespaces_r): Remove fake_std_node check.
5300         (push_namespace): Remove in_fake_std code.
5301         (pop_namespace): Likewise.
5302         (lookup_name_real): Remove fake_std_node check.
5303         (init_decl_processing): Always create std_node. Always add
5304         std:: things there.
5305         (builtin_function): Always put non '_' fns in std.
5306         * decl2.c (flag_honor_std): Remove.
5307         (lang_f_options): Remove honor-std.
5308         (unsupported_options): Add honor-std.
5309         (set_decl_namespace): Remove fake_std_node check.
5310         (validate_nonmember_using_decl): Likewise.
5311         (do_using_directive): Likewise.
5312         (handle_class_head): Likewise.
5313         * dump.c (cp_dump_tree): Likewise.
5314         * except.c (init_exception_processing): Adjust.
5315         * init.c (build_member_call): Remove fake_std_node check.
5316         (build_offset_ref): Likewise.
5317         * lang-options.h: Remove -fhonor-std, -fno-honor-std.
5318         * rtti.c (init_rtti_processing): Adjust.
5319
5320 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
5321
5322         * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
5323         operand while calling cp_tree_equal.
5324
5325 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
5326
5327         The 3.0 ABI no longer has vbase pointer fields.
5328         * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
5329         FORMAT_VBASE_NAME): Remove.
5330         * method.c (do_build_copy_constructor): Adjust.
5331         (do_build_assign_ref): Adjust.
5332         * search.c (lookup_field_r): Adjust.
5333         * typeck.c (build_component_ref): Adjust.
5334
5335         The 3.0 ABI always has a vtable pointer at the start of every
5336         polymorphic class.
5337         * rtti.c (build_headof_sub): Remove.
5338         (build_headof): Adjust.
5339         (get_tinfo_decl_dynamic): No need to check flag_rtti
5340         here. Adjust.
5341         (create_real_tinfo_var): Explain why we need a hidden name.
5342
5343 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
5344
5345         PR c++/3631
5346         * class.c (update_vtable_entry_for_fn): The fixed adjustment
5347         of a virtual thunk should be from declaring base.
5348
5349 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
5350
5351         * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
5352         the shared virtual base, so preserving inheritance graph order.
5353
5354 2001-07-30  Andreas Jaeger  <aj@suse.de>
5355
5356         * decl2.c: Remove unused var global_temp_name_counter.
5357
5358 2001-07-28  Richard Henderson  <rth@redhat.com>
5359
5360         * method.c (pending_inlines): Remove.
5361
5362 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
5363
5364         * class.c (mark_primary_virtual_base): Don't adjust base
5365         offsets here.
5366         (dfs_unshared_virtual_bases): Adjust them here.
5367         (mark_primary_bases): Explain why we adjust at the end.
5368
5369 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
5370
5371         * class.c (finish_struct_1): When copying the primary base's
5372         VFIELD, make sure we find it is at offset zero.
5373
5374 2001-07-26  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5375
5376         * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
5377         tsubst_expr for default template arguments.
5378
5379 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
5380
5381         PR c++/3621
5382         * spew.c (yylex): Only copy the token's lineno, if it is
5383         nonzero.
5384
5385 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
5386
5387         PR c++/3624
5388         * call.c (resolve_args): Simplify, call
5389         convert_from_reference.
5390         (build_new_op): Resolve and convert from reference ARG1
5391         earlier. Adjust ARG2 & ARG3 resolve and conversion.
5392
5393 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
5394
5395         * decl.c (last_function_parm_tags): Remove.
5396         (current_function_parm_tags): Remove.
5397         (init_decl_processing): Adjust.
5398         (start_function): Adjust.
5399         (store_parm_decls): Adjust.
5400
5401         PR c++/3152
5402         * decl.c (grokdeclarator): Detect when a function typedef is
5403         declaring a function, and create last_function_parms correctly.
5404
5405 2001-07-25  Jason Merrill  <jason_merrill@redhat.com>
5406
5407         * call.c (joust): Only prefer a non-builtin candidate to a builtin
5408         one if they have the same signature.
5409
5410         * cvt.c (build_up_reference): Take DECL parm.  Check TREE_STATIC on
5411         it rather than toplevel_bindings_p.  Give it a mangled name if static.
5412         (convert_to_reference): Adjust.
5413         * decl2.c (get_temp_name): Lose.
5414         * mangle.c (mangle_ref_init_variable): New fn.
5415         (mangle_guard_variable): Strip the ref-init header.
5416         * cp-tree.h: Adjust.
5417         * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
5418         initializer.
5419         (grok_reference_init): Always use DECL_INITIAL.
5420
5421 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
5422
5423         PR c++/3416
5424         * call.c (build_conditional_expr): Recheck args after
5425         conversions.
5426         * cp-tree.h (build_conditional_expr): Move to correct file.
5427         * typeck.c (decay_conversion): Diagnose any unknown types
5428         reaching here.
5429         (build_binary_op): Don't do initial decay or default
5430         conversions on overloaded functions.
5431         (build_static_cast): Don't do a decay conversion here.
5432
5433 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
5434
5435         PR c++/3543
5436         * typeck.c (condition_conversion): Resolve an OFFSET_REF.
5437         * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
5438
5439 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
5440
5441         * class.c (build_vtbl_or_vbase_field): Remove, move into ...
5442         (create_vtbl_ptr): ... here.
5443
5444 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
5445
5446         * class.c (build_vbase_offset_vbtl_entries): Look for
5447         non-primary base of which we are a sub vtable.
5448
5449 2001-07-24  Phil Edwards  <pme@sources.redhat.com>
5450
5451         * semantics.c (finish_this_expr):  Remove unused code.
5452
5453 2001-07-24  Nathan Sidwell  <nathan@codesourcery.com>
5454
5455         Simplify rtti, now we've only one ABI.
5456         * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
5457         CPTI_TINFO_VAR_ID.
5458         (tinfo_decl_id, tinfo_var_id): Remove.
5459         (get_typeid_1): Remove.
5460         * rtti.c
5461         (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
5462         (typeid_ok_p): New function.
5463         (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
5464         (get_tinfo_decl): Remove old abi documentation.
5465         (tinfo_from_decl): Remove.
5466         (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
5467         (get_typeid_1): Remove.
5468         (get_base_offset): Remove.
5469         (synthesize_tinfo_var): Absorb get_base_offset.
5470         (create_real_tinfo_var): Don't use tinfo_decl_id.
5471
5472 2001-07-23  Graham Stott  <grahams@redhat.com>
5473
5474         * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
5475         variable has_two_argument_delete_p.
5476
5477 2001-07-21  Nathan Sidwell  <nathan@codesourcery.com>
5478
5479         Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
5480         * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
5481         (CPTI_INDEX_IDENTIFIER): Remove.
5482         (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
5483         (delta2_identifier): Remove.
5484         (index_identifier): Remove.
5485         (pfn_or_delta2_identifier): Remove.
5486         (flag_vtable_thunks): Remove.
5487         (VTABLE_DELTA2_NAME): Remove.
5488         (VTABLE_INDEX_NAME): Remove.
5489         (FNADDR_FROM_VTABLE_ENTRY): Adjust.
5490         (vfunc_ptr_type_node): Adjust.
5491         (VTABLE_NAME_PREFIX): Adjust.
5492         (build_vfn_ref): Lose first parameter.
5493         (fixup_all_virtual_upcast_offsets): Remove.
5494         * decl.c (initialize_predefined_identifiers): Remove
5495         delta2_identifier, index_identifier, pfn_or_delta2_identifier.
5496         (init_decl_processing): Remove no-vtable-thunk code.
5497         * decl2.c (flag_vtable_thunks): Remove.
5498         (mark_vtable_entries): Remove no-vtable-thunk code.
5499         * error.c (dump_decl): Remove no-vtable-thunk code.
5500         (dump_expr): Adjust ptr to member function code.
5501         * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
5502         code.
5503         * rtti.c (build_headof): Remove no-vtable-thunk code.
5504         (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
5505         * search.c (get_base_distance): Remove expand_upcast_fixups case.
5506         (virtual_context) Remove.
5507         (expand_upcast_fixups): Remove.
5508         (fixup_virtual_upcast_offsets): Remove.
5509         (fixup_all_virtual_upcast_offsets): Remove.
5510         * typeck.c (get_member_function_from_ptrfunc): Remove
5511         no-vtable-thunk code.
5512         * call.c (build_over_call): Adjust call to build_vfn_ref.
5513         * class.c (build_vfn_ref): Lose first parameter. Remove
5514         no-vtable-thunk code.
5515         (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
5516         (build_vtable_entry): Remove no-vtable-thunk code.
5517
5518 2001-07-20  Nathan Sidwell  <nathan@codesourcery.com>
5519
5520         Remove old-abi remnants. Remove comments about old abi
5521         behavior. Remove references to 'new-abi' in comments.
5522         * cp-tree.h: Adjust comments.
5523         (vbase_offsets_in_vtable_p): Delete.
5524         (vcall_offsets_in_vtable_p): Delete.
5525         (vptrs_present_everywhere_p): Delete.
5526         (all_overridden_vfuns_in_vtables_p): Delete.
5527         (merge_primary_and_secondary_vtables_p): Delete.
5528         (TYPE_CONTAINS_VPTR_P): Adjust.
5529         (VTT_NAME_PREFIX): Remove.
5530         (CTOR_VTBL_NAME_PREFIX): Remove.
5531         (init_vbase_pointers): Remove.
5532         * class.c: Adjust coments.
5533         (build_vbase_pointer_fields): Delete.
5534         (build_vbase_pointer): Remove old-abi code.
5535         (build_secondary_vtable): Likewise.
5536         (modify_all_vtables): Likewise.
5537         (create_vtable_ptr): Likewise.
5538         (layout_class_type): Likewise.
5539         (finish_struct_1): Likewise.
5540         (finish_vtbls): Likewise.
5541         (dfs_finish_vtbls): Delete.
5542         (build_vbase_offset_vtbl_entries): Remove old-abi code.
5543         * cvt.c: Adjust comments.
5544         * decl.c: Adjust comments.
5545         * decl2.c: Adjust comments.
5546         * init.c: Adjust comments.
5547         (construct_virtual_bases): Remove old-abi code.
5548         * lang-specs.h: Remove -fno-new-abi.
5549         * mangle.c: Adjust comments.
5550         * rtti.c: Adjust comments.
5551         (get_base_offset): Remove old-abi-code.
5552         * search.c: Adjust comments.
5553         (dfs_init_vbase_pointers): Remove.
5554         (dfs_vtable_path_unmark): Remove.
5555         (init_vbase_pointers): Remove.
5556         * semantics.c: Adjust comments.
5557         (emit_associated_thunks): Remove old-abi code.
5558         * typeck.c: Adjust comments.
5559
5560 2001-07-20  Daniel Berlin  <dan@cgsoftware.com>
5561
5562         * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
5563         params.h.
5564
5565 2001-07-19  Mark Mitchell  <mark@codesourcery.com>
5566
5567         * class.c (finish_struct_anon): Forbid nested classes.
5568
5569 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
5570
5571         * decl2.c: Don't include dwarfout.h and dwarf2out.h.
5572         * optimize.c: Include debug.h.
5573         (maybe_clone_body): Use debug hook.
5574         * semantics.c: Include debug.h.
5575         (expand_body): Use debug hook.
5576
5577 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
5578
5579         * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
5580
5581 2001-07-18  Mark Mitchell  <mark@codesourcery.com>
5582
5583         * class.c (type_requires_array_cookie): New function.
5584         (check_methods): Don't try to figure out whether the type needs a
5585         cookie here.
5586         (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
5587         * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
5588         (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
5589         * pt.c (instantiate_class_template): Don't set
5590         TYPE_VEC_DELETE_TAKES_SIZE.
5591         * NEWS: Document ABI changes from GCC 3.0.
5592
5593 2001-07-18  Xavier Delacour <xavier@fmaudio.net>,
5594             Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
5595
5596         * NEWS (Changes in GCC 3.0): Fix typo.
5597
5598 2001-07-13  Joseph S. Myers  <jsm28@cam.ac.uk>
5599
5600         * decl2.c (cplus_decl_attributes): Take a pointer to the node to
5601         which attributes are to be attached, and a flags argument.  Update
5602         call to decl_attributes.
5603         (grokfield): Update call to decl_attributes.
5604         * class.c (finish_struct): Update call to cplus_decl_attributes.
5605         * cp-tree.h (cplus_decl_attributes): Update prototype.
5606         * decl.c (start_decl, grokdeclarator, start_function): Update
5607         calls to decl_attributes and cplus_decl_attributes.
5608         * friend.c (do_friend): Update call to cplus_decl_attributes.
5609         * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
5610
5611 2001-07-12  Mark Mitchell  <mark@codesourcery.com>
5612
5613         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
5614         for `register' variables with an asm-specification.
5615
5616 2001-07-11  Mark Mitchell  <mark@codesourcery.com>
5617
5618         * semantics.c (finish_asm_stmt): Mark the output operands
5619         to an asm addressable, if necessary.
5620
5621 2001-07-11  Ben Elliston  <bje@redhat.com>
5622
5623         * Revert this change -- there is a subtle bug.
5624
5625         PR c++/80
5626         * decl.c (finish_enum): New "attributes" argument; pass it to
5627         cplus_decl_attributes.  Use a narrower type if the enum is packed.
5628         * cp-tree.h (finish_enum): Adjust prototype.
5629         * parse.y (enum_head): New non-terminal.
5630         (structsp): Use it. Enums now may be preceded or followed by
5631         optional attributes -- pass their chained tree to finish_enum().
5632         * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
5633
5634 2001-07-10  Mark Mitchell  <mark@codesourcery.com>
5635
5636         * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
5637         variables.
5638
5639 2001-07-10  Jason Merrill  <jason_merrill@redhat.com>
5640
5641         * semantics.c (cp_expand_stmt): Fix for null
5642         current_function_return_value.
5643
5644 2001-07-10  Jan van Male  <jan.vanmale@fenk.wau.nl>
5645
5646         * call.c (build_op_delete_call): Initialize fn.
5647         (convert_like_real): Delete conditional.
5648         (joust): Initialize *w and *l.
5649         * class.c: Add prototype for binfo_ctor_vtable.
5650         (get_primary_binfo): Initialize result.
5651         * init.c (build_java_class_ref): Initialize name.
5652
5653 2001-07-09  Erik Rozendaal  <dlr@acm.org>
5654
5655         * typeck.c (unary_complex_lvalue): Do not duplicate the
5656         argument to modify, pre-, or post-increment when used as an
5657         lvalue and when the argument has side-effects.
5658
5659 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
5660
5661         * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
5662         (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES.  Call
5663         cplus_decl_attributes even if attrs is NULL.
5664         * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
5665
5666 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
5667
5668         * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
5669         calls to decl_attributes.
5670
5671 2001-07-06  Ira Ruben   <ira@apple.com>
5672
5673         * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
5674         be DECL_TEMPLATE_RESULT.
5675
5676 2001-07-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5677
5678         * cp-tree.h (copy_template_template_parm): Rename to ...
5679         (bind_template_template_parm): ... here.
5680         * tree.c (copy_template_template_parm): Rename to ...
5681         (bind_template_template_parm): ... here.  Remove the case when
5682         NEWARGS is NULL_TREE.
5683         (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
5684         BOUND_TEMPLATE_TEMPLATE_PARM.
5685         * pt.c (lookup_template_class): Adjust.
5686
5687 2001-07-05  Jason Merrill  <jason_merrill@redhat.com>
5688
5689         * cvt.c (convert_lvalue): New fn.
5690         * cp-tree.h: Declare it.
5691         * method.c (do_build_assign_ref): Use it.
5692         (do_build_copy_constructor): Convert parm to base types
5693         before calling base constructors.
5694
5695         * typeck.c (check_return_expr): Check DECL_ALIGN instead of
5696         DECL_USER_ALIGN.  Check flag_elide_constructors instead of
5697         optimize.
5698         * semantics.c (cp_expand_stmt): Don't destroy the named return value.
5699
5700 2001-07-02  Nathan Sidwell  <nathan@codesourcery.com>
5701
5702         * optimize.c (optimize_inline_calls): New function, broken out
5703         of ...
5704         (optimize_function): ... here. Call it. Don't inline if it is
5705         a thunk.
5706         (dump_function): Print name of dump flag causing this dump.
5707         * semantics.c (expand_body): Move thunk inline check to
5708         optimize_function.
5709
5710 2001-06-29  Joseph S. Myers  <jsm28@cam.ac.uk>
5711
5712         * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
5713         (comptypes): Use target.comp_type_attributes.
5714
5715 2001-06-29  Nathan Sidwell  <nathan@codesourcery.com>
5716
5717         * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
5718
5719 2001-06-28  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
5720
5721         * error.c (lang_print_error_function): Add a `diagnostic_context *'
5722         parameter. Tweak.
5723
5724 2001-06-27  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
5725
5726         * decl2.c (import_export_class): Update.
5727
5728 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
5729
5730         * error.c (init_error): Adjust settings.
5731
5732 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
5733
5734         * error.c (init_error): Adjust settings.
5735
5736 2001-06-19  Richard Sandiford  <rsandifo@redhat.com>
5737
5738         * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
5739         return pointers to data members by reference rather than by value.
5740
5741 2001-06-18  Jason Merrill  <jason_merrill@redhat.com>
5742
5743         Implement the Named Return Value optimization.
5744         * cp-tree.h (struct cp_language_function): Add x_return_value.
5745         (current_function_return_value): Now a macro.
5746         * decl.c: Don't define it.
5747         (define_label, finish_case_label): Don't clear it.
5748         (init_decl_processing): Don't register it with GC.
5749         * semantics.c (genrtl_finish_function): Don't check it for
5750         no_return_label.  Copy the RTL from the return value to
5751         current_function_return_value and walk, calling...
5752         (nullify_returns_r): ...this new fn.
5753         * typeck.c (check_return_expr): Set current_function_return_value.
5754
5755 2001-06-15  Jason Merrill  <jason_merrill@redhat.com>
5756
5757         * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
5758         sharing a ctor vtable with.  Merge code for cases 1 and 2.
5759         (binfo_ctor_vtable): New fn.
5760         (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
5761
5762 2001-06-14  Jason Merrill  <jason_merrill@redhat.com>
5763
5764         * class.c (dfs_find_final_overrider): Fix logic.
5765
5766         * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
5767         virtual thunk instead of non-virtual.
5768         (get_matching_virtual): Uncomment.
5769
5770         * pt.c (unify): Don't recurse between the POINTER_TYPE and the
5771         OFFSET_TYPE.  If we're adding cv-quals, the extra ones would be on
5772         PARM, not ARG.
5773
5774 2001-06-14  Nathan Sidwell  <nathan@codesourcery.com>
5775
5776         * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
5777         we've not emerged from the hierarchy of RTTI_BINFO on reaching
5778         a non-virtual base.
5779
5780 2001-06-13  Mark Mitchell  <mark@codesourcery.com>
5781
5782         * NEWS: Update release number.
5783
5784 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
5785
5786         PR c++/3130, c++/3131, c++/3132
5787         * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
5788         * class.c (force_canonical_binfo_r): Move
5789         BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
5790         virtual bases unless they're primary and what they're primary
5791         too has been moved.
5792         (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
5793         with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
5794         BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
5795         derived binfo.
5796         (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
5797         (layout_nonempty_base_or_field): Add most derived type
5798         parameter. Adjust.
5799         (layout_empty_base): Likewise.
5800         (build_base_field): Likewise.
5801         (build_base_fields): Likewise.
5802         (propagate_binfo_offsets): Add most derived type
5803         parameter. Skip non canonical virtual bases too.
5804         (dfs_set_offset_for_unshared_vbases): Don't skip primary
5805         bases. Do skip canonical bases.
5806         (layout_virtual_bases): Adjust.
5807         (layout_class_type): Adjust.
5808         (dfs_get_primary_binfo): Build list of virtual primary base
5809         candidates.
5810         (get_primary_binfo): Check that the shared virtual primary
5811         base candidate was found first.
5812         (accumulate_vtbl_inits): Don't do anything for non-vptr
5813         containing binfos. For case 1 primary virtual bases, keep
5814         checking that we've not emerged from the hierarchy of RTTI_BINFO.
5815
5816 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
5817
5818         PR c++/3089
5819         * class.c (dfs_accumulate_vtbl_inits): Always walk down the
5820         hierarchy looking for primary bases for a ctor
5821         vtable. Recursively call oneself, if we meet our primary via
5822         this route and haven't met it yet via inheritance graph order.
5823
5824 2001-06-11  Mark Mitchell  <mark@codesourcery.com>
5825
5826         * lang-options.h: Emit documentation for -fno-honor-std, not
5827         -fhonor-std.
5828
5829 2001-06-10  Alexandre Oliva  <aoliva@redhat.com>
5830
5831         * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
5832         Don't clobber delta.
5833         (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
5834
5835 2001-06-10  Mark Mitchell <mark@codesourcery.com>
5836             Gabriel Dos Reis  <gdr@codesourcery.com>
5837
5838         * Make-lang.in (cp/call.o): Depend on diagnostic.h
5839         (cp/typeck.o): Depend on diagnostic.h
5840         (cp/typeck2.o): Depend on diagnostic.h
5841         (cp/repo.o): Depend on dignostic.h
5842         * typeck.c: #include diagnostic.h
5843         (convert_for_initialization): Remove extern declaration for
5844         warningcount and errorcount.
5845
5846         * call.c: #include diagnostic.h
5847         (convert_like_real): Remove extern declaration for warnincount and
5848         errorcount.
5849
5850         * repo.c: #include diagnostic.h
5851         * typeck2.c: #include diagnostic.h
5852
5853 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
5854
5855         * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
5856         in previous change.
5857
5858 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
5859
5860         PR c++/2929
5861         * friend.c (do_friend): Use push_decl_namespace for classes at
5862         namespace scope.
5863
5864 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
5865             Jason Merrill <jason_merrill@redhat.com>
5866
5867         PR c++/3061
5868         * class.c (build_secondary_vtable): Use assert, rather than an error
5869         message.
5870         (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
5871         (dfs_accumulate_vtbl_inits): A lost primary virtual base may
5872         be between ORIG_BINFO and RTTI_BINFO, but neither of them.
5873         Don't set BINFO_VTABLE for a primary virtual base.
5874
5875 2001-06-07  Mark Mitchell  <mark@codesourcery.com>
5876
5877         * decl.c (duplicate_decls): Update source position information
5878         when a template function is defined.
5879
5880 2001-06-07  Phil Edwards  <pme@sources.redhat.com>
5881
5882         * lang-specs.h:  Move -D_GNU_SOURCE to config/linux.h.
5883
5884 2001-06-07  Nathan Sidwell  <nathan@codesourcery.com>
5885
5886         PR c++/2914
5887         * decl.c (pushtag): Don't push into a complete type's scope.
5888
5889 2001-06-06  Jason Merrill  <jason_merrill@redhat.com>
5890
5891         * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
5892         (struct lang_decl_flags): Lose generate_with_vtable_p.
5893         (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
5894         * class.c (copy_virtuals): Adjust.
5895         * decl2.c (mark_vtable_entries): Adjust.
5896         * method.c (make_thunk, build_vtable_entry): Adjust.
5897         * class.c (update_vtable_entry_for_fn): Only look as far as the
5898         first defining class.
5899         (build_vtbl_initializer): Put nothing in the slot for a function only
5900         defined in a lost primary virtual base.
5901         (add_vcall_offset_vtbl_entries_1): Use the same code for
5902         the lost primary case and the normal case.
5903         (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
5904         (get_vfield_offset, get_derived_offset): Lose.
5905         (dfs_find_final_overrider): Use look_for_overrides_here.
5906         (get_matching_virtual): New fn.
5907         * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
5908         not BV_VCALL_INDEX.
5909         * search.c (look_for_overrides_here): Split out from...
5910         (look_for_overrides_r): Here.
5911
5912         * class.c (find_final_overrider): Return error_mark_node on error.
5913
5914         * decl2.c (key_method): #if 0 accidental change.
5915
5916 2001-06-06  John David Anglin  <dave@hiauly1.hia.nrc.ca>
5917
5918         * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
5919         (build_over_call): Likewise.
5920         * decl.c (grokparms): Likewise.
5921         * pt.c (tsubst_decl): Likewise.
5922         * typeck.c (convert_arguments): Likewise.
5923
5924 2001-06-05  Mark Mitchell  <mark@codesourcery.com>
5925
5926         * semantics.c (begin_class_definition): Robustify.
5927
5928         * pt.c (instantiate_decl): Tell the repository code about the
5929         clones, not the cloned functions.
5930         * repo.c (repo_template_used): Explicitly instantiate the cloned
5931         function, not the clones.
5932
5933 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
5934
5935         * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
5936         ICS_BAD_FLAG on created conversion.
5937         (compare_ics): Break out rank.
5938
5939 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
5940
5941         * decl.c (xref_tag): Remove extraneous %s on dependent name
5942         lookup warning.
5943
5944 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
5945
5946         * class.c (layout_vtable_decl): Fix off by one error on
5947         build_index_type.
5948         (build_vtt): Likewise.
5949         (build_ctor_vtbl_group): Likewise.
5950
5951 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
5952
5953         * class.c (maybe_indent_hierarchy): New function.
5954         (dump_class_hierarchy_r): Add flags. Dump extra binfo
5955         information, if enabled. Use maybe_indent_hierarchy. Adjust
5956         output format.
5957         (dump_class_hierarchy): Adjust prototype. Adjust output format.
5958         (dump_array, dump_vtable, dump_vtt): New functions.
5959         (finish_struct_1): Adjust hierarchy dumping.
5960         (initialize_vtable): Call dump_vtable.
5961         (build_vtt): Call dump_vtt.
5962         (build_ctor_vtbl_group): Call dump_vtable.
5963         * decl2.c (flag_dump_class_layout): Remove.
5964         (cxx_decode_option): Remove dump translation unit
5965         and dump class hierarchy check. Call dump_switch_p.
5966         (finish_file): Adjust dumping.
5967         (dump.c): Only dump base classes if not TDF_SLIM.
5968         Only dump namespace members if not TDF_SLIM.
5969         * optimize.c (dump_function): New function.
5970         (optimize_function): Call dump_function.
5971         * semantics.c (expand_body): Use dump_enabled_p.
5972
5973 2001-06-01  Nathan Sidwell  <nathan@codesourcery.com>
5974
5975         PR g++/2936
5976         Part missed from first commit
5977         * decl2.c (finish_anon_union): Copy context.
5978
5979 2001-05-30  Nathan Sidwell  <nathan@codesourcery.com>
5980
5981         PR g++/2936
5982         * optimize.c (remap_decl): Remap anonymous aggregate members too.
5983
5984 2001-05-26  Nathan Sidwell  <nathan@codesourcery.com>
5985
5986         PR g++/2823
5987         * semantics.c (expand_body): Don't optimize thunks.
5988
5989 2001-05-25  Sam TH  <sam@uchicago.edu>
5990
5991         * cp-tree.h lex.h: Fix header include guards.
5992
5993 2001-05-25  Mark Mitchell <mark@codesourcery.com>
5994
5995         * decl.c (init_decl_processing): Tweak.
5996
5997 2001-05-24  Mark Mitchell  <mark@codesourcery.com>
5998
5999         * decl.c (duplicate_decls): Tidy.
6000         (init_decl_processing): Always set flag_no_builtin.
6001
6002 2001-05-24  Nathan Sidwell  <nathan@codesourcery.com>
6003
6004         PR c++/2184
6005         * decl2.c (do_local_using_decl): Push the decls, even in a
6006         template.
6007
6008 2001-05-22  Mark Mitchell  <mark@codesourcery.com>
6009
6010         * optimize.c (initialize_inlined_parameters): Don't set
6011         TREE_READONLY for a VAR_DECL taking the place of an inlined
6012         PARM_DECL.
6013
6014 2001-05-22  Jason Merrill  <jason_merrill@redhat.com>
6015
6016         * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
6017         * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
6018         attribute.
6019
6020 2001-05-22  Joseph S. Myers  <jsm28@cam.ac.uk>
6021
6022         * parse.y: Refer to compound literals as such, not as
6023         constructor-expressions.
6024
6025 2001-05-21  Mark Mitchell  <mark@codesourcery.com>
6026
6027         * call.c (build_op_delete_call): Ignore exception-specifications
6028         when looking for matching delete operators.
6029         * init.c (build_new_1): Compute whether or not the allocation
6030         function used is a placement allocation function or not, and
6031         communicate this information to build_op_delete_call.
6032
6033 2001-05-21  Jason Merrill  <jason_merrill@redhat.com>
6034
6035         * class.c (build_vtable_entry_ref): Lose vtbl parm.  Fix for new abi.
6036         (build_vtbl_ref): Adjust.
6037         (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
6038         * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
6039         Re-add vtable-gc.
6040         (unsupported_options): Correspondingly.
6041
6042         * decl2.c (maybe_make_one_only): Check flag_weak, not
6043         supports_one_only().
6044
6045         * cp-tree.def (START_CATCH_STMT): Lose.
6046         * dump.c (cp_dump_tree): Don't dump it.  Do dump HANDLER_PARMS.
6047         * tree.c (cp_statement_code_p): Don't case it.
6048         * semantics.c (cp_expand_stmt): Likewise.
6049         * cp-tree.h (START_CATCH_TYPE): Lose.
6050         (HANDLER_TYPE): New.
6051         * except.c (expand_start_catch_block): Don't start any blocks.
6052         Return the type.
6053         (expand_end_catch_block): Don't end any blocks.
6054         * parse.y (handler): Don't pass anything from finish_handler_parms
6055         to finish_handler.
6056         * pt.c (tsubst_expr): Likewise.
6057         * semantics.c (begin_handler): Call note_level_for_catch here.
6058         (finish_handler_parms): Don't return anything.
6059         (genrtl_catch_block, begin_catch_block): Lose.
6060         (genrtl_handler): Call expand_start_catch here.
6061
6062 2001-05-18  Jason Merrill  <jason_merrill@redhat.com>
6063
6064         * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
6065         (get_vtable_decl, build_vtt): Not here.
6066
6067 2001-05-20  Nathan Sidwell  <nathan@codesourcery.com>
6068
6069         PR c++/2781
6070         * optimize.c (update_cloned_parm): Copy addressability and other
6071         flags.
6072
6073 2001-05-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6074
6075         * pt.c (determine_specialization): Ignore artificial functions.
6076
6077 2001-05-20  Neil Booth  <neil@daikokuya.demon.co.uk>
6078
6079         * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
6080         (C_RID_CODE): Remove.
6081         * lex.c (cxx_init_options): Call set_identifier_size.  Update.
6082         (init_parse): Don't do it here.
6083
6084 2001-05-18  Diego Novillo  <dnovillo@redhat.com>
6085
6086         * decl2.c (finish_objects): Use the original SYMBOL_REF from the
6087         function declaration to avoid stripping the symbol's attributes.
6088
6089 2001-05-18  Nathan Sidwell  <nathan@codesourcery.com>
6090
6091         * decl.c (pushdecl): Adjust error string.
6092         (xref_tag): Adjust friend class injection warning. Remove the
6093         inherited name from the class shadowed scope.
6094
6095 2001-05-17  Mark Mitchell  <mark@codesourcery.com>
6096
6097         * except.c (cp_protect_cleanup_actions): New function.
6098         (init_exception_processing): Don't set protect_cleanup_actions
6099         here.  Do set lang_protect_cleanup_actions.
6100
6101 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
6102
6103         * spew.c (read_token): Call yyerror on all unexpected tokens.
6104
6105 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
6106
6107         * init.c (member_init_ok_or_else): Take a tree rather than
6108         string for name.
6109         (expand_member_init): Adjust.
6110
6111 2001-05-14  Nick Clifton  <nickc@cambridge.redhat.com>
6112
6113         * decl.c (duplicate_decls): Suppress warning about duplicate
6114         decls if the first decl is a friend.
6115
6116 2001-05-12  Zack Weinberg  <zackw@stanford.edu>
6117
6118         * except.c (choose_personality_routine): Export.  Add
6119         explanatory comment.  Take an enum languages, not a boolean.
6120         (initialize_handler_parm): Adjust to match.
6121         * cp-tree.h: Prototype choose_personality_routine.
6122         * lex.c (handle_pragma_java_exceptions): New function.
6123         (init_cp_pragma): Register #pragma GCC java_exceptions.
6124
6125 2001-05-12  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
6126
6127         * method.c (build_mangled_C99_name): Remove unused prototype.
6128
6129 2001-05-12  Alexandre Oliva  <aoliva@redhat.com>
6130
6131         * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
6132         * typeck.c (get_member_function_from_ptrfunc,
6133         build_ptrmemfunc, expand_ptrmemfunc_cst): Take
6134         TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
6135
6136         Reverted Geoff Keating's 2001-05-03's patch.
6137
6138 2001-05-11  Ira Ruben   <ira@apple.com>
6139
6140         * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
6141
6142 2001-05-11  Neil Booth  <neil@daikokuya.demon.co.uk>
6143
6144         * cp-tree.h (finish_label_expr, lookup_label): Delete.
6145         * parse.y: Update for '&&'; don't issue warning here.
6146         * semantics.c (finish_label_expr): Delete.
6147
6148 2001-05-07  Mark Mitchell  <mark@codesourcery.com>
6149
6150         * splay-tree.h (splay_tree_max): New function.
6151         (splay_tree_min): Likewise.
6152
6153 2001-05-03  Geoffrey Keating  <geoffk@redhat.com>
6154
6155         * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
6156         (pfn_vflag_identifier): Define.
6157         Update comment about layout of pointer functions.
6158         (build_ptrmemfunc1): Update prototype.
6159         (expand_ptrmemfunc_cst): Update prototype.
6160         * decl.c (initialize_predefined_identifiers): Initialize
6161         pfn_vflag_identifier.
6162         (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
6163         an extra field to the type.
6164         * expr.c (cplus_expand_constant): Pass 'flag' between
6165         expand_ptrmemfunc_cst and build_ptrmemfunc1.
6166         * typeck.c (get_member_function_from_ptrfunc): When
6167         FUNCTION_BOUNDARY < 16, look at additional field to determine
6168         if a pointer-to-member is a real pointer or a vtable offset.
6169         (build_ptrmemfunc1): Add new parameter to contain extra field.
6170         (build_ptrmemfunc): Pass the extra field around.
6171         (expand_ptrmemfunc_cst): Add new parameter to return extra field.
6172         (pfn_from_ptrmemfunc): Ignore the extra field.
6173
6174 2001-05-03  Mark Mitchell  <mark@codesourcery.com>
6175
6176         * cp-tree.h (flag_inline_trees): Update documentation.
6177         * decl.c (init_decl_processing): Adjust handling of
6178         flag_inline_functions and flag_inline_trees to support -O3.
6179         (grokfndecl): Set DECL_INLINE on all functions if that's what
6180         the user requested.
6181         (save_function_data): Clear DECL_INLINE in
6182         current_function_cannot_inline is non-NULL.
6183         * decl2.c (flag_inline_trees): Update documentation.
6184
6185 2001-05-03  Nathan Sidwell  <nathan@codesourcery.com>
6186
6187         * dump.c (cp_dump_tree, USING_STMT case): New case.
6188         * tree.c (cp_statement_code_p): Add USING_STMT.
6189         * decl2.c (do_using_directive): Add the using directive statement.
6190
6191         * tree.c (walk_tree): Reformat an if block.
6192
6193 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
6194
6195         * decl.c (compute_array_index_type): Don't try to do anything with
6196         the indices when processing a template.
6197
6198 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6199
6200         * call.c: NULL_PTR -> NULL.
6201         * class.c: Likewise.
6202         * cvt.c: Likewise.
6203         * decl.c: Likewise.
6204         * decl2.c: Likewise.
6205         * except.c: Likewise.
6206         * init.c: Likewise.
6207         * rtti.c: Likewise.
6208         * search.c: Likewise.
6209         * tree.c: Likewise.
6210         * typeck.c: Likewise.
6211         * typeck2.c: Likewise.
6212
6213 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
6214
6215         * decl2.c (do_using_directive): Revert previous patch.
6216
6217 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
6218
6219         * cp-tree.def (USING_STMT): New statement node.
6220         * cp-tree.h (USING_STMT_NAMESPACE): New macro.
6221         * decl2.c (do_using_directive): Add USING_STMT to statement
6222         tree. Don't emit errors when processing template decl.
6223         * pt.c (tsubst_expr, USING_STMT case): New case.
6224         * semantics.c (cp_expand_stmt, USING_STMT case): New case.
6225
6226 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
6227
6228         * call.c (build_new_op): Convert args from reference here.
6229         (build_conditional_expr): Don't convert here.
6230
6231 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
6232
6233         * spew.c (last_token_id): New static variable.
6234         (read_token): Set it here.
6235         (yyerror): Use it here.
6236
6237 2001-04-30  Richard Henderson  <rth@redhat.com>
6238
6239         * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
6240         * decl.c: Likewise.
6241
6242 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
6243
6244         * gxxint.texi: Remove.
6245         * Make-lang.in: Remove all traces of gxxint.texi.
6246
6247 Mon Apr 30 16:14:10 2001  Mark P Mitchell  <mark@codesourcery.com>
6248
6249         * decl2.c (start_static_initialization_or_destruction): Correct
6250         logic to handle the -fno-use-cxa-atexit case.
6251
6252 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
6253
6254         * optimize.c (update_cloned_parm): New function.
6255         (maybe_clone_body): Use it.  Update the `this' parameter too.
6256
6257 2001-04-29  Joseph S. Myers  <jsm28@cam.ac.uk>
6258
6259         * decl2.c (unsupported_options): Add new-abi.
6260         * lang-options.h: Remove no longer supported options.
6261
6262 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
6263
6264         * except.c (can_convert_eh): Don't check template parms,
6265         typename types etc.
6266
6267 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
6268
6269         * optimize.c (maybe_clone_body): Copy parameter names and locations.
6270
6271 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
6272
6273         * cp-tree.h (adjust_clone_args): Prototype new function.
6274         * class.c (adjust_clone_args): New function.
6275         * decl.c (start_function): Call it for in charge ctors.
6276
6277 2001-04-26  Mark Mitchell  <mark@codesourcery.com>
6278
6279         * method.c (use_thunk): Make sure that thunks really are emitted
6280         when requested.
6281
6282 2001-04-26  Nathan Sidwell <nathan@codesourcery.com>
6283
6284         * mangle.c (write_chars): New macro.
6285         (hwint_to_ascii): New function
6286         (write_number): Use it.
6287         (write_integer_cst): Deal with really big numbers.
6288
6289 2001-04-25  Mark Mitchell  <mark@codesourcery.com>
6290
6291         * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
6292         the clone.
6293
6294 2001-04-25  Nathan Sidwell  <nathan@codesourcery.com>
6295
6296         * decl.c (grokdeclarator): Set context of namespace scope
6297         TYPE_DECLS.
6298
6299 2001-04-24  Zack Weinberg  <zackw@stanford.edu>
6300
6301         * cp/optimize.c: Include hashtab.h.
6302         (struct inline_data): Add tree_pruner.
6303         (expand_call_inline, expand_calls_inline): Use it when calling
6304         walk_tree.
6305         (optimize_function): Initialize and free tree_pruner.
6306
6307 2001-04-24  Nathan Sidwell <nathan@codesourcery.com>
6308
6309         Lazy __FUNCTION__ generation.
6310         * cp-tree.def (FUNCTION_NAME): Remove.
6311         * cp-tree.h (function_name_declared_p): Remove.
6312         (cp_fname_init): Prototype.
6313         * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
6314         don't call declare_function_name. Call start_fname_decls.
6315         (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
6316         clobber the line number.
6317         (cp_fname_init): New function.
6318         (start_function): Call start_fname_decls.
6319         (finish_function): Call finish_fname_decls.
6320         * lex.c (reswords): Add slots for __FUNCTION__ et al.
6321         (rid_to_yy): Add mappings for __FUNCTION__ et al.
6322         * optimize.c (maybe_clone_body): Remove function_name_declared_p.
6323         * parse.y (VAR_FUNC_NAME): New token.
6324         (primary): Add VAR_FUNC_NAME.
6325         * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
6326         generation.
6327         (tsubst, FUNCTION_NAME case): Remove.
6328         (tsubst_copy, FUNCTION_NAME case): Remove.
6329         (tsubst_expr, DECL_STMT case): Be careful with a
6330         DECL_PRETTY_FUNCTION_P.
6331         (instantiate_decl): Remove function_name_declared_p.
6332         * semantics.c (begin_compound_statement): Don't call
6333         declare_function_name here.
6334         (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
6335         (finish_translation_unit): Call finish_fname_decls.
6336         (expand_body): Remove function_name_declared_p.
6337         * typeck2.c (digest_init): Allow any ERROR_MARK.
6338
6339 2001-04-24  Nathan Sidwell  <nathan@codesourcery.com>
6340
6341         * pt.c (tsubst_decl): Use VOID_TYPE_P.
6342         * semantics.c: Fix some typos.
6343
6344 2001-04-23  Phil Edwards  <pme@sources.redhat.com>
6345
6346         * cp/decl2.c (flag_honor_std):  Always initialize to 1.
6347
6348 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6349
6350         * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
6351
6352 2001-04-23  Jason Merrill  <jason_merrill@redhat.com>
6353
6354         * except.c (build_throw): Wrap the initialization of the exception
6355         object in a MUST_NOT_THROW_EXPR.
6356         (do_free_exception): #if 0.
6357
6358 2001-04-20  Mark Mitchell  <mark@codesourcery.com>
6359
6360         * cp-tree.h (finish_enum): Change prototype.
6361         * decl.c (finish_enum): Reorganize.
6362         * parse.y (structsp): Adjust calls to finish_enum.
6363
6364 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
6365
6366         * tree.c (cp_tree_equal): Adjust final switch formatting. Add
6367         't' case.
6368
6369 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
6370
6371         * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
6372         (layout_empty_base): Return at end flag.
6373         (build_base_field): Likewise.
6374         (build_base_fields): Likewise.
6375         (layout_virtual_bases): Don't add 1 to eoc value.
6376         (end_of_class): Use full size for empty bases.
6377         (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
6378         empty bases. Don't add 1 to eoc value. Only add trailing padding
6379         if we're an empty class with no empty bases.
6380         (dump_class_hierarchy): Dump size and alignment.
6381
6382 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
6383
6384         * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
6385         ICS_BAD_FLAG.
6386
6387 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
6388
6389         * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
6390         is found, look first if name does not match the structure name.
6391
6392 2001-04-19  Mark Mitchell  <mark@codesourcery.com>
6393
6394         * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
6395         set.
6396         (SET_DECL_LANGUAGE): New macro.
6397         * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
6398         (pushdecl): Likewise.
6399         (build_library_fn_1): Likewise.
6400         (build_cp_library_fn): Likewise.
6401         (grokfndecl): Likewise.
6402         (grokvardecl): Mark `extern "C"' variables as having C linkage.
6403         * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
6404         * lex.c (retrofit_lang_decl): Likewise.
6405         * mangle.c (mangle_decl_string): Don't mangle the names of
6406         variables declared with C language linkage.
6407         * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
6408
6409 2001-04-18  John David Anglin  <dave@hiauly1.hia.nrc.ca>
6410
6411         * semantics.c (simplify_aggr_init_exprs_r): Don't restore
6412         flag_access_control from uninitialized storage.
6413
6414 2001-04-15  Mark Mitchell  <mark@codesourcery.com>
6415
6416         * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
6417         * mangle.c (write_pointer_to_member_type): Fix mangling of
6418         pointers to cv-qualified member function types.
6419
6420         * init.c (build_delete): Create a SAVE_EXPR for the address if
6421         we're going to use it more than once.
6422
6423 2001-04-13  Mark Mitchell  <mark@codesourcery.com>
6424
6425         * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
6426         (expand_ptremfunc_cst): Change prototype.
6427         (delta2_from_ptrmemfunc): Remove.
6428         * expr.c (cplus_expand_constant): Adjust call to
6429         expand_ptrmemfunc_cst.
6430         * typeck.c (build_ptrmemfunc1): Simplify.
6431         (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
6432         results in a constant.
6433         (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
6434         (delta2_from_ptrmemfunc): Remove.
6435         (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
6436
6437 2001-04-12  Jason Merrill  <jason_merrill@redhat.com>
6438
6439         * cp-tree.h (decl_namespace_list): New macro.
6440         (struct saved_scope): Add decl_ns_list.
6441         * decl.c (mark_saved_scope): Mark it.
6442         * decl2.c: Lose static decl_namespace_list.
6443         (init_decl2): Don't save it.
6444
6445 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6446
6447         * cp-tree.h (warn_return_type, yylex): Delete redundant
6448         declarations.
6449
6450         * decl.c (current_class_depth, global_namespace): Likewise.
6451
6452         * decl2.c (current_class_depth, flag_gnu_xref): Likewise
6453
6454         * repo.c (flag_use_repository): Likewise.
6455
6456 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6457
6458         * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
6459         set_block, pushdecl, getdecls, gettags, init_decl_processing,
6460         maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
6461         lvalue_or_else, print_lang_statistics, comp_target_types,
6462         unsigned_type, signed_type, signed_or_unsigned_type,
6463         build_function_call, mark_addressable, incomplete_type_error):
6464         Delete redundant declarations.
6465
6466 2001-04-11  Jason Merrill  <jason_merrill@redhat.com>
6467
6468         * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
6469         (TYPE_ANONYMOUS_P): New macro.
6470         (TAGGED_TYPE_P): New macro.
6471         * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
6472         (grokfndecl, grokvardecl, grokdeclarator): Likewise.
6473         * tree.c (no_linkage_helper): Likewise.
6474         * semantics.c (begin_class_definition): Likewise.
6475         * pt.c (convert_template_argument): Likewise.
6476         * lex.c (check_for_missing_semicolon): Likewise.
6477
6478 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
6479
6480         * class.c (dfs_unshared_virtual_bases): New function.
6481         (mark_primary_bases): Call it.
6482         (check_bases): Ignore virtual bases when determining
6483         nearly-emptiness.
6484
6485 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
6486
6487         * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
6488
6489 2001-04-11  Mark Mitchell  <mark@codesourcery.com>
6490
6491         * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
6492         cloned function to the clone.
6493
6494 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6495
6496         * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
6497
6498         * semantics.c: Include expr.h.
6499
6500 2001-04-11  Nathan Sidwell  <nathan@codesourcery.com>
6501
6502         * method.c (implicitly_declare_fn): Commonize code for copy ctor
6503         and assignment op. Set TREE_USED for parameter.
6504
6505 2001-04-10  Mark Mitchell  <mark@codesourcery.com>
6506
6507         * class.c (find_final_overrider_data): Add `candidates'.
6508         (dfs_find_final_overrider): Don't issue error messages
6509         prematurely.
6510         (find_final_overrider): Issue error messages here.
6511         (build_base_field): Don't warn about amgibuous direct bases here.
6512         (warn_about_ambiguous_direct_bases): New function.
6513         (layout_class_type): Use it.
6514
6515 2001-04-10  Richard Henderson  <rth@redhat.com>
6516
6517         * typeck.c (build_array_ref): Push the array reference inside
6518         COMPOUND_EXPR and COND_EXPR.
6519
6520 2001-04-05  Mark Mitchell  <mark@codesourcery.com>
6521
6522         * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
6523         * decl.c (duplicate_decls): Adjust accordingly.
6524         (maybe_commonize_var): Likewise.
6525         (grokfndecl): Likewise.
6526         (start_function): Likewise.
6527         (start_method): Likewise.
6528         * decl2.c (key_method): Likewise.
6529         (import_export_decl): Likewise.
6530         * method.c (implicitly_declare_fn): Likewise.
6531         * optimize.c (maybe_clone_body): Likewise.
6532
6533 2001-04-05  Benjamin Kosnik  <bkoz@redhat.com>
6534
6535         * lang-specs.h: Add __DEPRECATED.
6536
6537 Thu Apr  5 16:54:29 2001  J"orn Rennecke <amylaar@redhat.com>
6538
6539         * search.c (get_dynamic_cast_base_type): When building a new
6540         constant, set its type to ssizetype.
6541
6542 2001-04-04  Jakub Jelinek  <jakub@redhat.com>
6543
6544         * optimize.c (expand_call_inline): Only add newly inlined statements
6545         into inlined_stmts.
6546
6547 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
6548
6549         * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
6550         (OPERATOR_FORMAT): Likewise.
6551         (OPERATOR_TYPENAME_FORMAT): Likewise.
6552         * operators.def: Remove old name-mangling information.
6553         * decl.c (grok_op_properties): Adjust accordingly.
6554         * lex.c (init_operators): Likewise.
6555         * rtti.c (get_tinfo_decl): Issue error messages about types that
6556         have variable size.
6557
6558 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
6559
6560         * decl2.c (import_export_decl): Don't call import_export_class
6561         when processing an inline member function.
6562         * semantics.c (expand_body): Call import_export_decl before
6563         emitting inline functions.
6564
6565 2001-03-28  Richard Henderson  <rth@redhat.com>
6566
6567         IA-64 ABI Exception Handling:
6568         * cp-tree.def (EH_SPEC_BLOCK): New.
6569         (MUST_NOT_THROW_EXPR): New.
6570         * cp-tree.h: Update changed function declarations.
6571         (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
6572         (CPTI_CALL_UNEXPECTED): New.
6573         (struct cp_language_function): Rename x_eh_spec_try_block
6574         to x_eh_spec_block.
6575         (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
6576         * decl.c (current_binding_level): If no current function
6577         bindings, revert to scope_chain.
6578         (initialize_predefined_identifiers): Remove __cp_push_exception.
6579         (store_parm_decls): Use begin_eh_spec_block.
6580         (finish_function): Use finish_eh_spec_block.
6581         (mark_lang_function): Update for name changes.
6582         * decl2.c (finish_file): No mark_all_runtime_matches.
6583         * dump.c (cp_dump_tree): Handle new tree codes.
6584         * error.c (dump_expr) [BIND_EXPR]: Fix typo.
6585         * except.c (catch_language_init, catch_language): Remove.
6586         (init_exception_processing): Don't set language code.
6587         Initialize call_unexpected_node, protect_cleanup_actions,
6588         eh_personality_libfunc, lang_eh_runtime_type.
6589         (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
6590         (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
6591         (prepare_eh_type): Split out type canonicalizations ...
6592         (build_eh_type_type): ... from here.
6593         (build_eh_type_type_ref): Remove.
6594         (mark_all_runtime_matches): Remove.
6595         (build_exc_ptr): New.
6596         (do_begin_catch, do_end_catch): New.
6597         (do_pop_exception): Remove.
6598         (build_terminate_handler): Remove.
6599         (choose_personality_routine): Split out language choice from ...
6600         (initialize_handler_parm): ... here.
6601         Use MUST_NOT_THROW_EXPR.
6602         (expand_start_catch_block): Use do_begin_catch.  Simplify Java
6603         exception object handling.
6604         (expand_start_eh_spec, expand_end_eh_spec): Remove.
6605         (expand_exception_blocks, alloc_eh_object): Remove.
6606         (begin_eh_spec_block, finish_eh_spec_block): New.
6607         (do_allocate_exception, do_free_exception): New.
6608         (expand_throw): Merge into ...
6609         (build_throw): ... here.  Update for abi.
6610         * expr.c (cplus_expand_expr): No expand_internal_throw.
6611         Handle MUST_NOT_THROW_EXPR.
6612         * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
6613         * semantics.c (*) Update for except.h name changes.
6614         (genrtl_try_block): No protect_with_terminate.
6615         (genrtl_eh_spec_block): New.
6616         (genrtl_handler): Don't emit the goto here.
6617         (cp_expand_stmt): Handle EH_SPEC_BLOCK.
6618         (genrtl_finish_function): Don't expand_exception_blocks.
6619         * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
6620
6621 2001-03-28  Richard Henderson  <rth@redhat.com>
6622
6623         * decl.c (struct named_label_list): Rename eh_region to
6624         in_try_scope, add in_catch_scope.
6625         (struct binding_level): Rename eh_region to is_try_scope,
6626         add is_catch_scope.
6627         (note_level_for_try): Rename from note_level_for_eh.
6628         (note_level_for_catch): New.
6629         (poplevel): Copy both is_try_scope and is_catch_scope to
6630         the named_label_list struct.
6631         (check_previous_goto_1): Don't check for catch block via
6632         DECL_ARTIFICIAL; use in_try_scope instead.
6633         (check_goto): Likewise.
6634         * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
6635         * except.c (expand_start_catch_block): Call note_level_for_catch.
6636         * semantics.c (begin_compound_stmt): Update for note_level_for_try.
6637
6638 2001-03-27  Richard Henderson  <rth@redhat.com>
6639
6640         * except.c: Use USING_SJLJ_EXCEPTIONS instead of
6641         exceptions_via_longjmp.
6642
6643 2001-03-27  Phil Edwards  <pme@sources.redhat.com>
6644
6645         * pt.c (check_default_tmpl_args):  Make error messages clearer.
6646
6647 2001-03-26  Phil Edwards  <pme@sources.redhat.com>
6648
6649         * error.c:  Also undefine 'A' macro used for cp_printers definition.
6650
6651 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6652
6653         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
6654
6655 2001-03-26  Mike Yang <yang@research.att.com>
6656             Mark Mitchell  <mark@codesourcery.com>
6657
6658         * dump.c (dump_access): New function.
6659         (cp_dump_tree): Use it.  Dump basetype information for class
6660         types.
6661
6662 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
6663
6664         * Makefile.in (optimize.o): Depend on params.h.
6665         (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
6666         (init_decl_processing): Set flag_no_inline when doing
6667         inlining-on-trees.
6668         * optimize.c: Include params.h.
6669         (struct inline_data): Improve documentation of FNS.  Add
6670         FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
6671         (INSNS_PER_STMT): New macro.
6672         (remap_block): Use CLONING_P.
6673         (inlinable_function_p): Don't inline big functions.
6674         (expand_call_inline): Keep track of how much inlining we've done.
6675         (optimize_function): Set FIRST_INLINED_FN.
6676         (maybe_clone_body): Set CLONING_P.
6677         * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
6678         tree nodes.
6679         (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
6680         rest_of_compilation.  Clear DECL_RTL for local variables
6681         afterwards.
6682         (clear_decl_rtl): New function.
6683
6684 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>
6685
6686         Implement DR 209
6687         * cp-tree.h (skip_type_access_control,
6688         reset_type_access_control): Prototype.
6689         * decl.c (grokdeclarator): Access of friends is not checked.
6690         * parse.y (component_decl_list): Reset type access control.
6691         * semantics.c (decl_type_access_control): Clear
6692         current_type_lookups.
6693         (save_type_access_control): Don't save if not deferring.
6694         (skip_type_access_control, reset_type_access_control): New
6695         functions.
6696         (begin_class_definition): Do type access control for basetypes.
6697         Start deferred access control.
6698         (finish_class_definition): Resume immediate access control if
6699         this is a local class.
6700
6701 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6702
6703         * class.c (add_method): Use memcpy/memmove, not bcopy.
6704
6705         * decl.c (duplicate_decls): Likewise.
6706
6707 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
6708
6709         * mangle.c (write_discriminator): Use `_0' for discriminator 1,
6710         not `_'.
6711
6712 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
6713
6714         * decl.c (local_names): Define.
6715         (push_local_name): New.
6716         (grok_reference_init): Return init if initializing static reference
6717         variable with non-constant instead of emitting it.
6718         Move expand_static_init call to cp_finish_decl.
6719         (layout_var_decl): Call push_local_name.
6720         (maybe_commonize_var): Allow inlining functions even if they have
6721         static local variables, use comdat_linkage for them if flag_weak.
6722         (check_initializer): Call obscure_complex_init if
6723         grok_reference_init returned nonzero.
6724         (save_function_data): Clear x_local_names.
6725         (pop_cp_function_context): Free x_local_names.
6726         (mark_inlined_fns): Remove.
6727         (mark_lang_function): Mark x_local_names.
6728         (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
6729         Mark inlined_fns as tree, remove call to mark_inlined_fns.
6730         * class.c (alter_access): Ensure DECL_ACCESS is never set if
6731         DECL_DISCRIMINATOR_P.
6732         * cp-tree.h (cp_language_function): Add x_local_names.
6733         (lang_decl_flags): Add discriminator into u2.
6734         (lang_decl_inlined_fns): Remove.
6735         (lang_decl): inlined_fns is now a TREE_VEC.
6736         (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
6737         * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
6738         TREE_VEC, not a custom structure.
6739         (optimize_function): Likewise.
6740         * mangle.c (discriminator_for_local_entity): Discriminate among
6741         VAR_DECL local entities.
6742         * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
6743         is not valid.
6744
6745 2001-03-22  Bryce McKinlay  <bryce@albatross.co.nz>
6746
6747         Add support for Java interface method calls.
6748         * cp-tree.h (struct lang_type): Add java_interface flag.
6749         (TYPE_JAVA_INTERFACE): New macro.
6750         * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
6751         by setting TYPE_JAVA_INTERFACE.
6752         * call.c (java_iface_lookup_fn): New static.
6753         (build_over_call): If calling a method declared in a
6754         TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
6755         expression which resolves the function address.
6756         (build_java_interface_fn_ref): New function.
6757
6758 2001-03-22  Richard Henderson  <rth@redhat.com>
6759
6760         * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
6761         * except.c: Don't include it.
6762
6763 2001-03-22  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
6764             based on an idea from Joe Buck <jbuck@synopsys.com>
6765
6766         * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
6767         New nonterminals.
6768         (data_def, component_decl): Add reductions to bad_decl.
6769
6770 2001-03-22  Jakub Jelinek  <jakub@redhat.com>
6771
6772         * method.c (do_build_assign_ref): Don't use build_modify_expr for
6773         anonymous aggregates, since they don't have assignment operator
6774         method.
6775         * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
6776         assignment operators for anonymous structure fields.
6777
6778 2001-03-21  Jason Merrill  <jason@redhat.com>
6779
6780         * pt.c (instantiate_decl): Abort if we see a member constant
6781         instantiation that doesn't already have its initializer.
6782         Downgrade explicit instantiation without definition to pedwarn.
6783
6784         * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
6785         * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
6786         (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
6787
6788         * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
6789         (pending_vtables): Remove.
6790         * decl2.c (pending_vtables): Remove.
6791         (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
6792         CLASSTYPE_VTABLE_NEEDS_WRITING.
6793         (import_export_class): Likewise.
6794         (init_decl2): Don't mark pending_vtables.
6795         * lex.c (handle_pragma_vtable): Just sorry.
6796         * pt.c (instantiate_class_template): Don't mess with
6797         CLASSTYPE_VTABLE_NEEDS_WRITING.
6798         (mark_class_instantiated): Likewise.
6799         * ptree.c (print_lang_type): Don't print it.
6800         * semantics.c (begin_class_definition): Don't set it.
6801
6802         * pt.c (template_tail): Replace with last_pending_template.
6803         (maybe_templates, maybe_template_tail): Remove.
6804         (add_pending_template): Adjust.
6805         (instantiate_pending_templates): Adjust.
6806
6807         * cp-tree.h (struct saved_scope): Remove lang_stack field.
6808         (current_lang_stack): Remove.
6809         * decl.c (maybe_push_to_top_level): Don't initialize it.
6810         (duplicate_decls): Use current_lang_depth.
6811         (xref_basetypes): Likewise.
6812         * class.c (current_lang_depth): New fn.
6813         (push_lang_context): Use more varray functionality.
6814         (pop_lang_context): Likewise.
6815
6816         * error.c (GLOBAL_THING): Always use '__'.
6817
6818 2001-03-21  Mark Mitchell  <mark@codesourcery.com>
6819
6820         * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
6821
6822         * mangle.c (mangle_decl_string): Mangle the names of overloaded
6823         operators, even when they have `extern "C"' linkage.
6824
6825 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
6826
6827         * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
6828         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
6829         where it's not necessary.
6830         (add_method): Remove optimization involving comparison of
6831         DECL_ASSEMBLER_NAME.
6832         (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
6833         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
6834         where it's not necessary.
6835         (check_methods): Likewise.
6836         (build_clone): Likewise.
6837         (built_vtt): Likewise.
6838         * cp-tree.h (DECL_NEEDED_P): Likewise.
6839         * decl.c (pushtag): Likewise.
6840         (duplicate_decls): Likewise.
6841         (pushdecl): Likewise.
6842         (builtin_function): Likewise.
6843         (build_library_fn_1): Set DECL_LANGUAGE for library functions.
6844         (build_cp_library_fn): Likewise.
6845         (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
6846         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
6847         where it's not necessary.
6848         (make_rtl_for_nonlocal_decl): Likewise.
6849         (cp_finish_decl): Likewise.
6850         (grokfndecl): Likewise.
6851         (grokvardecl): Likewise.
6852         (grokdeclarator): Likewise.
6853         (start_function): Likewise.
6854         (cp_missing_return_ok_p): Likewise.
6855         * decl2.c (grokclassfn): Likewise.
6856         (check_classfn): Likewise.
6857         (finish_static_data_member_decl): Likewise.
6858         (grokfield): Likewise.
6859         * error.c (GLOBAL_IORD_P): Remove.
6860         (dump_global_iord): Improve output.
6861         (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
6862         * except.c (nothrow_libfn_p): Summarily reject any function not in
6863         namespace-scope.
6864         * init.c (build_java_class_ref): Don't explicitly set
6865         DECL_ASSEMBLER_NAME after calling mangle_decl.
6866         * mangle.c (mangle_decl_string): Handle extern "C" functions.
6867         (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
6868         * method.c (set_mangled_name_for_decl): Don't explicitly set
6869         DECL_ASSEMBLER_NAME after calling mangle_decl.
6870         (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
6871         IDENTIFIER_GLOBAL_VALUE for the thunk.
6872         * pt.c (set_mangled_name_for_template_decl): Remove.
6873         (check_explicit_specialization): Don't use it.
6874         (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
6875         (tsubst_friend_function): Likewise.
6876         (tsubst_decl): Likewise.
6877         (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
6878         * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
6879         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
6880         where it's not necessary.
6881         (tinfo_base_init): Likewise.
6882         (create_real_tinfo_var): Likewise.
6883         * search.c (looup_field_1): Likewise.
6884         * semantics.c (finish_named_return_value): Likewise.
6885         * tree.c (init_tree): Set lang_set_decl_assembler_name.
6886
6887 2001-03-15  Gabriel Dos Reis  <gdr@codesourcery.com>
6888
6889         Correct semantics restrictions checking in throw-expression.
6890         * except.c (is_admissible_throw_operand): New function.
6891         (build_throw): Use it.
6892
6893 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
6894
6895         * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
6896         and its ilk.
6897
6898 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
6899
6900         * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
6901         * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
6902         * decl.c (duplicate_decls): Likewise.
6903         (builtin_function): Likewise.
6904         (build_library_fn): Likewise.
6905         (build_cp_library_fn): Likewise.
6906         (check_initializer): Likewise.
6907         (cp_finish_decl): Likewise.
6908         * decl2.c (grokfield): Likewise.
6909         (grok_function_init): Remove #if 0'd code.
6910         (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
6911         * friend.c (do_friend): Likewise.
6912         * init.c (get_temp_regvar): Likewise.
6913         * method.c (make_thunk): Likewise.
6914         * pt.c (tsubst_friend_function): Likewise.
6915         (tsubst_decl): Likewise.
6916         (regenerate_decl_from_template): Likewise.
6917         * semantics.c (genrtl_named_return_value): Likewise.
6918         (expand_body): Likewise.
6919         (genrtl_finish_function): Likewise.
6920         * tree.c (cp_tree_equal): Likewise.
6921
6922 2001-03-12  Nathan Sidwell  <nathan@codesourcery.com>
6923
6924         * call.c (convert_like_real): Add extra semantics to INNER
6925         parameter. Don't convert to temporary if a user conversion
6926         gives us an lvalue that we're about to bind to a reference.
6927         Set INNER to indicate pending reference binding on recursive
6928         calls.
6929
6930 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
6931
6932         * cp/lex.c: Delete duplicate pending_lang_change.
6933
6934 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
6935
6936         * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
6937         Similarly.
6938         * cp/repo.c (get_base_filename, open_repo_file): Similarly.
6939         * cp/cp-tree.h: Remove file_name_nondirectory prototype.
6940
6941 2001-03-09  Zack Weinberg  <zackw@stanford.edu>
6942
6943         * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
6944
6945 2001-03-08  Stan Shebs  <shebs@apple.com>
6946
6947         * cp-tree.h (set_identifier_local_value): Remove unused decl.
6948
6949 2001-03-06  Zack Weinberg  <zackw@stanford.edu>
6950
6951         * spew.c: Remove references to CPP_OSTRING.
6952
6953 2001-03-06  Andrew Haley  <aph@redhat.com>
6954
6955         * typeck.c (convert_arguments): Check that we have an fndecl.
6956
6957 2001-03-05  Andrew Haley  <aph@redhat.com>
6958
6959         * typeck.c (convert_arguments): Don't do ellipsis conversion for
6960         __built_in_constant_p.
6961
6962 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
6963
6964         * typeck.c (build_static_cast): Allow enum to enum conversions
6965         as per DR 128.
6966
6967 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
6968
6969         * class.c (check_field_decls): Pointers to member do not a
6970         non-pod struct make, as per DR 148.
6971
6972 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
6973
6974         * call.c (joust): cp_pedwarn when using gnu extension concerning
6975         worst conversion sequences.
6976
6977 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
6978
6979         * decl.c: Replace all uses of 'boolean' with 'bool'.
6980
6981 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
6982
6983         * lang-specs.h: Add zero initializer for cpp_spec field to
6984         all array elements that need one.  Don't put an #ifdef inside
6985         the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
6986         use it.
6987
6988 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
6989
6990         Implement using decls inside template functions.
6991         * decl2.c (validate_nonmember_using_decl): Don't special case
6992         fake_std_node in the global namespace. Don't reject early when
6993         processing a template.
6994         (do_local_using_decl): Add to statement tree. Don't do further
6995         processing when building a template.
6996         * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
6997
6998 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
6999
7000         * decl2.c (do_nonmember_using_decl): Don't complain if we find
7001         same function. Do complain about ambiguating extern "C"
7002         declarations.
7003
7004 2001-02-28  Nathan Sidwell  <nathan@codesourcery.com>
7005
7006         Remove floating point and complex type template constant parms.
7007         * pt.c (convert_nontype_argument): Remove REAL_TYPE and
7008         COMPLEX_TYPE extensions.
7009         (invalid_nontype_parm_type_p): Likewise.
7010
7011 2001-02-27  Jeffrey Oldham  <oldham@codesourcery.com>
7012
7013         * except.c (call_eh_info): Revert "match_function"'s type.
7014
7015 2001-02-27  Nathan Sidwell  <nathan@codesourcery.com>
7016
7017         Fix ctor vtable vcall offsets.
7018         * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
7019         (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
7020         (get_matching_base): Remove.
7021         (get_original_base): New function.
7022         (build_vtbl_initializer): Initialize vid.rtti_binfo.
7023         Use a virtual thunk for a ctor vtable with an index
7024         (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
7025         primary base within a constructor vtable. Only set
7026         BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
7027         when primary base has been lost.
7028         * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
7029
7030 2001-02-26  Jeffrey Oldham  <oldham@codesourcery.com>
7031
7032         * call.c (joust): Ensure more_specialized()'s argument length
7033         parameter has correct value for constructors.
7034
7035 2001-02-26  Nathan Sidwell  <nathan@codesourcery.com>
7036
7037         * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
7038
7039         * decl.c (mark_inlined_fns): Prototype.
7040
7041 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
7042
7043         * spew.c (yylex): Correct handling of friends.
7044
7045 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
7046
7047         * mangle.c (write_encoding): Pass write_function_type the
7048         FUNCTION_DECL for the function being encoded.
7049         (write_function_type): Pass it along to write_bare_function_type.
7050         (write_bare_function_type): Pass it along to write_method_parms.
7051         (write_method_parms): Don't mangle the compiler-generated
7052         parameters to a constructor or destructor.
7053
7054 2001-02-22  Andreas Jaeger  <aj@suse.de>
7055
7056         * optimize.c: Include toplev.h for
7057         note_deferral_of_defined_inline_function prototype.
7058
7059 2001-02-22  Jakub Jelinek  <jakub@redhat.com>
7060
7061         * cp-tree.h (struct lang_decl_inlined_fns): New.
7062         (struct lang_decls): Add inlined_fns.
7063         (DECL_INLINED_FNS): New macro.
7064         * optimize.c (struct inline_data): Add inlined_fns.
7065         (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
7066         (inlinable_function_p): Likewise, fix typo in comment,
7067         function is not inlinable if it already inlined function currently
7068         being optimized.
7069         (expand_call_inline): Add fn to inlined_fns if necessary.
7070         (optimize_function): Initialize inlined_fns.
7071         Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
7072         * decl.c (mark_inlined_fns): New function.
7073         (lang_mark_tree): Call it.
7074
7075 2001-02-21  Jason Merrill  <jason@redhat.com>
7076
7077         * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
7078         (DECL_UNINLINABLE): Move to middle-end.
7079
7080         * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
7081         * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
7082         * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
7083         * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
7084         parms and outer BLOCK.  note_deferral_of_defined_inline_function.
7085
7086         * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
7087         second parm of op=.
7088
7089 2001-02-19  Mark Mitchell  <mark@codesourcery.com>
7090
7091         * decl2.c (set_decl_namespace): Allow explicit instantiations in
7092         any namespace.
7093
7094 2001-02-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7095
7096         * optimize.c (expand_call_inline): Don't walk subtrees of type
7097         nodes.
7098
7099 2001-02-18  Mark Mitchell  <mark@codesourcery.com>
7100
7101         * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
7102         for a destructor.
7103
7104 2001-02-18  Jason Merrill  <jason@redhat.com>
7105
7106         Do put the VTT parameter in DECL_ARGUMENTS.
7107         * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
7108         (current_vtt_parm): New macro.
7109         (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
7110         (DECL_HAS_VTT_PARM_P): New macro.
7111         (DECL_VTT_PARM): Remove.
7112         (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
7113         * decl.c (duplicate_decls): Only copy the operator code if
7114         appropriate.
7115         (start_function): Set current_vtt_parm.
7116         (lang_mark_tree): Don't mark vtt_parm.
7117         * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
7118         DECL_ARGUMENTS.  Set DECL_HAS_VTT_PARM_P.
7119         * class.c (build_clone): Maybe remove the VTT parm.
7120         * optimize.c (maybe_clone_body): Set up the VTT parm.
7121         * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
7122         * call.c (build_over_call): Just allow the VTT arg.
7123         * method.c (make_thunk): Don't set DECL_VTT_PARM.
7124         (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
7125         (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
7126         * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
7127         * error.c (dump_function_decl): Likewise.
7128         * call.c (build_user_type_conversion_1, convert_like_real): Abort
7129         if we try to call a constructor with in-charge or VTT parms.
7130         * method.c (skip_artificial_parms_for): New fn.
7131         * call.c (add_function_candidate, build_over_call): Call it.
7132         * call.c (build_new_method_call): Use current_vtt_parm.
7133         * init.c (expand_virtual_init): Likewise.
7134         * class.c (same_signature_p): No longer static.
7135         * cp-tree.h: Declare it.
7136         * search.c (look_for_overrides_r): Use it.
7137
7138 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
7139
7140         * cp-tree.h (new_abi_rtti_p): Remove.
7141         (name_mangling_version): Likewise.
7142         (flag_do_squangling): Likewise.
7143         * class.c (build_rtti_vtbl_entries): Remove old ABI support.
7144         * decl.c (grokfndecl): Likewise.
7145         * decl2.c (name_mangling_version): Remove.
7146         (flag_do_squangling): Likewise.
7147         (lang_f_options): Remove `squangle'.
7148         (unsupported_options): Add `squangle'.
7149         (cxx_decode_option): Issue a warning about uses of
7150         -fname-mangling-version.
7151         (finish_file): Remove old ABI support.
7152         * pt.c (check_explicit_specialization): Likewise.
7153         (tsubst_decl): Likewise.
7154         * rtti.c (init_rtti_processing): Likewise.
7155         (build_headof): Likewise.
7156         (get_tinfo_decl_dynamic): Likewise.
7157         (tinfo_from_decl): Likewise.
7158         (build_dynamic_cast_1): Likewise.
7159         (synthesize_tinfo_var): Likewise.
7160         * init.c (build_new): Allow enumeration types for the array-bounds
7161         in a direct-new-declarator.
7162
7163         * semantics.c (finish_typeof): Resolve OFFSET_REFs.
7164
7165         * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
7166         TREE_PROTECTED from the template being specialized.
7167
7168 2001-02-17  Jason Merrill  <jason@redhat.com>
7169
7170         * decl2.c (build_artificial_parm): Set TREE_READONLY.
7171
7172         * decl.c (bad_specifiers): Allow throw specs on things with
7173         pointer-to-function or -member-function type.
7174         * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
7175         a pmf.
7176
7177 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
7178
7179         * call.c (check_dtor_name): Handle template names correctly.
7180
7181 2001-02-16  Jason Merrill  <jason@redhat.com>
7182
7183         * cp-tree.h (DECL_USE_VTT_PARM): Remove.
7184         * decl2.c (maybe_retrofit_in_chrg): Don't create it.
7185         * optimize.c (maybe_clone_body): Don't substitute it.
7186         * call.c (build_new_method_call): Check in_chrg instead.
7187         * init.c (expand_virtual_init): Likewise.
7188
7189 2001-02-16  Gabriel Dos Reis  <gdr@codesourcery.com>
7190
7191         * decl.c (check_tag_decl): Make sure a typedef for an anonymous
7192         class-type introduces at least a type-name.
7193
7194 2001-02-16  Jakub Jelinek  <jakub@redhat.com>
7195
7196         * call.c (convert_like_real): Create a temporary for non-lvalue.
7197
7198 2001-02-16  Jeffrey Oldham  <oldham@codesourcery.com>
7199
7200         * cp-tree.h: Fix typos in comments.
7201
7202 2001-02-16  Jason Merrill  <jason@redhat.com>
7203
7204         * optimize.c (remap_block): If we're compiling a clone, pass the
7205         new block to insert_block.
7206
7207 2001-02-16  Mark Mitchell  <mark@codesourcery.com>
7208
7209         * semantics.c (finish_asm_stmt): Robustify.
7210
7211 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
7212
7213         * pt.c (push_template_decl_real): Don't remangle the name of a
7214         class template.
7215
7216 2001-02-15  Jim Meyering  <meyering@lucent.com>
7217
7218         * Make-lang.in (c++.install-common): Depend on installdirs.
7219         (c++.install-info): Likewise.
7220         (c++.install-man): Likewise.
7221
7222 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
7223
7224         * typeck2.c (build_m_component_ref): Robustify.
7225
7226 2001-02-15  Alexandre Oliva  <aoliva@redhat.com>
7227
7228         * friend.c (do_friend): Don't take the nested [template] class
7229         into account when deciding whether to warn about the friend
7230         function not referring to a template function.
7231
7232 2001-02-14  Jakub Jelinek  <jakub@redhat.com>
7233
7234         * typeck.c (build_unary_op): Clarify error message.
7235
7236 2001-02-08  Aldy Hernandez  <aldyh@redhat.com>
7237
7238         * parse.y (component_constructor_declarator): allow optional
7239         parentheses around constructor class name.
7240
7241 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
7242
7243         * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
7244         section.
7245         * init.c (emit_base_init): Remove incorrect comment about
7246         virtual bases.
7247         * method.c (make_thunk): Fix comment alignment.
7248
7249 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
7250
7251         Kill remnants of this is variable.
7252         * cp-tree.h (flag_this_is_variable): Remove.
7253         * decl2.c (flag_this_is_variable): Remove.
7254         * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
7255         (build_vbase_path): The path is non-static, even in a cdtor.
7256         (resolves_to_fixed_type_p): Add additional return value.
7257         * search.c (init_vbase_pointers): Adjust.
7258         * tree.c (lvalue_p_1): Adjust.
7259         * typeck.c (mark_addressable): Adjust.
7260
7261 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
7262
7263         * pt.c (unify): Don't check cv quals of array types.
7264
7265 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
7266
7267         * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
7268         check whether we already have the type.
7269
7270 2001-02-13  Mark Mitchell  <mark@codesourcery.com>
7271
7272         * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
7273         * call.c (build_op_delete_call): Simplify to remove duplicate
7274         code.
7275         * class.c (clone_function_decl): Don't build the deleting variant
7276         of a non-virtual destructor.
7277         * decl.c (finish_destructor_body): Don't call delete if this is a
7278         non-virtual destructor.
7279         * init.c (build_delete): Explicitly call `operator delete' when
7280         deleting an object with a non-virtual destructor.
7281
7282 2001-02-13  Jason Merrill  <jason@redhat.com>
7283
7284         * lang-specs.h: Add more __EXCEPTIONS.
7285
7286 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
7287
7288         * typeck2.c (process_init_constructor): Check
7289         TREE_HAS_CONSTRUCTOR before issuing missing init warning.
7290
7291 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
7292
7293         * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
7294         Remove spurious information in comment. Allow further
7295         adjustments of REFERENCE_TYPE args.
7296
7297 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
7298
7299         * errfn.c (cp_deprecated): Tweak diagnostic text.
7300         * parse.y (new_initializer): Deprecate initializer lists
7301         extension.
7302
7303 2001-02-12  Mark Mitchell  <mark@codesourcery.com>
7304
7305         Remove old ABI support.
7306
7307 2001-02-11  Mark Mitchell  <mark@codesourcery.com>
7308
7309         * decl2.c (flag_vtable_thunks): Always set it to 1.
7310         (flag_new_abi): Likewise.
7311         * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
7312
7313         * Makefile.in (g++spec.o): Fix typo.
7314
7315 2001-02-09  Jason Merrill  <jason@redhat.com>
7316
7317         * lang-specs.h: Restore definition of __EXCEPTIONS.
7318
7319 2001-02-08  Jason Merrill  <jason@redhat.com>
7320
7321         * search.c (shared_member_p): New function.
7322         (lookup_field_r): Use it.
7323         * cp-tree.h (SHARED_MEMBER_P): Remove.
7324
7325         * method.c (process_overload_item): Handle template-dependent array
7326         bounds.
7327         * pt.c (type_unification_real): If we end up with undeduced nontype
7328         parms, try again.
7329
7330         * decl.c (lookup_name_real): Tweak warning to refer to decls, not
7331         types.
7332
7333         * typeck2.c (friendly_abort): Don't say anything if we have
7334         earlier errors or sorries.
7335
7336         * decl.c (check_tag_decl): Notice attempts to redefine bool and
7337         wchar_t.  Ignore if in_system_header.
7338
7339         * decl.c (maybe_push_cleanup_level): New fn...
7340         (start_decl_1): ...split out from here.
7341         * cvt.c (build_up_reference): Use it.
7342         * cp-tree.h: Declare it.
7343
7344 2001-02-07  Mark Mitchell  <mark@codesourcery.com>
7345
7346         * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
7347         spec.
7348
7349 2001-02-06  Nathan Sidwell  <nathan@codesourcery.com>
7350
7351         * pt.c (lookup_template_class): Make sure it's a primary
7352         template or template_template_parm when called from the parser.
7353         (instantiate_template_class): Add assertion.
7354
7355 2001-02-05  Alexandre Oliva  <aoliva@redhat.com>
7356
7357         * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
7358         from error_mark_node.
7359
7360 2001-02-05  Nathan Sidwell  <nathan@codesourcery.com>
7361
7362         Fix specification and implementation bugs in V3 ABI
7363         construction vtables.
7364         * cp-tree.h (flag_dump_class_layout): New flag.
7365         (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
7366         (BINFO_LOST_PRIMARY_P): New flag.
7367         (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
7368         (BINFO_PRIMARY_MARKED_P): Rename to ...
7369         (BINFO_PRIMARY_P): ... here.
7370         (binfo_via_virtual): New prototype.
7371         * decl2.c (flag_dump_class_layout): New flag.
7372         (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
7373         use `=' as a file name separator.
7374         * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
7375         bases.
7376         (build_vtbl_address): If this is a virtual primary base, then
7377         get the vtbl of what it is ultimately primary for.
7378         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
7379         for BINFO_PRIMARY_P.
7380         (dfs_skip_nonprimary_vbases_markedp): Likewise.
7381         (get_shared_vbase_if_not_primary): Likewise.
7382         (dfs_get_pure_virtuals): Likewise.
7383         (expand_upcast_fixups): Likewise.
7384         (fixup_virtual_upcast_offsets): Likewise.
7385         (dfs_find_vbase_instance): Likewise.
7386         (find_vbase_instance): Likewise.
7387         (binfo_from_vbase): Adjust comment to reflect reality.
7388         (binfo_via_virtual): New function.
7389         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
7390         for binfo walking during VTT construction.
7391         (dfs_mark_primary_bases): Remove.
7392         (force_canonical_binfo_r): New function.
7393         (force_canonical_binfo): New function.
7394         (mark_primary_virtual_base): New function.
7395         (mark_primary_bases): Walk in inheritance graph order, use
7396         mark_primary_virtual_base.
7397         (determine_primary_base): Use some more intermediate variables.
7398         (dfs_find_final_overrider): Don't check for overriding along a
7399         virtual path.
7400         (dfs_modify_vtables): Walk into primary virtual bases too.
7401         (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
7402         (build_base_fields): Likewise.
7403         (dfs_set_offset_for_unshared_vbases): Likewise.
7404         (layout_virtual_bases): Likewise.
7405         (end_of_class): Likewise.
7406         (finish_struct_1): Call dump_class_hierarchy, if requested.
7407         (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
7408         (dump_class_hierarchy_r): Add stream parameter. Emit more information.
7409         (dump_class_hierarchy): Add file parameter. Append to file, if
7410         required.
7411         (finish_vtbls): Adjust accumulate_vtbl_inits call.
7412         Use canonical base for virtual bases.
7413         (build_vtt): Add more comments. Adjust build_vtt_inits call.
7414         (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
7415         Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
7416         VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
7417         virtual VTTs.
7418         (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
7419         from DATA.  We want virtual primary bases and all bases via virtual.
7420         Only set BINFO_VPTR_INDEX for top level. Look up from a primary
7421         virtual base when not a construction vtable.
7422         (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
7423         (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
7424         Use canonical bases when processing virtual bases.
7425         (accumulate_vtbl_inits): We're interested in any base via a
7426         virtual path.
7427         (dfs_accumulate_vtbl_inits): If this is a primary virtual base
7428         within a construction vtable, determine what is being overridden.
7429         (build_vtbl_initializer): Add more comments
7430         (add_vcall_offset_vtbl_entries_1): Adjust comment.
7431         (build_rtti_vtbl_entries): Check if the base has lost its
7432         primary.
7433
7434 2001-02-05  Mark Mitchell  <mark@codesourcery.com>
7435
7436         * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
7437
7438 Sun Feb  4 15:52:44 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7439
7440         * decl.c (pushdecl): Call abort instead of fatal.
7441         * except.c (decl_is_java_type): Call fatal_error instead of fatal.
7442         * init.c (build_new_1): Likewise.
7443         (build_java_class_ref): Call internal_error and fatal_error, not fatal.
7444         * decl.c (build_typename_type): hash_table_init now returns void.
7445         decl.c (init_decl_processing): Make an error non-fatal.
7446
7447 2001-02-04  Mark Mitchell  <mark@codesourcery.com>
7448
7449         * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
7450         Document.
7451         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
7452         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
7453         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
7454         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
7455         * decl.c (maybe_commonize_var): Use the new name-mangling where
7456         appropriate.
7457         * decl2.c (comdat_linkage): Enhance comments.  Make all
7458         compiler-generated things static, if COMDAT is not available.
7459         (get_tinfo_decl): Do not make typeinfo objects that belong in the
7460         library COMDAT.
7461         (tinfo_base_init): Use the correct mangled name for typeinfo
7462         strings, and push them into the global scope.
7463         (typeinfo_in_lib_p): New function.
7464         (synthesize_tinfo_var): Use it.
7465         (create_real_tinfo_var): Likewise.
7466
7467 2001-02-03  Jakub Jelinek  <jakub@redhat.com>
7468
7469         * decl.c (push_class_binding): Use context_for_name_lookup instead
7470         of CP_DECL_CONTEXT.
7471         * search.c (context_for_name_lookup): Remove static.  Check for NULL
7472         context in the loop.
7473         * cp-tree.h (context_for_name_lookup): Add prototype.
7474
7475 2001-02-02  Jakub Jelinek  <jakub@redhat.com>
7476
7477         * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
7478         * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
7479         Remove.
7480         * call.c (convert_class_to_reference, build_user_type_conversion_1,
7481         add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
7482
7483 2001-02-02  Mark Mitchell  <mark@codesourcery.com>
7484
7485         * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
7486         of macros used when compiling g++spec.c.
7487         * g++spec.c (lang_specific_driver): Link with the shared
7488         libgcc by default.
7489
7490 2001-01-29  Joseph S. Myers  <jsm28@cam.ac.uk>
7491
7492         * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
7493         make_reference_declarator, make_call_declarator), method.c
7494         (implicitly_declare_fn), parse.y (namespace_using_decl,
7495         notype_unqualified_id, expr_or_declarator, new_type_id,
7496         after_type_declarator, direct_after_type_declarator,
7497         notype_declarator, complex_notype_declarator,
7498         complex_direct_notype_declarator, qualified_id,
7499         notype_qualified_id, overqualified_id, direct_new_declarator,
7500         absdcl, direct_abstract_declarator, conversion_declarator), pt.c
7501         (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
7502         instead of build_parse_node.
7503
7504 2001-01-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7505
7506         * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
7507         (minus_one_node): Moved to top level gcc directory.  Renamed
7508         to integer_minus_one_node.
7509
7510         * init.c (init_init_processing): Don't set minus_one_node.
7511         (build_vec_init): Use integer_minus_one_node.
7512
7513         * rtti.c (get_tinfo_decl_dynamic): Likewise.
7514
7515 2001-01-28  Jakub Jelinek  <jakub@redhat.com>
7516
7517         * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
7518         identical and they would be replaced with constant, remove
7519         MODIFY_EXPR from the tree.
7520
7521 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7522
7523         * Make-lang.in: Remove all dependencies on defaults.h.
7524         * call.c: Don't include defaults.h.
7525         * decl.c: Likewise.
7526         * decl2.c: Likewise.
7527         * except.c: Likewise.
7528         * pt.c: Likewise.
7529         * rtti.c: Likewise.
7530         * tree.c: Likewise.
7531         * typeck.c: Likewise.
7532
7533 2001-01-25  Jakub Jelinek  <jakub@redhat.com>
7534
7535         * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
7536         operators even in "C" linkage.
7537         * method.c (set_mangled_name_for_decl): Likewise.
7538         * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
7539         overloaded operators in "C" linkage.
7540
7541 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
7542
7543         * pt.c (tsubst_decl): Remove IN_DECL parameter.
7544         (tsubst_arg_types): Check parameter is not void.
7545         (tsubst): Adjust tsubst_decl call.
7546
7547 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
7548
7549         * call.c (add_builtin_candidate): Quote std properly, from
7550         previous change.
7551
7552 2001-01-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7553
7554         * pt.c (check_explicit_specialization): Clone constructors and
7555         destructors.
7556
7557 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
7558
7559         * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
7560         indicates anything special about template depth. Make sure we
7561         only count the user visible template classes.
7562
7563 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
7564
7565         * call.c (build_conv): Typo in comment.
7566         (add_builtin_candidate): Add more explanation.
7567         Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
7568         Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
7569         when we have enumeral types.
7570         (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
7571         candidates for relops and eqops.
7572         (joust): Simplify control flow. Allow a non-template user
7573         function to hide a builtin.
7574
7575 2001-01-22  Nathan Sidwell  <nathan@codesourcery.com>
7576
7577         * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
7578         (more_specialized): Add deduction parameter.
7579         * call.c (joust): Adjust more_specialized call.
7580         * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
7581         UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
7582         (get_bindings_order): Remove.
7583         (get_bindings_real): Add DEDUCE parameter.
7584         (maybe_adjust_types_for_deduction): Return extra unify flags. Do
7585         REFERENCE_TYPE jig for DEDUCE_ORDER.
7586         (type_unification_real): Deal with DEDUCE_ORDER. Use result of
7587         maybe_adjust_types_for_deduction.
7588         (more_specialized): Add DEDUCE parameter. Call get_bindings_real
7589         directly.
7590         (try_one_overload): Use result of maybe_adjust_types_for_deduction.
7591         (check_cv_quals_for_unify): Use new unify qualifier flags.
7592         (unify): Clear new unify qualifier flags.
7593         (get_bindings_real): Add DEDUCE parameter.
7594         (get_bindings): Adjust call to get_bindings_real.
7595         (get_bindings_overload): Likewise.
7596         (most_specialized_instantiation): Adjust call to
7597         more_specialized.
7598
7599 2001-01-19  Jason Merrill  <jason@redhat.com>
7600
7601         * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
7602
7603         * decl.c (init_decl_processing): Just force -fvtable-thunks on if
7604         -fnew-abi.
7605
7606 2001-01-19  Ute Pelkmann  <scope.muc@t-online.de>
7607
7608         * decl2.c (arg_assoc_class): Fix double iteration logic.
7609
7610 2001-01-19  Jason Merrill  <jason@redhat.com>
7611
7612         * init.c (build_delete): Always call convert_force to strip cv-quals.
7613
7614         * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
7615         * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
7616         * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
7617
7618 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
7619
7620         * search.c (get_vbase_1): Count only virtual bases.
7621
7622 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
7623
7624         * class.c (duplicate_tag_error): Robustify flag clearing.
7625
7626 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
7627
7628         * cp-tree.h (lookup_template_class): Add complain parm.
7629         * decl.c (lookup_namespace_name): Adjust call to
7630         lookup_template_class.
7631         (make_typename_type): Likewise.
7632         * semantics.c (finish_template_type): Likewise.
7633         * pt.c (lookup_template_class): Add complain parm. Adjust.
7634         (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
7635         (tsubst): Likewise.
7636
7637 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
7638
7639         * pt.c (copy_default_args_to_explicit_spec): Preserve
7640         object's CV quals. Reorganize.
7641
7642 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
7643
7644         * typeck.c (build_modify_expr): Say `initialization' for
7645         INIT_EXPRs.
7646         * init.c (build_default_init): Convert to enumeral type, if
7647         needed.
7648
7649 2001-01-18  Jakub Jelinek  <jakub@redhat.com>
7650
7651         * parse.y (nomods_initdcl0): Properly set things up for
7652         initdcl0_innards.
7653
7654 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
7655
7656         * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
7657         (type_unification_real): Set it.
7658         (unify): Use it.
7659
7660 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
7661
7662         * decl.c (finish_destructor_body): Convert to vbase pointer here.
7663
7664 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
7665
7666         * semantics.c (begin_class_definition): Check we're not inside a
7667         template parm list.
7668
7669 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
7670
7671         * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
7672         BASELINK_P.
7673
7674 2001-01-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7675
7676         * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
7677         * call.c (build_over_call): Add comment.
7678
7679 2001-01-16 Daniel Berlin <dberlin@redhat.com>
7680
7681         * cvt.c (ocp_convert): Handle vector type conversion
7682         * typeck2.c (digest_init): Handle vector type initializations
7683
7684 2001-01-16  Phil Edwards  <pme@sources.redhat.com>
7685
7686         * g++spec.c:  Don't add libraries needlessly if -fsyntax-only
7687           was given.
7688
7689 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
7690
7691         * pt.c (check_nontype_parm): Rename to ...
7692         (invalid_nontype_parm_type_p): ... here.
7693         (process_template_parm): Adjust.
7694         (convert_template_argument): Adjust.
7695
7696 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
7697
7698         * pt.c (check_nontype_parm): New function.
7699         (process_template_parm): Use it.
7700         (convert_template_argument): Use it.
7701         (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
7702         member.
7703
7704 2001-01-14  Jeffrey Oldham  <oldham@codesourcery.com>
7705
7706         * tree.c: Add defaults.h
7707         (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
7708         * Make-lang.in (cp/tree.o): Add defaults.h.
7709
7710 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
7711
7712         * Make-lang.in (CXX_C_OBJS): Add c-format.o.
7713
7714 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
7715
7716         * g++.1: Change to be ".so man1/gcc.1".
7717
7718 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
7719
7720         * Make-lang.in (c++.info, c++.install-info): Build and install g++
7721         internals info.
7722         (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
7723         ($(srcdir)/cp/g++int.info): New target.
7724         * gxxint.texi: Add info directory entry.  Use @@ in email address.
7725         * .cvsignore: Update.
7726
7727 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
7728
7729         * typeck.c (build_c_cast): Do template processing earlier.
7730         Always pedwarn on array casts.
7731
7732 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
7733
7734         * friend.c (make_friend_class): Make sure a templated class is
7735         actually a template.
7736
7737 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
7738
7739         * decl2.c (get_guard): Set linkage from guarded decl.
7740
7741 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
7742
7743         * call.c (convert_default_arg): Check for unprocessed
7744         DEFAULT_ARG.
7745         * cp-tree.h (replace_defarg): Move to spew.c.
7746         (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
7747         spew.c, which is where they really are.
7748         (done_pending_defargs): Declare.
7749         (unprocessed_defarg_fn): Declare.
7750         * decl.c (replace_defarg): Move to spew.c
7751         * parse.y (structsp): Call done_pending_defargs.
7752         * spew.c (defarg_fns): Rearrange list structure.
7753         (defarg_fnsdone): New static variable.
7754         (defarg_depfns): New static variable.
7755         (init_spew): Adjust.
7756         (add_defarg_fn): Store the type in TREE_TYPE.
7757         (do_pending_defargs): Detect and deal with ordering constraints
7758         and circularity.
7759         (done_pending_defargs): New function.
7760         (unprocessed_defarg_fn): New function.
7761         (replace_defarg): Moved from decl.c. Robustify. Don't save
7762         if circularity detected.
7763
7764 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
7765
7766         * pt.c (unify): Check array has a domain, before checking
7767         whether it is variable sized.
7768
7769 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
7770
7771         * decl.c (grokparms): Unobfuscate and get correct diagnostic for
7772         parameters with pointers to arrays of unknown bound.
7773
7774 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
7775
7776         * parse.y (template_parm_header, template_spec_header): New
7777         reductions. Split out from ...
7778         (template_header): ... here. Use them.
7779         (template_template_parm): Use template_parm_header.
7780         * semantics.c (finish_template_template_parm): Add assert.
7781
7782 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
7783
7784         * mangle.c (write_builtin_type): Fix thinko.
7785
7786         * pt.c (copy_default_args_to_explicit_spec_1): New function.
7787         (copy_default_args_to_explicit_spec): Likewise.
7788         (check_explicit_specialization): Use it.
7789
7790         * class.c (finish_struct_1):  Remove last argument in call to
7791         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
7792         * decl.c (builtin_function): Likewise.
7793         (build_cp_library_fn): Likewise.
7794         (check_initializer): Likewise.
7795         (make_rtl_for_nonlocal_decl): Likewise.
7796         (cp_finish_decl): Likewise.
7797         (start_function): Likewise.
7798         * decl2.c (finish_anon_union): Likewise.
7799         * friend.c (do_friend): Likewise.
7800         * init.c (build_java_class_ref): Likewise.
7801         * method.c (make_thunk): Likewise.
7802         * pt.c (tsubst_friend_function): Likewise.
7803         * semantics.c (expand_body): Likewise.
7804
7805 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
7806
7807         * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
7808         looking at DECL_CLONED_FUNCTION for non-functions.
7809
7810 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
7811
7812         * error.c (dump_template_parameter): Use parm to determine how
7813         to print default value.
7814
7815 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
7816
7817         * class.c (duplicate_tag_error): Clear more flags.
7818
7819 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
7820
7821         * call.c (build_new_method_call): Use binfo_for_vbase.
7822
7823 2001-01-10  Joseph S. Myers  <jsm28@cam.ac.uk>
7824
7825         * cp-tree.h (flag_cond_mismatch): Don't declare.
7826         * decl2.c (flag_cond_mismatch): Don't define.
7827         (lang_f_options): Remove cond-mismatch.
7828         (unsupported_options): Add cond-mismatch.
7829
7830 2001-01-09  Nathan Sidwell  <nathan@codesourcery.com>
7831
7832         * class.c (handle_using_decl): Reject using of constructor name
7833         of sourcing class. Allow injecting of a method with same name as
7834         nested class. Fixup error messages.
7835
7836 2001-01-09  Joseph S. Myers  <jsm28@cam.ac.uk>
7837
7838         * decl2.c (lang_decode_option): Handle -Wformat=2.
7839
7840 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
7841
7842         * cp-tree.h (lang_decl_flags): Rename defined_in_class to
7843         initialized_in_class.
7844         (DECL_DEFINED_IN_CLASS_P): Rename to ...
7845         (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
7846         * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
7847         (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
7848         * pt.c (check_default_tmpl_args): Adjust for
7849         DECL_INITIALIZED_IN_CLASS_P.
7850         (instantiate_class_template): Likewise.
7851         (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
7852
7853         * class.c (finish_struct): Constify saved_filename.
7854
7855 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
7856
7857         * class.c (duplicate_tag_error): Adjust diagnostic.
7858         (finish_struct): Locally set location to start of struct.
7859         * decl.c (fixup_anonymous_aggr): Use cp_error_at.
7860
7861 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
7862
7863         * decl.c (struct binding_level): Adjust class_shadowed comments
7864         to reflect reality.
7865         (push_class_level_binding): Adjust comments to reflect reality.
7866         Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
7867         Don't set TREE_VALUE on the class_shadowed list.
7868
7869 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7870
7871         * decl2.c (acceptable_java_type): Allow references too.
7872         * init.c (build_java_class_ref): When using the new ABI, search
7873         `class$' and have it mangled with `mangle_decl.'
7874         * mangle.c (write_java_integer_type_codes): New function.
7875         (write_builtin_type): Detect and mangle Java integer and real
7876         types.
7877
7878 2001-01-07  Mark Mitchell  <mark@codesourcery.com>
7879
7880         * decl2.c (grokfield): Don't accept `asm' specifiers for
7881         non-static data members.
7882
7883 2001-01-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7884
7885         * expr.c (cplus_expand_expr): Don't reset `target'.
7886
7887 2001-01-07  Neil Booth  <neil@daikokuya.demon.co.uk>
7888
7889         * cp/decl2.c (cxx_post_options): Call cpp_post_options.
7890
7891 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
7892
7893         * parse.y (template_datadef): Check for error_mark_node.
7894
7895 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
7896
7897         * cp-tree.def (DEFAULT_ARG): Make `x' class.
7898
7899 2001-01-04  Joseph S. Myers  <jsm28@cam.ac.uk>
7900
7901         * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
7902         (record_builtin_type): Make non-static.
7903         (flag_short_double): Don't declare.
7904         (init_decl_processing): Remove the creation of many tree nodes now
7905         in c_common_nodes_and_builtins.
7906         (build_void_list_node): New function.
7907         * decl2.c (flag_short_double, flag_short_wchar): Don't define.
7908         * cp-tree.h (flag_short_wchar): Don't declare.
7909
7910 2001-01-04  Mark Mitchell  <mark@codesourcery.com>
7911
7912         * call.c (build_conv): Don't use build1 for USER_CONV.
7913         * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
7914
7915 2001-01-03  Joseph S. Myers  <jsm28@cam.ac.uk>
7916
7917         * lex.c (lang_init): Call c_common_lang_init.
7918
7919 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
7920
7921         * search.c (lookup_fnfields_here): Remove.
7922         (look_for_overrides_r): Use lookup_fnfields_1.
7923         Ignore functions from using declarations.
7924
7925 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
7926
7927         Implement exceptions specifiers for implicit member functions.
7928         * cp-tree.h (merge_exceptions_specifiers): Declare new function.
7929         * method.c (synthesize_exception_spec): New function.
7930         (locate_dtor, locate_ctor, locate_copy): New functions.
7931         (implicitly_declare_fn): Generate the exception spec too.
7932         * search.c (check_final_overrider): Check artificial functions
7933         too.
7934         * typeck2.c (merge_exception_specifiers): New function.
7935
7936 2001-01-03  Jason Merrill  <jason@redhat.com>
7937
7938         * init.c (build_default_init): New fn.
7939         (perform_member_init): Split out from here.
7940         (build_new_1): Use it.  Simplify initialization logic.
7941         (build_vec_init): Take an array, rather than a pointer and maxindex.
7942         Speed up simple initializations.  Don't clean up if we're assigning.
7943         * cp-tree.h: Adjust.
7944         * decl2.c (do_static_initialization): Remove TREE_VEC case.
7945         * parse.y (new_initializer): Return void_zero_node for ().
7946         * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
7947         * typeck2.c (digest_init): Only complain about user-written
7948         CONSTRUCTORs.
7949
7950 2000-12-22  Mike Stump  <mrs@wrs.com>
7951
7952         * decl2.c: (max_tinst_depth): Increase to 50.
7953
7954 2001-01-02  Mark Mitchell  <mark@codesourcery.com>
7955
7956         * class.c (invalidate_class_lookup_cache): Zero the
7957         previous_class_values.
7958         * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
7959         TREE_INT_CST_HIGH.
7960         (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
7961         * decl.c (free_bindings): New variable.
7962         (push_binding): Don't create a new binding if we have one on the
7963         free list.
7964         (pop_binding): Put old bindings on the free list.
7965         (init_decl_processing): Use size_int, not build_int_2.
7966         Register free_bindings as a GC root.
7967         (cp_make_fname_decl): Use size_int, not build_int_2.
7968         (push_inline_template_parms_recursive): Likewise.
7969         (end_template_parm_list): Likewise.
7970         (for_each_template_parm): Do not use walk_tree_without_duplicates.
7971         (tsubst_template_parms): Use size_int, not build_int_2.
7972         (tsubst): Likewise.
7973         * rtti.c (get_vmi_pseudo_type_info): Likewise.
7974
7975 2001-01-02  Richard Henderson  <rth@redhat.com>
7976
7977         * parse.y (asm): Set ASM_INPUT_P.
7978
7979 2001-01-02  Jason Merrill  <jason@redhat.com>
7980
7981         * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
7982         for v3 ABI.
7983
7984         * typeck.c (cp_truthvalue_conversion): New fn.
7985         * cvt.c (ocp_convert): Use it.
7986
7987         * cp-tree.h: Lose c-common.c decls.
7988
7989         * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
7990         * cvt.c (convert_to_void): Use type_unknown_p.
7991
7992         * typeck.c (strip_all_pointer_quals): Also strip quals from
7993         pointer-to-member types.
7994
7995         * Make-lang.in (cp/TAGS): Use --no-globals.  Ignore parse.c, and treat
7996         parse.y as C.
7997
7998         * call.c (build_new_method_call): Do evaluate the object parameter
7999         when accessing a static member.
8000         * typeck.c (build_component_ref): Likewise.
8001
8002 2001-01-02  Andreas Jaeger  <aj@suse.de>
8003
8004         * decl.c (cp_missing_noreturn_ok_p): New.
8005         (init_decl_processing): Set lang_missing_noreturn_ok_p.
8006
8007 2000-12-29  Jakub Jelinek  <jakub@redhat.com>
8008
8009         * decl.c (init_decl_processing): Fix sign of wchar_type_node.
8010
8011 2000-12-29  Mark Mitchell  <mark@codesourcery.com>
8012
8013         * class.c (pushclass): Remove #if 0'd code.
8014         * cp-tree.h (overload_template_name): Remove.
8015         * decl.c (store_bindings): Simplify.
8016         (pop_from_top_level): Likewise.
8017         * pt.c (overload_template_name): Remove.
8018         (instantiate_decl): Don't call push_to_top_level if it's not
8019         needed.
8020
8021 2000-12-28  Mark Mitchell  <mark@codesourcery.com>
8022
8023         * pt.c (register_local_specialization): Don't return a value.
8024         (lookup_template_class): Use move-to-front heuristic when looking
8025         up template instantiations.
8026         (instantiate_decl): Only push_to_top_level when we're actually
8027         going to instantiate the template.
8028
8029 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
8030
8031         * search.c (binfo_for_vtable): Return least derived class, not
8032         most.  Handle secondary vtables.
8033
8034 2000-12-22  Jason Merrill  <jason@redhat.com>
8035
8036         * pt.c (more_specialized): Don't optimize len==0.
8037         (fn_type_unification): If we're adding the return type, increase len.
8038
8039         * typeck.c (build_binary_op): Fix pmf comparison logic.
8040
8041         * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
8042         DECL_STATIC_FUNCTION_P.
8043
8044         * semantics.c (genrtl_finish_function): Don't try to jump to
8045         return_label unless it exists.
8046
8047         In partial ordering for a call, ignore parms for which we don't have
8048         a real argument.
8049         * call.c (joust): Pass len to more_specialized.
8050         (add_template_candidate_real): Strip 'this', pass len.
8051         * pt.c (more_specialized): Pass len down.  Lose explicit_args parm.
8052         (get_bindings_order): New fn.  Pass len down.
8053         (get_bindings_real): Strip 'this', pass len.
8054         (fn_type_unification): Likewise.
8055         (type_unification_real): Succeed after checking 'len' args.
8056         (most_specialized_instantiation): Lose explicit_args parm.
8057         * class.c (resolve_address_of_overloaded_function): Strip 'this',
8058         pass len.
8059
8060 2000-12-21  Jason Merrill  <jason@redhat.com>
8061
8062         * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
8063         DECL_TEMPLATE_RESULT.
8064
8065         * search.c (lookup_field_r): Call lookup_fnfields_1, not
8066         lookup_fnfields_here.
8067
8068         * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
8069
8070         * call.c (build_object_call): Also allow conversions that return
8071         reference to pointer to function.
8072         (add_conv_candidate): Handle totype being ref to ptr to fn.
8073         (build_field_call): Also allow members of type reference to function.
8074         Lose support for calling pointer to METHOD_TYPE fields.
8075
8076         * error.c (dump_expr): Handle *_CAST_EXPR.
8077
8078         * typeck2.c (build_scoped_ref): Always convert to the naming class.
8079
8080         * tree.c (break_out_cleanups): Lose.
8081         * cp-tree.h: Remove prototype.
8082         * typeck.c (build_component_ref): Don't break_out_cleanups.
8083         (build_compound_expr): Likewise.
8084         * semantics.c (finish_expr_stmt): Likewise.
8085
8086 2000-12-20  Richard Henderson  <rth@redhat.com>
8087
8088         * cp-tree.h: Update declarations.
8089         * decl.c (finish_case_label): Return the new stmt node.
8090         * semantics.c (finish_goto_stmt): Likewise.
8091         (finish_expr_stmt, finish_return_stmt): Likewise.
8092         (finish_break_stmt, finish_continue_stmt): Likewise.
8093         (finish_asm_stmt): Likewise.
8094         * parse.y (already_scoped_stmt): Set STMT_LINENO.
8095         (compstmt, implicitly_scoped_stmt, stmt): Likewise.
8096         (simple_if, simple_stmt): Return the new stmt node.
8097         (save_lineno): New.
8098
8099 2000-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
8100
8101         * cp-tree.h: Don't declare warn_long_long.
8102
8103 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8104
8105         * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
8106         IS_AGGR_TYPE.
8107
8108 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8109
8110         * pt.c (unify): Handle when both ARG and PARM are
8111         BOUND_TEMPLATE_TEMPLATE_PARM.
8112
8113 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8114
8115         * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
8116         DECL_TEMPLATE_PARM_P.
8117
8118 2000-12-15  Jason Merrill  <jason@redhat.com>
8119
8120         * init.c (build_new_1): Reorganize.  Now with 100% fewer SAVE_EXPRs!
8121
8122         * init.c (build_new_1): Don't strip quals from type.
8123
8124         * decl.c (pushdecl): Don't check for linkage on a non-decl.
8125
8126         * call.c (build_op_delete_call): See through ARRAY_TYPEs.
8127
8128         * call.c (build_new_function_call): Lose space before paren in
8129         error message.
8130         (build_new_method_call): Likewise.
8131
8132         * typeck2.c (build_m_component_ref): Propagate quals from datum.
8133
8134 2000-12-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8135
8136         * pt.c (check_explicit_specialization): Propagate default
8137         function arguments to explicit specializations.
8138
8139 2000-12-13  DJ Delorie  <dj@redhat.com>
8140
8141         * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
8142         and <? operators.
8143
8144 2000-12-08  Jason Merrill  <jason@redhat.com>
8145
8146         * error.c (dump_function_name): Don't let the user see __comp_ctor.
8147
8148         Clean up copy-initialization in overloading code.
8149         * call.c (build_user_type_conversion_1): Die if we are asked to
8150         convert to the same or a base type.
8151         (implicit_conversion): Avoid doing so.  Lose reference binding code.
8152         (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
8153         direct-initialization.  Also do direct-init part of copy-init.
8154         (build_user_type_conversion): Don't provide context to convert_like.
8155         * cvt.c (ocp_convert): build_user_type_conversion will now provide
8156         the constructor call for copy-init.
8157
8158         * pt.c (tsubst_decl): Call clone_function_decl here if this is an
8159         instantiation of a member template.
8160         (do_decl_instantiation): Not here.
8161
8162 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
8163
8164         * class.c (check_field_decls): Don't special case anonymous
8165         fields in error messages.
8166         (note_name_declared_in_class): Use %D on diagnostic.
8167
8168         * tree.c (pod_type_p): Use strip_array_types.
8169         (cp_valid_lang_attribute): Likewise.
8170         * typeck.c (cp_type_quals): Strip arrays separately, to avoid
8171         multiple evaluations.
8172         (cp_has_mutable_p): Use strip_array_types.
8173
8174 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
8175
8176         * cp-tree.h (sufficient_parms_p): Declare new function.
8177         * call.c (sufficient_parms_p): New function, broken out of ...
8178         (add_function_candidate): ... here. Use it.
8179         (add_conv_candidate): Use it.
8180         * decl.c (grok_ctor_properties): Use it.
8181
8182 2000-12-07  Jakub Jelinek  <jakub@redhat.com>
8183
8184         * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
8185
8186 2000-12-07  Joseph S. Myers  <jsm28@cam.ac.uk>
8187
8188         * decl2.c (lang_decode_option): Handle -Wformat-security.
8189
8190 2000-12-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8191
8192         * pt.c (verify_class_unification): New function.
8193         (get_class_bindings): Use it.
8194         (try_class_unification): Tidy.
8195         (unify): Handle when argument of a template-id is not
8196         template parameter dependent.
8197         (template_args_equal): Handle when TREE_CODE's do not match.
8198
8199 2000-12-06  Alexandre Oliva  <aoliva@redhat.com>
8200
8201         * lang-specs.h (c++): When invoking the stand-alone preprocessor
8202         for -save-temps, pass all relevant -Defines to it, and then don't
8203         pass them to cc1plus.
8204
8205 2000-12-05  Will Cohen  <wcohen@redhat.com>
8206
8207         * decl.c (finish_case_label): Cleared
8208         more_cleanups_ok in surrounding function scopes.
8209         (define_label): Likewise.
8210
8211 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
8212
8213         * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
8214         (get_matching_virtual): Remove.
8215         (look_for_overrides): Declare new function.
8216         * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
8217         DECL_VINDEX here.
8218         * class.c (check_for_override): Move base class iteration code
8219         to look_for_overrides.
8220         * search.c (next_baselink): Remove.
8221         (get_virtuals_named_this): Remove.
8222         (get_virtual_destructor): Remove.
8223         (tree_has_any_destructors_p): Remove.
8224         (struct gvnt_info): Remove.
8225         (check_final_overrider): Remove `virtual' from error messages.
8226         (get_matching_virtuals): Remove. Move functionality to ...
8227         (look_for_overrides): ... here, and ...
8228         (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
8229         to be overriding.
8230
8231 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
8232
8233         * typeck.c (get_delta_difference): If via a virtual base,
8234         return zero.
8235         * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
8236         adjustment.
8237
8238 2000-12-04  Richard Henderson  <rth@redhat.com>
8239
8240         * error.c (dump_tree): Use output_add_string not OB_PUTS.
8241
8242 2000-12-04  Jason Merrill  <jason@redhat.com>
8243
8244         * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
8245         (write_builtin_type): Pass intSI_type_node and the like through
8246         type_for_mode.
8247         * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
8248         Pass intSI_type_node and the like through type_for_mode.
8249         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
8250         * pt.c (tsubst, unify): Likewise.
8251         * tree.c (walk_tree): Likewise.
8252         * error.c (dump_type): Likewise.
8253         (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
8254
8255         * Make-lang.in: Tweak top comment for emacs.
8256         (cp/TAGS): Restore.
8257
8258         * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
8259
8260         * class.c (clone_function_decl): Robustify.
8261
8262 2000-12-04  Michael Matz  <matzmich@cs.tu-berlin.de>
8263
8264         * decl.c (store_bindings): Only search in the non modified
8265         old_bindings for duplicates.
8266
8267 2000-12-04  Nathan Sidwell  <nathan@codesourcery.com>
8268
8269         * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
8270         TYPE_POLYMORPHIC_P.
8271
8272         * typeck.c (build_static_cast): Remove unused variable.
8273
8274 2000-12-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8275
8276         * pt.c: Fix typo in comment.
8277
8278 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
8279
8280         * decl2.c (warn_format): Remove definition.
8281         (lang_decode_option): Handle -Wformat-nonliteral,
8282         -Wno-format-extra-args and -Wno-format-y2k.  Use set_Wformat.
8283
8284 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
8285
8286         * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
8287         (init_decl_processing): Don't create string_type_node,
8288         const_string_type_node, wint_type_node, intmax_type_node,
8289         uintmax_type_node, default_function_type, ptrdiff_type_node and
8290         unsigned_ptrdiff_type_node.  Adjust position of call to
8291         c_common_nodes_and_builtins.
8292         (identifier_global_value): New function.
8293
8294 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>
8295
8296         * call.c (standard_conversion): Reject pointer to member
8297         conversions from ambiguous, inaccessible or virtual bases.
8298         * typeck.c (build_static_cast): Don't check pointers to members
8299         specially.
8300
8301 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
8302
8303         * method.c (do_build_copy_constructor): Preserve cv
8304         qualifications when accessing source object members.
8305         (do_build_assign_ref): Likewise. Remove separate diagnostics for
8306         unnamed fields.
8307
8308 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
8309
8310         * method.c (do_build_assign_ref): Construct appropriately
8311         CV-qualified base reference. Don't allow const casts in base
8312         conversion.
8313
8314 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
8315
8316         * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
8317         incomplete return type.
8318
8319 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
8320
8321         * parse.y (base_class.1): Produce a _TYPE not a _DECL.
8322         * semantics.c (finish_base_specifier): Accept a _TYPE not a
8323         _DECL.
8324
8325 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
8326
8327         * spew.c (yyerror): Cope if yylval.ttype is NULL.
8328
8329 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
8330
8331         * decl.c (grokdeclarator): Diagnose undefined template contexts.
8332
8333 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
8334
8335         * decl.c (grokdeclarator): Do type access control on friend
8336         class.
8337
8338 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
8339
8340         * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
8341         bison parser ickiness.
8342         * pt.c (tsubst_friend_function): Enter namespace scope when
8343         tsubsting the function name.
8344         * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
8345
8346 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
8347
8348         * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
8349         * cvt.c (cp_convert_to_pointer): Add force parameter.
8350         Allow conversions via virtual base if forced.
8351         (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
8352         (ocp_convert): Likewise.
8353         * search.c (binfo_from_vbase): Return the virtual base's binfo.
8354         * typeck.c (get_delta_difference): Adjust handling of virtual
8355         bases.
8356
8357 2000-11-26  Mark Mitchell  <mark@codesourcery.com>
8358
8359         * tree.c (struct list_hash): Remove.
8360         (list_hash_table): Make it be an htab.
8361         (struct list_proxy): New type.
8362         (list_hash_eq): New function.
8363         (list_hash_pieces): Renamed from ...
8364         (list_hash): ... this.
8365         (list_hash_lookup): Remove.
8366         (list_hash_add): Remove.
8367         (hash_tree_cons): Use the generic hashtable.
8368         (mark_list_hash): Remove.
8369         (init_tree): Create the hashtable.
8370
8371 2000-11-25  Joseph S. Myers  <jsm28@cam.ac.uk>
8372
8373         * method.c (build_mangled_C9x_name): Rename to
8374         build_mangled_C99_name.  Change C9X references in comments to
8375         refer to C99.
8376
8377 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
8378
8379         * parse.y (unary_expr): Move VA_ARG from here ...
8380         (primary): ... to here.
8381
8382 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
8383
8384         * semantics.c (finish_id_expr): If type is error_mark, return
8385         error_mark.
8386
8387 2000-11-23  Nathan Sidwell  <nathan@codesourcery.com>
8388
8389         * pt.c (lookup_template_class): Simplify loop exit constructs.
8390         Cope when there is no partial instantiation of a template
8391         template member.
8392
8393 Thu Nov 23 02:16:47 2000  J"orn Rennecke <amylaar@redhat.com>
8394
8395         * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
8396
8397 2000-11-22  Mark Mitchell  <mark@codesourcery.com>
8398
8399         * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
8400         prefix.
8401
8402         * pt.c (do_decl_instantiate): Explicitly clone constructors and
8403         destructors that haven't already been cloned.
8404
8405 2000-11-20  Richard Henderson  <rth@redhat.com>
8406
8407         * parse.y (yyparse_1): Rename the parser entry point.
8408
8409 2000-11-20  Alex Samuel  <samuel@codesourcery.com>
8410
8411         * mangle.c (write_name): Use <unscoped-name> for names directly in
8412         function scope.
8413         (write_unscoped_name): Accept names directly in function scope.
8414
8415 2000-11-20  Nathan Sidwell  <nathan@codesourcery.com>
8416
8417         * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
8418         * parse.y (extdef): Add EXPORT reduction.
8419         * spew.c (yylex): Don't skip export here.
8420
8421 2000-11-19  Mark Mitchell  <mark@codesourcery.com>
8422
8423         * decl.c (init_decl_processing): Correct name of pure virtual
8424         function under the new ABI.
8425         * rtti.c (throw_bad_cast): Likewise, for bad cast function.
8426         (throw_bad_typeid): Likewise for bad typeid function.
8427
8428 2000-11-18  Mark Mitchell  <mark@codesourcery.com>
8429
8430         * decl.c (grokparms): Don't even function types of `void' type,
8431         either.
8432         * mangle.c (write_type): Don't crash when confronted with the
8433         error_mark_node.
8434
8435         * decl.c (grokparms): Don't create parameters of `void' type.
8436
8437 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
8438
8439         * lex.c (mark_impl_file_chain): Delete.
8440         (init_parse): Remove call to ggc_add_string_root.  No need to
8441         ggc_strdup a string constant.  Do not add impl_file_chain to GC
8442         roots.
8443         (handle_pragma_implementation): No need to ggc_strdup main_filename.
8444
8445 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
8446
8447         * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
8448
8449 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
8450
8451         * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
8452         * decl.c (grokdeclarator): Don't reject void parms here.
8453         (require_complete_types_for_parms): Simplify, use
8454         complete_type_or_else.
8455         (grokparms): Remove bitrot. Remove funcdef parm.
8456         Deal with ellipsis parm lists here.
8457         * semantics.c (finish_parmlist): Don't append void_list_node
8458         here. Set PARMLIST_ELLIPSIS_P.
8459
8460 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
8461
8462         * typeck2.c (incomplete_type_error): Reorganize to avoid
8463         excessive diagnostics.
8464
8465 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
8466
8467         * lex.c (struct impl_files, internal_filename): Constify a char *.
8468
8469 2000-11-16  Mark Mitchell  <mark@codesourcery.com>
8470
8471         * mangle.c (write_special_name_constructor): Don't generate
8472         assembler junk when confronted with an old-style constructor.
8473         (write_special_name_destructor): Likewise.
8474         (mangle_decl_string): Do it here instead.
8475
8476 2000-11-16  Nathan Sidwell  <nathan@codesourcery.com>
8477
8478         * call.c (op_error): Make error messages clearer.
8479
8480 2000-11-15  Mark Mitchell  <mark@codesourcery.com>
8481
8482         * decl.c (wrapup_globals_for_namespace): Don't mark things
8483         TREE_ASM_WRITTEN when they're not.
8484
8485 2000-11-15  Jason Merrill  <jason@redhat.com>
8486
8487         * typeck2.c (friendly_abort): Uncount the error before handing
8488         off to fancy_abort.
8489
8490 2000-11-15  Nathan Sidwell  <nathan@codesourcery.com>
8491
8492         * typeck.c (lookup_anon_field): Cope with qv qualifiers.
8493
8494 2000-11-14  Mark Mitchell  <mark@codesourcery.com>
8495
8496         * class.c (build_vtbl_initializer): Fix typo in comment.
8497         * typeck.c (expr_sizeof): Don't crash on errors.
8498
8499 2000-11-14  Jim Wilson  <wilson@redhat.com>
8500
8501         * lang-specs.h: Add %2 after %(cc1_options).
8502
8503 2000-11-14  Richard Henderson  <rth@redhat.com>
8504
8505         * typeck.c (c_sizeof): Be strict about casting result value
8506         back to c_size_type_node.
8507         (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
8508
8509 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
8510
8511         * typeck.c (build_unary_op): Use boolean_increment from
8512         c-common.c, moving the relevant code there.
8513
8514 2000-11-11  Jason Merrill  <jason@redhat.com>
8515
8516         * typeck.c (mark_addressable): Don't call put_var_into_stack.
8517
8518         * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
8519         in inlines.
8520
8521 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8522
8523         * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
8524         * lex.c (copy_lang_decl): Likewise.
8525
8526 2000-11-09  Mark Mitchell  <mark@codesourcery.com>
8527
8528         * dump.c (cp_dump_tree): Don't dump function bodies here.
8529
8530         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
8531         (dump.o): Update dependency list.
8532         * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
8533         (flag_dump_translation_unit): Likewise.
8534         (CP_TYPE_QUALS): Adjust definition.
8535         (DECL_C_BIT_FIELD): Remove.
8536         (SET_DECL_C_BIT_FIELD): Likewise.
8537         (CLEAR_DECL_C_BIT_FIELD): Likewise.
8538         (add_maybe_template): Likewise.
8539         (strip_array_types): Likewise.
8540         (dump_node_to_file): Likewise.
8541         (cp_dump_tree): New function.
8542         * decl.c (init_decl_processing): Set lang_dump_tree.
8543         * decl2.c (flag_dump_translation_unit): Remove.
8544         * dump.c: Move most of it to ../c-dump.c.
8545         (cp_dump_tree): New function.
8546         * pt.c (add_maybe_template): Remove.
8547         * typeck.c (strip_array_types): Likewise.
8548
8549 2000-11-07  Eric Christopher  <echristo@redhat.com>
8550
8551         * decl.c (init_decl_processing): Change definition of
8552         __wchar_t to wchar_t.  Remove artificial declaration of
8553         wchar_t.
8554         * lex.c: Change instances of __wchar_t to wchar_t.
8555
8556 2000-11-09  Nathan Sidwell  <nathan@codesourcery.com>
8557
8558         * lex.c (do_identifier): Don't lookup_name for operators.
8559         * parse.y (operator): Save looking_for_typename.
8560         (unoperator): Restore it.
8561         * spew.c (frob_opname): Use nth_token for lookahead.
8562
8563 2000-11-08  Nathan Sidwell  <nathan@codesourcery.com>
8564
8565         * decl.c (grok_op_properties): Always use coerce_new_type and
8566         coerce_delete_type.
8567         * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
8568         exception specification. Tidy up.
8569         (coerce_delete_type): Preserve exception specification. Tidy up.
8570
8571 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
8572
8573         * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
8574         (push_binding_level), error.c (cp_tree_printer), pt.c
8575         (process_partial_specialization, tsubst_template_arg_vector),
8576         search.c (lookup_member): Use memset () instead of bzero ().
8577
8578 2000-11-07  Nathan Sidwell  <nathan@codesourcery.com>
8579
8580         * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
8581
8582 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
8583
8584         * Make-lang.in (c++.distdir): Remove.
8585
8586 2000-11-04  Mark Mitchell  <mark@codesourcery.com>
8587
8588         * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
8589         declarations from different namespaces to be combined.
8590
8591 2000-11-03  Zack Weinberg  <zack@wolery.stanford.edu>
8592
8593         * decl.c: Include tm_p.h.
8594
8595 2000-11-03  Joseph S. Myers  <jsm28@cam.ac.uk>
8596
8597         * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
8598
8599 2000-11-02  Joseph S. Myers  <jsm28@cam.ac.uk>
8600
8601         * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
8602         (build_overload_value), repo.c (open_repo_file), xref.c
8603         (open_xref_file): Use strchr () and strrchr () instead of index ()
8604         and rindex ().
8605
8606 2000-11-01  Bernd Schmidt  <bernds@redhat.co.uk>
8607
8608         * call.c (build_over_call): Call fold on the CALL_EXPR.
8609
8610 2000-11-01  Gabriel Dos Reis  <gdr@codesourcery.com>
8611
8612         * error.c (dump_template_decl): Separate template hearders with
8613         space not comma.
8614
8615 2000-10-31  Gabriel Dos Reis  <gdr@codesourcery.com>
8616
8617         * error.c: Move TFF_ macros into cp-tree.h.  Throughout, replace
8618         TS_* flags with corresponding TFF_*.  Adjust prototypes of
8619         functions (which used to take a tree_string_flags) to take an int.
8620
8621         * cp-tree.h (enum tree_string_flags): Remove
8622         (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
8623         TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
8624         TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
8625         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
8626         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
8627         TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
8628         (type_as_string, decl_as_string, expr_as_string,
8629         context_as_string): Adjust prototype.
8630
8631         * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
8632         instead of TS_PLAIN.
8633
8634         * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
8635         instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
8636         plain `0'.
8637
8638 2000-10-30  Mark Mitchell  <mark@codesourcery.com>
8639
8640         * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
8641         (linkage_kind): New enumeration.
8642         (decl_linkage): New function.
8643         * decl2.c (comdat_linkage): Extend comment.
8644         * error.c (dump_function_decl): Print the arguments used to
8645         instantiate a template, even when not printing the type of the
8646         function.
8647         * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
8648         not TREE_PUBLIC, to test for external linkage.
8649         * tree.c (decl_linkage): New function.
8650
8651 2000-10-28  Mark Mitchell  <mark@codesourcery.com>
8652
8653         * pt.c (instantiate_decl): Always instantiate static data members
8654         initialized in-class.
8655
8656 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
8657
8658         * Make-lang.in: Move all build rules here from Makefile.in,
8659         adapt to new context.  Wrap all rules that change the current
8660         directory in parentheses.  Expunge all references to $(P).
8661         When one command depends on another and they're run all at
8662         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
8663         all object-file generation rules.  Delete obsolete variables.
8664
8665         * Makefile.in: Delete.
8666         * config-lang.in: Delete outputs= line.
8667
8668 2000-10-26  Gabriel Dos Reis  <gdr@codesourcery.com>
8669
8670         * error.c (dump_function_decl): Print no space between
8671         `ptr-operator' the `type-specifier' of the return type.
8672         (dump_type_prefix): Make sure we put space at the appropriate
8673         place.
8674
8675 2000-10-23  Jason Merrill  <jason@redhat.com>
8676
8677         * call.c (equal_functions): Also call decls_match for extern "C" fns.
8678
8679 2000-10-22  Jason Merrill  <jason@redhat.com>
8680
8681         * call.c (build_conditional_expr): Use ocp_convert to force
8682         rvalue conversion.
8683
8684 2000-10-22  Mark Mitchell  <mark@codesourcery.com>
8685
8686         * call.c (standard_conversion): Use RVALUE_CONVs for all
8687         expressions that satisfy lvalue_p, not just those that satisfy
8688         real_lvalue_p.
8689
8690         * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
8691
8692         * typeck.c (c_sizeof): Return an expression of `size_t' type,
8693         not one with TYPE_IS_SIZETYPE set.
8694         (dubious_conversion_warnings): Remove special-case code.
8695
8696 2000-10-21  Geoffrey Keating  <geoffk@cygnus.com>
8697
8698         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
8699         * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
8700         (dump_type_prefix): Print vector-of-int as 'int vector'.
8701         (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
8702         * tree.c (walk_tree): Handle VECTOR_TYPE.
8703
8704         * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
8705
8706 2000-10-21  Jason Merrill  <jason@redhat.com>
8707
8708         * parse.y (operator): Set got_object from got_scope.
8709         Set looking_for_typename.
8710         * decl.c (lookup_name_real): Clear val after setting from_obj.
8711         Reorganize diagnostic.
8712
8713 2000-10-20  Jason Merrill  <jason@redhat.com>
8714
8715         * tree.c (walk_tree): Don't walk into default args.
8716
8717         * error.c (dump_expr): Use host_integerp.
8718
8719 2000-10-20  David Edelsohn  <edelsohn@gnu.org>
8720
8721         * typeck2.c (abstract_virtuals_error): Use "because" instead of
8722         "since" in error message.
8723
8724 Fri Oct 20 13:54:59 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8725
8726         * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
8727
8728 2000-10-20  Jeffrey Oldham  <oldham@codesourcery.com>
8729
8730         * decl.c (revert_static_member_fn): Fixed typo.
8731
8732 2000-10-19  Mark Mitchell  <mark@codesourcery.com>
8733
8734         * class.c (subobject_offset_fn): New type.
8735         (dfs_record_base_offsets): Remove.
8736         (record_base_offsets): Likewise.
8737         (dfs_search_base_offsets): Likewise.
8738         (record_subobject_offset): New function.
8739         (check_subobject_offset): Likewise.
8740         (walk_subobject_offsets): Likewise.
8741         (record_subobject_offsets): Likewise.
8742         (layout_conflict_p): Reimplement.
8743         (layout_nonempty_base_or_field): Correct handling of type
8744         conflicts during layout.
8745         (layout_empty_base): Likewise.
8746         (build_base_field): Adjust to handle new representation of empty
8747         base offset table.
8748         (build_base_fields): Likewise.
8749         (layout_virtual_bases): Likewise.
8750         (splay_tree_compare_integer_csts): New function.
8751         (layout_class_type): Use a splay_tree, rather than a varray, to
8752         represent the offsets of empty bases.
8753
8754         * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
8755         * decl.c (select_decl): Don't return declarations that are
8756         DECL_ANTICIPATED.
8757
8758 2000-10-18  Mark Mitchell  <mark@codesourcery.com>
8759
8760         * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
8761         (fake_std_node): New macro.
8762         * decl.c (in_std): Rename to ...
8763         (in_fake_std): ... this.
8764         (flag_no_builtin): Remove.
8765         (flag_no_nonansi_builtin): Likewise.
8766         (walk_namespaces_r): Use fake_std_node.
8767         (push_namespace): Use std_identifier.
8768         (pop_namespace): Use in_fake_std.
8769         (lookup_name_real): Use fake_std_node.
8770         (init_decl_processing): When -fhonor-std, create the `std'
8771         namespace.  Don't create a dummy fake_std_node in that case.
8772         Adjust call to c_common_nodes_and_builtins.  Use std_identifier.
8773         (builtin_function): Put builtins whose names don't begin
8774         with `_' in the std namespace.
8775         * decl2.c (flag_no_builtin): Remove.
8776         (flag_no_nonansi_builtin): Likewise.
8777         (set_decl_namespace): Use fake_std_node.
8778         (validate_nonmember_using_decl): Likewise.
8779         (do_using_directive): Likewise.
8780         (handle_class_head): Likewise.
8781         * dump.c (dequeue_and_dump): Likewise.
8782         * except.c (init_exception_processing): Use std_identifier.
8783         * init.c (build_member_call): Use fake_std_node.
8784         * rtti.c (init_rtti_processing): Use std_identifier.
8785
8786 2000-10-17  Mark Mitchell  <mark@codesourcery.com>
8787
8788         * cp-tree.h (back_end_hook): Remove declaration.
8789         * decl2.c (back_end_hook): Remove definition.
8790
8791         * dump.c (dequeue_and_dump): Dump TREE_USED.
8792
8793 Tue Oct 17 20:19:06 2000  Brad Lucier <lucier@math.purdue.edu>
8794
8795         * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
8796
8797 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
8798
8799         * decl.c (WINT_TYPE): Define.
8800         (init_decl_processing): Create types unsigned_ptrdiff_type_node,
8801         c_size_type_node, signed_size_type_node and wint_type_node.
8802
8803 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
8804
8805         * decl2.c (warn_missing_format_attribute): New variable.
8806         (lang_decode_option): Decode -Wmissing-format-attribute.
8807
8808 2000-10-16  Mark Mitchell  <mark@codesourcery.com>
8809
8810         * typeck.c (qualify_type): Remove.
8811         (composite_pointer_type): Fix handling of conversions to `cv void*'.
8812
8813 2000-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8814
8815         * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
8816
8817 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8818
8819         * Makefile.in (parse.c, parse.h): Create atomically.
8820
8821 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
8822
8823         * class.c (current_obstack): Remove.
8824         * decl.c (ggc_p): Remove.
8825         (start_decl): Don't use decl_tree_cons.
8826         (grokdeclarator): Don't use build_decl_list.
8827         (start_function): Don't use decl_tree_cons.
8828         (finish_function): Don't mess with obstacks.
8829         * decl2.c (grok_x_components): Don't use build_decl_list.
8830         * lex.c (make_call_declarator): Don't call decl_tree_cons.
8831         (implicitly_declare_fn): Don't call build_decl_list.
8832         * parse.y (frob_specs): Don't call build_decl_list or
8833         decl_tree_cons.
8834         (expr_or_declarator_intern): Don't call decl_tree_cons.
8835         (primary): Don't call build_decl_list.
8836         (fcast_or_absdcl): Likewise.
8837         (typed_declspecs): Don't call decl_tree_cons.
8838         (reserved_declspecs): Don't call build_decl_list.
8839         (declmods): Likewise.
8840         (reserved_typespecquals): Likewise.
8841         (aggr): Likewise.
8842         (new_type_id): Likewise.
8843         (cv_qualifiers): Likewise.
8844         (after_type_declarator_intern): Likewise.
8845         (notype_declarator_intern): Likewise.
8846         (absdcl_intern): Likewise.
8847         (named_parm): Likewise.
8848         * pt.c (most_specialized_class): Likewise.
8849         * repo.c (temporary_obstack): Make it a structure, not a pointer.
8850         (init_repo): Initialize it.
8851         * search.c (current_obstack): Remove.
8852         * typeck2.c (add_exception_specifier): Don't call build_decl_list.
8853
8854 2000-10-09  Richard Henderson  <rth@cygnus.com>
8855
8856         * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
8857         (c++ language support bits for libgcc): Remove.
8858         (c++.clean): Remove cplib2.txt cleanup.
8859         * config-lang.in (headers, lib2funcs): Remove.
8860
8861         * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
8862         * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
8863         * inc/cxxabi.h, inc/exception, inc/new: Remove files.
8864         * inc/new.h, inc/typeinfo: Remove files.
8865
8866 2000-10-08  Joseph S. Myers  <jsm28@cam.ac.uk>
8867
8868         * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
8869         defined.
8870         (init_decl_processing): Initialize intmax_type_node and
8871         uintmax_type_node.
8872
8873 2000-10-06  Richard Henderson  <rth@cygnus.com>
8874
8875         * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
8876         (original_result_rtx): Remove.
8877         * decl.c (save_function_data): Don't clear x_result_rtx.
8878         (mark_lang_function): Don't mark it either.
8879         * expr.c (fixup_result_decl): Remove.
8880         * semantics.c (genrtl_named_return_value): Frob the return decl
8881         before calling emit_local_var.
8882         (genrtl_finish_function): Don't call fixup_result_decl.
8883         Always emit the jump to return_label.
8884
8885 2000-10-06  Nathan Sidwell  <nathan@codesourcery.com>
8886
8887         * pt.c (lookup_template_class): Set current access for enum.
8888         (tsubst_enum): Set file & line for enum decl.
8889
8890         * spew.c (yylex): Remove unused variable.
8891
8892 2000-10-05  Richard Henderson  <rth@cygnus.com>
8893
8894         * semantics.c (genrtl_finish_function): Don't init or check
8895         can_reach_end; remove noreturn and return value checks.
8896
8897 2000-10-05  Tom Tromey  <tromey@cygnus.com>
8898
8899         * init.c (build_java_class_ref): Use `build_static_name' with a
8900         suffix, not a prefix, to build the class object's name.
8901
8902 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
8903
8904         * cp-tree.h (access_kind): Fix comment typo.
8905         * decl2.c (grokfield): Fix diagnostic typo.
8906         * semantics.c (finish_template_type): Fix comment typo.
8907         (finish_qualified_object_call_expr): Likewise.
8908
8909 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
8910
8911         * pt.c (tsubst_expr, DECL_STMT case): Don't process if
8912         tsubsting fails.
8913
8914 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
8915
8916         * spew.c (frob_id): New static function.
8917         (frob_opname): Use it.
8918         (yylex): Use it.
8919
8920 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
8921
8922         * decl.c (lang_mark_false_label_stack): Remove.
8923         * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
8924
8925 2000-09-30  Joseph S. Myers  <jsm28@cam.ac.uk>
8926
8927         * gxxint.texi: Use @email for formatting email addresses.
8928
8929 2000-09-29  Gabriel Dos Reis  <gdr@codesourcery.com>
8930
8931         * error.c: Remove direct obstack manipulation.  Replace with
8932         output_buffer-based formatting.  Adjust calls to removed macros.
8933         (obstack_chunk_alloc, obstack_chunk_free): Remove.
8934         (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
8935         OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
8936
8937 2000-09-24  Mark Mitchell  <mark@codesourcery.com>
8938
8939         * ir.texi: Move to ../c-tree.texi.
8940
8941 2000-09-20  Jason Merrill  <jason@redhat.com>
8942
8943         * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
8944
8945 2000-09-21  Andreas Jaeger  <aj@suse.de>
8946
8947         * errfn.c: Move declaration of cp_printer and cp_printers to ...
8948         * cp-tree.h: ... here.
8949
8950         * error.c: Remove declaration of cp_printer.
8951
8952 2000-09-20  Mark Mitchell  <mark@codesourcery.com>
8953
8954         * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
8955
8956 2000-09-20  Hans-Peter Nilsson  <hp@axis.com>
8957
8958         * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
8959         users.
8960
8961 2000-09-18  Mark Mitchell  <mark@codesourcery.com>
8962
8963         * decl.c (start_function): Robustify.
8964
8965 2000-09-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8966
8967         * cp-tree.h (check_function_format): Accept a `status' parameter.
8968
8969         * call.c, typeck.c: Updates calls to `check_function_format'.
8970
8971 2000-09-17  Geoffrey Keating  <geoffk@cygnus.com>
8972
8973         * decl2.c (handle_class_head): Always push some scope even
8974         in the error case.
8975
8976 2000-09-16  Mark Mitchell  <mark@codesourcery.com>
8977
8978         * cp-tree.h (struct cp_language_function): Remove
8979         x_scope_stmt_stack and name_declared.
8980         (current_scope_stmt_stack): Remove.
8981         (function_name_declared_p): New macro.
8982         (struct lang_decl_flags): Use c_lang_decl as a base class.
8983         (context): Remove.
8984         (struct lang_decl): Replace saved_tree with context.
8985         (DECL_FRIEND_CONTEXT): Adjust accordingly.
8986         (SET_DECL_FRIEND_CONTEXT): Likewise.
8987         (DECL_VIRTUAL_CONTEXT): Likewise.
8988         (DECL_SAVED_TREE): Remove.
8989         (C_DECLARED_LABEL_FLAG): Likewise.
8990         (cplus_expand_expr_stmt): Don't declare.
8991         (add_decl_stmt): Likewise.
8992         (add_scope_stmt): Likewise.
8993         * decl.c (mark_stmt_tree): Remove.
8994         (case_compare): Likewise.
8995         (finish_case_label): Use c_add_case_label.
8996         (init_decl_processing): Set more language-specific hooks.
8997         (build_enumerator): Fix typo in comment.
8998         (cplus_expand_expr_stmt): Remove.
8999         (mark_lang_function): Use mark_c_language_function.
9000         (lang_mark_tree): Use c_mark_lang_decl.
9001         * decl2.c: Change order of inclusion.
9002         * except.c: Likewise.
9003         * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR.  Fall
9004         back on c_expand_expr.
9005         * friend.c: Include expr.h.
9006         * init.c: Change order of inclusion.
9007         * Makefile.in: Update dependencies.
9008         * lex.h (free_lang_decl_chain): Remove.
9009         * optimize.c (maybe_clone_body): Use function_name_declared_p.
9010         * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
9011         it doesn't exist.
9012         (instantiate_decl): Use function_name_declared_p.
9013         * semantics.c (lang_expand_expr_stmt): Remove.
9014         (set_current_function_name_declared): Likewise.
9015         (current_function_name_declared): Likewise.
9016         (begin_compound_stmt): Use function_name_declared_p.
9017         (add_decl_stmt): Remove.
9018         (setup_vtbl_ptr): Use function_name_declared_p.
9019         (add_scope_stmt): Remove.
9020         (current_scope_stmt_stack): New function.
9021         (cp_expand_stmt): Don't handle SCOPE_STMTs.
9022         (expand_body): Use function_name_declared_p.
9023         * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
9024         * typeck.c: Change order of includes.
9025         (convert_sequence): Remove.
9026
9027 2000-09-14  Joseph S. Myers  <jsm28@cam.ac.uk>
9028
9029         * lex.c (reswords): Add _Complex.
9030
9031 Thu Sep 14 12:10:45 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9032
9033         * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
9034
9035 2000-09-13  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
9036
9037         * init.c (begin_init_stmts): Don't use // comments.
9038
9039 2000-09-12  Jason Merrill  <jason@redhat.com>
9040
9041         * decl.c (maybe_deduce_size_from_array_init): Set do_default for
9042         all non-extern arrays.
9043
9044         * decl.c (grokdeclarator): Complain about 'friend T' for implicit
9045         typenames, too.  Downgrade complaint to pedwarn.
9046         (xref_tag): Warn about surprising behavior of 'friend struct T'.
9047         * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
9048         'class This::Inherited'.
9049
9050 2000-09-12  Mark Mitchell  <mark@codesourcery.com>
9051
9052         * decl.c (finish_case_label): Given the LABEL_DECL a
9053         DECL_CONTEXT.
9054
9055 2000-09-12  Gabriel Dos Reis  <gdr@codesourcery.com>
9056
9057         * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
9058         TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
9059         TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
9060         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
9061         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
9062         New macros.
9063         (sorry_for_unsupported_tree, print_scope_operator,
9064         print_left_paren, print_right_paren, print_left_bracket,
9065         print_right_bracket, print_whitespace): Likewise.
9066         (aggr_variety): Rename to class_key_or_enum.
9067         (print_type): Rename to print_type_id.
9068         (print_type_specifier_seq, print_simple_type_specifier,
9069         print_elaborated_type_specifier,
9070         print_rest_of_abstract_declarator,
9071         print_parameter_declaration_clause, print_exception_specification,
9072         print_nested_name_specifier, print_template_id,
9073         typedef_original_name,  print_template_argument_list_start,
9074         print_template_argument_list_end): New functions.
9075
9076 2000-09-11  Gabriel Dos Reis  <gdr@codesourcery.com>
9077
9078         * ir.texi: Add more documentation.
9079
9080 2000-09-11  Mark Mitchell  <mark@codesourcery.com>
9081
9082         * cp-tree.h (struct saved_scope): Remove x_function_parms.
9083         (current_function_parms): Don't define.
9084         (struct cp_language_function): Remove parms_stored.
9085         (current_function_just_assigned_this): Don't define.
9086         (current_function_parms_stored): Likewise.
9087         (static_ctors): Declare.
9088         (static_dtors): Likewise.
9089         (SF_EXPAND): Don't define.
9090         (expand_start_early_try_stmts): Remove declaration.
9091         (store_parm_decls): Likewise.
9092         * decl.c (static_ctors): Don't declare.
9093         (static_dtors): Likewise.
9094         (struct binding_level): Remove this_block.
9095         (poplevel): Remove dead code.
9096         (set_block): Likewise.
9097         (mark_binding_level): Don't mark this_block.
9098         (mark_saved_scope): Don't mark x_function_parms.
9099         (init_decl_processing): Don't add current_function_parms as a GC
9100         root.
9101         (check_function_type): Change prototype.
9102         (start_function): Remove RTL-generation code.
9103         (expand_start_early_try_stmts): Remove.
9104         (store_parm_decls): Give it internal linkage.  Remove
9105         RTL-generation code.
9106         (finish_function): Remove RTL-generation code.
9107         * decl2.c (static_ctors): Fix formatting.
9108         (static_dtors): Likewise.
9109         * method.c (use_thunk): Don't call store_parm_decls.
9110         (synthesize_method): Likewise.
9111         * optimize.c (maybe_clone_body): Likewise.
9112         * parse.y (fn.def2): Likewise.
9113         (.set_base_init): Likewise.
9114         (nodecls): Likewise.
9115         * pt.c (instantiate_decl): Likewise.
9116         * rtti.c (synthesize_tinfo_fn): Likewise.
9117         * semantics.c (genrtl_try_block): Simplify.
9118         (expand_body): Use genrtl_start_function and
9119         genrtl_finish_function.
9120         (genrtl_start_function): New function.
9121         (genrtl_finish_function): Likewise.
9122
9123 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
9124
9125         * error.c (cp_tree_printer, case 'P'): Append break.
9126
9127 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
9128
9129         * cp-tree.h (frob_opname): Declare.
9130         * parse.y (saved_scopes): New static variable.
9131         (cp_parse_init): Adjust.
9132         (do_id): If lastiddecl is NULL, do do_identifier.
9133         (operator): Save scope information.
9134         (unoperator): New reduction. Restore scope information.
9135         (operator_name): Append unoperator. Call frob_opname.
9136         * spew.c (frob_opname): Define.
9137
9138 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
9139
9140         * decl.c, rtti.c: Include defaults.h if not already included.
9141         Don't define the *_TYPE_SIZE macros.
9142
9143 2000-09-09  Mark Mitchell  <mark@codesourcery.com>
9144
9145         * cp-tree.h (push_switch): Change prototype.
9146         (check_cp_case_value): Remove declaration.
9147         (decl_constant_value): Likewise.
9148         * decl.c (struct cp_switch): Add switch_stmt and cases.
9149         (case_compare): New function.
9150         (push_switch): Set switch_stmt.  Initialize cases.
9151         (pop_switch): Clean up cases.
9152         (define_case_label): Rename to ...
9153         (finish_case_label): ... this.  Do semantic analysis for case
9154         labels here.
9155         (start_function): Correct comment.
9156         * decl2.c (check_cp_case_value): Remove.
9157         * expr.c (do_case): Remove.
9158         * pt.c (tsubst_expr): Adjust call to finish_case_label.
9159         * semantics.c (genrtl_do_poplevel): Remove declaration.
9160         (RECHAIN_STMTS): Remove.
9161         (finish_break_stmt): Use build_break_stmt.
9162         (finish_continue_stmt): Use build_continue_stmt.
9163         (finish_switch_cond): Adjust condition here, rater than in
9164         c_expand_start_case.
9165         (finish_case_label): Remove.
9166         * typeck.c (c_expand_return): Remove.
9167         (c_expand_start_case): Likewise.
9168
9169 2000-09-07  Gabriel Dos Reis  <gdr@codesourcery.com>
9170
9171         * ir.texi: Document type nodes.
9172
9173 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
9174
9175         * cp-tree.h (init_cp_semantics): Declare.
9176         (genrtl_try_block): Don't declare.
9177         (genrtl_handler): Likewise.
9178         (genrtl_catch_block): Likewise.
9179         (genrtl_ctor_stmt): Likewise.
9180         (genrtl_subobject): Likewise.
9181         (genrtl_do_poplevel): Likewise.
9182         (genrtl_named_return_value): Likewise.
9183         * lex.c (init_parse): Call init_cp_semantics.
9184         * semantics.c (genrtl_try_block): Give it internal linkage.
9185         (genrtl_handler): Likewise.
9186         (genrtl_catch_block): Likewise.
9187         (genrtl_ctor_stmt): Likewise.
9188         (genrtl_subobject): Likewise.
9189         (genrtl_do_poplevel): Likewise.
9190         (genrtl_named_return_value): Likewise.
9191         (lang_expand_stmt): Rename to ...
9192         (cp_expand_stmt): ... this.  Only handle C++-specific nodes.
9193         (init_cp_semantics): Define.
9194
9195         * decl.c (initialize_local_var): Remove RTL-generating code.
9196         * semantics.c (genrtl_try_block): Fix formatting.
9197
9198         Move statement-tree facilities from C++ to C front-end.
9199         * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
9200         (void_zero_node): Remove.
9201         (stmt_tree): Likewise.
9202         (scope_chain): Adjust.
9203         (language_function): Rename to cp_language_function.
9204         (cp_function_chain): Adjust.
9205         (current_stmt_tree): Remove.
9206         (last_tree): Likewise.
9207         (last_expr_type): Likewise.
9208         (struct lang_decl): Adjust.
9209         (STMT_IS_FULL_EXPR_P): Remove.
9210         (add_tree): Remove.
9211         (begin_stmt_tree): Likewise.
9212         (finish_stmt_tree): Likewise.
9213         (walk_tree_fn): Likewise.
9214         (walk_stmt_tree): Likewise.
9215         * class.c (finish_struct): Replace use of add_tree with add_stmt.
9216         * decl.c (mark_stmt_tree): Adjust type.
9217         (init_decl_processing): Don't build void_zero_node.
9218         (initialize_local_var): Adjust usage of current_stmt_tree.
9219         (finish_enum): Use add_stmt, not add_tree.
9220         (save_function_data): Adjust use of language_function.
9221         (finish_constructor_body): Use add_stmt, not add_tree.
9222         (finish_destructor_body): Likewise.
9223         (push_cp_function_context): Adjust use of language_function.
9224         (pop_cp_function_context): Likewise.
9225         (mark_lang_function): Likewise.
9226         (mark_cp_function_context): Likewise.
9227         * init.c (build_aggr_init): Adjust use of current_stmt_tree.
9228         (build_vec_init): Likewise.
9229         * semantics.c (SET_LAST_STMT): Remove.
9230         (RECHAIN_STMTS): Don't use it.
9231         (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
9232         (current_stmt_tree): Define.
9233         (add_tree): Remove.
9234         (finish_goto_stmt): Use add_stmt, not add_tree.
9235         (finish_expr_stmt): Likewise.
9236         (begin_if_stmt): Likewise.
9237         (finish_then_clause): Likewise.
9238         (begin_while_stmt): Likewise.
9239         (begin_do_stmt): Likewise.
9240         (finish_return_stmt): Likewise.
9241         (begin_for_stmt): Likewise.
9242         (finish_break_stmt): Likewise.
9243         (finish_continue_stmt): Likewise.
9244         (begin_switch_stmt): Likewise.
9245         (finish_case_label): Likewise.
9246         (begin_try_block): Likewise.
9247         (begin_function_try_block): Likewise.
9248         (begin_handler): Likewise.
9249         (begin_catch_block): Likewise.
9250         (begin_compound_stmt): Likewise.
9251         (begin_asm_stmt): Likewise.
9252         (finish_asm_stmt): Likewise.
9253         (finish_label_stmt): Likewise.
9254         (add_decl_stmt): Likewise.
9255         (finish_subobject): Likewise.
9256         (finish_decl_cleanup): Likewise.
9257         (finish_named_return_value): Likewise.
9258         (setup_vtbl_ptr): Likewise.
9259         (add_scope_stmt): Likewise.
9260         (finish_stmt_expr): Likewise.
9261         (prune_unused_decls): Remove.
9262         (begin_stmt_tree): Likewise.
9263         (finish_stmt_tree): Likewise.
9264         (prep_stmt): Adjust use of current_stmt_tree.
9265         (lang_expand_stmt): Likewise.
9266         * tree.c (statement_code_p): Remove.
9267         (cp_statement_code_p): New function.
9268         (walk_stmt_tree): Remove.
9269         (init_tree): Set lang_statement_code_p.
9270
9271 2000-09-06  Zack Weinberg  <zack@wolery.cumb.org>
9272
9273         Integrated preprocessor.
9274
9275         * Make-lang.in, Makefile.in: Remove all references to input.c,
9276         gxx.gperf, and hash.h.  Add ../c-lex.o to C_OBJS.
9277         * gxx.gperf, hash.h, input.c: Delete.
9278         * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
9279         initialized properly.
9280
9281         * class.c (fixup_pending_inline): Take a tree, not a
9282         struct pending_inline *.  All callers changed.
9283         (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
9284         RID_PROTECTED entries in ridpointers[] array here.
9285         * decl.c (duplicate_decls): Do not refer to struct
9286         pending_inline.
9287         (record_builtin_type, init_decl_processing): Use RID_MAX not
9288         CP_RID_MAX.
9289         (grokdeclarator): Use C_IS_RESERVED_WORD.
9290         * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
9291         cpplib.
9292         (grok_x_components): Do not inspect pending_inlines chain.
9293
9294         * cp-tree.h (struct lang_identifier): Add rid_code entry.
9295         (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
9296         (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
9297         (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
9298         TIME_IDENTIFIER_FILEINFO): Kill.
9299         Update prototypes.
9300         * lex.h: Expunge cp_rid.  Rewrite RIDBIT macros to use just a
9301         single 32-bit word.
9302         * parse.y: Call do_pending_inlines unconditionally.
9303         reinit_parse_for_method is now snarf_method.  fn.defpen is no
9304         longer necessary.  Remove unnecessary <itype> annotation on
9305         SCOPE.  Do not refer to end_of_file or struct pending_inline.
9306         * semantics.c (begin_inline_definitions): Call
9307         do_pending_inlines unconditionally.
9308
9309         * lex.c: Remove all code now shared with C front end.
9310         Initialize cpplib properly if USE_CPPLIB.  Put reserved words
9311         into the get_identifier table.  Rewrite pragma handling to
9312         work with the registry.  Move code to save tokens for later
9313         processing to spew.c.
9314
9315         * spew.c: Rewrite everything in terms of token streams instead
9316         of text.  Move routines here from lex.c / input.c as
9317         appropriate.  GC-mark trees hanging off the pending inlines
9318         chain.
9319
9320 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
9321
9322         * NEWS: Mention that the named return value extension has been
9323         deprecated.
9324         * cp-tree.h (original_result_rtx): Define.
9325         (TREE_REFERENCE_EXPR): Remove.
9326         (DECL_VPARENT): Likewise.
9327         (pushdecl_nonclass_level): Likewise.
9328         (store_return_init): Likewise.
9329         (reinit_lang_specific): Likewise.
9330         (genrtl_named_return_value): Change prototype.
9331         * decl.c (original_result_rtx): Remove.
9332         (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
9333         Do not generate RTL for local variables here.
9334         (store_return_init): Remove.
9335         * semantics.c (genrtl_named_return_value): Simplify.  Fold in
9336         store_return_init.
9337         (finish_named_return_value): Adjust accordingly.  Warn that this
9338         extension is deprecated.
9339         (lang_expand_stmt): Adjust call to genrtl_named_return_value.
9340
9341 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
9342
9343         * pt.c (type_unification_real): Replace switch with if.
9344         (unify): Tsubst non-type parms before comparing.
9345
9346 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
9347
9348         * error.c (dump_typename): New function, broken out of ...
9349         (dump_type): ... here. Use it.
9350         * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
9351
9352 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
9353
9354         * init.c (build_offset_ref): Deal with namespace scoped
9355         TEMPLATE_ID_EXPRs.
9356
9357 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
9358
9359         * class.c (resolve_address_of_overloaded_function): Add
9360         explanation message.
9361         * decl.c (define_case_label): Reformat explanation.
9362         * decl2.c (finish_static_data_member_decl): Likewise.
9363         (grokfield): Likewise.
9364         * friend.c (do_friend): Likewise.
9365
9366 2000-09-05  Zack Weinberg  <zack@wolery.cumb.org>
9367
9368         * tree.c (walk_tree): Expose tail recursion.
9369         (walk_stmt_tree): New function.
9370         * cp-tree.h: Prototype walk_stmt_tree.
9371         * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
9372         the BLOCKs directly.  If a BLOCK has no variables after
9373         pruning, discard it.
9374         (finish_stmt_tree): Use walk_stmt_tree.  No need to save and
9375         restore the line number.
9376
9377 2000-09-05  Mark Mitchell  <mark@codesourcery.com>
9378
9379         * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
9380         (pt.o): Remove dependency on HTAB_H.
9381         * cp-tree.h: Include hashtab.h.
9382         (walk_tree): Change prototype.
9383         (walk_tree_without_duplicates): New function.
9384         * decl.c (check_default_argument): Use it.
9385         * optimize.c (remap_decl): Adjust calls to walk_tree.
9386         (copy_body): Likewise.
9387         (expand_calls_inline): Likewise.
9388         (calls_setjmp_p): Use walk_tree_without_duplicates.
9389         * pt.c: Don't include hashtab.h.
9390         (for_each_template_parm): Use walk_tree_without_duplicates.
9391         * semantics.c (finish-stmt_tree): Likewise.
9392         (expand_body): Likewise.
9393         * tree.c (walk_tree): Add additional parameter.
9394         (walk_tree_without_duplicates): New function.
9395         (count_trees): Use it.
9396         (verify_stmt_tree): Adjust call to walk_tree.
9397         (find_tree): Use walk_tree_without_duplicates.
9398         (no_linkage_check): Likewise.
9399         (break_out_target_exprs): Adjust call to walk_tree.
9400         (cp_unsave): Likewise.
9401
9402 2000-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9403
9404         * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
9405         (TEMPLATE_TEMPLATE_PARM): Adjust comment.
9406         * cp-tree.h (TYPE_BINFO): Adjust comment.
9407         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
9408         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
9409         (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
9410         (TYPE_TEMPLATE_INFO): Likewise.
9411         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
9412         * class.c (push_nested_class): Likewise.
9413         * decl.c (lookup_name_real): Likewise.
9414         (grokdeclarator): Likewise.
9415         (grok_op_properties): Likewise.
9416         (xref_tag): Likewise.
9417         (xref_basetypes): Likewise.
9418         * decl2.c (constructor_name_full): Likewise.
9419         (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
9420         (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
9421         * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
9422         (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
9423         (dump_type_suffix): Likewise.
9424         * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
9425         instead.
9426         (get_aggr_from_typedef): Likewise.
9427         * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
9428         (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
9429         (write_template_parm): Likewise.
9430         (write_template_template_parm): Check tree code instead of
9431         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
9432         * method.c (build_overload_nested_name): Add
9433         BOUND_TEMPLATE_TEMPLATE_PARM.
9434         (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
9435         * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
9436         * pt.c (convert_template_argument): Check tree code instead of
9437         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
9438         (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
9439         (for_each_template_parm): Adjust comment.
9440         (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.
9441         (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
9442         (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.  Use
9443         template_args_equal to compare template template parameter cases.
9444         * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
9445         * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
9446         instead.
9447         * tree.c (copy_template_template_parm): Decide whether to create
9448         a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
9449         (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
9450         (copy_tree_r): Likewise.
9451         * typeck.c (comptypes): Likewise.  Check tree code instead of
9452         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
9453
9454 2000-09-04  Mark Elbrecht  <snowball3@bigfoot.com>
9455
9456         * decl.c (finish_function): Move the code for handling functions
9457         marked with the constructor and destructor attributes inside the
9458         expand_p block.
9459
9460 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
9461
9462         * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
9463
9464 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
9465
9466         * pt.c (lookup_template_class): Remove abort.
9467         * tree.c (get_type_decl): Allow error_mark_node.
9468
9469 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
9470
9471         * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
9472         TEMPLATE_ID_EXPRs.
9473
9474 2000-09-03  Mark Mitchell  <mark@codesourcery.com>
9475
9476         * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
9477         new ABI mangling.
9478
9479 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
9480
9481         * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
9482         union tag mismatch error reporting.
9483
9484 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
9485
9486         * call.c (build_scoped_method_call): Check it is not a namespace.
9487
9488 2000-08-30  Jason Merrill  <jason@redhat.com>
9489
9490         * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
9491
9492         * tree.c (bot_manip): Check TREE_CONSTANT rather than
9493         !TREE_SIDE_EFFECTS.  Call break_out_target_exprs and
9494         build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
9495
9496         * decl.c (start_function): Always call make_function_rtl.
9497
9498 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
9499
9500         * semantics.c (prune_unused_decls): New function.
9501         (finish_stmt_tree): Call it via walk_tree.
9502
9503 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
9504
9505         * class.c (build_secondary_vtable): Constify a char *.
9506         * decl.c (init_decl_processing): Initialize function_id_node,
9507         pretty_function_id_node, and func_id_node.
9508         * input.c (struct input_source): Constify 'str'.
9509         (feed_input): Constify first argument.
9510         * mangle.c (write_identifier): Constify argument.
9511         * pt.c (mangle_class_name_for_template): Constify argument.
9512
9513 2000-08-29  Mark Mitchell  <mark@codesourcery.com>
9514
9515         * typeck.c (mark_addressable): Remove code that pokes around in
9516         RTL.
9517
9518 2000-08-28  Jason Merrill  <jason@redhat.com>
9519
9520         * lex.c (file_name_nondirectory): Move to toplev.c.
9521
9522         * cp-tree.h (LOCAL_CLASS_P): New macro.
9523         * class.c (finish_struct_1): Use it.
9524
9525 2000-08-27  Alex Samuel  <samuel@codesourcery.com>
9526
9527         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
9528         (write_encoding): Pass another argument to write_name.
9529         (write_name): Add ignore_local_scope parameter.  Fix handling of
9530         local names.
9531         (write_nested_name): Use write_unqualified_name.
9532         (write_prefix): Likewise.  Skip out on FUNCTION_DECLs.
9533         (write_template_prefix): Use write_unqualified_name.
9534         (write_component): Remove.
9535         (write_local_name): Add parameter.  Use direct local entity to
9536         discriminator calculation.
9537         (write_class_enum_type): Pass another argument to write_name.
9538         (write_template_template_arg): Likewise.
9539         (make_guard_variable): Likewise.
9540
9541 2000-08-27  Jason Merrill  <jason@redhat.com>
9542
9543         * decl.c (pushdecl): Matching decls for local externs are found in
9544         the current level.  Propagate linkage information from previous
9545         declarations.
9546
9547 2000-08-26  Gabriel Dos Reis  <gdr@codesourcery.com>
9548
9549         * ir.texi (Expressions): Fix typo.
9550
9551 2000-08-25  Greg McGary  <greg@mcgary.org>
9552
9553         * tree.c (init_tree): Use ARRAY_SIZE.
9554
9555 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
9556
9557         * error.c (cp_tree_printer): Rework.
9558
9559 2000-08-25  Mark Mitchell  <mark@codesourcery.com>
9560
9561         * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
9562         dyn-string.o.
9563         (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
9564         (cp-demangle.o): Remove target.
9565         (dyn-string.o): Likewise.
9566
9567         * decl.c (grokfndecl): Require that `main' return an `int'.
9568         * mangle.c (write_encoding): Don't mangle return types for
9569         conversion functions.
9570
9571 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
9572
9573         * error.c (tree_formatting_info): New data type.
9574         (tree_being_formatted): New macro.
9575         (tree_formatting_flags): Likewise.
9576         (put_whitespace): Likewise.
9577         (print_tree_identifier): Likewise.
9578         (print_identifier): Likewise.
9579         (cp_tree_printer, print_function_argument_list, print_declaration,
9580         print_expression, print_function_declaration,
9581         print_function_parameter, print_type, print_cv_qualifier): New
9582         functions.
9583         (init_error): Initialize lang_printer.
9584
9585 2000-08-24  Jason Merrill  <jason@redhat.com>
9586
9587         * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
9588         adjustment necessary.
9589
9590 2000-08-24  Greg McGary  <greg@mcgary.org>
9591
9592         * cp-tree.h (MAIN_NAME_P): Remove macro.
9593
9594 2000-08-24  Gabriel Dos Reis  <gdr@codesourcery.com>
9595
9596         * error.c (print_instantiation_context): Don't forget to flush the
9597         buffer.
9598
9599 2000-08-23  Jason Merrill  <jason@redhat.com>
9600
9601         * typeck.c (build_ptrmemfunc): Save the input pmf.
9602
9603         * method.c (process_modifiers): Use same_type_p.
9604
9605 2000-08-23  Mark Mitchell  <mark@codesourcery.com>
9606
9607         * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
9608         * mangle.c (write_function_type): Change prototype.
9609         (write_encoding): Don't mangle return types for
9610         constructors or destructors.
9611         (write_type): Adjust call to write_function_type.
9612         * pt.c (instantiate_template): Instantiate alternate entry points
9613         when instantiating the main function.
9614
9615 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
9616
9617         * error.c (cp_print_error_function): Don't use embedded '\n' in
9618         output_printf.
9619
9620 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
9621
9622         * decl.c (init_decl_processing): Remove bogus initialization.
9623         * error.c (lang_print_error_function): Restore here.
9624         (init_error): Initialize print_error_function.
9625
9626 2000-08-22  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
9627
9628         * decl2.c (arg_assoc): Revert my 2000-08-11 change.
9629
9630 2000-08-22  Gabriel Dos Reis  <gdr@codesourcery.com>
9631
9632         * Makefile.in (error.o): Depends on diagnostic.h
9633
9634         * cp-tree.h (problematic_instantiation_changed,
9635         record_last_problematic_instantiation, current_instantiation,
9636         print_instantiation_context): Declare.
9637         (maybe_print_template_context): Remove.
9638
9639         * decl.c (init_decl_processing): Set print_error_function to NULL.
9640         (lang_print_error_function): Remove, since we're using a new
9641         machinery.
9642
9643         * error.c: #include diagnostic.h
9644         (function_category): New function.
9645         (cp_diagnostic_starter): Likewise.
9646         (cp_diagnostic_finalizer): Likewise.
9647         (cp_print_error_function): Likewise.
9648         (maybe_print_instantiation_context): Likewise.
9649         (print_instantiation_full_context): Likewise.
9650         (print_instantiation_partial_context): Likewise.
9651         (print_instantiation_context): Define.
9652         (init_error): Initialize diagnostic pager and finalizer.
9653
9654         * pt.c (problematic_instantiation_changed): Define.
9655         (record_last_problematic_instantiation): Likewise.
9656         (current_instantiation): Likewise.
9657         (maybe_print_template_context): Remove.
9658         (print_template_context): Likewise.
9659         (current_tinst_level): Make static to reflect Brendan Kehoe's
9660         change of 1995-04-13.
9661         (push_tinst_level): Call print_instantiation_context.
9662
9663 2000-08-21  Nix  <nix@esperi.demon.co.uk>
9664
9665         * lang-specs.h: Do not process -o or run the assembler if
9666         -fsyntax-only.
9667
9668 2000-08-21  Joseph S. Myers  <jsm28@cam.ac.uk>
9669
9670         * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
9671         variables.
9672         * decl2.c (lang_decode_option): Disable gettext attributes for
9673         -ansi.
9674
9675 2000-08-21  Gabriel Dos Reis  <gdr@codesourcery.com>
9676
9677         * lex.c (lang_init_options): Default diagnostic message maximum
9678         length to 80, when line-wrapping.
9679
9680 2000-08-20  Mark Mitchell  <mark@codesourcery.com>
9681
9682         * class.c (build_vtbl_initializer): Clear the entire
9683         vtbl_init_data.  Start keeping track of the functions for which we
9684         have created vcall offsets here.
9685         (dfs_build_vcall_offset_vtbl_entries): Remove.
9686         (build_vcall_offset_vtbl_entries): Reimplement.
9687         (add_vcall_offset_vtbl_entries_r): New function.
9688         (add_vcall_offset_vtbl_entries_1): Likewise.  Tweak logic for
9689         computing when vcall offsets are necessary.
9690
9691 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
9692
9693         * decl.c (member_function_or_else): Use cp_error ... %T.
9694         (grokdeclarator): Likewise.
9695         (start_method): Likewise.
9696         * friend.c (make_friend_class): Use cp_pedwarn ... %T.
9697
9698 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
9699
9700         * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
9701         TYPE_DECLs.
9702
9703 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
9704
9705         * cp-tree.h (PTRMEM_OK_P): New macro.
9706         (itf_ptrmem_ok): New enumeration value.
9707         * class.c (resolve_address_of_overloaded_function): Add PTRMEM
9708         argument. Diagnose implicit pointer to member.
9709         (instantiate_type): Don't diagnose implicit pointer to member
9710         here. Pass itf_ptrmem_ok if ok. Adjust calls to
9711         resolve_address_of_overloaded_function.
9712         * init.c (build_offset_ref): Set PTRMEM_OK_P.
9713         (resolve_offset_ref): Don't diagnose implicit pointer to member here.
9714         * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
9715         * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
9716         (build_unary_op): Deal with single non-static member in
9717         microsoft-land.
9718
9719 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
9720
9721         * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
9722
9723 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
9724
9725         * cp-tree.h (enum_name_string): Remove prototype.
9726         (report_case_error): Remove prototype.
9727         * cp/typeck2.c (enum_name_string): Remove.
9728         (report_case_error): Remove.
9729         * error.c (dump_expr): Deal with enum values directly.
9730         Correctly negate integer constant.
9731
9732 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
9733
9734         * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
9735         (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
9736         * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
9737         (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
9738         (__cxa_vec_new): Use __cxa_vec_new2.
9739         (__cxa_vec_delete): Use __cxa_vec_delete2.
9740
9741 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
9742
9743         * vec.cc (__cxa_vec_new): Set "C" linkage.
9744         (__cxa_vec_ctor): Likewise.
9745         (__cxa_vec_cctor): Likewise.
9746         (__cxa_vec_dtor): Likewise.
9747         (__cxa_vec_delete): Likewise.
9748         * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
9749         (__cxa_vec_ctor): Likewise.
9750         (__cxa_vec_cctor): Likewise.
9751         (__cxa_vec_dtor): Likewise.
9752         (__cxa_vec_delete): Likewise.
9753
9754 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
9755
9756         * class.c (instantiate_type): Reinstate local variable
9757         deleted in previous change.
9758
9759         * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
9760         itf_no_attributes.
9761
9762 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
9763
9764         * cp-tree.h (instantiate_type_flags): New enumeration.
9765         (instantiate_type): Change parameter.
9766         * class.c (instantiate_type): Adjust prototype. Adjust.
9767         * call.c (standard_conversion): Adjust instantiate_type call.
9768         (reference_binding): Likewise.
9769         (build_op_delete_call): Likewise.
9770         (convert_like_real): Likewise.
9771         * cvt.c (cp_convert_to_pointer): Likewise.
9772         (convert_to_reference): Likewise.
9773         * pt.c (convert_nontype_argument): Likewise.
9774         * typeck.c (build_binary_op): Likewise.
9775         (build_ptrmemfunc): Likewise.
9776         (convert_for_assignment): Likewise.
9777
9778 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
9779
9780         * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
9781         (current_aggr): Define.
9782         * decl.c (grokdeclarator): Make sure a friend class is an
9783         elaborated type specifier.
9784         * parse.y (current_aggr): Remove static definition.
9785         (cp_parse_init): Adjust.
9786         (structsp): Clear and restore current_aggr.
9787         (component_decl_list): Clear current_aggr.
9788
9789         * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
9790         aggregate tag on the typename's context.
9791
9792         * pt.c (tsubst_friend_class): Return error_mark_node, if
9793         parms becomes NULL.
9794         (instantiate_class_template): Ignore error_mark_node friend types.
9795
9796 2000-08-14  Nathan Sidwell  <nathan@codesourcery.com>
9797
9798         * cvt.c (warn_ref_binding): New static function, broken out of ...
9799         (convert_to_reference): ... here. Use it.
9800
9801 2000-08-11  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
9802
9803         * parse.y (template_arg): Add rule for template qualified with
9804         global scope.
9805
9806 2000-08-11  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
9807
9808         * decl2.c (add_function): Reorganize.
9809         (arg_assoc): Do not consider function template decls.
9810
9811 2000-08-11  Jason Merrill  <jason@redhat.com>
9812
9813         * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
9814         looking inside.
9815
9816 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
9817
9818         * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
9819         (lookup_nested_tag): Likewise.
9820
9821         * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
9822         can be produced.
9823
9824 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
9825
9826         * parse.y (named_complex_class_head_sans_basetype): Remove
9827         always true if.
9828
9829 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
9830
9831         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
9832         explicit TEMPLATE_ID_EXPR args.
9833         (build_expr_from_tree, case CALL_EXPR): Likewise.
9834
9835 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
9836
9837         * decl.c (check_tag_decl): Diagnose typename's which don't
9838         declare anything.
9839
9840 2000-08-10  Nathan Sidwell  <nathan@codesourcery.com>
9841
9842         * init.c (build_aggr_init): Reject bogus array initializers
9843         early.
9844
9845 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
9846
9847         * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
9848         runtime.
9849         * cp/tinfo.cc (__dynamic_cast): Likewise.
9850         * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
9851
9852 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
9853
9854         * cvt.c (convert_to_pointer_force): Fix error message when
9855         attempting to cast from ambiguous base.
9856
9857 2000-08-08  Jason Merrill  <jason@redhat.com>
9858
9859         * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
9860         (tsubst_template_arg_vector): Likewise.
9861
9862         * decl2.c (build_anon_union_vars): Choose the largest field; don't
9863         assume that one will be as large as the union.
9864
9865 2000-08-07  Kazu Hirata  <kazu@hxi.com>
9866
9867         * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
9868         * decl.c (pop_labels): Likewise.
9869
9870 2000-08-04  Jeffrey Oldham  <oldham@codesourcery.com>
9871
9872         * inc/cxxabi.h (__pbase_type_info): Changed member names to match
9873         specifications.
9874         (__pointer_to_member_type_info): Likewise.
9875         (__base_class_info): Likewise.
9876         (__class_type_info): Likewise.
9877         (__si_class_type_info): Likewise.
9878         (__vmi_class_type_info): Likewise.
9879         * tinfo.cc (__si_class_type_info::__do_find_public_src):
9880         Changed member names to match specifications.
9881         (__vmi_class_type_info::__do_find_public_src): Likewise.
9882         (__si_class_type_info::__do_dyncast): Likewise.
9883         (__vmi_class_type_info::__do_dyncast): Likewise.
9884         (__si_class_type_info::__do_upcast): Likewise.
9885         (__vmi_class_type_info::__do_upcast): Likewise.
9886         * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
9887         (__pbase_type_info::__pointer_catch): Likewise.
9888         (__pointer_type_info::__pointer_catch): Likewise.
9889         (__pointer_to_member_type_info::__pointer_catch): Likewise.
9890
9891 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
9892
9893         * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
9894         * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
9895         (cc1plus): Link with $(BACKEND) and $(C_OBJS).
9896
9897 2000-08-04  Mark Mitchell  <mark@codesourcery.com>
9898
9899         * cp-tree.h (add_method): Change prototype.
9900         * class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
9901         Don't double the size of the method vector in the error case.
9902         (handle_using_decl): Adjust call to add_method.
9903         (add_implicitly_declared_members): Likewise.
9904         (clone_function_decl): Likewise.
9905         * decl2.c (check_classfn): Likewise.
9906         * semantics.c (finish_member_declaration): Likewise.
9907
9908 2000-08-04  Joseph S. Myers  <jsm28@cam.ac.uk>
9909
9910         * decl.c (flag_isoc94): New variable.
9911
9912 2000-08-02  Jason Merrill  <jason@redhat.com>
9913
9914         * pt.c (do_type_instantiation): Add complain parm; don't complain
9915         if called recursively.
9916         * cp-tree.h, parse.y: Adjust.
9917
9918 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
9919
9920         * decl2.c: Silently ignore -Wstrict-prototypes; warn about
9921         -Wno-strict-prototypes.
9922
9923         * g++spec.c: Adjust type of second argument to
9924         lang_specific_driver, and update code as necessary.
9925
9926         * cp-tree.h: Don't prototype min_precision here.
9927         (my_friendly_assert): Cast expression to void.
9928         * semantics.c (do_poplevel): Initialize scope_stmts.
9929
9930 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
9931
9932         * cp-tree.h (DECL_NEEDED_P): Tweak.
9933
9934 2000-07-28  Jason Merrill  <jason@redhat.com>
9935
9936         * lang-specs.h: Use %i in rule for .ii files.
9937
9938 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
9939
9940         * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
9941
9942 2000-07-30  Mark Mitchell  <mark@codesourcery.com>
9943
9944         Allow indirect primary bases.
9945         * cp-tree.h (struct lang_type): Remove vfield_parent.  Add
9946         primary_base.
9947         (CLASSTYPE_VFIELD_PARENT): Remove.
9948         (CLASSTYPE_PRIMARY_BINFO): Reimplement.
9949         (BINFO_PRIMARY_BINFO): Remove.
9950         (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
9951         (BINFO_VBASE_PRIMARY_P): Likewise.
9952         (BINFO_PRIMARY_BASE_OF): New macro.
9953         (BINFO_INDIRECT_PRIMARY_P): Likewise.
9954         (get_primary_binfo): New function.
9955         * decl.c (lang_mark_tree): Make lang_type::primary_base.
9956         * class.c (vcall_offset_data_s): Rename to ...
9957         (vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
9958         and add ctor_vtbl_p.
9959         (get_derived_offset): Use get_primary_binfo.
9960         (dfs_mark_primary_bases): Adjust handling of virtual primary
9961         bases.
9962         (mark_primary_bases): Likewise.
9963         (set_primary_base): Take a binfo, not an integer, as a
9964         representation of the primary base.
9965         (indirect_primary_base_p): Remove.
9966         (determine_primary_base): Adjust for indirect primary bases.
9967         (dfs_find_final_overrider): Fix typo in coment.
9968         (update_vtable_entry_for_fn): Use get_primary_binfo.
9969         (layout_nonempty_base_or_field): Tweak.
9970         (build_base_fields): Adjust for new primary base semantics.
9971         (dfs_propagate_binfo_offsets): Remove.
9972         (propagate_binfo_offsets): Rewrite.
9973         (dfs_set_offset_for_shared_vbases): Remove.
9974         (layout_virtual_bases): Don't use it.
9975         (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
9976         ABI.
9977         (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
9978         CLASSTYPE_VFIELD_PARENT.
9979         (dfs_get_primary_binfo): New function.
9980         (get_primary_binfo): Likewise.
9981         (dump_class_hierarchy_r): Tweak printing of primary bases.
9982         (build_vtbl_initializer): Fix typo in comments.  Use
9983         vtbl_init_data.
9984         (build_vcall_and_vbase_vtbl_entries): Likewise.
9985         (build_vbaes_offset_vtbl_entries): Likewise.
9986         (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
9987         BV_VCALL_INDEX to handle indirect primary bases.
9988         (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
9989         (build_rtti_vtbl_entries): Likewise.
9990         * search.c (get_shared_vbase_if_not_primary): Tweak.
9991         (find_vbase_instance): Likewise.
9992         (binfo_for_vtable): Simplify.
9993         * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
9994         (make_binfo): Make it have 11 entries.
9995
9996 2000-07-30  Alex Samuel  <samuel@codesourcery.com>
9997
9998         * mangle.c (DECL_TEMPLATE_ID_P): Remove.
9999         (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
10000         ascertaining primaryness.
10001         (G): Remove template_args.
10002         (decl_is_template_id): New function.
10003         (write_encoding): Use decl_is_template_id.
10004         (write_name): Likewise.  Handle type_decls.  Get main variant of
10005         type decls.
10006         (write_nested_name): Likewise.
10007         (write_prefix): Likewise.
10008         (write_template_prefix): Likewise.
10009         (write_special_name_constructor): Remove defunct production from
10010         comment.
10011         (write_bare_function_type): Remove comment about absent parameter.
10012         (write_template_template_arg): Add missing grammar production to
10013         comment.
10014
10015 2000-07-27  Jason Merrill  <jason@redhat.com>
10016
10017         * decl.c (duplicate_decls): If common_type produces a non-typedef
10018         type for a typedef, just use the old type.
10019
10020 2000-07-27  Mark Mitchell  <mark@codesourcery.com>
10021
10022         * cp-tree.h (function_depth): Declare.
10023         (verify_stmt_tree): Likewise.
10024         (find_tree): Likewise.
10025         * decl.c (function_depth): Give it external linkage.
10026         * optimize.c (optimize_function): Increment and decrement it.
10027         * tree.c (verify_stmt_tree_r): New function.
10028         (verify_stmt_tree): Likewise.
10029         (find_tree_r): Likewise.
10030         (find_tree): Likewise.
10031
10032 2000-07-27  Jason Merrill  <jason@redhat.com>
10033
10034         * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
10035         TYPE_PTRMEMFUNC_P.
10036         * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
10037
10038 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
10039
10040         * decl.c (start_cleanup_fn): Mark the function as `inline'.
10041         * decl2.c (get_guard): Call cp_finish_decl, not
10042         rest_of_decl_compilation, for local guards.
10043         * lex.c (do_identifier): Remove unused variable.
10044
10045 Wed Jul 26 15:05:51 CEST 2000   Marc Espie <espie@cvs.openbsd.org>
10046
10047         * parse.y:  Add missing ';'.
10048
10049 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
10050
10051         * parse.y (empty_parms): Use `()', not `(...)', when in the scope
10052         of `extern "C++"'.
10053
10054 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
10055
10056         Kill strict_prototype. Backwards compatibility only for
10057         non NO_IMPLICIT_EXTERN_C systems.
10058         * cp-tree.h (flag_strict_prototype): Remove.
10059         (strict_prototype): Remove.
10060         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
10061         * decl.c (maybe_push_to_top_level): Adjust.
10062         (pop_from_top_level): Adjust.
10063         (decls_match): Only allow sloppy parm matching for ancient
10064         system headers.
10065         (init_decl_processing): Adjust.
10066         (grokdeclarator): Adjust.
10067         * decl2.c (flag_strict_prototype): Remove.
10068         (strict_prototype): Remove.
10069         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
10070         (lang_f_options): Remove "strict-prototype".
10071         (unsupported-options): Add "strict-prototype".
10072         * lex.c (do_identifier): Adjust.
10073         (do_scoped_id): Adjust.
10074         * parse.y (empty_parms): Adjust.
10075         * class.c (push_lang_context): Adjust.
10076         (pop_lang_context): Adjust.
10077         * typeck.c (comp_target_parms): Adjust.
10078
10079 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
10080
10081         * decl.c (poplevel): Deal with anonymous variables at for scope.
10082         (maybe_inject_for_scope_var): Likewise.
10083
10084 2000-07-25  Zack Weinberg  <zack@wolery.cumb.org>
10085
10086         * decl.c: Remove all signal handling code, now done in toplev.c.
10087
10088 2000-07-23  Mark Mitchell  <mark@codesourcery.com>
10089
10090         * decl.c (make_rtl_for_nonlocal_decl): Rework.
10091
10092         * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
10093         correctly.
10094
10095 2000-07-20  Zack Weinberg  <zack@wolery.cumb.org>
10096
10097         * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
10098         Define my_friendly_assert and my_friendly_abort as macros
10099         which may call friendly_abort.  Prototype friendly abort, not
10100         my_friendly_abort or my_friendly_assert.
10101         * decl.c (signal_catch): Report the signal caught in the error
10102         message.  Call fatal directly.
10103         * typeck2.c (ack, my_friendly_assert): Delete.
10104         (my_friendly_abort): Rename to friendly_abort.  Expect file,
10105         line, and function parameters.  Report the abort code, then
10106         call fancy_abort.  Do not mask an abort if errors have
10107         already occurred.
10108
10109 2000-07-18  Nathan Sidwell  <nathan@codesourcery.com>
10110
10111         * typeck.c (comp_target_parms): Remove obsolete parameter.
10112         (comp_target_types): Adjust.
10113
10114 2000-07-17  Jason Merrill  <jason@redhat.com>
10115
10116         * typeck.c (mark_addressable): Never set TREE_USED.
10117         * call.c (build_call): Don't abort on calls to library functions
10118         that have been declared normally.
10119
10120         * typeck.c (build_binary_op): Fix grammar in warning.
10121
10122         * exception.cc (__eh_free): Fix prototype.
10123
10124         * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
10125
10126         * decl.c (pushdecl): Handle seeing an OVERLOAD in
10127         IDENTIFIER_NAMESPACE_VALUE.
10128
10129 2000-07-16  Mark Mitchell  <mark@codesourcery.com>
10130
10131         * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
10132         * method.c (use_thunk): Correct handling of vcall offsets.
10133
10134 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
10135
10136         * .cvsignore: parse.h and parse.c have no cp- prefix.
10137
10138 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
10139
10140         * .cvsignore: New file.
10141
10142 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
10143
10144         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
10145
10146 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
10147
10148         * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
10149         * parse.c: Remove.
10150         * parse.h: Likewise.
10151
10152 2000-07-11  Mark Mitchell  <mark@codesourcery.com>
10153
10154         * class.c (layout_class_type): Add pointers to virtual bases after
10155         base classes under the old ABI.
10156
10157 2000-07-10  Benjamin Chelf  <chelf@codesourcery.com>
10158
10159         * semantics.c (finish_for_stmt): Remove call to emit_line_note.
10160         (finish_continue_stmt): Likewise.
10161         (begin_for_stmt): Remove call to note_level_for_for.
10162         (finish_goto_stmt): Change call from build_min_nt
10163         to build_stmt.
10164         (finish_expr_stmt): Likewise.
10165         (begin_if_stmt): Likewise.
10166         (begin_while_stmt): Likewise.
10167         (finish_while_stmt): Likewise.
10168         (finish_return_stmt): Likewise.
10169         (begin_for_stmt): Likewise.
10170         (finish_for_stmt): Likewise.
10171         (finish_break_stmt): Likewise.
10172         (begin_switch_stmt): Likewise.
10173         (finish_case_label): Likewise.
10174         (genrtl_try_block): Likewise.
10175         (begin_try_block): Likewise.
10176         (begin_handler): Likewise.
10177         (begin_compound_stmt): Likewise.
10178         (finish_asm_stmt): Likewise.
10179         (finish_label_stmt): Likewise.
10180         (add_decl_stmt): Likewise.
10181         (finish_subobject): Likewise.
10182         (finish_decl_cleanup): Likewise.
10183         (finish_named_return_value): Likewise.
10184         (setup_vtbl_ptr): Likewise.
10185         (add_scope_stmt): Likewise.
10186         * decl.c (finish_constructor_body): Likewise.
10187         (finish_destructor_body): Likewise.
10188         * optimize.c (copy_body_r): Likewise.
10189         (initialize_inlined_parameters): Likewise.
10190         (declare_return_variable): Likewise.
10191         (expand_call_inline): Likewise.
10192
10193 2000-07-10  Jakub Jelinek  <jakub@redhat.com>
10194
10195         * semantics.c (expand_body): Sync interface information
10196         at the end of function body expansion.
10197
10198 2000-07-09  Jason Merrill  <jason@redhat.com>
10199
10200         * init.c (build_new_1): Bail early if the call to new fails.
10201
10202         * decl.c (compute_array_index_type): Check specifically for
10203         an INTEGER_CST, not just TREE_CONSTANT.
10204
10205         * decl.c (duplicate_decls): Don't call duplicate_decls on
10206         the DECL_TEMPLATE_RESULT.
10207         (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
10208         codes.
10209
10210         * error.c (dump_template_bindings): Don't crash if we had an
10211         invalid argument list.
10212
10213         * typeck.c (c_expand_start_case): Do narrowing here.
10214         * semantics.c (finish_switch_cond): Not here.
10215
10216 2000-07-09  Hidvegi Zoli  <hzoli@austin.ibm.com>
10217
10218         * parse.y (asm_clobbers): Do string concatenation.
10219
10220 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
10221
10222         * decl.c (pushtag): Don't put local classes in template functions
10223         on the local_classes list.
10224
10225 2000-07-04  Scott Snyder  <snyder@fnal.gov>
10226
10227         * decl2.c (get_guard): Add missing return for old ABI local
10228         variable case.
10229
10230 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
10231
10232         * cp-tree.h (char_type_p): New function.
10233         * decl.c (init_decl_processing): Don't initialize
10234         signed_wchar_type_node or unsigned_wchar_type_node.
10235         (complete_array_type): Handle brace-enclosed string-constants.
10236         * rtti.c (emit_support_tinfos): Remove #if 0'd code.
10237         * tree.c (char_type_p): New function.
10238         * typeck2.c (digest_init): Use char_type_p.
10239
10240 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
10241
10242         * pt.c (tsubst): Don't layout type, if it's error_mark.
10243
10244 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
10245
10246         * pt.c (instantiate_pending_templates): Reset template level.
10247
10248 2000-07-05  Jason Merrill  <jason@redhat.com>
10249
10250         * call.c (joust): Don't complain about `operator char *()' beating
10251         `operator const char *() const'.
10252
10253 2000-07-04  scott snyder  <snyder@fnal.gov>
10254             Jason Merrill  <jason@redhat.com>
10255
10256         * repo.c (repo_get_id): Handle the case where a class with virtual
10257         bases has a null TYPE_BINFO_VTABLE.
10258
10259 2000-07-04  Kevin Buhr  <buhr@stat.wisc.edu>
10260             Jason Merrill  <jason@redhat.com>
10261
10262         * parse.y (member_init): Just pass in the type.
10263         * init.c (expand_member_init): Handle getting a type.
10264
10265 2000-07-04  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
10266             Jason Merrill  <jason@redhat.com>
10267
10268         * decl.c (finish_function): Warn if a function has no return
10269         statement.
10270         Suggested by Andrew Koenig.
10271         * typeck.c (check_return_expr): Do set current_function_returns_value
10272         if we got an error_mark_node.
10273
10274 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
10275
10276         * decl2.c (push_decl_namespace): Push the original namespace.
10277
10278 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
10279
10280         * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
10281         * semantics.c (begin_class_definition): Clear it.
10282
10283 2000-07-02  Benjamin Chelf  <chelf@codesourcery.com>
10284
10285         * cp-tree.h (genrtl_goto_stmt): Remove declaration.
10286         (genrtl_expr_stmt): Likewise.
10287         (genrtl_decl_stmt): Likewise.
10288         (genrtl_if_stmt): Likewise.
10289         (genrtl_while_stmt): Likewise.
10290         (genrtl_do_stmt): Likewise.
10291         (genrtl_return_stmt): Likewise.
10292         (genrtl_for_stmt): Likewise.
10293         (genrtl_break_stmt): Likewise.
10294         (genrtl_continue_stmt): Likewise.
10295         (genrtl_scope_stmt): Likewise.
10296         (genrtl_switch_stmt): Likewise.
10297         (genrtl_case_label): Likewise.
10298         (genrtl_begin_compound_stmt): Likewise.
10299         (genrtl_finish_compound_stmt): Likewise.
10300         (genrtl_compound_stmt): Likewise.
10301         (genrtl_asm_stmt): Likewise.
10302
10303         * init.c (begin_init_stmts): Remove call to
10304         genrtl_begin_compound_stmt.
10305         (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
10306
10307         * semantics.c (lang_expand_stmt): Changed call to
10308         genrtl_compound_stmt to ignore return value.
10309
10310 2000-07-02  Mark Mitchell  <mark@codesourcery.com>
10311
10312         * mangle.c (canonicalize_for_substitution): Return the canonical
10313         variant of a type.
10314
10315         * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
10316         TYPE_DECL.
10317         * typeck.c (commonparms): Remove obstack manipulations.
10318
10319 2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>
10320
10321         * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
10322
10323         * Makefile.in (OBJS): Added ../c-semantics.o.
10324         (OBJDEPS): Likewise.
10325
10326         * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
10327         ../c-common.h.
10328         (struct stmt_tree): Added comment.
10329         (current_function_name_declared): Removed.
10330         (stmts_are_full_exprs_p): Likewise.
10331         (genrtl_do_pushlevel): Likewise.
10332         (genrtl_clear_out_block): Likewise.
10333         (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
10334         (DECL_ANON_UNION_ELEMS): Likewise.
10335         (emit_local_var): Likewise.
10336         (make_rtl_for_local_static): Likewise.
10337         (do_case): Likewise.
10338         (expand_stmt): Likewise.
10339         (genrtl_decl_cleanup): Likewise.
10340         (c_expand_asm_operands): Likewise.
10341         (c_expand_return): Likewise.
10342         (c_expand_start_case): Likewise.
10343
10344         * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
10345         (emit_local_var): Likewise.
10346         (initialize_local_var): Change reference to
10347         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
10348         Change reference to stmts_are_full_exprs_p to
10349         current_stmt_tree->stmts_are_full_exprs_p.
10350         (push_cp_function_context): Likewise.
10351
10352         * expect.c (expand_throw): Change reference to
10353         stmts_are_full_exprs_p.
10354
10355         * init.c (build_aggr_init): Change reference to
10356         stmts_are_full_exprs_p.
10357         (build_vec_init): Likewise.
10358
10359         * optimize.c (maybe_clone_body): Change reference to
10360         current_function_name_declared to
10361         cp_function_chain->name_declared.
10362
10363         * pt.c (instantiate_decl): Change reference to
10364         current_function_name_declared to
10365         cp_function_chain->name_declared.
10366
10367         * semantics.c (expand_cond): Moved declaration to c-common.h.
10368         (genrtl_do_pushlevel): Moved to c-semantics.c.
10369         (genrtl_clear_out_block): Likewise.
10370         (genrtl_goto_stmt): Likewise.
10371         (genrtl_expr_stmt): Likewise.
10372         (genrtl_decl_stmt): Likewise.
10373         (gerntl_if_stmt): Likewise.
10374         (genrtl_while_stmt): Likewise.
10375         (genrtl_do_stmt): Likewise.
10376         (genrtl_return_stmt): Likewise.
10377         (genrtl_for_stmt): Likewise.
10378         (genrtl_break_stmt): Likewise.
10379         (genrtl_continue_stmt): Likewise.
10380         (genrtl_scope_stmt): Likewise.
10381         (genrtl_switch_stmt): Likewise.
10382         (genrtl_case_label): Likewise.
10383         (genrtl_begin_compound_stmt): Likewise.
10384         (genrtl_finish_compound_stmt): Likewise.
10385         (genrtl_compound_stmt): Likewise.
10386         (genrtl_asm_stmt): Likewise.
10387         (genrtl_decl_cleanup): Likewise.
10388         (expand_cond): Likewise.
10389         (expand_stmt): Renamed to ...
10390         (lang_expand_stmt): ... this.
10391         (lang_expand_expr_stmt): Initialize.
10392         (set_current_function_name_declared): Likewise.
10393         (stmts_are_full_exprs_p): Likewise.
10394         (current_function_name_declared): Likewise.
10395         (anon_aggr_type_p): Likewise.
10396         (do_poplevel): Change reference to
10397         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
10398         Change reference to stmts_are_full_exprs_p to
10399         current_stmt_tree->stmts_are_full_exprs_p.
10400         (add_tree): Likewise.
10401         (finish_expr_stmt): Likewise.
10402         (prep_stmt): Likewise.
10403         (lang_expand_stmt): Likewise.
10404         (begin_compound_stmt): Change reference to
10405         current_function_name_declared to
10406         cp_function_chain->name_declared and call to
10407         current_function_name_declared().
10408         (setup_vtbl_ptr): Likewise.
10409         (genrtl_do_poplevel): Removed.
10410
10411 2000-06-30  Jason Merrill  <jason@redhat.com>
10412
10413         * init.c (init_init_processing): Go back to aligning like
10414         double_type_node for old ABI.
10415         (get_cookie_size): Make cookie larger if we get a type that needs
10416         more alignment.
10417         (build_vec_delete): Call it.
10418
10419         * typeck.c (qualify_type_recursive): New fn.
10420         (composite_pointer_type): Use it.
10421         (build_binary_op): Use composite_pointer_type.
10422
10423 2000-06-24  Carlos O'Ryan  <coryan@cs.wustl.edu>
10424             Jason Merrill  <jason@redhat.com>
10425
10426         * typeck.c (check_return_expr): Don't complain about returning
10427         NULL from operator new if -fcheck-new.
10428         * cp-tree.h: Declare flag_check_new here.
10429         * init.c: Not here.
10430
10431 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
10432
10433         * mangle.c (find_substitution): Use same_type_p.
10434         (write_encoding): Don't check for substitutions.
10435
10436 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
10437
10438         * parse.y (expr_no_comma_rangle): New non-terminal.
10439         (template_parm): Use it for default parameter case.
10440         (template_arg): Use it.
10441         (expr_no_commas): Remove commented out undefined extensions.
10442         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
10443         * parse.h, parse.c: Rebuilt.
10444
10445 2000-06-30  Mark Mitchell  <mark@codesourcery.com>
10446
10447         * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
10448         (finish_asm_stmt): Do it here, instead.
10449
10450         * cp-tree.h (ridpointers): Don't declare.
10451         * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
10452         (record_builtin_java_type): Likewise.
10453         (init_decl_processing): Likewise.
10454         * lex.c: Move inclusion of lex.h.
10455         (ridpointers): Don't define.
10456         (init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
10457         RID_MAX.
10458         * lex.h (enum rid): Rename to ...
10459         (enum cp_rid): ... this.
10460         (ridpointers): Don't declare.
10461         * parse.y: Move inclusion of lex.h.
10462         * parse.c: Regenerated.
10463         * spew.c: Move inclusion of lex.h.
10464
10465         * cp-tree.h (struct language_function): Remove temp_name_counter.
10466         (temp_name_counter): Remove.
10467         (get_temp_name): Change prototype.
10468         (get_guard): New function.
10469         (get_guard_cond): Likewise.
10470         (set_guard): Likewise.
10471         * cvt.c (build_up_reference): Adjust call to get_temp_name.
10472         * decl.c (expand_static_init): Use get_guard and friends to
10473         implement guard variables.
10474         * decl2.c (get_temp_name): Assume that the variables created are
10475         always static.
10476         (get_sentry): Rename to ...
10477         (get_guard): ... this.  Implement new ABI guard variables.
10478         (get_guard_bits): New function.
10479         (get_guard_cond): Likewise.
10480         (set_guard): Likewise.
10481         (start_static_initialization_or_destruction): Use them.
10482         (do_static_initialization): Replace sentry with guard throughout.
10483         (do_static_destruction): Likewise.
10484         * init.c (create_temporary_var): Add comment.
10485
10486 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
10487
10488         * mangle.c (find_substitution): Use same_type_p.
10489         (write_encoding): Don't check for substitutions.
10490
10491 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
10492
10493         * parse.y (expr_no_comma_rangle): New non-terminal.
10494         (template_parm): Use it for default parameter case.
10495         (template_arg): Use it.
10496         (expr_no_commas): Remove commented out undefined extensions.
10497         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
10498         * parse.h, parse.c: Rebuilt.
10499
10500 2000-06-29  Mark Mitchell  <mark@codesourcery.com>
10501
10502         * cp-tree.h (flag_const_strings): Remove.
10503         (warn_parentheses): Likewise.
10504         (warn_format): Likewise.
10505         (common_type): Likewise.
10506         (default_conversion): Likewise.
10507         (build_binary_op): Likewise.
10508         (cp_build_binary_op): New macro.
10509         * call.c (build_new_op): Use cp_build_binary_op instead of
10510         build_binary_op.
10511         * class.c (build_vtable_entry_ref): Likewise.
10512         * decl.c (expand_static_init): Likewise.
10513         (compute_array_index_type): Likewise.
10514         (build_enumerator): Likewise.
10515         * decl2.c (delete_sanity): Likewise.
10516         (start_static_initialization_or_destruction): Likewise.
10517         * error.c (dump_type_suffix): Likewise.
10518         * init.c (resolve_offset_ref): Likewise.
10519         (build_new): Likewise.
10520         (build_new_1): Likewise.
10521         (build_vec_delete_1): Likewise.
10522         (build_vec_init): Likewise.
10523         (build_delete): Likewise.
10524         * rtti.c (synthesize_tinfo_fn): Likewise.
10525         (synthesize_tinfo_var): Likewise.
10526         * search.c (expand_upcast_fixups): Likewise.
10527         (fixup_all_virtual_upcast_offsets): Likewise.
10528         * typeck.c (build_array_ref): Likewise.
10529         (get_member_function_from_ptrfunc): Likewise.
10530         (build_binary_op): Add parameter.
10531         (pointer_int_sum): Use cp_build_binary_op.
10532         (pointer_diff): Likewise.
10533         (build_modify_expr): Likewise.
10534         (get_delta_difference): Likewise.
10535         (build_ptrmemfunc): Likewise.
10536
10537 2000-06-29  Nathan Sidwell  <nathan@codesourcery.com>
10538
10539         * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
10540         * decl.c (create_implicit_typedef): Adjust.
10541         * decl2.c (build_artificial_parm): Adjust.
10542         * method.c (implicitly_declare_fn): Adjust.
10543         * pt.c (push_inline_template_parms_recursive): Adjust.
10544         (process_template_parm): Adjust.
10545         (overloaded_template_name): Adjust.
10546         * semantics.c (finish_template_template_parm): Adjust.
10547
10548 2000-06-28  Mark Mitchell  <mark@codesourcery.com>
10549
10550         * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
10551         * class.c (update_vtable_entry_for_fn): Correct logic for deciding
10552         where to emit thunks.
10553         (build_vtt): Adjust call to build_vtt_inits.
10554         (build_vtt_inits): Add parameter to indicate whether or not
10555         sub-VTTs for virtual bases should be included.  Adjust handling of
10556         construction vtables.
10557         (get_matching_base): New function.
10558         (dfs_build_vtt_inits): Rename to ...
10559         (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
10560         construction vtables.
10561         (dfs_fixup_binfo_vtbls): Likewise.
10562         (build_ctor_vtbl_groups): Build construction vtables for virtual
10563         bases, too.
10564         (accumulate_vtbl_inits): Tweak logic for deciding whether or not
10565         to build construction vtbls.
10566         (dfs_accumulate_vtbl_inits): Adjust handling of
10567         construction vtables.
10568
10569         * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
10570         types correctly.
10571
10572 2000-06-27  Mark Mitchell  <mark@codesourcery.com>
10573
10574         * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
10575
10576 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
10577
10578         * search.c (hides): Remove.
10579         (is_subobject_of_p): Add most_derived parameter. Use
10580         CANONICAL_BINFO.
10581         (lookup_field_queue_p): Adjust.
10582         (lookup_field_r): Adjust.
10583
10584 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
10585
10586         * decl2.c (handle_class_head): Bash typedefs to the type's main
10587         decl.
10588
10589 2000-06-25  Mark Mitchell  <mark@codesourcery.com>
10590
10591         * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
10592         (begin_global_stmt_expr): ... this.
10593         (genrtl_finish_stmt_expr): Rename to ...
10594         (finish_global_stmt_expr): ... this.
10595         * init.c (begin_init_stmts): Adjust calls.
10596         (finish_init_stmts): Likewise.
10597         * semantics.c (genrtl_begin_stmt_expr): Rename to ...
10598         (begin_global_stmt_expr): ... this.
10599         (genrtl_finish_stmt_expr): Rename to ...
10600         (finish_global_stmt_expr): ... this.
10601
10602 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
10603
10604         * search.c (lookup_member): Fix typo in comment.
10605
10606 2000-06-24  Jason Merrill  <jason@redhat.com>
10607
10608         * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
10609         (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
10610
10611 2000-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
10612
10613         * parse.y (complex_direct_notype_declarator): Support global_scope.
10614         * Makefile.in: Adjust conflict count.
10615
10616 2000-06-23  Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
10617
10618         * parse.y (template_arg): Convert TEMPLATE_DECL
10619         that is a template template parameter to
10620         TEMPLATE_TEMPLATE_PARM here.
10621
10622         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
10623         * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
10624         (copy_template_template_parm): Adjust prototype.
10625         * decl.c (grokdeclarator): Remove dead code.
10626         * pt.c (process_template_parm): Tidy.
10627         (lookup_template_class): Construct nodes in
10628         copy_template_template_parm.
10629         (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
10630         lookup_template_class.  Use TYPE_TI_TEMPLATE.
10631         * tree.c (copy_template_template_parm): Add NEWARGS
10632         parameter.
10633         (mapcar): Adjust call to copy_template_template_parm.
10634         * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
10635         * method.c (build_template_template_parm_names): Change error
10636         code to avoid compilation warning.
10637
10638         * gxxint.texi: Document template template parameter
10639         name mangling.
10640
10641 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
10642
10643         * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
10644         (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
10645         (cp-demangle.o): New rule.
10646         (dyn-string.o): Likewise.
10647         * inc/cxxabi.h (__cxa_demangle): New declaration.
10648
10649 2000-06-22  Mark Mitchell  <mark@codesourcery.com>
10650
10651         * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
10652         (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
10653         (lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
10654         a tree, not an int.
10655         (THUNK_GENERATE_WITH_VTABLE_P): New macro.
10656         (make_thunk): Change prototype.
10657         (emit_thunk): Rename to use_thunk.
10658         (mangle_thunk): Change prototype.
10659         * class.c (get_derived_offset): Simplify.
10660         (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
10661         BV_GENERATE_THUNK_WITH_VTABLE_P.
10662         (build_primary_vtable): Simplify.
10663         (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
10664         (dfs_find_base): Remove.
10665         (update_vtable_entry_for_fn): Correct bug in finding the base
10666         where a virtual function was first declared.  Figure out whether
10667         or not to emit a vcall-thunk with the vtables in which it appears.
10668         Correct logic for deciding whether to use an ordinary thunk, or a
10669         vcall thunk.
10670         (finish_struct_1): Remove unnecssary code.
10671         (build_vtbl_initializer): Use ssize_int for the running counter of
10672         negative indices.
10673         (build_vtbl_initializer): Only use vcall thunks where necessary.
10674         Mark thunks as needing to be emitted with their vtables, or not.
10675         (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
10676         indices.  Use size_binop.
10677         (dfs_build_vcall_offset_vtbl_entries): Don't rely on
10678         BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
10679         size_binop.
10680         (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
10681         (build_vtable_entry): Mark thunks as needing to be emitted with
10682         their vtables, or not.
10683         * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
10684         * decl2.c (mark_vtable_entries): Use use_thunk instead of
10685         emit_thunk.
10686         * dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
10687         information.
10688         * error.c (dump_expr): Use BV_FN.
10689         * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
10690         not an int.
10691         * method.c (make_thunk): Likewise.
10692         (emit_thunk): Rename to use_thunk.  Allow callers to decide
10693         whether or not to actually emit the thunk.  Adjust for changes in
10694         representation of vcall offsets.
10695         * search.c (dfs_get_pure_virtuals): Use BV_FN.
10696         * semantics.c (emit_associated_thunks): New function.
10697         (expand_body): Use it.
10698         * ir.texi: Adjust decriptions of thunks.
10699
10700 2000-06-22  Jason Merrill  <jason@redhat.com>
10701
10702         * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
10703         (tsubst_friend_function): Copy it here.
10704
10705         * decl.c (grok_op_properties): Fix typo.
10706
10707         * decl2.c (delete_sanity): Clarify warning, avoid failure on
10708         deleting void*.
10709
10710         * pt.c (check_explicit_specialization): Clarify error.
10711
10712         * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
10713         an old OVERLOAD when we're declaring a non-function.
10714         (pushdecl, destroy_local_var): Check for error_mark_node.
10715         (warn_extern_redeclared_static): Also bail early if
10716         we're a CONST_DECL.
10717         (push_overloaded_decl): Ignore an old error_mark_node.
10718
10719 2000-06-22  Nathan Sidwell  <nathan@codesourcery.com>
10720
10721         * call.c (build_x_va_arg): Check if in a template decl.
10722         * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
10723
10724 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10725
10726         * class.c (push_lang_context): TYPE_NAME gets you to the Java
10727         types DECLs.
10728         * decl.c (check_goto): Computed gotos assumed OK.
10729
10730 2000-06-20  Jason Merrill  <jason@redhat.com>
10731
10732         * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
10733         for which we don't need to look for instantiations.
10734
10735 2000-06-21  Nathan Sidwell  <nathan@codesourcery.com>
10736
10737         * parse.y (program): Always call finish_translation_unit.
10738         * parse.c, parse.h: Rebuilt.
10739
10740 2000-06-20  Zack Weinberg  <zack@wolery.cumb.org>
10741
10742         * method.c: Don't include hard-reg-set.h.
10743
10744 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
10745
10746         * rtti.c (get_base_offset): Cope when vbase field is in a base.
10747
10748 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
10749
10750         * call.c (build_conditional_expr): Use VOID_TYPE_P.
10751         * cvt.c (cp_convert_to_pointer): Likewise.
10752         (convert_to_void): Likewise.
10753         * error.c (dump_expr): Likewise.
10754         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
10755         * init.c (build_delete): Likewise.
10756         * method.c (emit_thunk): Likewise.
10757         * optmize.c (declare_return_variable): Likewise.
10758         * rtti.c (get_tinfo_decl_dynamic): Likewise.
10759         (get_typeid): Likewise.
10760         (build_dynamic_cast_1): Likewise.
10761         * typeck.c (composite_pointer_type): Likewise.
10762         (common_type): Likewise.
10763         (build_indirect_ref): Likewise.
10764         (build_binary_op): Likewise.
10765         (build_x_compound_expr): Likewise.
10766         (check_return_expr): Likewise.
10767         * typeck2.c (add_exception_specifier): Likewise.
10768
10769         * mangle.c (write_method_parms): Use direct comparison for end
10770         of parmlist.
10771
10772 2000-06-19  Benjamin Chelf  <chelf@codesourcery.com>
10773
10774         * cp-tree.h (genrtl_try_block): Declare function.
10775         (genrtl_handler): Likewise.
10776         (genrtl_catch_block): Likewise.
10777         (genrtl_ctor_stmt): Likewise.
10778         (genrtl_subobject): Likewise.
10779         (genrtl_decl_cleanup): Likewise.
10780         (genrtl_do_poplevel): Likewise.
10781         (genrtl_do_pushlevel): Likewise.
10782         (genrtl_clear_out_block): Likewise.
10783         (genrtl_goto_stmt): Likewise.
10784         (genrtl_expr_stmt): Likewise.
10785         (genrtl_decl_stmt): Likewise.
10786         (genrtl_if_stmt): Likewise.
10787         (genrtl_while_stmt): Likewise.
10788         (genrtl_do_stmt): Likewise.
10789         (genrtl_return_stmt): Likewise.
10790         (genrtl_for_stmt): Likewise.
10791         (genrtl_break_stmt): Likewise.
10792         (genrtl_continue_stmt): Likewise.
10793         (genrtl_scope_stmt): Likewise.
10794         (genrtl_switch_stmt): Likewise.
10795         (genrtl_case_label): Likewise.
10796         (genrtl_begin_compound_stmt): Likewise.
10797         (genrtl_finish_compound_stmt): Likewise.
10798         (genrtl_compound_stmt): Likewise.
10799         (genrtl_asm_stmt): Likewise.
10800         (genrtl_named_return_value): Likewise.
10801         (genrtl_begin_stmt_expr): Likewise.
10802         (genrtl_finish_stmt_expr): Likewise.
10803         (finish_for_stmt): Removed first argument.
10804         (finish_switch_stmt): Likewise.
10805
10806         * semantics.c (genrtl_try_block): Define function.
10807         (genrtl_handler): Likewise.
10808         (genrtl_catch_block): Likewise.
10809         (genrtl_ctor_stmt): Likewise.
10810         (genrtl_subobject): Likewise.
10811         (genrtl_decl_cleanup): Likewise.
10812         (genrtl_do_poplevel): Likewise.
10813         (genrtl_do_pushlevel): Likewise.
10814         (genrtl_clear_out_block): Likewise.
10815         (genrtl_goto_stmt): Likewise.
10816         (genrtl_expr_stmt): Likewise.
10817         (genrtl_decl_stmt): Likewise.
10818         (genrtl_if_stmt): Likewise.
10819         (genrtl_while_stmt): Likewise.
10820         (genrtl_do_stmt): Likewise.
10821         (genrtl_return_stmt): Likewise.
10822         (genrtl_for_stmt): Likewise.
10823         (genrtl_break_stmt): Likewise.
10824         (genrtl_continue_stmt): Likewise.
10825         (genrtl_scope_stmt): Likewise.
10826         (genrtl_switch_stmt): Likewise.
10827         (genrtl_case_label): Likewise.
10828         (genrtl_begin_compound_stmt): Likewise.
10829         (genrtl_finish_compound_stmt): Likewise.
10830         (genrtl_compound_stmt): Likewise.
10831         (genrtl_asm_stmt): Likewise.
10832         (genrtl_named_return_value): Likewise.
10833         (genrtl_begin_stmt_expr): Likewise.
10834         (genrtl_finish_stmt_expr): Likewise.
10835         (finish_for_stmt): Removed first argument and generate rtl
10836         specific code.
10837         (finish_switch_stmt): Likewise.
10838         (do_poplevel): Removed generate rtl specific code.
10839         (do_pushlevel): Likewise.
10840         (add_tree): Likewise.
10841         (finish_goto_stmt): Likewise.
10842         (finish_expr_stmt): Likewise.
10843         (begin_if_stmt): Likewise.
10844         (finish_if_stmt_cond): Likewise.
10845         (finish_then_clause): Likewise.
10846         (begin_else_clause): Likewise.
10847         (finish_else_clause): Likewise.
10848         (finish_if_stmt): Likewise.
10849         (clear_out_block): Likewise.
10850         (begin_while_stmt): Likewise.
10851         (finish_while_stmt_cond): Likewise.
10852         (finish_while_stmt): Likewise.
10853         (begin_do_stmt): Likewise.
10854         (finish_do_body): Likewise.
10855         (finish_do_stmt): Likewise.
10856         (finish_return_stmt): Likewise.
10857         (begin_for_stmt): Likewise.
10858         (finish_for_init_stmt): Likewise.
10859         (finish_for_cond): Likewise.
10860         (finish_for_expr): Likewise.
10861         (finish_break_stmt): Likewise.
10862         (finish_continue_stmt): Likewise.
10863         (begin_switch_stmt): Likewise.
10864         (finish_switch_cond): Likewise.
10865         (finish_case_label): Likewise.
10866         (begin_try_block): Likewise.
10867         (begin_function_try_block): Likewise.
10868         (finish_try_block): Likewise.
10869         (finish_cleanup_try_block): Likewise.
10870         (finish_cleanup): Likewise.
10871         (finish_function_try_block): Likewise.
10872         (finish_handler_sequence): Likewise.
10873         (finish_function_handler_sequence): Likewise.
10874         (begin_handler): Likewise.
10875         (finish_handler_parms): Likewise.
10876         (begin_catch_block): Likewise.
10877         (finish_handler): Likewise.
10878         (begin_compound_stmt): Likewise.
10879         (finish_compound_stmt): Likewise.
10880         (finish_asm_stmt): Likewise.
10881         (finish_label_stmt): Likewise.
10882         (finish_label_decl): Likewise.
10883         (finish_subobject): Likewise.
10884         (finish_decl_cleanup): Likewise.
10885         (finish_named_return_value): Likewise.
10886         (begin_stmt_expr): Likewise.
10887         (finish_stmt_expr): Likewise.
10888
10889         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
10890         to call genrtl_expr_stmt when appropriate.
10891
10892         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
10893         begin_compound_expr to call genrtl_begin_stmt_expr and
10894         genrtl_begin_compound_expr when appropriate.
10895         (finish_init_stmts): Changed calls to finish_compound_expr and
10896         finish_stmt_expr to call genrtl_finish_compound_expr and
10897         genrtl_finish_stmt_expr when appropriate.
10898         (expand_default_init): Changed call to finish_expr_stmt to call
10899         genrtl_expr_stmt when appropriate.
10900         (build_vec_init): Likewise.
10901
10902         * parse.y (simple_stmt): Removed first argument from call to
10903         finish_for_stmt. Removed first argument from call to
10904         finish_switch_stmt.
10905
10906         * parse.c: Regenerated.
10907
10908         * pt.c (tsubst_expr): Removed first argument from call to
10909         finish_for_stmt. Removed first argument from call to
10910         finish_switch_stmt.
10911
10912 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
10913
10914         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
10915         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
10916
10917         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
10918         (cplus_tree_code_length[]): Likewise.
10919         (cplus_tree_code_name[]): Likewise.
10920         (init_parse): Added call to add_c_tree_codes. Changed
10921         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
10922
10923 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
10924
10925         * cp-tree.h (finish_mem_initializers): Declare.
10926         (count_trees): Likewise.
10927         * parse.y (base_init): Use finish_mem_initializers.
10928         * semantics.c (finish_mem_initializers): New function.
10929
10930         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
10931         the number of trees.
10932         (n_trees): Remove.
10933         (count_trees): Don't use it.
10934
10935 2000-06-15  Jason Merrill  <jason@redhat.com>
10936
10937         * tree.c (count_trees): New debugging function.
10938
10939         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
10940         * init.c (build_member_call): Pull out the name of a DECL.
10941
10942         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
10943         * semantics.c (expand_body): Push to TV_INTEGRATION here.
10944         * optimize.c (optimize_function): Not here.
10945         * pt.c (instantiate_decl): Push to TV_PARSE.
10946
10947 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
10948
10949         * cp-tree.h (struct language_function): Remove x_base_init_list
10950         and x_member_init_list.
10951         (current_base_init_list): Remove.
10952         (current_member_init_list): Likewise.
10953         (setup_vtbl_ptr): Change prototype.
10954         (emit_base_init): Likewise.
10955         (expand_member_init): Likewise.
10956         (reinit_parse_for_function): Remove.
10957         * decl.c (save_function_data): Don't clear x_base_init_list and
10958         x_member_init_list.
10959         (mark_language_function): Don't mark them.
10960         * init.c (perform_member_init): Tweak comment.
10961         (sort_member_init): Take the list of initializers as an argument.
10962         (sort_base_init): Likewise.
10963         (emit_base_init): Likewise.
10964         (expand_member_init): Return the initializer.  Don't use global
10965         variables.
10966         * lex.c (reinit_parse_for_function): Remove.
10967         * method.c (build_template_parm_names): Correct substitution.
10968         (do_build_copy_constructor): Don't use current_member_init_list
10969         and current_base_init_list.
10970         (synthesize_method): Likewise.
10971         * parse.y (base_init): Split mem-initializers into
10972         base-initializers and field-initializers.
10973         (member_init_list): Build up the list here.
10974         (member_init): Return the initializer.
10975         (fn.depfn): Don't use reinit_parse_for_function.
10976         * parse.c: Regenerated.
10977         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
10978         ERROR_MARK.
10979         (tsubst_expr): Don't use current_member_init_list
10980         and current_base_init_list.
10981         (tsubst_expr_values): Rename to ...
10982         (tsubst_initializer_list): ... this.  Use convert_from_reference.
10983         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
10984         and current_base_init_list.
10985         (begin_function_definition): Don't call reinit_parse_for_function.
10986
10987         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
10988
10989         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
10990         correctly.
10991
10992         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
10993
10994 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
10995
10996         * cp-tree.h (IF_COND): Move to c-common.h.
10997         (THEN_CLAUSE): Likewise.
10998         (ELSE_CLAUSE): Likewise.
10999         (WHILE_COND): Likewise.
11000         (WHILE_BODY): Likewise.
11001         (DO_COND): Likewise.
11002         (DO_BODY): Likewise.
11003         (RETURN_EXPR): Likewise.
11004         (EXPR_STMT_EXPR): Likewise.
11005         (FOR_INIT_STMT): Likewise.
11006         (FOR_COND): Likewise.
11007         (FOR_EXPR): Likewise.
11008         (FOR_BODY): Likewise.
11009         (SWITCH_COND): Likewise.
11010         (SWITCH_BODY): Likewise.
11011         (CASE_LOW): Likewise.
11012         (CASE_HIGH): Likewise.
11013         (GOTO_DESTINATION): Likewise.
11014         (COMPOUND_BODY): Likewise.
11015         (ASM_CV_QUAL): Likewise.
11016         (ASM_STRING): Likewise.
11017         (ASM_OUTPUTS): Likewise.
11018         (ASM_INPUTS): Likewise.
11019         (ASM_CLOBBERS): Likewise.
11020         (DECL_STMT_DECL): Likewise.
11021         (STMT_EXPR_STMT): Likewise.
11022         (LABEL_STMT_LABEL): Likewise.
11023         (SCOPE_BEGIN_P): Likewise.
11024         (SCOPE_END_P): Likewise.
11025         (SCOPE_STMT_BLOCK): Likewise.
11026         (SCOPE_NULLIFIED_P): Likewise.
11027         (SCOPE_NO_CLEANUPS_P): Likewise.
11028         (SCOPE_PARTIAL_P): Likewise.
11029         (ASM_VOLATILE_P): Likewise.
11030         (STMT_LINENO): Likewise.
11031         (STMT_LINENO_FOR_FN_P): Likewise.
11032
11033         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
11034         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
11035         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
11036         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
11037         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
11038
11039         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
11040
11041         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
11042         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
11043
11044         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
11045         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
11046         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
11047
11048 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
11049
11050         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
11051         * class.c (dfs_find_final_overrider): Set it appropriately.
11052         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
11053         avoid unneeded secondary vptrs.
11054
11055 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
11056
11057         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
11058         (check_bitfield_decl, check_field_decl): Likewise.
11059         (build_vtbl_or_vbase_field, build_base_field): Likewise.
11060         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
11061         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
11062         (xfer_tag, finish_enum): Likewise.
11063         * decl2.c (finish_builtin_type): Likewise.
11064         * init.c (init_init_processing): Likewise.
11065         * pt.c (instantiate_class_template): Likewise.
11066         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
11067         * cp-tree.h (struct lang_type): Add user_align member.
11068         (CLASSTYPE_USER_ALIGN): Define.
11069
11070 Tue Jun 13 15:48:03 2000  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
11071
11072         * Make-lang.in (c++.install-common): Install g++-cross in
11073         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
11074         $(target_alias)-g++ and $(target_alias)-c++.
11075
11076 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
11077
11078         * class.c (vcall_offset_data_s): Add last_init and fns.
11079         (overrides): Rename to same_signature_p.
11080         (dfs_find_final_overrider): Adjust accordingly.
11081         (mark_overriders): Likewise.
11082         (warn_hidden): Likewise.
11083         (build_vtbl_initializer): Reorganize machinery for building things
11084         at negative offsets.
11085         (build_vcall_and_vbase_vtbl_entries): Likewise.
11086         (build_vbase_offset_vtbl_entries): Likewise.
11087         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
11088         offset entries.  Do not create two entries for functions with the
11089         same signature.
11090         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
11091         (build_rtti_vtbl_entries): Reorganize machinery for building things
11092         at negative offsets.
11093
11094         * optimize.c (expand_call_inline): Don't recurse into the code
11095         used to initialize the parameters more than once.
11096
11097 2000-06-11  Mark Mitchell <mark@codesourcery.com>
11098
11099         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
11100         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
11101         (find_substitution): Only use the `Sa' substitution for
11102         std::allocator, not instantiations of it.
11103         (write_template_prefix): Move comment.  Only use a TREE_LIST to
11104         represent substitutions for a member template.
11105         (write_array_type): Mangle array dimensions correctly.
11106         * optimize.c (maybe_clone_body): Copy more information from the
11107         cloned function.
11108         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
11109         on the regenerated declaration.
11110
11111 2000-06-11  Chip Salzenberg  <chip@valinux.com>
11112             Mark Mitchell <mark@codesourcery.com>
11113
11114         * class.c (build_vtable): Clarify comment.
11115         (build_ctor_vtbl_group): Pass the most derived type to
11116         build_vtable.
11117
11118 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11119
11120         * decl2.c (compare_options): Don't needlessly cast away const-ness.
11121
11122 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
11123
11124         * decl.c (add_binding): Handle duplicate declarations of external
11125         variables.
11126
11127 2000-06-09  Chip Salzenberg  <chip@valinux.com>
11128             Mark Mitchell <mark@codesourcery.com>
11129
11130         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
11131         argument.
11132         (write_signed_number): New macro.
11133         (write_unsigned_number): Likewise.
11134         (write_source_name): Use them.
11135         (write_number): Handle signed and unsigned values.
11136         (write_integer_cst): Use tree_int_cst_sgn, and use
11137         write_unsigned_number or write_signed_number as appropriate.
11138         (write_discriminator): Use write_unsigned_number or
11139         write_signed_number as appropriate.
11140         (write_template_arg_literal): Likewise.
11141         (write_array_type): Use tree_low_cst.
11142         (write_template_parm):  Use write_unsigned_number or
11143         write_signed_number as appropriate.
11144         (write_substitution): Adjust call to write_number.
11145         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
11146         (write_expression): Handle non-type template arguments of
11147         reference type correctly.
11148         (mangle_thunk): Use write_signed_number.
11149
11150 2000-06-09  Chip Salzenberg  <chip@valinux.com>
11151
11152         * mangle.c (find_substition): Don't mangle objects with typename
11153         substitutions (e.g. "cin" as "Si").
11154
11155 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
11156
11157         * call.c (add_candidate): Use ggc_alloc_cleared.
11158         * decl.c (lookup_label): Likewise.
11159         * lex.c (retrofit_lang_decl): Likewise.
11160
11161 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
11162
11163         * semantics.c (expand_body): Push to TV_EXPAND.
11164         * optimize.c (optimize_function): Push to TV_INTEGRATION.
11165         * decl.c (start_function): Always call announce_function.
11166
11167         * tinfo2.cc: Just declare abort.
11168
11169 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
11170
11171         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
11172         whenever @ is a symbolic name.
11173
11174 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
11175
11176         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
11177
11178 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
11179
11180         * decl.c (pushdecl): Look up functions by DECL_NAME, not
11181         DECL_ASSEMBLER_NAME.
11182
11183 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
11184
11185         * decl2.c (c_language): Define.
11186
11187 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
11188
11189         * lex.c (lang_init_options): Tweak.
11190
11191         * decl2.c: Remove #inclusion of diagnostic.h
11192         (lang_decode_option): Move diagnostic formatting options to
11193         toplevel.
11194
11195         * lang-options.h: Remove documentation for diagnostic options.
11196
11197         * Makefile.in (lex.o): Depends upon diagnostic.h
11198
11199 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
11200
11201         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
11202         the same DECL_RESULT, it's not a redefinition.
11203         * pt.c (tsubst_decl): Remove code to handle illegal
11204         specializations.
11205
11206 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
11207
11208         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
11209
11210 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
11211
11212         * search.c (maybe_suppress_debug_info): Don't check
11213         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
11214
11215         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
11216         here if extern_p.
11217
11218         Remember instantiation context in deferred instantiations.
11219         * cp-tree.h (struct tinst_level): Remove.
11220         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
11221         * pt.c (current_tinst_level): Now a tree.
11222         (print_template_context, push_tinst_level, pop_tinst_level,
11223         tinst_for_decl): Adjust.
11224         (reopen_tinst_level): New fn.
11225         (init_pt): Register current_tinst_level as a root.
11226         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
11227         of the pending templates list.
11228         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
11229         * lex.c (extract_interface_info): Adjust.
11230         * decl2.c (warn_if_unknown_interface): Adjust.
11231
11232 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
11233
11234         * class.c (indirect_primary_base_p): New function.
11235         (determine_primary_base): Use it.
11236
11237 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
11238
11239         Update new-abi dynamic cast algorithm.
11240         * tinfo.cc (__class_type_info::__dyncast_result): Add
11241         whole_details. Adjust constructor.
11242         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
11243         Avoid unnecessary searching.
11244         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
11245
11246 Mon Jun  5 06:48:55 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11247
11248         * decl.c (init_decl_processing): Don't call record_component_aliases.
11249         * tree.c (build_cplus_array_type_1): Likewise.
11250
11251 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
11252
11253         * ir.texi: Correct typo.
11254         * mangle.c (write_expression): Handle non-type template arguments
11255         with reference type.
11256         * method.c (build_overload_value): Likewise.
11257         * pt.c (convert_nontype_argument): Explicitly represent conversion
11258         to a reference with an ADDR_EXPR.
11259         (unify): Always unify arguments in left-to-right order.
11260
11261 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
11262             Mark Mitchell  <mark@codesourcery.com>
11263
11264         * Make-lang.in (CXX_SRCS): Add mangle.c.
11265         * Makefile.in (CXX_OBJS): Add mangle.o.
11266         (mangle.o): New rule.
11267
11268         * class.c (local_classes): New variable.
11269         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
11270         (get_vtt_name): Use mangle_vtt_name for new ABI.
11271         (init_class_processing): Initialize local_classes.
11272         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
11273         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
11274         (std_identifier): New macro.
11275         (DECL_VOLATILE_MEMFUNC_P): New macro.
11276         (DECL_NAMESPACE_STD_P): Likewise.
11277         (local_classes): Declare.
11278         (get_mostly_instantiated_function_type): Declare.
11279         (init_mangle): Declare.
11280         (mangle_decl): Likewise.
11281         (mangle_type_string): Likewise.
11282         (mangle_type): Likewise.
11283         (mangle_typeinfo_for_type): Likewise.
11284         (mangle_typeinfo_string_for_type): Likewise.
11285         (mangle_vtbl_for_type): Likewise.
11286         (mangle_vtt_for_type): Likewise.
11287         (mangle_ctor_vtbl_for_type): Likewise.
11288         (mangle_thunk): Likewise.
11289         (mangle_conv_op_name_for_type): Likewise.
11290         (mangle_guard_variable): Likewise.
11291         * decl.c (pushtag): Keep track of local classes.
11292         (initialize_predefined_identifiers): Initialize std_identifier.
11293         (init_decl_processing): Use std_identifier.
11294         (start_decl): Don't treat instantiations as specializations.
11295         (grokdeclarator): Likewise.
11296         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
11297         name for fully-instantiated templates.
11298         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
11299         destructors with the new ABI.
11300         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
11301         (grokfield): Use mangle_type for new ABI.
11302         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
11303         (get_sentry): Use mangle_guard_variable for new ABI.
11304         (start_static_initialization_or_destruction): Likewise.
11305         * expr.c (extract_aggr_init): Remove.
11306         (extract_scalar_init): Likewise.
11307         (extract_init): Remove #if 0'd code.
11308         * mangle.c: New function.
11309         * method.c (build_mangled_name): Assert not flag_new_abi.
11310         (build_static_name): Likewise.
11311         (build_decl_overload_real): Likewise.
11312         (build_typename_overload): Likewise.
11313         (build_overload_with_type): Likewise.
11314         (build_overload_name): Likewise.
11315         (get_ctor_vtbl_name): Likewise.
11316         (start_squangling): Likewise.
11317         (get_id_2): Likewise.
11318         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
11319         (init_method): Call init_mangle for new ABI.
11320         (make_thunk): Call mangle_thunk for new ABI.
11321         * operators.def: Correct new ABI manglings for the `%' operator.
11322         Add `::' operator.
11323         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
11324         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
11325         (lookup_template_class): Call mangle_decl for new ABI.
11326         (get_mostly_instantiated_function_type): New function.
11327         (set_mangled_name_for_template_decl): Use it.
11328         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
11329         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
11330         conversion op names.
11331         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
11332         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
11333         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
11334         mangle_typeinfo_string_for_type.
11335
11336 2000-06-03  Mark Mitchell  <mark@codesourcery.com>
11337
11338         * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
11339         (INNERMOST_TEMPLATE_ARGS): New macro.
11340         (innermost_args): Remove.
11341         (get_innermost_template_args): New function.
11342         * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
11343         * error.c (dump_function_decl): Be caution when using
11344         most_general_template.
11345         * method.c (build_template_parm_names):  Use
11346         INNERMOST_TEMPLATE_ARGS.
11347         * pt.c (add_to_template_args): Tidy comment
11348         (get_innermost_template_args): New function.
11349         (check_explicit_specialization): Clear DECL_INITIAL for a new
11350         specialization.
11351         (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
11352         Tidy.
11353         (push_template_decl): Always register specializations of the most
11354         general template.
11355         (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
11356         (coerce_template_parms): Likewise.
11357         (lookup_template_class): Likewise.
11358         (innermost_args): Remove.
11359         (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
11360         (tsubst_decl): Handle tricky specializations.  Use
11361         get_innermost_template_args.
11362         (instantiate_template): Simplify handling of partial
11363         instantiations.
11364         (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
11365         (most_general_template): Reimplement, in a more straightforward
11366         manner.
11367         (regenerate_decl_from_template): Tweak formatting.  Use
11368         TMPL_ARGS_DEPTH for clarity.
11369         (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
11370
11371         * dump.c (dequeue_and_dump): Dump information about thunks.
11372
11373 2000-06-01  Richard Henderson  <rth@cygnus.com>
11374
11375         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
11376
11377 2000-06-01  Richard Henderson  <rth@cygnus.com>
11378
11379         * decl2.c (unsupported_options): Fix typo, make const.
11380         (lang_decode_option): Fix bsearch argument order.
11381
11382 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
11383
11384         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
11385         on FIELD_DECLs.
11386
11387 Wed May 31 14:09:00 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11388
11389         * cp-tree.h (c_get_alias_set): Deleted.
11390         * Makefile.in (decl.o): Include ../expr.h.
11391         * decl.c (expr.h): Include.
11392         (init_decl_processing): Call record_component_aliases for arrays.
11393         (grokdeclarator): Likewise.
11394         Set TREE_ADDRESSABLE for fields that aren't bitfields.
11395         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
11396
11397 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
11398
11399         Remove guiding declaration support.
11400         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
11401         (flag_guiding_decls): Remove.
11402         * call.c (build_user_type_conversion_1): Remove support for
11403         guiding decls.
11404         (build_new_function_call): Likewise.
11405         (build_new_op): Likewise.
11406         (build_new_method_call): Likewise.
11407         * decl.c (start_function): Likewise.
11408         * friend.c (is_friend): Likewise.
11409         (do_friend): Likewise.
11410         * decl2.c ((flag_dump_translation_unit): Make it const.
11411         (flag_guiding_decls): Remove.
11412         (unsupported_options): New variable
11413         (compare_options): New function.
11414         (lang_decode_option): Use them.
11415
11416         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
11417
11418         * method.c (mangle_expression): Adjust test for legal expression
11419         operators.
11420
11421         * pt.c (instantiate_decl): Save and restore the local
11422         specializations list.
11423
11424 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
11425
11426         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
11427
11428 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
11429
11430         * call.c (add_template_candidate_real): Handle member template
11431         constructors for classes with virtual bases.
11432         (build_user_type_conversion_1): Use in_charge_arg_for_name.
11433         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
11434
11435         * ir.texi: Update thunk documentation.
11436
11437         * call.c (joust): Fix handling of overloaded builtin operators.
11438
11439 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
11440
11441         * cp-tree.h (DECL_ANTICIPATED): New macro.
11442         Document new use of DECL_LANG_FLAG_7.
11443         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
11444         in the user namespace.
11445         * lex.c (do_identifier): If the identifier's declaration has
11446         DECL_ANTICIPATED on, it has not yet been declared.  But do not
11447         replace it with an ordinary implicit declaration.
11448
11449         * tinfo2.cc: Include stdlib.h.
11450
11451 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
11452
11453         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
11454         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
11455         CLASSTYPE_ALIGN.
11456
11457 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
11458
11459         * decl2.c (lang_decode_option): Use skip_leading_substring instead
11460         of plain strncmp.
11461
11462 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
11463
11464         * operators.def (<?): Duplicated, should have been...
11465         (>?): this.  Fixed.
11466
11467 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
11468             Mark Mitchell  <mark@codesourcery.com>
11469
11470         * cp-tree.h (ansi_opname): Make it a macro.
11471         (ansi_assopname): Likewise.
11472         (struct lang_decl_flags): Add assignment_operator_p.
11473         (struct lang_decl): Add operator_code.
11474         (DECL_VTT_PARM): Adjust.
11475         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
11476         overloaded operator.
11477         (SET_OVERLOADED_OPERATOR_CODE): New macro.
11478         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
11479         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
11480         (opname_tab): Remove.
11481         (assignop_tab): Likewise.
11482         (operator_name_info_t): New type.
11483         (operator_name_info): New variable.
11484         (assignment_operator_name_info): Likewise.
11485         (build_cp_library_fn): Remove declaration.
11486         (push_cp_library_fn): Likewise.
11487         (operator_name_string): Likewise.
11488         (build_decl_overload): Likewise.
11489         * call.c (print_z_candidates): Simplify.
11490         (build_object_call): Adjust usage of ansi_opname.  Use
11491         DECL_OVERLOADED_OPERATOR_P.
11492         (op_error): Adjust operator name lookup.
11493         (build_conditional_expr): Adjust usage of ansi_opname.
11494         (build_new_op): Likewise.
11495         (build_op_delete_call): Likewise.
11496         (build_over_call): Likewise.
11497         (joust): Use DECL_OVERLOADED_OPERATOR_P.
11498         * decl.c (duplicate_decls): Copy operator_code.
11499         (init_decl_processing): Adjust parameters to push_cp_library_fn.
11500         (builtin_function): Adjust parameters to build_library_fn_1.
11501         (build_library_fn_1): Accept an overloaded operator code.
11502         (build_library_fn): Pass ERROR_MARK.
11503         (build_cp_library_fn): Accept an overloaded operator code.
11504         (push_cp_library_fn): Likewise.
11505         (grokfndecl): Tweak.
11506         (grokdeclarator): Simplify code to compute names of overloaded
11507         operators.  Adjust use of ansi_opname.
11508         (ambi_op_p): Work on tree_codes, not identifiers.
11509         (unary_op_p): Likewise.
11510         (grok_op_properties): Likewise.
11511         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
11512         (lang_mark_tree): Don't try to mark the operator_code.
11513         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
11514         * error.c (dump_decl): Remove special handling for operator
11515         names.
11516         (dump_function_name): Likewise.
11517         (dump_expr): Adjust name lookup of operators.
11518         (op_to_string): Simplify.
11519         (assop_to_string): Likewise.
11520         * init.c (build_new_1): Adjust use of ansi_opname.
11521         * lex.c (opname_tab): Remove.
11522         (assignop_tab): Likewise.
11523         (ansi_opname): Likewise.
11524         (ansi_assopname): Likewise.
11525         (operator_name_string): Likewise.
11526         (reinit_lang_specific): Likewise.
11527         (operator_name_info): New variable.
11528         (assignment_operator_name_info): Likewise.
11529         (init_operators): New function.
11530         (init_parse): Use it.
11531         (do_identifier): Adjust use of ansi_opname.
11532         * method.c (mangle_expression): Don't use ansi_opname for
11533         mangling.
11534         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
11535         (build_decl_overload): Remove.
11536         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
11537         (do_build_assign_ref): Adjust use of ansi_opname.
11538         (synthesize_method): Likewise.
11539         (implicitly_declare_fn): Likewise.
11540         * operators.def: New file.
11541         * parse.y (operator): Adjust use of ansi_opname.
11542         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
11543         (set_mangled_name_for_template_decl): Don't play games with
11544         current_namespace.
11545         (special_function_p): Adjust use of ansi_opname.
11546         * typeck.c (check_return_expr): Likewise.
11547         * Make-lang.in (cc1plus): Depend on operators.def.
11548         * Makefile.in (lex.o): Likewise.
11549         (decl.o): Likewise.
11550
11551 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
11552
11553         * Make-lang.in (cplib2.ready): Eradicate.
11554
11555 Sat May 27 11:25:46 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11556
11557         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
11558         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
11559         (built_min, cp_tree_equal): Likewise.
11560
11561 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
11562
11563         * class.c (layout_nonempty_base_or_field): Replace
11564         `record_layout_info' with `record_layout_info_s'.
11565
11566 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
11567
11568         Fix goto checking.
11569         * cp-tree.h (struct language_function): x_named_labels is now
11570         a struct named_label_list*.
11571         * decl.c (struct named_label_use_list): Renamed from...
11572         (struct named_label_list): ...this.  New struct.
11573         (push_binding_level): Don't set eh_region.
11574         (note_level_for_eh): New fn.
11575         (pop_label): Take label and old value directly.
11576         (pop_labels): Adjust for new named_labels format.
11577         (lookup_label): Likewise.
11578         (poplevel): Note characteristics of a binding level containing a
11579         named label.  Mess with named label lists earlier.
11580         (mark_named_label_lists): New fn.
11581         (mark_lang_function): Call it.
11582         (use_label): New fn, split out from...
11583         (make_label_decl): ...here.  Don't call it.
11584         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
11585         check_previous_gotos): New fns, split out from...
11586         (define_label): ...here.
11587         (check_switch_goto): New fn.
11588         (define_case_label): Call it.
11589         (check_goto): New fn.
11590         * semantics.c (finish_goto_stmt): Call it and use_label.
11591         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
11592         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
11593
11594 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
11595
11596         * class.c (build_vtable_entry_ref): Correct usage of
11597         get_vtbl_decl_for_binfo.
11598
11599         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
11600         * method.c (implicitly_declare_fn): Not here.
11601
11602 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
11603
11604         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
11605         (CPTI_PTMD_DESC_TYPE): ... here.
11606         (ptmd_desc_type_node): Rename to ...
11607         (ptm_desc_type_node): ... here.
11608         * decl.c: Likewise.
11609         * rtti.c (ptmd_initializer): Rename to ...
11610         (ptm_initializer): ... here.
11611         (sythesize_tinfo_var): Adjust. Deal with pointer to member
11612         function.
11613         (create_tinfo_types): Adjust.
11614
11615 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
11616
11617         Finish implementation of VTTs.
11618         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
11619         CPTI_VTT_PARM_IDENTIFIER.
11620         (vtt_parm_identifier): New macro.
11621         (vtt_parm_type): Likewise.
11622         (BINFO_SUBVTT_INDEX): Likewise.
11623         (BINFO_VPTR_INDEX): Likewise.
11624         (struct lang_decl): Add vtt_parm.
11625         (DECL_VTT_PARM): New macro.
11626         (DECL_USE_VTT_PARM): Likewise.
11627         (DECL_NEEDS_VTT_PARM_P): Likewise.
11628         (get_vtt_name): Declare.
11629         (build_artificial_parm): Likewise.
11630         (fixup_all_virtual_upcast_offsets): Likewise.
11631         (expand_indirect_vtbls_init): Remove.
11632         * call.c (build_new_method_call): Pass the vtt to subobject
11633         constructors and destructors.
11634         * class.c (get_vtt_name): Give it external linkage.
11635         (build_clone): Handle the magic VTT parameters for clones.
11636         (clone_function_decl): Fix typo in comment.
11637         (build_vtt): Keep track of the indices in the VTTs where various
11638         entities are stored.
11639         (build_vtt_inits): Likewise.
11640         (dfs_build_vtt_inits): Likewise.
11641         (build_ctor_vtbl_group): Tweak type of construction vtables.
11642         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
11643         primary bases, when building construction vtables.
11644         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
11645         (initialize_predefined_identifiers): Add vtt_parm_identifier.
11646         (init_decl_processing): Initialize vtt_parm_type.
11647         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
11648         (lang_mark_tree): Make vtt_parm.
11649         * decl2.c (build_artificial_parm): New function.
11650         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
11651         (grokclassfn): Use build_artificial_parm.
11652         * init.c (initialize_vtbl_ptrs): Call
11653         fixup_all_virtual_upcast_offsets directly.
11654         (perform_member_init): Use the complete subobject destructor for
11655         member cleanups.
11656         (build_vtbl_address): New function.
11657         (expand_virtual_init): Handle VTTs.
11658         * optimize (maybe_clone_body): Likewise.
11659         * search.c (fixup_all_virtual_upcast_offsets): Give it external
11660         linkage.
11661         (expand_indirect_vtbls_init): Remove.
11662         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
11663         * tree.c (make_binfo): Make them bigger.
11664
11665 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
11666
11667         * inc/cxxabi.h (__pbase_type_info): Define, based on
11668         __pointer_type_info.
11669         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
11670         (__pointer_to_member_type_info): Likewise.
11671         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
11672         (__pointer_to_member_type_info::__is_pointer_p): Remove.
11673         (__pointer_type_info::__do_catch): Rename to ...
11674         (__pbase_type_info::__do_catch): ... here. Adjust.
11675         (__pbase_type_info::__pointer_catch): Implement.
11676         (__pointer_type_info::__pointer_catch): Adjust.
11677         (__pointer_to_member_type_info::__pointer_catch): Adjust.
11678
11679 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
11680
11681         * tinfo.h (__user_type_info::contained_virtual_p): New
11682         predicate.
11683         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
11684         shaped hierarchy.
11685         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
11686         diamond shaped hierarchy. Add early out for mixed diamond and
11687         duplicate shaped hierarchy.
11688
11689 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
11690
11691         * cp-tree.h (build_delete): Change prototype.
11692         (build_vec_delete): Likewise.
11693         * call.c (build_scoped_method_call): Use special_function_kind
11694         values to indicate the kind of destruction to be done.
11695         (build_method_call): Likewise.
11696         * decl.c (finish_destructor_body): Likewise.
11697         (maybe_build_cleanup_1): Likewise.  Rename to ...
11698         (maybe_build_cleanup): ... this.
11699         * decl2.c (delete_sanity): Use special_function_kind
11700         values to indicate the kind of destruction to be done.
11701         (build_cleanup): Likewise.
11702         * init.c (perform_member_init): Likewise.
11703         (build_vec_delete_1): Likewise.
11704         (build_dtor_call): Simplify.
11705         (build_delete): Use special_function_kind
11706         values to indicate the kind of destruction to be done.
11707         (build_vbase_delete): Likewise.
11708         (build_vec_delete): Likewise.
11709
11710         * init.c (sort_member_init): Fix typo in error message generation
11711         code.
11712
11713 Mon May 15 11:46:29 2000  Donald Lindsay  <dlindsay@cygnus.com>
11714
11715         * semantics.c (begin_class_definition): make the packed
11716         attribute be sensitive to the "-fpack-struct" command line flag
11717
11718 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
11719
11720         Update new-abi upcast algorithm.
11721         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
11722         prototype and meaning of return value.
11723         (__si_class_type_info::__do_upcast): Likewise.
11724         (__vmi_class_type_info::__do_upcast): Likewise.
11725         * tinfo.cc (__class_type_info::__upcast_result): Replace
11726         whole2dst with part2dst. Adjust ctor.
11727         (__class_type_info::__do_upcast): Adjust call of worker function.
11728         (__class_type_info::__do_upcast): Adjust.
11729         (__si_class_type_info::__do_upcast): Adjust. Use parent's
11730         __do_upcast.
11731         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
11732         virtual base in diamond hierarchy bug.
11733
11734 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
11735
11736         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
11737         and bitfield to tinfo_fn_p.
11738         (DECL_TINFO_FN_P): Adjust.
11739         (SET_DECL_TINFO_FN_P): Likewise.
11740         (DECL_MUTABLE_P): Likewise.
11741         (DECL_C_BIT_FIELD): Likewise.
11742         (SET_DECL_C_BIT_FIELD): Likewise.
11743         (CLEAR_DECL_C_BIT_FIELD): Likewise.
11744         (DECL_UNINLINABLE): Likewise.
11745         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
11746         (handle_using_decl): Remove assertion.
11747         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
11748         to build FIELD_DECLs.
11749         (build_base_field): Likewise.
11750         (layout_class_type): Likewise.
11751         * decl.c (init_decl_processing): Likewise.
11752         (build_ptrmemfunc_type): Likewise.
11753         (grokdeclarator): Likewise.
11754         * decl2.c (grok_x_components): Likewise.
11755         * except.c (call_eh_info): Likewise.
11756         * init.c (init_init_processing): Likewise.
11757         * rtti.c (expand_class_desc): Likewise.
11758         (create_pseudo_type_info): Likewise.
11759         (get_vmi_pseudo_type_info): Likewise.
11760         (create_tinfo_types): Likewise.
11761         * ptree.c (print_lang_decl): Adjust.
11762         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
11763         before checking DECL_MUTABLE_P.
11764
11765         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
11766         parameters for template functions.
11767         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
11768         destructors as well as constructors.
11769
11770 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
11771
11772         * class.c (build_ctor_vtbl_group): Set inits.
11773         * optimize.c (maybe_clone_body): Set DECL_INLINE and
11774         DECL_THIS_INLINE appropriately for clones.
11775
11776         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
11777         (DECL_CONV_FN_P): Simplify.
11778         (DECL_OPERATOR): Remove.
11779         (language_to_string): Declare.
11780         * decl.c (duplicate_decls): Fix typo in comment.
11781         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
11782         (grok_op_properties): Use DECL_CONV_FN_P instead of
11783         IDENTIFIER_TYPENAME_P.
11784         * dump.c (dequeue_and_dump): Dump the language linkage of
11785         declarations.
11786         * error.c (language_to_string): Give it external linkage.
11787         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
11788         (implicitly_declare_fn): Set DECL_LANGUAGE.
11789         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
11790         IDENTIFIER_TYPENAME_P.
11791         (tsubst_decl): Likewise.
11792         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
11793         * semantics.c (finish_member_declaration): Don't mark members of
11794         classes declared in an extern "C" region as extern "C".
11795
11796 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
11797
11798         * decl2.c (qualified_lookup_using_namespace): Look through
11799         namespace aliases.
11800
11801         * decl.c (push_using_decl): Return the old decl on namespace level.
11802
11803 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
11804
11805         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
11806         (VTT_NAME_PREFIX): New macro.
11807         (CTOR_VTBL_NAME_PREFIX): Likewise.
11808         (get_ctor_vtbl_name): New function.
11809         * class.c (get_vtable_name): Simplify.
11810         (get_vtt_name): New function.
11811         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
11812         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
11813         when a virtual base becomes primary.
11814         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
11815         VTTs.
11816         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
11817         additional parameters.
11818         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
11819         (initialize_array): New function.
11820         (build_vtt): Likewise.
11821         (build_vtt_inits): Likewise.
11822         (dfs_build_vtt_inits): Likewise.
11823         (dfs_fixup_binfo_vtbls): Likewise.
11824         (build_ctor_vtbl_group): Likewise.
11825         (initialize_vtable): Use initialize_array.
11826         (accumulate_vtbl_inits): Reimplement to handle construction
11827         vtables.
11828         (dfs_accumulate_vtbl_inits): Likewise.
11829         (bulid_vtbl_initializer): Adjust parameter name.
11830         * method.c (build_typename_overload): Remove #if 0'd code.
11831         (get_ctor_vtbl_name): New function.
11832         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
11833         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
11834
11835         * cp-tree.h (struct lang_type): Remove search_slot.
11836         (CLASSTYPE_SEARCH_SLOT): Remove.
11837         (emit_base_init): Change prototype.
11838         (initialize_vtbl_ptrs): Likewise.
11839         (expand_indirect_vtbls_init): Likewise.
11840         (clear_search_slots): Remove.
11841         * decl.c (lang_mark_tree): Don't mark search_slot.
11842         * init.c (initialize_vtbl_ptrs): Simplify.
11843         (emit_base_init): Likewise.
11844         * search.c (struct vbase_info): Document decl_ptr.
11845         (convert_pointer_to_single_level): Remove.
11846         (dfs_find_vbases): Remove.
11847         (dfs_init_base_pointers): Simplify.
11848         (dfs_clear_vbase_slots): Remove.
11849         (dfs_vtable_path_unmark): New function.
11850         (init_vbase_pointers): Simplify.
11851         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
11852         (expand_indirect_vtbls_init): Simplify.  Don't call
11853         mark_all_temps_used.
11854         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
11855         initialize_vtbl_ptrs.
11856
11857 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
11858
11859         * except.c: Add static prototypes.
11860
11861 2000-05-20  H.J. Lu  <hjl@gnu.org>
11862
11863         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
11864
11865 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
11866
11867         Don't create a separate copy of virtual bases for the
11868         CLASSTYPE_VBASECLASSES list.
11869         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
11870         (BINFO_FOR_VBASE): Remove.
11871         (CANONICAL_BINFO): Adjust.
11872         (binfo_for_vbase): New function.
11873         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
11874         instead of BINFO_FOR_VBASE.
11875         (build_vbase_pointer): Likewise.
11876         (build_secondary_vtable): Likewise.
11877         (dfs_mark_primary_bases): Likewise.
11878         (mark_primary_bases): Likewise.
11879         (layout_nonempty_base_or_field): Likewise.
11880         (dfs_set_offset_for_shared_vbases): Likewise.
11881         (dfs_set_offset_for_unshared_vbases): Likewise.
11882         (layout_virtual_bases): Likewise.  Adjust for changes to the
11883         CLASSTYPE_VBASECLASSES list.
11884         (dump_class_hierarchy_r): Use binfo_for_vbase
11885         instead of BINFO_FOR_VBASE.
11886         (dump_class_hierarchy): Likewise.
11887         (finish_vtbls): Likewise.
11888         (build_vtbl_initializer): Adjust for changes to the
11889         CLASSTYPE_VBASECLASSES list.
11890         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
11891         * decl.c (finish_destructor_body): Adjust for changes to the
11892         CLASSTYPE_VBASECLASSES list.
11893         * init.c (sort_base_init): Use binfo_for_vbase.
11894         (construct_virtual_bases): Adjust for changes to the
11895         CLASSTYPE_VBASECLASSES list.
11896         (expand_member_init): Use binfo_for_vbase.
11897         (build_vbase_delete):  Adjust for changes to the
11898         CLASSTYPE_VBASECLASSES list.
11899         * method.c (do_build_copy_constructor): Likewise.
11900         * rtti.c (get_base_offset): Use binfo_for_vbase.
11901         (expand_class_desc): Remove #if 0'd code.
11902         * search.c (struct vbase_info): Remove vbase_types.
11903         (get_base_distance):  Use binfo_for_vbase.
11904         (lookup_field_queue_p): Use CANONICAL_BINFO.
11905         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
11906         (get_pure_virtuals): Adjust for changes to the
11907         CLASSTYPE_VBASECLASSES list.
11908         (dfs_find_vbases): Use binfo_for_vbase.
11909         (dfs_init_vbase_pointers): Likewise.
11910         (init_vbase_pointers): Don't initialize vi.vbase_types.
11911         (virtual_context): Use binfo_for_vbase.
11912         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
11913         CLASSTYPE_VBASECLASSES list.
11914         (expand_indirect_vtbls_init): Simplify.
11915         (dfs_get_vbase_types): Don't replicate virtual bases.
11916         (find_vbase_instance): Use binfo_for_vbase.
11917         (binfo_for_vbase): New function.
11918         * typeck.c (get_delta_difference): Use binfo_for_vbase.
11919
11920 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
11921
11922         * decl2.c (finish_anon_union): Generalize error messages to handle
11923         anonymous structures.
11924         * init.c (perform_member_init): Remove `name' parameter.
11925         (build_field_list): New function.
11926         (sort_member_init): Handle anonymous union initialization order
11927         correctly.  Check for multiple initializations of the same union.
11928         (emit_base_init): Don't look up fields by name here.
11929         (expand_member_init): Record the result of name lookup for future
11930         reference.
11931         * typeck.c (build_component_ref): Fix formatting.
11932
11933 Wed May 17 17:27:44 2000  Andrew Cagney  <cagney@b1.cygnus.com>
11934
11935         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
11936         * typeck.c (build_x_compound_expr): Replace warn_unused with
11937         warn_unused_value.
11938
11939         * decl2.c (lang_decode_option): Update -Wall unused flags by
11940         calling set_Wunused.
11941
11942 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
11943
11944         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
11945         * init.c (dfs_vtable_path_unmark): Remove.
11946         * search.c (marked_new_vtable_p): Likewise.
11947         (unmarked_new_vtable_p): Likewise.
11948         (dfs_search_slot_nonempty_p): Likewise.
11949         (dfs_mark): Likewise.
11950         (dfs_vtable_path_unmark): Likewise.
11951         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
11952         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
11953         (dfs_init_vbase_pointers): Remove special-case new ABI code.
11954         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
11955         (init_vbase_pointers): Simplify.
11956         (expand_indirect_vtbls_init): Likewise.
11957
11958         * class.c (copy_virtuals): New function.
11959         (build_primary_table): Use it.
11960         (build_secondary_vtable): Likewise.
11961         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
11962         indicate that no vcall offset is required.
11963         (add_virtual_function): Likewise.
11964         (modify_all_vtables): Likewise.
11965         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
11966         (dfs_accumulate_vtbl_inits): Likewise.
11967         (build_vtbl_initializer): Make changes to handle construction
11968         vtables.
11969         (dfs_build_vcall_offset_vtbl_entries): Likewise.
11970         (build_rtti_vtbl_entries): Likewise.
11971         (build_vtable_entries): Handle a NULL vcall_index.
11972
11973 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
11974
11975         * decl2.c (lang_decode_option): Fix thinko.
11976
11977 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
11978
11979         * except.c (check_handlers): New fn.
11980         * cp-tree.h: Declare it.
11981         * semantics.c (finish_handler_sequence): Call it.
11982         (finish_function_handler_sequence): Likewise.
11983         (finish_handler_parms): Set TREE_TYPE on the handler.
11984         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
11985         * search.c (get_base_distance_recursive): If protect>1, ignore
11986         special access.
11987         (get_base_distance): Don't reduce watch_access.
11988
11989 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
11990
11991         * lex.c: #include diagnostic.h.
11992         (lang_init_options): Set default prefixing rules.
11993
11994         * lang-options.h: Add -fdiagnostics-show-location=.
11995
11996         * decl2.c: #include diagnostic.h.
11997         (lang_decode_option): Handle -fdiagnostics-show-location=.
11998
11999 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
12000
12001         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
12002         * vec.cc: Revert my 2000-05-07 change.
12003
12004 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
12005
12006         * class.c (check_field_decls): Complain about non-static data
12007         members with same name as class in class with constructor.
12008
12009 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
12010
12011         * decl.c (grokdeclarator): Allow non-static data members with
12012         same name as class.
12013
12014 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
12015
12016         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
12017         and pending_inline.filename.  Update prototypes.
12018         * decl.c (define_label): Constify filename parameter.
12019         * decl2.c (warn_if_unknown_interface): Constify local char *.
12020         * input.c Constify input_source.filename. Don't declare
12021         input_filename or lineno.  Constify filename parameter to feed_input.
12022         * lex.c (init_parse): Constify parameter and return value.
12023         (cp_pragma_interface, cp_pragma_implementation): Constify
12024         filename argument.
12025         (reinit_parse_for_method, reinit_parse_for_block,
12026         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
12027         Constify local char *.
12028         * pt.c: Don't declare lineno or input_filename.
12029         (print_template_context, tsubst_friend_function, tsubst_decl,
12030         tsubst, instantiate_decl): Constify local char *.
12031         * semantics.c (expand_body): Constify local char *.
12032         * tree.c (build_srcloc): Constify filename parameter.
12033         * typeck.c (c_expand_asm_operands): Constify filename
12034         parameter.
12035
12036 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
12037
12038         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
12039         offsetof expansion.
12040
12041 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
12042
12043         * inc/cxxabi.h:  Fix typos in comment.
12044         (__base_class_info::__offset): Use a static_cast.
12045
12046 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
12047
12048         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
12049         of std::size_t and std::ptrdiff_t respectively.
12050         * tinfo.cc: Likewise.
12051         * vec.cc: Likewise.
12052
12053 2000-05-06  Richard Henderson  <rth@cygnus.com>
12054
12055         * typeck.c (build_c_cast): Don't warn integer->pointer size
12056         mismatch for constants.
12057
12058 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
12059
12060         * rtti.c (ptmd_initializer): Set non-public, if class is
12061         incomplete.
12062
12063         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
12064         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
12065         __cxa_vec_delete): Likewise.
12066         * tinfo.cc (__dynamic_cast): Likewise.
12067         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
12068         __cxa_vec_delete): Likewise.
12069
12070 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
12071
12072         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
12073         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
12074         (lang_decl_flags): Add vcall_offset.
12075         (THUNK_VCALL_OFFSET): Use it.
12076         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
12077         * method.c (make_thunk): Create the lang_decl here, not in
12078         emit_thunk.
12079         (emit_thunk): Make generic thunks into ordinary functions once
12080         they have been fed to expand_body.
12081         * semantics.c (expand_body): Set current_function_is_thunk here.
12082
12083 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12084
12085         * class.c (update_vtable_entry_for_fn): Prototype.
12086
12087         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
12088         and `tmpl'.
12089
12090         * search.c (dfs_build_inheritance_graph_order): Prototype.
12091
12092 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
12093
12094         * cp-tree.h (special_function_kind): Add various kinds of
12095         destructors.
12096         (special_function_p): New function.
12097         * class.c (overrides): Don't let one kind of destructor override
12098         another.
12099         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
12100         whether or not to instantiate a template.
12101         * tree.c (special_function_p): Define.
12102
12103 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
12104
12105         * cp-tree.def (THUNK_DECL): Remove.
12106         * cp-tree.h (DECL_THUNK_P): New macro.
12107         (DECL_NON_THUNK_FUNCTION_P): Likewise.
12108         (DECL_EXTERN_C_FUNCTION_P): Likewise.
12109         (SET_DECL_THUNK_P): Likewise.
12110         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
12111         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
12112         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
12113         * decl.c (decls_match): Use DECL_EXTERN_C_P.
12114         (duplicate_decls): Likewise.
12115         (pushdecl): Likewise.  Adjust thunk handling.
12116         (grokfndecl): Use DECL_EXTERN_C_P.
12117         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
12118         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
12119         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
12120         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
12121         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
12122         DECL_NO_STATIC_CHAIN.
12123         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
12124         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
12125         * search.c (covariant_return_p): Remove THUNK_DECL handling.
12126         * ir.texi: Update.
12127
12128 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
12129
12130         * tree.c (walk_tree): Set lineno.
12131
12132 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
12133
12134         * exception.cc: Update license notice.
12135         * new.cc: Likewise.
12136         * new1.cc: Likewise.
12137         * new2.cc: Likewise.
12138         * tinfo.cc: Likewise.
12139         * tinfo2.cc: Likewise.
12140         * vec.cc: Likewise.
12141         * inc/cxxabi.h: Likewise.
12142         * inc/exception: Likewise.
12143         * inc/new: Likewise.
12144         * inc/new.h: Likewise.
12145         * inc/typeinfo: Likewise.
12146
12147 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
12148
12149         * tree.c (build_target_expr_with_type): If we already have a
12150         TARGET_EXPR, just return it.
12151
12152         * optimize.c (initialize_inlined_parameters): Don't generate an
12153         EXPR_STMT if we can just use DECL_INITIAL.
12154         * decl.c (emit_local_var): Only make the initialization a
12155         full-expression if stmts_are_full_exprs_p.
12156
12157 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
12158
12159         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
12160         macro.
12161         * call.c (standard_conversion): Use it.
12162         (direct_reference_binding): Likewise.
12163         (build_over_call): Likewise.
12164         (is_properly_derived_from): Likewise.
12165         (compare_ics): Likewise.
12166         * class.c (resolves_to_fixed_type_p): Likewise.
12167         * optimize.c (declare_return_variable): Likewise.
12168         * pt.c (is_specialization_of): Likewise.
12169         (unify): Likewise.
12170         * typeck.c (comp_target_parms): Likeiwse.
12171         (build_static_cast): Likewise.
12172         (build_reinterpret_cast): Likewise.
12173         (build_const_cast): Likewise.
12174         (comp_ptr_ttypes_real): Likewise.
12175         (comp_ptr_ttypes_const): Likewise.
12176         * typeck2.c (process_init_constructor): Likewise.
12177
12178 2000-04-30  Scott Snyder <snyder@fnal.gov>
12179
12180         * decl.c (finish_destructor_body): Use the base destructor when
12181         destroying virtual bases.
12182
12183 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
12184
12185         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
12186         STMT_EXPRs.
12187         * optimize.c (struct inline_data): Add target_exprs field.
12188         (declare_return_variable): When a function returns an aggregate,
12189         use the variable declared in the TARGET_EXPR as the remapped
12190         DECL_RESULT.
12191         (expand_call_inline): Update the pending target_exprs stack.
12192         (optimize_function): Initialize the stack.
12193
12194         * decl2.c (finish_file): Fix typo in comment.
12195
12196         * method.c (emit_thunk): Don't try to return a `void' value.
12197
12198         * optimize.c (initialize_inlined_parameters): If the parameter is
12199         addressable, we need to make a new VAR_DECL, even if the
12200         initializer is constant.
12201
12202 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
12203
12204         * decl.c (grok_op_properties): Add an extra check of argtypes.
12205
12206 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
12207
12208         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
12209         variables.
12210         (initialize_inlined_parameters): Try to avoid creating new
12211         VAR_DECLs.
12212
12213 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
12214
12215         * lex.c (my_get_run_time): Remove.
12216         (init_filename_times): Use get_run_time instead of my_get_run_time.
12217         (check_newline): Likewise.
12218         (dump_time_statistics): Likewise.
12219         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
12220         of computing elapsed time explicitly.
12221
12222 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
12223
12224         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
12225         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
12226         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
12227         before calling decl_constant_value.
12228         * class.c (check_bitfield_decl): Likewise.
12229         * cvt.c (ocp_convert): Likewise.
12230         (convert): Likewise.
12231         * decl.c (compute_array_index_type): Likewise.
12232         (build_enumerator): Likewise.
12233         * decl2.c (check_cp_case_value): Likewise.
12234         * pt.c (convert_nontype_argument): Likewise.
12235         (tsubst): Likewise.
12236         * typeck.c (decay_conversion): Likewise.
12237         (build_compound_expr): Likewise.
12238         (build_reinterpret_cast): Likewise.
12239         (build_c_cast): Likewise.
12240         (convert_for_assignment): Likewise.
12241
12242 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
12243
12244         * decl.c (finish_function): Don't play games with DECL_INLINE.
12245
12246 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
12247
12248         * ir.texi: Correct typo.
12249
12250 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
12251
12252         * decl.c (grokdeclarator): Reject VLAs as members.
12253
12254 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
12255
12256         * call.c (standard_conversion): Accept conversion between
12257         COMPLEX_TYPEs.
12258
12259         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
12260
12261 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
12262
12263         * decl2.c (finish_file): Remove double setup for accounting
12264         compile time.
12265
12266 2000-04-24  Robert Lipe <robertlipe@usa.net>
12267
12268         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
12269
12270 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
12271
12272         * new.cc (set_new_handler): Needs to be in std::.
12273
12274 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
12275
12276         * cp-tree.h (lang_decl): Remove pretty_function_p.
12277         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
12278         language-specific node.
12279         * decl.c (cp_make_fname_decl): Use build_decl, not
12280         build_lang_decl, to build the variables.
12281         (grokvardecl): Don't call build_lang_decl for local variables in
12282         templates.
12283         (grokdeclarator): Don't call build_lang_decl for local type
12284         declarations in templates.
12285         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
12286         zero'd memory, rather than calling memset.
12287         * pt.c: Include hashtab.h.
12288         (local_specializations): New variable.
12289         (retrieve_local_specialization): Use it.
12290         (register_local_specialization): Likewise.
12291         (tsubst_decl): Don't assume local variables have
12292         DECL_LANG_SPECIFIC.
12293         (instantiate_decl): Set up local_specializations.
12294         * Makefile.in (HTAB_H): New variable.
12295
12296 2000-04-23  Richard Henderson  <rth@cygnus.com>
12297
12298         * typeck.c (c_expand_asm_operands): Restore the original
12299         contents of the output list.
12300
12301 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
12302
12303         * ir.texi:  Document complex number representation.
12304
12305 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
12306
12307         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
12308         (target_incomplete_p): New function.
12309         (tinfo_base_init): Create comdat NTBS name variable.
12310         (ptr_initializer): Add non_public parameter. Calculate it.
12311         (ptmd_initializer): Likewise.
12312         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
12313         (create_real_tinfo_var): Add non_public parameter. Use it.
12314         Push proxy into global namespace.
12315         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
12316         New enumeration.
12317         * inc/typeinfo (type_info::before, type_info::operator==):
12318         Compare __name addresses.
12319
12320         * tinfo2.cc: Remove new-abi builtins comment.
12321
12322 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
12323
12324         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
12325
12326         * call.c (joust): Exit early if we get the same function, too.
12327
12328         * decl2.c (key_method): Return NULL_TREE for template classes.
12329         (import_export_class): Don't need to check for template classes.
12330
12331 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
12332
12333         * lex.c: Remove references to cccp.c.
12334
12335 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
12336
12337         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
12338         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
12339         (DECL_DESTRUCTOR_P): Use destructor_attr.
12340         (DECL_CONST_MEMFUNC_P): Reimplement.
12341         (DECL_VOLATILE_MEMFUNC_P): Remove.
12342         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
12343         (overrides): Use DECL_DESTRUCTOR_P.
12344         (check_for_override): Likewise.
12345         * decl.c (start_function): Likewise.
12346         * decl2.c (grokfclassfn): Likewise.
12347         (check_classfn): Likewise.
12348         (grok_function_init): Likewise.
12349
12350 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
12351
12352         * decl2.c (grokfield): Issue error on illegal data member
12353         declaration.
12354
12355 Mon Apr 17 17:11:16 2000  Mark P Mitchell  <mark@codesourcery.com>
12356
12357         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
12358
12359 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
12360
12361         * class.c (build_vtable_entry): Don't build thunks for type-info
12362         functions.
12363
12364 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
12365
12366         * decl.c (decls_match): Allow a redeclaration of a builtin to
12367         specify args while the builtin did not.
12368
12369 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
12370
12371         * cp-tree.def (THUNK_DECL): Add to documentation.
12372         * cp-tree.h (flag_huge_objects): Declare.
12373         * class.c (modify_vtable_entry): Tidy.
12374         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
12375         Calculate delta appropriately for the new ABI.
12376         (dfs_modify_vtables): Use it.
12377         (modify_all_vtables): Fix thinko in code to add overriding copies
12378         of functions to primary vtables.
12379         (build_clone): Fix typo in comment.
12380         (clone_function_decl): Correct order of destructors in vtable.
12381         (build_vbase_offset_vtbl_entries): Adjust comment.
12382         (dfs_vcall_offset_queue_p): Remove.
12383         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
12384         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
12385         (build_vtable_entry): Correct check for pure virtual functions.
12386         Don't declare flag_huge_objects.
12387         * decl.c (flag_huge_objects): Remove declaration.
12388         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
12389         Use int_size_in_bytes.
12390         (emit_thunk): Handle vcall offset thunks.
12391
12392 Sat Apr 15 16:00:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12393
12394         * decl2.c (parse_time, varconst_time): Delete declarations.
12395         (finish_file): Delete LINENO declaration.
12396         START_TIME and THIS_TIME now long.
12397
12398 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
12399
12400         * class.c (build_base_field): Reformat comment.
12401
12402         * inc/cxxabi.h (stddef.h): Comment inclusion.
12403         (__base_class_info::__offset): Comment shift.
12404
12405 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
12406
12407         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
12408         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
12409         (cp_push_exception_identifier): New macro.
12410         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
12411         (DECL_BASE_DESTRUCTOR_P): Likewise.
12412         (DECL_DELETING_DESTRUCTOR_P): Likewise.
12413         (get_vtbl_decl_for_binfo): Fix formatting.
12414         (in_charge_arg_for_name): New macro.
12415         (maybe_build_cleanup_and_delete): Remove declaration.
12416         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
12417         (in_charge_arg_for_name): New function.
12418         (build_new_method_call): Use it.  Handle cloned destructors.
12419         (build_clone): Don't make the base constructor virtual.
12420         Automatically defer generated functions.
12421         (clone_function_decl): Handle destructors, too.
12422         (clone_constructors_and_destructors): Likewise.
12423         (create_vtable_ptr): Don't create a vtable entry for a cloned
12424         function.
12425         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
12426         (initialize_predefined_identifiers): Update appropriately.
12427         (finish_destructor_body): Simplify.
12428         (maybe_build_cleanup_and_delete): Remove.
12429         * except.c (expand_throw): Handle new-ABI destructors.
12430         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
12431         (build_dtor_call): New function.
12432         (build_delete): Use it.  Simplify.
12433         * optimize.c (maybe_clone_body): Handle destructors.
12434         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
12435
12436         * exception.cc (cleanup_fn): New typedef.
12437         (CALL_CLEANUP): New macro.
12438         (cp_eh_info): Use them.
12439         (__cp_push_exception): Likewise.
12440         (__cp_pop_exception): Likewise.
12441
12442 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
12443
12444         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
12445         (complete_dtor_identifier): New macro.
12446         (CLASSTYPE_FIRST_CONVERSION): Remove.
12447         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
12448         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
12449         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
12450         (CLASSTYPE_CONSTRUCTORS): Likewise.
12451         (CLASSTYPE_DESTRUCTORS): Likewise.
12452         (lang_decl): Add cloned_function.
12453         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
12454         (DECL_BASE_CONSTRUCTOR_P): Likewise.
12455         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
12456         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
12457         (DECL_CLONED_FUNCTION_P): Likewise.
12458         (DECL_CLONED_FUNCTION): Likewise.
12459         (clone_function_decl): Declare.
12460         (maybe_clone_body): Likewise.
12461         * call.c (build_user_type_conversion_1): Call complete object
12462         constructors in the new ABI.
12463         (build_new_method_call): Don't add in-charge parameters under the
12464         new ABI.
12465         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
12466         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
12467         CLASSTYPE_DESTRUCTOR_SLOT.
12468         (build_clone): New function.
12469         (clone_function_decl): Likewise.
12470         (clone_constructors_and_destructors): Likewise.
12471         (check_bases_and_members): Use it.
12472         * decl.c (iniitialize_predefined_identifiers): Initialize
12473         complete_dtor_identifier.
12474         (finish_function): Don't add extra code to a clone.
12475         (lang_mark_tree): Mark cloned_function.
12476         * decl2.c (mark_used): Don't bother trying to instantiate things
12477         we synthesized.
12478         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
12479         * method.c (set_mangled_name_for_decl): Don't treat clones as
12480         constructors.
12481         (synthesize_method): Sythesize cloned functions, not the clones.
12482         * optimize.c (inline_data): Update comment on ret_label.
12483         (remap_block): Don't assume DECL_INITIAL exists.
12484         (copy_body_r): Allow ret_label to be NULL.
12485         (maybe_clone_body): Define.
12486         * pt.c (tsubst_decl): Handle clones.
12487         (instantiate_clone): New function.
12488         (instantiate_template): Use it.
12489         (set_mangled_name_for_template_decl): Don't treat clones as
12490         constructors.
12491         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
12492         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
12493         * semantics.c (expand_body): Clone function bodies as necessary.
12494
12495         * optimize.c (remap_decl): Avoid sharing structure for arrays
12496         whose size is only known at run-time.
12497         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
12498
12499         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
12500         to has_in_charge_parm_p.
12501         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
12502         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
12503         (DECL_COPY_CONSTRUCTOR_P): New macro.
12504         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
12505         (build_user_type_conversion_1): Likewise.
12506         (convert_like_real): Likewise.
12507         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
12508         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
12509         (copy_args_p): Likewise.
12510         (grok_ctor_properties): Likewise.
12511         (start_function): Likewise.
12512         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
12513         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
12514         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
12515         * method.c (do_build_copy_constructor): Use
12516         DECL_HAS_IN_CHARGE_PARM_P.
12517         (synthesize_method): Likewise.
12518         * pt.c (instantiate_template): Remove goto.
12519         * tree.c (build_cplus_method_type): Remove mention of obstacks in
12520         comment.
12521
12522         * cp-tre.h (finish_function): Change prototype.
12523         * decl.c (end_cleanup_fn): Adjust caller.
12524         (finish_function): Take only one parameter.
12525         * decl2.c (finish_objects): Adjust caller.
12526         (finish_static_storage_duration_function): Likewise.
12527         * method.c (emit_thunk): Likewise.
12528         * parse.y: Likewise.
12529         * parse.c: Regenerated.
12530         * pt.c (instantiate_decl): Likewise.
12531         * rtti.c (synthesize_tinfo_fn): Likewise.
12532         * semantics.c (expand_body): Likewise.
12533
12534         * cp-tree.h (copy_decl): New function.
12535         * class.c (finish_struct_1): Use it.
12536         * lex.c (copy_decl): Define it.
12537         * pt.c (tsubst_decl): Likewise.
12538         * tree.c (copy_template_template_parm): Likewise.
12539
12540         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
12541         has_nonpublic_assign_ref.
12542         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
12543         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
12544         * class.c (finish_struct_methods): Don't set
12545         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
12546         (interface_only): Don't declare.
12547         (interface_unknown): Likewise.
12548
12549 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
12550
12551         * tree.h (HAVE_TEMPLATES): Remove definition.
12552         * lang-options.h (-fthis-is-variable): Remove documentation.
12553
12554 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
12555
12556         * class.c (instantiate_type): Handle object-relative template-id.
12557
12558         * semantics.c (finish_expr_stmt): Call convert_to_void here.
12559         * decl.c (cplus_expand_expr_stmt): Not here.
12560
12561         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
12562         Initialize exprtype earlier.
12563
12564         * parse.y (fn.def1): Check for defining types in return types.
12565
12566         * decl.c (check_tag_decl): Notice extra fundamental types.
12567         Diagnose empty decls in classes, too.
12568
12569         * decl.c (grokdeclarator): Don't override an anonymous name if no
12570         declarator was given.
12571
12572         * cvt.c (convert_to_void): Call resolve_offset_ref.
12573
12574         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
12575
12576         * decl2.c (decl_namespace): Handle getting a type.
12577
12578         * typeck.c (build_c_cast): Re-enable warning for cast between
12579         pointer and integer of different size.
12580
12581 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
12582
12583         * inc/cxxabi.h (__pointer_type_info): Add restrict and
12584         incomplete flags.
12585         (__pointer_type_info::__pointer_catch): New virtual function.
12586         (__pointer_to_member_type_info): Derive from
12587         __pointer_type_info. Adjust.
12588         (__pointer_to_member_type_info::__do_catch): Remove.
12589         (__pointer_to_member_type_info::__is_pointer_p): Declare.
12590         (__pointer_to_member_type_info::__pointer_catch): Declare.
12591         * rtti.c (qualifier_flags): Add restrict flag.
12592         (ptmd_initializer): Reorder members.
12593         (create_tinfo_types): Expand comments. Reorder
12594         ptmd_desc_type_node members.
12595         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
12596         Implement.
12597         (__pointer_type_info::__do_catch): Move specific code into
12598         __pointer_catch. Call it.
12599         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
12600         specific catch checking. Fix void conversion check.
12601         (__pointer_to_member_type_info::__do_catch): Remove.
12602         (__pointer_to_member_type_info::__pointer_catch): Implement.
12603
12604 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
12605
12606         * lex.c (init_parse): Remove traces of classof and headof.
12607         * decl2.c (flag_operator_names): Default to 1.
12608         (lang_decode_option): Do not set it for -ansi.
12609
12610 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
12611
12612         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
12613         (DECL_MAIN_VARIANT): Remove.
12614         * decl.c (duplicate_decls): Don't set it.
12615         (start_function): Likewise.
12616         (lang_mark_tree): Don't mark it.
12617         * decl2.c (defer_fn): Don't use it.
12618         * lex.c (retrofit_lang_decl): Don't set it.
12619         * pt.c (tsubst_decl): Likewise.
12620         * ptree.c (print_lang_decl): Don't print it.
12621         * typeck.c (mark_addressable): Don't use it.
12622
12623 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
12624
12625         * vec.cc: Include <new> and <exception>.
12626         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
12627         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
12628         terminate.
12629         (__cxa_vec_delete): Catch dtor exceptions.
12630
12631 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
12632
12633         Prepend __ to implementation defined names.
12634         * inc/typeinfo (type_info): Rename _name to __name.
12635         (type_info::type_info): Rename parameter.
12636         (type_info::operator==, type_info::operator!=,
12637         type_info::before): Likewise.
12638         (type_info::is_pointer_p, type_info::is_function_p,
12639         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
12640         parameters.
12641         * inc/cxxabi.h
12642         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
12643         (__pointer_type_info::__pointer_type_info): Likewise.
12644         (__pointer_type_info::is_pointer_p,
12645         __pointer_type_info::do_catch): Prepend __. Rename parameters.
12646         (__array_type_info::__array_type_info): Rename parameters.
12647         (__function_type_info::__function_type_info): Likewise.
12648         (__function_type_info::is_function_p): Prepend __.
12649         (__enum_type_info::__enum_type_info): Rename parameters.
12650         (__pointer_to_member_type_info::__pointer_to_member_type_info):
12651         Likewise.
12652         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
12653         parameters.
12654         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
12655         (__class_type_info::__class_type_info): Rename parameters.
12656         (__class_type_info::sub_kind): Prepend __. Adjust member names.
12657         (__class_type_info::upcast_result,
12658         __class_type_info::dyncast_result): Prepend __. Move definition
12659         into tinfo.cc.
12660         (__class_type_info::do_upcast, __class_type_info::do_catch,
12661         __class_type_info::find_public_src,
12662         __class_type_info::do_dyncast,
12663         __class_type_info::do_find_public_src): Prepend __. Rename
12664         parameters.
12665         (__si_class_type_info::__si_class_type_info): Rename parameters.
12666         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
12667         __si_class_type_info::do_find_public_src): Prepent __. Rename
12668         parameters.
12669         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
12670         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
12671         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
12672         parameters.
12673         (__dynamic_cast): Rename parameters.
12674         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
12675         type_info::do_catch, type_info::do_upcast): Prepend __.
12676         (contained_p, public_p, virtual_p, contained_public_p,
12677         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
12678         (__class_type_info::do_catch,
12679         __class_type_info::do_upcast): Prepend __. Adjust.
12680         (__class_type_info::__upcast_result,
12681         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
12682         Adjust.
12683         (__class_type_info::find_public_src): Prepend __. Adjust.
12684         (__class_type_info::do_find_public_src,
12685         __si_class_type_info::do_find_public_src,
12686         __vmi_class_type_info::do_find_public_src): Likewise.
12687         (__class_type_info::do_dyncast,
12688         __si_class_type_info::do_dyncast,
12689         __vmi_class_type_info::do_dyncast): Likewise.
12690         (__class_type_info::do_upcast,
12691         __si_class_type_info::do_upcast,
12692         __vmi_class_type_info::do_upcast): Likewise.
12693         (__dynamic_cast): Adjust.
12694         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
12695         (__function_type_info::is_function_p): Likewise.
12696         (__pointer_type_info::do_catch): Likewise. Adjust.
12697         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
12698         (__throw_type_match_rtti_2): Adjust.
12699         (__is_pointer): Adjust.
12700
12701 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
12702
12703         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
12704         (complete_ctor_identifier): New macro.
12705         (special_function_kind): Add sfk_copy_constructor and
12706         sfk_assignment_operator.
12707         (LOOKUP_HAS_IN_CHARGE): Remove.
12708         (cons_up_default_function): Rename to ...
12709         (implicitly_declare_fn): ... this.
12710         * call.c (build_new_method_call): Add in-charge parameters for
12711         constructors here.
12712         * class.c (add_implicitly_declared_members): Change parameter name
12713         from cant_have_assignment to cant_have_const_assignment.
12714         Replace calls to cons_up_default_function to implicitly_declare_fn.
12715         * cvt.c (ocp_convert): Use complete_ctor_identifier.
12716         * decl.c (initialize_predefined_identifiers): Initialize it.
12717         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
12718         complex expression.
12719         * init.c (expand_default_init): Don't calculate the in-charge
12720         parameter here.
12721         (build_new_1): Likewise.
12722         * lex.c (cons_up_default_function): Move to method.c.
12723         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
12724         (implicitly_declare_fn): New function.
12725         * typeck.c (build_static_cast): Use complete_ctor_identifier.
12726         (build_modify_expr): Likewise.
12727         * typeck2.c (build_functional_cast): Likewise.
12728
12729         Under the new ABI, constructors don't return `this'.
12730         * cp-tree.h (warn_reorder): Declare.
12731         (special_function_kind): New enum.
12732         (global_base_init_list): Remove declaration.
12733         (emit_base_init): Don't return a value.
12734         (check_base_init): Don't declare.
12735         (is_aggr_typedef): Likewise.
12736         * decl.c (check_special_function_return_type): New function.
12737         (return_types): Remove.
12738         (grokdeclarator): Use check_special_function_return_type.
12739         (start_function): Don't initialize ctor_label under the new ABI.
12740         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
12741         * init.c (begin_init_stmts): Move to top of file.
12742         (finish_init_stmts): Likewise.
12743         (warn_reorder): Don't declare.
12744         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
12745         value.
12746         (check_base_init): Remove.
12747         (is_aggr_typedef): Likewise.
12748         (build_new_1): Don't use the return value of a constructor.
12749         * semantics.c (setup_vtbl_ptr): Don't use the return value
12750         of emit_base_init.
12751         * typeck.c (check_return_expr): Don't magically convert return
12752         statements into `return this' in constructors under the new ABI.
12753
12754         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
12755         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
12756         (base_ctor_identifier): New macro.
12757         (base_dtor_identifier): Likewise.
12758         (deleting_dtor_identifier): Likewise.
12759         * decl.c: Don't include obstack.h.
12760         (obstack_chunk_alloc): Don't define.
12761         (obstack_chunk_free): Likewise.
12762         (struct predefined_identifier): New type.
12763         (initialize_predefined_identifiers): New function.
12764         (init_decl_processing): Use it.
12765         (debug_temp_inits): Remove.
12766         (start_method): Don't call preserve_data.
12767         (hack_incomplete_structures): Update comment.
12768         * init.c (init_init_processing): Don't initialize
12769         nelts_identifier.
12770         (build_offset_rf): Remove dead code.
12771         (build_delete): Use CLASSTYPE_N_BASECLASSES.
12772         * search.c (init_search_processing): Don't initialize
12773         vptr_identifier.
12774
12775 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12776
12777         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
12778         some sign_compare warnings.
12779
12780 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
12781
12782         Rename abi::__vmi_class_type_info members.
12783         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
12784         base_list, detail_masks members to vmi_flags, vmi_base_count,
12785         vmi_bases and vmi_flags_masks respectively.
12786         (__vmi_class_type_info::vmi_flags_masks): Rename
12787         details_unknown_mask to flags_unknown_mask.
12788         * tinfo.cc (__class_type_info::do_upcast): Adjust.
12789         (__vmi_class_type_info::do_find_public_src): Adjust.
12790         (__vmi_class_type_info::do_dyncast): Adjust.
12791         (__vmi_class_type_info::do_upcast): Adjust.
12792
12793 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
12794
12795         * tinfo.cc (convert_to_base): New function.
12796         (get_vbase_offset): Remove. Move into convert_to_base.
12797         (__vmi_class_type_info::do_find_public_src): Adjust.
12798         (__vmi_class_type_info::do_dyncast): Adjust.
12799         (__vmi_class_type_info::do_upcast): Adjust.
12800
12801 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
12802
12803         * tinfo.cc (operator=): Use __builtin_strcmp.
12804         * tinfo2.cc (before): Likewise.
12805
12806 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
12807
12808         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
12809         (DECL_SAVED_INLINE): Rename to ...
12810         (DECL_DEFERRED_FN): ... this.
12811         (in_function_p): Remove declaration.
12812         (mark_inline_for_output): Rename to ...
12813         (defer_fn): ... this.
12814         * decl.c (finish_function): Adjust call to mark_inline_for_output.
12815         (in_function_p): Remove definition.
12816         * decl2.c (saved_inlines): Rename to ...
12817         (deferred_fns): ... this.
12818         (saved_inlines_used): Rename to ...
12819         (deferred_fns_used): ... this.
12820         (mark_inline_for_output): Rename to ...
12821         (defer_fn): ... this.
12822         (finish_file): Adjust accordingly.
12823         (init_decl2): Likewise.
12824         * lex.c (cons_up_default_function): Likewise.
12825         * pt.c (mark_decl_instantiated): Likewise.
12826         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
12827         circumstances.
12828         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
12829         * semantics.c (expand_body): Defer more functions.
12830
12831 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
12832
12833         * vec.cc: New file.
12834         * Make-lang.in (CXX_LIB2FUNCS): Add it.
12835         (vec.o): Build it.
12836         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
12837         __cxa_vec_delete): Declare.
12838
12839 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
12840
12841         * rtti.c (dfs_class_hint_mark): New static function.
12842         (dfs_class_hint_unmark): New static function.
12843         (class_hint_flags): Use them.
12844
12845 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
12846
12847         * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
12848
12849 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
12850
12851         * cp-tree.h (instantiate_decl): Change prototype.
12852         * decl2.c (mark_used): Adjust call.
12853         * optimize.c (inlinable_function_p): Adjust handling of templates.
12854         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
12855         (do_type_instantiation): Likewise.
12856         (instantiate_decl): Defer more templates.
12857         (instantiate_pending_templates): Adjust logic to handle inline
12858         friend functions.
12859
12860         * Makefile.in (GGC_H): New variable.  Use it throughout in place
12861         of ggc.h.
12862
12863         * call.c: Don't include obstack.h.  Include ggc.h.
12864         (obstack_chunk_alloc): Don't define.
12865         (obstack_chunk_free): Likewise.
12866         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
12867         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
12868         (pop_switch): Free it.
12869
12870         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
12871
12872         * dump.c (dequeue_and_dump): Don't try to print the bit_position
12873         if we don't have a DECL_FIELD_OFFSET.
12874
12875 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
12876
12877         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
12878         special_function_p.
12879
12880 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12881
12882         * cfns.gperf (hash, libc_name_p): Prototype.
12883
12884         * rtti.c (build_dynamic_cast_1): Constification.
12885
12886         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
12887
12888         * semantics.c (deferred_type_access_control): Prototype.
12889
12890 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
12891
12892         Correct many new ABI issues regarding vbase and vcall offset
12893         layout.
12894         * cp-tree.h (BINFO_VTABLE): Document.
12895         (struct lang_type): Tweak formatting.
12896         (BINFO_PRIMARY_BINFO): Add to documentation.
12897         (CLASSTYPE_VSIZE): Fix typo in comment.
12898         (CLASSTYPE_VBASECLASSES): Update documentation.
12899         (BINFO_VBASE_MARKED): Remove.
12900         (SET_BINFO_VBASE_MARKED): Likewise.
12901         (CLEAR_BINFO_VBASE_MARKED): Likewise.
12902         (BINFO_FIELDS_MARKED): Remove.
12903         (SET_BINFO_FIELDS_MARKED): Likewise.
12904         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
12905         (enum access_kind): New enumeration.
12906         (num_extra_vtbl_entries): Remove declaration.
12907         (size_extra_vtbl_entries): Likewise.
12908         (get_vtbl_decl_for_binfo): New function.
12909         (dfs_vbase_unmark): Remove declaration.
12910         (mark_primary_bases): Likewise.
12911         * class.c (SAME_FN): Remove.
12912         (struct vcall_offset_data_s): Move definition.
12913         (build_vbase_pointer): Use `build', not `build_binary_op', to
12914         access the vbase pointer under the new ABI.
12915         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
12916         (build_primary_vtable): Likewise.
12917         (dfs_mark_primary_bases): Move here from search.c.
12918         (mark_primary_bases): Likewise.
12919         (determine_primary_bases): Under the new ABI, don't make a base
12920         class a primary base just because we don't yet have any virtual
12921         functions.
12922         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
12923         (num_vfun_entries): Remove.
12924         (dfs_count_virtuals): Likewise.
12925         (num_extra_vtbl_entries): Likewise.
12926         (size_extra_vtbl_entries): Likewise.
12927         (layout_virtual_bases): Iterate in inheritance graph order under
12928         the new ABI.
12929         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
12930         indicate that a vfield is present.
12931         (init_class_processing): Initialize access_public_node, etc., from
12932         ak_public, etc.
12933         (get_vtbl_decl_for_binfo): New function.
12934         (dump_class_hierarchy_r): Likewise.
12935         (dump_class_hierarchy): Use it.
12936         (finish_vtbls): Build the vtbls in inheritance graph order.
12937         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
12938         (initialize_vtable): Use get_vtbl_decl_for_binfo.
12939         (accumulate_vtbl_inits): Add comments explaining why a pre-order
12940         walk is required.
12941         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
12942         where the vptr points, even for primary vtables.
12943         (build_vtbl_initializer): Adjust handling of vbase and vcall
12944         offsets.
12945         (build_vcall_and_vbase_vtable_entries): New function.
12946         (dfs_build_vbase_offset_vtbl_entries): Remove.
12947         (build_vbase_offset_vtbl_entries): Reimplement.
12948         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
12949         were already handled in a primary base class vtable.
12950         (build_vcall_offset_vtbl_entries): Adjust.
12951         (build_rtti_vtbl_entries): Adjust.
12952         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
12953         * init.c (expand_virtual_init): Simplify.
12954         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
12955         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
12956         * search.c (BINFO_ACCESS): New macro.
12957         (SET_BINFO_ACCESS): Likewise.
12958         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
12959         (access_in_type): Likewise.
12960         (dfs_accessible_p): Likewise.
12961         (protected_accessible_p): Likewise.
12962         (lookup_fnfields_1): Adjust documentation.
12963         (dfs_mark_primary_bases): Move to class.c
12964         (mark_primary_bases): Likewise.
12965         (dfs_vbase_unmark): Remove.
12966         (virtual_context): Use BINFO_FOR_VBASE.
12967         (dfs_get_vbase_types): Simplify.
12968         (dfs_build_inheritance_graph_order): New function.
12969         (get_vbase_types): Use it.
12970         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
12971
12972         * tinfo.cc (get_vbase_offset): New function.
12973         (__vmi_class_type_info::do_find_public_src): Use it.
12974         (__vmi_class_type_info::do_dyncast): Likewise.
12975         (__vmi_class_type_info::do_upcast): Likewise.
12976
12977 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
12978
12979         * lang-specs.h: Pass -fno-show-column to the preprocessor.
12980
12981 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
12982
12983         * rtti.c (class_hint_flags): Rename flags.
12984         (class_initializer): Remove flags.
12985         (synthesize_tinfo_var): Combine offset and flags. Add flags
12986         for __vmi_class_type_info.
12987         (create_tinfo_types): Remove flags from __class_type_info and
12988         __si_class_type_info. Merge flags and offset from
12989         base_class_type_info.
12990         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
12991         (__base_class_info::is_virtual_p): Adjust.
12992         (__base_class_info::is_public_p): Adjust.
12993         (__base_class_info::offset): New accessor.
12994         (__class_type_info::details): Remove member.
12995         (__class_type_info::__class_type_info): Lose details.
12996         (__class_type_info::detail_masks): Remove.
12997         (__si_class_type_info::__si_class_type_info): Lose details.
12998         (__vmi_class_type_info::details): New member.
12999         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
13000         (__vmi_class_type_info::detail_masks): New member.
13001         * tinfo.cc (__class_type_info::do_upcast): Initialize result
13002         with unknown_details_mask.
13003         (__vmi_class_type_info::do_find_public_src): Adjust
13004         (__vmi_class_type_info::do_dyncast): Adjust.
13005         (__vmi_class_type_info::do_upcast): Set result details, if
13006         needed. Adjust.
13007         (__dynamic_cast): Temporarily #if out optimization.
13008
13009 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
13010
13011         * rtti.c (get_tinfo_decl): Mark used.
13012         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
13013         mark as dealt with, if we output it.
13014
13015 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
13016
13017         * class.c: Reorganize to put virtual function table initialization
13018         machinery at the end of the file.
13019
13020 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
13021
13022         * class.c (finish_struct): Use bitsize_zero_node.
13023         * pt.c (instantiate_class_template): Likewise.
13024
13025 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
13026
13027         Put RTTI entries at negative offsets in new ABI.
13028         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
13029         vbase offset at index -3, not -1.
13030         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
13031         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
13032         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
13033         (build_rtti_vtbl_entries): New function.
13034         (set_rtti_entry): Remove.
13035         (build_primary_vtable): Don't use it.
13036         (build_secondary_vtable): Likewise.
13037         (start_vtable): Remove.
13038         (first_vfun_index): New function.
13039         (set_vindex): Likewise.
13040         (add_virtual_function): Don't call start_vtable.  Do call
13041         set_vindex.
13042         (set_primary_base): Rename parameter.
13043         (determine_primary_base): Likewise.
13044         (num_vfun_entries): Don't use skip_rtti_stuff.
13045         (num_extra_vtbl_entries): Include RTTI information.
13046         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
13047         (skip_rtti_stuff): Remove.
13048         (dfs_modify_vtables): Don't use it.
13049         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
13050         (layout_nonempty_base_or_field): Update size handling.
13051         (create_vtable_ptr): Tweak.
13052         (layout_class_type): Adjust parameter names.
13053         (finish_struct_1): Simplify.
13054         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
13055         (skip_rtti_stuff): Remove.
13056         (first_vfun_index): New function.
13057         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
13058         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
13059         (marked_vtable_pathp): Declare.
13060         (unmarked_vtable_pathp): Likewise.
13061         * error.c (dump_expr): Use first_vfun_index to calculate vtable
13062         offsets.
13063         * rtti.c (build_headof): Look for RTTI at negative offsets.
13064         (get_tinfo_decl_dynamic): Likewise.
13065         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
13066         here.
13067         (create_pseudo_type_info): Do it here instead.  Adjust so that
13068         vptr points at first virtual function.
13069         * search.c (marked_vtable_pathp): Make it global.
13070         (unmarked_vtable_pathp): Likewise.
13071         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
13072         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
13073         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
13074         (get_pure_virtuals): Likewise.
13075         (expand_upcast_fixups): Likewise.
13076         * tree.c (debug_binfo): Likewise.
13077         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
13078         negative offset.
13079
13080 Sun Mar 26 20:15:26 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13081
13082         * class.c (check_field_decl): Fix typo.
13083         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
13084         (check_methods): Likewise.
13085         (check_field_decls): Likewise.
13086         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
13087         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
13088         Use DECL_RESULT_FLD, not DECL_RESULT.
13089         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
13090         * lex.c (identifier_type): Likewise.
13091         * pt.c (determine_specialization, lookup_template_class): Likewise.
13092         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
13093         (resolve_overloaded_unification, more_specialized): Likewise.
13094         * semantics.c (finish_member_declaration): Likewise.
13095         * typeck.c (build_x_function_call): Likewise.
13096
13097 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
13098
13099         * class.c (layout_empty_base): Handle empty bases with non-byte
13100         alignment.
13101         (build_base_field): Likewise.
13102         (layout_virtual_bases): Likewise.
13103
13104         * class.c (finish_struct_1): Fix typo in this change:
13105
13106         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13107
13108 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
13109
13110         * decl.c (grokdeclarator): Count partial specializations when
13111         keeping track of how many template classes have been seen.
13112
13113         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
13114
13115 Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13116
13117         * class.c (build_vbase_pointer_fields): layout_field now place_field.
13118         (get_vfield_offset): Use byte_position.
13119         (set_rtti_entry): Set OFFSET to ssizetype zero.
13120         (get_binfo_offset_as_int): Deleted.
13121         (dfs_record_base_offsets): Use tree_low_cst.
13122         (dfs_search_base_offsets): Likewise.
13123         (layout_nonempty_base_or_field): Reflect changes in RLI format
13124         and call byte_position.
13125         (layout_empty_base): Convert offset to ssizetype.
13126         (build_base_field): use rli_size_unit_so_far.
13127         (dfs_propagate_binfo_offsets): Do computation in proper type.
13128         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
13129         (layout_class_type): Reflect changes in RLI names and fields.
13130         (finish_struct_1): Set DECL_FIELD_OFFSET.
13131         * dump.c (dequeue_and_dump): Call bit_position.
13132         * expr.c (cplus_expand_constant): Use byte_position.
13133         * rtti.c (expand_class_desc): Use bitsize_one_node.
13134         * typeck.c (build_component_addr): Use byte_position and don't
13135         special case for zero offset.
13136
13137 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
13138
13139         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
13140
13141         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
13142         tinfo object.
13143         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
13144         vtable.
13145
13146 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
13147
13148         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
13149         DECL_P macros.
13150         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
13151         make_typename_type, check_initializer, cp_finish_decl,
13152         xref_tag): Likewise.
13153         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
13154         decl_namespace, arg_assoc_template_arg, arg_assoc,
13155         validate_nonmember_using_decl, do_class_using_decl): Likewise.
13156         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
13157         args_to_string): Likewise.
13158         * friend.c (is_friend): Likewise.
13159         * lex.c (note_got_semicolon, note_list_got_semicolon,
13160         is_global): Likewise.
13161         * method.c (build_overload_nested_name, build_overload_value,
13162         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
13163         * parse.y (typename_sub, typename_sub1): Likewise.
13164         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
13165         process_partial_specialization, convert_template_argument,
13166         template_args_equal, add_pending_template, lookup_template_class,
13167         for_each_template_parm_r, maybe_fold_nontype_arg,
13168         tsubst, instantiate_template, type_unification_real, unify,
13169         instantiate_pending_templates, set_mangled_name_for_template_decl):
13170         Likewise.
13171         * repo.c (repo_get_id, repo_template_used): Likewise.
13172         * search.c (lookup_field_1): Likewise.
13173         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
13174         * xref.c (classname): Likewise.
13175
13176 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
13177
13178         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
13179         (CANONICAL_BINFO): New macro.
13180         (BINFO_NEW_VTABLE_MARKED): Use it.
13181         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
13182         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
13183         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
13184         not TREE_TYPE.
13185         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
13186         (build_secondary_vtable): Likewise.
13187         (dfs_finish_vtbls): Likewise.
13188         (dfs_accumulate_vtbl_inits): Likewise.
13189         (accumulate_vtbl_inits): New function.
13190         (finish_vtbls): Make sure that virtual bases come after
13191         non-virtual bases in the vtable group.
13192         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
13193         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
13194         * search.c (struct vbase_info): Move definition.
13195         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
13196         (unmarked_new_vtable_p): Likewise.
13197         (dfs_mark_vtable_path): Remove.
13198         (dfs_mark_new_vtable): Remove.
13199         (dfs_unmark_new_vtable): Likewise.
13200         (dfs_clear_search_slot): Likewise.
13201         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
13202         (dfs_clear_vbase_slots): Likewise.
13203         (init_vbase_pointers): LIkewise.
13204
13205 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
13206
13207         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
13208         SIZETYPE to a non-SIZETYPE.
13209
13210 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
13211
13212         * class.c (layout_virtual_bases): Adjust names in conditionally
13213         compiled code.
13214
13215         * class.c (record_base_offsets): New function.
13216         (layout_conflict_p): Likewise.
13217         (layout_nonempty_base_or_field): Use it.
13218         (layout_empty_base): New function.
13219         (build_base_field): Use it.
13220         (build_base_fields): Update comment.
13221         (layout_virtual_bases): Fold in a little code form
13222         layout_basetypes.  Use layout_empty_base.
13223         (layout_basetypes): Remove.
13224         (end_of_class): New function.
13225         (layout_class_type): Use it.  Adjust.
13226
13227         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
13228         (fntype_p): Remove.
13229         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
13230         comment.
13231         (dfs_skip_nonprimary_vbases_markedp): Likewise.
13232         * typeck.c (fntype_p): Remove.
13233
13234         * cp-tree.h (TI_SPEC_INFO): Remove.
13235         (CLASSTYPE_TI_SPEC_INFO): Likewise.
13236         * pt.c (process_partial_specialization): Likewise.
13237
13238         * class.c (build_base_field): Fix thinko in computation of binfo
13239         offsets.
13240
13241         * tree.c (mark_local_for_remap_p): Mark variables declared in
13242         TARGET_EXPRs as well.
13243
13244 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
13245
13246         * typeck.c (require_complete_type, complete_type,
13247         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
13248         build_array_ref, convert_arguments, pointer_diff,
13249         build_x_unary_op, build_unary_op, build_c_cast,
13250         build_modify_expr): Use COMPLETE_TYPE_P etc.
13251         * call.c (is_complete, convert_like_real,
13252         build_new_method_call): Likewise.
13253         * class.c (build_vbase_pointer_fields, check_bases,
13254         build_base_field, finish_struct_1, pushclass): Likewise.
13255         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
13256         * decl.c (maybe_process_template_type_declaration, pushtag,
13257         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
13258         layout_var_decl, check_initializer, cp_finish_decl,
13259         grokdeclarator, require_complete_types_for_parms,
13260         grok_op_properties, xref_tag, xref_basetypes,
13261         check_function_type): Likewise.
13262         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
13263         * friend.c (do_friend): Likewise.
13264         * init.c (build_offset_ref): Likewise.
13265         * parse.y (structsp): Likewise.
13266         * pt.c (maybe_process_partial_specialization,
13267         tsubst_friend_function, instantiate_class_template, tsubst,
13268         do_type_instantiation, instantiate_pending_templates): Likewise.
13269         * repo.c (repo_get_id): Likewise.
13270         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
13271         synthesize_tinfo_var, emit_support_tinfos): Likewise.
13272         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
13273         * semantics.c (begin_class_definition): Likewise.
13274         * tree.c (build_cplus_method_type): Likewise.
13275         * typeck2.c (digest_init, build_functional_cast,
13276         add_exception_specifier): Likewise.
13277         * parse.h, parse.c: Regenerated.
13278
13279 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
13280
13281         * inc/cxxabi.h: New header file. Define new-abi entry points.
13282         (__pointer_type_info::target): Rename member to ...
13283         (__pointer_type_info::type): ... here.
13284         (__base_class_info::type): Rename member to ...
13285         (__base_class_info::base): ... here.
13286         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
13287         * cp-tree.h (CPTI_ABI): New global tree enumeration.
13288         (abi_node): New global tree node.
13289         * decl.c (abi_node): Document.
13290         (init_decl_processing): Initialize abi_node.
13291         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
13292         (get_vmi_pseudo_type_info): Likewise.
13293         (create_tinfo_types): Likewise.
13294         (emit_support_tinfos): Likewise.
13295         * tinfo.h (cxxabi.h): Include for new-abi.
13296         Move rtti class definitions to new header file.
13297         * tinfo.cc (abi): Use the namespace.
13298         (std): Move new abi rtti classes from here ...
13299         (__cxxabiv1): ... to here.
13300         * tinfo2.cc (cxxabi.h): Include for new-abi.
13301         Move rtti class definitions to new header file.
13302         (std): Move new abi rtti classes from here ...
13303         (__cxxabiv1): ... to here.
13304         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
13305         namespace.
13306
13307 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
13308             Jason Merrill  <jason@casey.cygnus.com>
13309
13310         * method.c (build_overload_int): Use host_integerp.
13311
13312 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
13313
13314         * init.c (build_offset_ref): Handle the case of a templated member
13315         function.
13316
13317 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13318
13319         * except.c (expand_exception_blocks): Clear catch_clauses_last.
13320
13321 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
13322
13323         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
13324         * class.c (check_bitfield_decl): Turn illegal bitfields into
13325         non-bitfields.
13326         (dfs_propagate_binfo_offsets): Adjust for new size_binop
13327         semantics.
13328         (dfs_offset_for_unshared_vbases): Likewise.
13329         * cvt.c (cp_convert_to_pointer): Convert NULL to a
13330         pointer-to-member correctly under the new ABI.
13331         * expr.c (cplus_expand_constant): Don't use cp_convert when
13332         turning an offset into a pointer-to-member.
13333         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
13334         when dereferencing them under the new ABI.
13335         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
13336         of pointers-to-members under the new ABI.
13337
13338         * class.c (check_bitfield_decl): Remove restriction on really long
13339         bitfields.
13340         (layout_class_type): Implement new ABI handling of bitfields
13341         longer than their types.
13342
13343 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13344
13345         * parse.y (extdefs): Call ggc_collect.
13346         * parse.c: Regenerated.
13347
13348 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
13349
13350         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
13351         (note_name_declared_in_class): Use OVL_CURRENT to get at a
13352         potential overload.
13353
13354 Fri Mar 17 08:09:14 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13355
13356         * class.c (build_vbase_path): Use integer_zerop.
13357         (build_vtable_entry): Use tree_low_cst.
13358         (get_vfield_offset): Use bit_position.
13359         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
13360         Use tree_low_cst.
13361         (check_bitfield_decl): Set DECL_SIZE using convert.
13362         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
13363         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
13364         Use tree_low_cst.
13365         (finish_struct_1): Use bit_position.
13366         (dump_class_hierarchy): Use tree_low_cst.
13367         * cp-tree.h (min_precision): Add declaration.
13368         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
13369         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
13370         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
13371         * expr.c (cplus_expand_constant): Use bit_position.
13372         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
13373         * rtti.c (get_base_offset): Use bit_position.
13374         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
13375         host_integerp, and tree_low_cst.
13376         (pointer_int_sum): Use integer_zerop.
13377         (build_component_addr): Use bit_position.
13378
13379 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
13380
13381         * typeck.c (require_complete_type): Don't assume size_zero_node.
13382         (complete_type_or_else): Likewise.
13383
13384 2000-03-16  Steven Grady <grady@digitaldeck.com>
13385             Jason Merrill  <jason@casey.cygnus.com>
13386
13387         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
13388
13389 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
13390
13391         * decl2.c (grokfield): Bail out if type is error_mark_node.
13392
13393 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
13394
13395         * tinfo2.cc (__ptr_to_member_data): Rename to ...
13396         (__pointer_to_member_data): ... here. Adjust.
13397         * rtti.c (create_tinfo_types): Adjust.
13398
13399 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
13400
13401         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
13402         * decl.c (ref_desc_type_node): Undocument.
13403         * rtti.c (ptr_ref_initializer): Rename to ...
13404         (ptr_initializer): ... here. Adjust comments.
13405         (ptmd_initializer): Fix comment thinko.
13406         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
13407         (create_tinfo_types): Remove ref_desc_type_node init.
13408         * tinfo2.cc (__reference_type_info): Remove.
13409
13410 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
13411
13412         * decl.c (cp_finish_decl): Remove obsolete comment.
13413
13414         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
13415
13416 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
13417
13418         * cp-tree.h: Tweak documentation.
13419         * class.c (build_vbase_pointer_fields): Layout the fields, too.
13420         (avoid_overlap): Remove.
13421         (get_binfo_offset_as_int): New function.
13422         (dfs_serach_base_offsets): Likewise.
13423         (layout_nonempty_base_or_field): Likewise.
13424         (build_base_field): Layout fields here.  Avoid placing two objects
13425         of the same type at the same address, under the new ABI.
13426         (build_base_fields): Adjust accordingly.
13427         (create_vtable_ptr): Return the new field, but don't attach it to
13428         TYPE_FIELDS.
13429         (remove_base_field): Remove.
13430         (remove_base_fields): Remove.
13431         (layout_basetypes): Adjust accordingly.
13432         (layout_class_type): Call layout_field for each field, rather than
13433         just making a wholesale call to layout_type.
13434
13435 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
13436
13437         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
13438
13439 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
13440
13441         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
13442
13443         * except.c (dtor_nothrow): New fn.
13444         (do_pop_exception): Use it.  Take type parm.
13445         (push_eh_cleanup): Take type parm.
13446         (expand_start_catch_block): Pass it.
13447         (build_eh_type_type_ref): Accept null type.
13448
13449 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
13450
13451         * cp-tree.h (revert_static_member_fn): Change prototype.
13452         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
13453         (grok_op_properties): Likewise.
13454         (start_function): Likewise.
13455         (revert_static_member_fn): Simplify.
13456         * pt.c (check_explicit_specialization): Adjust call to
13457         revert_static_member_fn.
13458
13459 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
13460
13461         * cp-tree.h (scope_kind): New type.
13462         (tmpl_spec_kind): Likewise.
13463         (declare_pseudo_global_level): Remove.
13464         (pseudo_global_level_p): Rename to template_parm_scope_p.
13465         (pushlevel): Remove declaration.
13466         (begin_scope): New function.
13467         (finish_scope): Likewise.
13468         (current_tmpl_spec_kind): Likewise.
13469         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
13470         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
13471         Add template_spec_p.
13472         (toplevel_bindings_p): Adjust.
13473         (declare_pseudo_global_level): Remove.
13474         (pseudo_global_level_p): Rename to template_parm_scope_p.
13475         (current_tmpl_spec_kind): New function.
13476         (begin_scope): Likewise.
13477         (finish_scope): Likewise.
13478         (maybe_push_to_top_level): Adjust.
13479         (maybe_process_template_type_declaration): Likewise.
13480         (pushtag): Likewise.
13481         (pushdecl_nonclass_level): Likewise.
13482         (lookup_tag): Likewise.
13483         (grokfndecl): Handle member template specializations.  Share
13484         constructor and non-constructor code.
13485         * decl2.c (check_classfn): Handle member template specializations.
13486         * pt.c (begin_template_parm_list): Use begin_scope.
13487         (begin_specialization): Likewise.
13488         (end_specialization): Likewise.
13489         (check_explicit_specialization): Use current_tmpl_spec_kind.
13490         Handle member template specializations.
13491         (end_template_decl): Use finish_scope.  Remove call to
13492         get_pending_sizes.
13493         (push_template_decl_real): Remove bogus error message.
13494         (tsubst_decl): Fix typo in code contained in comment.
13495         (instantiate_template): Handle member template specializations.
13496         (most_general_template): Likewise.
13497
13498 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
13499
13500         * lex.c (whitespace_cr): Compress consecutive calls to warning().
13501         (do_identifier): Ditto for error().
13502
13503         * pt.c (convert_nontype_argument): Ditto for cp_error().
13504         (convert_template_argument): Ditto for cp_pedwarn().
13505
13506 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
13507
13508         * exception.cc (__check_null_eh_spec): New fn.
13509         * except.c (expand_end_eh_spec): Call it if the spec is throw().
13510
13511 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
13512
13513         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
13514         * except.c (expand_end_eh_spec): Add the return type.
13515         * rtti.c (throw_bad_cast): Add the parmtypes.
13516         (throw_bad_typeid): Likewise.
13517
13518         * semantics.c (expand_stmt): Only leave out rtl for unused
13519         artificials, and set DECL_IGNORED_P on them as well.
13520         * decl.c (wrapup_globals_for_namespace): Likewise.
13521
13522 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
13523
13524         * decl.c (maybe_commonize_var): Skip all artificial decls.
13525         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
13526
13527 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
13528
13529         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
13530         * cp-tree.h: Declare flag_enforce_eh_specs.
13531         * decl.c (store_parm_decls, finish_function): Check it.
13532
13533         C library functions don't throw.
13534         * Makefile.in (cfns.h): New target.
13535         (except.o): Depend on it.
13536         * Make-lang.in (cc1plus): Depend on cfns.gperf.
13537         * cfns.gperf: New file.
13538         * cfns.h: Generated.
13539         * except.c: Include it.
13540         (nothrow_libfn_p): New fn.
13541         * decl.c (grokfndecl): Use it.
13542         * cp-tree.h: Declare it.
13543
13544         * decl.c (push_overloaded_decl_1, auto_function,
13545         define_function): Lose.
13546         (build_library_fn_1): New static fn.
13547         (builtin_function): Use it.
13548         (get_atexit_node): Use build_library_fn_ptr.
13549         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
13550         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
13551         push_void_library_fn, push_throw_library_fn): New fns.
13552         * cp-tree.h: Declare them.
13553         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
13554         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
13555         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
13556         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
13557         * rtti.c (build_runtime_decl): Lose.
13558         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
13559         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
13560         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
13561
13562         * call.c (build_call): Remove result_type parm.
13563         Call mark_used on unused artificial fns.
13564         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
13565
13566 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
13567
13568         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
13569         appropriate.
13570         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
13571         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
13572         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
13573         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
13574         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
13575         expand_generic_desc): Likewise.
13576
13577 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
13578
13579         * exception.cc (__cp_pop_exception): Cleanup the original object.
13580
13581 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
13582
13583         * decl.c (grok_op_properties): Merge conversion to void warning
13584         with other silly op warnings.
13585
13586 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
13587
13588         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
13589         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
13590
13591 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
13592
13593         * decl.c (cp_make_fname_decl): New function.
13594         (wrapup_globals_for_namespace): Don't emit unused static vars.
13595         (init_decl_processing): Remove comment about use of
13596         array_domain_type. Set make_fname_decl.
13597         (cp_finish_decl): Remove __FUNCTION__ nadgering.
13598         * semantics.c (begin_compound_stmt): Remove
13599         current_function_name_declared flagging.
13600         (expand_stmt): Don't emit unused local statics.
13601         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
13602         specially.
13603
13604 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
13605
13606         * typeck.c (convert_for_assignment): Don't look at array
13607         initializer.
13608         * call.c (convert_like_real): Likewise.
13609
13610 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
13611
13612         Add initial support for '\uNNNN' specifier.
13613         * lex.c (read_ucs): New fn.
13614         (readescape, skip_white_space): Call it.
13615         (is_extended_char, is_extended_char_1): New fns.
13616         (utf8_extend_token): New fn, #if 0'd out.
13617         (real_yylex): Treat extended chars like letters.
13618
13619         * search.c (note_debug_info_needed): Walk the bases even if we
13620         weren't deferring the type itself.
13621
13622 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13623
13624         * decl2.c (finish_objects): Constify a char*.
13625
13626         * method.c (emit_thunk): Likewise.
13627
13628 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
13629
13630         * typeck.c (dubious_conversion_warnings): Look through
13631         REFERENCE_TYPE.
13632
13633 Mon Mar  6 08:46:47 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13634
13635         * class.c (dfs_modify_vtables): I is now unsigned.
13636         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
13637         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
13638         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
13639         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
13640         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
13641         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
13642         Call integer_all_onesp.
13643         * typeck2.c (process_init_constructor): Use compare_tree_int.
13644
13645         * lang-specs.h (as): Don't call if -syntax-only.
13646
13647 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
13648
13649         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
13650         RTL_EXPR_HAS_NO_SCOPE after all.
13651
13652 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
13653
13654         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
13655         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
13656         RTL_EXPR_HAS_NO_SCOPE.
13657
13658         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
13659         later.
13660
13661         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
13662
13663 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
13664
13665         * call.c (convert_like): Macrofy.
13666         (convert_like_with_context): New macro.
13667         (convert_like_real): Renamed from convert_like.  Add calling
13668         context parameters, for diagnostics. Add recursive flag.  Call
13669         dubious_conversion_warnings for outer conversion.
13670         (build_user_type_conversion): Use convert_like_with_context.
13671         (build_over_call): Likewise. Don't warn about dubious
13672         conversions here. Adjust convert_default_arg calls.
13673         (convert_default_arg): Add context parameters for diagnostics.
13674         Pass through to convert_like_with_context.
13675         * cp-tree.h (convert_default_arg): Add context parameters.
13676         (dubious_conversion_warnings): Prototype new function.
13677         * typeck.c (convert_arguments): Adjust convert_default_arg call.
13678         (dubious_conversion_warnings): New function, broken
13679         out of convert_for_assignment.
13680         (convert_for_assignment): Adjust.
13681
13682 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
13683
13684         * decl2.c (key_method): Break out from...
13685         (import_export_vtable, import_export_class): ...here.
13686
13687         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
13688         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
13689
13690         * search.c (note_debug_info_needed, dfs_debug_mark,
13691         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
13692         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
13693
13694 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
13695
13696         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
13697         typos.
13698
13699 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
13700
13701         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
13702         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
13703         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
13704         (lang_type): Split gets_new into has_new and has_array_new.
13705         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
13706         (TYPE_GETS_NEW): Split into ...
13707         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
13708         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
13709         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
13710         (build_op_new_call): Don't declare.
13711         (build_new_1): Likewise.
13712         * call.c (build_op_new_call): Remove.
13713         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
13714         instead of TYPE_NEEDS_DESTRUCTOR.
13715         (finish_struct_bits): Likewise.
13716         (add_implicitly_declared_members): Likewise.
13717         (check_field_decl): Likewise.
13718         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
13719         correctly under the new ABI.
13720         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
13721         instead of TYPE_NEEDS_DESTRUCTOR.
13722         (initialize_local_var): Likewise.
13723         (destroy_local_var): Likewise.
13724         (cp_finish_decl): Likewise.
13725         (register_dtor_fn): Likewise.
13726         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
13727         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
13728         TYPE_VEC_DELETE_TAKES_SIZE here.
13729         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
13730         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
13731         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
13732         (finish_destructor_body): Likewise.
13733         (maybe_build_cleanup_1): Likewise.
13734         * decl2.c (do_static_destruction): Likewise.
13735         * init.c (build_new_1): Make it static.
13736         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
13737         (expand_cleanup_for_base): Likewise.
13738         (get_cookie_size): New function.
13739         (build_new_1): Handle array-new cookies correctly under the new
13740         ABI.
13741         (build_vec_delete_1): Likewise.
13742         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
13743         (build_delete): Likewise.
13744         (build_vec_delete): Handle array-new cookies correctly under the new
13745         ABI.
13746         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
13747         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
13748         TYPE_HAS_ARRAY_NEW_OPERATOR.
13749         * ptree.c (print_lang_type): Check them.
13750         * search.c (context_for_name_lookup): Fix typo in comment.
13751         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
13752         * tree.c (break_out_cleanups): Likewise.
13753         (build_cplus_array_test_1): Likewise.
13754         (cp_build_qualified_type_real): Likewise.
13755         * typeck.c (complete_type): Likewise.
13756
13757         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
13758         the command-line, not the end.
13759
13760 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
13761
13762         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
13763
13764 2000-03-02  Tom Tromey  <tromey@cygnus.com>
13765
13766         * cp-tree.h (build_java_class_ref): Declare.
13767         * init.c (build_java_class_ref): No longer static.
13768         * except.c (expand_throw): Generate a Java-style `throw' if the
13769         thrown object is a "Java" object.
13770         (initialize_handler_parm): Generate a Java-style lookup of
13771         exception info if the caught object is a "Java" object.
13772         (catch_language, catch_language_init): New globals.
13773         (decl_is_java_type): New function.
13774         (expand_start_catch_block): Don't call push_eh_info() or
13775         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
13776         class reference to build_catch_block.
13777
13778 Thu Mar  2 13:32:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13779
13780         * typeck.c (comptypes): Treat sizetype like its language equivalent.
13781
13782 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
13783
13784         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
13785         to merge reference/pointer code and fix incorrect warnings.
13786
13787 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
13788
13789         * search.c (protected_accessible_p): Use context_for_name_lookup.
13790
13791         * init.c (construct_virtual_bases): Fix thinko.
13792         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
13793
13794 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
13795
13796         * decl.c (current_function_decl): Move to toplev.c.
13797
13798 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
13799
13800         * pt.c (fn_type_unification): Unify return type, whenever
13801         provided.
13802         (get_bindings_real): Only pass return type when necessary.
13803         Remove explicit return type check.
13804         * class.c (resolve_address_of_overloaded_function): Pass desired
13805         return type to fn_type_unification.
13806
13807 Mon Feb 28 08:15:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13808
13809         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
13810         DECL_FIELD_SIZE.
13811         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
13812         DECL_FIELD_SIZE.
13813         * rtti.c (expand_class_desc): Likewise.
13814         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
13815         (THUNK_VCALL_OFFSET): Likewise.
13816         (THUNK_DELTA): Reflect changes in ../tree.h.
13817
13818 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
13819
13820         * search.c (protected_accessible_p): Also allow the access if
13821         the member is public in DERIVED.  Lose TYPE parm.
13822         (friend_accessible_p): Lose TYPE parm.
13823         (accessible_p): Adjust.
13824
13825 Sun Feb 27 16:40:33 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13826
13827         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
13828         on things that are not sizes; ssize_binop deleted.
13829         Call size_diffop when appropriate.
13830         (dfs_build_vcall_offset_vtbl_entries): Likewise.
13831         (build_primary_vtable, build_secondary_vtable): Likewise.
13832         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
13833         Variable I is HOST_WIDE_INT.
13834         (get_vfield_offset): Pass proper types to size_binop.
13835         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
13836         (finish_struct_1): Likewise.
13837         (skip_rtti_stuff): Arg N is now pointer to signed.
13838         (layout_class_type): Use size_zero_node.
13839         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
13840         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
13841         * decl.c (complete_arry_type): Pass proper types to size_binop.
13842         (xref_basetypes): BINFO_OFFSET is sizetype.
13843         * error.c (dump_expr): Don't use size_binop non-sizes.
13844         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
13845         * init.c (construct_virtual_bases): Fix type error.
13846         (build_vec_delete_1): Pass proper type to size_binop and don't
13847         fold result.
13848         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
13849         * rtti.c (get_base_offset): Pass proper type to size_binop.
13850         * search.c (dfs_find_vbases): Fix type error.
13851         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
13852         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
13853         * tree.c (debug_binfo): Variable N is signed.
13854         Use HOST_WIDE_INT_PRINT_DEC.
13855         * typeck.c (comptypes): sizetype is same as equivalent integer type.
13856         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
13857         size_one_node and size_zero_node.
13858         (c_alignof): Use size_one_node.
13859         (build_component_addr): Pass proper types to size_binop.
13860         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
13861
13862 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
13863
13864         Implement class scope using-declarations for functions.
13865         * class.c (handle_using_decl): Call add_method for used functions.
13866         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
13867         (add_method): Used functions are hidden by local functions.
13868         (check_bases_and_members): Handle using-decls before finalizing
13869         CLASSTYPE_METHOD_VEC.
13870         * call.c (add_function_candidate): Add ctype parm; if nonzero,
13871         override the type of 'this' accordingly.
13872         (add_template_candidate, add_template_candidate_real): Add ctype parm.
13873         (convert_class_to_reference, build_user_type_conversion_1,
13874         build_new_function_call, build_object_call, build_new_op,
13875         build_new_method_call): Pass ctype parm.
13876
13877         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
13878         the baselink.
13879         * call.c (convert_class_to_reference, build_user_type_conversion_1,
13880         build_new_function_call, build_object_call, build_new_op,
13881         build_new_method_call, build_op_delete_call): Don't get basetype_path
13882         from a baselink.
13883         * typeck.c (build_component_ref): Likewise.
13884         * init.c (build_offset_ref): Likewise.
13885         (resolve_offset_ref): Don't call enforce_access.
13886         Call build_scoped_ref.
13887         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
13888         would cause an error or if -pedantic.
13889         * class.c (alter_access): Lose binfo parm.
13890
13891 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
13892
13893         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
13894         types.
13895
13896 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
13897
13898         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
13899         pseudo_type_info creation into the std namespace
13900
13901 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
13902
13903         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
13904         (import_export_class): Remove declaration.
13905         * decl2.c (import_export_class): Make it static.
13906         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
13907         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
13908         EXPR_WITH_FILE_LOCATION.
13909         * lex.c (check_newline): Tweak filename/lineno setting.
13910         * semantics.c (begin_while_stmt): Fix typo in comment.
13911
13912 Sat Feb 26 19:50:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13913
13914         * lang-options.h (-fmessage-length=): Add missing option.
13915
13916         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
13917
13918 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
13919
13920         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
13921
13922 Fri Feb 25 14:52:33 2000  Jim Wilson  <wilson@cygnus.com>
13923
13924         * optimize.c (expand_call_inline): Emit the return label before
13925         evaluating the return value.
13926
13927 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
13928
13929         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
13930         than duplicating functionality here.
13931         * optimize.c: Include input.h.
13932         (expand_call_inline): Use push_srcloc and pop_srcloc.
13933         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
13934         * parse.c: Regenerated.
13935         * Makefile.in (lex.o): Depend on input.h.
13936         (optimize.o): Likewise.
13937
13938 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
13939
13940         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
13941         function type, rather than ICE.
13942
13943 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
13944
13945         * decl.c (grokdeclarator): Call decl_type_access_control.
13946         * parse.y (parse_end_decl): Don't call decl_type_access_control if
13947         decl is null.
13948
13949 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
13950
13951         * decl.c (decls_match): Remove obsolete static member nadgering.
13952
13953 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13954
13955         * decl.c (grokdeclarator): Change ANSI to ISO.
13956         * lex.c (consume_string, readescape, do_identifier): Likewise.
13957         (parse_float, real_yylex): Likewise.
13958         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
13959         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
13960         new_type_id, maybe_label_decls, simple_stmt,
13961         for.init.statement): Likewise.
13962         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
13963         * semantics.c (finish_named_return_value): Likewise.
13964         * parse.c: Regenerate.
13965
13966 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
13967
13968         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
13969         (CPTI_CLASS_STAR_TYPE): Remove.
13970         (vtable_index_type): Likewise.
13971         (class_star_type_node): Remove.
13972         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
13973         (build_binary_op_nodefault): Remove.
13974         * call.c (build_new_op): Use build_binary_op instead of
13975         build_binary_op_nodefault.
13976         * decl.c (init_decl_processing): Remove class_star_type_node
13977         initialization.  Make delta_type_node ptrdiff_type_node under the
13978         new ABI.  Initialize vtable_index_type.
13979         (build_ptrmemfunc_type): Build different structures for the new
13980         ABI.
13981         (build_enumerator): Use build_binary_op instead of
13982         build_binary_op_nodefault.
13983         * method.c (build_overload_value): Mangle pointers-to-members
13984         appropriately under the new ABI.
13985         * typeck.c (build_array_ref): Use build_binary_op instead of
13986         build_binary_op_nodefault.
13987         (get_member_function_from_ptrfunc): Adjust for the new ABI.
13988         (build_binary_op_nodefault): Rename to ...
13989         (build_binary_op): ... this.  Remove old version.  Adjust for
13990         pointer-to-member comparisons under the new ABI.
13991         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
13992         (build_ptrmemfunc): Adjust for the new ABI.
13993         (expand_ptrmemfunc_cst): Likewise.
13994         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
13995         (pfn_from_ptrmemfunc): Adjust for the new ABI.
13996
13997 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
13998
13999         * call.c (build_object_call): Compress consecutive calls to
14000         cp_error.
14001         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
14002         (build_op_delete_call): Adjust message formatting.
14003
14004         * class.c (check_bases): Compress consecutive calls to
14005         cp_pedwarn.
14006         (finish_struct_anon): Say 'ISO C++'.
14007
14008         * decl.c (start_decl): Same here.
14009         (grok_reference_init): Likewise.
14010         (grokfndecl): Correct message formatting.
14011         (grokfndecl): Improve diagnostic.
14012         (check_static_variable_definition): Likewise. Say 'ISO C++'
14013         (compute_array_index_type): Say 'ISO C++'
14014         (create_array_type_for_decl): Compress consecutive calls to
14015         cp_error.
14016         (grokdeclarator): Say 'ISO C++'
14017         (grok_op_properties): Likewise.
14018
14019         * decl2.c (delete_sanity): Clairify diagnostic.
14020         (check_member_template): Same here.
14021         (grok_function_init): Use consistent terminology.
14022
14023         * expr.c (do_case): Say 'ISO C++'
14024
14025         * friend.c (do_friend): Compress consecutive calls to warning.
14026
14027 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
14028
14029         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
14030         * class.c (build_secondary_vtable): Reorganize.  Don't create a
14031         new vtable under the new ABI.
14032         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
14033         computing the size.
14034         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
14035         the initializing elements.
14036         (initialize_vtable): New function.
14037         (dfs_finish_vtbls): Use it.
14038         (dfs_accumulate_vtbl_inits): New function.
14039         (finish_vtbls): Merge primary and secondary vtables under the new
14040         ABI.
14041         (finish_struct_1): Remove redundant call to layout_vtable_decl.
14042         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
14043         aren't VAR_DECLs.
14044
14045         * class.c (build_vtable): New function, split out from ...
14046         (get_vtable_decl): ... here, and ...
14047         (build_secondary_vtable): ... here.
14048
14049         * pt.c (tsubst_decl): Fix formatting.
14050
14051 Sat Feb 19 18:43:13 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14052
14053         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
14054         (avoid_overlap, build_base_field): Likewise.
14055         (build_base_field, build_base_fields, is_empty_class):
14056         Test DECL_SIZE with integer_zero.
14057         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
14058         * cp-tree.h (struct lang_type): New field size_unit.
14059         (CLASSTYPE_SIZE_UNIT): New macro.
14060         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
14061         (cp_finish_decl): Delete -Wlarger-than processing.
14062         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
14063         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
14064         * tree.c (make_binfo): binfo vector is one entry longer.
14065         (walk_tree): Walk DECL_SIZE_UNIT.
14066
14067 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
14068
14069         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
14070         comment.
14071         (build_vtable_entry): Don't assume all vtable entries are
14072         functions.
14073         (build_vtbl_initializer): Adjust accordingly.
14074         (get_vtable_decl): Fix formatting.
14075
14076 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
14077
14078         * semantics.c (deferred_type_access_control): Walk the entire
14079         type_lookups list.
14080         (save_type_access_control): Rename from
14081         initial_deferred_type_access_control.  Just remember the value.
14082         (decl_type_access_control): New fn.
14083         (begin_function_definition): Use deferred_type_access_control, after
14084         we've started the function.  Set type_lookups to error_mark_node.
14085         * parse.y (frob_specs, fn.def1): Adjust.
14086         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
14087         (parse_end_decl, parse_bitfield0, parse_method): New fns.
14088         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
14089         (after_type_component_declarator0): Likewise.
14090         (after_type_component_declarator): Likewise.
14091         (notype_component_declarator): Likewise.
14092         * cp-tree.h: Adjust.
14093
14094         * decl.c (redeclaration_error_message): Allow redeclaration of
14095         namespace-scope decls.
14096
14097 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
14098
14099         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
14100
14101 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
14102
14103         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
14104         * decl2.c (grokclassfn): Likewise.
14105
14106         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
14107
14108         * decl2.c (lang_decode_option): Don't set default message length
14109         here.
14110         * lex.c (lang_init_options): Set it here.
14111
14112 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
14113
14114         Make DECL_CONTEXT mean the class in which a member function was
14115         declared, even for a virtual function.
14116         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
14117         (DECL_FRIEND_CONTEXT): New macro.
14118         (DECL_REAL_CONTEXT): Remove.
14119         (SET_DECL_FRIEND_CONTEXT): Likewise.
14120         (DECL_VIRTUAL_CONTEXT): Adjust.
14121         (DECL_CLASS_SCOPE_P): Use TYPE_P.
14122         (add_friends): Remove.
14123         (hack_decl_function_context): Likewise.
14124         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
14125         CP_DECL_CONTEXT.
14126         (build_over_call): Fix indentation.  Use DECL_CONTEXT
14127         instead of DECL_CLASS_CONTEXT.
14128         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
14129         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
14130         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
14131         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
14132         (build_base_field): Likewise.
14133         (finish_struct_1): Likewise.
14134         (build_self_reference): Likewise.
14135         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
14136         DECL_REAL_CONTEXT.
14137         (pushtag): Use decl_function_context, not
14138         hack_decl_function_context.
14139         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
14140         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
14141         (pushdecl): Remove bogus code.
14142         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
14143         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
14144         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
14145         Use decl_function_context, nothack_decl_function_context.
14146         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
14147         (grokdeclarator): Likewise.  Use decl_function_context, not
14148         hack_decl_function_context.
14149         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
14150         (start_function): Use DECL_FRIEND_CONTEXT, not
14151         DECL_CLASS_CONTEXT.  Use decl_function_context, not
14152         hack_decl_function_context.
14153         (finish_function): Use decl_function_context, not
14154         hack_decl_function_context.
14155         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
14156         DECL_CLASS_CONTEXT.
14157         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
14158         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
14159         (grokfield): Likewise.
14160         (finish_builtin_type): Likewise.
14161         (finish_vtable_vardec): Use decl_function_context, not
14162         hack_decl_function_context.
14163         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
14164         (start_static_initialization_or_destruction): Likewise.
14165         (finish_static_initialization_or_destruction): Likewise.
14166         (mark_used): Adjust logic for deciding when to synthesize methods.
14167         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
14168         DECL_REAL_CONTEXT.
14169         * error.c (dump_function_decl): Use DECL_CONTEXT, not
14170         DECL_CLASS_CONTEXT.
14171         * friend.c (is_friend): Likewise.
14172         (add_friends): Remove.
14173         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
14174         * lex.c (begin_definition_of_inclass_inline): Use
14175         decl_function_context, not hack_decl_function_context.
14176         (process_next_inline): Likewise.
14177         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
14178         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
14179         DECL_CLASSS_CONTEXT.
14180         (hack_identifier): Likewise.
14181         (synthesize_method):  Use decl_function_context, not
14182         hack_decl_function_context.
14183         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
14184         DECL_REAL_CONTEXT.
14185         (is_member_template): Use decl_function_context, not
14186         hack_decl_function_context.  Use DECL_CONTEXT, not
14187         DECL_CLASS_CONTEXT.
14188         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
14189         DECL_CLASS_CONTEXT.
14190         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
14191         DECL_REAL_CONTEXT.
14192         (push_template_decl_real): Likewise.
14193         (instantiate_class_template): Don't call add_friends.
14194         (tsubst_default_argument): Use DECL_CONTEXT, not
14195         DECL_REAL_CONTEXT.
14196         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
14197         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
14198         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
14199         DECL_CLASS_CONTEXT.
14200         * repo.c (repo_inline_used): Likewise.
14201         * search.c (current_scope): Adjust for new _CONTEXT macros.
14202         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
14203         DECL_REAL_CONTEXT.
14204         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
14205         (lookup_fnfields_here):Likewise.
14206         (check_final_overrider): Likewise.
14207         (init_vbase_pointers): Likewise.
14208         (virtual_context): Likewise.
14209         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
14210         (expand_body): Use decl_function_context, not
14211         hack_decl_function_context.
14212         * tree.c (hack_decl_function_context): Remove.
14213         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
14214         DECL_CLASS_CONTEXT.
14215         * typeck2.c (error_not_base_type): Likewise.
14216
14217 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
14218
14219         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
14220
14221 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14222
14223         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
14224
14225 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
14226
14227         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
14228
14229 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
14230
14231         * decl2.c (lang_decode_option): Enable automatic line wrapping.
14232
14233 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
14234
14235         * parse.y (frob_specs): Split out...
14236         (parse_decl): From here.
14237         (fn.def2): Call initial_deferred_type_access_control.
14238         (after_type_component_declarator0): Call frob_specs.
14239         (notype_component_declarator0): Likewise.
14240         * search.c (friend_accessible_p): Nested classes are friends of their
14241         enclosing classes.
14242
14243 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
14244
14245         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
14246         used to create an implicit temporary.
14247
14248         * class.c (dfs_modify_vtables): Tweak calculation of functions to
14249         override.
14250
14251 2000-02-08  Nathan Sidwell  <nathan@acm.org>
14252
14253         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
14254         strip array element qualifiers too.
14255
14256 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
14257
14258         * decl.c (store_parm_decls): Don't build cleanups for parameters
14259         while processing_template_decl.
14260
14261 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
14262
14263         * cp-tree.h (struct saved_scope): Add incomplete field.
14264         (namespace_scope_incomplete): New macro.
14265         * decl.c (pushdecl): Use it.
14266         (hack_incomplete_structures): Use it.  See through artificial
14267         binding levels.
14268         (mark_saved_scope): Mark it.
14269
14270         Implement access control for nested types.
14271         * search.c (type_access_control): New fn.
14272         (accessible_p): Now we do perform access control for types.
14273         * semantics.c (deferred_type_access_control): New fn.
14274         (initial_deferred_type_access_control): New fn.
14275         (begin_function_definition): Call it.  Add lookups parm.
14276         * decl.c (struct binding_level): Add this_class field.
14277         (pushlevel_class): Set it.
14278         (mark_binding_level): Mark it.
14279         (lookup_name_real): Use it.  Call type_access_control.
14280         (mark_saved_scope): Mark lookups field.
14281         * cp-tree.h (flagged_type_tree): Add lookups field.
14282         (struct saved_scope): Add lookups field.
14283         (type_lookups): New macro.
14284         * parse.y (declmods): Now <ftype>.
14285         (parse_decl): Add lookups parm.  Call
14286         initial_deferred_type_access_control.
14287         (lang_extdef): Clear type_lookups.
14288         (typed_declspecs, declmods, typespec): Set lookups field.
14289         (initdcl): Call deferred_type_access_control.
14290         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
14291         component_decl_1, named_parm): Adjust.
14292         * friend.c (is_friend): Nested classes are friends of their
14293         enclosing classes.
14294
14295         * class.c (currently_open_derived_class): New fn.
14296         * method.c (hack_identifier): Use it.
14297
14298         * lex.c (do_identifier): Remove obsolete code.
14299
14300         * parse.y (typed_typespecs): Propagate new_type_flag properly.
14301
14302 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
14303
14304         * tinfo.h: Remove apostrophes from C++ comment (xgettext
14305         thinks this file is plain C).
14306
14307 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14308
14309         * Makefile.in (call.o): Depend on $(EXPR_H).
14310
14311         * call.c: Include "expr.h".
14312
14313         * class.c (dump_class_hierarchy): Add prototype.
14314
14315         * search.c (dfs_get_pure_virtuals): Likewise.
14316
14317 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
14318
14319         * parse.y (simple_stmt): Allow :: token in asm parameter list.
14320         * parse.c: Rebuilt.
14321
14322 Mon Jan 31 15:35:29 2000  Jim Wilson  <wilson@cygnus.com>
14323
14324         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
14325         Store it in DECL_FCONTEXT.
14326         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
14327
14328 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
14329
14330         * tinfo.h (old abi): #include "tconfig.h".
14331         * tinfo.cc (convert_to_base): Move into old abi section.
14332
14333 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
14334
14335         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
14336         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
14337         (BINFO_PRIMARY_BINFO): New macro.
14338         (BF_DELTA): Rename to ...
14339         (BV_DELTA): ... this.
14340         (BF_VCALL_INDEX): Rename to ...
14341         (BV_VCALL_INDEX): ... this.
14342         (BF_FN): Rename to ...
14343         (BV_FN): ... this.
14344         * class.c (build_vbase_path): Adjust for changes to reverse_path.
14345         (set_rtti_entry): Rename BF_ macros to BV_ variants.
14346         (modify_vtable_entry): Simplify.
14347         (add_virtual_function): Rename BF_ macros to BV_ variants.
14348         (build_vtable_initializer): Likewise.
14349         (get_class_offset_1): Remove.
14350         (dfs_get_class_offset): Likewise.
14351         (get_class_offset): Likewise.
14352         (dfs_find_final_overrider): New function.
14353         (find_final_overrider): Likewise.
14354         (modify_one_vtable): Remove.
14355         (dfs_find_base): New function.
14356         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
14357         find_final_overrider.
14358         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
14359         virtuals.
14360         (dfs_fixup_vtable_deltas): Remove.
14361         (override_one_vtable): Remove.
14362         (merge_overrides): Likewise.
14363         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
14364         unreal chilren of virtual bases.
14365         (finish_struct_1): Don't use merge_overrides.  Don't use
14366         dfs_fixup_vtable_deltas.
14367         * tree.c (reverse_path): Return a TREE_LIST, not a chain of
14368         BINFOs.
14369
14370 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
14371             Jason Merrill  <jason@yorick.cygnus.com>
14372
14373         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
14374
14375 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
14376
14377         * exception.cc (__throw_bad_typeid): Add missing std::.
14378
14379 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14380
14381         * cp-tree.h (make_thunk): PROTO -> PARAMS.
14382
14383 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
14384
14385         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
14386
14387         Runtime support for new-abi rtti.
14388         * inc/typeinfo (type_info::operator!=): Define in class.
14389         (type_info::before, type_info::name, type_info::operator==,
14390         type_info::operator!=): Define new ABI implementations.
14391         (type_info::is_pointer_p, type_info::is_function_p): Declare
14392         new virtual functions.
14393         (type_info::do_catch, type_info::do_upcast): Likewise.
14394
14395         * tinfo.h (__base_class_info): Define new class.
14396         (__class_type_info): Likewise.
14397         (__si_class_type_info): Likewise.
14398         (__vmi_class_type_info): Likewise.
14399         (__dynamic_cast): Prototype.
14400
14401         * tinfo.cc: Conditionalize old and new rtti mechanisms.
14402         (type_info::is_pointer_p): Define new function.
14403         (type_info::is_function_p): Likewise.
14404         (type_info::do_catch): Likewise.
14405         (type_info::do_upcast): Likewise.
14406         (vtable_prefix): New structure for vtable access.
14407         (adjust_pointer): Define new template function.
14408         (contained_p, public_p, virtual_p, contained_public_p,
14409         contained_nonpublic_p, contained_nonvirtual_p): Define new
14410         functions.
14411         (nonvirtual_base_type): New local variable.
14412         (__class_type_info::~__class_type_info): Define.
14413         (__si_class_type_info::~__si_class_type_info): Likewise.
14414         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
14415         (__class_type_info::do_catch): Define new function.
14416         (__class_type_info::do_upcast): Likewise.
14417         (__class_type_info::find_public_src): Likewise.
14418         (__class_type_info::do_find_public_src): Likewise.
14419         (__si_class_type_info::do_find_public_src): Likewise.
14420         (__vmi_class_type_info::do_find_public_src): Likewise.
14421         (__class_type_info::do_dyncast): Likewise.
14422         (__si_class_type_info::do_dyncast): Likewise.
14423         (__vmi_class_type_info::do_dyncast): Likewise.
14424         (__class_type_info::do_upcast): Likewise.
14425         (__si_class_type_info::do_upcast): Likewise.
14426         (__vmi_class_type_info::do_upcast): Likewise.
14427         (__dynamic_cast): Likewise.
14428
14429         * tinfo2.cc (__fundamental_type_info): Define new class.
14430         (__pointer_type_info): Likewise.
14431         (__reference_type_info): Likewise.
14432         (__array_type_info): Likewise.
14433         (__function_type_info): Likewise.
14434         (__enum_type_info): Likewise.
14435         (__ptr_to_member_type_info): Likewise.
14436         (__fundamental_type_info::~__fundamental_type_info): Define.
14437         (__pointer_type_info::~__pointer_type_info): Likewise.
14438         (__reference_type_info::~__reference_type_info): Likewise.
14439         (__array_type_info::~__array_type_info): Likewise.
14440         (__function_type_info::~__function_type_info): Likewise.
14441         (__enum_type_info::~__enum_type_info): Likewise.
14442         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
14443         (__pointer_type_info::do_catch): Define new function.
14444         (__ptr_to_member_type_info::do_catch): Define new function.
14445
14446         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
14447         (__is_pointer): Likewise.
14448
14449         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
14450
14451 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
14452
14453         * cp/class.c (build_vtable): Rename to build_primary_vtable.
14454         (prepare_fresh_vtable): Rename to build_secondary_vtable.
14455         (make_new_vtable): New function.
14456         (modify_vtable_entry): Handle generation of new vtables correctly.
14457         (modify_one_vtable): Remove unused parameter.
14458         (dfs_fixup_vtable_deltas): Likewise.
14459         (override_one_vtable): Use build_secondary_vtable.
14460         (finish_struct_1): Use build_primary_vtable and
14461         build_secondary_vtable.
14462
14463 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
14464
14465         * cp/decl.c: Adjust variable names, comments, help strings.
14466
14467 2000-01-29  Nathan Sidwell  <nathan@acm.org>
14468
14469         * new2.cc (operator delete[]): Use operator delete, don't assume
14470         implementation.
14471
14472 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
14473
14474         * class.c (build_vtbl_initializer): Add argument to
14475         build_vtable_entry call.
14476
14477 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
14478
14479         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
14480         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
14481         (BF_DELTA): New macro.
14482         (BF_VCALL_INDEX): Likewise.
14483         (BF_FN): Likewise.
14484         (THUNK_VCALL_OFFSET): Likewise.
14485         (make_thunk): Change prototype.
14486         * class.c (build_vtable_entry): Integrate
14487         build_vtable_entry_for_fn.  Handle vcall indices.
14488         (build_vtable_entry_for_fn): Remove.
14489         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
14490         BF_VCALL_INDEX, BF_FN.
14491         (modify_vtable_entry): Integrate common code from
14492         modify_one_vtable and dfs_fixup_vtable_deltas.
14493         (add_virtual_function): Set BF_VCALL_INDEX.
14494         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
14495         and BF_FN.
14496         (modify_one_vtable): Simplify.
14497         (dfs_fixup_vtable_deltas): Likewise.
14498         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
14499         * method.c (make_thunk): Handle vcall indices.
14500
14501 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
14502
14503         Compiler side new abi rtti (not enabled).
14504         * cp-tree.h (new_abi_rtti_p): New macro.
14505         (emit_support_tinfos): Prototype new function.
14506         (tinfo_decl_p): Likewise.
14507         (emit_tinfo_decl): Likwise.
14508         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
14509         macros.
14510         (doing_runtime): New local static.
14511         (init_rtti_processing): Add new-abi initializer.
14512         (get_tinfo_decl): Add new-abi logic.
14513         (tinfo_from_decl): Likewise.
14514         (build_dynamic_cast_1): Likewise.
14515         (qualifier_flags): New static function.
14516         (tinfo_base_init): Likewise.
14517         (generic_initializer): Likewise.
14518         (ptr_ref_initializer): Likewise.
14519         (ptmd_initializer): Likewise.
14520         (class_hint_flags): Likewise.
14521         (class_initializer): Likewise.
14522         (synthesize_tinfo_var): Likewise.
14523         (create_real_tinfo_var): Likewise.
14524         (create_pseudo_type_info): Likewise.
14525         (get_vmi_pseudo_type_info): Likewise.
14526         (create_tinfo_types): Likewise.
14527         (emit_support_tinfos): New global function.
14528         (tinfo_decl_p): New global predicate.
14529         (emit_tinfo_decl): New global function.
14530         * class.c (set_rtti_entry): Generalize for old and new rtti.
14531         (build_vtbl_initializer): Likewise.
14532         * decl2.c (finish_file): Likewise.
14533
14534 Thu Jan 27 20:53:36 2000  Jim Wilson  <wilson@cygnus.com>
14535
14536         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
14537         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
14538
14539 Thu Jan 27 13:54:12 2000  Mike Stump  <mrs@wrs.com>
14540
14541         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
14542         for scopes.
14543
14544 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
14545
14546         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
14547
14548 Wed Jan 26 22:19:14 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
14549
14550         * optimize.c (calls_setjmp_r): Supply new argument
14551         to special_function_p.
14552
14553 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14554
14555         * call.c: PROTO -> PARAMS.
14556         * class.c: Likewise.
14557         * cp-tree.h: Likewise.
14558         * cvt.c: Likewise.
14559         * decl.c: Likewise.
14560         * decl.h: Likewise.
14561         * decl2.c: Likewise.
14562         * dump.c: Likewise.
14563         * errfn.c: Likewise.
14564         * error.c: Likewise.
14565         * except.c: Likewise.
14566         * expr.c: Likewise.
14567         * init.c: Likewise.
14568         * input.c: Likewise.
14569         * lex.c: Likewise.
14570         * lex.h: Likewise.
14571         * method.c: Likewise.
14572         * optimize.c: Likewise.
14573         * parse.y: Likewise.
14574         * pt.c: Likewise.
14575         * repo.c: Likewise.
14576         * rtti.c: Likewise.
14577         * search.c: Likewise.
14578         * semantics.c: Likewise.
14579         * spew.c: Likewise.
14580         * tree.c: Likewise.
14581         * typeck.c: Likewise.
14582         * typeck2.c: Likewise.
14583         * xref.c: Likewise.
14584
14585 2000-01-25  Richard Henderson  <rth@cygnus.com>
14586
14587         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
14588
14589 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
14590
14591         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
14592         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
14593         (struct vcall_offset_data_s): New type.
14594         (dfs_vcall_offset_queue_p): New function.
14595         (dfs_build_vcall_offset_vtbl_entries): Likewise.
14596         (build_vcall_offset_vtbl_entries): Likewise.
14597         (layout_vtable_decl): Likewise.
14598         (num_vfun_entries): Likewise.
14599         (num_extra_vtbl_entries): Add the entries for vcall offsets.
14600         (build_vtbl_initializer): Likewise.
14601         (dfs_finish_vtabls): Use layout_vtable_decl.
14602         (modify_one_vtables): Always duplicate vtables under the new ABI.
14603         (finish_struct_1): Use layout_vtable_decl.
14604
14605 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14606
14607         * decl.c (member_function_or_else): Change third arg from a format
14608         specifier to an `enum overload_flags'.  Callers changed.
14609
14610 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
14611
14612         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
14613         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
14614         build_const_cast, get_delta_difference, check_return_expr): Avoid
14615         ANSI string concatenation usage.
14616
14617 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
14618
14619         * class.c (layout_class_type): Put the fields required to make a
14620         class non-empty at the end, not the beginning, of the TYPE_FIELDs
14621         list.
14622
14623 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
14624
14625         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
14626         template.
14627
14628         * decl2.c (mark_used): Do instantiate inlines that have been
14629         explicitly instantiated.
14630
14631 2000-01-24  Richard Henderson  <rth@cygnus.com>
14632
14633         * call.c (build_over_call): Use expand_tree_builtin.
14634         * typeck.c (build_function_call_real): Likewise.
14635         (build_binary_op_nodefault): Handle unordered compares.
14636
14637 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
14638
14639         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
14640         cp_tree_index values.
14641         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
14642         New global node #defines for them.
14643         * rtti.c (call_void_fn): Replace with ...
14644         (build_runtime_decl): ... new static function.
14645         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
14646         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
14647         (build_dynamic_cast_1): Always produce correctly typed result.
14648         Explicitly produce type_info addresses. Use dynamic_cast_node.
14649         * exception.cc (__throw_bad_cast): Return `void *'.
14650         (__throw_bad_typeid): Return `const type_info &'.
14651
14652 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
14653
14654         * cp-tree.h (get_vtable_decl): Prototype new function.
14655         * class.c (get_vtable_decl): New function. Broken out from ...
14656         (build_vtable): ... here. Use it.
14657         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
14658         by get_vtable_decl.
14659
14660 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
14661
14662         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
14663         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
14664         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
14665         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
14666         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
14667         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
14668         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
14669         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
14670         (CPTI_TINFO_VAR_ID): New enumeration.
14671         (__tp_desc_type_node, __access_mode_type_node,
14672         __bltn_desc_type_node, __user_desc_type_node,
14673         __class_desc_type_node, __ptr_desc_type_node,
14674         __attr_desc_type_node, __func_desc_type_node,
14675         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
14676         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
14677         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
14678         enum_desc_type_node, class_desc_type_node,
14679         si_class_desc_type_node, vmi_class_desc_type_node,
14680         ptmd_desc_type_node, base_desc_type_node): New #defines.
14681         (tinfo_fn_id, tinfo_fn_type): Rename to ...
14682         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
14683         (tinfo_var_id): New enumeration.
14684         (DECL_TINFO_FN_P): Augment comment.
14685         * decl.c (cp_global_trees): Adjust documentation.
14686         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
14687         tinfo_decl_type and tinfo_var_id.
14688         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
14689         (build_typeid): Remove unused variable.
14690         (get_tinfo_var): Use tinfo_var_id.
14691         (tinfo_name): New static function.
14692         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
14693         (tinfo_from_decl): Likewise.
14694         (get_base_offset): New static function, broken out of
14695         expand_class_desc.
14696         (expand_si_desc): Use tinfo_name.
14697         (expand_class_desc): Likewise. Lose local static variable.
14698         Use base_desc_type_node. Use get_base_offset.
14699         (expand_ptr_desc): Use tinfo_name.
14700         (expand_attr_desc): Likewise.
14701         (expand_generic_desc): Likewise.
14702
14703         * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
14704         * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
14705
14706 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
14707
14708         * cp-tree.h (__eprintf): Remove declaration.
14709         * tree.c (__eprintf): Remove definition.
14710
14711 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
14712             Mark Mitchell  <mark@codesourcery.com>
14713
14714         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
14715         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
14716
14717 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
14718
14719         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
14720
14721 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
14722
14723         * cp-tree.h (register_dtor_fn): New function.
14724         * decl.c (destroy_local_static): Rename to ...
14725         (register_dtor_fn): ... this.  Give it external linkage.
14726         (expand_static_init): Use it.
14727         * decl2.c (do_static_initialization): Likewise, if using
14728         __cxa_atexit.
14729         (do_static_destruction): Check that __cxa_atexit is not in use.
14730         (finish_file): Don't call do_static_destruction if using
14731         __cxa_atexit.
14732
14733         * typeck.c (convert_arguments): Restore two-message error
14734         reporting.
14735
14736 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
14737
14738         Remap dynamic cast hint values to be consistent across ABIs.
14739         * search.c (dynamic_cast_base_recurse): Remap generated value.
14740         (get_dynamic_cast_base_type): Adjust documentation.
14741         * tinfo.h (__user_type_info::dyncast): Likewise.
14742         (__user_type_info::find_public_subobj): Remap BOFF meaning.
14743         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
14744         (__class_type_info::do_dyncast): Likewise.
14745         (__class_type_info::do_find_public_subobj): Likewise.
14746         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
14747
14748 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
14749
14750         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
14751
14752         * typeck2.c (incomplete_type_error): Restore previous
14753         cp_error and cp_error_at call sequence.
14754
14755 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
14756
14757         * class.c (dump_class_hierarchy): Make format agree with argument;
14758         cast pointer to unsigned long and print with %lx.
14759
14760 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
14761
14762         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
14763
14764         * typeck.c (composite_pointer_type, common_type,
14765         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
14766         build_function_call_real, convert_arguments,
14767         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
14768         build_unary_op, mark_addressable, build_compound_expr,
14769         build_static_cast, build_reinterpret_cast, build_const_cast,
14770         build_c_cast, build_modify_expr, get_delta_difference,
14771         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
14772         'ISO C++'.  Fusion consecutive calls to diagnostic message routines
14773         into a single one.
14774         * typeck2.c (readonly_error, abstract_virtuals_error,
14775         process_init_constructor, check_for_new_type): Likewise.
14776
14777 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
14778
14779         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
14780         VAR_DECLs.
14781
14782 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
14783
14784         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
14785         (build_x_typeid): Likewise.
14786         (get_tinfo_fn): Likewise.
14787         (get_tinfo_fn_unused): Rename to ...
14788         (get_tinfo_decl): ... here.
14789         * rtti.c (build_headof): Replace logic error with assertion.
14790         (get_tinfo_fn_dynamic): Rename to ...
14791         (get_tinfo_decl_dynamic): ... here. Make static. Use
14792         complete_type_or_else.
14793         (build_x_typeid): Move into ...
14794         (build_typeid): ... here. Adjust call to
14795         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
14796         throw_bad_typeid expression.
14797         (get_tinfo_fn_unused): Rename to ...
14798         (get_tinfo_decl): ... here. Adjust comment.
14799         (get_tinfo_fn): Delete.
14800         (tinfo_from_decl): New static function.
14801         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
14802         (get_typeid): Use complete_type_or_else.
14803         (build_dynamic_cast_1): Adjust calls to
14804         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
14805         * parse.y (primary): Adjust call to build_typeid.
14806         * except.c (build_eh_type_type_ref): Adjust call to
14807         get_tinfo_decl. Mark as used.
14808         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
14809         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
14810         * parse.c: Regenerated.
14811
14812 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
14813
14814         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
14815         calling convention.
14816         (resolves_to_fixed_type_p): Document calling convention.
14817         * rtti.c (build_x_typeid): Initialize NONNULL.
14818
14819         * cp-tree.h (build_shared_int_cst): New function.
14820         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
14821         * class.c (modify_vtable_entry): Likewise.
14822         (add_virtual_function): Split out code to generated shared
14823         INTEGER_CSTs to build_share_int_cst.
14824         (modify_all_vtables): Handle all the overridden functions here.
14825         Add overridden functions from non-primary virtual bases to the
14826         primary vtable.
14827         (finish_struct_1): Adjust call to modify_all_vtables.  Add
14828         overridden functions from non-primary bases to the vtable.
14829         * tree.c (build_shared_int_cst): New function.
14830
14831         * cp-tree.h (scratchalloc): Remove.
14832         (build_scratch_list): Likewise.
14833         * call.c (convert_class_to_reference): Replace build_scratch_list
14834         and build_expr_list with build_tree_list.
14835         (add_candidate): Replace scratchalloc with expralloc.  Note memory
14836         leak.
14837         (build_user_type_conversion_1):  Replace build_scratch_list
14838         and build_expr_list with build_tree_list.
14839         (build_new_op): Likewise.
14840         (build_op_delete_call): Likewise.
14841         (convert_like): Likewise.
14842         * cvt.c (ocp_convert): Likewise.
14843         * decl.c (start_decl): Likewise.
14844         (start_function): Likewise.
14845         (finish_destructor_body): Likewise.
14846         (maybe_build_cleanup_1): Likewise.
14847         * decl2.c (reparse_decl_as_expr): Likewise.
14848         * init.c (perform_member_init): Likewise.
14849         (expand_cleanup_for_base): Likewise.
14850         (build_builtin_delete_call): Likewise.
14851         (build_new_1): Likewise.
14852         (build_delete): Likewise.
14853         * method.c (do_build_assign_ref): Likewise.
14854         * parse.y (already_scoped_stmt): Likewise.
14855         (nontrivial_exprlist): Likewise.
14856         (net_initializer): Likewise.
14857         (initlist): Likewise.
14858         * parse.c: Regenerated.
14859         * rtti.c (build_x_typeid): Likewise.
14860         (build_dynamic_cast_1): Likewise.
14861         * typeck.c (build_x_compound_expr): Likewise.
14862         (build_static_cast): Likewise.
14863         (build_modify_expr): Likewise.
14864
14865         * cp-tree.h (DECL_VINDEX): Add documentation.
14866         * class.c (build_vtable_entry): Likewise.
14867         (start_vtable): Add comment.
14868         (add_virtual_function): Replace pending_hard_virtuals with
14869         overridden_virtuals and pending_virtuals with new_virtuals.
14870         Replace redundant assignments with assertions.
14871         (check_for_override): Add comment.
14872         (check_bases_and_members): Replace pending_hard_virtuals with
14873         overridden_virtuals and pending_virtuals with new_virtuals.
14874         (create_vtbl_ptr): Likewise.
14875         (layout_class_type): Likewise.
14876         (finish_struct_1): Likewise.  Add comments.
14877
14878 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
14879
14880         * class.c (finish_struct_1): Replace redundant code with
14881         assertions.
14882
14883         * cp-tree.h (flag_new_abi): Move.
14884         (flag_use_cxa_atexit): Likewise.
14885         (flag_honor_std): Likewise.
14886         (flag_rtti): Likewise.
14887         (vbase_offsets_in_vtable_p): Define.
14888         (vptrs_present_everywhere_p): Likewise.
14889         (TYPE_CONTAINS_VPTR_P): Likewise.
14890         (dfs_walk_real): Declare.
14891         * class.c (build_vbase_pointer_fields): Check
14892         vbase_offsets_in_vtable_p.
14893         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
14894         BINFO_VPTR_FIELD.
14895         (build_vbase_offset_vtbl_entries): Simplify.
14896         (build_vbase_offset_vtbl_entries): Adjust.
14897         (build_vbase_pointer): Add ability to look up vbase offsets in
14898         vtable.
14899         (start_vtable): New function.
14900         (add_virtual_function): Use it.
14901         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
14902         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
14903         (build_vtbl_initializer): Take the type of the complete object as
14904         input.  Use it to correctly calculate vbase offsets.
14905         (dfs_finish_vtbls): Pass the complete type to
14906         build_vtbl_initializer.
14907         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
14908         (create_vtable_ptr): Create a vtable even if there are no
14909         new virtual functions, under the new ABI.
14910         (finish_struct_1): Likewise.
14911         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
14912         * decl.c (exapnd_static_init): Remove call to
14913         preserve_initializer.
14914         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
14915         vtables.
14916         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
14917         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
14918         (construct_virtual_bases): Don't initialize virtual base pointers
14919         under the new ABI.
14920         (build_aggr_init): Clean up comment.
14921         (expand_aggr_init_1): Likewise.
14922         * rtti.c (expand_class_desc): Store the virtual function table
14923         index where the vbase offset lives in the offset field.
14924         * search.c (dfs_walk_real): Make it global.
14925         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
14926         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
14927
14928         * tinfo.h (USItype): Make it signed under the new ABI.
14929         * tinfo.cc (convert_to_base): New function.  Encapsulate base
14930         conversion logic here.
14931         (__class_type_info::do_upcast): Use it.
14932         (__class_type_info::do_dyncast): Likewise.
14933         (__class_type_info::do_find_public_subobj): Likewise.
14934
14935         * init.c (construct_virtual_bases): Don't look up the addresses of
14936         virtual bases at run-time.
14937
14938         * class.c (build_vbase_pointer): Relocate.
14939         (build_vbase_pointer_fields): Likewise.
14940         (dfs_build_vbase_offset_vtbl_entries): Likewise.
14941         (build_vbase_offset_vtbl_entries): Likewise.
14942
14943         * decl.c (init_decl_processing): Complain if -fnew-abi
14944         -fno-vtable-thunks is used.
14945
14946         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
14947         flag_new_abi.
14948
14949 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
14950
14951         * cp-tree.h (num_extra_vtbl_entries): New function.
14952         (size_extra_vtbl_entries): Likewise.
14953         (dfs_vtable_path_unmark): Likewise.
14954         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
14955         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
14956         * class.c (num_extra_vtbl_entries): New function.
14957         (size_extra_vtbl_entries): Likewise.
14958         (dfs_build_vbase_offset_vtbl_entries): New function.
14959         (build_vbase_offset_vtbl_entries): Likewise.
14960         (build_vtbl_initializer): Use it.
14961         (finish_struct_1): Adjust vtable sizes (using
14962         num_extra_vtbl_entries).
14963         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
14964         THUNK_DECL is non-NULL before expanding it.
14965         * init.c (expand_virtual_init): Adjust the vtable pointer by
14966         size_extra_vtbl_entries before storing it.
14967         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
14968         Handle TREE_LIST parameters here, not in the dfs_* functions.
14969         (dfs_unmarked_real_bases_queue_p): Adjust.
14970         (dfs_marked_real_bases_queue_p): Likewise.
14971         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
14972         (dfs_vtable_path_marked_real_bases_queue_p): New function.
14973         (dfs_vtable_path_unmark): Likewise.
14974
14975 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
14976
14977         * optimize.c (copy_body_r): Clear the operand three of a
14978         TARGET_EXPR when copying it.
14979
14980 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14981
14982         * method.c (build_decl_overload_real): Check whether we are in ::
14983         before returning __builtin_new/delete.
14984
14985 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
14986
14987         * pt.c (tsubst_friend_function): Improve comment.
14988         (instantiate_decl): Avoid crashing when a "nested" function is
14989         instantiated from the top level.
14990
14991         * dump.c (dqeueue_and_dump): Dump
14992         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
14993
14994 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14995
14996         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
14997
14998 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
14999
15000         * g++spec.c (lang_specific_driver): Add -fnew-abi if
15001         ENABLE_NEW_GXX_ABI defined.
15002         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
15003         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
15004         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
15005
15006 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
15007
15008         * decl.c (start_cleanup_fn): Call pushdecl.
15009
15010         * call.c (convert_class_to_reference): Fix typos.
15011         (build_conditional_expr): Handle errors gracefully.
15012         * class.c (push_nested_class): Likewise.
15013         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
15014         (DECL_THIS_EXTERN): Use it.
15015         (DECL_THIS_STATIC): Likewise.
15016         * cvt.c (convert_to_void): Handle errors gracefully.
15017         (build_expr_type_conversion): Likewise.
15018         * decl.c (maybe_push_decl): Likewise.
15019         (start_decl_1): Likewise.
15020         (require_complete_types_for_parms): Likewise.
15021         * parse.y (structsp): Likewise.
15022         (base_class): Likewise.
15023         * parse.c: Regenerated.
15024         * pt.c (finish_member_template_decl): Likewise.
15025         * typeck.c (decay_conversion): Likewise.
15026
15027         * cp-tree.h (dfs_skip_vbases): New function.
15028         (find_vbase_instance): Likewise.
15029         * class.c (determine_primary_base): Allow a nearly empty base to
15030         serve as a primary base class under the new ABI.
15031         (get_class_offset_1): Rename to ...
15032         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
15033         messages here.
15034         (get_class_offset): Use it.  Issue error messages here.
15035         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
15036         find the right copies of virtual bases.
15037         (fixup_vtable_deltas1): Rename to ...
15038         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
15039         bases as primary bases.
15040         (fixup_vtable_deltas): Remove.
15041         (override_one_vtable): Handle virtual bases as primary bases.
15042         (merge_overrides): Likewise.
15043         (finish_struct_1): Likewise.
15044         (dump_class_hierarchy): Dump primary-ness of bases as well.
15045         * search.c (mark_primary_bases): Use a pre-order traversal to
15046         handle primary virtual bases.
15047         (dfs_skip_vbases): New fiunction.
15048         (expand_upcast_fixups): Adjust to handle primary virtual bases.
15049         (fixup_virtual_upcast_offsets): Likewise.
15050         (fixup_all_virtual_upcast_offsets): Likewise.
15051         (dfs_find_vbase_instances): New function.
15052         (find_vbase_instance): Likewise.
15053
15054 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
15055
15056         * lex.c (DIR_SEPARATOR): Delete macro.
15057
15058 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
15059
15060        * decl2.c (lang_decode_option): Handle automatic line wrapping
15061        option.
15062
15063 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
15064
15065         * friend.c (do_friend): Don't resolve scopes when processing
15066         template declarations, even if the qualifying scope doesn't
15067         involve template parameters.
15068
15069 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
15070
15071         * class.c (dfs_modify_vtables_queue_p): Remove.
15072         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
15073         and dfs_marked_real_bases_queue_p instead of
15074         dfs_modify_vtables_queue_p.
15075
15076         * class.c (build_vbase_path): Simplify.
15077         (dfs_propagate_binfo_offsets): New function.
15078         (propagate_binfo_offsets): Use it.
15079         (remove_base_field): Simplify.
15080         (dfs_set_offset_for_vbases): Remove.
15081         (dfs_set_offset_for_shared_vbases): New function.
15082         (dfs_set_offset_for_unshared_vbases): Likewise.
15083         (layout_virtual_bases): Use them.
15084         (layout_basetypes): Don't call propagate_binfo_offsets.
15085         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
15086         for the vbases.
15087
15088         * class.c (build_base_field): New function, split out from ...
15089         (build_base_fields): ... here.  Use it.  Allocate primary bases
15090         first, under the new ABI.
15091         (get_vtable_entry): Remove.
15092         (remove_base_field): New function, split out from ...
15093         (remove_base_fields): ... here.  Adjust since primary bases come
15094         first under the new ABI.
15095
15096         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
15097         (initialize_vtbl_ptrs): New function.
15098         (expand_indirect_vtbls_init): Change prototype.
15099         (convert_pointer_to_vbase): Declare.
15100         * init.c (expand_direct_vtbls_init): Remove.
15101         (dfs_initialize_vtbl_ptrs): New function.
15102         (initialize_vtbl_ptrs): Likewise.
15103         (emit_base_init): Use initialize_vtbl_ptrs.
15104         * search.c (convert_pointer_to_vbase): Make it global.
15105         (expand_indirect_vtbls_init): Remove vtable initialization code.
15106         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
15107
15108         * class.c (dfs_finish_vtbls): New function.
15109         (finish_vtbls): Use it.
15110         (dump_class_hierarchy): New function.
15111
15112         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
15113         (BINFO_VBASE_PRIMARY_P): New macro.
15114         (BINFO_VIRTUALS): Add to documentation.
15115         (SET_BINFO_PRIMARY_MARKED_P): Remove.
15116         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
15117         (dfs_mark_primary_bases_queue_p): Likewise.
15118         (dfs_unmarked_real_bases_queue_p): New function.
15119         (dfs_marked_real_bases_queue_p): Likewise.
15120         * search.c (dfs_mark_primary_bases): Adjust.
15121         (mark_primary_bases): Likewise.
15122         (get_shared_vbase_if_not_primary): New function.
15123         (dfs_unmarked_real_bases_queue_p): Likewise.
15124         (dfs_marked_real_bases_queue_p): Likewise.
15125         (dfs_get_pure_virtuals): Simplify.
15126         (get_pure_virtuals): Likewise.
15127
15128 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15129
15130         * lex.c: Include tm_p.h.
15131
15132 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
15133
15134         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
15135
15136 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
15137
15138         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
15139         * pt.c (instantiate_decl): Defer comdat templates that might not be
15140         needed.
15141
15142         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
15143         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
15144         (finish_file): Likewise.
15145
15146         * decl2.c (import_export_class): Undo 12/14 change.
15147
15148         * error.c (dump_decl): operator new, not operatornew.
15149
15150         * class.c (field_decl_cmp): A nontype is "greater" than a type.
15151         * search.c (lookup_field_1): Look for the last field with the
15152         desired name.
15153
15154 2000-01-05  Nathan Sidwell  <nathan@acm.org>
15155
15156         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
15157         FUNCTION_DECL.
15158
15159 2000-01-05  Nathan Sidwell  <nathan@acm.org>
15160
15161         * typeck.c (build_static_cast): Don't strip target qualifiers
15162         when casting from a class.
15163
15164 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15165
15166         * class.c (warn_hidden): Initialize variable `fndecl'.
15167
15168 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
15169
15170         * decl.c (flag_isoc9x): New variable to be able to use code in
15171         c-common.c.  For now always zero.
15172
15173 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
15174
15175         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
15176         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
15177         or unshare_base_binfos for virtual bases here.
15178         * search.c (dfs_get_vbase_types): Do it here.
15179         (get_vbase_types): Adjust.
15180
15181 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
15182
15183         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
15184         (BINFO_PRIMARY_MARKED_P): Use flag 5.
15185         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
15186         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
15187         (unmark_primary_bases): Remove declaration.
15188         (unmarkedp): Declare.
15189         (dfs_vbase_unmark): Likewise.
15190         * class.c (determine_primary_base): Return immediately if there
15191         are no base classes.  Call mark_primary_bases here.
15192         (modify_all_direct_vtables): Remove.
15193         (modify_all_indirect_vtables): Remove.
15194         (dfs_modify_vtables_queue_p): New function.
15195         (dfs_modify_vtables): New function.
15196         (modify_all_vtables): Use them.
15197         (build_base_fields): Build FIELD_DECLs for primary virtual base
15198         classes.
15199         (create_vtable_ptr): Don't call determine_primary_base here.
15200         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
15201         (dfs_set_offset_for_vbases): ... this.
15202         (layout_virtual_bases): Use it.
15203         (layout_class_type): Call determine_primary_base here.
15204         * search.c (unmarkedp): Make it global.
15205         (shared_marked_p): Simplify.
15206         (shared_unmarked_p): Likewise.
15207         (dfs_primary_bases_queue_p): Remove.
15208         (dfs_unmark_primary_bases): Likewise.
15209         (unmark_primary_bases): Likewise.
15210         (mark_primary_bases): Simplify.
15211         (get_pure_virtuals): Don't call mark_primary_bases here.
15212         (dfs_vbase_unmark): New function.
15213         (get_vbase_types): Simplify.
15214
15215         * class.c (struct base_info): Remove.
15216         (determine_primary_base): Take has_virtual_p rather than a
15217         base_info as input.  Don't calculate max_has_virtual.
15218         (finish_struct_bits): Remove max_has_virtual argument.
15219         (create_vtable_ptr): Remove max_has_virtual_p argument.
15220         (layout_virtual_bases): Remove max argument.
15221         (layout_basetypes): Likewise.
15222         (layout_class_type): Remove max_has_virtual_p argument.
15223         (finish_struct_1): Remove max_has_virtual.
15224
15225         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
15226         (layout_basetypes): Remove.
15227         * class.c (propagate_binfo_offsets): Moved here from tree.c.
15228         Update to handle primary virtual bases.
15229         (remove_base_fields): New function, split out from
15230         layout_basetypes.
15231         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
15232         (layout_virtual_bases): New function, split out from
15233         layout_basetypes.  Update to handle primary virtual bases.
15234         (layout_basetypes): Moved here from tree.c.  Use
15235         remove_base_fields and layout_virtual_bases.
15236         * search.c (dfs_mark_primary_bases_queue_p): New function.
15237         (mark_primary_bases): Use it.
15238         * tree.c (CEIL): Remove.
15239         (propagate_binfo_offsets): Remove.
15240         (layout_basetypes): Remove.
15241
15242 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
15243
15244         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
15245         (BINFO_PRIMARY_MARKED_P): New macro.
15246         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
15247         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
15248         (mark_primary_bases): New function.
15249         (unmark_primary_bases): Likewise.
15250         * search.c (get_abstract_virtuals_1): Remove.
15251         (dfs_mark_primary_bases): New function.
15252         (mark_primary_bases): Likewise.
15253         (dfs_unmark_primary_bases): Likewise.
15254         (unmark_primary_bases): Likewise.
15255         (dfs_get_pure_virtuals): Likewise.
15256
15257 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
15258
15259         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
15260         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
15261         (modify_one_vtable): Adjust.
15262         (fixup_vtable_deltas1): Likewise.
15263         (override_one_vtable): Likewise.
15264         * search.c (get_abstract_virtuals_1): Likewise.
15265         (get_pure_virtuals): Likewise.
15266         (expand_upcast_fixups): Likewise.
15267         * tree.c (debug_binfo): Likewise.
15268
15269         * class.c (build_vtable): Don't return a value.  Don't rebuild
15270         vtables for bases that have already been handled.
15271         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
15272         already been handled.
15273         (modify_one_vtable): Adjust accordingly.
15274         (fixup_vtable_deltas1): Likewise.
15275         (finish_struct_1): Likewise.
15276
15277 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
15278
15279         * call.c (build_new_method_call): Also check destructors.