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