OSDN Git Service

* search.c (get_dynamic_cast_base_type): When building a new
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 Thu Apr  5 16:54:29 2001  J"orn Rennecke <amylaar@redhat.com>
2
3         * search.c (get_dynamic_cast_base_type): When building a new
4         constant, set its type to ssizetype.
5
6 2001-04-04  Jakub Jelinek  <jakub@redhat.com>
7
8         * optimize.c (expand_call_inline): Only add newly inlined statements
9         into inlined_stmts.
10
11 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
12
13         * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
14         (OPERATOR_FORMAT): Likewise.
15         (OPERATOR_TYPENAME_FORMAT): Likewise.
16         * operators.def: Remove old name-mangling information.
17         * decl.c (grok_op_properties): Adjust accordingly.
18         * lex.c (init_operators): Likewise.
19         * rtti.c (get_tinfo_decl): Issue error messages about types that
20         have variable size.
21
22 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
23
24         * decl2.c (import_export_decl): Don't call import_export_class 
25         when processing an inline member function.
26         * semantics.c (expand_body): Call import_export_decl before
27         emitting inline functions.
28
29 2001-03-28  Richard Henderson  <rth@redhat.com>
30
31         IA-64 ABI Exception Handling:
32         * cp-tree.def (EH_SPEC_BLOCK): New.
33         (MUST_NOT_THROW_EXPR): New.
34         * cp-tree.h: Update changed function declarations.
35         (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
36         (CPTI_CALL_UNEXPECTED): New.
37         (struct cp_language_function): Rename x_eh_spec_try_block
38         to x_eh_spec_block.
39         (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
40         * decl.c (current_binding_level): If no current function 
41         bindings, revert to scope_chain.
42         (initialize_predefined_identifiers): Remove __cp_push_exception.
43         (store_parm_decls): Use begin_eh_spec_block.
44         (finish_function): Use finish_eh_spec_block.
45         (mark_lang_function): Update for name changes.
46         * decl2.c (finish_file): No mark_all_runtime_matches.
47         * dump.c (cp_dump_tree): Handle new tree codes.
48         * error.c (dump_expr) [BIND_EXPR]: Fix typo.
49         * except.c (catch_language_init, catch_language): Remove.
50         (init_exception_processing): Don't set language code.
51         Initialize call_unexpected_node, protect_cleanup_actions,
52         eh_personality_libfunc, lang_eh_runtime_type.
53         (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
54         (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
55         (prepare_eh_type): Split out type canonicalizations ...
56         (build_eh_type_type): ... from here.
57         (build_eh_type_type_ref): Remove.
58         (mark_all_runtime_matches): Remove.
59         (build_exc_ptr): New.
60         (do_begin_catch, do_end_catch): New.
61         (do_pop_exception): Remove.
62         (build_terminate_handler): Remove.
63         (choose_personality_routine): Split out language choice from ...
64         (initialize_handler_parm): ... here.
65         Use MUST_NOT_THROW_EXPR.
66         (expand_start_catch_block): Use do_begin_catch.  Simplify Java
67         exception object handling.
68         (expand_start_eh_spec, expand_end_eh_spec): Remove.
69         (expand_exception_blocks, alloc_eh_object): Remove.
70         (begin_eh_spec_block, finish_eh_spec_block): New.
71         (do_allocate_exception, do_free_exception): New.
72         (expand_throw): Merge into ...
73         (build_throw): ... here.  Update for abi.
74         * expr.c (cplus_expand_expr): No expand_internal_throw.
75         Handle MUST_NOT_THROW_EXPR.
76         * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
77         * semantics.c (*) Update for except.h name changes.
78         (genrtl_try_block): No protect_with_terminate.
79         (genrtl_eh_spec_block): New.
80         (genrtl_handler): Don't emit the goto here.
81         (cp_expand_stmt): Handle EH_SPEC_BLOCK.
82         (genrtl_finish_function): Don't expand_exception_blocks.
83         * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
84
85 2001-03-28  Richard Henderson  <rth@redhat.com>
86
87         * decl.c (struct named_label_list): Rename eh_region to
88         in_try_scope, add in_catch_scope.
89         (struct binding_level): Rename eh_region to is_try_scope,
90         add is_catch_scope.
91         (note_level_for_try): Rename from note_level_for_eh.
92         (note_level_for_catch): New.
93         (poplevel): Copy both is_try_scope and is_catch_scope to
94         the named_label_list struct.
95         (check_previous_goto_1): Don't check for catch block via
96         DECL_ARTIFICIAL; use in_try_scope instead.
97         (check_goto): Likewise.
98         * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
99         * except.c (expand_start_catch_block): Call note_level_for_catch.
100         * semantics.c (begin_compound_stmt): Update for note_level_for_try.
101
102 2001-03-27  Richard Henderson  <rth@redhat.com>
103
104         * except.c: Use USING_SJLJ_EXCEPTIONS instead of
105         exceptions_via_longjmp.
106
107 2001-03-27  Phil Edwards  <pme@sources.redhat.com>
108
109         * pt.c (check_default_tmpl_args):  Make error messages clearer.
110
111 2001-03-26  Phil Edwards  <pme@sources.redhat.com>
112
113         * error.c:  Also undefine 'A' macro used for cp_printers definition.
114
115 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
116
117         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
118
119 2001-03-26  Mike Yang <yang@research.att.com>
120             Mark Mitchell  <mark@codesourcery.com>
121
122         * dump.c (dump_access): New function.
123         (cp_dump_tree): Use it.  Dump basetype information for class
124         types.
125
126 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
127
128         * Makefile.in (optimize.o): Depend on params.h.
129         (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
130         (init_decl_processing): Set flag_no_inline when doing
131         inlining-on-trees.
132         * optimize.c: Include params.h.
133         (struct inline_data): Improve documentation of FNS.  Add
134         FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
135         (INSNS_PER_STMT): New macro.
136         (remap_block): Use CLONING_P.
137         (inlinable_function_p): Don't inline big functions.
138         (expand_call_inline): Keep track of how much inlining we've done.
139         (optimize_function): Set FIRST_INLINED_FN.
140         (maybe_clone_body): Set CLONING_P.
141         * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
142         tree nodes.
143         (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
144         rest_of_compilation.  Clear DECL_RTL for local variables
145         afterwards.
146         (clear_decl_rtl): New function.
147                 
148 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>
149
150         Implement DR 209
151         * cp-tree.h (skip_type_access_control,
152         reset_type_access_control): Prototype.
153         * decl.c (grokdeclarator): Access of friends is not checked.
154         * parse.y (component_decl_list): Reset type access control.
155         * semantics.c (decl_type_access_control): Clear
156         current_type_lookups.
157         (save_type_access_control): Don't save if not deferring.
158         (skip_type_access_control, reset_type_access_control): New
159         functions.
160         (begin_class_definition): Do type access control for basetypes.
161         Start deferred access control.
162         (finish_class_definition): Resume immediate access control if
163         this is a local class.
164
165 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
166
167         * class.c (add_method): Use memcpy/memmove, not bcopy.
168
169         * decl.c (duplicate_decls): Likewise.
170
171 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
172
173         * mangle.c (write_discriminator): Use `_0' for discriminator 1,
174         not `_'.
175
176 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
177
178         * decl.c (local_names): Define.
179         (push_local_name): New.
180         (grok_reference_init): Return init if initializing static reference
181         variable with non-constant instead of emitting it.
182         Move expand_static_init call to cp_finish_decl.
183         (layout_var_decl): Call push_local_name.
184         (maybe_commonize_var): Allow inlining functions even if they have
185         static local variables, use comdat_linkage for them if flag_weak.
186         (check_initializer): Call obscure_complex_init if
187         grok_reference_init returned non-zero.
188         (save_function_data): Clear x_local_names.
189         (pop_cp_function_context): Free x_local_names.
190         (mark_inlined_fns): Remove.
191         (mark_lang_function): Mark x_local_names.
192         (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
193         Mark inlined_fns as tree, remove call to mark_inlined_fns.
194         * class.c (alter_access): Ensure DECL_ACCESS is never set if
195         DECL_DISCRIMINATOR_P.
196         * cp-tree.h (cp_language_function): Add x_local_names.
197         (lang_decl_flags): Add discriminator into u2.
198         (lang_decl_inlined_fns): Remove.
199         (lang_decl): inlined_fns is now a TREE_VEC.
200         (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
201         * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
202         TREE_VEC, not a custom structure.
203         (optimize_function): Likewise.
204         * mangle.c (discriminator_for_local_entity): Discriminate among
205         VAR_DECL local entities.
206         * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
207         is not valid.
208
209 2001-03-22  Bryce McKinlay  <bryce@albatross.co.nz>
210
211         Add support for Java interface method calls.
212         * cp-tree.h (struct lang_type): Add java_interface flag.
213         (TYPE_JAVA_INTERFACE): New macro.
214         * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
215         by setting TYPE_JAVA_INTERFACE.
216         * call.c (java_iface_lookup_fn): New static.
217         (build_over_call): If calling a method declared in a 
218         TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
219         expression which resolves the function address.
220         (build_java_interface_fn_ref): New function.
221
222 2001-03-22  Richard Henderson  <rth@redhat.com>
223
224         * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
225         * except.c: Don't include it.
226
227 2001-03-22  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
228             based on an idea from Joe Buck <jbuck@synopsys.com>
229
230         * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
231         New nonterminals.
232         (data_def, component_decl): Add reductions to bad_decl.
233
234 2001-03-22  Jakub Jelinek  <jakub@redhat.com>
235
236         * method.c (do_build_assign_ref): Don't use build_modify_expr for
237         anonymous aggregates, since they don't have assignment operator
238         method.
239         * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
240         assignment operators for anonymous structure fields.
241
242 2001-03-21  Jason Merrill  <jason@redhat.com>
243
244         * pt.c (instantiate_decl): Abort if we see a member constant
245         instantiation that doesn't already have its initializer.
246         Downgrade explicit instantiation without definition to pedwarn.
247
248         * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
249         * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
250         (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
251
252         * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
253         (pending_vtables): Remove.
254         * decl2.c (pending_vtables): Remove.
255         (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
256         CLASSTYPE_VTABLE_NEEDS_WRITING.
257         (import_export_class): Likewise.
258         (init_decl2): Don't mark pending_vtables.
259         * lex.c (handle_pragma_vtable): Just sorry.
260         * pt.c (instantiate_class_template): Don't mess with
261         CLASSTYPE_VTABLE_NEEDS_WRITING.
262         (mark_class_instantiated): Likewise.
263         * ptree.c (print_lang_type): Don't print it.
264         * semantics.c (begin_class_definition): Don't set it.
265
266         * pt.c (template_tail): Replace with last_pending_template.
267         (maybe_templates, maybe_template_tail): Remove.
268         (add_pending_template): Adjust.
269         (instantiate_pending_templates): Adjust.
270
271         * cp-tree.h (struct saved_scope): Remove lang_stack field.
272         (current_lang_stack): Remove.
273         * decl.c (maybe_push_to_top_level): Don't initialize it.
274         (duplicate_decls): Use current_lang_depth.
275         (xref_basetypes): Likewise.
276         * class.c (current_lang_depth): New fn.
277         (push_lang_context): Use more varray functionality.
278         (pop_lang_context): Likewise.
279
280         * error.c (GLOBAL_THING): Always use '__'.
281
282 2001-03-21  Mark Mitchell  <mark@codesourcery.com>
283
284         * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
285
286         * mangle.c (mangle_decl_string): Mangle the names of overloaded
287         operators, even when they have `extern "C"' linkage.
288
289 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
290
291         * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
292         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
293         where it's not necessary.
294         (add_method): Remove optimization involving comparison of
295         DECL_ASSEMBLER_NAME.
296         (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
297         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
298         where it's not necessary.
299         (check_methods): Likewise.
300         (build_clone): Likewise.
301         (built_vtt): Likewise.
302         * cp-tree.h (DECL_NEEDED_P): Likewise.
303         * decl.c (pushtag): Likewise.
304         (duplicate_decls): Likewise.
305         (pushdecl): Likewise.
306         (builtin_function): Likewise.
307         (build_library_fn_1): Set DECL_LANGUAGE for library functions.
308         (build_cp_library_fn): Likewise.
309         (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
310         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
311         where it's not necessary.
312         (make_rtl_for_nonlocal_decl): Likewise.
313         (cp_finish_decl): Likewise.
314         (grokfndecl): Likewise.
315         (grokvardecl): Likewise.
316         (grokdeclarator): Likewise.
317         (start_function): Likewise.
318         (cp_missing_return_ok_p): Likewise.
319         * decl2.c (grokclassfn): Likewise.
320         (check_classfn): Likewise.
321         (finish_static_data_member_decl): Likewise.
322         (grokfield): Likewise.
323         * error.c (GLOBAL_IORD_P): Remove.
324         (dump_global_iord): Improve output.
325         (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
326         * except.c (nothrow_libfn_p): Summarily reject any function not in
327         namespace-scope.
328         * init.c (build_java_class_ref): Don't explicitly set
329         DECL_ASSEMBLER_NAME after calling mangle_decl.
330         * mangle.c (mangle_decl_string): Handle extern "C" functions.
331         (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
332         * method.c (set_mangled_name_for_decl): Don't explicitly set
333         DECL_ASSEMBLER_NAME after calling mangle_decl.
334         (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
335         IDENTIFIER_GLOBAL_VALUE for the thunk.
336         * pt.c (set_mangled_name_for_template_decl): Remove.
337         (check_explicit_specialization): Don't use it.
338         (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
339         (tsubst_friend_function): Likewise.
340         (tsubst_decl): Likewise.
341         (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
342         * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
343         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
344         where it's not necessary.
345         (tinfo_base_init): Likewise.
346         (create_real_tinfo_var): Likewise.
347         * search.c (looup_field_1): Likewise.
348         * semantics.c (finish_named_return_value): Likewise.
349         * tree.c (init_tree): Set lang_set_decl_assembler_name.
350         
351 2001-03-15  Gabriel Dos Reis  <gdr@codesourcery.com>
352
353         Correct semantics restrictions checking in throw-expression.
354         * except.c (is_admissible_throw_operand): New function.
355         (build_throw): Use it.
356
357 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
358
359         * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
360         and its ilk.
361
362 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
363
364         * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
365         * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
366         * decl.c (duplicate_decls): Likewise.
367         (builtin_function): Likewise.
368         (build_library_fn): Likewise.
369         (build_cp_library_fn): Likewise.
370         (check_initializer): Likewise.
371         (cp_finish_decl): Likewise.
372         * decl2.c (grokfield): Likewise.
373         (grok_function_init): Remove #if 0'd code.
374         (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
375         * friend.c (do_friend): Likewise.
376         * init.c (get_temp_regvar): Likewise.
377         * method.c (make_thunk): Likewise.
378         * pt.c (tsubst_friend_function): Likewise.
379         (tsubst_decl): Likewise.
380         (regenerate_decl_from_template): Likewise.
381         * semantics.c (genrtl_named_return_value): Likewise.
382         (expand_body): Likewise.
383         (genrtl_finish_function): Likewise.
384         * tree.c (cp_tree_equal): Likewise.
385         
386 2001-03-12  Nathan Sidwell  <nathan@codesourcery.com>
387
388         * call.c (convert_like_real): Add extra semantics to INNER
389         parameter. Don't convert to temporary if a user conversion
390         gives us an lvalue that we're about to bind to a reference.
391         Set INNER to indicate pending reference binding on recursive
392         calls.
393
394 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
395
396         * cp/lex.c: Delete duplicate pending_lang_change.
397
398 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
399
400         * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
401         Similarly.
402         * cp/repo.c (get_base_filename, open_repo_file): Similarly.
403         * cp/cp-tree.h: Remove file_name_nondirectory prototype.
404
405 2001-03-09  Zack Weinberg  <zackw@stanford.edu>
406
407         * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
408
409 2001-03-08  Stan Shebs  <shebs@apple.com>
410
411         * cp-tree.h (set_identifier_local_value): Remove unused decl.
412
413 2001-03-06  Zack Weinberg  <zackw@stanford.edu>
414
415         * spew.c: Remove references to CPP_OSTRING.
416
417 2001-03-06  Andrew Haley  <aph@redhat.com>
418
419         * typeck.c (convert_arguments): Check that we have an fndecl.
420
421 2001-03-05  Andrew Haley  <aph@redhat.com>
422
423         * typeck.c (convert_arguments): Don't do ellipsis conversion for
424         __built_in_constant_p.
425
426 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
427
428         * typeck.c (build_static_cast): Allow enum to enum conversions
429         as per DR 128.
430
431 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
432
433         * class.c (check_field_decls): Pointers to member do not a
434         non-pod struct make, as per DR 148.
435
436 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
437
438         * call.c (joust): cp_pedwarn when using gnu extension concerning
439         worst conversion sequences.
440
441 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
442
443         * decl.c: Replace all uses of 'boolean' with 'bool'.
444
445 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
446
447         * lang-specs.h: Add zero initializer for cpp_spec field to
448         all array elements that need one.  Don't put an #ifdef inside
449         the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
450         use it.
451
452 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
453
454         Implement using decls inside template functions.
455         * decl2.c (validate_nonmember_using_decl): Don't special case
456         fake_std_node in the global namespace. Don't reject early when
457         processing a template.
458         (do_local_using_decl): Add to statement tree. Don't do further
459         processing when building a template.
460         * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
461
462 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
463
464         * decl2.c (do_nonmember_using_decl): Don't complain if we find
465         same function. Do complain about ambiguating extern "C"
466         declarations.
467
468 2001-02-28  Nathan Sidwell  <nathan@codesourcery.com>
469
470         Remove floating point and complex type template constant parms.
471         * pt.c (convert_nontype_argument): Remove REAL_TYPE and
472         COMPLEX_TYPE extensions.
473         (invalid_nontype_parm_type_p): Likewise.
474
475 2001-02-27  Jeffrey Oldham  <oldham@codesourcery.com>
476
477         * except.c (call_eh_info): Revert "match_function"'s type.
478
479 2001-02-27  Nathan Sidwell  <nathan@codesourcery.com>
480
481         Fix ctor vtable vcall offsets.
482         * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
483         (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
484         (get_matching_base): Remove.
485         (get_original_base): New function.
486         (build_vtbl_initializer): Initialize vid.rtti_binfo. 
487         Use a virtual thunk for a ctor vtable with an index
488         (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
489         primary base within a constructor vtable. Only set
490         BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
491         when primary base has been lost.
492         * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
493
494 2001-02-26  Jeffrey Oldham  <oldham@codesourcery.com>
495
496         * call.c (joust): Ensure more_specialized()'s argument length
497         parameter has correct value for constructors.
498
499 2001-02-26  Nathan Sidwell  <nathan@codesourcery.com>
500
501         * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
502         
503         * decl.c (mark_inlined_fns): Prototype.
504
505 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
506
507         * spew.c (yylex): Correct handling of friends.
508
509 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
510
511         * mangle.c (write_encoding): Pass write_function_type the
512         FUNCTION_DECL for the function being encoded.
513         (write_function_type): Pass it along to write_bare_function_type.
514         (write_bare_function_type): Pass it along to write_method_parms.
515         (write_method_parms): Don't mangle the compiler-generated
516         parameters to a constructor or destructor.
517
518 2001-02-22  Andreas Jaeger  <aj@suse.de>
519
520         * optimize.c: Include toplev.h for
521         note_deferral_of_defined_inline_function prototype.
522
523 2001-02-22  Jakub Jelinek  <jakub@redhat.com>
524
525         * cp-tree.h (struct lang_decl_inlined_fns): New.
526         (struct lang_decls): Add inlined_fns.
527         (DECL_INLINED_FNS): New macro.
528         * optimize.c (struct inline_data): Add inlined_fns.
529         (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
530         (inlinable_function_p): Likewise, fix typo in comment,
531         function is not inlinable if it already inlined function currently
532         being optimized.
533         (expand_call_inline): Add fn to inlined_fns if neccessary.
534         (optimize_function): Initialize inlined_fns.
535         Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
536         * decl.c (mark_inlined_fns): New function.
537         (lang_mark_tree): Call it.
538
539 2001-02-21  Jason Merrill  <jason@redhat.com>
540
541         * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
542         (DECL_UNINLINABLE): Move to middle-end.
543
544         * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
545         * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
546         * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
547         * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
548         parms and outer BLOCK.  note_deferral_of_defined_inline_function.
549
550         * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
551         second parm of op=.
552
553 2001-02-19  Mark Mitchell  <mark@codesourcery.com>
554
555         * decl2.c (set_decl_namespace): Allow explicit instantiations in
556         any namespace.
557
558 2001-02-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
559
560         * optimize.c (expand_call_inline): Don't walk subtrees of type
561         nodes.
562
563 2001-02-18  Mark Mitchell  <mark@codesourcery.com>
564
565         * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
566         for a destructor.
567
568 2001-02-18  Jason Merrill  <jason@redhat.com>
569
570         Do put the VTT parameter in DECL_ARGUMENTS.
571         * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
572         (current_vtt_parm): New macro.
573         (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
574         (DECL_HAS_VTT_PARM_P): New macro.
575         (DECL_VTT_PARM): Remove.
576         (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
577         * decl.c (duplicate_decls): Only copy the operator code if
578         appropriate.
579         (start_function): Set current_vtt_parm.
580         (lang_mark_tree): Don't mark vtt_parm.
581         * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
582         DECL_ARGUMENTS.  Set DECL_HAS_VTT_PARM_P.
583         * class.c (build_clone): Maybe remove the VTT parm.
584         * optimize.c (maybe_clone_body): Set up the VTT parm.
585         * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
586         * call.c (build_over_call): Just allow the VTT arg.
587         * method.c (make_thunk): Don't set DECL_VTT_PARM.
588         (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
589         (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
590         * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
591         * error.c (dump_function_decl): Likewise.
592         * call.c (build_user_type_conversion_1, convert_like_real): Abort
593         if we try to call a constructor with in-charge or VTT parms.
594         * method.c (skip_artificial_parms_for): New fn.
595         * call.c (add_function_candidate, build_over_call): Call it.
596         * call.c (build_new_method_call): Use current_vtt_parm.
597         * init.c (expand_virtual_init): Likewise.
598         * class.c (same_signature_p): No longer static.
599         * cp-tree.h: Declare it.
600         * search.c (look_for_overrides_r): Use it.
601
602 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
603
604         * cp-tree.h (new_abi_rtti_p): Remove.
605         (name_mangling_version): Likewise.
606         (flag_do_squangling): Likewise.
607         * class.c (build_rtti_vtbl_entries): Remove old ABI support.
608         * decl.c (grokfndecl): Likewise.
609         * decl2.c (name_mangling_version): Remove.
610         (flag_do_squangling): Likewise.
611         (lang_f_options): Remove `squangle'.
612         (unsupported_options): Add `squangle'.
613         (cxx_decode_option): Issue a warning about uses of
614         -fname-mangling-version.
615         (finish_file): Remove old ABI support.
616         * pt.c (check_explicit_specialization): Likewise.
617         (tsubst_decl): Likewise.
618         * rtti.c (init_rtti_processing): Likewise.
619         (build_headof): Likewise.
620         (get_tinfo_decl_dynamic): Likewise.
621         (tinfo_from_decl): Likewise.
622         (build_dynamic_cast_1): Likewise.
623         (synthesize_tinfo_var): Likewise.
624         * init.c (build_new): Allow enumeration types for the array-bounds
625         in a direct-new-declarator.
626
627         * semantics.c (finish_typeof): Resolve OFFSET_REFs.
628
629         * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
630         TREE_PROTECTED from the template being specialized.
631
632 2001-02-17  Jason Merrill  <jason@redhat.com>
633
634         * decl2.c (build_artificial_parm): Set TREE_READONLY.
635
636         * decl.c (bad_specifiers): Allow throw specs on things with
637         pointer-to-function or -member-function type.
638         * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
639         a pmf.
640
641 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
642
643         * call.c (check_dtor_name): Handle template names correctly.
644
645 2001-02-16  Jason Merrill  <jason@redhat.com>
646
647         * cp-tree.h (DECL_USE_VTT_PARM): Remove.
648         * decl2.c (maybe_retrofit_in_chrg): Don't create it.
649         * optimize.c (maybe_clone_body): Don't substitute it.
650         * call.c (build_new_method_call): Check in_chrg instead.
651         * init.c (expand_virtual_init): Likewise.
652
653 2001-02-16  Gabriel Dos Reis  <gdr@codesourcery.com>
654
655         * decl.c (check_tag_decl): Make sure a typedef for an anonymous
656         class-type introduces at least a type-name.
657
658 2001-02-16  Jakub Jelinek  <jakub@redhat.com>
659
660         * call.c (convert_like_real): Create a temporary for non-lvalue.
661
662 2001-02-16  Jeffrey Oldham  <oldham@codesourcery.com>
663
664         * cp-tree.h: Fix typos in comments.
665
666 2001-02-16  Jason Merrill  <jason@redhat.com>
667
668         * optimize.c (remap_block): If we're compiling a clone, pass the
669         new block to insert_block.
670
671 2001-02-16  Mark Mitchell  <mark@codesourcery.com>
672
673         * semantics.c (finish_asm_stmt): Robustify.
674
675 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
676
677         * pt.c (push_template_decl_real): Don't remangle the name of a
678         class template.
679
680 2001-02-15  Jim Meyering  <meyering@lucent.com>
681
682         * Make-lang.in (c++.install-common): Depend on installdirs.
683         (c++.install-info): Likewise.
684         (c++.install-man): Likewise.
685
686 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
687
688         * typeck2.c (build_m_component_ref): Robustify.
689
690 2001-02-15  Alexandre Oliva  <aoliva@redhat.com>
691
692         * friend.c (do_friend): Don't take the nested [template] class
693         into account when deciding whether to warn about the friend
694         function not referring to a template function.
695
696 2001-02-14  Jakub Jelinek  <jakub@redhat.com>
697
698         * typeck.c (build_unary_op): Clarify error message.
699
700 2001-02-08  Aldy Hernandez  <aldyh@redhat.com>
701
702         * parse.y (component_constructor_declarator): allow optional
703         parentheses around constructor class name.
704
705 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
706
707         * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
708         section.
709         * init.c (emit_base_init): Remove incorrect comment about
710         virtual bases.
711         * method.c (make_thunk): Fix comment alignment.
712
713 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
714
715         Kill remnants of this is variable.
716         * cp-tree.h (flag_this_is_variable): Remove.
717         * decl2.c (flag_this_is_variable): Remove.
718         * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
719         (build_vbase_path): The path is non-static, even in a cdtor.
720         (resolves_to_fixed_type_p): Add additional return value.
721         * search.c (init_vbase_pointers): Adjust.
722         * tree.c (lvalue_p_1): Adjust.
723         * typeck.c (mark_addressable): Adjust.
724
725 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
726
727         * pt.c (unify): Don't check cv quals of array types.
728
729 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
730
731         * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
732         check whether we already have the type.
733
734 2001-02-13  Mark Mitchell  <mark@codesourcery.com>
735
736         * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
737         * call.c (build_op_delete_call): Simplify to remove duplicate
738         code.
739         * class.c (clone_function_decl): Don't build the deleting variant
740         of a non-virtual destructor.
741         * decl.c (finish_destructor_body): Don't call delete if this is a
742         non-virtual destructor.
743         * init.c (build_delete): Explicitly call `operator delete' when
744         deleting an object with a non-virtual destructor.
745
746 2001-02-13  Jason Merrill  <jason@redhat.com>
747
748         * lang-specs.h: Add more __EXCEPTIONS.
749
750 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
751
752         * typeck2.c (process_init_constructor): Check
753         TREE_HAS_CONSTRUCTOR before issuing missing init warning.
754
755 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
756
757         * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
758         Remove spurious information in comment. Allow further
759         adjustments of REFERENCE_TYPE args.
760
761 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
762
763         * errfn.c (cp_deprecated): Tweak diagnostic text.
764         * parse.y (new_initializer): Deprecate initializer lists
765         extension.
766
767 2001-02-12  Mark Mitchell  <mark@codesourcery.com>
768
769         Remove old ABI support.
770
771 2001-02-11  Mark Mitchell  <mark@codesourcery.com>
772
773         * decl2.c (flag_vtable_thunks): Always set it to 1.
774         (flag_new_abi): Likewise.
775         * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
776
777         * Makefile.in (g++spec.o): Fix typo.
778
779 2001-02-09  Jason Merrill  <jason@redhat.com>
780
781         * lang-specs.h: Restore definition of __EXCEPTIONS.
782
783 2001-02-08  Jason Merrill  <jason@redhat.com>
784
785         * search.c (shared_member_p): New function.
786         (lookup_field_r): Use it.
787         * cp-tree.h (SHARED_MEMBER_P): Remove.
788
789         * method.c (process_overload_item): Handle template-dependent array
790         bounds.
791         * pt.c (type_unification_real): If we end up with undeduced nontype
792         parms, try again.
793
794         * decl.c (lookup_name_real): Tweak warning to refer to decls, not
795         types.
796
797         * typeck2.c (friendly_abort): Don't say anything if we have
798         earlier errors or sorries.
799
800         * decl.c (check_tag_decl): Notice attempts to redefine bool and
801         wchar_t.  Ignore if in_system_header.
802
803         * decl.c (maybe_push_cleanup_level): New fn...
804         (start_decl_1): ...split out from here.
805         * cvt.c (build_up_reference): Use it.
806         * cp-tree.h: Declare it.
807
808 2001-02-07  Mark Mitchell  <mark@codesourcery.com>
809
810         * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
811         spec.
812
813 2001-02-06  Nathan Sidwell  <nathan@codesourcery.com>
814
815         * pt.c (lookup_template_class): Make sure it's a primary
816         template or template_template_parm when called from the parser.
817         (instantiate_template_class): Add assertion.
818
819 2001-02-05  Alexandre Oliva  <aoliva@redhat.com>
820
821         * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
822         from error_mark_node.
823
824 2001-02-05  Nathan Sidwell  <nathan@codesourcery.com>
825
826         Fix specification and implementation bugs in V3 ABI
827         construction vtables.
828         * cp-tree.h (flag_dump_class_layout): New flag.
829         (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
830         (BINFO_LOST_PRIMARY_P): New flag.
831         (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
832         (BINFO_PRIMARY_MARKED_P): Rename to ...
833         (BINFO_PRIMARY_P): ... here.
834         (binfo_via_virtual): New prototype.
835         * decl2.c (flag_dump_class_layout): New flag.
836         (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
837         use `=' as a file name separator.
838         * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
839         bases.
840         (build_vtbl_address): If this is a virtual primary base, then
841         get the vtbl of what it is ultimately primary for.
842         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
843         for BINFO_PRIMARY_P.
844         (dfs_skip_nonprimary_vbases_markedp): Likewise.
845         (get_shared_vbase_if_not_primary): Likewise.
846         (dfs_get_pure_virtuals): Likewise.
847         (expand_upcast_fixups): Likewise.
848         (fixup_virtual_upcast_offsets): Likewise.
849         (dfs_find_vbase_instance): Likewise.
850         (find_vbase_instance): Likewise.
851         (binfo_from_vbase): Adjust comment to reflect reality.
852         (binfo_via_virtual): New function.
853         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
854         for binfo walking during VTT construction.
855         (dfs_mark_primary_bases): Remove.
856         (force_canonical_binfo_r): New function.
857         (force_canonical_binfo): New function.
858         (mark_primary_virtual_base): New function.
859         (mark_primary_bases): Walk in inheritance graph order, use
860         mark_primary_virtual_base.
861         (determine_primary_base): Use some more intermediate variables.
862         (dfs_find_final_overrider): Don't check for overriding along a
863         virtual path.
864         (dfs_modify_vtables): Walk into primary virtual bases too.
865         (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
866         (build_base_fields): Likewise.
867         (dfs_set_offset_for_unshared_vbases): Likewise.
868         (layout_virtual_bases): Likewise.
869         (end_of_class): Likewise.
870         (finish_struct_1): Call dump_class_hierarchy, if requested.
871         (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
872         (dump_class_hierarchy_r): Add stream parameter. Emit more information.
873         (dump_class_hierarchy): Add file parameter. Append to file, if
874         required.
875         (finish_vtbls): Adjust accumulate_vtbl_inits call.
876         Use canonical base for virtual bases.
877         (build_vtt): Add more comments. Adjust build_vtt_inits call.
878         (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
879         Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
880         VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
881         virtual VTTs.
882         (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
883         from DATA.  We want virtual primary bases and all bases via virtual.
884         Only set BINFO_VPTR_INDEX for top level. Look up from a primary
885         virtual base when not a construction vtable.
886         (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
887         (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
888         Use canonical bases when processing virtual bases.
889         (accumulate_vtbl_inits): We're interested in any base via a
890         virtual path.
891         (dfs_accumulate_vtbl_inits): If this is a primary virtual base
892         within a construction vtable, determine what is being overridden.
893         (build_vtbl_initializer): Add more comments
894         (add_vcall_offset_vtbl_entries_1): Adjust comment.
895         (build_rtti_vtbl_entries): Check if the base has lost its
896         primary.
897
898 2001-02-05  Mark Mitchell  <mark@codesourcery.com>
899
900         * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
901
902 Sun Feb  4 15:52:44 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
903
904         * decl.c (pushdecl): Call abort instead of fatal.
905         * except.c (decl_is_java_type): Call fatal_error instead of fatal.
906         * init.c (build_new_1): Likewise.
907         (build_java_class_ref): Call internal_error and fatal_error, not fatal.
908         * decl.c (build_typename_type): hash_table_init now returns void.
909         decl.c (init_decl_processing): Make an error non-fatal.
910
911 2001-02-04  Mark Mitchell  <mark@codesourcery.com>
912
913         * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
914         Document.
915         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
916         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
917         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
918         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
919         * decl.c (maybe_commonize_var): Use the new name-mangling where
920         appropriate.
921         * decl2.c (comdat_linkage): Enhance comments.  Make all
922         compiler-generated things static, if COMDAT is not available.
923         (get_tinfo_decl): Do not make typeinfo objects that belong in the
924         library COMDAT.
925         (tinfo_base_init): Use the correct mangled name for typeinfo
926         strings, and push them into the global scope.
927         (typeinfo_in_lib_p): New function.
928         (synthesize_tinfo_var): Use it.
929         (create_real_tinfo_var): Likewise.
930
931 2001-02-03  Jakub Jelinek  <jakub@redhat.com>
932
933         * decl.c (push_class_binding): Use context_for_name_lookup instead
934         of CP_DECL_CONTEXT.
935         * search.c (context_for_name_lookup): Remove static.  Check for NULL
936         context in the loop.
937         * cp-tree.h (context_for_name_lookup): Add prototype.
938
939 2001-02-02  Jakub Jelinek  <jakub@redhat.com>
940
941         * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
942         * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
943         Remove.
944         * call.c (convert_class_to_reference, build_user_type_conversion_1,
945         add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
946
947 2001-02-02  Mark Mitchell  <mark@codesourcery.com>
948
949         * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
950         of macros used when compiling g++spec.c.
951         * g++spec.c (lang_specific_driver): Link with the shared
952         libgcc by default.
953
954 2001-01-29  Joseph S. Myers  <jsm28@cam.ac.uk>
955
956         * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
957         make_reference_declarator, make_call_declarator), method.c
958         (implicitly_declare_fn), parse.y (namespace_using_decl,
959         notype_unqualified_id, expr_or_declarator, new_type_id,
960         after_type_declarator, direct_after_type_declarator,
961         notype_declarator, complex_notype_declarator,
962         complex_direct_notype_declarator, qualified_id,
963         notype_qualified_id, overqualified_id, direct_new_declarator,
964         absdcl, direct_abstract_declarator, conversion_declarator), pt.c
965         (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
966         instead of build_parse_node.
967
968 2001-01-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
969
970         * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
971         (minus_one_node): Moved to top level gcc directory.  Renamed
972         to integer_minus_one_node.
973
974         * init.c (init_init_processing): Don't set minus_one_node.
975         (build_vec_init): Use integer_minus_one_node.
976
977         * rtti.c (get_tinfo_decl_dynamic): Likewise.
978
979 2001-01-28  Jakub Jelinek  <jakub@redhat.com>
980
981         * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
982         identical and they would be replaced with constant, remove
983         MODIFY_EXPR from the tree.
984
985 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
986
987         * Make-lang.in: Remove all dependencies on defaults.h.
988         * call.c: Don't include defaults.h.
989         * decl.c: Likewise.
990         * decl2.c: Likewise.
991         * except.c: Likewise.
992         * pt.c: Likewise.
993         * rtti.c: Likewise.
994         * tree.c: Likewise.
995         * typeck.c: Likewise.
996
997 2001-01-25  Jakub Jelinek  <jakub@redhat.com>
998
999         * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
1000         operators even in "C" linkage.
1001         * method.c (set_mangled_name_for_decl): Likewise.
1002         * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
1003         overloaded operators in "C" linkage.
1004
1005 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
1006
1007         * pt.c (tsubst_decl): Remove IN_DECL parameter.
1008         (tsubst_arg_types): Check parameter is not void.
1009         (tsubst): Adjust tsubst_decl call.
1010
1011 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
1012
1013         * call.c (add_builtin_candidate): Quote std properly, from
1014         previous change.
1015
1016 2001-01-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1017
1018         * pt.c (check_explicit_specialization): Clone constructors and
1019         destructors.
1020
1021 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
1022
1023         * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
1024         indicates anything special about template depth. Make sure we
1025         only count the user visible template classes.
1026
1027 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
1028
1029         * call.c (build_conv): Typo in comment.
1030         (add_builtin_candidate): Add more explanation.
1031         Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
1032         Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
1033         when we have enumeral types.
1034         (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
1035         candidates for relops and eqops.
1036         (joust): Simplify control flow. Allow a non-template user
1037         function to hide a builtin.
1038
1039 2001-01-22  Nathan Sidwell  <nathan@codesourcery.com>
1040
1041         * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
1042         (more_specialized): Add deduction parameter.
1043         * call.c (joust): Adjust more_specialized call.
1044         * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
1045         UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
1046         (get_bindings_order): Remove.
1047         (get_bindings_real): Add DEDUCE parameter.
1048         (maybe_adjust_types_for_deduction): Return extra unify flags. Do
1049         REFERENCE_TYPE jig for DEDUCE_ORDER.
1050         (type_unification_real): Deal with DEDUCE_ORDER. Use result of
1051         maybe_adjust_types_for_deduction.
1052         (more_specialized): Add DEDUCE parameter. Call get_bindings_real
1053         directly.
1054         (try_one_overload): Use result of maybe_adjust_types_for_deduction.
1055         (check_cv_quals_for_unify): Use new unify qualifier flags.
1056         (unify): Clear new unify qualifier flags.
1057         (get_bindings_real): Add DEDUCE parameter.
1058         (get_bindings): Adjust call to get_bindings_real.
1059         (get_bindings_overload): Likewise.
1060         (most_specialized_instantiation): Adjust call to
1061         more_specialized.
1062
1063 2001-01-19  Jason Merrill  <jason@redhat.com>
1064
1065         * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
1066
1067         * decl.c (init_decl_processing): Just force -fvtable-thunks on if
1068         -fnew-abi.
1069
1070 2001-01-19  Ute Pelkmann  <scope.muc@t-online.de>
1071
1072         * decl2.c (arg_assoc_class): Fix double iteration logic.
1073
1074 2001-01-19  Jason Merrill  <jason@redhat.com>
1075
1076         * init.c (build_delete): Always call convert_force to strip cv-quals.
1077
1078         * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
1079         * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
1080         * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
1081
1082 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
1083
1084         * search.c (get_vbase_1): Count only virtual bases.
1085
1086 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
1087
1088         * class.c (duplicate_tag_error): Robustify flag clearing.
1089
1090 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
1091
1092         * cp-tree.h (lookup_template_class): Add complain parm.
1093         * decl.c (lookup_namespace_name): Adjust call to
1094         lookup_template_class.
1095         (make_typename_type): Likewise.
1096         * semantics.c (finish_template_type): Likewise.
1097         * pt.c (lookup_template_class): Add complain parm. Adjust.
1098         (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
1099         (tsubst): Likewise.
1100
1101 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
1102
1103         * pt.c (copy_default_args_to_explicit_spec): Preserve
1104         object's CV quals. Reorganize.
1105
1106 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
1107
1108         * typeck.c (build_modify_expr): Say `initialization' for
1109         INIT_EXPRs.
1110         * init.c (build_default_init): Convert to enumeral type, if
1111         needed.
1112
1113 2001-01-18  Jakub Jelinek  <jakub@redhat.com>
1114
1115         * parse.y (nomods_initdcl0): Properly set things up for
1116         initdcl0_innards.
1117
1118 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
1119
1120         * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
1121         (type_unification_real): Set it.
1122         (unify): Use it.
1123
1124 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
1125
1126         * decl.c (finish_destructor_body): Convert to vbase pointer here.
1127
1128 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
1129
1130         * semantics.c (begin_class_definition): Check we're not inside a
1131         template parm list.
1132
1133 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
1134
1135         * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
1136         BASELINK_P.
1137
1138 2001-01-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1139
1140         * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
1141         * call.c (build_over_call): Add comment.
1142
1143 2001-01-16 Daniel Berlin <dberlin@redhat.com>
1144
1145         * cvt.c (ocp_convert): Handle vector type conversion
1146         * typeck2.c (digest_init): Handle vector type initializations
1147
1148 2001-01-16  Phil Edwards  <pme@sources.redhat.com>
1149
1150         * g++spec.c:  Don't add libraries needlessly if -fsyntax-only
1151           was given.
1152
1153 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
1154
1155         * pt.c (check_nontype_parm): Rename to ...
1156         (invalid_nontype_parm_type_p): ... here.
1157         (process_template_parm): Adjust.
1158         (convert_template_argument): Adjust.
1159
1160 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
1161
1162         * pt.c (check_nontype_parm): New function.
1163         (process_template_parm): Use it.
1164         (convert_template_argument): Use it.
1165         (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
1166         member.
1167
1168 2001-01-14  Jeffrey Oldham  <oldham@codesourcery.com>
1169
1170         * tree.c: Add defaults.h
1171         (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
1172         * Make-lang.in (cp/tree.o): Add defaults.h.
1173
1174 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
1175
1176         * Make-lang.in (CXX_C_OBJS): Add c-format.o.
1177
1178 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
1179
1180         * g++.1: Change to be ".so man1/gcc.1".
1181
1182 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
1183
1184         * Make-lang.in (c++.info, c++.install-info): Build and install g++
1185         internals info.
1186         (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
1187         ($(srcdir)/cp/g++int.info): New target.
1188         * gxxint.texi: Add info directory entry.  Use @@ in email address.
1189         * .cvsignore: Update.
1190
1191 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
1192
1193         * typeck.c (build_c_cast): Do template processing earlier.
1194         Always pedwarn on array casts.
1195
1196 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
1197
1198         * friend.c (make_friend_class): Make sure a templated class is
1199         actually a template.
1200
1201 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
1202
1203         * decl2.c (get_guard): Set linkage from guarded decl.
1204
1205 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
1206
1207         * call.c (convert_default_arg): Check for unprocessed
1208         DEFAULT_ARG.
1209         * cp-tree.h (replace_defarg): Move to spew.c.
1210         (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
1211         spew.c, which is where they really are.
1212         (done_pending_defargs): Declare.
1213         (unprocessed_defarg_fn): Declare.
1214         * decl.c (replace_defarg): Move to spew.c
1215         * parse.y (structsp): Call done_pending_defargs.
1216         * spew.c (defarg_fns): Rearrange list structure.
1217         (defarg_fnsdone): New static variable.
1218         (defarg_depfns): New static variable.
1219         (init_spew): Adjust.
1220         (add_defarg_fn): Store the type in TREE_TYPE.
1221         (do_pending_defargs): Detect and deal with ordering constraints
1222         and circularity.
1223         (done_pending_defargs): New function.
1224         (unprocessed_defarg_fn): New function.
1225         (replace_defarg): Moved from decl.c. Robustify. Don't save
1226         if circularity detected.
1227
1228 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
1229
1230         * pt.c (unify): Check array has a domain, before checking
1231         whether it is variable sized.
1232
1233 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
1234
1235         * decl.c (grokparms): Unobfuscate and get correct diagnostic for
1236         parameters with pointers to arrays of unknown bound.
1237
1238 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
1239
1240         * parse.y (template_parm_header, template_spec_header): New
1241         reductions. Split out from ...
1242         (template_header): ... here. Use them.
1243         (template_template_parm): Use template_parm_header.
1244         * semantics.c (finish_template_template_parm): Add assert.
1245
1246 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
1247
1248         * mangle.c (write_builtin_type): Fix thinko.
1249
1250         * pt.c (copy_default_args_to_explicit_spec_1): New function.
1251         (copy_default_args_to_explicit_spec): Likewise.
1252         (check_explicit_specialization): Use it.
1253
1254         * class.c (finish_struct_1):  Remove last argument in call to
1255         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
1256         * decl.c (builtin_function): Likewise.
1257         (build_cp_library_fn): Likewise.
1258         (check_initializer): Likewise.
1259         (make_rtl_for_nonlocal_decl): Likewise.
1260         (cp_finish_decl): Likewise.
1261         (start_function): Likewise.
1262         * decl2.c (finish_anon_union): Likewise.
1263         * friend.c (do_friend): Likewise.
1264         * init.c (build_java_class_ref): Likewise.
1265         * method.c (make_thunk): Likewise.
1266         * pt.c (tsubst_friend_function): Likewise.
1267         * semantics.c (expand_body): Likewise.
1268
1269 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
1270
1271         * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
1272         looking at DECL_CLONED_FUNCTION for non-functions.
1273
1274 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
1275
1276         * error.c (dump_template_parameter): Use parm to determine how
1277         to print default value.
1278
1279 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
1280
1281         * class.c (duplicate_tag_error): Clear more flags.
1282
1283 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
1284
1285         * call.c (build_new_method_call): Use binfo_for_vbase.
1286
1287 2001-01-10  Joseph S. Myers  <jsm28@cam.ac.uk>
1288
1289         * cp-tree.h (flag_cond_mismatch): Don't declare.
1290         * decl2.c (flag_cond_mismatch): Don't define.
1291         (lang_f_options): Remove cond-mismatch.
1292         (unsupported_options): Add cond-mismatch.
1293
1294 2001-01-09  Nathan Sidwell  <nathan@codesourcery.com>
1295
1296         * class.c (handle_using_decl): Reject using of constructor name
1297         of sourcing class. Allow injecting of a method with same name as
1298         nested class. Fixup error messages.
1299
1300 2001-01-09  Joseph S. Myers  <jsm28@cam.ac.uk>
1301
1302         * decl2.c (lang_decode_option): Handle -Wformat=2.
1303
1304 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
1305
1306         * cp-tree.h (lang_decl_flags): Rename defined_in_class to
1307         initialized_in_class.
1308         (DECL_DEFINED_IN_CLASS_P): Rename to ...
1309         (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
1310         * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
1311         (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
1312         * pt.c (check_default_tmpl_args): Adjust for
1313         DECL_INITIALIZED_IN_CLASS_P.
1314         (instantiate_class_template): Likewise.
1315         (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
1316
1317         * class.c (finish_struct): Constify saved_filename.
1318
1319 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
1320
1321         * class.c (duplicate_tag_error): Adjust diagnostic.
1322         (finish_struct): Locally set location to start of struct.
1323         * decl.c (fixup_anonymous_aggr): Use cp_error_at.
1324
1325 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
1326
1327         * decl.c (struct binding_level): Adjust class_shadowed comments
1328         to reflect reality.
1329         (push_class_level_binding): Ajust comments to reflect reality.
1330         Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
1331         Don't set TREE_VALUE on the class_shadowed list.
1332
1333 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1334
1335         * decl2.c (acceptable_java_type): Allow references too.
1336         * init.c (build_java_class_ref): When using the new ABI, search
1337         `class$' and have it mangled with `mangle_decl.'
1338         * mangle.c (write_java_integer_type_codes): New function.
1339         (write_builtin_type): Detect and mangle Java integer and real
1340         types.
1341
1342 2001-01-07  Mark Mitchell  <mark@codesourcery.com>
1343
1344         * decl2.c (grokfield): Don't accept `asm' specifiers for
1345         non-static data members.
1346
1347 2001-01-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1348
1349         * expr.c (cplus_expand_expr): Don't reset `target'.
1350
1351 2001-01-07  Neil Booth  <neil@daikokuya.demon.co.uk>
1352
1353         * cp/decl2.c (cxx_post_options): Call cpp_post_options.
1354
1355 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
1356
1357         * parse.y (template_datadef): Check for error_mark_node.
1358
1359 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
1360
1361         * cp-tree.def (DEFAULT_ARG): Make `x' class.
1362
1363 2001-01-04  Joseph S. Myers  <jsm28@cam.ac.uk>
1364
1365         * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
1366         (record_builtin_type): Make non-static.
1367         (flag_short_double): Don't declare.
1368         (init_decl_processing): Remove the creation of many tree nodes now
1369         in c_common_nodes_and_builtins.
1370         (build_void_list_node): New function.
1371         * decl2.c (flag_short_double, flag_short_wchar): Don't define.
1372         * cp-tree.h (flag_short_wchar): Don't declare.
1373
1374 2001-01-04  Mark Mitchell  <mark@codesourcery.com>
1375
1376         * call.c (build_conv): Don't use build1 for USER_CONV.
1377         * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
1378
1379 2001-01-03  Joseph S. Myers  <jsm28@cam.ac.uk>
1380
1381         * lex.c (lang_init): Call c_common_lang_init.
1382
1383 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
1384
1385         * search.c (lookup_fnfields_here): Remove.
1386         (look_for_overrides_r): Use lookup_fnfields_1.
1387         Ignore functions from using declarations.
1388
1389 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
1390
1391         Implement exceptions specifiers for implicit member functions.
1392         * cp-tree.h (merge_exceptions_specifiers): Declare new function.
1393         * method.c (synthesize_exception_spec): New function.
1394         (locate_dtor, locate_ctor, locate_copy): New functions.
1395         (implicitly_declare_fn): Generate the exception spec too.
1396         * search.c (check_final_overrider): Check artificial functions
1397         too.
1398         * typeck2.c (merge_exception_specifiers): New function.
1399
1400 2001-01-03  Jason Merrill  <jason@redhat.com>
1401
1402         * init.c (build_default_init): New fn.
1403         (perform_member_init): Split out from here.
1404         (build_new_1): Use it.  Simplify initialization logic.
1405         (build_vec_init): Take an array, rather than a pointer and maxindex.
1406         Speed up simple initializations.  Don't clean up if we're assigning.
1407         * cp-tree.h: Adjust.
1408         * decl2.c (do_static_initialization): Remove TREE_VEC case.
1409         * parse.y (new_initializer): Return void_zero_node for ().
1410         * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
1411         * typeck2.c (digest_init): Only complain about user-written
1412         CONSTRUCTORs.
1413
1414 2000-12-22  Mike Stump  <mrs@wrs.com>
1415
1416         * decl2.c: (max_tinst_depth): Increase to 50.
1417
1418 2001-01-02  Mark Mitchell  <mark@codesourcery.com>
1419
1420         * class.c (invalidate_class_lookup_cache): Zero the
1421         previous_class_values.
1422         * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
1423         TREE_INT_CST_HIGH.
1424         (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
1425         * decl.c (free_bindings): New variable.
1426         (push_binding): Don't create a new binding if we have one on the
1427         free list.
1428         (pop_binding): Put old bindings on the free list.
1429         (init_decl_processing): Use size_int, not build_int_2.
1430         Register free_bindings as a GC root.
1431         (cp_make_fname_decl): Use size_int, not build_int_2.
1432         (push_inline_template_parms_recursive): Likewise.
1433         (end_template_parm_list): Likewise.
1434         (for_each_tempalte_parm): Do not use walk_tree_without_duplicates.
1435         (tsubst_template_parms): Use size_int, not build_int_2.
1436         (tsubst): Likewise.
1437         * rtti.c (get_vmi_pseudo_type_info): Likewise.
1438
1439 2001-01-02  Richard Henderson  <rth@redhat.com>
1440
1441         * parse.y (asm): Set ASM_INPUT_P.
1442
1443 2001-01-02  Jason Merrill  <jason@redhat.com>
1444
1445         * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
1446         for v3 ABI.
1447
1448         * typeck.c (cp_truthvalue_conversion): New fn.
1449         * cvt.c (ocp_convert): Use it.
1450
1451         * cp-tree.h: Lose c-common.c decls.
1452
1453         * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
1454         * cvt.c (convert_to_void): Use type_unknown_p.
1455
1456         * typeck.c (strip_all_pointer_quals): Also strip quals from
1457         pointer-to-member types.
1458
1459         * Make-lang.in (cp/TAGS): Use --no-globals.  Ignore parse.c, and treat
1460         parse.y as C.
1461
1462         * call.c (build_new_method_call): Do evaluate the object parameter
1463         when accessing a static member.
1464         * typeck.c (build_component_ref): Likewise.
1465
1466 2001-01-02  Andreas Jaeger  <aj@suse.de>
1467
1468         * decl.c (cp_missing_noreturn_ok_p): New.
1469         (init_decl_processing): Set lang_missing_noreturn_ok_p.
1470
1471 2000-12-29  Jakub Jelinek  <jakub@redhat.com>
1472
1473         * decl.c (init_decl_processing): Fix sign of wchar_type_node.
1474
1475 2000-12-29  Mark Mitchell  <mark@codesourcery.com>
1476
1477         * class.c (pushclass): Remove #if 0'd code.
1478         * cp-tree.h (overload_template_name): Remove.
1479         * decl.c (store_bindings): Simplify.
1480         (pop_from_top_level): Likewise.
1481         * pt.c (overload_template_name): Remove.
1482         (instantiate_decl): Don't call push_to_top_level if it's not
1483         needed.
1484
1485 2000-12-28  Mark Mitchell  <mark@codesourcery.com>
1486
1487         * pt.c (register_local_specialization): Don't return a value.
1488         (lookup_template_class): Use move-to-front heuristic when looking
1489         up template instantiations.
1490         (instantiate_decl): Only push_to_top_level when we're actually
1491         going to instantiate the template.
1492
1493 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
1494
1495         * search.c (binfo_for_vtable): Return least derived class, not
1496         most.  Handle secondary vtables.
1497
1498 2000-12-22  Jason Merrill  <jason@redhat.com>
1499
1500         * pt.c (more_specialized): Don't optimize len==0.
1501         (fn_type_unification): If we're adding the return type, increase len.
1502
1503         * typeck.c (build_binary_op): Fix pmf comparison logic.
1504
1505         * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
1506         DECL_STATIC_FUNCTION_P.
1507
1508         * semantics.c (genrtl_finish_function): Don't try to jump to
1509         return_label unless it exists.
1510
1511         In partial ordering for a call, ignore parms for which we don't have
1512         a real argument.
1513         * call.c (joust): Pass len to more_specialized.
1514         (add_template_candidate_real): Strip 'this', pass len.
1515         * pt.c (more_specialized): Pass len down.  Lose explicit_args parm.
1516         (get_bindings_order): New fn.  Pass len down.
1517         (get_bindings_real): Strip 'this', pass len.
1518         (fn_type_unification): Likewise.
1519         (type_unification_real): Succeed after checking 'len' args.
1520         (most_specialized_instantiation): Lose explicit_args parm.
1521         * class.c (resolve_address_of_overloaded_function): Strip 'this',
1522         pass len.
1523
1524 2000-12-21  Jason Merrill  <jason@redhat.com>
1525
1526         * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
1527         DECL_TEMPLATE_RESULT.
1528
1529         * search.c (lookup_field_r): Call lookup_fnfields_1, not
1530         lookup_fnfields_here.
1531
1532         * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
1533
1534         * call.c (build_object_call): Also allow conversions that return
1535         reference to pointer to function.
1536         (add_conv_candidate): Handle totype being ref to ptr to fn.
1537         (build_field_call): Also allow members of type reference to function.
1538         Lose support for calling pointer to METHOD_TYPE fields.
1539
1540         * error.c (dump_expr): Handle *_CAST_EXPR.
1541
1542         * typeck2.c (build_scoped_ref): Always convert to the naming class.
1543
1544         * tree.c (break_out_cleanups): Lose.
1545         * cp-tree.h: Remove prototype.
1546         * typeck.c (build_component_ref): Don't break_out_cleanups.
1547         (build_compound_expr): Likewise.
1548         * semantics.c (finish_expr_stmt): Likewise.
1549
1550 2000-12-20  Richard Henderson  <rth@redhat.com>
1551
1552         * cp-tree.h: Update declarations.
1553         * decl.c (finish_case_label): Return the new stmt node.
1554         * semantics.c (finish_goto_stmt): Likewise.
1555         (finish_expr_stmt, finish_return_stmt): Likewise.
1556         (finish_break_stmt, finish_continue_stmt): Likewise.
1557         (finish_asm_stmt): Likewise.
1558         * parse.y (already_scoped_stmt): Set STMT_LINENO.
1559         (compstmt, implicitly_scoped_stmt, stmt): Likewise.
1560         (simple_if, simple_stmt): Return the new stmt node.
1561         (save_lineno): New.
1562
1563 2000-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
1564
1565         * cp-tree.h: Don't declare warn_long_long.
1566
1567 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1568
1569         * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
1570         IS_AGGR_TYPE.
1571
1572 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1573
1574         * pt.c (unify): Handle when both ARG and PARM are
1575         BOUND_TEMPLATE_TEMPLATE_PARM.
1576
1577 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1578
1579         * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
1580         DECL_TEMPLATE_PARM_P.
1581
1582 2000-12-15  Jason Merrill  <jason@redhat.com>
1583
1584         * init.c (build_new_1): Reorganize.  Now with 100% fewer SAVE_EXPRs!
1585
1586         * init.c (build_new_1): Don't strip quals from type.
1587
1588         * decl.c (pushdecl): Don't check for linkage on a non-decl.
1589
1590         * call.c (build_op_delete_call): See through ARRAY_TYPEs.
1591
1592         * call.c (build_new_function_call): Lose space before paren in
1593         error message.
1594         (build_new_method_call): Likewise.
1595
1596         * typeck2.c (build_m_component_ref): Propagate quals from datum.
1597
1598 2000-12-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1599
1600         * pt.c (check_explicit_specialization): Propagate default
1601         function arguments to explicit specializations.
1602
1603 2000-12-13  DJ Delorie  <dj@redhat.com>
1604
1605         * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
1606         and <? operators.
1607
1608 2000-12-08  Jason Merrill  <jason@redhat.com>
1609
1610         * error.c (dump_function_name): Don't let the user see __comp_ctor.
1611
1612         Clean up copy-initialization in overloading code.
1613         * call.c (build_user_type_conversion_1): Die if we are asked to
1614         convert to the same or a base type.
1615         (implicit_conversion): Avoid doing so.  Lose reference binding code.
1616         (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
1617         direct-initialization.  Also do direct-init part of copy-init.
1618         (build_user_type_conversion): Don't provide context to convert_like.
1619         * cvt.c (ocp_convert): build_user_type_conversion will now provide
1620         the constructor call for copy-init.
1621
1622         * pt.c (tsubst_decl): Call clone_function_decl here if this is an
1623         instantiation of a member template.
1624         (do_decl_instantiation): Not here.
1625
1626 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
1627
1628         * class.c (check_field_decls): Don't special case anonymous
1629         fields in error messages.
1630         (note_name_declared_in_class): Use %D on diagnostic.
1631
1632         * tree.c (pod_type_p): Use strip_array_types.
1633         (cp_valid_lang_attribute): Likewise.
1634         * typeck.c (cp_type_quals): Strip arrays separately, to avoid
1635         multiple evaluations.
1636         (cp_has_mutable_p): Use strip_array_types.
1637
1638 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
1639
1640         * cp-tree.h (sufficient_parms_p): Declare new function.
1641         * call.c (sufficient_parms_p): New function, broken out of ...
1642         (add_function_candidate): ... here. Use it.
1643         (add_conv_candidate): Use it.
1644         * decl.c (grok_ctor_properties): Use it.
1645
1646 2000-12-07  Jakub Jelinek  <jakub@redhat.com>
1647
1648         * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
1649
1650 2000-12-07  Joseph S. Myers  <jsm28@cam.ac.uk>
1651
1652         * decl2.c (lang_decode_option): Handle -Wformat-security.
1653
1654 2000-12-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1655
1656         * pt.c (verify_class_unification): New function.
1657         (get_class_bindings): Use it.
1658         (try_class_unification): Tidy.
1659         (unify): Handle when argument of a template-id is not
1660         template parameter dependent.
1661         (template_args_equal): Handle when TREE_CODE's do not match.
1662
1663 2000-12-06  Alexandre Oliva  <aoliva@redhat.com>
1664
1665         * lang-specs.h (c++): When invoking the stand-alone preprocessor
1666         for -save-temps, pass all relevant -Defines to it, and then don't
1667         pass them to cc1plus.
1668
1669 2000-12-05  Will Cohen  <wcohen@redhat.com>
1670
1671         * decl.c (finish_case_label): Cleared
1672         more_cleanups_ok in surrounding function scopes.
1673         (define_label): Likewise.
1674
1675 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
1676
1677         * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
1678         (get_matching_virtual): Remove.
1679         (look_for_overrides): Declare new function.
1680         * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
1681         DECL_VINDEX here.
1682         * class.c (check_for_override): Move base class iteration code
1683         to look_for_overrides.
1684         * search.c (next_baselink): Remove.
1685         (get_virtuals_named_this): Remove.
1686         (get_virtual_destructor): Remove.
1687         (tree_has_any_destructors_p): Remove.
1688         (struct gvnt_info): Remove.
1689         (check_final_overrider): Remove `virtual' from error messages.
1690         (get_matching_virtuals): Remove. Move functionality to ...
1691         (look_for_overrides): ... here, and ...
1692         (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
1693         to be overriding.
1694
1695 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
1696
1697         * typeck.c (get_delta_difference): If via a virtual base,
1698         return zero.
1699         * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
1700         adjustment.
1701
1702 2000-12-04  Richard Henderson  <rth@redhat.com>
1703
1704         * error.c (dump_tree): Use output_add_string not OB_PUTS.
1705
1706 2000-12-04  Jason Merrill  <jason@redhat.com>
1707
1708         * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
1709         (write_builtin_type): Pass intSI_type_node and the like through
1710         type_for_mode.
1711         * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
1712         Pass intSI_type_node and the like through type_for_mode.
1713         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
1714         * pt.c (tsubst, unify): Likewise.
1715         * tree.c (walk_tree): Likewise.
1716         * error.c (dump_type): Likewise.
1717         (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
1718
1719         * Make-lang.in: Tweak top comment for emacs.
1720         (cp/TAGS): Restore.
1721
1722         * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
1723
1724         * class.c (clone_function_decl): Robustify.
1725
1726 2000-12-04  Michael Matz  <matzmich@cs.tu-berlin.de>
1727
1728         * decl.c (store_bindings): Only search in the non modified
1729         old_bindings for duplicates.
1730
1731 2000-12-04  Nathan Sidwell  <nathan@codesourcery.com>
1732
1733         * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
1734         TYPE_POLYMORPHIC_P.
1735
1736         * typeck.c (build_static_cast): Remove unused variable.
1737
1738 2000-12-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1739
1740         * pt.c: Fix typo in comment.
1741
1742 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
1743
1744         * decl2.c (warn_format): Remove definition.
1745         (lang_decode_option): Handle -Wformat-nonliteral,
1746         -Wno-format-extra-args and -Wno-format-y2k.  Use set_Wformat.
1747
1748 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
1749
1750         * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
1751         (init_decl_processing): Don't create string_type_node,
1752         const_string_type_node, wint_type_node, intmax_type_node,
1753         uintmax_type_node, default_function_type, ptrdiff_type_node and
1754         unsigned_ptrdiff_type_node.  Adjust position of call to
1755         c_common_nodes_and_builtins.
1756         (identifier_global_value): New function.
1757
1758 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>
1759
1760         * call.c (standard_conversion): Reject pointer to member
1761         conversions from ambiguous, inaccessible or virtual bases.
1762         * typeck.c (build_static_cast): Don't check pointers to members
1763         specially.
1764
1765 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
1766
1767         * method.c (do_build_copy_constructor): Preserve cv
1768         qualifications when accessing source object members.
1769         (do_build_assign_ref): Likewise. Remove separate diagnostics for
1770         unnamed fields.
1771
1772 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
1773
1774         * method.c (do_build_assign_ref): Construct appropriately
1775         CV-qualified base reference. Don't allow const casts in base
1776         conversion.
1777
1778 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
1779
1780         * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
1781         incomplete return type.
1782
1783 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
1784
1785         * parse.y (base_class.1): Produce a _TYPE not a _DECL.
1786         * semantics.c (finish_base_specifier): Accept a _TYPE not a
1787         _DECL.
1788
1789 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
1790
1791         * spew.c (yyerror): Cope if yylval.ttype is NULL.
1792
1793 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
1794
1795         * decl.c (grokdeclarator): Diagnose undefined template contexts.
1796
1797 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
1798
1799         * decl.c (grokdeclarator): Do type access control on friend
1800         class.
1801
1802 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
1803
1804         * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
1805         bison parser ickiness.
1806         * pt.c (tsubst_friend_function): Enter namespace scope when
1807         tsubsting the function name.
1808         * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
1809
1810 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
1811
1812         * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
1813         * cvt.c (cp_convert_to_pointer): Add force parameter.
1814         Allow conversions via virtual base if forced.
1815         (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
1816         (ocp_convert): Likewise.
1817         * search.c (binfo_from_vbase): Return the virtual base's binfo.
1818         * typeck.c (get_delta_difference): Adjust handling of virtual
1819         bases.
1820
1821 2000-11-26  Mark Mitchell  <mark@codesourcery.com>
1822
1823         * tree.c (struct list_hash): Remove.
1824         (list_hash_table): Make it be an htab.
1825         (struct list_proxy): New type.
1826         (list_hash_eq): New function.
1827         (list_hash_pieces): Renamed from ...
1828         (list_hash): ... this.
1829         (list_hash_lookup): Remove.
1830         (list_hash_add): Remove.
1831         (hash_tree_cons): Use the generic hashtable.
1832         (mark_list_hash): Remove.
1833         (init_tree): Create the hashtable.
1834
1835 2000-11-25  Joseph S. Myers  <jsm28@cam.ac.uk>
1836
1837         * method.c (build_mangled_C9x_name): Rename to
1838         build_mangled_C99_name.  Change C9X references in comments to
1839         refer to C99.
1840
1841 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
1842
1843         * parse.y (unary_expr): Move VA_ARG from here ...
1844         (primary): ... to here.
1845
1846 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
1847
1848         * semantics.c (finish_id_expr): If type is error_mark, return
1849         error_mark.
1850
1851 2000-11-23  Nathan Sidwell  <nathan@codesourcery.com>
1852
1853         * pt.c (lookup_template_class): Simplify loop exit constructs.
1854         Cope when there is no partial instantiation of a template
1855         template member.
1856
1857 Thu Nov 23 02:16:47 2000  J"orn Rennecke <amylaar@redhat.com>
1858
1859         * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
1860
1861 2000-11-22  Mark Mitchell  <mark@codesourcery.com>
1862
1863         * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
1864         prefix.
1865
1866         * pt.c (do_decl_instantiate): Explicitly clone constructors and
1867         destructors that haven't already been cloned.
1868
1869 2000-11-20  Richard Henderson  <rth@redhat.com>
1870
1871         * parse.y (yyparse_1): Rename the parser entry point.
1872
1873 2000-11-20  Alex Samuel  <samuel@codesourcery.com>
1874
1875         * mangle.c (write_name): Use <unscoped-name> for names directly in
1876         function scope.
1877         (write_unscoped_name): Accept names directly in function scope.
1878
1879 2000-11-20  Nathan Sidwell  <nathan@codesourcery.com>
1880
1881         * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
1882         * parse.y (extdef): Add EXPORT reduction.
1883         * spew.c (yylex): Don't skip export here.
1884
1885 2000-11-19  Mark Mitchell  <mark@codesourcery.com>
1886
1887         * decl.c (init_decl_processing): Correct name of pure virtual
1888         function under the new ABI.
1889         * rtti.c (throw_bad_cast): Likewise, for bad cast function.
1890         (throw_bad_typeid): Likewise for bad typeid function.
1891
1892 2000-11-18  Mark Mitchell  <mark@codesourcery.com>
1893
1894         * decl.c (grokparms): Don't even function types of `void' type,
1895         either.
1896         * mangle.c (write_type): Don't crash when confronted with the
1897         error_mark_node.
1898
1899         * decl.c (grokparms): Don't create parameters of `void' type.
1900
1901 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
1902
1903         * lex.c (mark_impl_file_chain): Delete.
1904         (init_parse): Remove call to ggc_add_string_root.  No need to
1905         ggc_strdup a string constant.  Do not add impl_file_chain to GC
1906         roots.
1907         (handle_pragma_implementation): No need to ggc_strdup main_filename.
1908
1909 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
1910
1911         * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
1912
1913 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
1914
1915         * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
1916         * decl.c (grokdeclarator): Don't reject void parms here.
1917         (require_complete_types_for_parms): Simplify, use
1918         complete_type_or_else.
1919         (grokparms): Remove bitrot. Remove funcdef parm.
1920         Deal with ellipsis parm lists here.
1921         * semantics.c (finish_parmlist): Don't append void_list_node
1922         here. Set PARMLIST_ELLIPSIS_P.
1923
1924 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
1925
1926         * typeck2.c (incomplete_type_error): Reorganise to avoid
1927         excessive diagnostics.
1928
1929 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
1930
1931         * lex.c (struct impl_files, internal_filename): Constify a char *.
1932
1933 2000-11-16  Mark Mitchell  <mark@codesourcery.com>
1934
1935         * mangle.c (write_special_name_constructor): Don't generate
1936         assembler junk when confronted with an old-style constructor.
1937         (write_special_name_destructor): Likewise.
1938         (mangle_decl_string): Do it here instead.
1939
1940 2000-11-16  Nathan Sidwell  <nathan@codesourcery.com>
1941
1942         * call.c (op_error): Make error messages clearer.
1943
1944 2000-11-15  Mark Mitchell  <mark@codesourcery.com>
1945
1946         * decl.c (wrapup_globals_for_namespace): Don't mark things
1947         TREE_ASM_WRITTEN when they're not.
1948
1949 2000-11-15  Jason Merrill  <jason@redhat.com>
1950
1951         * typeck2.c (friendly_abort): Uncount the error before handing
1952         off to fancy_abort.
1953
1954 2000-11-15  Nathan Sidwell  <nathan@codesourcery.com>
1955
1956         * typeck.c (lookup_anon_field): Cope with qv qualifiers.
1957
1958 2000-11-14  Mark Mitchell  <mark@codesourcery.com>
1959
1960         * class.c (build_vtbl_initializer): Fix typo in comment.
1961         * typeck.c (expr_sizeof): Don't crash on errors.
1962
1963 2000-11-14  Jim Wilson  <wilson@redhat.com>
1964
1965         * lang-specs.h: Add %2 after %(cc1_options).
1966
1967 2000-11-14  Richard Henderson  <rth@redhat.com>
1968
1969         * typeck.c (c_sizeof): Be strict about casting result value
1970         back to c_size_type_node.
1971         (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
1972
1973 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
1974
1975         * typeck.c (build_unary_op): Use boolean_increment from
1976         c-common.c, moving the relevant code there.
1977
1978 2000-11-11  Jason Merrill  <jason@redhat.com>
1979
1980         * typeck.c (mark_addressable): Don't call put_var_into_stack.
1981
1982         * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
1983         in inlines.
1984
1985 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1986
1987         * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
1988         * lex.c (copy_lang_decl): Likewise.
1989
1990 2000-11-09  Mark Mitchell  <mark@codesourcery.com>
1991
1992         * dump.c (cp_dump_tree): Don't dump function bodies here.
1993
1994         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
1995         (dump.o): Update dependency list.
1996         * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
1997         (flag_dump_translation_unit): Likewise.
1998         (CP_TYPE_QUALS): Adjust definition.
1999         (DECL_C_BIT_FIELD): Remove.
2000         (SET_DECL_C_BIT_FIELD): Likewise.
2001         (CLEAR_DECL_C_BIT_FIELD): Likewise.
2002         (add_maybe_template): Likewise.
2003         (strip_array_types): Likewise.
2004         (dump_node_to_file): Likewise.
2005         (cp_dump_tree): New function.
2006         * decl.c (init_decl_processing): Set lang_dump_tree.
2007         * decl2.c (flag_dump_translation_unit): Remove.
2008         * dump.c: Move most of it to ../c-dump.c.
2009         (cp_dump_tree): New function.
2010         * pt.c (add_maybe_template): Remove.
2011         * typeck.c (strip_array_types): Likewise.
2012
2013 2000-11-07  Eric Christopher  <echristo@redhat.com>
2014
2015         * decl.c (init_decl_processing): Change definition of
2016         __wchar_t to wchar_t.  Remove artificial declaration of
2017         wchar_t.
2018         * lex.c: Change instances of __wchar_t to wchar_t.
2019
2020 2000-11-09  Nathan Sidwell  <nathan@codesourcery.com>
2021
2022         * lex.c (do_identifier): Don't lookup_name for operators.
2023         * parse.y (operator): Save looking_for_typename.
2024         (unoperator): Restore it.
2025         * spew.c (frob_opname): Use nth_token for lookahead.
2026
2027 2000-11-08  Nathan Sidwell  <nathan@codesourcery.com>
2028
2029         * decl.c (grok_op_properties): Always use coerce_new_type and
2030         coerce_delete_type.
2031         * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
2032         exception specification. Tidy up.
2033         (coerce_delete_type): Preserve exception specification. Tidy up.
2034
2035 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
2036
2037         * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
2038         (push_binding_level), error.c (cp_tree_printer), pt.c
2039         (process_partial_specialization, tsubst_template_arg_vector),
2040         search.c (lookup_member): Use memset () instead of bzero ().
2041
2042 2000-11-07  Nathan Sidwell  <nathan@codesourcery.com>
2043
2044         * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
2045
2046 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
2047
2048         * Make-lang.in (c++.distdir): Remove.
2049
2050 2000-11-04  Mark Mitchell  <mark@codesourcery.com>
2051
2052         * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
2053         declarations from different namespaces to be combined.
2054
2055 2000-11-03  Zack Weinberg  <zack@wolery.stanford.edu>
2056
2057         * decl.c: Include tm_p.h.
2058
2059 2000-11-03  Joseph S. Myers  <jsm28@cam.ac.uk>
2060
2061         * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
2062
2063 2000-11-02  Joseph S. Myers  <jsm28@cam.ac.uk>
2064
2065         * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
2066         (build_overload_value), repo.c (open_repo_file), xref.c
2067         (open_xref_file): Use strchr () and strrchr () instead of index ()
2068         and rindex ().
2069
2070 2000-11-01  Bernd Schmidt  <bernds@redhat.co.uk>
2071
2072         * call.c (build_over_call): Call fold on the CALL_EXPR.
2073
2074 2000-11-01  Gabriel Dos Reis  <gdr@codesourcery.com>
2075
2076         * error.c (dump_template_decl): Separate template hearders with
2077         space not comma.
2078
2079 2000-10-31  Gabriel Dos Reis  <gdr@codesourcery.com>
2080
2081         * error.c: Move TFF_ macros into cp-tree.h.  Throughout, replace
2082         TS_* flags with corresponding TFF_*.  Adjust prototypes of
2083         functions (which used to take a tree_string_flags) to take an int.
2084
2085         * cp-tree.h (enum tree_string_flags): Remove
2086         (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
2087         TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
2088         TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
2089         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
2090         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
2091         TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
2092         (type_as_string, decl_as_string, expr_as_string,
2093         context_as_string): Adjust prototype.
2094
2095         * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
2096         instead of TS_PLAIN.
2097
2098         * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
2099         instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
2100         plain `0'.
2101
2102 2000-10-30  Mark Mitchell  <mark@codesourcery.com>
2103
2104         * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
2105         (linkage_kind): New enumeration.
2106         (decl_linkage): New function.
2107         * decl2.c (comdat_linkage): Extend comment.
2108         * error.c (dump_function_decl): Print the arguments used to
2109         instantiate a template, even when not printing the type of the
2110         function.
2111         * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
2112         not TREE_PUBLIC, to test for external linkage.
2113         * tree.c (decl_linkage): New function.
2114
2115 2000-10-28  Mark Mitchell  <mark@codesourcery.com>
2116
2117         * pt.c (instantiate_decl): Always instantiate static data members
2118         initialized in-class.
2119
2120 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
2121
2122         * Make-lang.in: Move all build rules here from Makefile.in,
2123         adapt to new context.  Wrap all rules that change the current
2124         directory in parentheses.  Expunge all references to $(P).
2125         When one command depends on another and they're run all at
2126         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
2127         all object-file generation rules.  Delete obsolete variables.
2128
2129         * Makefile.in: Delete.
2130         * config-lang.in: Delete outputs= line.
2131
2132 2000-10-26  Gabriel Dos Reis  <gdr@codesourcery.com>
2133
2134         * error.c (dump_function_decl): Print no space between
2135         `ptr-operator' the `type-specifier' of the return type.
2136         (dump_type_prefix): Make sure we put space at the appropriate
2137         place.
2138
2139 2000-10-23  Jason Merrill  <jason@redhat.com>
2140
2141         * call.c (equal_functions): Also call decls_match for extern "C" fns.
2142
2143 2000-10-22  Jason Merrill  <jason@redhat.com>
2144
2145         * call.c (build_conditional_expr): Use ocp_convert to force
2146         rvalue conversion.
2147
2148 2000-10-22  Mark Mitchell  <mark@codesourcery.com>
2149
2150         * call.c (standard_conversion): Use RVALUE_CONVs for all
2151         expressions that satisfy lvalue_p, not just those that satisfy
2152         real_lvalue_p.
2153
2154         * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
2155
2156         * typeck.c (c_sizeof): Return an expression of `size_t' type,
2157         not one with TYPE_IS_SIZETYPE set.
2158         (dubious_conversion_warnings): Remove special-case code.
2159
2160 2000-10-21  Geoffrey Keating  <geoffk@cygnus.com>
2161
2162         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
2163         * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
2164         (dump_type_prefix): Print vector-of-int as 'int vector'.
2165         (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
2166         * tree.c (walk_tree): Handle VECTOR_TYPE.
2167
2168         * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
2169
2170 2000-10-21  Jason Merrill  <jason@redhat.com>
2171
2172         * parse.y (operator): Set got_object from got_scope.
2173         Set looking_for_typename.
2174         * decl.c (lookup_name_real): Clear val after setting from_obj.
2175         Reorganize diagnostic.
2176
2177 2000-10-20  Jason Merrill  <jason@redhat.com>
2178
2179         * tree.c (walk_tree): Don't walk into default args.
2180
2181         * error.c (dump_expr): Use host_integerp.
2182
2183 2000-10-20  David Edelsohn  <edelsohn@gnu.org>
2184
2185         * typeck2.c (abstract_virtuals_error): Use "because" instead of
2186         "since" in error message.
2187
2188 Fri Oct 20 13:54:59 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2189
2190         * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
2191
2192 2000-10-20  Jeffrey Oldham  <oldham@codesourcery.com>
2193
2194         * decl.c (revert_static_member_fn): Fixed typo.
2195
2196 2000-10-19  Mark Mitchell  <mark@codesourcery.com>
2197
2198         * class.c (subobject_offset_fn): New type.
2199         (dfs_record_base_offsets): Remove.
2200         (record_base_offsets): Likewise.
2201         (dfs_search_base_offsets): Likewise.
2202         (record_subobject_offset): New function.
2203         (check_subobject_offset): Likewise.
2204         (walk_subobject_offsets): Likewise.
2205         (record_subobject_offsets): Likewise.
2206         (layout_conflict_p): Reimplement.
2207         (layout_nonempty_base_or_field): Correct handling of type
2208         conflicts during layout.
2209         (layout_empty_base): Likewise.
2210         (build_base_field): Adjust to handle new representation of empty
2211         base offset table.
2212         (build_base_fields): Likewise.
2213         (layout_virtual_bases): Likewise.
2214         (splay_tree_compare_integer_csts): New function.
2215         (layout_class_type): Use a splay_tree, rather than a varray, to
2216         represent the offsets of empty bases.
2217
2218         * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
2219         * decl.c (select_decl): Don't return declarations that are
2220         DECL_ANTICIPATED.
2221
2222 2000-10-18  Mark Mitchell  <mark@codesourcery.com>
2223
2224         * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
2225         (fake_std_node): New macro.
2226         * decl.c (in_std): Rename to ...
2227         (in_fake_std): ... this.
2228         (flag_no_builtin): Remove.
2229         (flag_no_nonansi_builtin): Likewise.
2230         (walk_namespaces_r): Use fake_std_node.
2231         (push_namespace): Use std_identifier.
2232         (pop_namespace): Use in_fake_std.
2233         (lookup_name_real): Use fake_std_node.
2234         (init_decl_processing): When -fhonor-std, create the `std'
2235         namespace.  Don't create a dummy fake_std_node in that case.
2236         Adjust call to c_common_nodes_and_builtins.  Use std_identifier.
2237         (builtin_function): Put builtins whose names don't begin
2238         with `_' in the std namespace.
2239         * decl2.c (flag_no_builtin): Remove.
2240         (flag_no_nonansi_builtin): Likewise.
2241         (set_decl_namespace): Use fake_std_node.
2242         (validate_nonmember_using_decl): Likewise.
2243         (do_using_directive): Likewise.
2244         (handle_class_head): Likewise.
2245         * dump.c (dequeue_and_dump): Likewise.
2246         * except.c (init_exception_processing): Use std_identifier.
2247         * init.c (build_member_call): Use fake_std_node.
2248         * rtti.c (init_rtti_processing): Use std_identifier.
2249
2250 2000-10-17  Mark Mitchell  <mark@codesourcery.com>
2251
2252         * cp-tree.h (back_end_hook): Remove declaration.
2253         * decl2.c (back_end_hook): Remove definition.
2254
2255         * dump.c (dequeue_and_dump): Dump TREE_USED.
2256
2257 Tue Oct 17 20:19:06 2000  Brad Lucier <lucier@math.purdue.edu>
2258
2259         * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
2260
2261 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
2262
2263         * decl.c (WINT_TYPE): Define.
2264         (init_decl_processing): Create types unsigned_ptrdiff_type_node,
2265         c_size_type_node, signed_size_type_node and wint_type_node.
2266
2267 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
2268
2269         * decl2.c (warn_missing_format_attribute): New variable.
2270         (lang_decode_option): Decode -Wmissing-format-attribute.
2271
2272 2000-10-16  Mark Mitchell  <mark@codesourcery.com>
2273
2274         * typeck.c (qualify_type): Remove.
2275         (composite_pointer_type): Fix handling of conversions to `cv void*'.
2276
2277 2000-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2278
2279         * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
2280
2281 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2282
2283         * Makefile.in (parse.c, parse.h): Create atomically.
2284
2285 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
2286
2287         * class.c (current_obstack): Remove.
2288         * decl.c (ggc_p): Remove.
2289         (start_decl): Don't use decl_tree_cons.
2290         (grokdeclarator): Don't use build_decl_list.
2291         (start_function): Don't use decl_tree_cons.
2292         (finish_function): Don't mess with obstacks.
2293         * decl2.c (grok_x_components): Don't use build_decl_list.
2294         * lex.c (make_call_declarator): Don't call decl_tree_cons.
2295         (implicitly_declare_fn): Don't call build_decl_list.
2296         * parse.y (frob_specs): Don't call build_decl_list or
2297         decl_tree_cons.
2298         (expr_or_declarator_intern): Don't call decl_tree_cons.
2299         (primary): Don't call build_decl_list.
2300         (fcast_or_absdcl): Likewise.
2301         (typed_declspecs): Don't call decl_tree_cons.
2302         (reserved_declspecs): Don't call build_decl_list.
2303         (declmods): Likewise.
2304         (reserved_typespecquals): Likewise.
2305         (aggr): Likewise.
2306         (new_type_id): Likewise.
2307         (cv_qualifiers): Likewise.
2308         (after_type_declarator_intern): Likewise.
2309         (notype_declarator_intern): Likewise.
2310         (absdcl_intern): Likewise.
2311         (named_parm): Likewise.
2312         * pt.c (most_specialized_class): Likewise.
2313         * repo.c (temporary_obstack): Make it a structure, not a pointer.
2314         (init_repo): Initialize it.
2315         * search.c (current_obstack): Remove.
2316         * typeck2.c (add_exception_specifier): Don't call build_decl_list.
2317
2318 2000-10-09  Richard Henderson  <rth@cygnus.com>
2319
2320         * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
2321         (c++ language support bits for libgcc): Remove.
2322         (c++.clean): Remove cplib2.txt cleanup.
2323         * config-lang.in (headers, lib2funcs): Remove.
2324
2325         * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
2326         * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
2327         * inc/cxxabi.h, inc/exception, inc/new: Remove files.
2328         * inc/new.h, inc/typeinfo: Remove files.
2329
2330 2000-10-08  Joseph S. Myers  <jsm28@cam.ac.uk>
2331
2332         * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
2333         defined.
2334         (init_decl_processing): Initialize intmax_type_node and
2335         uintmax_type_node.
2336
2337 2000-10-06  Richard Henderson  <rth@cygnus.com>
2338
2339         * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
2340         (original_result_rtx): Remove.
2341         * decl.c (save_function_data): Don't clear x_result_rtx.
2342         (mark_lang_function): Don't mark it either.
2343         * expr.c (fixup_result_decl): Remove.
2344         * semantics.c (genrtl_named_return_value): Frob the return decl
2345         before calling emit_local_var.
2346         (genrtl_finish_function): Don't call fixup_result_decl.
2347         Always emit the jump to return_label.
2348
2349 2000-10-06  Nathan Sidwell  <nathan@codesourcery.com>
2350
2351         * pt.c (lookup_template_class): Set current access for enum.
2352         (tsubst_enum): Set file & line for enum decl.
2353
2354         * spew.c (yylex): Remove unused variable.
2355
2356 2000-10-05  Richard Henderson  <rth@cygnus.com>
2357
2358         * semantics.c (genrtl_finish_function): Don't init or check
2359         can_reach_end; remove noreturn and return value checks.
2360
2361 2000-10-05  Tom Tromey  <tromey@cygnus.com>
2362
2363         * init.c (build_java_class_ref): Use `build_static_name' with a
2364         suffix, not a prefix, to build the class object's name.
2365
2366 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
2367
2368         * cp-tree.h (access_kind): Fix comment typo.
2369         * decl2.c (grokfield): Fix diagnostic typo.
2370         * semantics.c (finish_template_type): Fix comment typo.
2371         (finish_qualified_object_call_expr): Likewise.
2372
2373 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
2374
2375         * pt.c (tsubst_expr, DECL_STMT case): Don't process if
2376         tsubsting fails.
2377
2378 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
2379
2380         * spew.c (frob_id): New static function.
2381         (frob_opname): Use it.
2382         (yylex): Use it.
2383
2384 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
2385
2386         * decl.c (lang_mark_false_label_stack): Remove.
2387         * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
2388
2389 2000-09-30  Joseph S. Myers  <jsm28@cam.ac.uk>
2390
2391         * gxxint.texi: Use @email for formatting email addresses.
2392
2393 2000-09-29  Gabriel Dos Reis  <gdr@codesourcery.com>
2394
2395         * error.c: Remove direct obstack manipulation.  Replace with
2396         output_buffer-based formatting.  Adjust calls to removed macros.
2397         (obstack_chunk_alloc, obstack_chunk_free): Remove.
2398         (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
2399         OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
2400
2401 2000-09-24  Mark Mitchell  <mark@codesourcery.com>
2402
2403         * ir.texi: Move to ../c-tree.texi.
2404
2405 2000-09-20  Jason Merrill  <jason@redhat.com>
2406
2407         * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
2408
2409 2000-09-21  Andreas Jaeger  <aj@suse.de>
2410
2411         * errfn.c: Move declaration of cp_printer and cp_printers to ...
2412         * cp-tree.h: ... here.
2413
2414         * error.c: Remove declaration of cp_printer.
2415
2416 2000-09-20  Mark Mitchell  <mark@codesourcery.com>
2417
2418         * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
2419
2420 2000-09-20  Hans-Peter Nilsson  <hp@axis.com>
2421
2422         * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
2423         users.
2424
2425 2000-09-18  Mark Mitchell  <mark@codesourcery.com>
2426
2427         * decl.c (start_function): Robustify.
2428
2429 2000-09-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2430
2431         * cp-tree.h (check_function_format): Accept a `status' parameter.
2432
2433         * call.c, typeck.c: Updates calls to `check_function_format'.
2434
2435 2000-09-17  Geoffrey Keating  <geoffk@cygnus.com>
2436
2437         * decl2.c (handle_class_head): Always push some scope even
2438         in the error case.
2439
2440 2000-09-16  Mark Mitchell  <mark@codesourcery.com>
2441
2442         * cp-tree.h (struct cp_language_function): Remove
2443         x_scope_stmt_stack and name_declared.
2444         (current_scope_stmt_stack): Remove.
2445         (function_name_declared_p): New macro.
2446         (struct lang_decl_flags): Use c_lang_decl as a base class.
2447         (context): Remove.
2448         (struct lang_decl): Replace saved_tree with context.
2449         (DECL_FRIEND_CONTEXT): Adjust accordingly.
2450         (SET_DECL_FRIEND_CONTEXT): Likewise.
2451         (DECL_VIRTUAL_CONTEXT): Likewise.
2452         (DECL_SAVED_TREE): Remove.
2453         (C_DECLARED_LABEL_FLAG): Likewise.
2454         (cplus_expand_expr_stmt): Don't declare.
2455         (add_decl_stmt): Likewise.
2456         (add_scope_stmt): Likewise.
2457         * decl.c (mark_stmt_tree): Remove.
2458         (case_compare): Likewise.
2459         (finish_case_label): Use c_add_case_label.
2460         (init_decl_processing): Set more language-specific hooks.
2461         (build_enumerator): Fix typo in comment.
2462         (cplus_expand_expr_stmt): Remove.
2463         (mark_lang_function): Use mark_c_language_function.
2464         (lang_mark_tree): Use c_mark_lang_decl.
2465         * decl2.c: Change order of inclusion.
2466         * except.c: Likewise.
2467         * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR.  Fall
2468         back on c_expand_expr.
2469         * friend.c: Include expr.h.
2470         * init.c: Change order of inclusion.
2471         * Makefile.in: Update dependencies.
2472         * lex.h (free_lang_decl_chain): Remove.
2473         * optimize.c (maybe_clone_body): Use function_name_declared_p.
2474         * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
2475         it doesn't exist.
2476         (instantiate_decl): Use function_name_declared_p.
2477         * semantics.c (lang_expand_expr_stmt): Remove.
2478         (set_current_function_name_declared): Likewise.
2479         (current_function_name_declared): Likewise.
2480         (begin_compound_stmt): Use function_name_declared_p.
2481         (add_decl_stmt): Remove.
2482         (setup_vtbl_ptr): Use function_name_declared_p.
2483         (add_scope_stmt): Remove.
2484         (current_scope_stmt_stack): New function.
2485         (cp_expand_stmt): Don't handle SCOPE_STMTs.
2486         (expand_body): Use function_name_declared_p.
2487         * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
2488         * typeck.c: Change order of includes.
2489         (convert_sequence): Remove.
2490
2491 2000-09-14  Joseph S. Myers  <jsm28@cam.ac.uk>
2492
2493         * lex.c (reswords): Add _Complex.
2494
2495 Thu Sep 14 12:10:45 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2496
2497         * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
2498
2499 2000-09-13  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
2500
2501         * init.c (begin_init_stmts): Don't use // comments.
2502
2503 2000-09-12  Jason Merrill  <jason@redhat.com>
2504
2505         * decl.c (maybe_deduce_size_from_array_init): Set do_default for
2506         all non-extern arrays.
2507
2508         * decl.c (grokdeclarator): Complain about 'friend T' for implicit
2509         typenames, too.  Downgrade complaint to pedwarn.
2510         (xref_tag): Warn about surprising behavior of 'friend struct T'.
2511         * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
2512         'class This::Inherited'.
2513
2514 2000-09-12  Mark Mitchell  <mark@codesourcery.com>
2515
2516         * decl.c (finish_case_label): Given the LABEL_DECL a
2517         DECL_CONTEXT.
2518
2519 2000-09-12  Gabriel Dos Reis  <gdr@codesourcery.com>
2520
2521         * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
2522         TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
2523         TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
2524         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
2525         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
2526         New macros.
2527         (sorry_for_unsupported_tree, print_scope_operator,
2528         print_left_paren, print_right_paren, print_left_bracket,
2529         print_right_bracket, print_whitespace): Likewise.
2530         (aggr_variety): Rename to class_key_or_enum.
2531         (print_type): Rename to print_type_id.
2532         (print_type_specifier_seq, print_simple_type_specifier,
2533         print_elaborated_type_specifier,
2534         print_rest_of_abstract_declarator,
2535         print_parameter_declaration_clause, print_exception_specification,
2536         print_nested_name_specifier, print_template_id,
2537         typedef_original_name,  print_template_argument_list_start,
2538         print_template_argument_list_end): New functions.
2539
2540 2000-09-11  Gabriel Dos Reis  <gdr@codesourcery.com>
2541
2542         * ir.texi: Add more documentation.
2543
2544 2000-09-11  Mark Mitchell  <mark@codesourcery.com>
2545
2546         * cp-tree.h (struct saved_scope): Remove x_function_parms.
2547         (current_function_parms): Don't define.
2548         (struct cp_language_function): Remove parms_stored.
2549         (current_function_just_assigned_this): Don't define.
2550         (current_function_parms_stored): Likewise.
2551         (static_ctors): Declare.
2552         (static_dtors): Likewise.
2553         (SF_EXPAND): Don't define.
2554         (expand_start_early_try_stmts): Remove declaration.
2555         (store_parm_decls): Likewise.
2556         * decl.c (static_ctors): Don't declare.
2557         (static_dtors): Likewise.
2558         (struct binding_level): Remove this_block.
2559         (poplevel): Remove dead code.
2560         (set_block): Likewise.
2561         (mark_binding_level): Don't mark this_block.
2562         (mark_saved_scope): Don't mark x_function_parms.
2563         (init_decl_processing): Don't add current_function_parms as a GC
2564         root.
2565         (check_function_type): Change prototype.
2566         (start_function): Remove RTL-generation code.
2567         (expand_start_early_try_stmts): Remove.
2568         (store_parm_decls): Give it internal linkage.  Remove
2569         RTL-generation code.
2570         (finish_function): Remove RTL-generation code.
2571         * decl2.c (static_ctors): Fix formatting.
2572         (static_dtors): Likewise.
2573         * method.c (use_thunk): Don't call store_parm_decls.
2574         (synthesize_method): Likewise.
2575         * optimize.c (maybe_clone_body): Likewise.
2576         * parse.y (fn.def2): Likewise.
2577         (.set_base_init): Likewise.
2578         (nodecls): Likewise.
2579         * pt.c (instantiate_decl): Likewise.
2580         * rtti.c (synthesize_tinfo_fn): Likewise.
2581         * semantics.c (genrtl_try_block): Simplify.
2582         (expand_body): Use genrtl_start_function and
2583         genrtl_finish_function.
2584         (genrtl_start_function): New function.
2585         (genrtl_finish_function): Likewise.
2586
2587 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
2588
2589         * error.c (cp_tree_printer, case 'P'): Append break.
2590
2591 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
2592
2593         * cp-tree.h (frob_opname): Declare.
2594         * parse.y (saved_scopes): New static variable.
2595         (cp_parse_init): Adjust.
2596         (do_id): If lastiddecl is NULL, do do_identifier.
2597         (operator): Save scope information.
2598         (unoperator): New reduction. Restore scope information.
2599         (operator_name): Append unoperator. Call frob_opname.
2600         * spew.c (frob_opname): Define.
2601
2602 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
2603
2604         * decl.c, rtti.c: Include defaults.h if not already included.
2605         Don't define the *_TYPE_SIZE macros.
2606
2607 2000-09-09  Mark Mitchell  <mark@codesourcery.com>
2608
2609         * cp-tree.h (push_switch): Change prototype.
2610         (check_cp_case_value): Remove declaration.
2611         (decl_constant_value): Likewise.
2612         * decl.c (struct cp_switch): Add switch_stmt and cases.
2613         (case_compare): New function.
2614         (push_switch): Set switch_stmt.  Initialize cases.
2615         (pop_switch): Clean up cases.
2616         (define_case_label): Rename to ...
2617         (finish_case_label): ... this.  Do semantic analysis for case
2618         labels here.
2619         (start_function): Correct comment.
2620         * decl2.c (check_cp_case_value): Remove.
2621         * expr.c (do_case): Remove.
2622         * pt.c (tsubst_expr): Adjust call to finish_case_label.
2623         * semantics.c (genrtl_do_poplevel): Remove declaration.
2624         (RECHAIN_STMTS): Remove.
2625         (finish_break_stmt): Use build_break_stmt.
2626         (finish_continue_stmt): Use build_continue_stmt.
2627         (finish_switch_cond): Adjust condition here, rater than in
2628         c_expand_start_case.
2629         (finish_case_label): Remove.
2630         * typeck.c (c_expand_return): Remove.
2631         (c_expand_start_case): Likewise.
2632
2633 2000-09-07  Gabriel Dos Reis  <gdr@codesourcery.com>
2634
2635         * ir.texi: Document type nodes.
2636
2637 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
2638
2639         * cp-tree.h (init_cp_semantics): Declare.
2640         (genrtl_try_block): Don't declare.
2641         (genrtl_handler): Likewise.
2642         (genrtl_catch_block): Likewise.
2643         (genrtl_ctor_stmt): Likewise.
2644         (genrtl_subobject): Likewise.
2645         (genrtl_do_poplevel): Likewise.
2646         (genrtl_named_return_value): Likewise.
2647         * lex.c (init_parse): Call init_cp_semantics.
2648         * semantics.c (genrtl_try_block): Give it internal linkage.
2649         (genrtl_handler): Likewise.
2650         (genrtl_catch_block): Likewise.
2651         (genrtl_ctor_stmt): Likewise.
2652         (genrtl_subobject): Likewise.
2653         (genrtl_do_poplevel): Likewise.
2654         (genrtl_named_return_value): Likewise.
2655         (lang_expand_stmt): Rename to ...
2656         (cp_expand_stmt): ... this.  Only handle C++-specific nodes.
2657         (init_cp_semantics): Define.
2658
2659         * decl.c (initialize_local_var): Remove RTL-generating code.
2660         * semantics.c (genrtl_try_block): Fix formatting.
2661
2662         Move statement-tree facilities from C++ to C front-end.
2663         * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
2664         (void_zero_node): Remove.
2665         (stmt_tree): Likewise.
2666         (scope_chain): Adjust.
2667         (language_function): Rename to cp_language_function.
2668         (cp_function_chain): Adjust.
2669         (current_stmt_tree): Remove.
2670         (last_tree): Likewise.
2671         (last_expr_type): Likewise.
2672         (struct lang_decl): Adjust.
2673         (STMT_IS_FULL_EXPR_P): Remove.
2674         (add_tree): Remove.
2675         (begin_stmt_tree): Likewise.
2676         (finish_stmt_tree): Likewise.
2677         (walk_tree_fn): Likewise.
2678         (walk_stmt_tree): Likewise.
2679         * class.c (finish_struct): Replace use of add_tree with add_stmt.
2680         * decl.c (mark_stmt_tree): Adjust type.
2681         (init_decl_processing): Don't build void_zero_node.
2682         (initialize_local_var): Adjust usage of current_stmt_tree.
2683         (finish_enum): Use add_stmt, not add_tree.
2684         (save_function_data): Adjust use of language_function.
2685         (finish_constructor_body): Use add_stmt, not add_tree.
2686         (finish_destructor_body): Likewise.
2687         (push_cp_function_context): Adjust use of language_function.
2688         (pop_cp_function_context): Likewise.
2689         (mark_lang_function): Likewise.
2690         (mark_cp_function_context): Likewise.
2691         * init.c (build_aggr_init): Adjust use of current_stmt_tree.
2692         (build_vec_init): Likewise.
2693         * semantics.c (SET_LAST_STMT): Remove.
2694         (RECHAIN_STMTS): Don't use it.
2695         (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
2696         (current_stmt_tree): Define.
2697         (add_tree): Remove.
2698         (finish_goto_stmt): Use add_stmt, not add_tree.
2699         (finish_expr_stmt): Likewise.
2700         (begin_if_stmt): Likewise.
2701         (finish_then_clause): Likewise.
2702         (begin_while_stmt): Likewise.
2703         (begin_do_stmt): Likewise.
2704         (finish_return_stmt): Likewise.
2705         (begin_for_stmt): Likewise.
2706         (finish_break_stmt): Likewise.
2707         (finish_continue_stmt): Likewise.
2708         (begin_switch_stmt): Likewise.
2709         (finish_case_label): Likewise.
2710         (begin_try_block): Likewise.
2711         (begin_function_try_block): Likewise.
2712         (begin_handler): Likewise.
2713         (begin_catch_block): Likewise.
2714         (begin_compound_stmt): Likewise.
2715         (begin_asm_stmt): Likewise.
2716         (finish_asm_stmt): Likewise.
2717         (finish_label_stmt): Likewise.
2718         (add_decl_stmt): Likewise.
2719         (finish_subobject): Likewise.
2720         (finish_decl_cleanup): Likewise.
2721         (finish_named_return_value): Likewise.
2722         (setup_vtbl_ptr): Likewise.
2723         (add_scope_stmt): Likewise.
2724         (finish_stmt_expr): Likewise.
2725         (prune_unused_decls): Remove.
2726         (begin_stmt_tree): Likewise.
2727         (finish_stmt_tree): Likewise.
2728         (prep_stmt): Adjust use of current_stmt_tree.
2729         (lang_expand_stmt): Likewise.
2730         * tree.c (statement_code_p): Remove.
2731         (cp_statement_code_p): New function.
2732         (walk_stmt_tree): Remove.
2733         (init_tree): Set lang_statement_code_p.
2734
2735 2000-09-06  Zack Weinberg  <zack@wolery.cumb.org>
2736
2737         Integrated preprocessor.
2738
2739         * Make-lang.in, Makefile.in: Remove all references to input.c,
2740         gxx.gperf, and hash.h.  Add ../c-lex.o to C_OBJS.
2741         * gxx.gperf, hash.h, input.c: Delete.
2742         * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
2743         initialized properly.
2744
2745         * class.c (fixup_pending_inline): Take a tree, not a
2746         struct pending_inline *.  All callers changed.
2747         (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
2748         RID_PROTECTED entries in ridpointers[] array here.
2749         * decl.c (duplicate_decls): Do not refer to struct
2750         pending_inline.
2751         (record_builtin_type, init_decl_processing): Use RID_MAX not
2752         CP_RID_MAX.
2753         (grokdeclarator): Use C_IS_RESERVED_WORD.
2754         * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
2755         cpplib.
2756         (grok_x_components): Do not inspect pending_inlines chain.
2757
2758         * cp-tree.h (struct lang_identifier): Add rid_code entry.
2759         (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
2760         (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
2761         (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
2762         TIME_IDENTIFIER_FILEINFO): Kill.
2763         Update prototypes.
2764         * lex.h: Expunge cp_rid.  Rewrite RIDBIT macros to use just a
2765         single 32-bit word.
2766         * parse.y: Call do_pending_inlines unconditionally.
2767         reinit_parse_for_method is now snarf_method.  fn.defpen is no
2768         longer necessary.  Remove unnecessary <itype> annotation on
2769         SCOPE.  Do not refer to end_of_file or struct pending_inline.
2770         * semantics.c (begin_inline_definitions): Call
2771         do_pending_inlines unconditionally.
2772
2773         * lex.c: Remove all code now shared with C front end.
2774         Initialize cpplib properly if USE_CPPLIB.  Put reserved words
2775         into the get_identifier table.  Rewrite pragma handling to
2776         work with the registry.  Move code to save tokens for later
2777         processing to spew.c.
2778
2779         * spew.c: Rewrite everything in terms of token streams instead
2780         of text.  Move routines here from lex.c / input.c as
2781         appropriate.  GC-mark trees hanging off the pending inlines
2782         chain.
2783
2784 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
2785
2786         * NEWS: Mention that the named return value extension has been
2787         deprecated.
2788         * cp-tree.h (original_result_rtx): Define.
2789         (TREE_REFERENCE_EXPR): Remove.
2790         (DECL_VPARENT): Likewise.
2791         (pushdecl_nonclass_level): Likewise.
2792         (store_return_init): Likewise.
2793         (reinit_lang_specific): Likewise.
2794         (genrtl_named_return_value): Change prototype.
2795         * decl.c (original_result_rtx): Remove.
2796         (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
2797         Do not generate RTL for local variables here.
2798         (store_return_init): Remove.
2799         * semantics.c (genrtl_named_return_value): Simplify.  Fold in
2800         store_return_init.
2801         (finish_named_return_value): Adjust accordingly.  Warn that this
2802         extension is deprecated.
2803         (lang_expand_stmt): Adjust call to genrtl_named_return_value.
2804
2805 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
2806
2807         * pt.c (type_unification_real): Replace switch with if.
2808         (unify): Tsubst non-type parms before comparing.
2809
2810 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
2811
2812         * error.c (dump_typename): New function, broken out of ...
2813         (dump_type): ... here. Use it.
2814         * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
2815
2816 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
2817
2818         * init.c (build_offset_ref): Deal with namespace scoped
2819         TEMPLATE_ID_EXPRs.
2820
2821 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
2822
2823         * class.c (resolve_address_of_overloaded_function): Add
2824         explanation message.
2825         * decl.c (define_case_label): Reformat explanation.
2826         * decl2.c (finish_static_data_member_decl): Likewise.
2827         (grokfield): Likewise.
2828         * friend.c (do_friend): Likewise.
2829
2830 2000-09-05  Zack Weinberg  <zack@wolery.cumb.org>
2831
2832         * tree.c (walk_tree): Expose tail recursion.
2833         (walk_stmt_tree): New function.
2834         * cp-tree.h: Prototype walk_stmt_tree.
2835         * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
2836         the BLOCKs directly.  If a BLOCK has no variables after
2837         pruning, discard it.
2838         (finish_stmt_tree): Use walk_stmt_tree.  No need to save and
2839         restore the line number.
2840
2841 2000-09-05  Mark Mitchell  <mark@codesourcery.com>
2842
2843         * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
2844         (pt.o): Remove dependency on HTAB_H.
2845         * cp-tree.h: Include hashtab.h.
2846         (walk_tree): Change prototype.
2847         (walk_tree_without_duplicates): New function.
2848         * decl.c (check_default_argument): Use it.
2849         * optimize.c (remap_decl): Adjust calls to walk_tree.
2850         (copy_body): Likewise.
2851         (expand_calls_inline): Likewise.
2852         (calls_setjmp_p): Use walk_tree_without_duplicates.
2853         * pt.c: Don't include hashtab.h.
2854         (for_each_template_parm): Use walk_tree_without_duplicates.
2855         * semantics.c (finish-stmt_tree): Likewise.
2856         (expand_body): Likewise.
2857         * tree.c (walk_tree): Add additional parameter.
2858         (walk_tree_without_duplicates): New function.
2859         (count_trees): Use it.
2860         (verify_stmt_tree): Adjust call to walk_tree.
2861         (find_tree): Use walk_tree_without_duplicates.
2862         (no_linkage_check): Likewise.
2863         (break_out_target_exprs): Adjust call to walk_tree.
2864         (cp_unsave): Likewise.
2865
2866 2000-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2867
2868         * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
2869         (TEMPLATE_TEMPLATE_PARM): Adjust comment.
2870         * cp-tree.h (TYPE_BINFO): Adjust comment.
2871         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
2872         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
2873         (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
2874         (TYPE_TEMPLATE_INFO): Likewise.
2875         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
2876         * class.c (push_nested_class): Likewise.
2877         * decl.c (lookup_name_real): Likewise.
2878         (grokdeclarator): Likewise.
2879         (grok_op_properties): Likewise.
2880         (xref_tag): Likewise.
2881         (xref_basetypes): Likewise.
2882         * decl2.c (constructor_name_full): Likewise.
2883         (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
2884         (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
2885         * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
2886         (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
2887         (dump_type_suffix): Likewise.
2888         * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
2889         instead.
2890         (get_aggr_from_typedef): Likewise.
2891         * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
2892         (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
2893         (write_template_parm): Likewise.
2894         (write_template_template_parm): Check tree code instead of
2895         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
2896         * method.c (build_overload_nested_name): Add
2897         BOUND_TEMPLATE_TEMPLATE_PARM.
2898         (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
2899         * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
2900         * pt.c (convert_template_argument): Check tree code instead of
2901         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
2902         (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
2903         (for_each_template_parm): Adjust comment.
2904         (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.
2905         (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
2906         (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.  Use
2907         template_args_equal to compare template template parameter cases.
2908         * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
2909         * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
2910         instead.
2911         * tree.c (copy_template_template_parm): Decide whether to create
2912         a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
2913         (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
2914         (copy_tree_r): Likewise.
2915         * typeck.c (comptypes): Likewise.  Check tree code instead of
2916         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
2917
2918 2000-09-04  Mark Elbrecht  <snowball3@bigfoot.com>
2919
2920         * decl.c (finish_function): Move the code for handling functions
2921         marked with the constructor and destructor attributes inside the
2922         expand_p block.
2923
2924 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
2925
2926         * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
2927
2928 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
2929
2930         * pt.c (lookup_template_class): Remove abort.
2931         * tree.c (get_type_decl): Allow error_mark_node.
2932
2933 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
2934
2935         * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
2936         TEMPLATE_ID_EXPRs.
2937
2938 2000-09-03  Mark Mitchell  <mark@codesourcery.com>
2939
2940         * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
2941         new ABI mangling.
2942
2943 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
2944
2945         * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
2946         union tag mismatch error reporting.
2947
2948 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
2949
2950         * call.c (build_scoped_method_call): Check it is not a namespace.
2951
2952 2000-08-30  Jason Merrill  <jason@redhat.com>
2953
2954         * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
2955
2956         * tree.c (bot_manip): Check TREE_CONSTANT rather than
2957         !TREE_SIDE_EFFECTS.  Call break_out_target_exprs and
2958         build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
2959
2960         * decl.c (start_function): Always call make_function_rtl.
2961
2962 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
2963
2964         * semantics.c (prune_unused_decls): New function.
2965         (finish_stmt_tree): Call it via walk_tree.
2966
2967 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
2968
2969         * class.c (build_secondary_vtable): Constify a char *.
2970         * decl.c (init_decl_processing): Initialize function_id_node,
2971         pretty_function_id_node, and func_id_node.
2972         * input.c (struct input_source): Constify 'str'.
2973         (feed_input): Constify first argument.
2974         * mangle.c (write_identifier): Constify argument.
2975         * pt.c (mangle_class_name_for_template): Constify argument.
2976
2977 2000-08-29  Mark Mitchell  <mark@codesourcery.com>
2978
2979         * typeck.c (mark_addressable): Remove code that pokes around in
2980         RTL.
2981
2982 2000-08-28  Jason Merrill  <jason@redhat.com>
2983
2984         * lex.c (file_name_nondirectory): Move to toplev.c.
2985
2986         * cp-tree.h (LOCAL_CLASS_P): New macro.
2987         * class.c (finish_struct_1): Use it.
2988
2989 2000-08-27  Alex Samuel  <samuel@codesourcery.com>
2990
2991         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
2992         (write_encoding): Pass another argument to write_name.
2993         (write_name): Add ignore_local_scope parameter.  Fix handling of
2994         local names.
2995         (write_nested_name): Use write_unqualified_name.
2996         (write_prefix): Likewise.  Skip out on FUNCTION_DECLs.
2997         (write_template_prefix): Use write_unqualified_name.
2998         (write_component): Remove.
2999         (write_local_name): Add parameter.  Use direct local entity to
3000         discriminator calculation.
3001         (write_class_enum_type): Pass another argument to write_name.
3002         (write_template_template_arg): Likewise.
3003         (make_guard_variable): Likewise.
3004
3005 2000-08-27  Jason Merrill  <jason@redhat.com>
3006
3007         * decl.c (pushdecl): Matching decls for local externs are found in
3008         the current level.  Propagate linkage information from previous
3009         declarations.
3010
3011 2000-08-26  Gabriel Dos Reis  <gdr@codesourcery.com>
3012
3013         * ir.texi (Expressions): Fix typo.
3014
3015 2000-08-25  Greg McGary  <greg@mcgary.org>
3016
3017         * tree.c (init_tree): Use ARRAY_SIZE.
3018
3019 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
3020
3021         * error.c (cp_tree_printer): Rework.
3022
3023 2000-08-25  Mark Mitchell  <mark@codesourcery.com>
3024
3025         * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
3026         dyn-string.o.
3027         (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
3028         (cp-demangle.o): Remove target.
3029         (dyn-string.o): Likewise.
3030
3031         * decl.c (grokfndecl): Require that `main' return an `int'.
3032         * mangle.c (write_encoding): Don't mangle return types for
3033         conversion functions.
3034
3035 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
3036
3037         * error.c (tree_formatting_info): New data type.
3038         (tree_being_formatted): New macro.
3039         (tree_formatting_flags): Likewise.
3040         (put_whitespace): Likewise.
3041         (print_tree_identifier): Likewise.
3042         (print_identifier): Likewise.
3043         (cp_tree_printer, print_function_argument_list, print_declaration,
3044         print_expression, print_function_declaration,
3045         print_function_parameter, print_type, print_cv_qualifier): New
3046         functions.
3047         (init_error): Initialize lang_printer.
3048
3049 2000-08-24  Jason Merrill  <jason@redhat.com>
3050
3051         * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
3052         adjustment necessary.
3053
3054 2000-08-24  Greg McGary  <greg@mcgary.org>
3055
3056         * cp-tree.h (MAIN_NAME_P): Remove macro.
3057
3058 2000-08-24  Gabriel Dos Reis  <gdr@codesourcery.com>
3059
3060         * error.c (print_instantiation_context): Don't forget to flush the
3061         buffer.
3062
3063 2000-08-23  Jason Merrill  <jason@redhat.com>
3064
3065         * typeck.c (build_ptrmemfunc): Save the input pmf.
3066
3067         * method.c (process_modifiers): Use same_type_p.
3068
3069 2000-08-23  Mark Mitchell  <mark@codesourcery.com>
3070
3071         * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
3072         * mangle.c (write_function_type): Change prototype.
3073         (write_encoding): Don't mangle return types for
3074         constructors or destructors.
3075         (write_type): Adjust call to write_function_type.
3076         * pt.c (instantiate_template): Instantiate alternate entry points
3077         when instantiating the main function.
3078
3079 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
3080
3081         * error.c (cp_print_error_function): Don't use embedded '\n' in
3082         output_printf.
3083
3084 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
3085
3086         * decl.c (init_decl_processing): Remove bogus initialization.
3087         * error.c (lang_print_error_function): Restore here.
3088         (init_error): Initialize print_error_function.
3089
3090 2000-08-22  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
3091
3092         * decl2.c (arg_assoc): Revert my 2000-08-11 change.
3093
3094 2000-08-22  Gabriel Dos Reis  <gdr@codesourcery.com>
3095
3096         * Makefile.in (error.o): Depends on diagnostic.h
3097
3098         * cp-tree.h (problematic_instantiation_changed,
3099         record_last_problematic_instantiation, current_instantiation,
3100         print_instantiation_context): Declare.
3101         (maybe_print_template_context): Remove.
3102
3103         * decl.c (init_decl_processing): Set print_error_function to NULL.
3104         (lang_print_error_function): Remove, since we're using a new
3105         machinery.
3106
3107         * error.c: #include diagnostic.h
3108         (function_category): New function.
3109         (cp_diagnostic_starter): Likewise.
3110         (cp_diagnostic_finalizer): Likewise.
3111         (cp_print_error_function): Likewise.
3112         (maybe_print_instantiation_context): Likewise.
3113         (print_instantiation_full_context): Likewise.
3114         (print_instantiation_partial_context): Likewise.
3115         (print_instantiation_context): Define.
3116         (init_error): Initialize diagnostic pager and finalizer.
3117
3118         * pt.c (problematic_instantiation_changed): Define.
3119         (record_last_problematic_instantiation): Likewise.
3120         (current_instantiation): Likewise.
3121         (maybe_print_template_context): Remove.
3122         (print_template_context): Likewise.
3123         (current_tinst_level): Make static to reflect Brendan Kehoe's
3124         change of 1995-04-13.
3125         (push_tinst_level): Call print_instantiation_context.
3126
3127 2000-08-21  Nix  <nix@esperi.demon.co.uk>
3128
3129         * lang-specs.h: Do not process -o or run the assembler if
3130         -fsyntax-only.
3131
3132 2000-08-21  Joseph S. Myers  <jsm28@cam.ac.uk>
3133
3134         * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
3135         variables.
3136         * decl2.c (lang_decode_option): Disable gettext attributes for
3137         -ansi.
3138
3139 2000-08-21  Gabriel Dos Reis  <gdr@codesourcery.com>
3140
3141         * lex.c (lang_init_options): Default diagnostic message maximum
3142         length to 80, when line-wrapping.
3143
3144 2000-08-20  Mark Mitchell  <mark@codesourcery.com>
3145
3146         * class.c (build_vtbl_initializer): Clear the entire
3147         vtbl_init_data.  Start keeping track of the functions for which we
3148         have created vcall offsets here.
3149         (dfs_build_vcall_offset_vtbl_entries): Remove.
3150         (build_vcall_offset_vtbl_entries): Reimplement.
3151         (add_vcall_offset_vtbl_entries_r): New function.
3152         (add_vcall_offset_vtbl_entries_1): Likewise.  Tweak logic for
3153         computing when vcall offsets are necessary.
3154
3155 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
3156
3157         * decl.c (member_function_or_else): Use cp_error ... %T.
3158         (grokdeclarator): Likewise.
3159         (start_method): Likewise.
3160         * friend.c (make_friend_class): Use cp_pedwarn ... %T.
3161
3162 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
3163
3164         * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
3165         TYPE_DECLs.
3166
3167 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
3168
3169         * cp-tree.h (PTRMEM_OK_P): New macro.
3170         (itf_ptrmem_ok): New enumeration value.
3171         * class.c (resolve_address_of_overloaded_function): Add PTRMEM
3172         argument. Diagnose implicit pointer to member.
3173         (instantiate_type): Don't diagnose implicit pointer to member
3174         here. Pass itf_ptrmem_ok if ok. Adjust calls to
3175         resolve_address_of_overloaded_function.
3176         * init.c (build_offset_ref): Set PTRMEM_OK_P.
3177         (resolve_offset_ref): Don't diagnose implicit pointer to member here.
3178         * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
3179         * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
3180         (build_unary_op): Deal with single non-static member in
3181         microsoft-land.
3182
3183 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
3184
3185         * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
3186
3187 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
3188
3189         * cp-tree.h (enum_name_string): Remove prototype.
3190         (report_case_error): Remove prototype.
3191         * cp/typeck2.c (enum_name_string): Remove.
3192         (report_case_error): Remove.
3193         * error.c (dump_expr): Deal with enum values directly.
3194         Correctly negate integer constant.
3195
3196 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
3197
3198         * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
3199         (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
3200         * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
3201         (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
3202         (__cxa_vec_new): Use __cxa_vec_new2.
3203         (__cxa_vec_delete): Use __cxa_vec_delete2.
3204
3205 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
3206
3207         * vec.cc (__cxa_vec_new): Set "C" linkage.
3208         (__cxa_vec_ctor): Likewise.
3209         (__cxa_vec_cctor): Likewise.
3210         (__cxa_vec_dtor): Likewise.
3211         (__cxa_vec_delete): Likewise.
3212         * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
3213         (__cxa_vec_ctor): Likewise.
3214         (__cxa_vec_cctor): Likewise.
3215         (__cxa_vec_dtor): Likewise.
3216         (__cxa_vec_delete): Likewise.
3217
3218 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
3219
3220         * class.c (instantiate_type): Reinstate local variable
3221         deleted in previous change.
3222
3223         * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
3224         itf_no_attributes.
3225
3226 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
3227
3228         * cp-tree.h (instantiate_type_flags): New enumeration.
3229         (instantiate_type): Change parameter.
3230         * class.c (instantiate_type): Adjust prototype. Adjust.
3231         * call.c (standard_conversion): Adjust instantiate_type call.
3232         (reference_binding): Likewise.
3233         (build_op_delete_call): Likewise.
3234         (convert_like_real): Likewise.
3235         * cvt.c (cp_convert_to_pointer): Likewise.
3236         (convert_to_reference): Likewise.
3237         * pt.c (convert_nontype_argument): Likewise.
3238         * typeck.c (build_binary_op): Likewise.
3239         (build_ptrmemfunc): Likewise.
3240         (convert_for_assignment): Likewise.
3241
3242 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
3243
3244         * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
3245         (current_aggr): Define.
3246         * decl.c (grokdeclarator): Make sure a friend class is an
3247         elaborated type specifier.
3248         * parse.y (current_aggr): Remove static definition.
3249         (cp_parse_init): Adjust.
3250         (structsp): Clear and restore current_aggr.
3251         (component_decl_list): Clear current_aggr.
3252
3253         * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
3254         aggregate tag on the typename's context.
3255
3256         * pt.c (tsubst_friend_class): Return error_mark_node, if
3257         parms becomes NULL.
3258         (instantiate_class_template): Ignore error_mark_node friend types.
3259
3260 2000-08-14  Nathan Sidwell  <nathan@codesourcery.com>
3261
3262         * cvt.c (warn_ref_binding): New static function, broken out of ...
3263         (convert_to_reference): ... here. Use it.
3264
3265 2000-08-11  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
3266
3267         * parse.y (template_arg): Add rule for template qualified with
3268         global scope.
3269
3270 2000-08-11  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
3271
3272         * decl2.c (add_function): Reorganize.
3273         (arg_assoc): Do not consider function template decls.
3274
3275 2000-08-11  Jason Merrill  <jason@redhat.com>
3276
3277         * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
3278         looking inside.
3279
3280 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
3281
3282         * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
3283         (lookup_nested_tag): Likewise.
3284
3285         * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
3286         can be produced.
3287
3288 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
3289
3290         * parse.y (named_complex_class_head_sans_basetype): Remove
3291         always true if.
3292
3293 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
3294
3295         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
3296         explicit TEMPLATE_ID_EXPR args.
3297         (build_expr_from_tree, case CALL_EXPR): Likewise.
3298
3299 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
3300
3301         * decl.c (check_tag_decl): Diagnose typename's which don't
3302         declare anything.
3303
3304 2000-08-10  Nathan Sidwell  <nathan@codesourcery.com>
3305
3306         * init.c (build_aggr_init): Reject bogus array initializers
3307         early.
3308
3309 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
3310
3311         * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
3312         runtime.
3313         * cp/tinfo.cc (__dynamic_cast): Likewise.
3314         * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
3315
3316 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
3317
3318         * cvt.c (convert_to_pointer_force): Fix error message when
3319         attempting to cast from ambiguous base.
3320
3321 2000-08-08  Jason Merrill  <jason@redhat.com>
3322
3323         * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
3324         (tsubst_template_arg_vector): Likewise.
3325
3326         * decl2.c (build_anon_union_vars): Choose the largest field; don't
3327         assume that one will be as large as the union.
3328
3329 2000-08-07  Kazu Hirata  <kazu@hxi.com>
3330
3331         * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
3332         * decl.c (pop_labels): Likewise.
3333
3334 2000-08-04  Jeffrey Oldham  <oldham@codesourcery.com>
3335
3336         * inc/cxxabi.h (__pbase_type_info): Changed member names to match
3337         specifications.
3338         (__pointer_to_member_type_info): Likewise.
3339         (__base_class_info): Likewise.
3340         (__class_type_info): Likewise.
3341         (__si_class_type_info): Likewise.
3342         (__vmi_class_type_info): Likewise.
3343         * tinfo.cc (__si_class_type_info::__do_find_public_src):
3344         Changed member names to match specifications.
3345         (__vmi_class_type_info::__do_find_public_src): Likewise.
3346         (__si_class_type_info::__do_dyncast): Likewise.
3347         (__vmi_class_type_info::__do_dyncast): Likewise.
3348         (__si_class_type_info::__do_upcast): Likewise.
3349         (__vmi_class_type_info::__do_upcast): Likewise.
3350         * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
3351         (__pbase_type_info::__pointer_catch): Likewise.
3352         (__pointer_type_info::__pointer_catch): Likewise.
3353         (__pointer_to_member_type_info::__pointer_catch): Likewise.
3354
3355 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
3356
3357         * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
3358         * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
3359         (cc1plus): Link with $(BACKEND) and $(C_OBJS).
3360
3361 2000-08-04  Mark Mitchell  <mark@codesourcery.com>
3362
3363         * cp-tree.h (add_method): Change prototype.
3364         * class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
3365         Don't double the size of the method vector in the error case.
3366         (handle_using_decl): Adjust call to add_method.
3367         (add_implicitly_declared_members): Likewise.
3368         (clone_function_decl): Likewise.
3369         * decl2.c (check_classfn): Likewise.
3370         * semantics.c (finish_member_declaration): Likewise.
3371
3372 2000-08-04  Joseph S. Myers  <jsm28@cam.ac.uk>
3373
3374         * decl.c (flag_isoc94): New variable.
3375
3376 2000-08-02  Jason Merrill  <jason@redhat.com>
3377
3378         * pt.c (do_type_instantiation): Add complain parm; don't complain
3379         if called recursively.
3380         * cp-tree.h, parse.y: Adjust.
3381
3382 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
3383
3384         * decl2.c: Silently ignore -Wstrict-prototypes; warn about
3385         -Wno-strict-prototypes.
3386
3387         * g++spec.c: Adjust type of second argument to
3388         lang_specific_driver, and update code as necessary.
3389
3390         * cp-tree.h: Don't prototype min_precision here.
3391         (my_friendly_assert): Cast expression to void.
3392         * semantics.c (do_poplevel): Initialize scope_stmts.
3393
3394 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
3395
3396         * cp-tree.h (DECL_NEEDED_P): Tweak.
3397
3398 2000-07-28  Jason Merrill  <jason@redhat.com>
3399
3400         * lang-specs.h: Use %i in rule for .ii files.
3401
3402 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
3403
3404         * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
3405
3406 2000-07-30  Mark Mitchell  <mark@codesourcery.com>
3407
3408         Allow indirect primary bases.
3409         * cp-tree.h (struct lang_type): Remove vfield_parent.  Add
3410         primary_base.
3411         (CLASSTYPE_VFIELD_PARENT): Remove.
3412         (CLASSTYPE_PRIMARY_BINFO): Reimplement.
3413         (BINFO_PRIMARY_BINFO): Remove.
3414         (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
3415         (BINFO_VBASE_PRIMARY_P): Likewise.
3416         (BINFO_PRIMARY_BASE_OF): New macro.
3417         (BINFO_INDIRECT_PRIMARY_P): Likewise.
3418         (get_primary_binfo): New function.
3419         * decl.c (lang_mark_tree): Make lang_type::primary_base.
3420         * class.c (vcall_offset_data_s): Rename to ...
3421         (vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
3422         and add ctor_vtbl_p.
3423         (get_derived_offset): Use get_primary_binfo.
3424         (dfs_mark_primary_bases): Adjust handling of virtual primary
3425         bases.
3426         (mark_primary_bases): Likewise.
3427         (set_primary_base): Take a binfo, not an integer, as a
3428         representation of the primary base.
3429         (indirect_primary_base_p): Remove.
3430         (determine_primary_base): Adjust for indirect primary bases.
3431         (dfs_find_final_overrider): Fix typo in coment.
3432         (update_vtable_entry_for_fn): Use get_primary_binfo.
3433         (layout_nonempty_base_or_field): Tweak.
3434         (build_base_fields): Adjust for new primary base semantics.
3435         (dfs_propagate_binfo_offsets): Remove.
3436         (propagate_binfo_offsets): Rewrite.
3437         (dfs_set_offset_for_shared_vbases): Remove.
3438         (layout_virtual_bases): Don't use it.
3439         (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
3440         ABI.
3441         (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
3442         CLASSTYPE_VFIELD_PARENT.
3443         (dfs_get_primary_binfo): New function.
3444         (get_primary_binfo): Likewise.
3445         (dump_class_hierarchy_r): Tweak printing of primary bases.
3446         (build_vtbl_initializer): Fix typo in comments.  Use
3447         vtbl_init_data.
3448         (build_vcall_and_vbase_vtbl_entries): Likewise.
3449         (build_vbaes_offset_vtbl_entries): Likewise.
3450         (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
3451         BV_VCALL_INDEX to handle indirect primary bases.
3452         (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
3453         (build_rtti_vtbl_entries): Likewise.
3454         * search.c (get_shared_vbase_if_not_primary): Tweak.
3455         (find_vbase_instance): Likewise.
3456         (binfo_for_vtable): Simplify.
3457         * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
3458         (make_binfo): Make it have 11 entries.
3459
3460 2000-07-30  Alex Samuel  <samuel@codesourcery.com>
3461
3462         * mangle.c (DECL_TEMPLATE_ID_P): Remove.
3463         (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
3464         ascertaining primaryness.
3465         (G): Remove template_args.
3466         (decl_is_template_id): New function.
3467         (write_encoding): Use decl_is_template_id.
3468         (write_name): Likewise.  Handle type_decls.  Get main variant of
3469         type decls.
3470         (write_nested_name): Likewise.
3471         (write_prefix): Likewise.
3472         (write_template_prefix): Likewise.
3473         (write_special_name_constructor): Remove defunct production from
3474         comment.
3475         (write_bare_function_type): Remove comment about absent parameter.
3476         (write_template_template_arg): Add missing grammar production to
3477         comment.
3478
3479 2000-07-27  Jason Merrill  <jason@redhat.com>
3480
3481         * decl.c (duplicate_decls): If common_type produces a non-typedef
3482         type for a typedef, just use the old type.
3483
3484 2000-07-27  Mark Mitchell  <mark@codesourcery.com>
3485
3486         * cp-tree.h (function_depth): Declare.
3487         (verify_stmt_tree): Likewise.
3488         (find_tree): Likewise.
3489         * decl.c (function_depth): Give it external linkage.
3490         * optimize.c (optimize_function): Increment and decrement it.
3491         * tree.c (verify_stmt_tree_r): New function.
3492         (verify_stmt_tree): Likewise.
3493         (find_tree_r): Likewise.
3494         (find_tree): Likewise.
3495
3496 2000-07-27  Jason Merrill  <jason@redhat.com>
3497
3498         * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
3499         TYPE_PTRMEMFUNC_P.
3500         * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
3501
3502 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
3503
3504         * decl.c (start_cleanup_fn): Mark the function as `inline'.
3505         * decl2.c (get_guard): Call cp_finish_decl, not
3506         rest_of_decl_compilation, for local guards.
3507         * lex.c (do_identifier): Remove unused variable.
3508
3509 Wed Jul 26 15:05:51 CEST 2000   Marc Espie <espie@cvs.openbsd.org>
3510
3511         * parse.y:  Add missing ';'.
3512
3513 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
3514
3515         * parse.y (empty_parms): Use `()', not `(...)', when in the scope
3516         of `extern "C++"'.
3517
3518 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
3519
3520         Kill strict_prototype. Backwards compatibility only for
3521         non NO_IMPLICIT_EXTERN_C systems.
3522         * cp-tree.h (flag_strict_prototype): Remove.
3523         (strict_prototype): Remove.
3524         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
3525         * decl.c (maybe_push_to_top_level): Adjust.
3526         (pop_from_top_level): Adjust.
3527         (decls_match): Only allow sloppy parm matching for ancient
3528         system headers.
3529         (init_decl_processing): Adjust.
3530         (grokdeclarator): Adjust.
3531         * decl2.c (flag_strict_prototype): Remove.
3532         (strict_prototype): Remove.
3533         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
3534         (lang_f_options): Remove "strict-prototype".
3535         (unsupported-options): Add "strict-prototype".
3536         * lex.c (do_identifier): Adjust.
3537         (do_scoped_id): Adjust.
3538         * parse.y (empty_parms): Adjust.
3539         * class.c (push_lang_context): Adjust.
3540         (pop_lang_context): Adjust.
3541         * typeck.c (comp_target_parms): Adjust.
3542
3543 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
3544
3545         * decl.c (poplevel): Deal with anonymous variables at for scope.
3546         (maybe_inject_for_scope_var): Likewise.
3547
3548 2000-07-25  Zack Weinberg  <zack@wolery.cumb.org>
3549
3550         * decl.c: Remove all signal handling code, now done in toplev.c.
3551
3552 2000-07-23  Mark Mitchell  <mark@codesourcery.com>
3553
3554         * decl.c (make_rtl_for_nonlocal_decl): Rework.
3555
3556         * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
3557         correctly.
3558
3559 2000-07-20  Zack Weinberg  <zack@wolery.cumb.org>
3560
3561         * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
3562         Define my_friendly_assert and my_friendly_abort as macros
3563         which may call friendly_abort.  Prototype friendly abort, not
3564         my_friendly_abort or my_friendly_assert.
3565         * decl.c (signal_catch): Report the signal caught in the error
3566         message.  Call fatal directly.
3567         * typeck2.c (ack, my_friendly_assert): Delete.
3568         (my_friendly_abort): Rename to friendly_abort.  Expect file,
3569         line, and function parameters.  Report the abort code, then
3570         call fancy_abort.  Do not mask an abort if errors have
3571         already occurred.
3572
3573 2000-07-18  Nathan Sidwell  <nathan@codesourcery.com>
3574
3575         * typeck.c (comp_target_parms): Remove obsolete parameter.
3576         (comp_target_types): Adjust.
3577
3578 2000-07-17  Jason Merrill  <jason@redhat.com>
3579
3580         * typeck.c (mark_addressable): Never set TREE_USED.
3581         * call.c (build_call): Don't abort on calls to library functions
3582         that have been declared normally.
3583
3584         * typeck.c (build_binary_op): Fix grammar in warning.
3585
3586         * exception.cc (__eh_free): Fix prototype.
3587
3588         * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
3589
3590         * decl.c (pushdecl): Handle seeing an OVERLOAD in
3591         IDENTIFIER_NAMESPACE_VALUE.
3592
3593 2000-07-16  Mark Mitchell  <mark@codesourcery.com>
3594
3595         * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
3596         * method.c (use_thunk): Correct handling of vcall offsets.
3597
3598 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
3599
3600         * .cvsignore: parse.h and parse.c have no cp- prefix.
3601
3602 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
3603
3604         * .cvsignore: New file.
3605
3606 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
3607
3608         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
3609
3610 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
3611
3612         * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
3613         * parse.c: Remove.
3614         * parse.h: Likewise.
3615
3616 2000-07-11  Mark Mitchell  <mark@codesourcery.com>
3617
3618         * class.c (layout_class_type): Add pointers to virtual bases after
3619         base classes under the old ABI.
3620
3621 2000-07-10  Benjamin Chelf  <chelf@codesourcery.com>
3622
3623         * semantics.c (finish_for_stmt): Remove call to emit_line_note.
3624         (finish_continue_stmt): Likewise.
3625         (begin_for_stmt): Remove call to note_level_for_for.
3626         (finish_goto_stmt): Change call from build_min_nt
3627         to build_stmt.
3628         (finish_expr_stmt): Likewise.
3629         (begin_if_stmt): Likewise.
3630         (begin_while_stmt): Likewise.
3631         (finish_while_stmt): Likewise.
3632         (finish_return_stmt): Likewise.
3633         (begin_for_stmt): Likewise.
3634         (finish_for_stmt): Likewise.
3635         (finish_break_stmt): Likewise.
3636         (begin_switch_stmt): Likewise.
3637         (finish_case_label): Likewise.
3638         (genrtl_try_block): Likewise.
3639         (begin_try_block): Likewise.
3640         (begin_handler): Likewise.
3641         (begin_compound_stmt): Likewise.
3642         (finish_asm_stmt): Likewise.
3643         (finish_label_stmt): Likewise.
3644         (add_decl_stmt): Likewise.
3645         (finish_subobject): Likewise.
3646         (finish_decl_cleanup): Likewise.
3647         (finish_named_return_value): Likewise.
3648         (setup_vtbl_ptr): Likewise.
3649         (add_scope_stmt): Likewise.
3650         * decl.c (finish_constructor_body): Likewise.
3651         (finish_destructor_body): Likewise.
3652         * optimize.c (copy_body_r): Likewise.
3653         (initialize_inlined_parameters): Likewise.
3654         (declare_return_variable): Likewise.
3655         (expand_call_inline): Likewise.
3656
3657 2000-07-10  Jakub Jelinek  <jakub@redhat.com>
3658
3659         * semantics.c (expand_body): Sync interface information
3660         at the end of function body expansion.
3661
3662 2000-07-09  Jason Merrill  <jason@redhat.com>
3663
3664         * init.c (build_new_1): Bail early if the call to new fails.
3665
3666         * decl.c (compute_array_index_type): Check specifically for
3667         an INTEGER_CST, not just TREE_CONSTANT.
3668
3669         * decl.c (duplicate_decls): Don't call duplicate_decls on
3670         the DECL_TEMPLATE_RESULT.
3671         (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
3672         codes.
3673
3674         * error.c (dump_template_bindings): Don't crash if we had an
3675         invalid argument list.
3676
3677         * typeck.c (c_expand_start_case): Do narrowing here.
3678         * semantics.c (finish_switch_cond): Not here.
3679
3680 2000-07-09  Hidvegi Zoli  <hzoli@austin.ibm.com>
3681
3682         * parse.y (asm_clobbers): Do string concatenation.
3683
3684 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
3685
3686         * decl.c (pushtag): Don't put local classes in template functions
3687         on the local_classes list.
3688
3689 2000-07-04  Scott Snyder  <snyder@fnal.gov>
3690
3691         * decl2.c (get_guard): Add missing return for old ABI local
3692         variable case.
3693
3694 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
3695
3696         * cp-tree.h (char_type_p): New function.
3697         * decl.c (init_decl_processing): Don't initialize
3698         signed_wchar_type_node or unsigned_wchar_type_node.
3699         (complete_array_type): Handle brace-enclosed string-constants.
3700         * rtti.c (emit_support_tinfos): Remove #if 0'd code.
3701         * tree.c (char_type_p): New function.
3702         * typeck2.c (digest_init): Use char_type_p.
3703
3704 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
3705
3706         * pt.c (tsubst): Don't layout type, if it's error_mark.
3707
3708 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
3709
3710         * pt.c (instantiate_pending_templates): Reset template level.
3711
3712 2000-07-05  Jason Merrill  <jason@redhat.com>
3713
3714         * call.c (joust): Don't complain about `operator char *()' beating
3715         `operator const char *() const'.
3716
3717 2000-07-04  scott snyder  <snyder@fnal.gov>
3718             Jason Merrill  <jason@redhat.com>
3719
3720         * repo.c (repo_get_id): Handle the case where a class with virtual
3721         bases has a null TYPE_BINFO_VTABLE.
3722
3723 2000-07-04  Kevin Buhr  <buhr@stat.wisc.edu>
3724             Jason Merrill  <jason@redhat.com>
3725
3726         * parse.y (member_init): Just pass in the type.
3727         * init.c (expand_member_init): Handle getting a type.
3728
3729 2000-07-04  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
3730             Jason Merrill  <jason@redhat.com>
3731
3732         * decl.c (finish_function): Warn if a function has no return
3733         statement.
3734         Suggested by Andrew Koenig.
3735         * typeck.c (check_return_expr): Do set current_function_returns_value
3736         if we got an error_mark_node.
3737
3738 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
3739
3740         * decl2.c (push_decl_namespace): Push the original namespace.
3741
3742 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
3743
3744         * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
3745         * semantics.c (begin_class_definition): Clear it.
3746
3747 2000-07-02  Benjamin Chelf  <chelf@codesourcery.com>
3748
3749         * cp-tree.h (genrtl_goto_stmt): Remove declaration.
3750         (genrtl_expr_stmt): Likewise.
3751         (genrtl_decl_stmt): Likewise.
3752         (genrtl_if_stmt): Likewise.
3753         (genrtl_while_stmt): Likewise.
3754         (genrtl_do_stmt): Likewise.
3755         (genrtl_return_stmt): Likewise.
3756         (genrtl_for_stmt): Likewise.
3757         (genrtl_break_stmt): Likewise.
3758         (genrtl_continue_stmt): Likewise.
3759         (genrtl_scope_stmt): Likewise.
3760         (genrtl_switch_stmt): Likewise.
3761         (genrtl_case_label): Likewise.
3762         (genrtl_begin_compound_stmt): Likewise.
3763         (genrtl_finish_compound_stmt): Likewise.
3764         (genrtl_compound_stmt): Likewise.
3765         (genrtl_asm_stmt): Likewise.
3766
3767         * init.c (begin_init_stmts): Remove call to
3768         genrtl_begin_compound_stmt.
3769         (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
3770
3771         * semantics.c (lang_expand_stmt): Changed call to
3772         genrtl_compound_stmt to ignore return value.
3773
3774 2000-07-02  Mark Mitchell  <mark@codesourcery.com>
3775
3776         * mangle.c (canonicalize_for_substitution): Return the canonical
3777         variant of a type.
3778
3779         * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
3780         TYPE_DECL.
3781         * typeck.c (commonparms): Remove obstack manipulations.
3782
3783 2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>
3784
3785         * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
3786
3787         * Makefile.in (OBJS): Added ../c-semantics.o.
3788         (OBJDEPS): Likewise.
3789
3790         * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
3791         ../c-common.h.
3792         (struct stmt_tree): Added comment.
3793         (current_function_name_declared): Removed.
3794         (stmts_are_full_exprs_p): Likewise.
3795         (genrtl_do_pushlevel): Likewise.
3796         (genrtl_clear_out_block): Likewise.
3797         (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
3798         (DECL_ANON_UNION_ELEMS): Likewise.
3799         (emit_local_var): Likewise.
3800         (make_rtl_for_local_static): Likewise.
3801         (do_case): Likewise.
3802         (expand_stmt): Likewise.
3803         (genrtl_decl_cleanup): Likewise.
3804         (c_expand_asm_operands): Likewise.
3805         (c_expand_return): Likewise.
3806         (c_expand_start_case): Likewise.
3807
3808         * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
3809         (emit_local_var): Likewise.
3810         (initialize_local_var): Change reference to
3811         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
3812         Change reference to stmts_are_full_exprs_p to
3813         current_stmt_tree->stmts_are_full_exprs_p.
3814         (push_cp_function_context): Likewise.
3815
3816         * expect.c (expand_throw): Change reference to
3817         stmts_are_full_exprs_p.
3818
3819         * init.c (build_aggr_init): Change reference to
3820         stmts_are_full_exprs_p.
3821         (build_vec_init): Likewise.
3822
3823         * optimize.c (maybe_clone_body): Change reference to
3824         current_function_name_declared to
3825         cp_function_chain->name_declared.
3826
3827         * pt.c (instantiate_decl): Change reference to
3828         current_function_name_declared to
3829         cp_function_chain->name_declared.
3830
3831         * semantics.c (expand_cond): Moved declaration to c-common.h.
3832         (genrtl_do_pushlevel): Moved to c-semantics.c.
3833         (genrtl_clear_out_block): Likewise.
3834         (genrtl_goto_stmt): Likewise.
3835         (genrtl_expr_stmt): Likewise.
3836         (genrtl_decl_stmt): Likewise.
3837         (gerntl_if_stmt): Likewise.
3838         (genrtl_while_stmt): Likewise.
3839         (genrtl_do_stmt): Likewise.
3840         (genrtl_return_stmt): Likewise.
3841         (genrtl_for_stmt): Likewise.
3842         (genrtl_break_stmt): Likewise.
3843         (genrtl_continue_stmt): Likewise.
3844         (genrtl_scope_stmt): Likewise.
3845         (genrtl_switch_stmt): Likewise.
3846         (genrtl_case_label): Likewise.
3847         (genrtl_begin_compound_stmt): Likewise.
3848         (genrtl_finish_compound_stmt): Likewise.
3849         (genrtl_compound_stmt): Likewise.
3850         (genrtl_asm_stmt): Likewise.
3851         (genrtl_decl_cleanup): Likewise.
3852         (expand_cond): Likewise.
3853         (expand_stmt): Renamed to ...
3854         (lang_expand_stmt): ... this.
3855         (lang_expand_expr_stmt): Initialize.
3856         (set_current_function_name_declared): Likewise.
3857         (stmts_are_full_exprs_p): Likewise.
3858         (current_function_name_declared): Likewise.
3859         (anon_aggr_type_p): Likewise.
3860         (do_poplevel): Change reference to
3861         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
3862         Change reference to stmts_are_full_exprs_p to
3863         current_stmt_tree->stmts_are_full_exprs_p.
3864         (add_tree): Likewise.
3865         (finish_expr_stmt): Likewise.
3866         (prep_stmt): Likewise.
3867         (lang_expand_stmt): Likewise.
3868         (begin_compound_stmt): Change reference to
3869         current_function_name_declared to
3870         cp_function_chain->name_declared and call to
3871         current_function_name_declared().
3872         (setup_vtbl_ptr): Likewise.
3873         (genrtl_do_poplevel): Removed.
3874
3875 2000-06-30  Jason Merrill  <jason@redhat.com>
3876
3877         * init.c (init_init_processing): Go back to aligning like
3878         double_type_node for old ABI.
3879         (get_cookie_size): Make cookie larger if we get a type that needs
3880         more alignment.
3881         (build_vec_delete): Call it.
3882
3883         * typeck.c (qualify_type_recursive): New fn.
3884         (composite_pointer_type): Use it.
3885         (build_binary_op): Use composite_pointer_type.
3886
3887 2000-06-24  Carlos O'Ryan  <coryan@cs.wustl.edu>
3888             Jason Merrill  <jason@redhat.com>
3889
3890         * typeck.c (check_return_expr): Don't complain about returning
3891         NULL from operator new if -fcheck-new.
3892         * cp-tree.h: Declare flag_check_new here.
3893         * init.c: Not here.
3894
3895 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
3896
3897         * mangle.c (find_substitution): Use same_type_p.
3898         (write_encoding): Don't check for substitutions.
3899
3900 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
3901
3902         * parse.y (expr_no_comma_rangle): New non-terminal.
3903         (template_parm): Use it for default parameter case.
3904         (template_arg): Use it.
3905         (expr_no_commas): Remove commented out undefined extensions.
3906         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
3907         * parse.h, parse.c: Rebuilt.
3908
3909 2000-06-30  Mark Mitchell  <mark@codesourcery.com>
3910
3911         * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
3912         (finish_asm_stmt): Do it here, instead.
3913
3914         * cp-tree.h (ridpointers): Don't declare.
3915         * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
3916         (record_builtin_java_type): Likewise.
3917         (init_decl_processing): Likewise.
3918         * lex.c: Move inclusion of lex.h.
3919         (ridpointers): Don't define.
3920         (init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
3921         RID_MAX.
3922         * lex.h (enum rid): Rename to ...
3923         (enum cp_rid): ... this.
3924         (ridpointers): Don't declare.
3925         * parse.y: Move inclusion of lex.h.
3926         * parse.c: Regenerated.
3927         * spew.c: Move inclusion of lex.h.
3928
3929         * cp-tree.h (struct language_function): Remove temp_name_counter.
3930         (temp_name_counter): Remove.
3931         (get_temp_name): Change prototype.
3932         (get_guard): New function.
3933         (get_guard_cond): Likewise.
3934         (set_guard): Likewise.
3935         * cvt.c (build_up_reference): Adjust call to get_temp_name.
3936         * decl.c (expand_static_init): Use get_guard and friends to
3937         implement guard variables.
3938         * decl2.c (get_temp_name): Assume that the variables created are
3939         always static.
3940         (get_sentry): Rename to ...
3941         (get_guard): ... this.  Implement new ABI guard variables.
3942         (get_guard_bits): New function.
3943         (get_guard_cond): Likewise.
3944         (set_guard): Likewise.
3945         (start_static_initialization_or_destruction): Use them.
3946         (do_static_initialization): Replace sentry with guard throughout.
3947         (do_static_destruction): Likewise.
3948         * init.c (create_temporary_var): Add comment.
3949
3950 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
3951
3952         * mangle.c (find_substitution): Use same_type_p.
3953         (write_encoding): Don't check for substitutions.
3954
3955 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
3956
3957         * parse.y (expr_no_comma_rangle): New non-terminal.
3958         (template_parm): Use it for default parameter case.
3959         (template_arg): Use it.
3960         (expr_no_commas): Remove commented out undefined extensions.
3961         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
3962         * parse.h, parse.c: Rebuilt.
3963
3964 2000-06-29  Mark Mitchell  <mark@codesourcery.com>
3965
3966         * cp-tree.h (flag_const_strings): Remove.
3967         (warn_parentheses): Likewise.
3968         (warn_format): Likewise.
3969         (common_type): Likewise.
3970         (default_conversion): Likewise.
3971         (build_binary_op): Likewise.
3972         (cp_build_binary_op): New macro.
3973         * call.c (build_new_op): Use cp_build_binary_op instead of
3974         build_binary_op.
3975         * class.c (build_vtable_entry_ref): Likewise.
3976         * decl.c (expand_static_init): Likewise.
3977         (compute_array_index_type): Likewise.
3978         (build_enumerator): Likewise.
3979         * decl2.c (delete_sanity): Likewise.
3980         (start_static_initialization_or_destruction): Likewise.
3981         * error.c (dump_type_suffix): Likewise.
3982         * init.c (resolve_offset_ref): Likewise.
3983         (build_new): Likewise.
3984         (build_new_1): Likewise.
3985         (build_vec_delete_1): Likewise.
3986         (build_vec_init): Likewise.
3987         (build_delete): Likewise.
3988         * rtti.c (synthesize_tinfo_fn): Likewise.
3989         (synthesize_tinfo_var): Likewise.
3990         * search.c (expand_upcast_fixups): Likewise.
3991         (fixup_all_virtual_upcast_offsets): Likewise.
3992         * typeck.c (build_array_ref): Likewise.
3993         (get_member_function_from_ptrfunc): Likewise.
3994         (build_binary_op): Add parameter.
3995         (pointer_int_sum): Use cp_build_binary_op.
3996         (pointer_diff): Likewise.
3997         (build_modify_expr): Likewise.
3998         (get_delta_difference): Likewise.
3999         (build_ptrmemfunc): Likewise.
4000
4001 2000-06-29  Nathan Sidwell  <nathan@codesourcery.com>
4002
4003         * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
4004         * decl.c (create_implicit_typedef): Adjust.
4005         * decl2.c (build_artificial_parm): Adjust.
4006         * method.c (implicitly_declare_fn): Adjust.
4007         * pt.c (push_inline_template_parms_recursive): Adjust.
4008         (process_template_parm): Adjust.
4009         (overloaded_template_name): Adjust.
4010         * semantics.c (finish_template_template_parm): Adjust.
4011
4012 2000-06-28  Mark Mitchell  <mark@codesourcery.com>
4013
4014         * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
4015         * class.c (update_vtable_entry_for_fn): Correct logic for deciding
4016         where to emit thunks.
4017         (build_vtt): Adjust call to build_vtt_inits.
4018         (build_vtt_inits): Add parameter to indicate whether or not
4019         sub-VTTs for virtual bases should be included.  Adjust handling of
4020         construction vtables.
4021         (get_matching_base): New function.
4022         (dfs_build_vtt_inits): Rename to ...
4023         (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
4024         construction vtables.
4025         (dfs_fixup_binfo_vtbls): Likewise.
4026         (build_ctor_vtbl_groups): Build construction vtables for virtual
4027         bases, too.
4028         (accumulate_vtbl_inits): Tweak logic for deciding whether or not
4029         to build construction vtbls.
4030         (dfs_accumulate_vtbl_inits): Adjust handling of
4031         construction vtables.
4032
4033         * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
4034         types correctly.
4035
4036 2000-06-27  Mark Mitchell  <mark@codesourcery.com>
4037
4038         * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
4039
4040 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
4041
4042         * search.c (hides): Remove.
4043         (is_subobject_of_p): Add most_derived parameter. Use
4044         CANONICAL_BINFO.
4045         (lookup_field_queue_p): Adjust.
4046         (lookup_field_r): Adjust.
4047
4048 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
4049
4050         * decl2.c (handle_class_head): Bash typedefs to the type's main
4051         decl.
4052
4053 2000-06-25  Mark Mitchell  <mark@codesourcery.com>
4054
4055         * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
4056         (begin_global_stmt_expr): ... this.
4057         (genrtl_finish_stmt_expr): Rename to ...
4058         (finish_global_stmt_expr): ... this.
4059         * init.c (begin_init_stmts): Adjust calls.
4060         (finish_init_stmts): Likewise.
4061         * semantics.c (genrtl_begin_stmt_expr): Rename to ...
4062         (begin_global_stmt_expr): ... this.
4063         (genrtl_finish_stmt_expr): Rename to ...
4064         (finish_global_stmt_expr): ... this.
4065
4066 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
4067
4068         * search.c (lookup_member): Fix typo in comment.
4069
4070 2000-06-24  Jason Merrill  <jason@redhat.com>
4071
4072         * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
4073         (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
4074
4075 2000-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
4076
4077         * parse.y (complex_direct_notype_declarator): Support global_scope.
4078         * Makefile.in: Adjust conflict count.
4079
4080 2000-06-23  Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
4081
4082         * parse.y (template_arg): Convert TEMPLATE_DECL
4083         that is a template template paramter to
4084         TEMPLATE_TEMPLATE_PARM here.
4085
4086         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
4087         * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
4088         (copy_template_template_parm): Adjust prototype.
4089         * decl.c (grokdeclarator): Remove dead code.
4090         * pt.c (process_template_parm): Tidy.
4091         (lookup_template_class): Construct nodes in
4092         copy_template_template_parm.
4093         (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
4094         lookup_template_class.  Use TYPE_TI_TEMPLATE.
4095         * tree.c (copy_template_template_parm): Add NEWARGS
4096         parameter.
4097         (mapcar): Adjust call to copy_template_template_parm.
4098         * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
4099         * method.c (build_template_template_parm_names): Change error
4100         code to avoid compilation warning.
4101
4102         * gxxint.texi: Document template template parameter
4103         name mangling.
4104
4105 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
4106
4107         * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
4108         (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
4109         (cp-demangle.o): New rule.
4110         (dyn-string.o): Likewise.
4111         * inc/cxxabi.h (__cxa_demangle): New declaration.
4112
4113 2000-06-22  Mark Mitchell  <mark@codesourcery.com>
4114
4115         * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
4116         (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
4117         (lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
4118         a tree, not an int.
4119         (THUNK_GENERATE_WITH_VTABLE_P): New macro.
4120         (make_thunk): Change prototype.
4121         (emit_thunk): Rename to use_thunk.
4122         (mangle_thunk): Change prototype.
4123         * class.c (get_derived_offset): Simplify.
4124         (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
4125         BV_GENERATE_THUNK_WITH_VTABLE_P.
4126         (build_primary_vtable): Simplify.
4127         (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
4128         (dfs_find_base): Remove.
4129         (update_vtable_entry_for_fn): Correct bug in finding the base
4130         where a virtual function was first declared.  Figure out whether
4131         or not to emit a vcall-thunk with the vtables in which it appears.
4132         Correct logic for deciding whether to use an ordinary thunk, or a
4133         vcall thunk.
4134         (finish_struct_1): Remove unnecssary code.
4135         (build_vtbl_initializer): Use ssize_int for the running counter of
4136         negative indices.
4137         (build_vtbl_initializer): Only use vcall thunks where necessary.
4138         Mark thunks as needing to be emitted with their vtables, or not.
4139         (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
4140         indices.  Use size_binop.
4141         (dfs_build_vcall_offset_vtbl_entries): Don't rely on
4142         BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
4143         size_binop.
4144         (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
4145         (build_vtable_entry): Mark thunks as needing to be emitted with
4146         their vtables, or not.
4147         * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
4148         * decl2.c (mark_vtable_entries): Use use_thunk instead of
4149         emit_thunk.
4150         * dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
4151         information.
4152         * error.c (dump_expr): Use BV_FN.
4153         * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
4154         not an int.
4155         * method.c (make_thunk): Likewise.
4156         (emit_thunk): Rename to use_thunk.  Allow callers to decide
4157         whether or not to actually emit the thunk.  Adjust for changes in
4158         representation of vcall offsets.
4159         * search.c (dfs_get_pure_virtuals): Use BV_FN.
4160         * semantics.c (emit_associated_thunks): New function.
4161         (expand_body): Use it.
4162         * ir.texi: Adjust decriptions of thunks.
4163
4164 2000-06-22  Jason Merrill  <jason@redhat.com>
4165
4166         * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
4167         (tsubst_friend_function): Copy it here.
4168
4169         * decl.c (grok_op_properties): Fix typo.
4170
4171         * decl2.c (delete_sanity): Clarify warning, avoid failure on
4172         deleting void*.
4173
4174         * pt.c (check_explicit_specialization): Clarify error.
4175
4176         * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
4177         an old OVERLOAD when we're declaring a non-function.
4178         (pushdecl, destroy_local_var): Check for error_mark_node.
4179         (warn_extern_redeclared_static): Also bail early if
4180         we're a CONST_DECL.
4181         (push_overloaded_decl): Ignore an old error_mark_node.
4182
4183 2000-06-22  Nathan Sidwell  <nathan@codesourcery.com>
4184
4185         * call.c (build_x_va_arg): Check if in a template decl.
4186         * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
4187
4188 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4189
4190         * class.c (push_lang_context): TYPE_NAME gets you to the Java
4191         types DECLs.
4192         * decl.c (check_goto): Computed gotos assumed OK.
4193
4194 2000-06-20  Jason Merrill  <jason@redhat.com>
4195
4196         * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
4197         for which we don't need to look for instantiations.
4198
4199 2000-06-21  Nathan Sidwell  <nathan@codesourcery.com>
4200
4201         * parse.y (program): Always call finish_translation_unit.
4202         * parse.c, parse.h: Rebuilt.
4203
4204 2000-06-20  Zack Weinberg  <zack@wolery.cumb.org>
4205
4206         * method.c: Don't include hard-reg-set.h.
4207
4208 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
4209
4210         * rtti.c (get_base_offset): Cope when vbase field is in a base.
4211
4212 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
4213
4214         * call.c (build_conditional_expr): Use VOID_TYPE_P.
4215         * cvt.c (cp_convert_to_pointer): Likewise.
4216         (convert_to_void): Likewise.
4217         * error.c (dump_expr): Likewise.
4218         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
4219         * init.c (build_delete): Likewise.
4220         * method.c (emit_thunk): Likewise.
4221         * optmize.c (declare_return_variable): Likewise.
4222         * rtti.c (get_tinfo_decl_dynamic): Likewise.
4223         (get_typeid): Likewise.
4224         (build_dynamic_cast_1): Likewise.
4225         * typeck.c (composite_pointer_type): Likewise.
4226         (common_type): Likewise.
4227         (build_indirect_ref): Likewise.
4228         (build_binary_op): Likewise.
4229         (build_x_compound_expr): Likewise.
4230         (check_return_expr): Likewise.
4231         * typeck2.c (add_exception_specifier): Likewise.
4232
4233         * mangle.c (write_method_parms): Use direct comparison for end
4234         of parmlist.
4235
4236 2000-06-19  Benjamin Chelf  <chelf@codesourcery.com>
4237
4238         * cp-tree.h (genrtl_try_block): Declare function.
4239         (genrtl_handler): Likewise.
4240         (genrtl_catch_block): Likewise.
4241         (genrtl_ctor_stmt): Likewise.
4242         (genrtl_subobject): Likewise.
4243         (genrtl_decl_cleanup): Likewise.
4244         (genrtl_do_poplevel): Likewise.
4245         (genrtl_do_pushlevel): Likewise.
4246         (genrtl_clear_out_block): Likewise.
4247         (genrtl_goto_stmt): Likewise.
4248         (genrtl_expr_stmt): Likewise.
4249         (genrtl_decl_stmt): Likewise.
4250         (genrtl_if_stmt): Likewise.
4251         (genrtl_while_stmt): Likewise.
4252         (genrtl_do_stmt): Likewise.
4253         (genrtl_return_stmt): Likewise.
4254         (genrtl_for_stmt): Likewise.
4255         (genrtl_break_stmt): Likewise.
4256         (genrtl_continue_stmt): Likewise.
4257         (genrtl_scope_stmt): Likewise.
4258         (genrtl_switch_stmt): Likewise.
4259         (genrtl_case_label): Likewise.
4260         (genrtl_begin_compound_stmt): Likewise.
4261         (genrtl_finish_compound_stmt): Likewise.
4262         (genrtl_compound_stmt): Likewise.
4263         (genrtl_asm_stmt): Likewise.
4264         (genrtl_named_return_value): Likewise.
4265         (genrtl_begin_stmt_expr): Likewise.
4266         (genrtl_finish_stmt_expr): Likewise.
4267         (finish_for_stmt): Removed first argument.
4268         (finish_switch_stmt): Likewise.
4269
4270         * semantics.c (genrtl_try_block): Define function.
4271         (genrtl_handler): Likewise.
4272         (genrtl_catch_block): Likewise.
4273         (genrtl_ctor_stmt): Likewise.
4274         (genrtl_subobject): Likewise.
4275         (genrtl_decl_cleanup): Likewise.
4276         (genrtl_do_poplevel): Likewise.
4277         (genrtl_do_pushlevel): Likewise.
4278         (genrtl_clear_out_block): Likewise.
4279         (genrtl_goto_stmt): Likewise.
4280         (genrtl_expr_stmt): Likewise.
4281         (genrtl_decl_stmt): Likewise.
4282         (genrtl_if_stmt): Likewise.
4283         (genrtl_while_stmt): Likewise.
4284         (genrtl_do_stmt): Likewise.
4285         (genrtl_return_stmt): Likewise.
4286         (genrtl_for_stmt): Likewise.
4287         (genrtl_break_stmt): Likewise.
4288         (genrtl_continue_stmt): Likewise.
4289         (genrtl_scope_stmt): Likewise.
4290         (genrtl_switch_stmt): Likewise.
4291         (genrtl_case_label): Likewise.
4292         (genrtl_begin_compound_stmt): Likewise.
4293         (genrtl_finish_compound_stmt): Likewise.
4294         (genrtl_compound_stmt): Likewise.
4295         (genrtl_asm_stmt): Likewise.
4296         (genrtl_named_return_value): Likewise.
4297         (genrtl_begin_stmt_expr): Likewise.
4298         (genrtl_finish_stmt_expr): Likewise.
4299         (finish_for_stmt): Removed first argument and generate rtl
4300         specific code.
4301         (finish_switch_stmt): Likewise.
4302         (do_poplevel): Removed generate rtl specific code.
4303         (do_pushlevel): Likewise.
4304         (add_tree): Likewise.
4305         (finish_goto_stmt): Likewise.
4306         (finish_expr_stmt): Likewise.
4307         (begin_if_stmt): Likewise.
4308         (finish_if_stmt_cond): Likewise.
4309         (finish_then_clause): Likewise.
4310         (begin_else_clause): Likewise.
4311         (finish_else_clause): Likewise.
4312         (finish_if_stmt): Likewise.
4313         (clear_out_block): Likewise.
4314         (begin_while_stmt): Likewise.
4315         (finish_while_stmt_cond): Likewise.
4316         (finish_while_stmt): Likewise.
4317         (begin_do_stmt): Likewise.
4318         (finish_do_body): Likewise.
4319         (finish_do_stmt): Likewise.
4320         (finish_return_stmt): Likewise.
4321         (begin_for_stmt): Likewise.
4322         (finish_for_init_stmt): Likewise.
4323         (finish_for_cond): Likewise.
4324         (finish_for_expr): Likewise.
4325         (finish_break_stmt): Likewise.
4326         (finish_continue_stmt): Likewise.
4327         (begin_switch_stmt): Likewise.
4328         (finish_switch_cond): Likewise.
4329         (finish_case_label): Likewise.
4330         (begin_try_block): Likewise.
4331         (begin_function_try_block): Likewise.
4332         (finish_try_block): Likewise.
4333         (finish_cleanup_try_block): Likewise.
4334         (finish_cleanup): Likewise.
4335         (finish_function_try_block): Likewise.
4336         (finish_handler_sequence): Likewise.
4337         (finish_function_handler_sequence): Likewise.
4338         (begin_handler): Likewise.
4339         (finish_handler_parms): Likewise.
4340         (begin_catch_block): Likewise.
4341         (finish_handler): Likewise.
4342         (begin_compound_stmt): Likewise.
4343         (finish_compound_stmt): Likewise.
4344         (finish_asm_stmt): Likewise.
4345         (finish_label_stmt): Likewise.
4346         (finish_label_decl): Likewise.
4347         (finish_subobject): Likewise.
4348         (finish_decl_cleanup): Likewise.
4349         (finish_named_return_value): Likewise.
4350         (begin_stmt_expr): Likewise.
4351         (finish_stmt_expr): Likewise.
4352
4353         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
4354         to call genrtl_expr_stmt when appropriate.
4355
4356         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
4357         begin_compound_expr to call genrtl_begin_stmt_expr and
4358         genrtl_begin_compound_expr when appropriate.
4359         (finish_init_stmts): Changed calls to finish_compound_expr and
4360         finish_stmt_expr to call genrtl_finish_compound_expr and
4361         genrtl_finish_stmt_expr when appropriate.
4362         (expand_default_init): Changed call to finish_expr_stmt to call
4363         genrtl_expr_stmt when appropriate.
4364         (build_vec_init): Likewise.
4365
4366         * parse.y (simple_stmt): Removed first argument from call to
4367         finish_for_stmt. Removed first argument from call to
4368         finish_switch_stmt.
4369
4370         * parse.c: Regenerated.
4371
4372         * pt.c (tsubst_expr): Removed first argument from call to
4373         finish_for_stmt. Removed first argument from call to
4374         finish_switch_stmt.
4375
4376 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
4377
4378         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
4379         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
4380
4381         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
4382         (cplus_tree_code_length[]): Likewise.
4383         (cplus_tree_code_name[]): Likewise.
4384         (init_parse): Added call to add_c_tree_codes. Changed
4385         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
4386
4387 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
4388
4389         * cp-tree.h (finish_mem_initializers): Declare.
4390         (count_trees): Likewise.
4391         * parse.y (base_init): Use finish_mem_initializers.
4392         * semantics.c (finish_mem_initializers): New function.
4393
4394         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
4395         the number of trees.
4396         (n_trees): Remove.
4397         (count_trees): Don't use it.
4398
4399 2000-06-15  Jason Merrill  <jason@redhat.com>
4400
4401         * tree.c (count_trees): New debugging function.
4402
4403         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
4404         * init.c (build_member_call): Pull out the name of a DECL.
4405
4406         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
4407         * semantics.c (expand_body): Push to TV_INTEGRATION here.
4408         * optimize.c (optimize_function): Not here.
4409         * pt.c (instantiate_decl): Push to TV_PARSE.
4410
4411 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
4412
4413         * cp-tree.h (struct language_function): Remove x_base_init_list
4414         and x_member_init_list.
4415         (current_base_init_list): Remove.
4416         (current_member_init_list): Likewise.
4417         (setup_vtbl_ptr): Change prototype.
4418         (emit_base_init): Likewise.
4419         (expand_member_init): Likewise.
4420         (reinit_parse_for_function): Remove.
4421         * decl.c (save_function_data): Don't clear x_base_init_list and
4422         x_member_init_list.
4423         (mark_language_function): Don't mark them.
4424         * init.c (perform_member_init): Tweak comment.
4425         (sort_member_init): Take the list of initializers as an argument.
4426         (sort_base_init): Likewise.
4427         (emit_base_init): Likewise.
4428         (expand_member_init): Return the initializer.  Don't use global
4429         variables.
4430         * lex.c (reinit_parse_for_function): Remove.
4431         * method.c (build_template_parm_names): Correct substitution.
4432         (do_build_copy_constructor): Don't use current_member_init_list
4433         and current_base_init_list.
4434         (synthesize_method): Likewise.
4435         * parse.y (base_init): Split mem-initializers into
4436         base-initializers and field-initializers.
4437         (member_init_list): Build up the list here.
4438         (member_init): Return the initializer.
4439         (fn.depfn): Don't use reinit_parse_for_function.
4440         * parse.c: Regenerated.
4441         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
4442         ERROR_MARK.
4443         (tsubst_expr): Don't use current_member_init_list
4444         and current_base_init_list.
4445         (tsubst_expr_values): Rename to ...
4446         (tsubst_initializer_list): ... this.  Use convert_from_reference.
4447         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
4448         and current_base_init_list.
4449         (begin_function_definition): Don't call reinit_parse_for_function.
4450
4451         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
4452
4453         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
4454         correctly.
4455
4456         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
4457
4458 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
4459
4460         * cp-tree.h (IF_COND): Move to c-common.h.
4461         (THEN_CLAUSE): Likewise.
4462         (ELSE_CLAUSE): Likewise.
4463         (WHILE_COND): Likewise.
4464         (WHILE_BODY): Likewise.
4465         (DO_COND): Likewise.
4466         (DO_BODY): Likewise.
4467         (RETURN_EXPR): Likewise.
4468         (EXPR_STMT_EXPR): Likewise.
4469         (FOR_INIT_STMT): Likewise.
4470         (FOR_COND): Likewise.
4471         (FOR_EXPR): Likewise.
4472         (FOR_BODY): Likewise.
4473         (SWITCH_COND): Likewise.
4474         (SWITCH_BODY): Likewise.
4475         (CASE_LOW): Likewise.
4476         (CASE_HIGH): Likewise.
4477         (GOTO_DESTINATION): Likewise.
4478         (COMPOUND_BODY): Likewise.
4479         (ASM_CV_QUAL): Likewise.
4480         (ASM_STRING): Likewise.
4481         (ASM_OUTPUTS): Likewise.
4482         (ASM_INPUTS): Likewise.
4483         (ASM_CLOBBERS): Likewise.
4484         (DECL_STMT_DECL): Likewise.
4485         (STMT_EXPR_STMT): Likewise.
4486         (LABEL_STMT_LABEL): Likewise.
4487         (SCOPE_BEGIN_P): Likewise.
4488         (SCOPE_END_P): Likewise.
4489         (SCOPE_STMT_BLOCK): Likewise.
4490         (SCOPE_NULLIFIED_P): Likewise.
4491         (SCOPE_NO_CLEANUPS_P): Likewise.
4492         (SCOPE_PARTIAL_P): Likewise.
4493         (ASM_VOLATILE_P): Likewise.
4494         (STMT_LINENO): Likewise.
4495         (STMT_LINENO_FOR_FN_P): Likewise.
4496
4497         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
4498         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
4499         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
4500         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
4501         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
4502
4503         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
4504
4505         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
4506         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
4507
4508         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
4509         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
4510         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
4511
4512 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
4513
4514         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
4515         * class.c (dfs_find_final_overrider): Set it appropriately.
4516         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
4517         avoid unneeded secondary vptrs.
4518
4519 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
4520
4521         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
4522         (check_bitfield_decl, check_field_decl): Likewise.
4523         (build_vtbl_or_vbase_field, build_base_field): Likewise.
4524         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
4525         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
4526         (xfer_tag, finish_enum): Likewise.
4527         * decl2.c (finish_builtin_type): Likewise.
4528         * init.c (init_init_processing): Likewise.
4529         * pt.c (instantiate_class_template): Likewise.
4530         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
4531         * cp-tree.h (struct lang_type): Add user_align member.
4532         (CLASSTYPE_USER_ALIGN): Define.
4533
4534 Tue Jun 13 15:48:03 2000  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
4535
4536         * Make-lang.in (c++.install-common): Install g++-cross in
4537         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
4538         $(target_alias)-g++ and $(target_alias)-c++.
4539
4540 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
4541
4542         * class.c (vcall_offset_data_s): Add last_init and fns.
4543         (overrides): Rename to same_signature_p.
4544         (dfs_find_final_overrider): Adjust accordingly.
4545         (mark_overriders): Likewise.
4546         (warn_hidden): Likewise.
4547         (build_vtbl_initializer): Reorganize machinery for building things
4548         at negative offsets.
4549         (build_vcall_and_vbase_vtbl_entries): Likewise.
4550         (build_vbase_offset_vtbl_entries): Likewise.
4551         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
4552         offset entries.  Do not create two entries for functions with the
4553         same signature.
4554         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
4555         (build_rtti_vtbl_entries): Reorganize machinery for building things
4556         at negative offsets.
4557
4558         * optimize.c (expand_call_inline): Don't recurse into the code
4559         used to initialize the parameters more than once.
4560
4561 2000-06-11  Mark Mitchell <mark@codesourcery.com>
4562
4563         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
4564         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
4565         (find_substitution): Only use the `Sa' substitution for
4566         std::allocator, not instantiations of it.
4567         (write_template_prefix): Move comment.  Only use a TREE_LIST to
4568         represent substitutions for a member template.
4569         (write_array_type): Mangle array dimensions correctly.
4570         * optimize.c (maybe_clone_body): Copy more information from the
4571         cloned function.
4572         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
4573         on the regenerated declaration.
4574
4575 2000-06-11  Chip Salzenberg  <chip@valinux.com>
4576             Mark Mitchell <mark@codesourcery.com>
4577
4578         * class.c (build_vtable): Clarify comment.
4579         (build_ctor_vtbl_group): Pass the most derived type to
4580         build_vtable.
4581
4582 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4583
4584         * decl2.c (compare_options): Don't needlessly cast away const-ness.
4585
4586 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
4587
4588         * decl.c (add_binding): Handle duplicate declarations of external
4589         variables.
4590
4591 2000-06-09  Chip Salzenberg  <chip@valinux.com>
4592             Mark Mitchell <mark@codesourcery.com>
4593
4594         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
4595         argument.
4596         (write_signed_number): New macro.
4597         (write_unsigned_number): Likewise.
4598         (write_source_name): Use them.
4599         (write_number): Handle signed and unsigned values.
4600         (write_integer_cst): Use tree_int_cst_sgn, and use
4601         write_unsigned_number or write_signed_number as appropriate.
4602         (write_discriminator): Use write_unsigned_number or
4603         write_signed_number as appropriate.
4604         (write_template_arg_literal): Likewise.
4605         (write_array_type): Use tree_low_cst.
4606         (write_template_parm):  Use write_unsigned_number or
4607         write_signed_number as appropriate.
4608         (write_substitution): Adjust call to write_number.
4609         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
4610         (write_expression): Handle non-type template arguments of
4611         reference type correctly.
4612         (mangle_thunk): Use write_signed_number.
4613
4614 2000-06-09  Chip Salzenberg  <chip@valinux.com>
4615
4616         * mangle.c (find_substition): Don't mangle objects with typename
4617         substitutions (e.g. "cin" as "Si").
4618
4619 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
4620
4621         * call.c (add_candidate): Use ggc_alloc_cleared.
4622         * decl.c (lookup_label): Likewise.
4623         * lex.c (retrofit_lang_decl): Likewise.
4624
4625 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
4626
4627         * semantics.c (expand_body): Push to TV_EXPAND.
4628         * optimize.c (optimize_function): Push to TV_INTEGRATION.
4629         * decl.c (start_function): Always call announce_function.
4630
4631         * tinfo2.cc: Just declare abort.
4632
4633 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
4634
4635         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
4636         whenever @ is a symbolic name.
4637
4638 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
4639
4640         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
4641
4642 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
4643
4644         * decl.c (pushdecl): Look up functions by DECL_NAME, not
4645         DECL_ASSEMBLER_NAME.
4646
4647 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
4648
4649         * decl2.c (c_language): Define.
4650
4651 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
4652
4653         * lex.c (lang_init_options): Tweak.
4654
4655         * decl2.c: Remove #inclusion of diagnostic.h
4656         (lang_decode_option): Move diagnostic formatting options to
4657         toplevel.
4658
4659         * lang-options.h: Remove documentation for diagnostic options.
4660
4661         * Makefile.in (lex.o): Depends upon diagnostic.h
4662
4663 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
4664
4665         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
4666         the same DECL_RESULT, it's not a redefinition.
4667         * pt.c (tsubst_decl): Remove code to handle illegal
4668         specializations.
4669
4670 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
4671
4672         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
4673
4674 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
4675
4676         * search.c (maybe_suppress_debug_info): Don't check
4677         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
4678
4679         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
4680         here if extern_p.
4681
4682         Remember instantiation context in deferred instantiations.
4683         * cp-tree.h (struct tinst_level): Remove.
4684         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
4685         * pt.c (current_tinst_level): Now a tree.
4686         (print_template_context, push_tinst_level, pop_tinst_level,
4687         tinst_for_decl): Adjust.
4688         (reopen_tinst_level): New fn.
4689         (init_pt): Register current_tinst_level as a root.
4690         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
4691         of the pending templates list.
4692         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
4693         * lex.c (extract_interface_info): Adjust.
4694         * decl2.c (warn_if_unknown_interface): Adjust.
4695
4696 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
4697
4698         * class.c (indirect_primary_base_p): New function.
4699         (determine_primary_base): Use it.
4700
4701 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
4702
4703         Update new-abi dynamic cast algorithm.
4704         * tinfo.cc (__class_type_info::__dyncast_result): Add
4705         whole_details. Adjust constructor.
4706         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
4707         Avoid unnecessary searching.
4708         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
4709
4710 Mon Jun  5 06:48:55 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4711
4712         * decl.c (init_decl_processing): Don't call record_component_aliases.
4713         * tree.c (build_cplus_array_type_1): Likewise.
4714
4715 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
4716
4717         * ir.texi: Correct typo.
4718         * mangle.c (write_expression): Handle non-type template arguments
4719         with reference type.
4720         * method.c (build_overload_value): Likewise.
4721         * pt.c (convert_nontype_argument): Explicitly represent conversion
4722         to a reference with an ADDR_EXPR.
4723         (unify): Always unify arguments in left-to-right order.
4724
4725 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
4726             Mark Mitchell  <mark@codesourcery.com>
4727
4728         * Make-lang.in (CXX_SRCS): Add mangle.c.
4729         * Makefile.in (CXX_OBJS): Add mangle.o.
4730         (mangle.o): New rule.
4731
4732         * class.c (local_classes): New variable.
4733         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
4734         (get_vtt_name): Use mangle_vtt_name for new ABI.
4735         (init_class_processing): Initialize local_classes.
4736         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
4737         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
4738         (std_identifier): New macro.
4739         (DECL_VOLATILE_MEMFUNC_P): New macro.
4740         (DECL_NAMESPACE_STD_P): Likewise.
4741         (local_classes): Declare.
4742         (get_mostly_instantiated_function_type): Declare.
4743         (init_mangle): Declare.
4744         (mangle_decl): Likewise.
4745         (mangle_type_string): Likewise.
4746         (mangle_type): Likewise.
4747         (mangle_typeinfo_for_type): Likewise.
4748         (mangle_typeinfo_string_for_type): Likewise.
4749         (mangle_vtbl_for_type): Likewise.
4750         (mangle_vtt_for_type): Likewise.
4751         (mangle_ctor_vtbl_for_type): Likewise.
4752         (mangle_thunk): Likewise.
4753         (mangle_conv_op_name_for_type): Likewise.
4754         (mangle_guard_variable): Likewise.
4755         * decl.c (pushtag): Keep track of local classes.
4756         (initialize_predefined_identifiers): Initialize std_identifier.
4757         (init_decl_processing): Use std_identifier.
4758         (start_decl): Don't treat instantiations as specializations.
4759         (grokdeclarator): Likewise.
4760         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
4761         name for fully-instantiated templates.
4762         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
4763         destructors with the new ABI.
4764         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
4765         (grokfield): Use mangle_type for new ABI.
4766         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
4767         (get_sentry): Use mangle_guard_variable for new ABI.
4768         (start_static_initialization_or_destruction): Likewise.
4769         * expr.c (extract_aggr_init): Remove.
4770         (extract_scalar_init): Likewise.
4771         (extract_init): Remove #if 0'd code.
4772         * mangle.c: New function.
4773         * method.c (build_mangled_name): Assert not flag_new_abi.
4774         (build_static_name): Likewise.
4775         (build_decl_overload_real): Likewise.
4776         (build_typename_overload): Likewise.
4777         (build_overload_with_type): Likewise.
4778         (build_overload_name): Likewise.
4779         (get_ctor_vtbl_name): Likewise.
4780         (start_squangling): Likewise.
4781         (get_id_2): Likewise.
4782         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
4783         (init_method): Call init_mangle for new ABI.
4784         (make_thunk): Call mangle_thunk for new ABI.
4785         * operators.def: Correct new ABI manglings for the `%' operator.
4786         Add `::' operator.
4787         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
4788         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
4789         (lookup_template_class): Call mangle_decl for new ABI.
4790         (get_mostly_instantiated_function_type): New function.
4791         (set_mangled_name_for_template_decl): Use it.
4792         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
4793         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
4794         conversion op names.
4795         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
4796         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
4797         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
4798         mangle_typeinfo_string_for_type.
4799
4800 2000-06-03  Mark Mitchell  <mark@codesourcery.com>
4801
4802         * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
4803         (INNERMOST_TEMPLATE_ARGS): New macro.
4804         (innermost_args): Remove.
4805         (get_innermost_template_args): New function.
4806         * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
4807         * error.c (dump_function_decl): Be caution when using
4808         most_general_template.
4809         * method.c (build_template_parm_names):  Use
4810         INNERMOST_TEMPLATE_ARGS.
4811         * pt.c (add_to_template_args): Tidy comment
4812         (get_innermost_template_args): New function.
4813         (check_explicit_specialization): Clear DECL_INITIAL for a new
4814         specialization.
4815         (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
4816         Tidy.
4817         (push_template_decl): Always register specializations of the most
4818         general template.
4819         (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
4820         (coerce_template_parms): Likewise.
4821         (lookup_template_class): Likewise.
4822         (innermost_args): Remove.
4823         (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
4824         (tsubst_decl): Handle tricky specializations.  Use
4825         get_innermost_template_args.
4826         (instantiate_template): Simplify handling of partial
4827         instantiations.
4828         (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
4829         (most_general_template): Reimplement, in a more straightforward
4830         manner.
4831         (regenerate_decl_from_template): Tweak formatting.  Use
4832         TMPL_ARGS_DEPTH for clarity.
4833         (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
4834
4835         * dump.c (dequeue_and_dump): Dump information about thunks.
4836
4837 2000-06-01  Richard Henderson  <rth@cygnus.com>
4838
4839         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
4840
4841 2000-06-01  Richard Henderson  <rth@cygnus.com>
4842
4843         * decl2.c (unsupported_options): Fix typo, make const.
4844         (lang_decode_option): Fix bsearch argument order.
4845
4846 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
4847
4848         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
4849         on FIELD_DECLs.
4850
4851 Wed May 31 14:09:00 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4852
4853         * cp-tree.h (c_get_alias_set): Deleted.
4854         * Makefile.in (decl.o): Include ../expr.h.
4855         * decl.c (expr.h): Include.
4856         (init_decl_processing): Call record_component_aliases for arrays.
4857         (grokdeclarator): Likewise.
4858         Set TREE_ADDRESSABLE for fields that aren't bitfields.
4859         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
4860
4861 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
4862
4863         Remove guiding declaration support.
4864         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
4865         (flag_guiding_decls): Remove.
4866         * call.c (build_user_type_conversion_1): Remove support for
4867         guiding decls.
4868         (build_new_function_call): Likewise.
4869         (build_new_op): Likewise.
4870         (build_new_method_call): Likewise.
4871         * decl.c (start_function): Likewise.
4872         * friend.c (is_friend): Likewise.
4873         (do_friend): Likewise.
4874         * decl2.c ((flag_dump_translation_unit): Make it const.
4875         (flag_guiding_decls): Remove.
4876         (unsupported_options): New variable
4877         (compare_options): New function.
4878         (lang_decode_option): Use them.
4879
4880         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
4881
4882         * method.c (mangle_expression): Adjust test for legal expression
4883         operators.
4884
4885         * pt.c (instantiate_decl): Save and restore the local
4886         specializations list.
4887
4888 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
4889
4890         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
4891
4892 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
4893
4894         * call.c (add_template_candidate_real): Handle member template
4895         constructors for classes with virtual bases.
4896         (build_user_type_conversion_1): Use in_charge_arg_for_name.
4897         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
4898
4899         * ir.texi: Update thunk documentation.
4900
4901         * call.c (joust): Fix handling of overloaded builtin operators.
4902
4903 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
4904
4905         * cp-tree.h (DECL_ANTICIPATED): New macro.
4906         Document new use of DECL_LANG_FLAG_7.
4907         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
4908         in the user namespace.
4909         * lex.c (do_identifier): If the identifier's declaration has
4910         DECL_ANTICIPATED on, it has not yet been declared.  But do not
4911         replace it with an ordinary implicit declaration.
4912
4913         * tinfo2.cc: Include stdlib.h.
4914
4915 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
4916
4917         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
4918         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
4919         CLASSTYPE_ALIGN.
4920
4921 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
4922
4923         * decl2.c (lang_decode_option): Use skip_leading_substring instead
4924         of plain strncmp.
4925
4926 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
4927
4928         * operators.def (<?): Duplicated, should have been...
4929         (>?): this.  Fixed.
4930
4931 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
4932             Mark Mitchell  <mark@codesourcery.com>
4933
4934         * cp-tree.h (ansi_opname): Make it a macro.
4935         (ansi_assopname): Likewise.
4936         (struct lang_decl_flags): Add assignment_operator_p.
4937         (struct lang_decl): Add operator_code.
4938         (DECL_VTT_PARM): Adjust.
4939         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
4940         overloaded operator.
4941         (SET_OVERLOADED_OPERATOR_CODE): New macro.
4942         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
4943         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
4944         (opname_tab): Remove.
4945         (assignop_tab): Likewise.
4946         (operator_name_info_t): New type.
4947         (operator_name_info): New variable.
4948         (assignment_operator_name_info): Likewise.
4949         (build_cp_library_fn): Remove declaration.
4950         (push_cp_library_fn): Likewise.
4951         (operator_name_string): Likewise.
4952         (build_decl_overload): Likewise.
4953         * call.c (print_z_candidates): Simplify.
4954         (build_object_call): Adjust usage of ansi_opname.  Use
4955         DECL_OVERLOADED_OPERATOR_P.
4956         (op_error): Adjust operator name lookup.
4957         (build_conditional_expr): Adjust usage of ansi_opname.
4958         (build_new_op): Likewise.
4959         (build_op_delete_call): Likewise.
4960         (build_over_call): Likewise.
4961         (joust): Use DECL_OVERLOADED_OPERATOR_P.
4962         * decl.c (duplicate_decls): Copy operator_code.
4963         (init_decl_processing): Adjust parameters to push_cp_library_fn.
4964         (builtin_function): Adjust parameters to build_library_fn_1.
4965         (build_library_fn_1): Accept an overloaded operator code.
4966         (build_library_fn): Pass ERROR_MARK.
4967         (build_cp_library_fn): Accept an overloaded operator code.
4968         (push_cp_library_fn): Likewise.
4969         (grokfndecl): Tweak.
4970         (grokdeclarator): Simplify code to compute names of overloaded
4971         operators.  Adjust use of ansi_opname.
4972         (ambi_op_p): Work on tree_codes, not identifiers.
4973         (unary_op_p): Likewise.
4974         (grok_op_properties): Likewise.
4975         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
4976         (lang_mark_tree): Don't try to mark the operator_code.
4977         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
4978         * error.c (dump_decl): Remove special handling for operator
4979         names.
4980         (dump_function_name): Likewise.
4981         (dump_expr): Adjust name lookup of operators.
4982         (op_to_string): Simplify.
4983         (assop_to_string): Likewise.
4984         * init.c (build_new_1): Adjust use of ansi_opname.
4985         * lex.c (opname_tab): Remove.
4986         (assignop_tab): Likewise.
4987         (ansi_opname): Likewise.
4988         (ansi_assopname): Likewise.
4989         (operator_name_string): Likewise.
4990         (reinit_lang_specific): Likewise.
4991         (operator_name_info): New variable.
4992         (assignment_operator_name_info): Likewise.
4993         (init_operators): New function.
4994         (init_parse): Use it.
4995         (do_identifier): Adjust use of ansi_opname.
4996         * method.c (mangle_expression): Don't use ansi_opname for
4997         mangling.
4998         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
4999         (build_decl_overload): Remove.
5000         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
5001         (do_build_assign_ref): Adjust use of ansi_opname.
5002         (synthesize_method): Likewise.
5003         (implicitly_declare_fn): Likewise.
5004         * operators.def: New file.
5005         * parse.y (operator): Adjust use of ansi_opname.
5006         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
5007         (set_mangled_name_for_template_decl): Don't play games with
5008         current_namespace.
5009         (special_function_p): Adjust use of ansi_opname.
5010         * typeck.c (check_return_expr): Likewise.
5011         * Make-lang.in (cc1plus): Depend on operators.def.
5012         * Makefile.in (lex.o): Likewise.
5013         (decl.o): Likewise.
5014
5015 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
5016
5017         * Make-lang.in (cplib2.ready): Eradicate.
5018
5019 Sat May 27 11:25:46 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5020
5021         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
5022         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
5023         (built_min, cp_tree_equal): Likewise.
5024
5025 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
5026
5027         * class.c (layout_nonempty_base_or_field): Replace
5028         `record_layout_info' with `record_layout_info_s'.
5029
5030 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
5031
5032         Fix goto checking.
5033         * cp-tree.h (struct language_function): x_named_labels is now
5034         a struct named_label_list*.
5035         * decl.c (struct named_label_use_list): Renamed from...
5036         (struct named_label_list): ...this.  New struct.
5037         (push_binding_level): Don't set eh_region.
5038         (note_level_for_eh): New fn.
5039         (pop_label): Take label and old value directly.
5040         (pop_labels): Adjust for new named_labels format.
5041         (lookup_label): Likewise.
5042         (poplevel): Note characteristics of a binding level containing a
5043         named label.  Mess with named label lists earlier.
5044         (mark_named_label_lists): New fn.
5045         (mark_lang_function): Call it.
5046         (use_label): New fn, split out from...
5047         (make_label_decl): ...here.  Don't call it.
5048         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
5049         check_previous_gotos): New fns, split out from...
5050         (define_label): ...here.
5051         (check_switch_goto): New fn.
5052         (define_case_label): Call it.
5053         (check_goto): New fn.
5054         * semantics.c (finish_goto_stmt): Call it and use_label.
5055         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
5056         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
5057
5058 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
5059
5060         * class.c (build_vtable_entry_ref): Correct usage of
5061         get_vtbl_decl_for_binfo.
5062
5063         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
5064         * method.c (implicitly_declare_fn): Not here.
5065
5066 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
5067
5068         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
5069         (CPTI_PTMD_DESC_TYPE): ... here.
5070         (ptmd_desc_type_node): Rename to ...
5071         (ptm_desc_type_node): ... here.
5072         * decl.c: Likewise.
5073         * rtti.c (ptmd_initializer): Rename to ...
5074         (ptm_initializer): ... here.
5075         (sythesize_tinfo_var): Adjust. Deal with pointer to member
5076         function.
5077         (create_tinfo_types): Adjust.
5078
5079 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
5080
5081         Finish implementation of VTTs.
5082         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
5083         CPTI_VTT_PARM_IDENTIFIER.
5084         (vtt_parm_identifier): New macro.
5085         (vtt_parm_type): Likewise.
5086         (BINFO_SUBVTT_INDEX): Likewise.
5087         (BINFO_VPTR_INDEX): Likewise.
5088         (struct lang_decl): Add vtt_parm.
5089         (DECL_VTT_PARM): New macro.
5090         (DECL_USE_VTT_PARM): Likewise.
5091         (DECL_NEEDS_VTT_PARM_P): Likewise.
5092         (get_vtt_name): Declare.
5093         (build_artifical_parm): Likewise.
5094         (fixup_all_virtual_upcast_offsets): Likewise.
5095         (expand_indirect_vtbls_init): Remove.
5096         * call.c (build_new_method_call): Pass the vtt to subobject
5097         constructors and destructors.
5098         * class.c (get_vtt_name): Give it external linkage.
5099         (build_clone): Handle the magic VTT parameters for clones.
5100         (clone_function_decl): Fix typo in comment.
5101         (build_vtt): Keep track of the indices in the VTTs where various
5102         entities are stored.
5103         (build_vtt_inits): Likewise.
5104         (dfs_build_vtt_inits): Likewise.
5105         (build_ctor_vtbl_group): Tweak type of construction vtables.
5106         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
5107         primary bases, when building construction vtables.
5108         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
5109         (initialize_predefined_identifiers): Add vtt_parm_identifier.
5110         (init_decl_processing): Initialize vtt_parm_type.
5111         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
5112         (lang_mark_tree): Make vtt_parm.
5113         * decl2.c (build_artificial_parm): New function.
5114         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
5115         (grokclassfn): Use build_artificial_parm.
5116         * init.c (initialize_vtbl_ptrs): Call
5117         fixup_all_virtual_upcast_offsets directly.
5118         (perform_member_init): Use the complete subobject destructor for
5119         member cleanups.
5120         (build_vtbl_address): New function.
5121         (expand_virtual_init): Handle VTTs.
5122         * optimize (maybe_clone_body): Likewise.
5123         * search.c (fixup_all_virtual_upcast_offsets): Give it external
5124         linkage.
5125         (expand_indirect_vtbls_init): Remove.
5126         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
5127         * tree.c (make_binfo): Make them bigger.
5128
5129 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
5130
5131         * inc/cxxabi.h (__pbase_type_info): Define, based on
5132         __pointer_type_info.
5133         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
5134         (__pointer_to_member_type_info): Likewise.
5135         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
5136         (__pointer_to_member_type_info::__is_pointer_p): Remove.
5137         (__pointer_type_info::__do_catch): Rename to ...
5138         (__pbase_type_info::__do_catch): ... here. Adjust.
5139         (__pbase_type_info::__pointer_catch): Implement.
5140         (__pointer_type_info::__pointer_catch): Adjust.
5141         (__pointer_to_member_type_info::__pointer_catch): Adjust.
5142
5143 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
5144
5145         * tinfo.h (__user_type_info::contained_virtual_p): New
5146         predicate.
5147         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
5148         shaped heirarchy.
5149         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
5150         diamond shaped heirarchy. Add early out for mixed diamond and
5151         duplicate shaped heirarchy.
5152
5153 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
5154
5155         * cp-tree.h (build_delete): Change prototype.
5156         (build_vec_delete): Likewise.
5157         * call.c (build_scoped_method_call): Use special_function_kind
5158         values to indicate the kind of destruction to be done.
5159         (build_method_call): Likewise.
5160         * decl.c (finish_destructor_body): Likewise.
5161         (maybe_build_cleanup_1): Likewise.  Rename to ...
5162         (maybe_build_cleanup): ... this.
5163         * decl2.c (delete_sanity): Use special_function_kind
5164         values to indicate the kind of destruction to be done.
5165         (build_cleanup): Likewise.
5166         * init.c (perform_member_init): Likewise.
5167         (build_vec_delete_1): Likewise.
5168         (build_dtor_call): Simplify.
5169         (build_delete): Use special_function_kind
5170         values to indicate the kind of destruction to be done.
5171         (build_vbase_delete): Likewise.
5172         (build_vec_delete): Likewise.
5173
5174         * init.c (sort_member_init): Fix typo in error message generation
5175         code.
5176
5177 Mon May 15 11:46:29 2000  Donald Lindsay  <dlindsay@cygnus.com>
5178
5179         * semantics.c (begin_class_definition): make the packed
5180         attribute be sensitive to the "-fpack-struct" command line flag
5181
5182 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
5183
5184         Update new-abi upcast algorithm.
5185         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
5186         prototype and meaning of return value.
5187         (__si_class_type_info::__do_upcast): Likewise.
5188         (__vmi_class_type_info::__do_upcast): Likewise.
5189         * tinfo.cc (__class_type_info::__upcast_result): Replace
5190         whole2dst with part2dst. Adjust ctor.
5191         (__class_type_info::__do_upcast): Adjust call of worker function.
5192         (__class_type_info::__do_upcast): Adjust.
5193         (__si_class_type_info::__do_upcast): Adjust. Use parent's
5194         __do_upcast.
5195         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
5196         virtual base in diamond heirarchy bug.
5197
5198 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
5199
5200         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
5201         and bitfield to tinfo_fn_p.
5202         (DECL_TINFO_FN_P): Adjust.
5203         (SET_DECL_TINFO_FN_P): Likewise.
5204         (DECL_MUTABLE_P): Likewise.
5205         (DECL_C_BIT_FIELD): Likewise.
5206         (SET_DECL_C_BIT_FIELD): Likewise.
5207         (CLEAR_DECL_C_BIT_FIELD): Likewise.
5208         (DECL_UNINLINABLE): Likewise.
5209         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
5210         (handle_using_decl): Remove assertion.
5211         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
5212         to build FIELD_DECLs.
5213         (build_base_field): Likewise.
5214         (layout_class_type): Likewise.
5215         * decl.c (init_decl_processing): Likewise.
5216         (build_ptrmemfunc_type): Likewise.
5217         (grokdeclarator): Likewise.
5218         * decl2.c (grok_x_components): Likewise.
5219         * except.c (call_eh_info): Likewise.
5220         * init.c (init_init_processing): Likewise.
5221         * rtti.c (expand_class_desc): Likewise.
5222         (create_pseudo_type_info): Likewise.
5223         (get_vmi_pseudo_type_info): Likewise.
5224         (create_tinfo_types): Likewise.
5225         * ptree.c (print_lang_decl): Adjust.
5226         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
5227         before checking DECL_MUTABLE_P.
5228
5229         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
5230         parameters for template functions.
5231         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
5232         destructors as well as constructors.
5233
5234 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
5235
5236         * class.c (build_ctor_vtbl_group): Set inits.
5237         * optimize.c (maybe_clone_body): Set DECL_INLINE and
5238         DECL_THIS_INLINE appropriately for clones.
5239
5240         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
5241         (DECL_CONV_FN_P): Simplify.
5242         (DECL_OPERATOR): Remove.
5243         (language_to_string): Declare.
5244         * decl.c (duplicate_decls): Fix typo in comment.
5245         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
5246         (grok_op_properties): Use DECL_CONV_FN_P instead of
5247         IDENTIFIER_TYPENAME_P.
5248         * dump.c (dequeue_and_dump): Dump the language linkage of
5249         declarations.
5250         * error.c (language_to_string): Give it external linkage.
5251         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
5252         (implicitly_declare_fn): Set DECL_LANGUAGE.
5253         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
5254         IDENTIFIER_TYPENAME_P.
5255         (tsubst_decl): Likewise.
5256         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
5257         * semantics.c (finish_member_declaration): Don't mark members of
5258         classes declared in an extern "C" region as extern "C".
5259
5260 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
5261
5262         * decl2.c (qualified_lookup_using_namespace): Look through
5263         namespace aliases.
5264
5265         * decl.c (push_using_decl): Return the old decl on namespace level.
5266
5267 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
5268
5269         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
5270         (VTT_NAME_PREFIX): New macro.
5271         (CTOR_VTBL_NAME_PREFIX): Likewise.
5272         (get_ctor_vtbl_name): New function.
5273         * class.c (get_vtable_name): Simplify.
5274         (get_vtt_name): New function.
5275         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
5276         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
5277         when a virtual base becomes primary.
5278         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
5279         VTTs.
5280         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
5281         additional parameters.
5282         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
5283         (initialize_array): New function.
5284         (build_vtt): Likewise.
5285         (build_vtt_inits): Likewise.
5286         (dfs_build_vtt_inits): Likewise.
5287         (dfs_fixup_binfo_vtbls): Likewise.
5288         (build_ctor_vtbl_group): Likewise.
5289         (initialize_vtable): Use initialize_array.
5290         (accumulate_vtbl_inits): Reimplement to handle construction
5291         vtables.
5292         (dfs_accumulate_vtbl_inits): Likewise.
5293         (bulid_vtbl_initializer): Adjust parameter name.
5294         * method.c (build_typename_overload): Remove #if 0'd code.
5295         (get_ctor_vtbl_name): New function.
5296         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
5297         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
5298
5299         * cp-tree.h (struct lang_type): Remove search_slot.
5300         (CLASSTYPE_SEARCH_SLOT): Remove.
5301         (emit_base_init): Change prototype.
5302         (initialize_vtbl_ptrs): Likewise.
5303         (expand_indirect_vtbls_init): Likewise.
5304         (clear_search_slots): Remove.
5305         * decl.c (lang_mark_tree): Don't mark search_slot.
5306         * init.c (initialize_vtbl_ptrs): Simplify.
5307         (emit_base_init): Likewise.
5308         * search.c (struct vbase_info): Document decl_ptr.
5309         (convert_pointer_to_single_level): Remove.
5310         (dfs_find_vbases): Remove.
5311         (dfs_init_base_pointers): Simplify.
5312         (dfs_clear_vbase_slots): Remove.
5313         (dfs_vtable_path_unmark): New function.
5314         (init_vbase_pointers): Simplify.
5315         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
5316         (expand_indirect_vtbls_init): Simplify.  Don't call
5317         mark_all_temps_used.
5318         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
5319         initialize_vtbl_ptrs.
5320
5321 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
5322
5323         * except.c: Add static prototypes.
5324
5325 2000-05-20  H.J. Lu  <hjl@gnu.org>
5326
5327         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
5328
5329 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
5330
5331         Don't create a separate copy of virtual bases for the
5332         CLASSTYPE_VBASECLASSES list.
5333         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
5334         (BINFO_FOR_VBASE): Remove.
5335         (CANONICAL_BINFO): Adjust.
5336         (binfo_for_vbase): New function.
5337         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
5338         instead of BINFO_FOR_VBASE.
5339         (build_vbase_pointer): Likewise.
5340         (build_secondary_vtable): Likewise.
5341         (dfs_mark_primary_bases): Likewise.
5342         (mark_primary_bases): Likewise.
5343         (layout_nonempty_base_or_field): Likewise.
5344         (dfs_set_offset_for_shared_vbases): Likewise.
5345         (dfs_set_offset_for_unshared_vbases): Likewise.
5346         (layout_virtual_bases): Likewise.  Adjust for changes to the
5347         CLASSTYPE_VBASECLASSES list.
5348         (dump_class_hierarchy_r): Use binfo_for_vbase
5349         instead of BINFO_FOR_VBASE.
5350         (dump_class_hierarchy): Likewise.
5351         (finish_vtbls): Likewise.
5352         (build_vtbl_initializer): Adjust for changes to the
5353         CLASSTYPE_VBASECLASSES list.
5354         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
5355         * decl.c (finish_destructor_body): Adjust for changes to the
5356         CLASSTYPE_VBASECLASSES list.
5357         * init.c (sort_base_init): Use binfo_for_vbase.
5358         (construct_virtual_bases): Adjust for changes to the
5359         CLASSTYPE_VBASECLASSES list.
5360         (expand_member_init): Use binfo_for_vbase.
5361         (build_vbase_delete):  Adjust for changes to the
5362         CLASSTYPE_VBASECLASSES list.
5363         * method.c (do_build_copy_constructor): Likewise.
5364         * rtti.c (get_base_offset): Use binfo_for_vbase.
5365         (expand_class_desc): Remove #if 0'd code.
5366         * search.c (struct vbase_info): Remove vbase_types.
5367         (get_base_distance):  Use binfo_for_vbase.
5368         (lookup_field_queue_p): Use CANONICAL_BINFO.
5369         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
5370         (get_pure_virtuals): Adjust for changes to the
5371         CLASSTYPE_VBASECLASSES list.
5372         (dfs_find_vbases): Use binfo_for_vbase.
5373         (dfs_init_vbase_pointers): Likewise.
5374         (init_vbase_pointers): Don't initialize vi.vbase_types.
5375         (virtual_context): Use binfo_for_vbase.
5376         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
5377         CLASSTYPE_VBASECLASSES list.
5378         (expand_indirect_vtbls_init): Simplify.
5379         (dfs_get_vbase_types): Don't replicate virtual bases.
5380         (find_vbase_instance): Use binfo_for_vbase.
5381         (binfo_for_vbase): New function.
5382         * typeck.c (get_delta_difference): Use binfo_for_vbase.
5383
5384 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
5385
5386         * decl2.c (finish_anon_union): Generalize error messages to handle
5387         anonymous structures.
5388         * init.c (perform_member_init): Remove `name' parameter.
5389         (build_field_list): New function.
5390         (sort_member_init): Handle anonymous union initialization order
5391         correctly.  Check for multiple initializations of the same union.
5392         (emit_base_init): Don't look up fields by name here.
5393         (expand_member_init): Record the result of name lookup for future
5394         reference.
5395         * typeck.c (build_component_ref): Fix formatting.
5396
5397 Wed May 17 17:27:44 2000  Andrew Cagney  <cagney@b1.cygnus.com>
5398
5399         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
5400         * typeck.c (build_x_compound_expr): Replace warn_unused with
5401         warn_unused_value.
5402
5403         * decl2.c (lang_decode_option): Update -Wall unused flags by
5404         calling set_Wunused.
5405
5406 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
5407
5408         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
5409         * init.c (dfs_vtable_path_unmark): Remove.
5410         * search.c (marked_new_vtable_p): Likewise.
5411         (unmarked_new_vtable_p): Likewise.
5412         (dfs_search_slot_nonempty_p): Likewise.
5413         (dfs_mark): Likewise.
5414         (dfs_vtable_path_unmark): Likewise.
5415         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
5416         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
5417         (dfs_init_vbase_pointers): Remove special-case new ABI code.
5418         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
5419         (init_vbase_pointers): Simplify.
5420         (expand_indirect_vtbls_init): Likewise.
5421
5422         * class.c (copy_virtuals): New function.
5423         (build_primary_table): Use it.
5424         (build_secondary_vtable): Likewise.
5425         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
5426         indicate that no vcall offset is required.
5427         (add_virtual_function): Likewise.
5428         (modify_all_vtables): Likewise.
5429         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
5430         (dfs_accumulate_vtbl_inits): Likewise.
5431         (build_vtbl_initializer): Make changes to handle construction
5432         vtables.
5433         (dfs_build_vcall_offset_vtbl_entries): Likewise.
5434         (build_rtti_vtbl_entries): Likewise.
5435         (build_vtable_entries): Handle a NULL vcall_index.
5436
5437 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
5438
5439         * decl2.c (lang_decode_option): Fix thinko.
5440
5441 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
5442
5443         * except.c (check_handlers): New fn.
5444         * cp-tree.h: Declare it.
5445         * semantics.c (finish_handler_sequence): Call it.
5446         (finish_function_handler_sequence): Likewise.
5447         (finish_handler_parms): Set TREE_TYPE on the handler.
5448         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
5449         * search.c (get_base_distance_recursive): If protect>1, ignore
5450         special access.
5451         (get_base_distance): Don't reduce watch_access.
5452
5453 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
5454
5455         * lex.c: #include diagnostic.h.
5456         (lang_init_options): Set default prefixing rules.
5457
5458         * lang-options.h: Add -fdiagnostics-show-location=.
5459
5460         * decl2.c: #include diagnostic.h.
5461         (lang_decode_option): Handle -fdiagnostics-show-location=.
5462
5463 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
5464
5465         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
5466         * vec.cc: Revert my 2000-05-07 change.
5467
5468 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
5469
5470         * class.c (check_field_decls): Complain about non-static data
5471         members with same name as class in class with constructor.
5472
5473 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
5474
5475         * decl.c (grokdeclarator): Allow non-static data members with
5476         same name as class.
5477
5478 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
5479
5480         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
5481         and pending_inline.filename.  Update prototypes.
5482         * decl.c (define_label): Constify filename parameter.
5483         * decl2.c (warn_if_unknown_interface): Constify local char *.
5484         * input.c Constify input_source.filename. Don't declare
5485         input_filename or lineno.  Constify filename parameter to feed_input.
5486         * lex.c (init_parse): Constify parameter and return value.
5487         (cp_pragma_interface, cp_pragma_implementation): Constify
5488         filename argument.
5489         (reinit_parse_for_method, reinit_parse_for_block,
5490         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
5491         Constify local char *.
5492         * pt.c: Don't declare lineno or input_filename.
5493         (print_template_context, tsubst_friend_function, tsubst_decl,
5494         tsubst, instantiate_decl): Constify local char *.
5495         * semantics.c (expand_body): Constify local char *.
5496         * tree.c (build_srcloc): Constify filename parameter.
5497         * typeck.c (c_expand_asm_operands): Constify filename
5498         parameter.
5499
5500 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
5501
5502         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
5503         offsetof expansion.
5504
5505 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
5506
5507         * inc/cxxabi.h:  Fix typos in comment.
5508         (__base_class_info::__offset): Use a static_cast.
5509
5510 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
5511
5512         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
5513         of std::size_t and std::ptrdiff_t respectively.
5514         * tinfo.cc: Likewise.
5515         * vec.cc: Likewise.
5516
5517 2000-05-06  Richard Henderson  <rth@cygnus.com>
5518
5519         * typeck.c (build_c_cast): Don't warn integer->pointer size
5520         mismatch for constants.
5521
5522 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
5523
5524         * rtti.c (ptmd_initializer): Set non-public, if class is
5525         incomplete.
5526
5527         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
5528         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
5529         __cxa_vec_delete): Likewise.
5530         * tinfo.cc (__dynamic_cast): Likewise.
5531         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
5532         __cxa_vec_delete): Likewise.
5533
5534 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
5535
5536         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
5537         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
5538         (lang_decl_flags): Add vcall_offset.
5539         (THUNK_VCALL_OFFSET): Use it.
5540         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
5541         * method.c (make_thunk): Create the lang_decl here, not in
5542         emit_thunk.
5543         (emit_thunk): Make generic thunks into ordinary functions once
5544         they have been fed to expand_body.
5545         * semantics.c (expand_body): Set current_function_is_thunk here.
5546
5547 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5548
5549         * class.c (update_vtable_entry_for_fn): Prototype.
5550
5551         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
5552         and `tmpl'.
5553
5554         * search.c (dfs_build_inheritance_graph_order): Prototype.
5555
5556 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
5557
5558         * cp-tree.h (special_function_kind): Add various kinds of
5559         destructors.
5560         (special_function_p): New function.
5561         * class.c (overrides): Don't let one kind of destructor override
5562         another.
5563         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
5564         whether or not to instantiate a template.
5565         * tree.c (special_function_p): Define.
5566
5567 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
5568
5569         * cp-tree.def (THUNK_DECL): Remove.
5570         * cp-tree.h (DECL_THUNK_P): New macro.
5571         (DECL_NON_THUNK_FUNCTION_P): Likewise.
5572         (DECL_EXTERN_C_FUNCTION_P): Likewise.
5573         (SET_DECL_THUNK_P): Likewise.
5574         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
5575         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
5576         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
5577         * decl.c (decls_match): Use DECL_EXTERN_C_P.
5578         (duplicate_decls): Likewise.
5579         (pushdecl): Likewise.  Adjust thunk handling.
5580         (grokfndecl): Use DECL_EXTERN_C_P.
5581         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
5582         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
5583         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
5584         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
5585         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
5586         DECL_NO_STATIC_CHAIN.
5587         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
5588         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
5589         * search.c (covariant_return_p): Remove THUNK_DECL handling.
5590         * ir.texi: Update.
5591
5592 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
5593
5594         * tree.c (walk_tree): Set lineno.
5595
5596 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
5597
5598         * exception.cc: Update license notice.
5599         * new.cc: Likewise.
5600         * new1.cc: Likewise.
5601         * new2.cc: Likewise.
5602         * tinfo.cc: Likewise.
5603         * tinfo2.cc: Likewise.
5604         * vec.cc: Likewise.
5605         * inc/cxxabi.h: Likewise.
5606         * inc/exception: Likewise.
5607         * inc/new: Likewise.
5608         * inc/new.h: Likewise.
5609         * inc/typeinfo: Likewise.
5610
5611 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
5612
5613         * tree.c (build_target_expr_with_type): If we already have a
5614         TARGET_EXPR, just return it.
5615
5616         * optimize.c (initialize_inlined_parameters): Don't generate an
5617         EXPR_STMT if we can just use DECL_INITIAL.
5618         * decl.c (emit_local_var): Only make the initialization a
5619         full-expression if stmts_are_full_exprs_p.
5620
5621 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
5622
5623         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
5624         macro.
5625         * call.c (standard_conversion): Use it.
5626         (direct_reference_binding): Likewise.
5627         (build_over_call): Likewise.
5628         (is_properly_derived_from): Likewise.
5629         (compare_ics): Likewise.
5630         * class.c (resolves_to_fixed_type_p): Likewise.
5631         * optimize.c (declare_return_variable): Likewise.
5632         * pt.c (is_specialization_of): Likewise.
5633         (unify): Likewise.
5634         * typeck.c (comp_target_parms): Likeiwse.
5635         (build_static_cast): Likewise.
5636         (build_reinterpret_cast): Likewise.
5637         (build_const_cast): Likewise.
5638         (comp_ptr_ttypes_real): Likewise.
5639         (comp_ptr_ttypes_const): Likewise.
5640         * typeck2.c (process_init_constructor): Likewise.
5641
5642 2000-04-30  Scott Snyder <snyder@fnal.gov>
5643
5644         * decl.c (finish_destructor_body): Use the base destructor when
5645         destroying virtual bases.
5646
5647 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
5648
5649         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
5650         STMT_EXPRs.
5651         * optimize.c (struct inline_data): Add target_exprs field.
5652         (declare_return_variable): When a function returns an aggregate,
5653         use the variable declared in the TARGET_EXPR as the remapped
5654         DECL_RESULT.
5655         (expand_call_inline): Update the pending target_exprs stack.
5656         (optimize_function): Initialize the stack.
5657
5658         * decl2.c (finish_file): Fix typo in comment.
5659
5660         * method.c (emit_thunk): Don't try to return a `void' value.
5661
5662         * optimize.c (initialize_inlined_parameters): If the parameter is
5663         addressable, we need to make a new VAR_DECL, even if the
5664         initializer is constant.
5665
5666 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
5667
5668         * decl.c (grok_op_properties): Add an extra check of argtypes.
5669
5670 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
5671
5672         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
5673         variables.
5674         (initialize_inlined_parameters): Try to avoid creating new
5675         VAR_DECLs.
5676
5677 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
5678
5679         * lex.c (my_get_run_time): Remove.
5680         (init_filename_times): Use get_run_time instead of my_get_run_time.
5681         (check_newline): Likewise.
5682         (dump_time_statistics): Likewise.
5683         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
5684         of computing elapsed time explicitly.
5685
5686 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
5687
5688         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
5689         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
5690         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
5691         before calling decl_constant_value.
5692         * class.c (check_bitfield_decl): Likewise.
5693         * cvt.c (ocp_convert): Likewise.
5694         (convert): Likewise.
5695         * decl.c (compute_array_index_type): Likewise.
5696         (build_enumerator): Likewise.
5697         * decl2.c (check_cp_case_value): Likewise.
5698         * pt.c (convert_nontype_argument): Likewise.
5699         (tsubst): Likewise.
5700         * typeck.c (decay_conversion): Likewise.
5701         (build_compound_expr): Likewise.
5702         (build_reinterpret_cast): Likewise.
5703         (build_c_cast): Likewise.
5704         (convert_for_assignment): Likewise.
5705
5706 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
5707
5708         * decl.c (finish_function): Don't play games with DECL_INLINE.
5709
5710 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
5711
5712         * ir.texi: Correct typo.
5713
5714 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
5715
5716         * decl.c (grokdeclarator): Reject VLAs as members.
5717
5718 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
5719
5720         * call.c (standard_conversion): Accept conversion between
5721         COMPLEX_TYPEs.
5722
5723         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
5724
5725 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
5726
5727         * decl2.c (finish_file): Remove double setup for accounting
5728         compile time.
5729
5730 2000-04-24  Robert Lipe <robertlipe@usa.net>
5731
5732         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
5733
5734 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
5735
5736         * new.cc (set_new_handler): Needs to be in std::.
5737
5738 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
5739
5740         * cp-tree.h (lang_decl): Remove pretty_function_p.
5741         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
5742         language-specific node.
5743         * decl.c (cp_make_fname_decl): Use build_decl, not
5744         build_lang_decl, to build the variables.
5745         (grokvardecl): Don't call build_lang_decl for local variables in
5746         templates.
5747         (grokdeclarator): Don't call build_lang_decl for local type
5748         declarations in templates.
5749         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
5750         zero'd memory, rather than calling memset.
5751         * pt.c: Include hashtab.h.
5752         (local_specializations): New variable.
5753         (retrieve_local_specialization): Use it.
5754         (register_local_specialization): Likewise.
5755         (tsubst_decl): Don't assume local variables have
5756         DECL_LANG_SPECIFIC.
5757         (instantiate_decl): Set up local_specializations.
5758         * Makefile.in (HTAB_H): New variable.
5759
5760 2000-04-23  Richard Henderson  <rth@cygnus.com>
5761
5762         * typeck.c (c_expand_asm_operands): Restore the original
5763         contents of the output list.
5764
5765 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
5766
5767         * ir.texi:  Document complex number representation.
5768
5769 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
5770
5771         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
5772         (target_incomplete_p): New function.
5773         (tinfo_base_init): Create comdat NTBS name variable.
5774         (ptr_initializer): Add non_public parameter. Calculate it.
5775         (ptmd_initializer): Likewise.
5776         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
5777         (create_real_tinfo_var): Add non_public parameter. Use it.
5778         Push proxy into global namespace.
5779         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
5780         New enumeration.
5781         * inc/typeinfo (type_info::before, type_info::operator==):
5782         Compare __name addresses.
5783
5784         * tinfo2.cc: Remove new-abi builtins comment.
5785
5786 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
5787
5788         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
5789
5790         * call.c (joust): Exit early if we get the same function, too.
5791
5792         * decl2.c (key_method): Return NULL_TREE for template classes.
5793         (import_export_class): Don't need to check for template classes.
5794
5795 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
5796
5797         * lex.c: Remove references to cccp.c.
5798
5799 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
5800
5801         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
5802         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
5803         (DECL_DESTRUCTOR_P): Use destructor_attr.
5804         (DECL_CONST_MEMFUNC_P): Reimplement.
5805         (DECL_VOLATILE_MEMFUNC_P): Remove.
5806         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
5807         (overrides): Use DECL_DESTRUCTOR_P.
5808         (check_for_override): Likewise.
5809         * decl.c (start_function): Likewise.
5810         * decl2.c (grokfclassfn): Likewise.
5811         (check_classfn): Likewise.
5812         (grok_function_init): Likewise.
5813
5814 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
5815
5816         * decl2.c (grokfield): Issue error on illegal data member
5817         declaration.
5818
5819 Mon Apr 17 17:11:16 2000  Mark P Mitchell  <mark@codesourcery.com>
5820
5821         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
5822
5823 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
5824
5825         * class.c (build_vtable_entry): Don't build thunks for type-info
5826         functions.
5827
5828 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
5829
5830         * decl.c (decls_match): Allow a redeclaration of a builtin to
5831         specify args while the builtin did not.
5832
5833 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
5834
5835         * cp-tree.def (THUNK_DECL): Add to documentation.
5836         * cp-tree.h (flag_huge_objects): Declare.
5837         * class.c (modify_vtable_entry): Tidy.
5838         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
5839         Calculate delta appropriately for the new ABI.
5840         (dfs_modify_vtables): Use it.
5841         (modify_all_vtables): Fix thinko in code to add overriding copies
5842         of functions to primary vtables.
5843         (build_clone): Fix typo in comment.
5844         (clone_function_decl): Correct order of destructors in vtable.
5845         (build_vbase_offset_vtbl_entries): Adjust comment.
5846         (dfs_vcall_offset_queue_p): Remove.
5847         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
5848         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
5849         (build_vtable_entry): Correct check for pure virtual functions.
5850         Don't declare flag_huge_objects.
5851         * decl.c (flag_huge_objects): Remove declaration.
5852         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
5853         Use int_size_in_bytes.
5854         (emit_thunk): Handle vcall offset thunks.
5855
5856 Sat Apr 15 16:00:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5857
5858         * decl2.c (parse_time, varconst_time): Delete declarations.
5859         (finish_file): Delete LINENO declaration.
5860         START_TIME and THIS_TIME now long.
5861
5862 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
5863
5864         * class.c (build_base_field): Reformat comment.
5865
5866         * inc/cxxabi.h (stddef.h): Comment inclusion.
5867         (__base_class_info::__offset): Comment shift.
5868
5869 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
5870
5871         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
5872         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
5873         (cp_push_exception_identifier): New macro.
5874         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
5875         (DECL_BASE_DESTRUCTOR_P): Likewise.
5876         (DECL_DELETING_DESTRUCTOR_P): Likewise.
5877         (get_vtbl_decl_for_binfo): Fix formatting.
5878         (in_charge_arg_for_name): New macro.
5879         (maybe_build_cleanup_and_delete): Remove declaration.
5880         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
5881         (in_charge_arg_for_name): New function.
5882         (build_new_method_call): Use it.  Handle cloned destructors.
5883         (build_clone): Don't make the base constructor virtual.
5884         Automatically defer generated functions.
5885         (clone_function_decl): Handle destructors, too.
5886         (clone_constructors_and_destructors): Likewise.
5887         (create_vtable_ptr): Don't create a vtable entry for a cloned
5888         function.
5889         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
5890         (initialize_predefined_identifiers): Update appropriately.
5891         (finish_destructor_body): Simplify.
5892         (maybe_build_cleanup_and_delete): Remove.
5893         * except.c (expand_throw): Handle new-ABI destructors.
5894         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
5895         (build_dtor_call): New function.
5896         (build_delete): Use it.  Simplify.
5897         * optimize.c (maybe_clone_body): Handle destructors.
5898         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
5899
5900         * exception.cc (cleanup_fn): New typedef.
5901         (CALL_CLEANUP): New macro.
5902         (cp_eh_info): Use them.
5903         (__cp_push_exception): Likewise.
5904         (__cp_pop_exception): Likewise.
5905
5906 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
5907
5908         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
5909         (complete_dtor_identifier): New macro.
5910         (CLASSTYPE_FIRST_CONVERSION): Remove.
5911         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
5912         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
5913         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
5914         (CLASSTYPE_CONSTRUCTORS): Likewise.
5915         (CLASSTYPE_DESTRUCTORS): Likewise.
5916         (lang_decl): Add cloned_function.
5917         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
5918         (DECL_BASE_CONSTRUCTOR_P): Likewise.
5919         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
5920         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
5921         (DECL_CLONED_FUNCTION_P): Likewise.
5922         (DECL_CLONED_FUNCTION): Likewise.
5923         (clone_function_decl): Declare.
5924         (maybe_clone_body): Likewise.
5925         * call.c (build_user_type_conversion_1): Call complete object
5926         constructors in the new ABI.
5927         (build_new_method_call): Don't add in-charge parameters under the
5928         new ABI.
5929         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
5930         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
5931         CLASSTYPE_DESTRUCTOR_SLOT.
5932         (build_clone): New function.
5933         (clone_function_decl): Likewise.
5934         (clone_constructors_and_destructors): Likewise.
5935         (check_bases_and_members): Use it.
5936         * decl.c (iniitialize_predefined_identifiers): Initialize
5937         complete_dtor_identifier.
5938         (finish_function): Don't add extra code to a clone.
5939         (lang_mark_tree): Mark cloned_function.
5940         * decl2.c (mark_used): Don't bother trying to instantiate things
5941         we synthesized.
5942         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
5943         * method.c (set_mangled_name_for_decl): Don't treat clones as
5944         constructors.
5945         (synthesize_method): Sythesize cloned functions, not the clones.
5946         * optimize.c (inline_data): Update comment on ret_label.
5947         (remap_block): Don't assume DECL_INITIAL exists.
5948         (copy_body_r): Allow ret_label to be NULL.
5949         (maybe_clone_body): Define.
5950         * pt.c (tsubst_decl): Handle clones.
5951         (instantiate_clone): New function.
5952         (instantiate_template): Use it.
5953         (set_mangled_name_for_template_decl): Don't treat clones as
5954         constructors.
5955         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
5956         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
5957         * semantics.c (expand_body): Clone function bodies as necessary.
5958
5959         * optimize.c (remap_decl): Avoid sharing structure for arrays
5960         whose size is only known at run-time.
5961         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
5962
5963         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
5964         to has_in_charge_parm_p.
5965         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
5966         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
5967         (DECL_COPY_CONSTRUCTOR_P): New macro.
5968         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
5969         (build_user_type_conversion_1): Likewise.
5970         (convert_like_real): Likewise.
5971         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
5972         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
5973         (copy_args_p): Likewise.
5974         (grok_ctor_properties): Likewise.
5975         (start_function): Likewise.
5976         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
5977         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
5978         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
5979         * method.c (do_build_copy_constructor): Use
5980         DECL_HAS_IN_CHARGE_PARM_P.
5981         (synthesize_method): Likewise.
5982         * pt.c (instantiate_template): Remove goto.
5983         * tree.c (build_cplus_method_type): Remove mention of obstacks in
5984         comment.
5985
5986         * cp-tre.h (finish_function): Change prototype.
5987         * decl.c (end_cleanup_fn): Adjust caller.
5988         (finish_function): Take only one parameter.
5989         * decl2.c (finish_objects): Adjust caller.
5990         (finish_static_storage_duration_function): Likewise.
5991         * method.c (emit_thunk): Likewise.
5992         * parse.y: Likewise.
5993         * parse.c: Regenerated.
5994         * pt.c (instantiate_decl): Likewise.
5995         * rtti.c (synthesize_tinfo_fn): Likewise.
5996         * semantics.c (expand_body): Likewise.
5997
5998         * cp-tree.h (copy_decl): New function.
5999         * class.c (finish_struct_1): Use it.
6000         * lex.c (copy_decl): Define it.
6001         * pt.c (tsubst_decl): Likewise.
6002         * tree.c (copy_template_template_parm): Likewise.
6003
6004         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
6005         has_nonpublic_assign_ref.
6006         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
6007         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
6008         * class.c (finish_struct_methods): Don't set
6009         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
6010         (interface_only): Don't declare.
6011         (interface_unknown): Likewise.
6012
6013 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
6014
6015         * tree.h (HAVE_TEMPLATES): Remove definition.
6016         * lang-options.h (-fthis-is-variable): Remove documentation.
6017
6018 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
6019
6020         * class.c (instantiate_type): Handle object-relative template-id.
6021
6022         * semantics.c (finish_expr_stmt): Call convert_to_void here.
6023         * decl.c (cplus_expand_expr_stmt): Not here.
6024
6025         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
6026         Initialize exprtype earlier.
6027
6028         * parse.y (fn.def1): Check for defining types in return types.
6029
6030         * decl.c (check_tag_decl): Notice extra fundamental types.
6031         Diagnose empty decls in classes, too.
6032
6033         * decl.c (grokdeclarator): Don't override an anonymous name if no
6034         declarator was given.
6035
6036         * cvt.c (convert_to_void): Call resolve_offset_ref.
6037
6038         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
6039
6040         * decl2.c (decl_namespace): Handle getting a type.
6041
6042         * typeck.c (build_c_cast): Re-enable warning for cast between
6043         pointer and integer of different size.
6044
6045 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
6046
6047         * inc/cxxabi.h (__pointer_type_info): Add restrict and
6048         incomplete flags.
6049         (__pointer_type_info::__pointer_catch): New virtual function.
6050         (__pointer_to_member_type_info): Derive from
6051         __pointer_type_info. Adjust.
6052         (__pointer_to_member_type_info::__do_catch): Remove.
6053         (__pointer_to_member_type_info::__is_pointer_p): Declare.
6054         (__pointer_to_member_type_info::__pointer_catch): Declare.
6055         * rtti.c (qualifier_flags): Add restrict flag.
6056         (ptmd_initializer): Reorder members.
6057         (create_tinfo_types): Expand comments. Reorder
6058         ptmd_desc_type_node members.
6059         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
6060         Implement.
6061         (__pointer_type_info::__do_catch): Move specific code into
6062         __pointer_catch. Call it.
6063         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
6064         specific catch checking. Fix void conversion check.
6065         (__pointer_to_member_type_info::__do_catch): Remove.
6066         (__pointer_to_member_type_info::__pointer_catch): Implement.
6067
6068 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
6069
6070         * lex.c (init_parse): Remove traces of classof and headof.
6071         * decl2.c (flag_operator_names): Default to 1.
6072         (lang_decode_option): Do not set it for -ansi.
6073
6074 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
6075
6076         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
6077         (DECL_MAIN_VARIANT): Remove.
6078         * decl.c (duplicate_decls): Don't set it.
6079         (start_function): Likewise.
6080         (lang_mark_tree): Don't mark it.
6081         * decl2.c (defer_fn): Don't use it.
6082         * lex.c (retrofit_lang_decl): Don't set it.
6083         * pt.c (tsubst_decl): Likewise.
6084         * ptree.c (print_lang_decl): Don't print it.
6085         * typeck.c (mark_addressable): Don't use it.
6086
6087 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
6088
6089         * vec.cc: Include <new> and <exception>.
6090         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
6091         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
6092         terminate.
6093         (__cxa_vec_delete): Catch dtor exceptions.
6094
6095 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
6096
6097         Prepend __ to implementation defined names.
6098         * inc/typeinfo (type_info): Rename _name to __name.
6099         (type_info::type_info): Rename parameter.
6100         (type_info::operator==, type_info::operator!=,
6101         type_info::before): Likewise.
6102         (type_info::is_pointer_p, type_info::is_function_p,
6103         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
6104         parameters.
6105         * inc/cxxabi.h
6106         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
6107         (__pointer_type_info::__pointer_type_info): Likewise.
6108         (__pointer_type_info::is_pointer_p,
6109         __pointer_type_info::do_catch): Prepend __. Rename parameters.
6110         (__array_type_info::__array_type_info): Rename parameters.
6111         (__function_type_info::__function_type_info): Likewise.
6112         (__function_type_info::is_function_p): Prepend __.
6113         (__enum_type_info::__enum_type_info): Rename parameters.
6114         (__pointer_to_member_type_info::__pointer_to_member_type_info):
6115         Likewise.
6116         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
6117         parameters.
6118         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
6119         (__class_type_info::__class_type_info): Rename parameters.
6120         (__class_type_info::sub_kind): Prepend __. Adjust member names.
6121         (__class_type_info::upcast_result,
6122         __class_type_info::dyncast_result): Prepend __. Move definition
6123         into tinfo.cc.
6124         (__class_type_info::do_upcast, __class_type_info::do_catch,
6125         __class_type_info::find_public_src,
6126         __class_type_info::do_dyncast,
6127         __class_type_info::do_find_public_src): Prepend __. Rename
6128         parameters.
6129         (__si_class_type_info::__si_class_type_info): Rename parameters.
6130         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
6131         __si_class_type_info::do_find_public_src): Prepent __. Rename
6132         parameters.
6133         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
6134         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
6135         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
6136         parameters.
6137         (__dynamic_cast): Rename parameters.
6138         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
6139         type_info::do_catch, type_info::do_upcast): Prepend __.
6140         (contained_p, public_p, virtual_p, contained_public_p,
6141         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
6142         (__class_type_info::do_catch,
6143         __class_type_info::do_upcast): Prepend __. Adjust.
6144         (__class_type_info::__upcast_result,
6145         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
6146         Adjust.
6147         (__class_type_info::find_public_src): Prepend __. Adjust.
6148         (__class_type_info::do_find_public_src,
6149         __si_class_type_info::do_find_public_src,
6150         __vmi_class_type_info::do_find_public_src): Likewise.
6151         (__class_type_info::do_dyncast,
6152         __si_class_type_info::do_dyncast,
6153         __vmi_class_type_info::do_dyncast): Likewise.
6154         (__class_type_info::do_upcast,
6155         __si_class_type_info::do_upcast,
6156         __vmi_class_type_info::do_upcast): Likewise.
6157         (__dynamic_cast): Adjust.
6158         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
6159         (__function_type_info::is_function_p): Likewise.
6160         (__pointer_type_info::do_catch): Likewise. Adjust.
6161         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
6162         (__throw_type_match_rtti_2): Adjust.
6163         (__is_pointer): Adjust.
6164
6165 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
6166
6167         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
6168         (complete_ctor_identifier): New macro.
6169         (special_function_kind): Add sfk_copy_constructor and
6170         sfk_assignment_operator.
6171         (LOOKUP_HAS_IN_CHARGE): Remove.
6172         (cons_up_default_function): Rename to ...
6173         (implicitly_declare_fn): ... this.
6174         * call.c (build_new_method_call): Add in-charge parameters for
6175         constructors here.
6176         * class.c (add_implicitly_declared_members): Change parameter name
6177         from cant_have_assignment to cant_have_const_assignment.
6178         Replace calls to cons_up_default_function to implicitly_declare_fn.
6179         * cvt.c (ocp_convert): Use complete_ctor_identifier.
6180         * decl.c (initialize_predefined_identifiers): Initialize it.
6181         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
6182         complex expression.
6183         * init.c (expand_default_init): Don't calculate the in-charge
6184         parameter here.
6185         (build_new_1): Likewise.
6186         * lex.c (cons_up_default_function): Move to method.c.
6187         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
6188         (implicitly_declare_fn): New function.
6189         * typeck.c (build_static_cast): Use complete_ctor_identifier.
6190         (build_modify_expr): Likewise.
6191         * typeck2.c (build_functional_cast): Likewise.
6192
6193         Under the new ABI, constructors don't return `this'.
6194         * cp-tree.h (warn_reorder): Declare.
6195         (special_function_kind): New enum.
6196         (global_base_init_list): Remove declaration.
6197         (emit_base_init): Don't return a value.
6198         (check_base_init): Don't declare.
6199         (is_aggr_typedef): Likewise.
6200         * decl.c (check_special_function_return_type): New function.
6201         (return_types): Remove.
6202         (grokdeclarator): Use check_special_function_return_type.
6203         (start_function): Don't initialize ctor_label under the new ABI.
6204         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
6205         * init.c (begin_init_stmts): Move to top of file.
6206         (finish_init_stmts): Likewise.
6207         (warn_reorder): Don't declare.
6208         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
6209         value.
6210         (check_base_init): Remove.
6211         (is_aggr_typedef): Likewise.
6212         (build_new_1): Don't use the return value of a constructor.
6213         * semantics.c (setup_vtbl_ptr): Don't use the return value
6214         of emit_base_init.
6215         * typeck.c (check_return_expr): Don't magically convert return
6216         statements into `return this' in constructors under the new ABI.
6217
6218         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
6219         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
6220         (base_ctor_identifier): New macro.
6221         (base_dtor_identifier): Likewise.
6222         (deleting_dtor_identifier): Likewise.
6223         * decl.c: Don't include obstack.h.
6224         (obstack_chunk_alloc): Don't define.
6225         (obstack_chunk_free): Likewise.
6226         (struct predefined_identifier): New type.
6227         (initialize_predefined_identifiers): New function.
6228         (init_decl_processing): Use it.
6229         (debug_temp_inits): Remove.
6230         (start_method): Don't call preserve_data.
6231         (hack_incomplete_structures): Update comment.
6232         * init.c (init_init_processing): Don't initialize
6233         nelts_identifier.
6234         (build_offset_rf): Remove dead code.
6235         (build_delete): Use CLASSTYPE_N_BASECLASSES.
6236         * search.c (init_search_processing): Don't initialize
6237         vptr_identifier.
6238
6239 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6240
6241         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
6242         some sign_compare warnings.
6243
6244 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
6245
6246         Rename abi::__vmi_class_type_info members.
6247         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
6248         base_list, detail_masks members to vmi_flags, vmi_base_count,
6249         vmi_bases and vmi_flags_masks respectively.
6250         (__vmi_class_type_info::vmi_flags_masks): Rename
6251         details_unknown_mask to flags_unknown_mask.
6252         * tinfo.cc (__class_type_info::do_upcast): Adjust.
6253         (__vmi_class_type_info::do_find_public_src): Adjust.
6254         (__vmi_class_type_info::do_dyncast): Adjust.
6255         (__vmi_class_type_info::do_upcast): Adjust.
6256
6257 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
6258
6259         * tinfo.cc (convert_to_base): New function.
6260         (get_vbase_offset): Remove. Move into convert_to_base.
6261         (__vmi_class_type_info::do_find_public_src): Adjust.
6262         (__vmi_class_type_info::do_dyncast): Adjust.
6263         (__vmi_class_type_info::do_upcast): Adjust.
6264
6265 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
6266
6267         * tinfo.cc (operator=): Use __builtin_strcmp.
6268         * tinfo2.cc (before): Likewise.
6269
6270 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
6271
6272         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
6273         (DECL_SAVED_INLINE): Rename to ...
6274         (DECL_DEFERRED_FN): ... this.
6275         (in_function_p): Remove declaration.
6276         (mark_inline_for_output): Rename to ...
6277         (defer_fn): ... this.
6278         * decl.c (finish_function): Adjust call to mark_inline_for_output.
6279         (in_function_p): Remove definition.
6280         * decl2.c (saved_inlines): Rename to ...
6281         (deferred_fns): ... this.
6282         (saved_inlines_used): Rename to ...
6283         (deferred_fns_used): ... this.
6284         (mark_inline_for_output): Rename to ...
6285         (defer_fn): ... this.
6286         (finish_file): Adjust accordingly.
6287         (init_decl2): Likewise.
6288         * lex.c (cons_up_default_function): Likewise.
6289         * pt.c (mark_decl_instantiated): Likewise.
6290         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
6291         circumstances.
6292         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
6293         * semantics.c (expand_body): Defer more functions.
6294
6295 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
6296
6297         * vec.cc: New file.
6298         * Make-lang.in (CXX_LIB2FUNCS): Add it.
6299         (vec.o): Build it.
6300         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
6301         __cxa_vec_delete): Declare.
6302
6303 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
6304
6305         * rtti.c (dfs_class_hint_mark): New static function.
6306         (dfs_class_hint_unmark): New static function.
6307         (class_hint_flags): Use them.
6308
6309 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
6310
6311         * decl2.c: Make flag_honor_std dependant on ENABLE_STD_NAMESPACE.
6312
6313 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
6314
6315         * cp-tree.h (instantiate_decl): Change prototype.
6316         * decl2.c (mark_used): Adjust call.
6317         * optimize.c (inlinable_function_p): Adjust handling of templates.
6318         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
6319         (do_type_instantiation): Likewise.
6320         (instantiate_decl): Defer more templates.
6321         (instantiate_pending_templates): Adjust logic to handle inline
6322         friend functions.
6323
6324         * Makefile.in (GGC_H): New variable.  Use it throughout in place
6325         of ggc.h.
6326
6327         * call.c: Don't include obstack.h.  Include ggc.h.
6328         (obstack_chunk_alloc): Don't define.
6329         (obstack_chunk_free): Likewise.
6330         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
6331         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
6332         (pop_switch): Free it.
6333
6334         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
6335
6336         * dump.c (dequeue_and_dump): Don't try to print the bit_position
6337         if we don't have a DECL_FIELD_OFFSET.
6338
6339 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
6340
6341         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
6342         special_function_p.
6343
6344 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6345
6346         * cfns.gperf (hash, libc_name_p): Prototype.
6347
6348         * rtti.c (build_dynamic_cast_1): Constification.
6349
6350         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
6351
6352         * semantics.c (deferred_type_access_control): Prototype.
6353
6354 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
6355
6356         Correct many new ABI issues regarding vbase and vcall offset
6357         layout.
6358         * cp-tree.h (BINFO_VTABLE): Document.
6359         (struct lang_type): Tweak formatting.
6360         (BINFO_PRIMARY_BINFO): Add to documentation.
6361         (CLASSTYPE_VSIZE): Fix typo in comment.
6362         (CLASSTYPE_VBASECLASSES): Update documentation.
6363         (BINFO_VBASE_MARKED): Remove.
6364         (SET_BINFO_VBASE_MARKED): Likewise.
6365         (CLEAR_BINFO_VBASE_MARKED): Likewise.
6366         (BINFO_FIELDS_MARKED): Remove.
6367         (SET_BINFO_FIELDS_MARKED): Likewise.
6368         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
6369         (enum access_kind): New enumeration.
6370         (num_extra_vtbl_entries): Remove declaration.
6371         (size_extra_vtbl_entries): Likewise.
6372         (get_vtbl_decl_for_binfo): New function.
6373         (dfs_vbase_unmark): Remove declaration.
6374         (mark_primary_bases): Likewise.
6375         * class.c (SAME_FN): Remove.
6376         (struct vcall_offset_data_s): Move definition.
6377         (build_vbase_pointer): Use `build', not `build_binary_op', to
6378         access the vbase pointer under the new ABI.
6379         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
6380         (build_primary_vtable): Likewise.
6381         (dfs_mark_primary_bases): Move here from search.c.
6382         (mark_primary_bases): Likewise.
6383         (determine_primary_bases): Under the new ABI, don't make a base
6384         class a primary base just because we don't yet have any virtual
6385         functions.
6386         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
6387         (num_vfun_entries): Remove.
6388         (dfs_count_virtuals): Likewise.
6389         (num_extra_vtbl_entries): Likewise.
6390         (size_extra_vtbl_entries): Likewise.
6391         (layout_virtual_bases): Iterate in inheritance graph order under
6392         the new ABI.
6393         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
6394         indicate that a vfield is present.
6395         (init_class_processing): Initialize access_public_node, etc., from
6396         ak_public, etc.
6397         (get_vtbl_decl_for_binfo): New function.
6398         (dump_class_hierarchy_r): Likewise.
6399         (dump_class_hierarchy): Use it.
6400         (finish_vtbls): Build the vtbls in inheritance graph order.
6401         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
6402         (initialize_vtable): Use get_vtbl_decl_for_binfo.
6403         (accumulate_vtbl_inits): Add comments explaining why a pre-order
6404         walk is required.
6405         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
6406         where the vptr points, even for primary vtables.
6407         (build_vtbl_initializer): Adjust handling of vbase and vcall
6408         offsets.
6409         (build_vcall_and_vbase_vtable_entries): New function.
6410         (dfs_build_vbase_offset_vtbl_entries): Remove.
6411         (build_vbase_offset_vtbl_entries): Reimplement.
6412         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
6413         were already handled in a primary base class vtable.
6414         (build_vcall_offset_vtbl_entries): Adjust.
6415         (build_rtti_vtbl_entries): Adjust.
6416         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
6417         * init.c (expand_virtual_init): Simplify.
6418         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
6419         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
6420         * search.c (BINFO_ACCESS): New macro.
6421         (SET_BINFO_ACCESS): Likewise.
6422         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
6423         (access_in_type): Likewise.
6424         (dfs_accessible_p): Likewise.
6425         (protected_accessible_p): Likewise.
6426         (lookup_fnfields_1): Adjust documentation.
6427         (dfs_mark_primary_bases): Move to class.c
6428         (mark_primary_bases): Likewise.
6429         (dfs_vbase_unmark): Remove.
6430         (virtual_context): Use BINFO_FOR_VBASE.
6431         (dfs_get_vbase_types): Simplify.
6432         (dfs_build_inheritance_graph_order): New function.
6433         (get_vbase_types): Use it.
6434         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
6435
6436         * tinfo.cc (get_vbase_offset): New function.
6437         (__vmi_class_type_info::do_find_public_src): Use it.
6438         (__vmi_class_type_info::do_dyncast): Likewise.
6439         (__vmi_class_type_info::do_upcast): Likewise.
6440
6441 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
6442
6443         * lang-specs.h: Pass -fno-show-column to the preprocessor.
6444
6445 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
6446
6447         * rtti.c (class_hint_flags): Rename flags.
6448         (class_initializer): Remove flags.
6449         (synthesize_tinfo_var): Combine offset and flags. Add flags
6450         for __vmi_class_type_info.
6451         (create_tinfo_types): Remove flags from __class_type_info and
6452         __si_class_type_info. Merge flags and offset from
6453         base_class_type_info.
6454         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
6455         (__base_class_info::is_virtual_p): Adjust.
6456         (__base_class_info::is_public_p): Adjust.
6457         (__base_class_info::offset): New accessor.
6458         (__class_type_info::details): Remove member.
6459         (__class_type_info::__class_type_info): Lose details.
6460         (__class_type_info::detail_masks): Remove.
6461         (__si_class_type_info::__si_class_type_info): Lose details.
6462         (__vmi_class_type_info::details): New member.
6463         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
6464         (__vmi_class_type_info::detail_masks): New member.
6465         * tinfo.cc (__class_type_info::do_upcast): Initialize result
6466         with unknown_details_mask.
6467         (__vmi_class_type_info::do_find_public_src): Adjust
6468         (__vmi_class_type_info::do_dyncast): Adjust.
6469         (__vmi_class_type_info::do_upcast): Set result details, if
6470         needed. Adjust.
6471         (__dynamic_cast): Temporarily #if out optimization.
6472
6473 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
6474
6475         * rtti.c (get_tinfo_decl): Mark used.
6476         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
6477         mark as dealt with, if we output it.
6478
6479 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
6480
6481         * class.c: Reorganize to put virtual function table initialization
6482         machinery at the end of the file.
6483
6484 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
6485
6486         * class.c (finish_struct): Use bitsize_zero_node.
6487         * pt.c (instantiate_class_template): Likewise.
6488
6489 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
6490
6491         Put RTTI entries at negative offsets in new ABI.
6492         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
6493         vbase offset at index -3, not -1.
6494         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
6495         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
6496         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
6497         (build_rtti_vtbl_entries): New function.
6498         (set_rtti_entry): Remove.
6499         (build_primary_vtable): Don't use it.
6500         (build_secondary_vtable): Likewise.
6501         (start_vtable): Remove.
6502         (first_vfun_index): New function.
6503         (set_vindex): Likewise.
6504         (add_virtual_function): Don't call start_vtable.  Do call
6505         set_vindex.
6506         (set_primary_base): Rename parameter.
6507         (determine_primary_base): Likewise.
6508         (num_vfun_entries): Don't use skip_rtti_stuff.
6509         (num_extra_vtbl_entries): Include RTTI information.
6510         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
6511         (skip_rtti_stuff): Remove.
6512         (dfs_modify_vtables): Don't use it.
6513         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
6514         (layout_nonempty_base_or_field): Update size handling.
6515         (create_vtable_ptr): Tweak.
6516         (layout_class_type): Adjust parameter names.
6517         (finish_struct_1): Simplify.
6518         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
6519         (skip_rtti_stuff): Remove.
6520         (first_vfun_index): New function.
6521         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
6522         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
6523         (marked_vtable_pathp): Declare.
6524         (unmarked_vtable_pathp): Likewise.
6525         * error.c (dump_expr): Use first_vfun_index to calculate vtable
6526         offsets.
6527         * rtti.c (build_headof): Look for RTTI at negative offsets.
6528         (get_tinfo_decl_dynamic): Likewise.
6529         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
6530         here.
6531         (create_pseudo_type_info): Do it here instead.  Adjust so that
6532         vptr points at first virtual function.
6533         * search.c (marked_vtable_pathp): Make it global.
6534         (unmarked_vtable_pathp): Likewise.
6535         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
6536         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
6537         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
6538         (get_pure_virtuals): Likewise.
6539         (expand_upcast_fixups): Likewise.
6540         * tree.c (debug_binfo): Likewise.
6541         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
6542         negative offset.
6543
6544 Sun Mar 26 20:15:26 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6545
6546         * class.c (check_field_decl): Fix typo.
6547         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
6548         (check_methods): Likewise.
6549         (check_field_decls): Likewise.
6550         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
6551         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
6552         Use DECL_RESULT_FLD, not DECL_RESULT.
6553         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
6554         * lex.c (identifier_type): Likewise.
6555         * pt.c (determine_specialization, lookup_template_class): Likewise.
6556         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
6557         (resolve_overloaded_unification, more_specialized): Likewise.
6558         * semantics.c (finish_member_declaration): Likewise.
6559         * typeck.c (build_x_function_call): Likewise.
6560
6561 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
6562
6563         * class.c (layout_empty_base): Handle empty bases with non-byte
6564         alignment.
6565         (build_base_field): Likewise.
6566         (layout_virtual_bases): Likewise.
6567
6568         * class.c (finish_struct_1): Fix typo in this change:
6569
6570         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6571
6572 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
6573
6574         * decl.c (grokdeclarator): Count partial specializations when
6575         keeping track of how many template classes have been seen.
6576
6577         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
6578
6579 Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6580
6581         * class.c (build_vbase_pointer_fields): layout_field now place_field.
6582         (get_vfield_offset): Use byte_position.
6583         (set_rtti_entry): Set OFFSET to ssizetype zero.
6584         (get_binfo_offset_as_int): Deleted.
6585         (dfs_record_base_offsets): Use tree_low_cst.
6586         (dfs_search_base_offsets): Likewise.
6587         (layout_nonempty_base_or_field): Reflect changes in RLI format
6588         and call byte_position.
6589         (layout_empty_base): Convert offset to ssizetype.
6590         (build_base_field): use rli_size_unit_so_far.
6591         (dfs_propagate_binfo_offsets): Do computation in proper type.
6592         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
6593         (layout_class_type): Reflect changes in RLI names and fields.
6594         (finish_struct_1): Set DECL_FIELD_OFFSET.
6595         * dump.c (dequeue_and_dump): Call bit_position.
6596         * expr.c (cplus_expand_constant): Use byte_position.
6597         * rtti.c (expand_class_desc): Use bitsize_one_node.
6598         * typeck.c (build_component_addr): Use byte_position and don't
6599         special case for zero offset.
6600
6601 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
6602
6603         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
6604
6605         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
6606         tinfo object.
6607         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
6608         vtable.
6609
6610 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
6611
6612         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
6613         DECL_P macros.
6614         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
6615         make_typename_type, check_initializer, cp_finish_decl,
6616         xref_tag): Likewise.
6617         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
6618         decl_namespace, arg_assoc_template_arg, arg_assoc,
6619         validate_nonmember_using_decl, do_class_using_decl): Likewise.
6620         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
6621         args_to_string): Likewise.
6622         * friend.c (is_friend): Likewise.
6623         * lex.c (note_got_semicolon, note_list_got_semicolon,
6624         is_global): Likewise.
6625         * method.c (build_overload_nested_name, build_overload_value,
6626         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
6627         * parse.y (typename_sub, typename_sub1): Likewise.
6628         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
6629         process_partial_specialization, convert_template_argument,
6630         template_args_equal, add_pending_template, lookup_template_class,
6631         for_each_template_parm_r, maybe_fold_nontype_arg,
6632         tsubst, instantiate_template, type_unification_real, unify,
6633         instantiate_pending_templates, set_mangled_name_for_template_decl):
6634         Likewise.
6635         * repo.c (repo_get_id, repo_template_used): Likewise.
6636         * search.c (lookup_field_1): Likewise.
6637         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
6638         * xref.c (classname): Likewise.
6639
6640 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
6641
6642         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
6643         (CANONICAL_BINFO): New macro.
6644         (BINFO_NEW_VTABLE_MARKED): Use it.
6645         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
6646         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
6647         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
6648         not TREE_TYPE.
6649         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
6650         (build_secondary_vtable): Likewise.
6651         (dfs_finish_vtbls): Likewise.
6652         (dfs_accumulate_vtbl_inits): Likewise.
6653         (accumulate_vtbl_inits): New function.
6654         (finish_vtbls): Make sure that virtual bases come after
6655         non-virtual bases in the vtable group.
6656         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
6657         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
6658         * search.c (struct vbase_info): Move definition.
6659         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
6660         (unmarked_new_vtable_p): Likewise.
6661         (dfs_mark_vtable_path): Remove.
6662         (dfs_mark_new_vtable): Remove.
6663         (dfs_unmark_new_vtable): Likewise.
6664         (dfs_clear_search_slot): Likewise.
6665         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
6666         (dfs_clear_vbase_slots): Likewise.
6667         (init_vbase_pointers): LIkewise.
6668
6669 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
6670
6671         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
6672         SIZETYPE to a non-SIZETYPE.
6673
6674 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
6675
6676         * class.c (layout_virtual_bases): Adjust names in conditionally
6677         compiled code.
6678
6679         * class.c (record_base_offsets): New function.
6680         (layout_conflict_p): Likewise.
6681         (layout_nonempty_base_or_field): Use it.
6682         (layout_empty_base): New function.
6683         (build_base_field): Use it.
6684         (build_base_fields): Update comment.
6685         (layout_virtual_bases): Fold in a little code form
6686         layout_basetypes.  Use layout_empty_base.
6687         (layout_basetypes): Remove.
6688         (end_of_class): New function.
6689         (layout_class_type): Use it.  Adjust.
6690
6691         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
6692         (fntype_p): Remove.
6693         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
6694         comment.
6695         (dfs_skip_nonprimary_vbases_markedp): Likewise.
6696         * typeck.c (fntype_p): Remove.
6697
6698         * cp-tree.h (TI_SPEC_INFO): Remove.
6699         (CLASSTYPE_TI_SPEC_INFO): Likewise.
6700         * pt.c (process_partial_specialization): Likewise.
6701
6702         * class.c (build_base_field): Fix thinko in computation of binfo
6703         offsets.
6704
6705         * tree.c (mark_local_for_remap_p): Mark variables declared in
6706         TARGET_EXPRs as well.
6707
6708 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
6709
6710         * typeck.c (require_complete_type, complete_type,
6711         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
6712         build_array_ref, convert_arguments, pointer_diff,
6713         build_x_unary_op, build_unary_op, build_c_cast,
6714         build_modify_expr): Use COMPLETE_TYPE_P etc.
6715         * call.c (is_complete, convert_like_real,
6716         build_new_method_call): Likewise.
6717         * class.c (build_vbase_pointer_fields, check_bases,
6718         build_base_field, finish_struct_1, pushclass): Likewise.
6719         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
6720         * decl.c (maybe_process_template_type_declaration, pushtag,
6721         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
6722         layout_var_decl, check_initializer, cp_finish_decl,
6723         grokdeclarator, require_complete_types_for_parms,
6724         grok_op_properties, xref_tag, xref_basetypes,
6725         check_function_type): Likewise.
6726         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
6727         * friend.c (do_friend): Likewise.
6728         * init.c (build_offset_ref): Likewise.
6729         * parse.y (structsp): Likewise.
6730         * pt.c (maybe_process_partial_specialization,
6731         tsubst_friend_function, instantiate_class_template, tsubst,
6732         do_type_instantiation, instantiate_pending_templates): Likewise.
6733         * repo.c (repo_get_id): Likewise.
6734         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
6735         synthesize_tinfo_var, emit_support_tinfos): Likewise.
6736         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
6737         * semantics.c (begin_class_definition): Likewise.
6738         * tree.c (build_cplus_method_type): Likewise.
6739         * typeck2.c (digest_init, build_functional_cast,
6740         add_exception_specifier): Likewise.
6741         * parse.h, parse.c: Regenerated.
6742
6743 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
6744
6745         * inc/cxxabi.h: New header file. Define new-abi entry points.
6746         (__pointer_type_info::target): Rename member to ...
6747         (__pointer_type_info::type): ... here.
6748         (__base_class_info::type): Rename member to ...
6749         (__base_class_info::base): ... here.
6750         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
6751         * cp-tree.h (CPTI_ABI): New global tree enumeration.
6752         (abi_node): New global tree node.
6753         * decl.c (abi_node): Document.
6754         (init_decl_processing): Initialize abi_node.
6755         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
6756         (get_vmi_pseudo_type_info): Likewise.
6757         (create_tinfo_types): Likewise.
6758         (emit_support_tinfos): Likewise.
6759         * tinfo.h (cxxabi.h): Include for new-abi.
6760         Move rtti class definitions to new header file.
6761         * tinfo.cc (abi): Use the namespace.
6762         (std): Move new abi rtti classes from here ...
6763         (__cxxabiv1): ... to here.
6764         * tinfo2.cc (cxxabi.h): Include for new-abi.
6765         Move rtti class definitions to new header file.
6766         (std): Move new abi rtti classes from here ...
6767         (__cxxabiv1): ... to here.
6768         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
6769         namespace.
6770
6771 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
6772             Jason Merrill  <jason@casey.cygnus.com>
6773
6774         * method.c (build_overload_int): Use host_integerp.
6775
6776 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
6777
6778         * init.c (build_offset_ref): Handle the case of a templated member
6779         function.
6780
6781 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
6782
6783         * except.c (expand_exception_blocks): Clear catch_clauses_last.
6784
6785 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
6786
6787         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
6788         * class.c (check_bitfield_decl): Turn illegal bitfields into
6789         non-bitfields.
6790         (dfs_propagate_binfo_offsets): Adjust for new size_binop
6791         semantics.
6792         (dfs_offset_for_unshared_vbases): Likewise.
6793         * cvt.c (cp_convert_to_pointer): Convert NULL to a
6794         pointer-to-member correctly under the new ABI.
6795         * expr.c (cplus_expand_constant): Don't use cp_convert when
6796         turning an offset into a pointer-to-member.
6797         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
6798         when dereferencing them under the new ABI.
6799         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
6800         of pointers-to-members under the new ABI.
6801
6802         * class.c (check_bitfield_decl): Remove restriction on really long
6803         bitfields.
6804         (layout_class_type): Implement new ABI handling of bitfields
6805         longer than their types.
6806
6807 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
6808
6809         * parse.y (extdefs): Call ggc_collect.
6810         * parse.c: Regenerated.
6811
6812 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
6813
6814         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
6815         (note_name_declared_in_class): Use OVL_CURRENT to get at a
6816         potential overload.
6817
6818 Fri Mar 17 08:09:14 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6819
6820         * class.c (build_vbase_path): Use integer_zerop.
6821         (build_vtable_entry): Use tree_low_cst.
6822         (get_vfield_offset): Use bit_position.
6823         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
6824         Use tree_low_cst.
6825         (check_bitfield_decl): Set DECL_SIZE using convert.
6826         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
6827         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
6828         Use tree_low_cst.
6829         (finish_struct_1): Use bit_position.
6830         (dump_class_hierarchy): Use tree_low_cst.
6831         * cp-tree.h (min_precision): Add declaration.
6832         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
6833         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
6834         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
6835         * expr.c (cplus_expand_constant): Use bit_position.
6836         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
6837         * rtti.c (get_base_offset): Use bit_position.
6838         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
6839         host_integerp, and tree_low_cst.
6840         (pointer_int_sum): Use integer_zerop.
6841         (build_component_addr): Use bit_position.
6842
6843 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
6844
6845         * typeck.c (require_complete_type): Don't assume size_zero_node.
6846         (complete_type_or_else): Likewise.
6847
6848 2000-03-16  Steven Grady <grady@digitaldeck.com>
6849             Jason Merrill  <jason@casey.cygnus.com>
6850
6851         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
6852
6853 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
6854
6855         * decl2.c (grokfield): Bail out if type is error_mark_node.
6856
6857 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
6858
6859         * tinfo2.cc (__ptr_to_member_data): Rename to ...
6860         (__pointer_to_member_data): ... here. Adjust.
6861         * rtti.c (create_tinfo_types): Adjust.
6862
6863 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
6864
6865         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
6866         * decl.c (ref_desc_type_node): Undocument.
6867         * rtti.c (ptr_ref_initializer): Rename to ...
6868         (ptr_initializer): ... here. Adjust comments.
6869         (ptmd_initializer): Fix comment thinko.
6870         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
6871         (create_tinfo_types): Remove ref_desc_type_node init.
6872         * tinfo2.cc (__reference_type_info): Remove.
6873
6874 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
6875
6876         * decl.c (cp_finish_decl): Remove obsolete comment.
6877
6878         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
6879
6880 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
6881
6882         * cp-tree.h: Tweak documentation.
6883         * class.c (build_vbase_pointer_fields): Layout the fields, too.
6884         (avoid_overlap): Remove.
6885         (get_binfo_offset_as_int): New function.
6886         (dfs_serach_base_offsets): Likewise.
6887         (layout_nonempty_base_or_field): Likewise.
6888         (build_base_field): Layout fields here.  Avoid placing two objects
6889         of the same type at the same address, under the new ABI.
6890         (build_base_fields): Adjust accordingly.
6891         (create_vtable_ptr): Return the new field, but don't attach it to
6892         TYPE_FIELDS.
6893         (remove_base_field): Remove.
6894         (remove_base_fields): Remove.
6895         (layout_basetypes): Adjust accordingly.
6896         (layout_class_type): Call layout_field for each field, rather than
6897         just making a wholesale call to layout_type.
6898
6899 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
6900
6901         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
6902
6903 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
6904
6905         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
6906
6907         * except.c (dtor_nothrow): New fn.
6908         (do_pop_exception): Use it.  Take type parm.
6909         (push_eh_cleanup): Take type parm.
6910         (expand_start_catch_block): Pass it.
6911         (build_eh_type_type_ref): Accept null type.
6912
6913 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
6914
6915         * cp-tree.h (revert_static_member_fn): Change prototype.
6916         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
6917         (grok_op_properties): Likewise.
6918         (start_function): Likewise.
6919         (revert_static_member_fn): Simplify.
6920         * pt.c (check_explicit_specialization): Adjust call to
6921         revert_static_member_fn.
6922
6923 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
6924
6925         * cp-tree.h (scope_kind): New type.
6926         (tmpl_spec_kind): Likewise.
6927         (declare_pseudo_global_level): Remove.
6928         (pseudo_global_level_p): Rename to template_parm_scope_p.
6929         (pushlevel): Remove declaration.
6930         (begin_scope): New function.
6931         (finish_scope): Likewise.
6932         (current_tmpl_spec_kind): Likewise.
6933         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
6934         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
6935         Add template_spec_p.
6936         (toplevel_bindings_p): Adjust.
6937         (declare_pseudo_global_level): Remove.
6938         (pseudo_global_level_p): Rename to template_parm_scope_p.
6939         (current_tmpl_spec_kind): New function.
6940         (begin_scope): Likewise.
6941         (finish_scope): Likewise.
6942         (maybe_push_to_top_level): Adjust.
6943         (maybe_process_template_type_declaration): Likewise.
6944         (pushtag): Likewise.
6945         (pushdecl_nonclass_level): Likewise.
6946         (lookup_tag): Likewise.
6947         (grokfndecl): Handle member template specializations.  Share
6948         constructor and non-constructor code.
6949         * decl2.c (check_classfn): Handle member template specializations.
6950         * pt.c (begin_template_parm_list): Use begin_scope.
6951         (begin_specialization): Likewise.
6952         (end_specialization): Likewise.
6953         (check_explicit_specialization): Use current_tmpl_spec_kind.
6954         Handle member template specializations.
6955         (end_template_decl): Use finish_scope.  Remove call to
6956         get_pending_sizes.
6957         (push_template_decl_real): Remove bogus error message.
6958         (tsubst_decl): Fix typo in code contained in comment.
6959         (instantiate_template): Handle member template specializations.
6960         (most_general_template): Likewise.
6961
6962 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
6963
6964         * lex.c (whitespace_cr): Compress consecutive calls to warning().
6965         (do_identifier): Ditto for error().
6966
6967         * pt.c (convert_nontype_argument): Ditto for cp_error().
6968         (convert_template_argument): Ditto for cp_pedwarn().
6969
6970 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
6971
6972         * exception.cc (__check_null_eh_spec): New fn.
6973         * except.c (expand_end_eh_spec): Call it if the spec is throw().
6974
6975 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
6976
6977         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
6978         * except.c (expand_end_eh_spec): Add the return type.
6979         * rtti.c (throw_bad_cast): Add the parmtypes.
6980         (throw_bad_typeid): Likewise.
6981
6982         * semantics.c (expand_stmt): Only leave out rtl for unused
6983         artificials, and set DECL_IGNORED_P on them as well.
6984         * decl.c (wrapup_globals_for_namespace): Likewise.
6985
6986 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
6987
6988         * decl.c (maybe_commonize_var): Skip all artificial decls.
6989         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
6990
6991 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
6992
6993         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
6994         * cp-tree.h: Declare flag_enforce_eh_specs.
6995         * decl.c (store_parm_decls, finish_function): Check it.
6996
6997         C library functions don't throw.
6998         * Makefile.in (cfns.h): New target.
6999         (except.o): Depend on it.
7000         * Make-lang.in (cc1plus): Depend on cfns.gperf.
7001         * cfns.gperf: New file.
7002         * cfns.h: Generated.
7003         * except.c: Include it.
7004         (nothrow_libfn_p): New fn.
7005         * decl.c (grokfndecl): Use it.
7006         * cp-tree.h: Declare it.
7007
7008         * decl.c (push_overloaded_decl_1, auto_function,
7009         define_function): Lose.
7010         (build_library_fn_1): New static fn.
7011         (builtin_function): Use it.
7012         (get_atexit_node): Use build_library_fn_ptr.
7013         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
7014         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
7015         push_void_library_fn, push_throw_library_fn): New fns.
7016         * cp-tree.h: Declare them.
7017         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
7018         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
7019         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
7020         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
7021         * rtti.c (build_runtime_decl): Lose.
7022         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
7023         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
7024         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
7025
7026         * call.c (build_call): Remove result_type parm.
7027         Call mark_used on unused artificial fns.
7028         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
7029
7030 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
7031
7032         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
7033         appropriate.
7034         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
7035         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
7036         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
7037         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
7038         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
7039         expand_generic_desc): Likewise.
7040
7041 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
7042
7043         * exception.cc (__cp_pop_exception): Cleanup the original object.
7044
7045 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
7046
7047         * decl.c (grok_op_properties): Merge conversion to void warning
7048         with other silly op warnings.
7049
7050 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
7051
7052         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
7053         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
7054
7055 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
7056
7057         * decl.c (cp_make_fname_decl): New function.
7058         (wrapup_globals_for_namespace): Don't emit unused static vars.
7059         (init_decl_processing): Remove comment about use of
7060         array_domain_type. Set make_fname_decl.
7061         (cp_finish_decl): Remove __FUNCTION__ nadgering.
7062         * semantics.c (begin_compound_stmt): Remove
7063         current_function_name_declared flagging.
7064         (expand_stmt): Don't emit unused local statics.
7065         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
7066         specially.
7067
7068 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
7069
7070         * typeck.c (convert_for_assignment): Don't look at array
7071         initializer.
7072         * call.c (convert_like_real): Likewise.
7073
7074 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
7075
7076         Add initial support for '\uNNNN' specifier.
7077         * lex.c (read_ucs): New fn.
7078         (readescape, skip_white_space): Call it.
7079         (is_extended_char, is_extended_char_1): New fns.
7080         (utf8_extend_token): New fn, #if 0'd out.
7081         (real_yylex): Treat extended chars like letters.
7082
7083         * search.c (note_debug_info_needed): Walk the bases even if we
7084         weren't deferring the type itself.
7085
7086 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7087
7088         * decl2.c (finish_objects): Constify a char*.
7089
7090         * method.c (emit_thunk): Likewise.
7091
7092 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
7093
7094         * typeck.c (dubious_conversion_warnings): Look through
7095         REFERENCE_TYPE.
7096
7097 Mon Mar  6 08:46:47 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7098
7099         * class.c (dfs_modify_vtables): I is now unsigned.
7100         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
7101         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
7102         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
7103         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
7104         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
7105         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
7106         Call integer_all_onesp.
7107         * typeck2.c (process_init_constructor): Use compare_tree_int.
7108
7109         * lang-specs.h (as): Don't call if -syntax-only.
7110
7111 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
7112
7113         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
7114         RTL_EXPR_HAS_NO_SCOPE after all.
7115
7116 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
7117
7118         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
7119         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
7120         RTL_EXPR_HAS_NO_SCOPE.
7121
7122         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
7123         later.
7124
7125         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
7126
7127 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
7128
7129         * call.c (convert_like): Macrofy.
7130         (convert_like_with_context): New macro.
7131         (convert_like_real): Renamed from convert_like.  Add calling
7132         context parameters, for diagnostics. Add recursive flag.  Call
7133         dubious_conversion_warnings for outer conversion.
7134         (build_user_type_conversion): Use convert_like_with_context.
7135         (build_over_call): Likewise. Don't warn about dubious
7136         conversions here. Adjust convert_default_arg calls.
7137         (convert_default_arg): Add context parameters for diagnostics.
7138         Pass throught to convert_like_with_context.
7139         * cp-tree.h (convert_default_arg): Add context parameters.
7140         (dubious_conversion_warnings): Prototype new function.
7141         * typeck.c (convert_arguments): Adjust convert_default_arg call.
7142         (dubious_conversion_warnings): New function, broken
7143         out of convert_for_assignment.
7144         (convert_for_assignment): Adjust.
7145
7146 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
7147
7148         * decl2.c (key_method): Break out from...
7149         (import_export_vtable, import_export_class): ...here.
7150
7151         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
7152         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
7153
7154         * search.c (note_debug_info_needed, dfs_debug_mark,
7155         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
7156         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
7157
7158 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
7159
7160         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
7161         typos.
7162
7163 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
7164
7165         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
7166         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
7167         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
7168         (lang_type): Split gets_new into has_new and has_array_new.
7169         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
7170         (TYPE_GETS_NEW): Split into ...
7171         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
7172         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
7173         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
7174         (build_op_new_call): Don't declare.
7175         (build_new_1): Likewise.
7176         * call.c (build_op_new_call): Remove.
7177         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
7178         instead of TYPE_NEEDS_DESTRUCTOR.
7179         (finish_struct_bits): Likewise.
7180         (add_implicitly_declared_members): Likewise.
7181         (check_field_decl): Likewise.
7182         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
7183         correctly under the new ABI.
7184         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
7185         instead of TYPE_NEEDS_DESTRUCTOR.
7186         (initialize_local_var): Likewise.
7187         (destroy_local_var): Likewise.
7188         (cp_finish_decl): Likewise.
7189         (register_dtor_fn): Likewise.
7190         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
7191         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
7192         TYPE_VEC_DELETE_TAKES_SIZE here.
7193         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
7194         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
7195         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
7196         (finish_destructor_body): Likewise.
7197         (maybe_build_cleanup_1): Likewise.
7198         * decl2.c (do_static_destruction): Likewise.
7199         * init.c (build_new_1): Make it static.
7200         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
7201         (expand_cleanup_for_base): Likewise.
7202         (get_cookie_size): New function.
7203         (build_new_1): Handle array-new cookies correctly under the new
7204         ABI.
7205         (build_vec_delete_1): Likewise.
7206         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
7207         (build_delete): Likewise.
7208         (build_vec_delete): Handle array-new cookies correctly under the new
7209         ABI.
7210         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
7211         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
7212         TYPE_HAS_ARRAY_NEW_OPERATOR.
7213         * ptree.c (print_lang_type): Check them.
7214         * search.c (context_for_name_lookup): Fix typo in comment.
7215         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
7216         * tree.c (break_out_cleanups): Likewise.
7217         (build_cplus_array_test_1): Likewise.
7218         (cp_build_qualified_type_real): Likewise.
7219         * typeck.c (complete_type): Likewise.
7220
7221         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
7222         the command-line, not the end.
7223
7224 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
7225
7226         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
7227
7228 2000-03-02  Tom Tromey  <tromey@cygnus.com>
7229
7230         * cp-tree.h (build_java_class_ref): Declare.
7231         * init.c (build_java_class_ref): No longer static.
7232         * except.c (expand_throw): Generate a Java-style `throw' if the
7233         thrown object is a "Java" object.
7234         (initialize_handler_parm): Generate a Java-style lookup of
7235         exception info if the caught object is a "Java" object.
7236         (catch_language, catch_language_init): New globals.
7237         (decl_is_java_type): New function.
7238         (expand_start_catch_block): Don't call push_eh_info() or
7239         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
7240         class reference to build_catch_block.
7241
7242 Thu Mar  2 13:32:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7243
7244         * typeck.c (comptypes): Treat sizetype like its language equivalent.
7245
7246 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
7247
7248         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
7249         to merge reference/pointer code and fix incorrect warnings.
7250
7251 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
7252
7253         * search.c (protected_accessible_p): Use context_for_name_lookup.
7254
7255         * init.c (construct_virtual_bases): Fix thinko.
7256         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
7257
7258 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
7259
7260         * decl.c (current_function_decl): Move to toplev.c.
7261
7262 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
7263
7264         * pt.c (fn_type_unification): Unify return type, whenever
7265         provided.
7266         (get_bindings_real): Only pass return type when necessary.
7267         Remove explicit return type check.
7268         * class.c (resolve_address_of_overloaded_function): Pass desired
7269         return type to fn_type_unification.
7270
7271 Mon Feb 28 08:15:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7272
7273         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
7274         DECL_FIELD_SIZE.
7275         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
7276         DECL_FIELD_SIZE.
7277         * rtti.c (expand_class_desc): Likewise.
7278         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
7279         (THUNK_VCALL_OFFSET): Likewise.
7280         (THUNK_DELTA): Reflect changes in ../tree.h.
7281
7282 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
7283
7284         * search.c (protected_accessible_p): Also allow the access if
7285         the member is public in DERIVED.  Lose TYPE parm.
7286         (friend_accessible_p): Lose TYPE parm.
7287         (accessible_p): Adjust.
7288
7289 Sun Feb 27 16:40:33 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7290
7291         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
7292         on things that are not sizes; ssize_binop deleted.
7293         Call size_diffop when appropriate.
7294         (dfs_build_vcall_offset_vtbl_entries): Likewise.
7295         (build_primary_vtable, build_secondary_vtable): Likewise.
7296         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
7297         Variable I is HOST_WIDE_INT.
7298         (get_vfield_offset): Pass proper types to size_binop.
7299         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
7300         (finish_struct_1): Likewise.
7301         (skip_rtti_stuff): Arg N is now pointer to signed.
7302         (layout_class_type): Use size_zero_node.
7303         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
7304         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
7305         * decl.c (complete_arry_type): Pass proper types to size_binop.
7306         (xref_basetypes): BINFO_OFFSET is sizetype.
7307         * error.c (dump_expr): Don't use size_binop non-sizes.
7308         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
7309         * init.c (construct_virtual_bases): Fix type error.
7310         (build_vec_delete_1): Pass proper type to size_binop and don't
7311         fold result.
7312         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
7313         * rtti.c (get_base_offset): Pass proper type to size_binop.
7314         * search.c (dfs_find_vbases): Fix type error.
7315         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
7316         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
7317         * tree.c (debug_binfo): Variable N is signed.
7318         Use HOST_WIDE_INT_PRINT_DEC.
7319         * typeck.c (comptypes): sizetype is same as equivalent integer type.
7320         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
7321         size_one_node and size_zero_node.
7322         (c_alignof): Use size_one_node.
7323         (build_component_addr): Pass proper types to size_binop.
7324         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
7325
7326 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
7327
7328         Implement class scope using-declarations for functions.
7329         * class.c (handle_using_decl): Call add_method for used functions.
7330         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
7331         (add_method): Used functions are hidden by local functions.
7332         (check_bases_and_members): Handle using-decls before finalizing
7333         CLASSTYPE_METHOD_VEC.
7334         * call.c (add_function_candidate): Add ctype parm; if non-zero,
7335         override the type of 'this' accordingly.
7336         (add_template_candidate, add_template_candidate_real): Add ctype parm.
7337         (convert_class_to_reference, build_user_type_conversion_1,
7338         build_new_function_call, build_object_call, build_new_op,
7339         build_new_method_call): Pass ctype parm.
7340
7341         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
7342         the baselink.
7343         * call.c (convert_class_to_reference, build_user_type_conversion_1,
7344         build_new_function_call, build_object_call, build_new_op,
7345         build_new_method_call, build_op_delete_call): Don't get basetype_path
7346         from a baselink.
7347         * typeck.c (build_component_ref): Likewise.
7348         * init.c (build_offset_ref): Likewise.
7349         (resolve_offset_ref): Don't call enforce_access.
7350         Call build_scoped_ref.
7351         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
7352         would cause an error or if -pedantic.
7353         * class.c (alter_access): Lose binfo parm.
7354
7355 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
7356
7357         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
7358         types.
7359
7360 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
7361
7362         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
7363         pseudo_type_info creation into the std namespace
7364
7365 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
7366
7367         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
7368         (import_export_class): Remove declaration.
7369         * decl2.c (import_export_class): Make it static.
7370         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
7371         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
7372         EXPR_WITH_FILE_LOCATION.
7373         * lex.c (check_newline): Tweak filename/lineno setting.
7374         * semantics.c (begin_while_stmt): Fix typo in comment.
7375
7376 Sat Feb 26 19:50:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7377
7378         * lang-options.h (-fmessage-length=): Add missing option.
7379
7380         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
7381
7382 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
7383
7384         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
7385
7386 Fri Feb 25 14:52:33 2000  Jim Wilson  <wilson@cygnus.com>
7387
7388         * optimize.c (expand_call_inline): Emit the return label before
7389         evaluating the return value.
7390
7391 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
7392
7393         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
7394         than duplicating functionality here.
7395         * optimize.c: Include input.h.
7396         (expand_call_inline): Use push_srcloc and pop_srcloc.
7397         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
7398         * parse.c: Regenerated.
7399         * Makefile.in (lex.o): Depend on input.h.
7400         (optimize.o): Likewise.
7401
7402 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
7403
7404         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
7405         function type, rather than ICE.
7406
7407 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
7408
7409         * decl.c (grokdeclarator): Call decl_type_access_control.
7410         * parse.y (parse_end_decl): Don't call decl_type_access_control if
7411         decl is null.
7412
7413 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
7414
7415         * decl.c (decls_match): Remove obsolete static member nadgering.
7416
7417 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
7418
7419         * decl.c (grokdeclarator): Change ANSI to ISO.
7420         * lex.c (consume_string, readescape, do_identifier): Likewise.
7421         (parse_float, real_yylex): Likewise.
7422         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
7423         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
7424         new_type_id, maybe_label_decls, simple_stmt,
7425         for.init.statement): Likewise.
7426         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
7427         * semantics.c (finish_named_return_value): Likewise.
7428         * parse.c: Regenerate.
7429
7430 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
7431
7432         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
7433         (CPTI_CLASS_STAR_TYPE): Remove.
7434         (vtable_index_type): Likewise.
7435         (class_star_type_node): Remove.
7436         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
7437         (build_binary_op_nodefault): Remove.
7438         * call.c (build_new_op): Use build_binary_op instead of
7439         build_binary_op_nodefault.
7440         * decl.c (init_decl_processing): Remove class_star_type_node
7441         initialization.  Make delta_type_node ptrdiff_type_node under the
7442         new ABI.  Initialize vtable_index_type.
7443         (build_ptrmemfunc_type): Build different structures for the new
7444         ABI.
7445         (build_enumerator): Use build_binary_op instead of
7446         build_binary_op_nodefault.
7447         * method.c (build_overload_value): Mangle pointers-to-members
7448         appropriately under the new ABI.
7449         * typeck.c (build_array_ref): Use build_binary_op instead of
7450         build_binary_op_nodefault.
7451         (get_member_function_from_ptrfunc): Adjust for the new ABI.
7452         (build_binary_op_nodefault): Rename to ...
7453         (build_binary_op): ... this.  Remove old version.  Adjust for
7454         pointer-to-member comparisons under the new ABI.
7455         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
7456         (build_ptrmemfunc): Adjust for the new ABI.
7457         (expand_ptrmemfunc_cst): Likewise.
7458         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
7459         (pfn_from_ptrmemfunc): Adjust for the new ABI.
7460
7461 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
7462
7463         * call.c (build_object_call): Compress consecutive calls to
7464         cp_error.
7465         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
7466         (build_op_delete_call): Adjust message formatting.
7467
7468         * class.c (check_bases): Compress consecutive calls to
7469         cp_pedwarn.
7470         (finish_struct_anon): Say 'ISO C++'.
7471
7472         * decl.c (start_decl): Same here.
7473         (grok_reference_init): Likewise.
7474         (grokfndecl): Correct message formatting.
7475         (grokfndecl): Improve diagnostic.
7476         (check_static_variable_definition): Likewise. Say 'ISO C++'
7477         (compute_array_index_type): Say 'ISO C++'
7478         (create_array_type_for_decl): Compress consecutive calls to
7479         cp_error.
7480         (grokdeclarator): Say 'ISO C++'
7481         (grok_op_properties): Likewise.
7482
7483         * decl2.c (delete_sanity): Clairify diagnostic.
7484         (check_member_template): Same here.
7485         (grok_function_init): Use consistent terminology.
7486
7487         * expr.c (do_case): Say 'ISO C++'
7488
7489         * friend.c (do_friend): Compress consecutive calls to warning.
7490
7491 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
7492
7493         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
7494         * class.c (build_secondary_vtable): Reorganize.  Don't create a
7495         new vtable under the new ABI.
7496         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
7497         computing the size.
7498         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
7499         the initializing elements.
7500         (initialize_vtable): New function.
7501         (dfs_finish_vtbls): Use it.
7502         (dfs_accumulate_vtbl_inits): New function.
7503         (finish_vtbls): Merge primary and secondary vtables under the new
7504         ABI.
7505         (finish_struct_1): Remove redundant call to layout_vtable_decl.
7506         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
7507         aren't VAR_DECLs.
7508
7509         * class.c (build_vtable): New function, split out from ...
7510         (get_vtable_decl): ... here, and ...
7511         (build_secondary_vtable): ... here.
7512
7513         * pt.c (tsubst_decl): Fix formatting.
7514
7515 Sat Feb 19 18:43:13 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7516
7517         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
7518         (avoid_overlap, build_base_field): Likewise.
7519         (build_base_field, build_base_fields, is_empty_class):
7520         Test DECL_SIZE with integer_zero.
7521         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
7522         * cp-tree.h (struct lang_type): New field size_unit.
7523         (CLASSTYPE_SIZE_UNIT): New macro.
7524         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
7525         (cp_finish_decl): Delete -Wlarger-than processing.
7526         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
7527         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
7528         * tree.c (make_binfo): binfo vector is one entry longer.
7529         (walk_tree): Walk DECL_SIZE_UNIT.
7530
7531 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
7532
7533         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
7534         comment.
7535         (build_vtable_entry): Don't assume all vtable entries are
7536         functions.
7537         (build_vtbl_initializer): Adjust accordingly.
7538         (get_vtable_decl): Fix formatting.
7539
7540 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
7541
7542         * semantics.c (deferred_type_access_control): Walk the entire
7543         type_lookups list.
7544         (save_type_access_control): Rename from
7545         initial_deferred_type_access_control.  Just remember the value.
7546         (decl_type_access_control): New fn.
7547         (begin_function_definition): Use deferred_type_access_control, after
7548         we've started the function.  Set type_lookups to error_mark_node.
7549         * parse.y (frob_specs, fn.def1): Adjust.
7550         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
7551         (parse_end_decl, parse_bitfield0, parse_method): New fns.
7552         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
7553         (after_type_component_declarator0): Likewise.
7554         (after_type_component_declarator): Likewise.
7555         (notype_component_declarator): Likewise.
7556         * cp-tree.h: Adjust.
7557
7558         * decl.c (redeclaration_error_message): Allow redeclaration of
7559         namespace-scope decls.
7560
7561 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
7562
7563         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
7564
7565 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
7566
7567         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
7568         * decl2.c (grokclassfn): Likewise.
7569
7570         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
7571
7572         * decl2.c (lang_decode_option): Don't set default message length
7573         here.
7574         * lex.c (lang_init_options): Set it here.
7575
7576 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
7577
7578         Make DECL_CONTEXT mean the class in which a member function was
7579         declared, even for a virtual function.
7580         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
7581         (DECL_FRIEND_CONTEXT): New macro.
7582         (DECL_REAL_CONTEXT): Remove.
7583         (SET_DECL_FRIEND_CONTEXT): Likewise.
7584         (DECL_VIRTUAL_CONTEXT): Adjust.
7585         (DECL_CLASS_SCOPE_P): Use TYPE_P.
7586         (add_friends): Remove.
7587         (hack_decl_function_context): Likewise.
7588         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
7589         CP_DECL_CONTEXT.
7590         (build_over_call): Fix indentation.  Use DECL_CONTEXT
7591         instead of DECL_CLASS_CONTEXT.
7592         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
7593         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
7594         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
7595         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
7596         (build_base_field): Likewise.
7597         (finish_struct_1): Likewise.
7598         (build_self_reference): Likewise.
7599         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
7600         DECL_REAL_CONTEXT.
7601         (pushtag): Use decl_function_context, not
7602         hack_decl_function_context.
7603         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
7604         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
7605         (pushdecl): Remove bogus code.
7606         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
7607         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
7608         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
7609         Use decl_function_context, nothack_decl_function_context.
7610         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
7611         (grokdeclarator): Likewise.  Use decl_function_context, not
7612         hack_decl_function_context.
7613         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
7614         (start_function): Use DECL_FRIEND_CONTEXT, not
7615         DECL_CLASS_CONTEXT.  Use decl_function_context, not
7616         hack_decl_function_context.
7617         (finish_function): Use decl_function_context, not
7618         hack_decl_function_context.
7619         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
7620         DECL_CLASS_CONTEXT.
7621         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
7622         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
7623         (grokfield): Likewise.
7624         (finish_builtin_type): Likewise.
7625         (finish_vtable_vardec): Use decl_function_context, not
7626         hack_decl_function_context.
7627         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
7628         (start_static_initialization_or_destruction): Likewise.
7629         (finish_static_initialization_or_destruction): Likewise.
7630         (mark_used): Adjust logic for deciding when to synthesize methods.
7631         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
7632         DECL_REAL_CONTEXT.
7633         * error.c (dump_function_decl): Use DECL_CONTEXT, not
7634         DECL_CLASS_CONTEXT.
7635         * friend.c (is_friend): Likewise.
7636         (add_friends): Remove.
7637         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
7638         * lex.c (begin_definition_of_inclass_inline): Use
7639         decl_function_context, not hack_decl_function_context.
7640         (process_next_inline): Likewise.
7641         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
7642         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
7643         DECL_CLASSS_CONTEXT.
7644         (hack_identifier): Likewise.
7645         (synthesize_method):  Use decl_function_context, not
7646         hack_decl_function_context.
7647         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
7648         DECL_REAL_CONTEXT.
7649         (is_member_template): Use decl_function_context, not
7650         hack_decl_function_context.  Use DECL_CONTEXT, not
7651         DECL_CLASS_CONTEXT.
7652         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
7653         DECL_CLASS_CONTEXT.
7654         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
7655         DECL_REAL_CONTEXT.
7656         (push_template_decl_real): Likewise.
7657         (instantiate_class_template): Don't call add_friends.
7658         (tsubst_default_argument): Use DECL_CONTEXT, not
7659         DECL_REAL_CONTEXT.
7660         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
7661         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
7662         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
7663         DECL_CLASS_CONTEXT.
7664         * repo.c (repo_inline_used): Likewise.
7665         * search.c (current_scope): Adjust for new _CONTEXT macros.
7666         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
7667         DECL_REAL_CONTEXT.
7668         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
7669         (lookup_fnfields_here):Likewise.
7670         (check_final_overrider): Likewise.
7671         (init_vbase_pointers): Likewise.
7672         (virtual_context): Likewise.
7673         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
7674         (expand_body): Use decl_function_context, not
7675         hack_decl_function_context.
7676         * tree.c (hack_decl_function_context): Remove.
7677         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
7678         DECL_CLASS_CONTEXT.
7679         * typeck2.c (error_not_base_type): Likewise.
7680
7681 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
7682
7683         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
7684
7685 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7686
7687         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
7688
7689 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
7690
7691         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
7692
7693 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
7694
7695         * decl2.c (lang_decode_option): Enable automatic line wrapping.
7696
7697 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
7698
7699         * parse.y (frob_specs): Split out...
7700         (parse_decl): From here.
7701         (fn.def2): Call initial_deferred_type_access_control.
7702         (after_type_component_declarator0): Call frob_specs.
7703         (notype_component_declarator0): Likewise.
7704         * search.c (friend_accessible_p): Nested classes are friends of their
7705         enclosing classes.
7706
7707 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
7708
7709         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
7710         used to create an implicit temporary.
7711
7712         * class.c (dfs_modify_vtables): Tweak calculation of functions to
7713         override.
7714
7715 2000-02-08  Nathan Sidwell  <nathan@acm.org>
7716
7717         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
7718         strip array element qualifiers too.
7719
7720 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
7721
7722         * decl.c (store_parm_decls): Don't build cleanups for parameters
7723         while processing_template_decl.
7724
7725 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
7726
7727         * cp-tree.h (struct saved_scope): Add incomplete field.
7728         (namespace_scope_incomplete): New macro.
7729         * decl.c (pushdecl): Use it.
7730         (hack_incomplete_structures): Use it.  See through artificial
7731         binding levels.
7732         (mark_saved_scope): Mark it.
7733
7734         Implement access control for nested types.
7735         * search.c (type_access_control): New fn.
7736         (accessible_p): Now we do perform access control for types.
7737         * semantics.c (deferred_type_access_control): New fn.
7738         (initial_deferred_type_access_control): New fn.
7739         (begin_function_definition): Call it.  Add lookups parm.
7740         * decl.c (struct binding_level): Add this_class field.
7741         (pushlevel_class): Set it.
7742         (mark_binding_level): Mark it.
7743         (lookup_name_real): Use it.  Call type_access_control.
7744         (mark_saved_scope): Mark lookups field.
7745         * cp-tree.h (flagged_type_tree): Add lookups field.
7746         (struct saved_scope): Add lookups field.
7747         (type_lookups): New macro.
7748         * parse.y (declmods): Now <ftype>.
7749         (parse_decl): Add lookups parm.  Call
7750         initial_deferred_type_access_control.
7751         (lang_extdef): Clear type_lookups.
7752         (typed_declspecs, declmods, typespec): Set lookups field.
7753         (initdcl): Call deferred_type_access_control.
7754         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
7755         component_decl_1, named_parm): Adjust.
7756         * friend.c (is_friend): Nested classes are friends of their
7757         enclosing classes.
7758
7759         * class.c (currently_open_derived_class): New fn.
7760         * method.c (hack_identifier): Use it.
7761
7762         * lex.c (do_identifier): Remove obsolete code.
7763
7764         * parse.y (typed_typespecs): Propagate new_type_flag properly.
7765
7766 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
7767
7768         * tinfo.h: Remove apostrophes from C++ comment (xgettext
7769         thinks this file is plain C).
7770
7771 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7772
7773         * Makefile.in (call.o): Depend on $(EXPR_H).
7774
7775         * call.c: Include "expr.h".
7776
7777         * class.c (dump_class_hierarchy): Add prototype.
7778
7779         * search.c (dfs_get_pure_virtuals): Likewise.
7780
7781 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
7782
7783         * parse.y (simple_stmt): Allow :: token in asm parameter list.
7784         * parse.c: Rebuilt.
7785
7786 Mon Jan 31 15:35:29 2000  Jim Wilson  <wilson@cygnus.com>
7787
7788         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
7789         Store it in DECL_FCONTEXT.
7790         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
7791
7792 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
7793
7794         * tinfo.h (old abi): #include "tconfig.h".
7795         * tinfo.cc (convert_to_base): Move into old abi section.
7796
7797 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
7798
7799         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
7800         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
7801         (BINFO_PRIMARY_BINFO): New macro.
7802         (BF_DELTA): Rename to ...
7803         (BV_DELTA): ... this.
7804         (BF_VCALL_INDEX): Rename to ...
7805         (BV_VCALL_INDEX): ... this.
7806         (BF_FN): Rename to ...
7807         (BV_FN): ... this.
7808         * class.c (build_vbase_path): Adjust for changes to reverse_path.
7809         (set_rtti_entry): Rename BF_ macros to BV_ variants.
7810         (modify_vtable_entry): Simplify.
7811         (add_virtual_function): Rename BF_ macros to BV_ variants.
7812         (build_vtable_initializer): Likewise.
7813         (get_class_offset_1): Remove.
7814         (dfs_get_class_offset): Likewise.
7815         (get_class_offset): Likewise.
7816         (dfs_find_final_overrider): New function.
7817         (find_final_overrider): Likewise.
7818         (modify_one_vtable): Remove.
7819         (dfs_find_base): New function.
7820         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
7821         find_final_overrider.
7822         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
7823         virtuals.
7824         (dfs_fixup_vtable_deltas): Remove.
7825         (override_one_vtable): Remove.
7826         (merge_overrides): Likewise.
7827         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
7828         unreal chilren of virtual bases.
7829         (finish_struct_1): Don't use merge_overrides.  Don't use
7830         dfs_fixup_vtable_deltas.
7831         * tree.c (reverse_path): Return a TREE_LIST, not a chain of
7832         BINFOs.
7833
7834 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
7835             Jason Merrill  <jason@yorick.cygnus.com>
7836
7837         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
7838
7839 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
7840
7841         * exception.cc (__throw_bad_typeid): Add missing std::.
7842
7843 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7844
7845         * cp-tree.h (make_thunk): PROTO -> PARAMS.
7846
7847 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
7848
7849         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
7850
7851         Runtime support for new-abi rtti.
7852         * inc/typeinfo (type_info::operator!=): Define in class.
7853         (type_info::before, type_info::name, type_info::operator==,
7854         type_info::operator!=): Define new ABI implementations.
7855         (type_info::is_pointer_p, type_info::is_function_p): Declare
7856         new virtual functions.
7857         (type_info::do_catch, type_info::do_upcast): Likewise.
7858
7859         * tinfo.h (__base_class_info): Define new class.
7860         (__class_type_info): Likewise.
7861         (__si_class_type_info): Likewise.
7862         (__vmi_class_type_info): Likewise.
7863         (__dynamic_cast): Prototype.
7864
7865         * tinfo.cc: Conditionalize old and new rtti mechanisms.
7866         (type_info::is_pointer_p): Define new function.
7867         (type_info::is_function_p): Likewise.
7868         (type_info::do_catch): Likewise.
7869         (type_info::do_upcast): Likewise.
7870         (vtable_prefix): New structure for vtable access.
7871         (adjust_pointer): Define new template function.
7872         (contained_p, public_p, virtual_p, contained_public_p,
7873         contained_nonpublic_p, contained_nonvirtual_p): Define new
7874         functions.
7875         (nonvirtual_base_type): New local variable.
7876         (__class_type_info::~__class_type_info): Define.
7877         (__si_class_type_info::~__si_class_type_info): Likewise.
7878         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
7879         (__class_type_info::do_catch): Define new function.
7880         (__class_type_info::do_upcast): Likewise.
7881         (__class_type_info::find_public_src): Likewise.
7882         (__class_type_info::do_find_public_src): Likewise.
7883         (__si_class_type_info::do_find_public_src): Likewise.
7884         (__vmi_class_type_info::do_find_public_src): Likewise.
7885         (__class_type_info::do_dyncast): Likewise.
7886         (__si_class_type_info::do_dyncast): Likewise.
7887         (__vmi_class_type_info::do_dyncast): Likewise.
7888         (__class_type_info::do_upcast): Likewise.
7889         (__si_class_type_info::do_upcast): Likewise.
7890         (__vmi_class_type_info::do_upcast): Likewise.
7891         (__dynamic_cast): Likewise.
7892
7893         * tinfo2.cc (__fundamental_type_info): Define new class.
7894         (__pointer_type_info): Likewise.
7895         (__reference_type_info): Likewise.
7896         (__array_type_info): Likewise.
7897         (__function_type_info): Likewise.
7898         (__enum_type_info): Likewise.
7899         (__ptr_to_member_type_info): Likewise.
7900         (__fundamental_type_info::~__fundamental_type_info): Define.
7901         (__pointer_type_info::~__pointer_type_info): Likewise.
7902         (__reference_type_info::~__reference_type_info): Likewise.
7903         (__array_type_info::~__array_type_info): Likewise.
7904         (__function_type_info::~__function_type_info): Likewise.
7905         (__enum_type_info::~__enum_type_info): Likewise.
7906         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
7907         (__pointer_type_info::do_catch): Define new function.
7908         (__ptr_to_member_type_info::do_catch): Define new function.
7909
7910         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
7911         (__is_pointer): Likewise.
7912
7913         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
7914
7915 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
7916
7917         * cp/class.c (build_vtable): Rename to build_primary_vtable.
7918         (prepare_fresh_vtable): Rename to build_secondary_vtable.
7919         (make_new_vtable): New function.
7920         (modify_vtable_entry): Handle generation of new vtables correctly.
7921         (modify_one_vtable): Remove unused parameter.
7922         (dfs_fixup_vtable_deltas): Likewise.
7923         (override_one_vtable): Use build_secondary_vtable.
7924         (finish_struct_1): Use build_primary_vtable and
7925         build_secondary_vtable.
7926
7927 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
7928
7929         * cp/decl.c: Adjust variable names, comments, help strings.
7930
7931 2000-01-29  Nathan Sidwell  <nathan@acm.org>
7932
7933         * new2.cc (operator delete[]): Use operator delete, don't assume
7934         implementation.
7935
7936 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
7937
7938         * class.c (build_vtbl_initializer): Add argument to
7939         build_vtable_entry call.
7940
7941 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
7942
7943         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
7944         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
7945         (BF_DELTA): New macro.
7946         (BF_VCALL_INDEX): Likewise.
7947         (BF_FN): Likewise.
7948         (THUNK_VCALL_OFFSET): Likewise.
7949         (make_thunk): Change prototype.
7950         * class.c (build_vtable_entry): Integrate
7951         build_vtable_entry_for_fn.  Handle vcall indices.
7952         (build_vtable_entry_for_fn): Remove.
7953         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
7954         BF_VCALL_INDEX, BF_FN.
7955         (modify_vtable_entry): Integrate common code from
7956         modify_one_vtable and dfs_fixup_vtable_deltas.
7957         (add_virtual_function): Set BF_VCALL_INDEX.
7958         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
7959         and BF_FN.
7960         (modify_one_vtable): Simplify.
7961         (dfs_fixup_vtable_deltas): Likewise.
7962         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
7963         * method.c (make_thunk): Handle vcall indices.
7964
7965 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
7966
7967         Compiler side new abi rtti (not enabled).
7968         * cp-tree.h (new_abi_rtti_p): New macro.
7969         (emit_support_tinfos): Prototype new function.
7970         (tinfo_decl_p): Likewise.
7971         (emit_tinfo_decl): Likwise.
7972         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
7973         macros.
7974         (doing_runtime): New local static.
7975         (init_rtti_processing): Add new-abi initializer.
7976         (get_tinfo_decl): Add new-abi logic.
7977         (tinfo_from_decl): Likewise.
7978         (build_dynamic_cast_1): Likewise.
7979         (qualifier_flags): New static function.
7980         (tinfo_base_init): Likewise.
7981         (generic_initializer): Likewise.
7982         (ptr_ref_initializer): Likewise.
7983         (ptmd_initializer): Likewise.
7984         (class_hint_flags): Likewise.
7985         (class_initializer): Likewise.
7986         (synthesize_tinfo_var): Likewise.
7987         (create_real_tinfo_var): Likewise.
7988         (create_pseudo_type_info): Likewise.
7989         (get_vmi_pseudo_type_info): Likewise.
7990         (create_tinfo_types): Likewise.
7991         (emit_support_tinfos): New global function.
7992         (tinfo_decl_p): New global predicate.
7993         (emit_tinfo_decl): New global function.
7994         * class.c (set_rtti_entry): Generalize for old and new rtti.
7995         (build_vtbl_initializer): Likewise.
7996         * decl2.c (finish_file): Likewise.
7997
7998 Thu Jan 27 20:53:36 2000  Jim Wilson  <wilson@cygnus.com>
7999
8000         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
8001         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
8002
8003 Thu Jan 27 13:54:12 2000  Mike Stump  <mrs@wrs.com>
8004
8005         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
8006         for scopes.
8007
8008 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
8009
8010         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
8011
8012 Wed Jan 26 22:19:14 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
8013
8014         * optimize.c (calls_setjmp_r): Supply new argument
8015         to special_function_p.
8016
8017 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8018
8019         * call.c: PROTO -> PARAMS.
8020         * class.c: Likewise.
8021         * cp-tree.h: Likewise.
8022         * cvt.c: Likewise.
8023         * decl.c: Likewise.
8024         * decl.h: Likewise.
8025         * decl2.c: Likewise.
8026         * dump.c: Likewise.
8027         * errfn.c: Likewise.
8028         * error.c: Likewise.
8029         * except.c: Likewise.
8030         * expr.c: Likewise.
8031         * init.c: Likewise.
8032         * input.c: Likewise.
8033         * lex.c: Likewise.
8034         * lex.h: Likewise.
8035         * method.c: Likewise.
8036         * optimize.c: Likewise.
8037         * parse.y: Likewise.
8038         * pt.c: Likewise.
8039         * repo.c: Likewise.
8040         * rtti.c: Likewise.
8041         * search.c: Likewise.
8042         * semantics.c: Likewise.
8043         * spew.c: Likewise.
8044         * tree.c: Likewise.
8045         * typeck.c: Likewise.
8046         * typeck2.c: Likewise.
8047         * xref.c: Likewise.
8048
8049 2000-01-25  Richard Henderson  <rth@cygnus.com>
8050
8051         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
8052
8053 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
8054
8055         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
8056         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
8057         (struct vcall_offset_data_s): New type.
8058         (dfs_vcall_offset_queue_p): New function.
8059         (dfs_build_vcall_offset_vtbl_entries): Likewise.
8060         (build_vcall_offset_vtbl_entries): Likewise.
8061         (layout_vtable_decl): Likewise.
8062         (num_vfun_entries): Likewise.
8063         (num_extra_vtbl_entries): Add the entries for vcall offsets.
8064         (build_vtbl_initializer): Likewise.
8065         (dfs_finish_vtabls): Use layout_vtable_decl.
8066         (modify_one_vtables): Always duplicate vtables under the new ABI.
8067         (finish_struct_1): Use layout_vtable_decl.
8068
8069 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8070
8071         * decl.c (member_function_or_else): Change third arg from a format
8072         specifier to an `enum overload_flags'.  Callers changed.
8073
8074 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
8075
8076         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
8077         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
8078         build_const_cast, get_delta_difference, check_return_expr): Avoid
8079         ANSI string concatenation usage.
8080
8081 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
8082
8083         * class.c (layout_class_type): Put the fields required to make a
8084         class non-empty at the end, not the beginning, of the TYPE_FIELDs
8085         list.
8086
8087 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
8088
8089         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
8090         template.
8091
8092         * decl2.c (mark_used): Do instantiate inlines that have been
8093         explicitly instantiated.
8094
8095 2000-01-24  Richard Henderson  <rth@cygnus.com>
8096
8097         * call.c (build_over_call): Use expand_tree_builtin.
8098         * typeck.c (build_function_call_real): Likewise.
8099         (build_binary_op_nodefault): Handle unordered compares.
8100
8101 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
8102
8103         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
8104         cp_tree_index values.
8105         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
8106         New global node #defines for them.
8107         * rtti.c (call_void_fn): Replace with ...
8108         (build_runtime_decl): ... new static function.
8109         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
8110         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
8111         (build_dynamic_cast_1): Always produce correctly typed result.
8112         Explicitly produce type_info addresses. Use dynamic_cast_node.
8113         * exception.cc (__throw_bad_cast): Return `void *'.
8114         (__throw_bad_typeid): Return `const type_info &'.
8115
8116 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
8117
8118         * cp-tree.h (get_vtable_decl): Prototype new function.
8119         * class.c (get_vtable_decl): New function. Broken out from ...
8120         (build_vtable): ... here. Use it.
8121         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
8122         by get_vtable_decl.
8123
8124 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
8125
8126         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
8127         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
8128         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
8129         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
8130         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
8131         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
8132         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
8133         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
8134         (CPTI_TINFO_VAR_ID): New enumeration.
8135         (__tp_desc_type_node, __access_mode_type_node,
8136         __bltn_desc_type_node, __user_desc_type_node,
8137         __class_desc_type_node, __ptr_desc_type_node,
8138         __attr_desc_type_node, __func_desc_type_node,
8139         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
8140         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
8141         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
8142         enum_desc_type_node, class_desc_type_node,
8143         si_class_desc_type_node, vmi_class_desc_type_node,
8144         ptmd_desc_type_node, base_desc_type_node): New #defines.
8145         (tinfo_fn_id, tinfo_fn_type): Rename to ...
8146         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
8147         (tinfo_var_id): New enumeration.
8148         (DECL_TINFO_FN_P): Augment comment.
8149         * decl.c (cp_global_trees): Adjust documentation.
8150         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
8151         tinfo_decl_type and tinfo_var_id.
8152         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
8153         (build_typeid): Remove unused variable.
8154         (get_tinfo_var): Use tinfo_var_id.
8155         (tinfo_name): New static function.
8156         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
8157         (tinfo_from_decl): Likewise.
8158         (get_base_offset): New static function, broken out of
8159         expand_class_desc.
8160         (expand_si_desc): Use tinfo_name.
8161         (expand_class_desc): Likewise. Lose local static variable.
8162         Use base_desc_type_node. Use get_base_offset.
8163         (expand_ptr_desc): Use tinfo_name.
8164         (expand_attr_desc): Likewise.
8165         (expand_generic_desc): Likewise.
8166
8167         * tinfo.cc (__GXX_ABI_VERSION): Test value and existance.
8168         * tinfo.h (__GXX_ABI_VERSION): Test value and existance.
8169
8170 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
8171
8172         * cp-tree.h (__eprintf): Remove declaration.
8173         * tree.c (__eprintf): Remove definition.
8174
8175 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
8176             Mark Mitchell  <mark@codesourcery.com>
8177
8178         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
8179         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
8180
8181 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
8182
8183         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
8184
8185 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
8186
8187         * cp-tree.h (register_dtor_fn): New function.
8188         * decl.c (destroy_local_static): Rename to ...
8189         (register_dtor_fn): ... this.  Give it external linkage.
8190         (expand_static_init): Use it.
8191         * decl2.c (do_static_initialization): Likewise, if using
8192         __cxa_atexit.
8193         (do_static_destruction): Check that __cxa_atexit is not in use.
8194         (finish_file): Don't call do_static_destruction if using
8195         __cxa_atexit.
8196
8197         * typeck.c (convert_arguments): Restore two-message error
8198         reporting.
8199
8200 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
8201
8202         Remap dynamic cast hint values to be consistent across ABIs.
8203         * search.c (dynamic_cast_base_recurse): Remap generated value.
8204         (get_dynamic_cast_base_type): Adjust documentation.
8205         * tinfo.h (__user_type_info::dyncast): Likewise.
8206         (__user_type_info::find_public_subobj): Remap BOFF meaning.
8207         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
8208         (__class_type_info::do_dyncast): Likewise.
8209         (__class_type_info::do_find_public_subobj): Likewise.
8210         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
8211
8212 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
8213
8214         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
8215
8216         * typeck2.c (incomplete_type_error): Restore previous
8217         cp_error and cp_error_at call sequence.
8218
8219 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
8220
8221         * class.c (dump_class_hierarchy): Make format agree with argument;
8222         cast pointer to unsigned long and print with %lx.
8223
8224 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
8225
8226         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
8227
8228         * typeck.c (composite_pointer_type, common_type,
8229         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
8230         build_function_call_real, convert_arguments,
8231         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
8232         build_unary_op, mark_addressable, build_compound_expr,
8233         build_static_cast, build_reinterpret_cast, build_const_cast,
8234         build_c_cast, build_modify_expr, get_delta_difference,
8235         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
8236         'ISO C++'.  Fusion consecutive calls to diagnotic message routines
8237         into a single one.
8238         * typeck2.c (readonly_error, abstract_virtuals_error,
8239         process_init_constructor, check_for_new_type): Likewise.
8240
8241 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
8242
8243         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
8244         VAR_DECLs.
8245
8246 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
8247
8248         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
8249         (build_x_typeid): Likewise.
8250         (get_tinfo_fn): Likewise.
8251         (get_tinfo_fn_unused): Rename to ...
8252         (get_tinfo_decl): ... here.
8253         * rtti.c (build_headof): Replace logic error with assertion.
8254         (get_tinfo_fn_dynamic): Rename to ...
8255         (get_tinfo_decl_dynamic): ... here. Make static. Use
8256         complete_type_or_else.
8257         (build_x_typeid): Move into ...
8258         (build_typeid): ... here. Adjust call to
8259         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
8260         throw_bad_typeid expression.
8261         (get_tinfo_fn_unused): Rename to ...
8262         (get_tinfo_decl): ... here. Adjust comment.
8263         (get_tinfo_fn): Delete.
8264         (tinfo_from_decl): New static function.
8265         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
8266         (get_typeid): Use complete_type_or_else.
8267         (build_dynamic_cast_1): Adjust calls to
8268         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
8269         * parse.y (primary): Adjust call to build_typeid.
8270         * except.c (build_eh_type_type_ref): Adjust call to
8271         get_tinfo_decl. Mark as used.
8272         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
8273         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
8274         * parse.c: Regenerated.
8275
8276 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
8277
8278         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
8279         calling convention.
8280         (resolves_to_fixed_type_p): Document calling convention.
8281         * rtti.c (build_x_typeid): Initialize NONNULL.
8282
8283         * cp-tree.h (build_shared_int_cst): New function.
8284         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
8285         * class.c (modify_vtable_entry): Likewise.
8286         (add_virtual_function): Split out code to generated shared
8287         INTEGER_CSTs to build_share_int_cst.
8288         (modify_all_vtables): Handle all the overridden functions here.
8289         Add overridden functions from non-primary virtual bases to the
8290         primary vtable.
8291         (finish_struct_1): Adjust call to modify_all_vtables.  Add
8292         overridden functions from non-primary bases to the vtable.
8293         * tree.c (build_shared_int_cst): New function.
8294
8295         * cp-tree.h (scratchalloc): Remove.
8296         (build_scratch_list): Likewise.
8297         * call.c (convert_class_to_reference): Replace build_scratch_list
8298         and build_expr_list with build_tree_list.
8299         (add_candidate): Replace scratchalloc with expralloc.  Note memory
8300         leak.
8301         (build_user_type_conversion_1):  Replace build_scratch_list
8302         and build_expr_list with build_tree_list.
8303         (build_new_op): Likewise.
8304         (build_op_delete_call): Likewise.
8305         (convert_like): Likewise.
8306         * cvt.c (ocp_convert): Likewise.
8307         * decl.c (start_decl): Likewise.
8308         (start_function): Likewise.
8309         (finish_destructor_body): Likewise.
8310         (maybe_build_cleanup_1): Likewise.
8311         * decl2.c (reparse_decl_as_expr): Likewise.
8312         * init.c (perform_member_init): Likewise.
8313         (expand_cleanup_for_base): Likewise.
8314         (build_builtin_delete_call): Likewise.
8315         (build_new_1): Likewise.
8316         (build_delete): Likewise.
8317         * method.c (do_build_assign_ref): Likewise.
8318         * parse.y (already_scoped_stmt): Likewise.
8319         (nontrivial_exprlist): Likewise.
8320         (net_initializer): Likewise.
8321         (initlist): Likewise.
8322         * parse.c: Regenerated.
8323         * rtti.c (build_x_typeid): Likewise.
8324         (build_dynamic_cast_1): Likewise.
8325         * typeck.c (build_x_compound_expr): Likewise.
8326         (build_static_cast): Likewise.
8327         (build_modify_expr): Likewise.
8328
8329         * cp-tree.h (DECL_VINDEX): Add documentation.
8330         * class.c (build_vtable_entry): Likewise.
8331         (start_vtable): Add comment.
8332         (add_virtual_function): Replace pending_hard_virtuals with
8333         overridden_virtuals and pending_virtuals with new_virtuals.
8334         Replace redundant assignments with assertions.
8335         (check_for_override): Add comment.
8336         (check_bases_and_members): Replace pending_hard_virtuals with
8337         overridden_virtuals and pending_virtuals with new_virtuals.
8338         (create_vtbl_ptr): Likewise.
8339         (layout_class_type): Likewise.
8340         (finish_struct_1): Likewise.  Add comments.
8341
8342 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
8343
8344         * class.c (finish_struct_1): Replace redundant code with
8345         assertions.
8346
8347         * cp-tree.h (flag_new_abi): Move.
8348         (flag_use_cxa_atexit): Likewise.
8349         (flag_honor_std): Likewise.
8350         (flag_rtti): Likewise.
8351         (vbase_offsets_in_vtable_p): Define.
8352         (vptrs_present_everywhere_p): Likewise.
8353         (TYPE_CONTAINS_VPTR_P): Likewise.
8354         (dfs_walk_real): Declare.
8355         * class.c (build_vbase_pointer_fields): Check
8356         vbase_offsets_in_vtable_p.
8357         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
8358         BINFO_VPTR_FIELD.
8359         (build_vbase_offset_vtbl_entries): Simplify.
8360         (build_vbase_offset_vtbl_entries): Adjust.
8361         (build_vbase_pointer): Add ability to look up vbase offsets in
8362         vtable.
8363         (start_vtable): New function.
8364         (add_virtual_function): Use it.
8365         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
8366         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
8367         (build_vtbl_initializer): Take the type of the complete object as
8368         input.  Use it to correctly calculate vbase offsets.
8369         (dfs_finish_vtbls): Pass the complete type to
8370         build_vtbl_initializer.
8371         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
8372         (create_vtable_ptr): Create a vtable even if there are no
8373         new virtual functions, under the new ABI.
8374         (finish_struct_1): Likewise.
8375         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
8376         * decl.c (exapnd_static_init): Remove call to
8377         preserve_initializer.
8378         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
8379         vtables.
8380         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
8381         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
8382         (construct_virtual_bases): Don't initialize virtual base pointers
8383         under the new ABI.
8384         (build_aggr_init): Clean up comment.
8385         (expand_aggr_init_1): Likewise.
8386         * rtti.c (expand_class_desc): Store the virtual function table
8387         index where the vbase offset lives in the offset field.
8388         * search.c (dfs_walk_real): Make it global.
8389         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
8390         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
8391
8392         * tinfo.h (USItype): Make it signed under the new ABI.
8393         * tinfo.cc (convert_to_base): New function.  Encapsulate base
8394         conversion logic here.
8395         (__class_type_info::do_upcast): Use it.
8396         (__class_type_info::do_dyncast): Likewise.
8397         (__class_type_info::do_find_public_subobj): Likewise.
8398
8399         * init.c (construct_virtual_bases): Don't look up the addresses of
8400         virtual bases at run-time.
8401
8402         * class.c (build_vbase_pointer): Relocate.
8403         (build_vbase_pointer_fields): Likewise.
8404         (dfs_build_vbase_offset_vtbl_entries): Likewise.
8405         (build_vbase_offset_vtbl_entries): Likewise.
8406
8407         * decl.c (init_decl_processing): Complain if -fnew-abi
8408         -fno-vtable-thunks is used.
8409
8410         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
8411         flag_new_abi.
8412
8413 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
8414
8415         * cp-tree.h (num_extra_vtbl_entries): New function.
8416         (size_extra_vtbl_entries): Likewise.
8417         (dfs_vtable_path_unmark): Likewise.
8418         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
8419         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
8420         * class.c (num_extra_vtbl_entries): New function.
8421         (size_extra_vtbl_entries): Likewise.
8422         (dfs_build_vbase_offset_vtbl_entries): New function.
8423         (build_vbase_offset_vtbl_entries): Likewise.
8424         (build_vtbl_initializer): Use it.
8425         (finish_struct_1): Adjust vtable sizes (using
8426         num_extra_vtbl_entries).
8427         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
8428         THUNK_DECL is non-NULL before expanding it.
8429         * init.c (expand_virtual_init): Adjust the vtable pointer by
8430         size_extra_vtbl_entries before storing it.
8431         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
8432         Handle TREE_LIST parameters here, not in the dfs_* functions.
8433         (dfs_unmarked_real_bases_queue_p): Adjust.
8434         (dfs_marked_real_bases_queue_p): Likewise.
8435         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
8436         (dfs_vtable_path_marked_real_bases_queue_p): New function.
8437         (dfs_vtable_path_unmark): Likewise.
8438
8439 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
8440
8441         * optimize.c (copy_body_r): Clear the operand three of a
8442         TARGET_EXPR when copying it.
8443
8444 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
8445
8446         * method.c (build_decl_overload_real): Check whether we are in ::
8447         before returning __builtin_new/delete.
8448
8449 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
8450
8451         * pt.c (tsubst_friend_function): Improve comment.
8452         (instantiate_decl): Avoid crashing when a "nested" function is
8453         instantiated from the top level.
8454
8455         * dump.c (dqeueue_and_dump): Dump
8456         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
8457
8458 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8459
8460         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
8461
8462 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
8463
8464         * g++spec.c (lang_specific_driver): Add -fnew-abi if
8465         ENABLE_NEW_GXX_ABI defined.
8466         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
8467         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
8468         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
8469
8470 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
8471
8472         * decl.c (start_cleanup_fn): Call pushdecl.
8473
8474         * call.c (convert_class_to_reference): Fix typos.
8475         (build_conditional_expr): Handle errors gracefully.
8476         * class.c (push_nested_class): Likewise.
8477         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
8478         (DECL_THIS_EXTERN): Use it.
8479         (DECL_THIS_STATIC): Likewise.
8480         * cvt.c (convert_to_void): Handle errors gracefully.
8481         (build_expr_type_conversion): Likewise.
8482         * decl.c (maybe_push_decl): Likewise.
8483         (start_decl_1): Likewise.
8484         (require_complete_types_for_parms): Likewise.
8485         * parse.y (structsp): Likewise.
8486         (base_class): Likewise.
8487         * parse.c: Regenerated.
8488         * pt.c (finish_member_template_decl): Likewise.
8489         * typeck.c (decay_conversion): Likewise.
8490
8491         * cp-tree.h (dfs_skip_vbases): New function.
8492         (find_vbase_instance): Likewise.
8493         * class.c (determine_primary_base): Allow a nearly empty base to
8494         serve as a primary base class under the new ABI.
8495         (get_class_offset_1): Rename to ...
8496         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
8497         messages here.
8498         (get_class_offset): Use it.  Issue error messages here.
8499         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
8500         find the right copies of virtual bases.
8501         (fixup_vtable_deltas1): Rename to ...
8502         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
8503         bases as primary bases.
8504         (fixup_vtable_deltas): Remove.
8505         (override_one_vtable): Handle virtual bases as primary bases.
8506         (merge_overrides): Likewise.
8507         (finish_struct_1): Likewise.
8508         (dump_class_hierarchy): Dump primary-ness of bases as well.
8509         * search.c (mark_primary_bases): Use a pre-order traversal to
8510         handle primary virtual bases.
8511         (dfs_skip_vbases): New fiunction.
8512         (expand_upcast_fixups): Adjust to handle primary virtual bases.
8513         (fixup_virtual_upcast_offsets): Likewise.
8514         (fixup_all_virtual_upcast_offsets): Likewise.
8515         (dfs_find_vbase_instances): New function.
8516         (find_vbase_instance): Likewise.
8517
8518 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
8519
8520         * lex.c (DIR_SEPARATOR): Delete macro.
8521
8522 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
8523
8524        * decl2.c (lang_decode_option): Handle automatic line wrapping
8525        option.
8526
8527 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
8528
8529         * friend.c (do_friend): Don't resolve scopes when processing
8530         template declarations, even if the qualifying scope doesn't
8531         involve template parameters.
8532
8533 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
8534
8535         * class.c (dfs_modify_vtables_queue_p): Remove.
8536         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
8537         and dfs_marked_real_bases_queue_p instead of
8538         dfs_modify_vtables_queue_p.
8539
8540         * class.c (build_vbase_path): Simplify.
8541         (dfs_propagate_binfo_offsets): New function.
8542         (propagate_binfo_offsets): Use it.
8543         (remove_base_field): Simplify.
8544         (dfs_set_offset_for_vbases): Remove.
8545         (dfs_set_offset_for_shared_vbases): New function.
8546         (dfs_set_offset_for_unshared_vbases): Likewise.
8547         (layout_virtual_bases): Use them.
8548         (layout_basetypes): Don't call propagate_binfo_offsets.
8549         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
8550         for the vbases.
8551
8552         * class.c (build_base_field): New function, split out from ...
8553         (build_base_fields): ... here.  Use it.  Allocate primary bases
8554         first, under the new ABI.
8555         (get_vtable_entry): Remove.
8556         (remove_base_field): New function, split out from ...
8557         (remove_base_fields): ... here.  Adjust since primary bases come
8558         first under the new ABI.
8559
8560         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
8561         (initialize_vtbl_ptrs): New function.
8562         (expand_indirect_vtbls_init): Change prototype.
8563         (convert_pointer_to_vbase): Declare.
8564         * init.c (expand_direct_vtbls_init): Remove.
8565         (dfs_initialize_vtbl_ptrs): New function.
8566         (initialize_vtbl_ptrs): Likewise.
8567         (emit_base_init): Use initialize_vtbl_ptrs.
8568         * search.c (convert_pointer_to_vbase): Make it global.
8569         (expand_indirect_vtbls_init): Remove vtable initialization code.
8570         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
8571
8572         * class.c (dfs_finish_vtbls): New function.
8573         (finish_vtbls): Use it.
8574         (dump_class_hierarchy): New function.
8575
8576         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
8577         (BINFO_VBASE_PRIMARY_P): New macro.
8578         (BINFO_VIRTUALS): Add to documentation.
8579         (SET_BINFO_PRIMARY_MARKED_P): Remove.
8580         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
8581         (dfs_mark_primary_bases_queue_p): Likewise.
8582         (dfs_unmarked_real_bases_queue_p): New function.
8583         (dfs_marked_real_bases_queue_p): Likewise.
8584         * search.c (dfs_mark_primary_bases): Adjust.
8585         (mark_primary_bases): Likewise.
8586         (get_shared_vbase_if_not_primary): New function.
8587         (dfs_unmarked_real_bases_queue_p): Likewise.
8588         (dfs_marked_real_bases_queue_p): Likewise.
8589         (dfs_get_pure_virtuals): Simplify.
8590         (get_pure_virtuals): Likewise.
8591
8592 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8593
8594         * lex.c: Include tm_p.h.
8595
8596 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
8597
8598         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
8599
8600 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
8601
8602         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
8603         * pt.c (instantiate_decl): Defer comdat templates that might not be
8604         needed.
8605
8606         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
8607         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
8608         (finish_file): Likewise.
8609
8610         * decl2.c (import_export_class): Undo 12/14 change.
8611
8612         * error.c (dump_decl): operator new, not operatornew.
8613
8614         * class.c (field_decl_cmp): A nontype is "greater" than a type.
8615         * search.c (lookup_field_1): Look for the last field with the
8616         desired name.
8617
8618 2000-01-05  Nathan Sidwell  <nathan@acm.org>
8619
8620         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
8621         FUNCTION_DECL.
8622
8623 2000-01-05  Nathan Sidwell  <nathan@acm.org>
8624
8625         * typeck.c (build_static_cast): Don't strip target qualifiers
8626         when casting from a class.
8627
8628 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8629
8630         * class.c (warn_hidden): Initialize variable `fndecl'.
8631
8632 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
8633
8634         * decl.c (flag_isoc9x): New variable to be able to use code in
8635         c-common.c.  For now always zero.
8636
8637 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
8638
8639         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
8640         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
8641         or unshare_base_binfos for virtual bases here.
8642         * search.c (dfs_get_vbase_types): Do it here.
8643         (get_vbase_types): Adjust.
8644
8645 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
8646
8647         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
8648         (BINFO_PRIMARY_MARKED_P): Use flag 5.
8649         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
8650         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
8651         (unmark_primary_bases): Remove declaration.
8652         (unmarkedp): Declare.
8653         (dfs_vbase_unmark): Likewise.
8654         * class.c (determine_primary_base): Return immediately if there
8655         are no base classes.  Call mark_primary_bases here.
8656         (modify_all_direct_vtables): Remove.
8657         (modify_all_indirect_vtables): Remove.
8658         (dfs_modify_vtables_queue_p): New function.
8659         (dfs_modify_vtables): New function.
8660         (modify_all_vtables): Use them.
8661         (build_base_fields): Build FIELD_DECLs for primary virtual base
8662         classes.
8663         (create_vtable_ptr): Don't call determine_primary_base here.
8664         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
8665         (dfs_set_offset_for_vbases): ... this.
8666         (layout_virtual_bases): Use it.
8667         (layout_class_type): Call determine_primary_base here.
8668         * search.c (unmarkedp): Make it global.
8669         (shared_marked_p): Simplify.
8670         (shared_unmarked_p): Likewise.
8671         (dfs_primary_bases_queue_p): Remove.
8672         (dfs_unmark_primary_bases): Likewise.
8673         (unmark_primary_bases): Likewise.
8674         (mark_primary_bases): Simplify.
8675         (get_pure_virtuals): Don't call mark_primary_bases here.
8676         (dfs_vbase_unmark): New function.
8677         (get_vbase_types): Simplify.
8678
8679         * class.c (struct base_info): Remove.
8680         (determine_primary_base): Take has_virtual_p rather than a
8681         base_info as input.  Don't calculate max_has_virtual.
8682         (finish_struct_bits): Remove max_has_virtual argument.
8683         (create_vtable_ptr): Remove max_has_virtual_p argument.
8684         (layout_virtual_bases): Remove max argument.
8685         (layout_basetypes): Likewise.
8686         (layout_class_type): Remove max_has_virtual_p argument.
8687         (finish_struct_1): Remove max_has_virtual.
8688
8689         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
8690         (layout_basetypes): Remove.
8691         * class.c (propagate_binfo_offsets): Moved here from tree.c.
8692         Update to handle primary virtual bases.
8693         (remove_base_fields): New function, split out from
8694         layout_basetypes.
8695         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
8696         (layout_virtual_bases): New function, split out from
8697         layout_basetypes.  Update to handle primary virtual bases.
8698         (layout_basetypes): Moved here from tree.c.  Use
8699         remove_base_fields and layout_virtual_bases.
8700         * search.c (dfs_mark_primary_bases_queue_p): New function.
8701         (mark_primary_bases): Use it.
8702         * tree.c (CEIL): Remove.
8703         (propagate_binfo_offsets): Remove.
8704         (layout_basetypes): Remove.
8705
8706 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
8707
8708         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
8709         (BINFO_PRIMARY_MARKED_P): New macro.
8710         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
8711         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
8712         (mark_primary_bases): New function.
8713         (unmark_primary_bases): Likewise.
8714         * search.c (get_abstract_virtuals_1): Remove.
8715         (dfs_mark_primary_bases): New function.
8716         (mark_primary_bases): Likewise.
8717         (dfs_unmark_primary_bases): Likewise.
8718         (unmark_primary_bases): Likewise.
8719         (dfs_get_pure_virtuals): Likewise.
8720
8721 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
8722
8723         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
8724         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
8725         (modify_one_vtable): Adjust.
8726         (fixup_vtable_deltas1): Likewise.
8727         (override_one_vtable): Likewise.
8728         * search.c (get_abstract_virtuals_1): Likewise.
8729         (get_pure_virtuals): Likewise.
8730         (expand_upcast_fixups): Likewise.
8731         * tree.c (debug_binfo): Likewise.
8732
8733         * class.c (build_vtable): Don't return a value.  Don't rebuild
8734         vtables for bases that have already been handled.
8735         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
8736         already been handled.
8737         (modify_one_vtable): Adjust accordingly.
8738         (fixup_vtable_deltas1): Likewise.
8739         (finish_struct_1): Likewise.
8740
8741 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
8742
8743         * call.c (build_new_method_call): Also check destructors.