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